Skip to content

100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.

Add multimodal agentic RAG demo

Shubhamsaboo148872ffaec5
diff --git a/.gitignore b/.gitignore
index 47702b3c..e0059239 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,5 @@ venv/
# Node
node_modules/
.next/
+dist/
+*.tsbuildinfo
diff --git a/README.md b/README.md
index a2c68c10..d78e0179 100644
--- a/README.md
+++ b/README.md
@@ -218,6 +218,7 @@ streamlit run travel_agent.py
* [👀 Hybrid Search RAG (Cloud)](rag_tutorials/hybrid_search_rag/)
* [🔄 Llama 3.1 Local RAG](rag_tutorials/llama3.1_local_rag/)
* [🖥️ Local Hybrid Search RAG](rag_tutorials/local_hybrid_search_rag/)
+* [🧬 Multimodal Agentic RAG](rag_tutorials/multimodal_agentic_rag/)
* [🦙 Local RAG Agent](rag_tutorials/local_rag_agent/)
* [🧩 RAG-as-a-Service](rag_tutorials/rag-as-a-service/)
* [✨ RAG Agent with Cohere](rag_tutorials/rag_agent_cohere/)
diff --git a/rag_tutorials/multimodal_agentic_rag/README.md b/rag_tutorials/multimodal_agentic_rag/README.md
new file mode 100644
index 00000000..f316f307
--- /dev/null
+++ b/rag_tutorials/multimodal_agentic_rag/README.md
@@ -0,0 +1,122 @@
+# Multimodal Agentic RAG
+
+This is a local multimodal RAG demo built with Gemini Embedding 2 and Google ADK. Add text, URLs, PDFs, images, audio, or video; ask a question; and get a grounded answer with clear citations.
+
+The UI includes a 3D embedding view for inspecting the search space. Each source appears as one point. When you ask a question, the query is projected into the same space and the cited sources are highlighted.
+
+![Architecture diagram](assets/multimodal-agentic-rag-architecture.png)
+
+## What It Does
+
+- Adds and removes multimodal sources from a local in-memory index.
+- Uses Gemini Embedding 2 for source and query embeddings when `GOOGLE_API_KEY` is set.
+- Falls back to deterministic local vectors when no API key is available, so the UI can still be tested.
+- Retrieves evidence with cosine similarity over the stored embeddings.
+- Runs a Google ADK agent to coordinate answer generation from the retrieved context.
+- Shows citations separately from the answer text so citation IDs do not clutter the response.
+- Projects source and query vectors into a 3D PCA view for inspection.
+
+## Architecture
+
+| Layer | Role |
+| --- | --- |
+| React + Vite frontend | Source manager, Q&A panel, citations, trace, and 3D embedding view |
+| FastAPI backend | Ingestion, retrieval, answer API, and embedding-space snapshots |
+| `MultimodalRagStore` | In-memory source metadata, chunks, embeddings, search, and PCA projection |
+| Gemini Embedding 2 | Source and query embeddings across supported modalities |
+| Google ADK agent | Answer coordinator that receives the same retrieval packet shown in the UI |
+
+The important implementation detail is that `/ask` performs retrieval once and passes that same retrieval packet into the ADK answer flow. The answer and the citation panel are therefore based on the same ranked evidence.
+
+## Project Structure
+
+```text
+rag_tutorials/multimodal_agentic_rag/
+|-- README.md
+|-- assets/
+| `-- multimodal-agentic-rag-architecture.png
+|-- backend/
+| |-- app_state.py
+| |-- rag_store.py
+| |-- requirements.txt
+| |-- server.py
+| `-- agentic_rag_agent/
+| |-- __init__.py
+| `-- agent.py
+`-- frontend/
+ |-- index.html
+ |-- package.json
+ |-- src/
+ | |-- App.tsx
+ | |-- main.tsx
+ | `-- styles.css
+ |-- tsconfig.json
+ `-- vite.config.ts
+```
+
+## Run Locally
+
+Start the backend:
+
+```bash
+cd rag_tutorials/multimodal_agentic_rag/backend
+python3 -m venv .venv
+source .venv/bin/activate
+pip install -r requirements.txt
+export GOOGLE_API_KEY="your-google-ai-studio-key"
+python server.py
+```
+
+The backend runs at:
+
+```text
+http://localhost:8897
+```
+
+Start the frontend in another terminal:
+
+```bash
+cd rag_tutorials/multimodal_agentic_rag/frontend
+npm install
+npm run dev -- --port 5177
+```
+
+The frontend runs at:
+
+```text
+http://localhost:5177
+```
+
+If the backend is on a different port:
+
+```bash
+VITE_API_URL=http://localhost:8897 npm run dev -- --port 5177
+```
+
+## Try It
+
+1. Open `http://localhost:5177`.
+2. Add a text, URL, PDF, image, audio, or video source.
+3. Ask a question in the Q&A panel.
+4. Review the answer and citations.
+5. Inspect the source and query points in the embedding view.
+
+## API
+
+| Method | Endpoint | Description |
+| --- | --- | --- |
+| `GET` | `/health` | Backend status, ADK availability, provider, dimensions, and source counts |
+| `GET` | `/space` | Current sources, projected points, event trail, and projection metadata |
+| `POST` | `/sources/text` | Add a text source |
+| `POST` | `/sources/url` | Fetch and index a public URL |
+| `POST` | `/sources/file` | Upload and index a PDF, image, audio, or video |
+| `DELETE` | `/sources/{source_id}` | Remove a source and its chunks |
+| `POST` | `/ask` | Retrieve evidence, run the ADK answer flow, and return citations |
+
+## Notes
+
+- Storage is in memory. Restarting the backend resets the demo index.
+- URL ingestion blocks localhost and private IP ranges unless `ALLOW_PRIVATE_URLS=true` is set.
+- Media files uploaded through the Gemini File API are cleaned up after embedding.
+- Blocking media processing runs in a threadpool so the FastAPI event loop is not held.
+- For production, replace the in-memory store with durable storage and add authentication, background ingestion, evals, observability, and a managed vector database.
diff --git a/rag_tutorials/multimodal_agentic_rag/assets/multimodal-agentic-rag-architecture.png b/rag_tutorials/multimodal_agentic_rag/assets/multimodal-agentic-rag-architecture.png
new file mode 100644
index 00000000..49994043
Binary files /dev/null and b/rag_tutorials/multimodal_agentic_rag/assets/multimodal-agentic-rag-architecture.png differ
diff --git a/rag_tutorials/multimodal_agentic_rag/backend/agentic_rag_agent/__init__.py b/rag_tutorials/multimodal_agentic_rag/backend/agentic_rag_agent/__init__.py
new file mode 100644
index 00000000..4caf5181
--- /dev/null
+++ b/rag_tutorials/multimodal_agentic_rag/backend/agentic_rag_agent/__init__.py
@@ -0,0 +1,3 @@
+from .agent import root_agent
+
+__all__ = ["root_agent"]
diff --git a/rag_tutorials/multimodal_agentic_rag/backend/agentic_rag_agent/agent.py b/rag_tutorials/multimodal_agentic_rag/backend/agentic_rag_agent/agent.py
new file mode 100644
index 00000000..223599bb
--- /dev/null
+++ b/rag_tutorials/multimodal_agentic_rag/backend/agentic_rag_agent/agent.py
@@ -0,0 +1,43 @@
+from google.adk.agents import Agent
+from google.genai import types as genai_types
+
+from app_state import RAG_STORE
+
+
+def retrieve_relevant_context(query: str, top_k: int = 5) -> dict:
+ """Retrieve the most relevant multimodal source evidence for a user question."""
+ return RAG_STORE.retrieval_tool(query=query, top_k=top_k)
+
+
+def inspect_embedding_space() -> dict:
+ """Inspect current sources, modalities, dimensions, and embedding provider."""
+ return RAG_STORE.space_tool()
+
+
+def build_agent(retrieval_tool=retrieve_relevant_context) -> Agent:
+ return Agent(
+ name="multimodal_agentic_rag_agent",
+ model="gemini-3-flash-preview",
+ description="Agentic RAG coordinator for a multimodal Gemini Embedding 2 workspace.",
+ instruction="""
+You are the Google ADK coordinator for a multimodal agentic RAG workspace.
+
+For every user question:
+1. Use inspect_embedding_space to understand the current workspace.
+2. Use retrieve_relevant_context with the user's question before answering.
+3. Ground the answer in the retrieved evidence. Do not invent facts that are not supported by the workspace.
+4. Do not include raw citation ids, source ids, bracket citations, Markdown bold markers, or asterisk bullets in the answer. The UI shows citations separately.
+5. Start with a clear direct answer in 2-3 sentences.
+6. If helpful, add a short "Key points:" section with simple hyphen bullets.
+7. Explain briefly when the vector evidence is weak or sparse.
+8. Keep the answer useful, direct, and demo-friendly.
+""",
+ tools=[inspect_embedding_space, retrieval_tool],
+ generate_content_config=genai_types.GenerateContentConfig(
+ temperature=0.25,
+ max_output_tokens=900,
+ ),
+ )
+
+
+root_agent = build_agent()
diff --git a/rag_tutorials/multimodal_agentic_rag/backend/app_state.py b/rag_tutorials/multimodal_agentic_rag/backend/app_state.py
new file mode 100644
index 00000000..f85cc303
--- /dev/null
+++ b/rag_tutorials/multimodal_agentic_rag/backend/app_state.py
@@ -0,0 +1,4 @@
+from rag_store import MultimodalRagStore
+
+
+RAG_STORE = MultimodalRagStore()
diff --git a/rag_tutorials/multimodal_agentic_rag/backend/rag_store.py b/rag_tutorials/multimodal_agentic_rag/backend/rag_store.py
new file mode 100644
index 00000000..217e2467
--- /dev/null
+++ b/rag_tutorials/multimodal_agentic_rag/backend/rag_store.py
@@ -0,0 +1,550 @@
+import hashlib
+import math
+import os
+import re
+import tempfile
+import threading
+import time
+import uuid
+from dataclasses import dataclass, field
+from pathlib import Path
+from typing import Any
+
+from google import genai
+from google.genai import types
+
+
+EMBED_MODEL = "gemini-embedding-2"
+DEFAULT_DIMENSIONS = 768
+CHUNK_WORDS = 170
+CHUNK_OVERLAP = 35
+INLINE_MEDIA_LIMIT_BYTES = 18 * 1024 * 1024
+FILE_API_POLL_SECONDS = 2
+FILE_API_MAX_WAIT_SECONDS = 90
+
+
+MODALITY_COLORS = {
+ "text": "#9fc9a2",
+ "url": "#9fbbe0",
+ "pdf": "#c08532",
+ "image": "#c0a8dd",
+ "audio": "#dfa88f",
+ "video": "#e6e5e0",
+ "query": "#f54e00",
+}
+
+
+@dataclass
+class RackChunk:
+ id: str
+ source_id: str
+ title: str
+ modality: str
+ text: str
+ vector: list[float]
+ metadata: dict[str, Any] = field(default_factory=dict)
+ created_at: float = field(default_factory=time.time)
+
+
+@dataclass
+class RackSource:
+ id: str
+ title: str
+ modality: str
+ summary: str
+ chunks: int
+ created_at: float = field(default_factory=time.time)
+ metadata: dict[str, Any] = field(default_factory=dict)
+
+
+def _cosine(a: list[float], b: list[float]) -> float:
+ dot = sum(x * y for x, y in zip(a, b))
+ norm_a = math.sqrt(sum(x * x for x in a))
+ norm_b = math.sqrt(sum(y * y for y in b))
+ if not norm_a or not norm_b:
+ return 0.0
+ return dot / (norm_a * norm_b)
+
+
+def _clean_text(text: str) -> str:
+ text = re.sub(r"\s+", " ", text or "").strip()
+ return text
+
+
+def _chunk_text(text: str) -> list[str]:
+ words = _clean_text(text).split()
+ if not words:
+ return []
+ if len(words) <= CHUNK_WORDS:
+ return [" ".join(words)]
+
+ chunks: list[str] = []
+ step = max(1, CHUNK_WORDS - CHUNK_OVERLAP)
+ for start in range(0, len(words), step):
+ chunk = words[start : start + CHUNK_WORDS]
+ if len(chunk) >= 25:
+ chunks.append(" ".join(chunk))
+ return chunks
+
+
+def _local_embedding(seed_text: str, dimensions: int = DEFAULT_DIMENSIONS) -> list[float]:
+ """Deterministic lexical fallback so the UI remains usable without a Google API key."""
+ vector = [0.0] * dimensions
+ tokens = re.findall(r"[a-z0-9][a-z0-9-]{1,}", seed_text.lower())
+ if not tokens:
+ tokens = [seed_text.lower()]
+
+ for token in tokens:
+ salt = hashlib.sha256(token.encode("utf-8", errors="ignore")).digest()
+ for i in range(0, dimensions, 8):
+ digest = hashlib.sha256(salt + i.to_bytes(4, "little")).digest()
+ for offset in range(min(8, dimensions - i)):
+ value = digest[offset] / 255.0
+ vector[i + offset] += (value * 2.0) - 1.0
+
+ norm = math.sqrt(sum(value * value for value in vector)) or 1.0
+ return [value / norm for value in vector]
+
+
+def _blend_vectors(primary: list[float], secondary: list[float], secondary_weight: float = 0.32) -> list[float]:
+ primary_weight = 1.0 - secondary_weight
+ blended = [
+ (left * primary_weight) + (right * secondary_weight)
+ for left, right in zip(primary, secondary)
+ ]
+ norm = math.sqrt(sum(value * value for value in blended)) or 1.0
+ return [value / norm for value in blended]
+
+
+def _dot(left: list[float], right: list[float]) -> float:
+ return sum(a * b for a, b in zip(left, right))
+
+
+def _normalize(vector: list[float]) -> list[float]:
+ norm = math.sqrt(sum(value * value for value in vector))
+ if norm < 1e-12:
+ return [0.0] * len(vector)
+ return [value / norm for value in vector]
+
+
+def _orthogonalize(vector: list[float], components: list[list[float]]) -> list[float]:
+ adjusted = vector[:]
+ for component in components:
+ projection = _dot(adjusted, component)
+ adjusted = [value - projection * component[index] for index, value in enumerate(adjusted)]
+ return adjusted
+
+
+class MultimodalRagStore:
+ def __init__(self, dimensions: int = DEFAULT_DIMENSIONS):
+ self.dimensions = dimensions
+ self.api_key = os.getenv("GOOGLE_API_KEY", "")
+ self.client = genai.Client(api_key=self.api_key) if self.api_key else None
+ self.sources: list[RackSource] = []
+ self.chunks: list[RackChunk] = []
+ self.events: list[dict[str, Any]] = []
+ self._lock = threading.RLock()
+ self.embedding_provider = "gemini-embedding-2" if self.client else "local-demo"
+ self._seed_demo_sources()
+
+ def _seed_demo_sources(self) -> None:
+ seed_sources = [
+ (
+ "Gemini Embedding 2 launch notes",
+ "text",
+ "Gemini Embedding 2 creates a shared vector space for text, images, audio, video, and PDFs. "
+ "For retrieval augmented generation, task prefixes separate document embeddings from query embeddings, "
+ "and output dimensionality can be truncated for latency-sensitive stores.",
+ ),
+ (
+ "ADK agentic RAG pattern",
+ "text",
+ "A Google Agent Development Kit coordinator should use tools for retrieval, inspect the evidence, "
+ "decide whether more context is needed, and answer with grounded citations from the workspace.",
+ ),
+ (
+ "Multimodal source catalog",
+ "pdf",
+ "A multimodal enterprise workspace may mix product PDFs, UI screenshots, call audio, launch videos, and "
+ "support notes in a single embedding index so a question can retrieve the right evidence across formats.",
+ ),
+ ]
+ for title, modality, text in seed_sources:
+ self.add_text_source(title=title, text=text, modality=modality, seed=True)
+
+ def _emit(self, event_type: str, payload: dict[str, Any]) -> None:
+ self.events.append({"type": event_type, "at": time.time(), **payload})
+ self.events = self.events[-80:]
+
+ def _embed_text(self, text: str, task_prefix: str) -> list[float]:
+ content = f"{task_prefix}: {text}"
+ if not self.client:
+ return _local_embedding(content, self.dimensions)
+
+ result = self.client.models.embed_content(
+ model=EMBED_MODEL,
+ contents=[content],
+ config=types.EmbedContentConfig(output_dimensionality=self.dimensions),
+ )
+ return result.embeddings[0].values
+
+ def _embed_uploaded_file(self, data: bytes, mime_type: str, title: str) -> list[float]:
+ suffix = Path(title).suffix or self._suffix_from_mime(mime_type)
+ uploaded = None
+ try:
+ with tempfile.NamedTemporaryFile(suffix=suffix, delete=True) as temp_file:
+ temp_file.write(data)
+ temp_file.flush()
+ uploaded = self.client.files.upload(
+ file=temp_file.name,
+ config=types.UploadFileConfig(mime_type=mime_type, display_name=title),
+ )
+
+ waited = 0
+ while getattr(getattr(uploaded, "state", None), "name", "") == "PROCESSING":
+ if waited >= FILE_API_MAX_WAIT_SECONDS:
+ raise ValueError("Gemini is still processing this media file. Try a shorter clip or upload it again in a moment.")
+ time.sleep(FILE_API_POLL_SECONDS)
+ waited += FILE_API_POLL_SECONDS
+ uploaded = self.client.files.get(name=uploaded.name)
+
+ state_name = getattr(getattr(uploaded, "state", None), "name", "")
+ if state_name and state_name not in {"ACTIVE", "SUCCEEDED"}:
+ raise ValueError(f"Gemini could not process this media file. File state: {state_name}.")
+
+ part = types.Part.from_uri(file_uri=uploaded.uri, mime_type=mime_type)
+ result = self.client.models.embed_content(
+ model=EMBED_MODEL,
+ contents=[part],
+ config=types.EmbedContentConfig(output_dimensionality=self.dimensions),
+ )
+ return result.embeddings[0].values
+ finally:
+ uploaded_name = getattr(uploaded, "name", None)
+ if uploaded_name:
+ try:
+ self.client.files.delete(name=uploaded_name)
+ except Exception as exc:
+ self._emit("file_cleanup_failed", {"name": uploaded_name, "error": str(exc)})
+
+ def _embed_file(self, data: bytes, mime_type: str, title: str, notes: str) -> tuple[list[float], str]:
+ if not self.client:
+ seed = f"{mime_type}:{title}:{notes}:{hashlib.sha256(data).hexdigest()}"
+ return _local_embedding(seed, self.dimensions), "local-fallback"
+
+ use_file_api = (
+ len(data) > INLINE_MEDIA_LIMIT_BYTES
+ or mime_type.startswith("video/")
+ or mime_type.startswith("audio/")
+ )
+ if use_file_api:
+ return self._embed_uploaded_file(data, mime_type, title), "gemini-file-api"
+
+ part = types.Part.from_bytes(data=data, mime_type=mime_type)
+ try:
+ result = self.client.models.embed_content(
+ model=EMBED_MODEL,
+ contents=[part],
+ config=types.EmbedContentConfig(output_dimensionality=self.dimensions),
+ )
+ return result.embeddings[0].values, "gemini-inline"
+ except Exception:
+ if mime_type.startswith(("video/", "audio/")) or mime_type == "application/pdf":
+ return self._embed_uploaded_file(data, mime_type, title), "gemini-file-api"
+ raise
+
+ def _pca_projection(self, vectors: dict[str, list[float]]) -> dict[str, dict[str, float]]:
+ if not vectors:
+ return {}
+
+ ids = list(vectors)
+ rows = [vectors[item_id][: self.dimensions] for item_id in ids]
+ if len(rows) == 1:
+ return {ids[0]: {"x": 0.0, "y": 0.0, "z": 0.0}}
+
+ means = [sum(row[index] for row in rows) / len(rows) for index in range(self.dimensions)]
+ centered = [[row[index] - means[index] for index in range(self.dimensions)] for row in rows]
+ components: list[list[float]] = []
+
+ for component_index in range(3):
+ candidate = [
+ math.sin((index + 1) * (component_index + 1) * 0.017)
+ + math.cos((index + 1) * (component_index + 2) * 0.013)
+ for index in range(self.dimensions)
+ ]
+ candidate = _normalize(_orthogonalize(candidate, components))
+
+ for _ in range(24):
+ scores = [_dot(row, candidate) for row in centered]
+ next_candidate = [0.0] * self.dimensions
+ for score, row in zip(scores, centered):
+ for index, value in enumerate(row):
+ next_candidate[index] += score * value
+ next_candidate = _normalize(_orthogonalize(next_candidate, components))
+ if not any(next_candidate):
+ break
+ candidate = next_candidate
+
+ if not any(candidate):
+ candidate = [0.0] * self.dimensions
+ candidate[min(component_index, self.dimensions - 1)] = 1.0
+ components.append(candidate)
+
+ raw = {
+ item_id: [_dot(row, component) for component in components]
+ for item_id, row in zip(ids, centered)
+ }
+ max_radius = max(
+ math.sqrt(values[0] * values[0] + values[1] * values[1] + values[2] * values[2])
+ for values in raw.values()
+ ) or 1.0
+ scale = 2.65 / max_radius
+ return {
+ item_id: {
+ "x": round(values[0] * scale, 4),
+ "y": round(values[1] * scale, 4),
+ "z": round(values[2] * scale, 4),
+ }
+ for item_id, values in raw.items()
+ }
+
+ def _chunks_for_source(self, source_id: str) -> list[RackChunk]:
+ return [chunk for chunk in self.chunks if chunk.source_id == source_id]
+
+ def _source_vector(self, source_id: str) -> list[float]:
+ chunks = self._chunks_for_source(source_id)
+ if not chunks:
+ return [0.0] * self.dimensions
+
+ vector = [0.0] * self.dimensions
+ for chunk in chunks:
+ for index, value in enumerate(chunk.vector[: self.dimensions]):
+ vector[index] += value
+ norm = math.sqrt(sum(value * value for value in vector)) or 1.0
+ return [value / norm for value in vector]
+
+ def _source_vectors(self) -> dict[str, list[float]]:
+ return {source.id: self._source_vector(source.id) for source in self.sources}
+
+ def _source_point(self, source: RackSource, projection: dict[str, float]) -> dict[str, Any]:
+ return {
+ "id": source.id,
+ "source_id": source.id,
+ "title": source.title,
+ "modality": source.modality,
+ "projection": projection,
+ "color": MODALITY_COLORS.get(source.modality, "#94a3b8"),
+ "preview": source.summary,
+ }
+
+ def add_text_source(self, title: str, text: str, modality: str = "text", seed: bool = False) -> RackSource:
+ with self._lock:
+ source_id = uuid.uuid4().hex[:10]
+ chunks = _chunk_text(text)
+ if not chunks:
+ raise ValueError("Source text is empty.")
+
+ source = RackSource(
+ id=source_id,
+ title=title.strip() or f"{modality.title()} source",
+ modality=modality,
+ summary=_clean_text(text)[:220],
+ chunks=len(chunks),
+ )
+ self.sources.append(source)
+
+ for index, chunk_text in enumerate(chunks):
+ vector = self._embed_text(chunk_text, "task: retrieval document")
+ chunk = RackChunk(
+ id=f"{source_id}-{index + 1}",
+ source_id=source_id,
+ title=source.title,
+ modality=modality,
+ text=chunk_text,
+ vector=vector,
+ metadata={"chunk_index": index + 1},
+ )
+ self.chunks.append(chunk)
+
+ if not seed:
+ self._emit("source_added", {"source_id": source_id, "title": source.title, "chunks": len(chunks)})
+ return source
+
+ def add_file_source(self, title: str, data: bytes, mime_type: str, notes: str = "") -> RackSource:
+ with self._lock:
+ modality = self._modality_from_mime(mime_type)
+ source_id = uuid.uuid4().hex[:10]
+ display_text = _clean_text(notes) or f"{title} ({mime_type}) embedded natively in Gemini Embedding 2."
+ media_vector, embedding_path = self._embed_file(data, mime_type, title, display_text)
+ annotation_text = _clean_text(f"{title}. {display_text}")
+ annotation_vector = self._embed_text(annotation_text, "task: retrieval document")
+ vector = _blend_vectors(media_vector, annotation_vector)
+ source = RackSource(
+ id=source_id,
+ title=title.strip() or "Uploaded source",
+ modality=modality,
+ summary=display_text[:220],
+ chunks=1,
+ metadata={
+ "mime_type": mime_type,
+ "bytes": len(data),
+ "embedding_path": embedding_path,
+ "annotation_blended": True,
+ },
+ )
+ chunk = RackChunk(
+ id=f"{source_id}-1",
+ source_id=source_id,
+ title=source.title,
+ modality=modality,
+ text=display_text,
+ vector=vector,
+ metadata={
+ "mime_type": mime_type,
+ "bytes": len(data),
+ "native_multimodal": bool(self.client),
+ "embedding_path": embedding_path,
+ "annotation_blended": True,
+ },
+ )
+ self.sources.append(source)
+ self.chunks.append(chunk)
+ self._emit("source_added", {"source_id": source_id, "title": source.title, "chunks": 1})
+ return source
+
+ def remove_source(self, source_id: str) -> bool:
+ with self._lock:
+ source = next((item for item in self.sources if item.id == source_id), None)
+ if not source:
+ return False
+
+ self.sources = [item for item in self.sources if item.id != source_id]
+ self.chunks = [chunk for chunk in self.chunks if chunk.source_id != source_id]
+ self._emit("source_removed", {"source_id": source_id, "title": source.title})
+ return True
+
+ def search(self, query: str, top_k: int = 6) -> dict[str, Any]:
+ with self._lock:
+ query_vector = self._embed_text(query, "task: question answering | query")
+ query_id = f"query-{uuid.uuid4().hex[:8]}"
+ source_vectors = self._source_vectors()
+ projections = self._pca_projection({**source_vectors, query_id: query_vector})
+ query_point = {
+ "id": query_id,
+ "source_id": "query",
+ "title": query,
+ "modality": "query",
+ "projection": projections.get(query_id, {"x": 0.0, "y": 0.0, "z": 0.0}),
+ "color": MODALITY_COLORS["query"],
+ "score": 1,
+ "preview": "Query embedding projected with the active source set.",
+ }
+ source_by_id = {source.id: source for source in self.sources}
+ source_matches: dict[str, dict[str, Any]] = {}
+ for chunk in self.chunks:
+ score = round(_cosine(query_vector, chunk.vector), 4)
+ current = source_matches.get(chunk.source_id)
+ if not current or score > current["score"]:
+ source = source_by_id.get(chunk.source_id)
+ if not source:
+ continue
+ source_matches[chunk.source_id] = {
+ "id": source.id,
+ "source_id": source.id,
+ "title": source.title,
+ "modality": source.modality,
+ "text": chunk.text,
+ "score": score,
+ "projection": projections.get(source.id, {"x": 0.0, "y": 0.0, "z": 0.0}),
+ "metadata": {"best_chunk": chunk.id, **chunk.metadata},
+ }
+
+ matches = sorted(source_matches.values(), key=lambda item: item["score"], reverse=True)[:top_k]
+ self._emit("query_embedded", {"query": query, "matches": [m["id"] for m in matches]})
+ return {
+ "query_point": query_point,
+ "matches": matches,
+ "space": self.snapshot(projections=projections),
+ }
+
+ def snapshot(self, projections: dict[str, dict[str, float]] | None = None) -> dict[str, Any]:
+ with self._lock:
+ source_vectors = self._source_vectors()
+ projection_map = projections or self._pca_projection(source_vectors)
+ points = [
+ self._source_point(source, projection_map.get(source.id, {"x": 0.0, "y": 0.0, "z": 0.0}))
+ for source in self.sources
+ ]
+ return {
+ "sources": [source.__dict__ for source in self.sources],
+ "points": points,
+ "events": self.events,
+ "provider": self.embedding_provider,
+ "dimensions": self.dimensions,
+ "model": EMBED_MODEL,
+ "projection": {
+ "method": "pca_3d",
+ "basis": "current source vectors plus active query when present",
+ },
+ }
+
+ def retrieval_tool(self, query: str, top_k: int = 5) -> dict[str, Any]:
+ results = self.search(query, top_k=top_k)
+ return self.retrieval_payload(results)
+
+ def retrieval_payload(self, results: dict[str, Any]) -> dict[str, Any]:
+ return {
+ "provider": self.embedding_provider,
+ "matches": [
+ {
+ "citation": match["id"],
+ "source": match["title"],
+ "modality": match["modality"],
+ "similarity": match["score"],
+ "evidence": match["text"],
+ }
+ for match in results["matches"]
+ ],
+ }
+
+ def space_tool(self) -> dict[str, Any]:
+ with self._lock:
+ source_modalities: dict[str, int] = {}
+ chunk_modalities: dict[str, int] = {}
+ for source in self.sources:
+ source_modalities[source.modality] = source_modalities.get(source.modality, 0) + 1
+ for chunk in self.chunks:
+ chunk_modalities[chunk.modality] = chunk_modalities.get(chunk.modality, 0) + 1
+ return {
+ "sources": len(self.sources),
+ "chunks": len(self.chunks),
+ "dimensions": self.dimensions,
+ "provider": self.embedding_provider,
+ "modalities": source_modalities,
+ "chunk_modalities": chunk_modalities,
+ "projection": "pca_3d",
+ }
+
+ @staticmethod
+ def _modality_from_mime(mime_type: str) -> str:
+ if mime_type == "application/pdf":
+ return "pdf"
+ if mime_type.startswith("image/"):
+ return "image"
+ if mime_type.startswith("audio/"):
+ return "audio"
+ if mime_type.startswith("video/"):
+ return "video"
+ return "text"
+
+ @staticmethod
+ def _suffix_from_mime(mime_type: str) -> str:
+ if mime_type == "application/pdf":
+ return ".pdf"
+ if mime_type.startswith("image/"):
+ return f".{mime_type.split('/', 1)[1].split(';', 1)[0]}"
+ if mime_type.startswith("audio/"):
+ return ".mp3"
+ if mime_type.startswith("video/"):
+ return ".mp4"
+ return ".bin"
diff --git a/rag_tutorials/multimodal_agentic_rag/backend/requirements.txt b/rag_tutorials/multimodal_agentic_rag/backend/requirements.txt
new file mode 100644
index 00000000..f4faba01
--- /dev/null
+++ b/rag_tutorials/multimodal_agentic_rag/backend/requirements.txt
@@ -0,0 +1,7 @@
+fastapi>=0.115.0
+uvicorn>=0.30.0
+google-genai>=1.0.0
+google-adk>=1.0.0
+python-multipart>=0.0.7
+beautifulsoup4>=4.12.0
+httpx>=0.27.0
diff --git a/rag_tutorials/multimodal_agentic_rag/backend/server.py b/rag_tutorials/multimodal_agentic_rag/backend/server.py
new file mode 100644
index 00000000..24d075f0
--- /dev/null
+++ b/rag_tutorials/multimodal_agentic_rag/backend/server.py
@@ -0,0 +1,251 @@
+import ipaddress
+import os
+import socket
+from typing import Any, Literal, Optional
+from urllib.parse import urlparse
+
+import httpx
+from bs4 import BeautifulSoup
+from fastapi import FastAPI, File, Form, HTTPException, UploadFile
+from fastapi.middleware.cors import CORSMiddleware
+from google.genai import types as genai_types
+from pydantic import BaseModel, Field, HttpUrl
+from starlette.concurrency import run_in_threadpool
+
+from app_state import RAG_STORE
+
+try:
+ from google.adk.runners import Runner
+ from google.adk.sessions import InMemorySessionService
+ from agentic_rag_agent.agent import build_agent
+
+ ADK_AVAILABLE = bool(os.getenv("GOOGLE_API_KEY"))
+except Exception:
+ Runner = None
+ InMemorySessionService = None
+ build_agent = None
+ ADK_AVAILABLE = False
+
+
+APP_NAME = "multimodal_agentic_rag"
+USER_ID = "demo-user"
+
+app = FastAPI(title="Multimodal Agentic RAG ADK")
+allowed_origins = [
+ origin.strip()
+ for origin in os.getenv("ALLOWED_ORIGINS", "http://localhost:5177,http://127.0.0.1:5177").split(",")
+ if origin.strip()
+]
+app.add_middleware(
+ CORSMiddleware,
+ allow_origins=allowed_origins,
+ allow_credentials=False,
+ allow_methods=["*"],
+ allow_headers=["*"],
+)
+
+session_service = InMemorySessionService() if ADK_AVAILABLE else None
+
+
+class TextSourceRequest(BaseModel):
+ title: str
+ text: str
+ modality: Literal["text"] = "text"
+
+
+class UrlSourceRequest(BaseModel):
+ url: HttpUrl
+ title: Optional[str] = None
+
+
+class AskRequest(BaseModel):
+ question: str
+ top_k: int = Field(6, ge=1, le=12)
+
+
+def _extract_text_from_html(html: str) -> str:
+ soup = BeautifulSoup(html, "html.parser")
+ for tag in soup(["script", "style", "nav", "footer", "header"]):
+ tag.decompose()
+ return " ".join(soup.get_text(" ").split())
+
+
+def _validate_fetch_url(url: str) -> None:
+ parsed = urlparse(url)
+ if parsed.scheme not in {"http", "https"} or not parsed.hostname:
+ raise ValueError("Only HTTP and HTTPS URLs are supported.")
+
+ if os.getenv("ALLOW_PRIVATE_URLS", "").lower() == "true":
+ return
+
+ if parsed.hostname.lower() == "localhost":
+ raise ValueError("Private and localhost URLs are disabled for URL ingestion.")
+
+ try:
+ address_info = socket.getaddrinfo(parsed.hostname, None)
+ except socket.gaierror as exc:
+ raise ValueError(f"Could not resolve URL host: {parsed.hostname}") from exc
+
+ for item in address_info:
+ address = ipaddress.ip_address(item[4][0])
+ if address.is_private or address.is_loopback or address.is_link_local or address.is_reserved:
+ raise ValueError("Private and localhost URLs are disabled for URL ingestion.")
+
+
+def _event_text(event: Any) -> str:
+ if not getattr(event, "content", None) or not event.content.parts:
+ return ""
+ fragments = []
+ for part in event.content.parts:
+ text = getattr(part, "text", None)
+ if text:
+ fragments.append(text)
+ return "".join(fragments)
+
+
+def _fallback_answer(retrieval: dict[str, Any]) -> str:
+ matches = retrieval.get("matches", [])
+ if not matches:
+ return "I could not find relevant evidence in the current sources."
+
+ lead = matches[0]
+ answer = f"The strongest evidence points to {lead['source']} as the most relevant source for this question."
+ if len(matches) > 1:
+ answer += f" I also found supporting context in {len(matches) - 1} other source{'s' if len(matches) != 2 else ''}."
+ return answer
+
+
+async def _run_adk_agent(question: str, retrieval: dict[str, Any]) -> str:
+ if not ADK_AVAILABLE:
+ return _fallback_answer(retrieval)
+
+ def retrieve_relevant_context(query: str, top_k: int = 6) -> dict:
+ """Return the exact retrieval packet already embedded for this request."""
+ return retrieval
+
+ request_agent = build_agent(retrieve_relevant_context)
+ request_runner = Runner(agent=request_agent, app_name=APP_NAME, session_service=session_service)
+ session = await session_service.create_session(app_name=APP_NAME, user_id=USER_ID)
+ content = genai_types.Content(
+ role="user",
+ parts=[genai_types.Part(text=f"Question: {question}\nUse the retrieval tool result for this exact question.")],
+ )
+ final_text = ""
+ async for event in request_runner.run_async(
+ user_id=USER_ID,
+ session_id=session.id,
+ new_message=content,
+ ):
+ text = _event_text(event)
+ if text:
+ final_text = text
+ return final_text
+
+
+async def health():
+ return {"status": "ok", "adk": ADK_AVAILABLE, **await run_in_threadpool(RAG_STORE.space_tool)}
+
+
+async def space():
+ return await run_in_threadpool(RAG_STORE.snapshot)
+
+
[email protected]("/sources/text")
+async def add_text_source(req: TextSourceRequest):
+ try:
+ source = await run_in_threadpool(RAG_STORE.add_text_source, req.title, req.text, req.modality)
+ snapshot = await run_in_threadpool(RAG_STORE.snapshot)
+ except Exception as exc:
+ raise HTTPException(400, str(exc)) from exc
+ return {"source": source.__dict__, "space": snapshot}
+
+
[email protected]("/sources/url")
+async def add_url_source(req: UrlSourceRequest):
+ try:
+ url = str(req.url)
+ await run_in_threadpool(_validate_fetch_url, url)
+ async with httpx.AsyncClient(timeout=20, follow_redirects=True) as client:
+ response = await client.get(url)
+ response.raise_for_status()
+ text = _extract_text_from_html(response.text)
+ title = req.title or url.replace("https://", "").replace("http://", "")[:80]
+ source = await run_in_threadpool(RAG_STORE.add_text_source, title, text[:12000], "url")
+ snapshot = await run_in_threadpool(RAG_STORE.snapshot)
+ except Exception as exc:
+ raise HTTPException(400, f"Could not ingest URL: {exc}") from exc
+ return {"source": source.__dict__, "space": snapshot}
+
+
[email protected]("/sources/file")
+async def add_file_source(
+ file: UploadFile = File(...),
+ title: str = Form(""),
+ notes: str = Form(""),
+):
+ data = await file.read()
+ if len(data) > 120 * 1024 * 1024:
+ raise HTTPException(400, "File too large for this demo. Keep uploads under 120 MB.")
+ try:
+ source = await run_in_threadpool(
+ RAG_STORE.add_file_source,
+ title=title or file.filename or "Uploaded source",
+ data=data,
+ mime_type=file.content_type or "application/octet-stream",
+ notes=notes,
+ )
+ snapshot = await run_in_threadpool(RAG_STORE.snapshot)
+ except Exception as exc:
+ raise HTTPException(400, str(exc)) from exc
+ return {"source": source.__dict__, "space": snapshot}
+
+
[email protected]("/sources/{source_id}")
+async def delete_source(source_id: str):
+ removed = await run_in_threadpool(RAG_STORE.remove_source, source_id)
+ if not removed:
+ raise HTTPException(404, "Source not found.")
+ return {"deleted": source_id, "space": await run_in_threadpool(RAG_STORE.snapshot)}
+
+
+async def ask(req: AskRequest):
+ if not req.question.strip():
+ raise HTTPException(400, "Question is required.")
+
+ retrieval = await run_in_threadpool(RAG_STORE.search, req.question, req.top_k)
+ retrieval_payload = RAG_STORE.retrieval_payload(retrieval)
+ answer = await _run_adk_agent(req.question, retrieval_payload)
+ trace = [
+ {
+ "agent": "space_inspector",
+ "status": "complete",
+ "detail": f"{len(RAG_STORE.sources)} sources, {len(RAG_STORE.chunks)} chunks, {RAG_STORE.dimensions} dimensions",
+ },
+ {
+ "agent": "retrieval_tool",
+ "status": "complete",
+ "detail": f"Embedded query and retrieved {len(retrieval['matches'])} nearest sources",
+ },
+ {
+ "agent": "answer_synthesizer",
+ "status": "complete",
+ "detail": "Generated grounded answer; citations are shown separately",
+ },
+ ]
+ return {
+ "answer": answer,
+ "matches": retrieval["matches"],
+ "query_point": retrieval["query_point"],
+ "trace": trace,
+ "space": retrieval["space"],
+ }
+
+
+if __name__ == "__main__":
+ import uvicorn
+
+ port = int(os.getenv("PORT", "8897"))
+ uvicorn.run(app, host="0.0.0.0", port=port)
diff --git a/rag_tutorials/multimodal_agentic_rag/frontend/index.html b/rag_tutorials/multimodal_agentic_rag/frontend/index.html
new file mode 100644
index 00000000..e400998d
--- /dev/null
+++ b/rag_tutorials/multimodal_agentic_rag/frontend/index.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <link rel="icon" href='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="14" fill="%23070806"/><circle cx="32" cy="32" r="18" fill="%23f54e00"/></svg>' />
+ <title>Multimodal Agentic RAG</title>
+ </head>
+ <body>
+ <div id="root"></div>
+ <script type="module" src="/src/main.tsx"></script>
+ </body>
+</html>
diff --git a/rag_tutorials/multimodal_agentic_rag/frontend/package-lock.json b/rag_tutorials/multimodal_agentic_rag/frontend/package-lock.json
new file mode 100644
index 00000000..79974af6
--- /dev/null
+++ b/rag_tutorials/multimodal_agentic_rag/frontend/package-lock.json
@@ -0,0 +1,1810 @@
+{
+ "name": "multimodal-agentic-rag",
+ "version": "0.1.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "multimodal-agentic-rag",
+ "version": "0.1.0",
+ "dependencies": {
+ "@vitejs/plugin-react": "^5.1.1",
+ "lucide-react": "^0.561.0",
+ "react": "^19.2.3",
+ "react-dom": "^19.2.3",
+ "three": "^0.181.2",
+ "vite": "^7.2.7"
+ },
+ "devDependencies": {
+ "@types/node": "^24.10.3",
+ "@types/react": "^19.2.7",
+ "@types/react-dom": "^19.2.3",
+ "@types/three": "^0.181.0",
+ "typescript": "^5.9.3"
+ }
+ },
+ "node_modules/@babel/code-frame": {
+ "version": "7.29.0",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz",
+ "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.28.5",
+ "js-tokens": "^4.0.0",
+ "picocolors": "^1.1.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/compat-data": {
+ "version": "7.29.3",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.3.tgz",
+ "integrity": "sha512-LIVqM46zQWZhj17qA8wb4nW/ixr2y1Nw+r1etiAWgRM6U1IqP+LNhL1yg440jYZR72jCWcWbLWzIosH+uP1fqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/core": {
+ "version": "7.29.0",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz",
+ "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.29.0",
+ "@babel/generator": "^7.29.0",
+ "@babel/helper-compilation-targets": "^7.28.6",
+ "@babel/helper-module-transforms": "^7.28.6",
+ "@babel/helpers": "^7.28.6",
+ "@babel/parser": "^7.29.0",
+ "@babel/template": "^7.28.6",
+ "@babel/traverse": "^7.29.0",
+ "@babel/types": "^7.29.0",
+ "@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.1",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz",
+ "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.29.0",
+ "@babel/types": "^7.29.0",
+ "@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.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz",
+ "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/compat-data": "^7.28.6",
+ "@babel/helper-validator-option": "^7.27.1",
+ "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.28.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz",
+ "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-module-imports": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz",
+ "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/traverse": "^7.28.6",
+ "@babel/types": "^7.28.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-module-transforms": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz",
+ "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-module-imports": "^7.28.6",
+ "@babel/helper-validator-identifier": "^7.28.5",
+ "@babel/traverse": "^7.28.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-plugin-utils": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz",
+ "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-string-parser": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
+ "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz",
+ "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-option": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz",
+ "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helpers": {
+ "version": "7.29.2",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz",
+ "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/template": "^7.28.6",
+ "@babel/types": "^7.29.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/parser": {
+ "version": "7.29.3",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.3.tgz",
+ "integrity": "sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.29.0"
+ },
+ "bin": {
+ "parser": "bin/babel-parser.js"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-react-jsx-self": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz",
+ "integrity": "sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-react-jsx-source": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz",
+ "integrity": "sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/template": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz",
+ "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.28.6",
+ "@babel/parser": "^7.28.6",
+ "@babel/types": "^7.28.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/traverse": {
+ "version": "7.29.0",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz",
+ "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.29.0",
+ "@babel/generator": "^7.29.0",
+ "@babel/helper-globals": "^7.28.0",
+ "@babel/parser": "^7.29.0",
+ "@babel/template": "^7.28.6",
+ "@babel/types": "^7.29.0",
+ "debug": "^4.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/types": {
+ "version": "7.29.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz",
+ "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-string-parser": "^7.27.1",
+ "@babel/helper-validator-identifier": "^7.28.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@dimforge/rapier3d-compat": {
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/@dimforge/rapier3d-compat/-/rapier3d-compat-0.12.0.tgz",
+ "integrity": "sha512-uekIGetywIgopfD97oDL5PfeezkFpNhwlzlaEYNOA0N6ghdsOvh/HYjSMek5Q2O1PYvRSDFcqFVJl4r4ZBwOow==",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz",
+ "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==",
+ "cpu": [
+ "ppc64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz",
+ "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz",
+ "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-x64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz",
+ "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz",
+ "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz",
+ "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz",
+ "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz",
+ "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz",
+ "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz",
+ "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ia32": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz",
+ "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==",
+ "cpu": [
+ "ia32"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz",
+ "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==",
+ "cpu": [
+ "loong64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-mips64el": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz",
+ "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==",
+ "cpu": [
+ "mips64el"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ppc64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz",
+ "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-riscv64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz",
+ "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==",
+ "cpu": [
+ "riscv64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-s390x": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz",
+ "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==",
+ "cpu": [
+ "s390x"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz",
+ "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz",
+ "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-x64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz",
+ "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz",
+ "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-x64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz",
+ "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openharmony-arm64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz",
+ "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz",
+ "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-arm64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz",
+ "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz",
+ "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==",
+ "cpu": [
+ "ia32"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz",
+ "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "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==",
+ "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==",
+ "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==",
+ "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==",
+ "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==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.1.0",
+ "@jridgewell/sourcemap-codec": "^1.4.14"
+ }
+ },
+ "node_modules/@rolldown/pluginutils": {
+ "version": "1.0.0-rc.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.3.tgz",
+ "integrity": "sha512-eybk3TjzzzV97Dlj5c+XrBFW57eTNhzod66y9HrBlzJ6NsCrWCp/2kaPS3K9wJmurBC0Tdw4yPjXKZqlznim3Q==",
+ "license": "MIT"
+ },
+ "node_modules/@rollup/rollup-android-arm-eabi": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.2.tgz",
+ "integrity": "sha512-dnlp69efPPg6Uaw2dVqzWRfAWRnYVb1XJ8CyyhIbZeaq4CA5/mLeZ1IEt9QqQxmbdvagjLIm2ZL8BxXv5lH4Yw==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-android-arm64": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.2.tgz",
+ "integrity": "sha512-OqZTwDRDchGRHHm/hwLOL7uVPB9aUvI0am/eQuWMNyFHf5PSEQmyEeYYheA0EPPKUO/l0uigCp+iaTjoLjVoHg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-arm64": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.2.tgz",
+ "integrity": "sha512-UwRE7CGpvSVEQS8gUMBe1uADWjNnVgP3Iusyda1nSRwNDCsRjnGc7w6El6WLQsXmZTbLZx9cecegumcitNfpmA==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-x64": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.2.tgz",
+ "integrity": "sha512-gjEtURKLCC5VXm1I+2i1u9OhxFsKAQJKTVB8WvDAHF+oZlq0GTVFOlTlO1q3AlCTE/DF32c16ESvfgqR7343/g==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-arm64": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.2.tgz",
+ "integrity": "sha512-Bcl6CYDeAgE70cqZaMojOi/eK63h5Me97ZqAQoh77VPjMysA/4ORQBRGo3rRy45x4MzVlU9uZxs8Uwy7ZaKnBw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-x64": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.2.tgz",
+ "integrity": "sha512-LU+TPda3mAE2QB0/Hp5VyeKJivpC6+tlOXd1VMoXV/YFMvk/MNk5iXeBfB4MQGRWyOYVJ01625vjkr0Az98OJQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.2.tgz",
+ "integrity": "sha512-2QxQrM+KQ7DAW4o22j+XZ6RKdxjLD7BOWTP0Bv0tmjdyhXSsr2Ul1oJDQqh9Zf5qOwTuTc7Ek83mOFaKnodPjg==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.2.tgz",
+ "integrity": "sha512-TbziEu2DVsTEOPif2mKWkMeDMLoYjx95oESa9fkQQK7r/Orta0gnkcDpzwufEcAO2BLBsD7mZkXGFqEdMRRwfw==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-gnu": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.2.tgz",
+ "integrity": "sha512-bO/rVDiDUuM2YfuCUwZ1t1cP+/yqjqz+Xf2VtkdppefuOFS2OSeAfgafaHNkFn0t02hEyXngZkxtGqXcXwO8Rg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-musl": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.2.tgz",
+ "integrity": "sha512-hr26p7e93Rl0Za+JwW7EAnwAvKkehh12BU1Llm9Ykiibg4uIr2rbpxG9WCf56GuvidlTG9KiiQT/TXT1yAWxTA==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loong64-gnu": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.2.tgz",
+ "integrity": "sha512-pOjB/uSIyDt+ow3k/RcLvUAOGpysT2phDn7TTUB3n75SlIgZzM6NKAqlErPhoFU+npgY3/n+2HYIQVbF70P9/A==",
+ "cpu": [
+ "loong64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loong64-musl": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.2.tgz",
+ "integrity": "sha512-2/w+q8jszv9Ww1c+6uJT3OwqhdmGP2/4T17cu8WuwyUuuaCDDJ2ojdyYwZzCxx0GcsZBhzi3HmH+J5pZNXnd+Q==",
+ "cpu": [
+ "loong64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-ppc64-gnu": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.2.tgz",
+ "integrity": "sha512-11+aL5vKheYgczxtPVVRhdptAM2H7fcDR5Gw4/bTcteuZBlH4oP9f5s9zYO9aGZvoGeBpqXI/9TZZihZ609wKw==",
+ "cpu": [
+ "ppc64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-ppc64-musl": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.2.tgz",
+ "integrity": "sha512-i16fokAGK46IVZuV8LIIwMdtqhin9hfYkCh8pf8iC3QU3LpwL+1FSFGej+O7l3E/AoknL6Dclh2oTdnRMpTzFQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.2.tgz",
+ "integrity": "sha512-49FkKS6RGQoriDSK/6E2GkAsAuU5kETFCh7pG4yD/ylj9rKhTmO3elsnmBvRD4PgJPds5W2PkhC82aVwmUcJ7A==",
+ "cpu": [
+ "riscv64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-musl": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.2.tgz",
+ "integrity": "sha512-mjYNkHPfGpUR00DuM1ZZIgs64Hpf4bWcz9Z41+4Q+pgDx73UwWdAYyf6EG/lRFldmdHHzgrYyge5akFUW0D3mQ==",
+ "cpu": [
+ "riscv64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-s390x-gnu": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.2.tgz",
+ "integrity": "sha512-ALyvJz965BQk8E9Al/JDKKDLH2kfKFLTGMlgkAbbYtZuJt9LU8DW3ZoDMCtQpXAltZxwBHevXz5u+gf0yA0YoA==",
+ "cpu": [
+ "s390x"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-gnu": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.2.tgz",
+ "integrity": "sha512-UQjrkIdWrKI626Du8lCQ6MJp/6V1LAo2bOK9OTu4mSn8GGXIkPXk/Vsp4bLHCd9Z9Iz2OTEaokUE90VweJgIYQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-musl": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.2.tgz",
+ "integrity": "sha512-bTsRGj6VlSdn/XD4CGyzMnzaBs9bsRxy79eTqTCBsA8TMIEky7qg48aPkvJvFe1HyzQ5oMZdg7AnVlWQSKLTnw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-openbsd-x64": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.2.tgz",
+ "integrity": "sha512-6d4Z3534xitaA1FcMWP7mQPq5zGwBmGbhphh2DwaA1aNIXUu3KTOfwrWpbwI4/Gr0uANo7NTtaykFyO2hPuFLg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-openharmony-arm64": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.2.tgz",
+ "integrity": "sha512-NetAg5iO2uN7eB8zE5qrZ3CSil+7IJt4WDFLcC75Ymywq1VZVD6qJ6EvNLjZ3rEm6gB7XW5JdT60c6MN35Z85Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-arm64-msvc": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.2.tgz",
+ "integrity": "sha512-NCYhOotpgWZ5kdxCZsv6Iudx0wX8980Q/oW4pNFNihpBKsDbEA1zpkfxJGC0yugsUuyDZ7gL37dbzwhR0VI7pQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-ia32-msvc": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.2.tgz",
+ "integrity": "sha512-RXsaOqXxfoUBQoOgvmmijVxJnW2IGB0eoMO7F8FAjaj0UTywUO/luSqimWBJn04WNgUkeNhh7fs7pESXajWmkg==",
+ "cpu": [
+ "ia32"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-gnu": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.2.tgz",
+ "integrity": "sha512-qdAzEULD+/hzObedtmV6iBpdL5TIbKVztGiK7O3/KYSf+HIzU257+MX1EXJcyIiDbMAqmbwaufcYPvyRryeZtA==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-msvc": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.2.tgz",
+ "integrity": "sha512-Nd/SgG27WoA9e+/TdK74KnHz852TLa94ovOYySo/yMPuTmpckK/jIF2jSwS3g7ELSKXK13/cVdmg1Z/DaCWKxA==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@tweenjs/tween.js": {
+ "version": "23.1.3",
+ "resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-23.1.3.tgz",
+ "integrity": "sha512-vJmvvwFxYuGnF2axRtPYocag6Clbb5YS7kLL+SO/TeVFzHqDIWrNKYtcsPMibjDx9O+bu+psAy9NKfWklassUA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "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==",
+ "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==",
+ "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==",
+ "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==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.28.2"
+ }
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
+ "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
+ "license": "MIT"
+ },
+ "node_modules/@types/node": {
+ "version": "24.12.2",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.2.tgz",
+ "integrity": "sha512-A1sre26ke7HDIuY/M23nd9gfB+nrmhtYyMINbjI1zHJxYteKR6qSMX56FsmjMcDb3SMcjJg5BiRRgOCC/yBD0g==",
+ "devOptional": true,
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~7.16.0"
+ }
+ },
+ "node_modules/@types/react": {
+ "version": "19.2.14",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz",
+ "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "csstype": "^3.2.2"
+ }
+ },
+ "node_modules/@types/react-dom": {
+ "version": "19.2.3",
+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz",
+ "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "^19.2.0"
+ }
+ },
+ "node_modules/@types/stats.js": {
+ "version": "0.17.4",
+ "resolved": "https://registry.npmjs.org/@types/stats.js/-/stats.js-0.17.4.tgz",
+ "integrity": "sha512-jIBvWWShCvlBqBNIZt0KAshWpvSjhkwkEu4ZUcASoAvhmrgAUI2t1dXrjSL4xXVLB4FznPrIsX3nKXFl/Dt4vA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/three": {
+ "version": "0.181.0",
+ "resolved": "https://registry.npmjs.org/@types/three/-/three-0.181.0.tgz",
+ "integrity": "sha512-MLF1ks8yRM2k71D7RprFpDb9DOX0p22DbdPqT/uAkc6AtQXjxWCVDjCy23G9t1o8HcQPk7woD2NIyiaWcWPYmA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@dimforge/rapier3d-compat": "~0.12.0",
+ "@tweenjs/tween.js": "~23.1.3",
+ "@types/stats.js": "*",
+ "@types/webxr": "*",
+ "@webgpu/types": "*",
+ "fflate": "~0.8.2",
+ "meshoptimizer": "~0.22.0"
+ }
+ },
+ "node_modules/@types/webxr": {
+ "version": "0.5.24",
+ "resolved": "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.24.tgz",
+ "integrity": "sha512-h8fgEd/DpoS9CBrjEQXR+dIDraopAEfu4wYVNY2tEPwk60stPWhvZMf4Foo5FakuQ7HFZoa8WceaWFervK2Ovg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@vitejs/plugin-react": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-5.2.0.tgz",
+ "integrity": "sha512-YmKkfhOAi3wsB1PhJq5Scj3GXMn3WvtQ/JC0xoopuHoXSdmtdStOpFrYaT1kie2YgFBcIe64ROzMYRjCrYOdYw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/core": "^7.29.0",
+ "@babel/plugin-transform-react-jsx-self": "^7.27.1",
+ "@babel/plugin-transform-react-jsx-source": "^7.27.1",
+ "@rolldown/pluginutils": "1.0.0-rc.3",
+ "@types/babel__core": "^7.20.5",
+ "react-refresh": "^0.18.0"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "peerDependencies": {
+ "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
+ }
+ },
+ "node_modules/@webgpu/types": {
+ "version": "0.1.69",
+ "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.69.tgz",
+ "integrity": "sha512-RPmm6kgRbI8e98zSD3RVACvnuktIja5+yLgDAkTmxLr90BEwdTXRQWNLF3ETTTyH/8mKhznZuN5AveXYFEsMGQ==",
+ "dev": true,
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/baseline-browser-mapping": {
+ "version": "2.10.27",
+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.27.tgz",
+ "integrity": "sha512-zEs/ufmZoUd7WftKpKyXaT6RFxpQ5Qm9xytKRHvJfxFV9DFJkZph9RvJ1LcOUi0Z1ZVijMte65JbILeV+8QQEA==",
+ "license": "Apache-2.0",
+ "bin": {
+ "baseline-browser-mapping": "dist/cli.cjs"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/browserslist": {
+ "version": "4.28.2",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz",
+ "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==",
+ "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.10.12",
+ "caniuse-lite": "^1.0.30001782",
+ "electron-to-chromium": "^1.5.328",
+ "node-releases": "^2.0.36",
+ "update-browserslist-db": "^1.2.3"
+ },
+ "bin": {
+ "browserslist": "cli.js"
+ },
+ "engines": {
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
+ }
+ },
+ "node_modules/caniuse-lite": {
+ "version": "1.0.30001791",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001791.tgz",
+ "integrity": "sha512-yk0l/YSrOnFZk3UROpDLQD9+kC1l4meK/wed583AXrzoarMGJcbRi2Q4RaUYbKxYAsZ8sWmaSa/DsLmdBeI1vQ==",
+ "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==",
+ "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==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/electron-to-chromium": {
+ "version": "1.5.349",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.349.tgz",
+ "integrity": "sha512-QsWVGyRuY07Aqb234QytTfwd5d9AJlfNIQ5wIOl1L+PZDzI9d9+Fn0FRale/QYlFxt/bUnB0/nLd1jFPGxGK1A==",
+ "license": "ISC"
+ },
+ "node_modules/esbuild": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz",
+ "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.27.7",
+ "@esbuild/android-arm": "0.27.7",
+ "@esbuild/android-arm64": "0.27.7",
+ "@esbuild/android-x64": "0.27.7",
+ "@esbuild/darwin-arm64": "0.27.7",
+ "@esbuild/darwin-x64": "0.27.7",
+ "@esbuild/freebsd-arm64": "0.27.7",
+ "@esbuild/freebsd-x64": "0.27.7",
+ "@esbuild/linux-arm": "0.27.7",
+ "@esbuild/linux-arm64": "0.27.7",
+ "@esbuild/linux-ia32": "0.27.7",
+ "@esbuild/linux-loong64": "0.27.7",
+ "@esbuild/linux-mips64el": "0.27.7",
+ "@esbuild/linux-ppc64": "0.27.7",
+ "@esbuild/linux-riscv64": "0.27.7",
+ "@esbuild/linux-s390x": "0.27.7",
+ "@esbuild/linux-x64": "0.27.7",
+ "@esbuild/netbsd-arm64": "0.27.7",
+ "@esbuild/netbsd-x64": "0.27.7",
+ "@esbuild/openbsd-arm64": "0.27.7",
+ "@esbuild/openbsd-x64": "0.27.7",
+ "@esbuild/openharmony-arm64": "0.27.7",
+ "@esbuild/sunos-x64": "0.27.7",
+ "@esbuild/win32-arm64": "0.27.7",
+ "@esbuild/win32-ia32": "0.27.7",
+ "@esbuild/win32-x64": "0.27.7"
+ }
+ },
+ "node_modules/escalade": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/fflate": {
+ "version": "0.8.2",
+ "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz",
+ "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "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==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.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==",
+ "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==",
+ "license": "MIT",
+ "bin": {
+ "json5": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "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==",
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^3.0.2"
+ }
+ },
+ "node_modules/lucide-react": {
+ "version": "0.561.0",
+ "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.561.0.tgz",
+ "integrity": "sha512-Y59gMY38tl4/i0qewcqohPdEbieBy7SovpBL9IFebhc2mDd8x4PZSOsiFRkpPcOq6bj1r/mjH/Rk73gSlIJP2A==",
+ "license": "ISC",
+ "peerDependencies": {
+ "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ }
+ },
+ "node_modules/meshoptimizer": {
+ "version": "0.22.0",
+ "resolved": "https://registry.npmjs.org/meshoptimizer/-/meshoptimizer-0.22.0.tgz",
+ "integrity": "sha512-IebiK79sqIy+E4EgOr+CAw+Ke8hAspXKzBd0JdgEmPHiAwmvEj2S4h1rfvo+o/BnfEYd/jAOg5IeeIjzlzSnDg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "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==",
+ "license": "MIT"
+ },
+ "node_modules/nanoid": {
+ "version": "3.3.12",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz",
+ "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==",
+ "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.38",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.38.tgz",
+ "integrity": "sha512-3qT/88Y3FbH/Kx4szpQQ4HzUbVrHPKTLVpVocKiLfoYvw9XSGOX2FmD2d6DrXbVYyAQTF2HeF6My8jmzx7/CRw==",
+ "license": "MIT"
+ },
+ "node_modules/picocolors": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
+ "license": "ISC"
+ },
+ "node_modules/picomatch": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
+ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/postcss": {
+ "version": "8.5.13",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.13.tgz",
+ "integrity": "sha512-qif0+jGGZoLWdHey3UFHHWP0H7Gbmsk8T5VEqyYFbWqPr1XqvLGBbk/sl8V5exGmcYJklJOhOQq1pV9IcsiFag==",
+ "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.11",
+ "picocolors": "^1.1.1",
+ "source-map-js": "^1.2.1"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/react": {
+ "version": "19.2.5",
+ "resolved": "https://registry.npmjs.org/react/-/react-19.2.5.tgz",
+ "integrity": "sha512-llUJLzz1zTUBrskt2pwZgLq59AemifIftw4aB7JxOqf1HY2FDaGDxgwpAPVzHU1kdWabH7FauP4i1oEeer2WCA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/react-dom": {
+ "version": "19.2.5",
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.5.tgz",
+ "integrity": "sha512-J5bAZz+DXMMwW/wV3xzKke59Af6CHY7G4uYLN1OvBcKEsWOs4pQExj86BBKamxl/Ik5bx9whOrvBlSDfWzgSag==",
+ "license": "MIT",
+ "dependencies": {
+ "scheduler": "^0.27.0"
+ },
+ "peerDependencies": {
+ "react": "^19.2.5"
+ }
+ },
+ "node_modules/react-refresh": {
+ "version": "0.18.0",
+ "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.18.0.tgz",
+ "integrity": "sha512-QgT5//D3jfjJb6Gsjxv0Slpj23ip+HtOpnNgnb2S5zU3CB26G/IDPGoy4RJB42wzFE46DRsstbW6tKHoKbhAxw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/rollup": {
+ "version": "4.60.2",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.2.tgz",
+ "integrity": "sha512-J9qZyW++QK/09NyN/zeO0dG/1GdGfyp9lV8ajHnRVLfo/uFsbji5mHnDgn/qYdUHyCkM2N+8VyspgZclfAh0eQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "1.0.8"
+ },
+ "bin": {
+ "rollup": "dist/bin/rollup"
+ },
+ "engines": {
+ "node": ">=18.0.0",
+ "npm": ">=8.0.0"
+ },
+ "optionalDependencies": {
+ "@rollup/rollup-android-arm-eabi": "4.60.2",
+ "@rollup/rollup-android-arm64": "4.60.2",
+ "@rollup/rollup-darwin-arm64": "4.60.2",
+ "@rollup/rollup-darwin-x64": "4.60.2",
+ "@rollup/rollup-freebsd-arm64": "4.60.2",
+ "@rollup/rollup-freebsd-x64": "4.60.2",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.60.2",
+ "@rollup/rollup-linux-arm-musleabihf": "4.60.2",
+ "@rollup/rollup-linux-arm64-gnu": "4.60.2",
+ "@rollup/rollup-linux-arm64-musl": "4.60.2",
+ "@rollup/rollup-linux-loong64-gnu": "4.60.2",
+ "@rollup/rollup-linux-loong64-musl": "4.60.2",
+ "@rollup/rollup-linux-ppc64-gnu": "4.60.2",
+ "@rollup/rollup-linux-ppc64-musl": "4.60.2",
+ "@rollup/rollup-linux-riscv64-gnu": "4.60.2",
+ "@rollup/rollup-linux-riscv64-musl": "4.60.2",
+ "@rollup/rollup-linux-s390x-gnu": "4.60.2",
+ "@rollup/rollup-linux-x64-gnu": "4.60.2",
+ "@rollup/rollup-linux-x64-musl": "4.60.2",
+ "@rollup/rollup-openbsd-x64": "4.60.2",
+ "@rollup/rollup-openharmony-arm64": "4.60.2",
+ "@rollup/rollup-win32-arm64-msvc": "4.60.2",
+ "@rollup/rollup-win32-ia32-msvc": "4.60.2",
+ "@rollup/rollup-win32-x64-gnu": "4.60.2",
+ "@rollup/rollup-win32-x64-msvc": "4.60.2",
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/scheduler": {
+ "version": "0.27.0",
+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz",
+ "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",
+ "license": "MIT"
+ },
+ "node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "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==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/three": {
+ "version": "0.181.2",
+ "resolved": "https://registry.npmjs.org/three/-/three-0.181.2.tgz",
+ "integrity": "sha512-k/CjiZ80bYss6Qs7/ex1TBlPD11whT9oKfT8oTGiHa34W4JRd1NiH/Tr1DbHWQ2/vMUypxksLnF2CfmlmM5XFQ==",
+ "license": "MIT"
+ },
+ "node_modules/tinyglobby": {
+ "version": "0.2.16",
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz",
+ "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==",
+ "license": "MIT",
+ "dependencies": {
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.4"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/SuperchupuDev"
+ }
+ },
+ "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/undici-types": {
+ "version": "7.16.0",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
+ "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
+ "devOptional": true,
+ "license": "MIT"
+ },
+ "node_modules/update-browserslist-db": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",
+ "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==",
+ "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": "7.3.2",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.2.tgz",
+ "integrity": "sha512-Bby3NOsna2jsjfLVOHKes8sGwgl4TT0E6vvpYgnAYDIF/tie7MRaFthmKuHx1NSXjiTueXH3do80FMQgvEktRg==",
+ "license": "MIT",
+ "dependencies": {
+ "esbuild": "^0.27.0",
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.3",
+ "postcss": "^8.5.6",
+ "rollup": "^4.43.0",
+ "tinyglobby": "^0.2.15"
+ },
+ "bin": {
+ "vite": "bin/vite.js"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "funding": {
+ "url": "https://github.com/vitejs/vite?sponsor=1"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ },
+ "peerDependencies": {
+ "@types/node": "^20.19.0 || >=22.12.0",
+ "jiti": ">=1.21.0",
+ "less": "^4.0.0",
+ "lightningcss": "^1.21.0",
+ "sass": "^1.70.0",
+ "sass-embedded": "^1.70.0",
+ "stylus": ">=0.54.8",
+ "sugarss": "^5.0.0",
+ "terser": "^5.16.0",
+ "tsx": "^4.8.1",
+ "yaml": "^2.4.2"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ },
+ "jiti": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "lightningcss": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "sass-embedded": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "terser": {
+ "optional": true
+ },
+ "tsx": {
+ "optional": true
+ },
+ "yaml": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/yallist": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
+ "license": "ISC"
+ }
+ }
+}
diff --git a/rag_tutorials/multimodal_agentic_rag/frontend/package.json b/rag_tutorials/multimodal_agentic_rag/frontend/package.json
new file mode 100644
index 00000000..288e1fb3
--- /dev/null
+++ b/rag_tutorials/multimodal_agentic_rag/frontend/package.json
@@ -0,0 +1,26 @@
+{
+ "name": "multimodal-agentic-rag",
+ "version": "0.1.0",
+ "private": true,
+ "type": "module",
+ "scripts": {
+ "dev": "vite --host 0.0.0.0",
+ "build": "tsc -b && vite build",
+ "preview": "vite preview --host 0.0.0.0"
+ },
+ "dependencies": {
+ "@vitejs/plugin-react": "^5.1.1",
+ "lucide-react": "^0.561.0",
+ "three": "^0.181.2",
+ "vite": "^7.2.7",
+ "react": "^19.2.3",
+ "react-dom": "^19.2.3"
+ },
+ "devDependencies": {
+ "@types/node": "^24.10.3",
+ "@types/react": "^19.2.7",
+ "@types/react-dom": "^19.2.3",
+ "@types/three": "^0.181.0",
+ "typescript": "^5.9.3"
+ }
+}
diff --git a/rag_tutorials/multimodal_agentic_rag/frontend/src/App.tsx b/rag_tutorials/multimodal_agentic_rag/frontend/src/App.tsx
new file mode 100644
index 00000000..3afd6d9c
--- /dev/null
+++ b/rag_tutorials/multimodal_agentic_rag/frontend/src/App.tsx
@@ -0,0 +1,782 @@
+import {
+ Activity,
+ AudioLines,
+ Bot,
+ Box,
+ BrainCircuit,
+ FileText,
+ Image,
+ Link,
+ Loader2,
+ MessageSquare,
+ Plus,
+ RadioTower,
+ Search,
+ Send,
+ Sparkles,
+ Trash2,
+ Upload,
+ Video,
+} from "lucide-react";
+import { useEffect, useMemo, useRef, useState } from "react";
+import * as THREE from "three";
+
+const API = import.meta.env.VITE_API_URL || "http://localhost:8897";
+
+type Modality = "text" | "url" | "pdf" | "image" | "audio" | "video" | "query";
+
+type RackPoint = {
+ id: string;
+ source_id: string;
+ title: string;
+ modality: Modality;
+ projection: { x: number; y: number; z: number };
+ color: string;
+ preview?: string;
+ score?: number;
+};
+
+type RackSource = {
+ id: string;
+ title: string;
+ modality: Modality;
+ summary: string;
+ chunks: number;
+ created_at: number;
+ metadata?: Record<string, unknown>;
+};
+
+type SpaceSnapshot = {
+ sources: RackSource[];
+ points: RackPoint[];
+ events: Array<Record<string, unknown>>;
+ provider: string;
+ dimensions: number;
+ model: string;
+ projection?: { method: string; basis: string };
+};
+
+type Match = {
+ id: string;
+ source_id: string;
+ title: string;
+ modality: Modality;
+ text: string;
+ score: number;
+ projection: { x: number; y: number; z: number };
+};
+
+type AskResponse = {
+ answer: string;
+ matches: Match[];
+ query_point: RackPoint;
+ trace: Array<{ agent: string; status: string; detail: string }>;
+ space: SpaceSnapshot;
+};
+
+const modalityIcon: Record<Modality, React.ElementType> = {
+ text: FileText,
+ url: Link,
+ pdf: FileText,
+ image: Image,
+ audio: AudioLines,
+ video: Video,
+ query: Search,
+};
+
+const sampleText = `Gemini Embedding 2 maps text, images, audio, video, and PDFs into one shared semantic vector space. In agentic RAG, the agent first embeds source chunks with a retrieval-document task prefix, then embeds user questions with a question-answering query prefix, retrieves nearest evidence, and synthesizes an answer with citations. Dimensional truncation can reduce storage cost while preserving useful semantic neighborhoods.`;
+
+function scorePct(score: number) {
+ return `${Math.round(Math.max(0, Math.min(1, score)) * 100)}%`;
+}
+
+function formatBytes(bytes: number) {
+ if (!Number.isFinite(bytes)) return "";
+ const units = ["B", "KB", "MB", "GB"];
+ let value = bytes;
+ let unitIndex = 0;
+ while (value >= 1024 && unitIndex < units.length - 1) {
+ value /= 1024;
+ unitIndex += 1;
+ }
+ return `${value.toFixed(value >= 10 || unitIndex === 0 ? 0 : 1)} ${units[unitIndex]}`;
+}
+
+function indexFromId(id: string) {
+ return Array.from(id).reduce((total, char) => total + char.charCodeAt(0), 0);
+}
+
+function cleanAnswerText(value: string) {
+ return value
+ .replace(/\[[a-f0-9]{8,12}-\d+\]/gi, "")
+ .replace(/\*\*/g, "")
+ .replace(/^\s*\*\s+/gm, "- ")
+ .replace(/[ \t]+\n/g, "\n")
+ .replace(/\n{3,}/g, "\n\n")
+ .trim();
+}
+
+function AnswerContent({ answer }: { answer: string }) {
+ const cleaned = cleanAnswerText(answer);
+
+ if (!cleaned) {
+ return <p>The answer will appear here after the ADK coordinator retrieves evidence from your sources.</p>;
+ }
+
+ const blocks = cleaned.split(/\n\s*\n/).filter(Boolean);
+ return (
+ <div className="answer-content">
+ {blocks.map((block, blockIndex) => {
+ const lines = block.split("\n").map((line) => line.trim()).filter(Boolean);
+ const isList = lines.length > 1 && lines.every((line) => line.startsWith("- "));
+ const hasHeadingAndList =
+ lines.length > 2 &&
+ lines[0].endsWith(":") &&
+ lines.slice(1).every((line) => line.startsWith("- "));
+ if (isList) {
+ return (
+ <ul key={blockIndex}>
+ {lines.map((line, lineIndex) => <li key={lineIndex}>{line.replace(/^- /, "")}</li>)}
+ </ul>
+ );
+ }
+ if (hasHeadingAndList) {
+ return (
+ <div className="answer-section" key={blockIndex}>
+ <h3>{lines[0].replace(/:$/, "")}</h3>
+ <ul>
+ {lines.slice(1).map((line, lineIndex) => <li key={lineIndex}>{line.replace(/^- /, "")}</li>)}
+ </ul>
+ </div>
+ );
+ }
+ return lines.map((line, lineIndex) => {
+ if (line.endsWith(":") && line.length < 48) {
+ return <h3 key={`${blockIndex}-${lineIndex}`}>{line.replace(/:$/, "")}</h3>;
+ }
+ if (line.startsWith("- ")) {
+ return <ul key={`${blockIndex}-${lineIndex}`}><li>{line.replace(/^- /, "")}</li></ul>;
+ }
+ return <p key={`${blockIndex}-${lineIndex}`}>{line}</p>;
+ });
+ })}
+ </div>
+ );
+}
+
+function makeGlowTexture() {
+ const canvas = document.createElement("canvas");
+ canvas.width = 128;
+ canvas.height = 128;
+ const context = canvas.getContext("2d");
+ if (!context) return new THREE.Texture();
+
+ const gradient = context.createRadialGradient(64, 64, 3, 64, 64, 62);
+ gradient.addColorStop(0, "rgba(255,255,255,0.95)");
+ gradient.addColorStop(0.22, "rgba(255,255,255,0.48)");
+ gradient.addColorStop(0.58, "rgba(255,255,255,0.14)");
+ gradient.addColorStop(1, "rgba(255,255,255,0)");
+ context.fillStyle = gradient;
+ context.fillRect(0, 0, 128, 128);
+
+ const texture = new THREE.CanvasTexture(canvas);
+ texture.colorSpace = THREE.SRGBColorSpace;
+ return texture;
+}
+
+function VectorSpace({
+ points,
+ queryPoint,
+ matches,
+ selectedId,
+ onSelect,
+}: {
+ points: RackPoint[];
+ queryPoint: RackPoint | null;
+ matches: Match[];
+ selectedId: string | null;
+ onSelect: (point: RackPoint | null) => void;
+}) {
+ const mountRef = useRef<HTMLDivElement | null>(null);
+ const pointMapRef = useRef<Map<string, RackPoint>>(new Map());
+ const selectedIdRef = useRef<string | null>(selectedId);
+
+ useEffect(() => {
+ selectedIdRef.current = selectedId;
+ }, [selectedId]);
+
+ useEffect(() => {
+ if (!mountRef.current) return;
+
+ const mount = mountRef.current;
+ const scene = new THREE.Scene();
+ scene.fog = new THREE.Fog(0x070806, 9, 26);
+
+ const camera = new THREE.PerspectiveCamera(48, mount.clientWidth / mount.clientHeight, 0.1, 100);
+ camera.position.set(0, 1.9, 9.2);
+
+ const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
+ renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
+ renderer.setSize(mount.clientWidth, mount.clientHeight);
+ renderer.outputColorSpace = THREE.SRGBColorSpace;
+ mount.appendChild(renderer.domElement);
+
+ const frameGroup = new THREE.Group();
+ const pointGroup = new THREE.Group();
+ scene.add(frameGroup);
+ scene.add(pointGroup);
+
+ const grid = new THREE.GridHelper(10, 20, 0xf54e00, 0x303126);
+ grid.position.y = -2.8;
+ grid.material.opacity = 0.28;
+ grid.material.transparent = true;
+ frameGroup.add(grid);
+
+ const axes = [
+ [new THREE.Vector3(-4.8, -2.6, -2.8), new THREE.Vector3(4.8, -2.6, -2.8), 0xf54e00],
+ [new THREE.Vector3(-4.8, -2.6, -2.8), new THREE.Vector3(-4.8, 2.8, -2.8), 0x9fc9a2],
+ [new THREE.Vector3(-4.8, -2.6, -2.8), new THREE.Vector3(-4.8, -2.6, 2.8), 0x9fbbe0],
+ ] as const;
+ axes.forEach(([start, end, color]) => {
+ const geometry = new THREE.BufferGeometry().setFromPoints([start, end]);
+ const material = new THREE.LineBasicMaterial({ color, transparent: true, opacity: 0.9 });
+ frameGroup.add(new THREE.Line(geometry, material));
+ });
+
+ const backdropGeometry = new THREE.BufferGeometry();
+ const backdropPositions = new Float32Array(150 * 3);
+ for (let index = 0; index < 150; index += 1) {
+ backdropPositions[index * 3] = (Math.random() - 0.5) * 12;
+ backdropPositions[index * 3 + 1] = (Math.random() - 0.5) * 7;
+ backdropPositions[index * 3 + 2] = (Math.random() - 0.5) * 9;
+ }
+ backdropGeometry.setAttribute("position", new THREE.BufferAttribute(backdropPositions, 3));
+ const backdrop = new THREE.Points(
+ backdropGeometry,
+ new THREE.PointsMaterial({ color: 0xf7f7f4, size: 0.012, transparent: true, opacity: 0.34 })
+ );
+ frameGroup.add(backdrop);
+
+ const raycaster = new THREE.Raycaster();
+ const pointer = new THREE.Vector2();
+ const pointerTarget = new THREE.Vector2();
+ const meshes: THREE.Mesh[] = [];
+ const halos: THREE.Sprite[] = [];
+ const objectsById = new Map<string, { halo?: THREE.Sprite; base: THREE.Vector3; orbit: number; phase: number; speed: number }>();
+ const matchedIds = new Set(matches.map((match) => match.source_id));
+ const glowTexture = makeGlowTexture();
+ const allPoints = queryPoint ? [...points, queryPoint] : points;
+ pointMapRef.current = new Map(allPoints.map((point) => [point.id, point]));
+
+ allPoints.forEach((point) => {
+ const position = new THREE.Vector3(point.projection.x * 1.35, point.projection.y * 1.35, point.projection.z * 1.35);
+ const isQuery = point.modality === "query";
+ const isMatched = matchedIds.has(point.source_id);
+ if (isQuery || isMatched) {
+ const haloMaterial = new THREE.SpriteMaterial({
+ map: glowTexture,
+ color: new THREE.Color(isQuery ? "#f54e00" : point.color),
+ transparent: true,
+ opacity: isQuery ? 0.32 : 0.24,
+ depthWrite: false,
+ });
+ const halo = new THREE.Sprite(haloMaterial);
+ halo.position.copy(position);
+ halo.scale.setScalar(isQuery ? 0.72 : 0.58);
+ halo.userData.baseScale = isQuery ? 0.72 : 0.58;
+ halo.userData.baseOpacity = isQuery ? 0.32 : 0.24;
+ halo.userData.id = point.id;
+ halos.push(halo);
+ pointGroup.add(halo);
+ }
+
+ const geometry = new THREE.SphereGeometry(0.08, 24, 24);
+ const material = new THREE.MeshBasicMaterial({
+ color: new THREE.Color(point.color),
+ transparent: true,
+ opacity: point.modality === "query" ? 1 : 0.9,
+ });
+ const mesh = new THREE.Mesh(geometry, material);
+ mesh.position.copy(position);
+ mesh.userData.id = point.id;
+ meshes.push(mesh);
+ pointGroup.add(mesh);
+ objectsById.set(point.id, {
+ halo: halos.find((item) => item.userData.id === point.id),
+ base: position,
+ orbit: isQuery ? 0.028 : 0.075 + (indexFromId(point.id) % 5) * 0.012,
+ phase: (indexFromId(point.id) % 13) * 0.62,
+ speed: isQuery ? 0.28 : 0.34 + (indexFromId(point.id) % 7) * 0.035,
+ });
+ });
+
+ const handlePointer = (event: PointerEvent) => {
+ const rect = renderer.domElement.getBoundingClientRect();
+ pointer.x = ((event.clientX - rect.left) / rect.width) * 2 - 1;
+ pointer.y = -((event.clientY - rect.top) / rect.height) * 2 + 1;
+ pointerTarget.set(pointer.x, pointer.y);
+ raycaster.setFromCamera(pointer, camera);
+ const hit = raycaster.intersectObjects(meshes)[0];
+ renderer.domElement.style.cursor = hit ? "pointer" : "default";
+ onSelect(hit ? pointMapRef.current.get(hit.object.userData.id) ?? null : null);
+ };
+
+ const handlePointerLeave = () => {
+ pointerTarget.set(0, 0);
+ renderer.domElement.style.cursor = "default";
+ onSelect(null);
+ };
+
+ renderer.domElement.addEventListener("pointermove", handlePointer);
+ renderer.domElement.addEventListener("pointerleave", handlePointerLeave);
+
+ const resize = () => {
+ camera.aspect = mount.clientWidth / mount.clientHeight;
+ camera.updateProjectionMatrix();
+ renderer.setSize(mount.clientWidth, mount.clientHeight);
+ };
+ window.addEventListener("resize", resize);
+
+ let frame = 0;
+ let animation = 0;
+ const animate = () => {
+ frame += 0.01;
+ camera.position.x += (pointerTarget.x * 0.18 - camera.position.x) * 0.025;
+ camera.position.y += (1.9 + pointerTarget.y * 0.1 - camera.position.y) * 0.025;
+ camera.lookAt(0, 0, 0);
+ meshes.forEach((mesh, index) => {
+ const object = objectsById.get(mesh.userData.id);
+ if (object) {
+ const theta = frame * object.speed + object.phase;
+ const bob = Math.sin(frame * object.speed * 1.7 + object.phase) * object.orbit * 0.48;
+ mesh.position.set(
+ object.base.x + Math.cos(theta) * object.orbit,
+ object.base.y + bob,
+ object.base.z + Math.sin(theta) * object.orbit
+ );
+ mesh.rotation.y += 0.012 + index * 0.0004;
+ mesh.rotation.x += 0.006;
+ object.halo?.position.copy(mesh.position);
+ }
+ const pulse = 1 + Math.sin(frame * 2.2 + index) * 0.055;
+ mesh.scale.setScalar(mesh.userData.id === selectedIdRef.current ? 1.22 : pulse);
+ });
+ halos.forEach((halo, index) => {
+ const base = halo.userData.baseScale || 0.58;
+ const pulse = 1 + Math.sin(frame * 1.7 + index) * 0.08;
+ halo.scale.setScalar(base * pulse);
+ const material = halo.material as THREE.SpriteMaterial;
+ material.opacity = halo.userData.id === selectedIdRef.current ? 0.46 : halo.userData.baseOpacity;
+ });
+ renderer.render(scene, camera);
+ animation = requestAnimationFrame(animate);
+ };
+ animate();
+
+ return () => {
+ cancelAnimationFrame(animation);
+ window.removeEventListener("resize", resize);
+ renderer.domElement.removeEventListener("pointermove", handlePointer);
+ renderer.domElement.removeEventListener("pointerleave", handlePointerLeave);
+ mount.removeChild(renderer.domElement);
+ glowTexture.dispose();
+ scene.traverse((object) => {
+ if (object instanceof THREE.Mesh) {
+ object.geometry.dispose();
+ if (Array.isArray(object.material)) object.material.forEach((material) => material.dispose());
+ else object.material.dispose();
+ }
+ if (object instanceof THREE.Sprite) {
+ object.material.dispose();
+ }
+ });
+ renderer.dispose();
+ };
+ }, [points, queryPoint, matches, onSelect]);
+
+ return <div className="vector-canvas" ref={mountRef} />;
+}
+
+function SourceRow({
+ source,
+ isRemoving,
+ onRemove,
+}: {
+ source: RackSource;
+ isRemoving: boolean;
+ onRemove: (source: RackSource) => void;
+}) {
+ const Icon = modalityIcon[source.modality] || Box;
+ const embeddingPath = String(source.metadata?.embedding_path || "");
+ return (
+ <div className="source-row">
+ <div className={`modality-dot ${source.modality}`}>
+ <Icon size={15} />
+ </div>
+ <div className="source-copy">
+ <div className="source-title">{source.title}</div>
+ <div className="source-summary">{source.summary}</div>
+ {embeddingPath && <div className="source-meta">{embeddingPath.replace("gemini-", "Gemini ")}</div>}
+ </div>
+ <div className="source-actions">
+ <button className="delete-source" onClick={() => onRemove(source)} disabled={isRemoving} aria-label={`Remove ${source.title}`}>
+ {isRemoving ? <Loader2 className="spin" size={13} /> : <Trash2 size={13} />}
+ </button>
+ </div>
+ </div>
+ );
+}
+
+export default function App() {
+ const [space, setSpace] = useState<SpaceSnapshot | null>(null);
+ const [tab, setTab] = useState<"text" | "url" | "file">("text");
+ const [title, setTitle] = useState("Gemini Embedding 2 field note");
+ const [text, setText] = useState(sampleText);
+ const [url, setUrl] = useState("https://developers.googleblog.com/building-with-gemini-embedding-2/");
+ const [notes, setNotes] = useState("Uploaded multimodal source for the agentic RAG workspace.");
+ const [question, setQuestion] = useState("How does Gemini Embedding 2 help agentic RAG across modalities?");
+ const [answer, setAnswer] = useState("");
+ const [matches, setMatches] = useState<Match[]>([]);
+ const [trace, setTrace] = useState<AskResponse["trace"]>([]);
+ const [queryPoint, setQueryPoint] = useState<RackPoint | null>(null);
+ const [selectedPoint, setSelectedPoint] = useState<RackPoint | null>(null);
+ const [isAddingSource, setIsAddingSource] = useState(false);
+ const [isAsking, setIsAsking] = useState(false);
+ const [removingSourceId, setRemovingSourceId] = useState<string | null>(null);
+ const [sourceStatus, setSourceStatus] = useState("");
+ const [sourceError, setSourceError] = useState("");
+ const [qaStatus, setQaStatus] = useState("");
+ const [qaError, setQaError] = useState("");
+ const [selectedFile, setSelectedFile] = useState<File | null>(null);
+ const fileRef = useRef<HTMLInputElement | null>(null);
+
+ const points = useMemo(() => space?.points ?? [], [space]);
+ const sourceCount = space?.sources.length ?? 0;
+ const pointCount = space?.points.length ?? 0;
+ const provider = space?.provider ?? "loading";
+ const projection = space?.projection?.method?.replace("_", " ").toUpperCase() ?? "PCA 3D";
+
+ async function refreshSpace() {
+ const res = await fetch(`${API}/space`);
+ setSpace(await res.json());
+ }
+
+ useEffect(() => {
+ refreshSpace().catch(() => undefined);
+ }, []);
+
+ async function addSource() {
+ setIsAddingSource(true);
+ setSourceError("");
+ setSourceStatus(tab === "file" ? "Uploading and embedding media..." : "Embedding source...");
+ try {
+ let res: Response;
+ if (tab === "text") {
+ res = await fetch(`${API}/sources/text`, {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ title, text, modality: "text" }),
+ });
+ } else if (tab === "url") {
+ res = await fetch(`${API}/sources/url`, {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ url, title: title || undefined }),
+ });
+ } else {
+ const file = fileRef.current?.files?.[0];
+ if (!file) {
+ setSourceError("Choose a file first.");
+ return;
+ }
+ const form = new FormData();
+ form.append("title", title || file.name);
+ form.append("file", file);
+ form.append("notes", notes);
+ res = await fetch(`${API}/sources/file`, { method: "POST", body: form });
+ }
+
+ const data = await res.json();
+ if (!res.ok) throw new Error(data.detail || "Source ingestion failed.");
+ setSpace(data.space);
+ setSourceStatus(`${data.source?.title || "Source"} embedded into the map.`);
+ } catch (error) {
+ setSourceError(error instanceof Error ? error.message : "Source ingestion failed.");
+ } finally {
+ setIsAddingSource(false);
+ }
+ }
+
+ async function removeSource(source: RackSource) {
+ const confirmed = window.confirm(`Remove "${source.title}" from this local vector space?`);
+ if (!confirmed) return;
+
+ setRemovingSourceId(source.id);
+ setSourceError("");
+ try {
+ const res = await fetch(`${API}/sources/${source.id}`, { method: "DELETE" });
+ if (!res.ok) throw new Error("Delete failed");
+ const data = await res.json();
+ setSpace(data.space);
+ setMatches((current) => current.filter((match) => match.source_id !== source.id));
+ if (selectedPoint?.source_id === source.id) setSelectedPoint(null);
+ if (queryPoint) setQueryPoint(null);
+ setSourceStatus(`${source.title} removed.`);
+ } catch (error) {
+ setSourceError(error instanceof Error ? error.message : "Delete failed.");
+ } finally {
+ setRemovingSourceId(null);
+ }
+ }
+
+ async function askQuestion() {
+ if (!question.trim()) return;
+ setIsAsking(true);
+ setQaError("");
+ setQaStatus("Retrieving evidence and asking the ADK coordinator...");
+ setAnswer("");
+ try {
+ const res = await fetch(`${API}/ask`, {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ question, top_k: 6 }),
+ });
+ const data: AskResponse = await res.json();
+ if (!res.ok) throw new Error((data as unknown as { detail?: string }).detail || "Question failed.");
+ setAnswer(data.answer);
+ setMatches(data.matches);
+ setTrace(data.trace);
+ setQueryPoint(data.query_point);
+ setSpace(data.space);
+ setQaStatus(`Retrieved ${data.matches.length} citation${data.matches.length === 1 ? "" : "s"}.`);
+ } catch (error) {
+ setQaError(error instanceof Error ? error.message : "Something went wrong.");
+ } finally {
+ setIsAsking(false);
+ }
+ }
+
+ return (
+ <main className="app-shell">
+ <header className="topbar">
+ <div className="brand">
+ <div className="brand-mark">
+ <BrainCircuit size={22} />
+ </div>
+ <div>
+ <h1>Multi-modal Agentic RAG</h1>
+ <p>Gemini Embedding 2 · Google ADK</p>
+ </div>
+ </div>
+ <div className="status-strip">
+ <span><RadioTower size={14} /> {provider}</span>
+ <span><Box size={14} /> {pointCount} points</span>
+ <span><Activity size={14} /> {sourceCount} sources</span>
+ </div>
+ </header>
+
+ <section className="workspace">
+ <aside className="left-rail">
+ <section className="panel source-list">
+ <div className="panel-heading source-list-heading">
+ <div>
+ <h2>Indexed sources</h2>
+ <p>Remove sources when they should leave the vector space.</p>
+ </div>
+ </div>
+ {space?.sources.map((source) => (
+ <SourceRow
+ source={source}
+ key={source.id}
+ isRemoving={removingSourceId === source.id}
+ onRemove={removeSource}
+ />
+ ))}
+ </section>
+
+ <section className="panel source-panel">
+ <div className="panel-heading">
+ <div>
+ <h2>Add source</h2>
+ <p>Embed new evidence into the shared vector space.</p>
+ </div>
+ <button className="icon-button" onClick={refreshSpace} aria-label="Refresh embedding space">
+ <Activity size={16} />
+ </button>
+ </div>
+
+ <div className="tabs" role="tablist">
+ <button className={tab === "text" ? "active" : ""} onClick={() => setTab("text")}><FileText size={14} /> Text</button>
+ <button className={tab === "url" ? "active" : ""} onClick={() => setTab("url")}><Link size={14} /> URL</button>
+ <button className={tab === "file" ? "active" : ""} onClick={() => setTab("file")}><Upload size={14} /> File</button>
+ </div>
+
+ <label className="field-label">Title</label>
+ <input value={title} onChange={(event) => setTitle(event.target.value)} aria-label="Source title" />
+
+ {tab === "text" && (
+ <>
+ <label className="field-label">Source text</label>
+ <textarea value={text} onChange={(event) => setText(event.target.value)} aria-label="Source text" />
+ </>
+ )}
+
+ {tab === "url" && (
+ <>
+ <label className="field-label">URL</label>
+ <input value={url} onChange={(event) => setUrl(event.target.value)} aria-label="URL source" />
+ </>
+ )}
+
+ {tab === "file" && (
+ <>
+ <label className="field-label">File</label>
+ <input
+ ref={fileRef}
+ type="file"
+ accept=".txt,.md,.pdf,image/*,audio/*,video/*"
+ onChange={(event) => {
+ const file = event.target.files?.[0] ?? null;
+ setSelectedFile(file);
+ if (file && title === "Gemini Embedding 2 field note") setTitle(file.name);
+ }}
+ />
+ {selectedFile && (
+ <div className="file-preview">
+ <Video size={15} />
+ <span>{selectedFile.name}</span>
+ <strong>{selectedFile.type || "file"} · {formatBytes(selectedFile.size)}</strong>
+ </div>
+ )}
+ <label className="field-label">Notes</label>
+ <textarea value={notes} onChange={(event) => setNotes(event.target.value)} aria-label="File notes" />
+ </>
+ )}
+
+ <button className="primary-button" onClick={addSource} disabled={isAddingSource}>
+ {isAddingSource ? <Loader2 className="spin" size={16} /> : <Plus size={16} />} Add source
+ </button>
+ {(sourceStatus || sourceError) && (
+ <div className={`inline-status ${sourceError ? "error" : "success"}`} role="status">
+ {sourceError || sourceStatus}
+ </div>
+ )}
+ </section>
+ </aside>
+
+ <section className="space-stage">
+ <div className="stage-header">
+ <div>
+ <h2>Embedding Space</h2>
+ <p>{space?.dimensions ?? 768}D embeddings · {projection} · one point per source</p>
+ </div>
+ <div className="stage-tools">
+ <div className="modality-key" aria-label="Modality legend">
+ {(["Text", "Image", "Audio", "Video", "PDF", "Query"] as const).map((item) => (
+ <span key={item} className={`modality-key-item key-${item.toLowerCase()}`}>{item}</span>
+ ))}
+ </div>
+ <div className="space-readout" aria-label="Embedding space status">
+ <span>{sourceCount} sources</span>
+ <span>{matches.length ? `${matches.length} matched` : "ready"}</span>
+ </div>
+ </div>
+ </div>
+ <VectorSpace
+ points={points}
+ queryPoint={queryPoint}
+ matches={matches}
+ selectedId={selectedPoint?.id ?? null}
+ onSelect={setSelectedPoint}
+ />
+ {selectedPoint && (
+ <div className="hover-card">
+ <div className={`mini-dot ${selectedPoint.modality}`} />
+ <strong>{selectedPoint.title}</strong>
+ <span>{selectedPoint.modality} · {selectedPoint.id}</span>
+ <p>{selectedPoint.preview}</p>
+ </div>
+ )}
+ </section>
+
+ <aside className="right-rail">
+ <section className="panel qa-panel">
+ <div className="panel-heading">
+ <div>
+ <h2>Q&A</h2>
+ <p>Ask a question and read the grounded answer here.</p>
+ </div>
+ <Bot size={18} />
+ </div>
+ <label className="field-label">Question</label>
+ <textarea className="question-box" value={question} onChange={(event) => setQuestion(event.target.value)} aria-label="Question" />
+ <button className="primary-button" onClick={askQuestion} disabled={isAsking}>
+ {isAsking ? <Loader2 className="spin" size={16} /> : <Send size={16} />} Ask question
+ </button>
+ {(qaStatus || qaError) && (
+ <div className={`inline-status ${qaError ? "error" : "success"}`} role="status">
+ {qaError || qaStatus}
+ </div>
+ )}
+ <div className="answer-box prominent-answer">
+ <MessageSquare size={16} />
+ <AnswerContent answer={answer} />
+ </div>
+ </section>
+
+ <section className="panel trace-panel">
+ <div className="panel-heading">
+ <div>
+ <h2>Agent Trace</h2>
+ <p>Google ADK tool path</p>
+ </div>
+ <Sparkles size={18} />
+ </div>
+ <div className="trace-list">
+ {(trace.length ? trace : [
+ { agent: "source_ingestor", status: "ready", detail: "Waiting for a question" },
+ { agent: "retrieval_tool", status: "ready", detail: "Nearest-neighbor evidence will appear here" },
+ { agent: "answer_synthesizer", status: "ready", detail: "Cited answer stream target" },
+ ]).map((step) => (
+ <div className="trace-row" key={step.agent}>
+ <span>{step.agent}</span>
+ <p>{step.detail}</p>
+ </div>
+ ))}
+ </div>
+ </section>
+
+ <section className="panel citations-panel">
+ <div className="panel-heading">
+ <div>
+ <h2>Citations</h2>
+ <p>Sources used for this answer</p>
+ </div>
+ </div>
+ <div className="citation-list">
+ {matches.length === 0 && <div className="empty-state">No query yet. Add a source, then ask a question.</div>}
+ {matches.map((match) => {
+ const Icon = modalityIcon[match.modality] || FileText;
+ return (
+ <button
+ className="citation-row"
+ key={match.id}
+ onMouseEnter={() => setSelectedPoint({ ...match, color: "#f54e00", preview: match.text })}
+ onMouseLeave={() => setSelectedPoint(null)}
+ >
+ <div className="citation-top">
+ <span><Icon size={14} /> {match.title}</span>
+ <strong>{scorePct(match.score)}</strong>
+ </div>
+ <div className="score-track" aria-hidden="true"><div style={{ width: scorePct(match.score) }} /></div>
+ <p>{match.text}</p>
+ </button>
+ );
+ })}
+ </div>
+ </section>
+ </aside>
+ </section>
+ </main>
+ );
+}
diff --git a/rag_tutorials/multimodal_agentic_rag/frontend/src/main.tsx b/rag_tutorials/multimodal_agentic_rag/frontend/src/main.tsx
new file mode 100644
index 00000000..35897016
--- /dev/null
+++ b/rag_tutorials/multimodal_agentic_rag/frontend/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(
+ <React.StrictMode>
+ <App />
+ </React.StrictMode>,
+);
diff --git a/rag_tutorials/multimodal_agentic_rag/frontend/src/styles.css b/rag_tutorials/multimodal_agentic_rag/frontend/src/styles.css
new file mode 100644
index 00000000..d6984d7c
--- /dev/null
+++ b/rag_tutorials/multimodal_agentic_rag/frontend/src/styles.css
@@ -0,0 +1,1025 @@
+:root {
+ color: #f7f7f4;
+ background: #080906;
+ font-family: Inter, system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-synthesis: none;
+ text-rendering: optimizeLegibility;
+ --canvas: #080906;
+ --canvas-soft: #10110d;
+ --surface-card: #14150f;
+ --surface-strong: #24251d;
+ --hairline: #2a2b22;
+ --hairline-soft: #202119;
+ --hairline-strong: #424336;
+ --ink: #f7f7f4;
+ --body: #cfccc0;
+ --muted: #a8a397;
+ --muted-soft: #777267;
+ --primary: #f54e00;
+ --primary-active: #ff6a24;
+ --on-primary: #ffffff;
+ --thinking: #dfa88f;
+ --grep: #9fc9a2;
+ --read: #9fbbe0;
+ --edit: #c0a8dd;
+ --done: #c08532;
+ --success: #1f8a65;
+ --error: #ff6b92;
+}
+
+* {
+ box-sizing: border-box;
+}
+
+html {
+ width: 100%;
+ height: 100%;
+}
+
+body {
+ margin: 0;
+ min-width: 0;
+ width: 100%;
+ height: 100%;
+ background: var(--canvas);
+ overflow: hidden;
+}
+
+#root {
+ width: 100%;
+ height: 100%;
+}
+
+button,
+input,
+textarea {
+ font: inherit;
+}
+
+button {
+ cursor: pointer;
+}
+
+button:focus-visible,
+input:focus-visible,
+textarea:focus-visible {
+ outline: 2px solid var(--primary);
+ outline-offset: 2px;
+}
+
+h1,
+h2,
+h3,
+p {
+ margin: 0;
+}
+
+.app-shell {
+ height: 100vh;
+ background:
+ radial-gradient(circle at 18% 10%, rgba(245, 78, 0, 0.13), transparent 24rem),
+ radial-gradient(circle at 88% 4%, rgba(159, 187, 224, 0.13), transparent 22rem),
+ linear-gradient(180deg, #0b0c08 0%, var(--canvas) 48%, #070806 100%);
+ display: flex;
+ flex-direction: column;
+}
+
+.topbar {
+ flex: 0 0 72px;
+ border-bottom: 1px solid var(--hairline);
+ background: rgba(8, 9, 6, 0.9);
+ backdrop-filter: blur(18px);
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 20px;
+ padding: 0 28px;
+ z-index: 20;
+}
+
+.brand,
+.status-strip,
+.panel-heading,
+.citation-top,
+.tabs,
+.primary-button,
+.icon-button {
+ display: flex;
+ align-items: center;
+}
+
+.brand {
+ gap: 12px;
+}
+
+.brand-mark {
+ width: 36px;
+ height: 36px;
+ border: 1px solid rgba(245, 78, 0, 0.48);
+ background: var(--surface-card);
+ color: var(--primary);
+ display: grid;
+ place-items: center;
+ border-radius: 8px;
+}
+
+.brand h1 {
+ color: var(--ink);
+ font-size: 24px;
+ line-height: 1.22;
+ font-weight: 400;
+ letter-spacing: -0.36px;
+}
+
+.brand p,
+.panel-heading p,
+.stage-header p {
+ color: var(--muted);
+ font-size: 13px;
+ line-height: 1.4;
+}
+
+.status-strip {
+ gap: 8px;
+ flex-wrap: wrap;
+ justify-content: flex-end;
+}
+
+.status-strip span {
+ min-height: 32px;
+ display: inline-flex;
+ align-items: center;
+ gap: 7px;
+ border: 1px solid var(--hairline);
+ background: rgba(20, 21, 15, 0.82);
+ color: var(--body);
+ padding: 0 10px;
+ border-radius: 9999px;
+ font-size: 11px;
+ font-weight: 600;
+ letter-spacing: 0.88px;
+ text-transform: uppercase;
+}
+
+.workspace {
+ width: 100%;
+ max-width: 1680px;
+ min-height: 0;
+ height: calc(100vh - 72px);
+ margin: 0 auto;
+ display: grid;
+ grid-template-columns: minmax(300px, 360px) minmax(520px, 1fr) minmax(340px, 390px);
+ grid-template-areas: "left stage right";
+ gap: 16px;
+ padding: 18px 24px 24px;
+ overflow: hidden;
+}
+
+.left-rail,
+.right-rail {
+ min-height: 0;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ gap: 16px;
+ overflow: hidden;
+}
+
+.left-rail {
+ grid-area: left;
+}
+
+.right-rail {
+ grid-area: right;
+ overflow-y: auto;
+ padding-right: 4px;
+ scrollbar-color: var(--hairline-strong) transparent;
+ scrollbar-width: thin;
+}
+
+.panel {
+ border: 1px solid var(--hairline);
+ background: var(--surface-card);
+ border-radius: 12px;
+ color: var(--body);
+}
+
+.source-panel,
+.qa-panel,
+.trace-panel,
+.answer-panel,
+.citations-panel {
+ padding: 16px;
+}
+
+.source-panel,
+.source-list,
+.qa-panel,
+.trace-panel,
+.citations-panel {
+ flex: 0 0 auto;
+}
+
+.source-list {
+ flex: 1 1 auto;
+}
+
+.source-list,
+.answer-panel {
+ min-height: 0;
+ overflow: auto;
+}
+
+.citations-panel {
+ overflow: visible;
+}
+
+.source-list {
+ padding: 8px;
+}
+
+.panel-heading {
+ justify-content: space-between;
+ margin-bottom: 14px;
+ gap: 12px;
+}
+
+.panel-heading h2,
+.stage-header h2 {
+ color: var(--ink);
+ font-size: 18px;
+ line-height: 1.4;
+ font-weight: 600;
+ letter-spacing: 0;
+}
+
+.tabs {
+ gap: 4px;
+ padding: 4px;
+ background: var(--canvas-soft);
+ border: 1px solid var(--hairline);
+ border-radius: 8px;
+ margin-bottom: 14px;
+}
+
+.tabs button {
+ flex: 1;
+ min-height: 38px;
+ border: 0;
+ background: transparent;
+ color: var(--body);
+ border-radius: 6px;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ gap: 7px;
+ font-size: 14px;
+ font-weight: 500;
+}
+
+.tabs button.active {
+ background: var(--surface-strong);
+ color: var(--ink);
+ border: 1px solid var(--hairline-strong);
+}
+
+.field-label {
+ display: block;
+ color: var(--muted);
+ font-size: 11px;
+ line-height: 1.4;
+ font-weight: 600;
+ letter-spacing: 0.88px;
+ text-transform: uppercase;
+ margin: 12px 0 6px;
+}
+
+input,
+textarea {
+ width: 100%;
+ color: var(--ink);
+ background: var(--canvas-soft);
+ border: 1px solid var(--hairline-strong);
+ border-radius: 8px;
+ outline: none;
+ caret-color: var(--primary);
+}
+
+input {
+ height: 44px;
+ padding: 0 14px;
+ font-size: 14px;
+}
+
+textarea {
+ min-height: 112px;
+ resize: vertical;
+ padding: 12px 14px;
+ font-size: 14px;
+ line-height: 1.5;
+}
+
+input:focus,
+textarea:focus {
+ border-color: var(--primary);
+}
+
+.primary-button,
+.icon-button {
+ border-radius: 8px;
+ justify-content: center;
+}
+
+.primary-button {
+ width: 100%;
+ min-height: 44px;
+ gap: 8px;
+ margin-top: 14px;
+ border: 1px solid var(--primary);
+ background: var(--primary);
+ color: var(--on-primary);
+ font-size: 14px;
+ line-height: 1;
+ font-weight: 500;
+}
+
+.primary-button:active {
+ background: var(--primary-active);
+ border-color: var(--primary-active);
+}
+
+.primary-button:disabled {
+ opacity: 0.62;
+ cursor: wait;
+}
+
+.icon-button {
+ width: 36px;
+ height: 36px;
+ border: 1px solid var(--hairline-strong);
+ background: var(--canvas-soft);
+ color: var(--ink);
+}
+
+.source-row {
+ display: grid;
+ grid-template-columns: 34px minmax(0, 1fr) 30px;
+ align-items: start;
+ gap: 10px;
+ padding: 12px 8px;
+ border-bottom: 1px solid var(--hairline-soft);
+}
+
+.source-row:last-child {
+ border-bottom: 0;
+}
+
+.modality-dot,
+.mini-dot {
+ display: grid;
+ place-items: center;
+ color: #15150f;
+ border: 1px solid rgba(247, 247, 244, 0.16);
+}
+
+.modality-dot {
+ width: 32px;
+ height: 32px;
+ border-radius: 8px;
+}
+
+.mini-dot {
+ width: 11px;
+ height: 11px;
+ border-radius: 50%;
+}
+
+.text {
+ background: var(--grep);
+}
+
+.url {
+ background: var(--read);
+}
+
+.pdf {
+ background: var(--done);
+ color: var(--on-primary);
+}
+
+.image {
+ background: var(--edit);
+}
+
+.audio {
+ background: var(--thinking);
+}
+
+.video {
+ background: var(--surface-strong);
+ color: var(--ink);
+}
+
+.query {
+ background: var(--primary);
+ color: var(--on-primary);
+}
+
+.source-title {
+ color: var(--ink);
+ font-size: 14px;
+ font-weight: 600;
+ line-height: 1.4;
+}
+
+.source-summary {
+ margin-top: 4px;
+ color: var(--body);
+ font-size: 13px;
+ line-height: 1.4;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+}
+
+.source-meta {
+ width: fit-content;
+ margin-top: 7px;
+ border: 1px solid var(--hairline);
+ border-radius: 9999px;
+ color: var(--muted);
+ background: var(--canvas-soft);
+ padding: 3px 8px;
+ font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
+ font-size: 10px;
+ line-height: 1.4;
+}
+
+.source-actions {
+ display: grid;
+ gap: 6px;
+}
+
+.delete-source {
+ width: 30px;
+ height: 30px;
+ border: 1px solid var(--hairline);
+ color: var(--body);
+ background: var(--canvas-soft);
+ border-radius: 6px;
+ display: grid;
+ place-items: center;
+}
+
+.delete-source:hover {
+ color: var(--error);
+ border-color: var(--error);
+}
+
+.delete-source:disabled {
+ opacity: 0.62;
+ cursor: wait;
+}
+
+.source-list-heading {
+ padding: 6px 8px 0;
+}
+
+.qa-panel {
+ border-color: rgba(245, 78, 0, 0.38);
+ flex: 0 0 auto;
+}
+
+.question-box {
+ min-height: 82px;
+}
+
+.file-preview {
+ margin-top: 10px;
+ display: grid;
+ grid-template-columns: 18px minmax(0, 1fr);
+ gap: 4px 8px;
+ align-items: center;
+ border: 1px solid var(--hairline);
+ border-radius: 8px;
+ background: var(--canvas-soft);
+ padding: 10px;
+}
+
+.file-preview svg {
+ color: var(--primary);
+ grid-row: span 2;
+}
+
+.file-preview span {
+ min-width: 0;
+ color: var(--ink);
+ font-size: 13px;
+ font-weight: 600;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.file-preview strong {
+ color: var(--muted);
+ font-size: 11px;
+ font-weight: 500;
+ overflow-wrap: anywhere;
+}
+
+.inline-status {
+ margin-top: 10px;
+ border: 1px solid var(--hairline);
+ border-radius: 8px;
+ padding: 10px;
+ color: var(--body);
+ background: var(--canvas-soft);
+ font-size: 13px;
+ line-height: 1.45;
+}
+
+.inline-status.success {
+ border-color: rgba(31, 138, 101, 0.48);
+}
+
+.inline-status.error {
+ border-color: rgba(255, 107, 146, 0.58);
+ color: #ffd3df;
+}
+
+.space-stage {
+ grid-area: stage;
+ position: relative;
+ min-width: 0;
+ min-height: 0;
+ height: 100%;
+ overflow: hidden;
+ border: 1px solid var(--hairline);
+ background:
+ radial-gradient(circle at 58% 36%, rgba(245, 78, 0, 0.18), transparent 22rem),
+ linear-gradient(180deg, rgba(20, 21, 15, 0.94), rgba(8, 9, 6, 0.98));
+ border-radius: 12px;
+}
+
+.space-stage::before {
+ content: "";
+ position: absolute;
+ inset: 10px;
+ border: 1px solid rgba(247, 247, 244, 0.08);
+ border-radius: 10px;
+ pointer-events: none;
+ z-index: 1;
+}
+
+.stage-header {
+ position: absolute;
+ z-index: 3;
+ inset: 0 0 auto 0;
+ min-height: 78px;
+ padding: 18px 18px 0;
+ display: flex;
+ justify-content: space-between;
+ gap: 16px;
+ pointer-events: none;
+}
+
+.stage-header h2 {
+ font-size: 26px;
+ line-height: 1.25;
+ font-weight: 400;
+ letter-spacing: -0.325px;
+}
+
+.stage-tools {
+ display: grid;
+ justify-items: end;
+ gap: 8px;
+}
+
+.modality-key {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: flex-end;
+ align-items: center;
+ gap: 8px;
+ max-width: 380px;
+ color: var(--muted);
+}
+
+.modality-key-item {
+ min-height: 18px;
+ display: inline-flex;
+ align-items: center;
+ gap: 5px;
+ font-size: 10px;
+ line-height: 1.4;
+ font-weight: 600;
+ letter-spacing: 0.58px;
+ text-transform: uppercase;
+}
+
+.modality-key-item::before {
+ content: "";
+ width: 7px;
+ height: 7px;
+ border-radius: 50%;
+ background: var(--body);
+}
+
+.key-text::before {
+ background: var(--grep);
+}
+
+.key-image::before {
+ background: var(--edit);
+}
+
+.key-audio::before {
+ background: var(--thinking);
+}
+
+.key-video::before {
+ background: var(--ink);
+}
+
+.key-pdf::before {
+ background: var(--done);
+}
+
+.key-query::before {
+ background: var(--primary);
+}
+
+.space-readout {
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ gap: 8px;
+ border: 1px solid rgba(247, 247, 244, 0.08);
+ border-radius: 9999px;
+ background: rgba(16, 17, 13, 0.72);
+ padding: 6px;
+}
+
+.space-readout span {
+ min-height: 24px;
+ display: inline-flex;
+ align-items: center;
+ border-radius: 9999px;
+ color: var(--body);
+ background: rgba(247, 247, 244, 0.04);
+ padding: 0 10px;
+ font-size: 11px;
+ line-height: 1.4;
+ font-weight: 600;
+ letter-spacing: 0.58px;
+ text-transform: uppercase;
+}
+
+.space-readout span:last-child {
+ color: var(--ink);
+ background: rgba(245, 78, 0, 0.14);
+ border: 1px solid rgba(245, 78, 0, 0.28);
+}
+
+.vector-canvas {
+ position: absolute;
+ inset: 0;
+}
+
+.hover-card {
+ position: absolute;
+ right: 24px;
+ top: 96px;
+ width: 286px;
+ border: 1px solid var(--hairline-strong);
+ background: rgba(20, 21, 15, 0.96);
+ border-radius: 12px;
+ padding: 14px;
+ z-index: 5;
+}
+
+.hover-card strong {
+ display: block;
+ color: var(--ink);
+ font-size: 14px;
+ font-weight: 600;
+ margin-top: 8px;
+}
+
+.hover-card span,
+.hover-card p {
+ color: var(--body);
+ font-size: 13px;
+ line-height: 1.45;
+}
+
+.hover-card span {
+ font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
+ font-size: 11px;
+}
+
+.hover-card p {
+ margin-top: 8px;
+}
+
+.trace-list {
+ display: grid;
+ gap: 8px;
+}
+
+.trace-row {
+ border: 1px solid var(--hairline);
+ background: var(--canvas-soft);
+ border-radius: 8px;
+ padding: 10px;
+}
+
+.trace-row:nth-child(1) span {
+ background: var(--thinking);
+}
+
+.trace-row:nth-child(2) span {
+ background: var(--read);
+}
+
+.trace-row:nth-child(3) span {
+ background: var(--done);
+ color: var(--on-primary);
+}
+
+.trace-row span {
+ display: inline-flex;
+ width: fit-content;
+ border-radius: 9999px;
+ color: #15150f;
+ font-size: 11px;
+ line-height: 1.4;
+ font-weight: 600;
+ letter-spacing: 0.88px;
+ text-transform: uppercase;
+ padding: 4px 10px;
+}
+
+.trace-row p,
+.answer-box p,
+.citation-row p,
+.empty-state {
+ color: var(--body);
+ font-size: 13px;
+ line-height: 1.5;
+}
+
+.trace-row p {
+ margin-top: 6px;
+}
+
+.answer-box {
+ margin-top: 14px;
+ display: grid;
+ grid-template-columns: 20px 1fr;
+ gap: 10px;
+ border: 1px solid var(--hairline);
+ background: linear-gradient(180deg, rgba(16, 17, 13, 0.98), rgba(13, 14, 10, 0.98));
+ border-radius: 12px;
+ padding: 16px;
+ max-height: 280px;
+ overflow: auto;
+}
+
+.prominent-answer {
+ min-height: 128px;
+}
+
+.answer-content {
+ display: grid;
+ gap: 12px;
+}
+
+.answer-section {
+ display: grid;
+ gap: 8px;
+}
+
+.answer-content h3 {
+ margin: 2px 0 0;
+ color: var(--ink);
+ font-size: 16px;
+ font-weight: 600;
+ line-height: 1.4;
+}
+
+.answer-content p,
+.answer-content li {
+ color: var(--body);
+ font-size: 15px;
+ line-height: 1.5;
+}
+
+.answer-content ul {
+ margin: 0;
+ padding-left: 17px;
+ display: grid;
+ gap: 7px;
+}
+
+.answer-box svg {
+ color: var(--primary);
+ margin-top: 2px;
+}
+
+.citation-list {
+ display: grid;
+ gap: 10px;
+}
+
+.citation-row {
+ width: 100%;
+ text-align: left;
+ border: 1px solid var(--hairline-strong);
+ background: linear-gradient(180deg, rgba(16, 17, 13, 0.98), rgba(12, 13, 10, 0.98));
+ border-radius: 8px;
+ padding: 13px;
+}
+
+.citation-row:hover {
+ border-color: rgba(245, 78, 0, 0.58);
+}
+
+.citation-top {
+ justify-content: space-between;
+ align-items: flex-start;
+ gap: 10px;
+}
+
+.citation-top span {
+ min-width: 0;
+ color: var(--ink);
+ display: inline-flex;
+ align-items: center;
+ gap: 6px;
+ font-size: 14px;
+ font-weight: 600;
+ line-height: 1.35;
+}
+
+.citation-top strong {
+ flex: 0 0 auto;
+ color: var(--ink);
+ background: rgba(245, 78, 0, 0.16);
+ border: 1px solid rgba(245, 78, 0, 0.38);
+ border-radius: 9999px;
+ padding: 3px 7px;
+ font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
+ font-size: 11px;
+}
+
+.citation-row p {
+ margin-top: 9px;
+ color: var(--body);
+ font-size: 13.5px;
+ line-height: 1.55;
+}
+
+.score-track {
+ height: 4px;
+ background: var(--surface-strong);
+ border-radius: 9999px;
+ overflow: hidden;
+ margin: 10px 0 0;
+}
+
+.score-track div {
+ height: 100%;
+ background: var(--primary);
+}
+
+.empty-state {
+ border: 1px dashed var(--hairline-strong);
+ border-radius: 8px;
+ padding: 18px;
+ text-align: center;
+ background: var(--canvas-soft);
+}
+
+.spin {
+ animation: spin 0.9s linear infinite;
+}
+
+@keyframes spin {
+ to {
+ transform: rotate(360deg);
+ }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .spin {
+ animation: none;
+ }
+}
+
+@media (max-width: 1239px) {
+ .workspace {
+ height: calc(100vh - 72px);
+ grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
+ grid-template-rows: minmax(430px, 1fr) minmax(0, 0.72fr);
+ grid-template-areas:
+ "stage right"
+ "left right";
+ padding: 18px 18px 40px;
+ }
+
+ .space-stage {
+ min-height: 430px;
+ }
+
+ .topbar {
+ min-height: 72px;
+ align-items: flex-start;
+ flex-direction: column;
+ gap: 12px;
+ padding: 14px;
+ }
+
+ .status-strip {
+ justify-content: flex-start;
+ }
+}
+
+@media (max-width: 980px) {
+ body {
+ overflow-y: auto;
+ }
+
+ .app-shell {
+ height: auto;
+ min-height: 100vh;
+ }
+
+ .workspace {
+ height: auto;
+ overflow: visible;
+ grid-template-columns: 1fr;
+ grid-template-areas:
+ "stage"
+ "right"
+ "left";
+ }
+
+ .left-rail,
+ .right-rail {
+ height: auto;
+ overflow: visible;
+ }
+
+ .space-stage {
+ height: 560px;
+ }
+}
+
+@media (max-width: 720px) {
+ .brand h1 {
+ font-size: 20px;
+ }
+
+ .status-strip span {
+ min-height: 34px;
+ }
+
+ .workspace {
+ padding: 12px 12px 32px;
+ }
+
+ .space-stage {
+ min-height: 520px;
+ }
+
+ .stage-header {
+ position: relative;
+ background: rgba(8, 9, 6, 0.84);
+ padding: 14px;
+ pointer-events: auto;
+ }
+
+ .stage-header,
+ .stage-tools,
+ .modality-key,
+ .space-readout {
+ flex-direction: column;
+ align-items: flex-start;
+ justify-items: start;
+ }
+
+ .vector-canvas {
+ inset: 86px 0 0;
+ }
+
+ .hover-card {
+ left: 16px;
+ right: 16px;
+ top: 112px;
+ width: auto;
+ }
+}
diff --git a/rag_tutorials/multimodal_agentic_rag/frontend/src/vite-env.d.ts b/rag_tutorials/multimodal_agentic_rag/frontend/src/vite-env.d.ts
new file mode 100644
index 00000000..11f02fe2
--- /dev/null
+++ b/rag_tutorials/multimodal_agentic_rag/frontend/src/vite-env.d.ts
@@ -0,0 +1 @@
+/// <reference types="vite/client" />
diff --git a/rag_tutorials/multimodal_agentic_rag/frontend/tsconfig.json b/rag_tutorials/multimodal_agentic_rag/frontend/tsconfig.json
new file mode 100644
index 00000000..3fc544d5
--- /dev/null
+++ b/rag_tutorials/multimodal_agentic_rag/frontend/tsconfig.json
@@ -0,0 +1,21 @@
+{
+ "compilerOptions": {
+ "target": "ES2022",
+ "useDefineForClassFields": true,
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
+ "allowJs": false,
+ "skipLibCheck": true,
+ "esModuleInterop": true,
+ "allowSyntheticDefaultImports": true,
+ "strict": true,
+ "forceConsistentCasingInFileNames": true,
+ "module": "ESNext",
+ "moduleResolution": "Node",
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "noEmit": true,
+ "jsx": "react-jsx"
+ },
+ "include": ["src"],
+ "references": []
+}
diff --git a/rag_tutorials/multimodal_agentic_rag/frontend/vite.config.ts b/rag_tutorials/multimodal_agentic_rag/frontend/vite.config.ts
new file mode 100644
index 00000000..09cc137d
--- /dev/null
+++ b/rag_tutorials/multimodal_agentic_rag/frontend/vite.config.ts
@@ -0,0 +1,9 @@
+import { defineConfig } from "vite";
+import react from "@vitejs/plugin-react";
+
+export default defineConfig({
+ plugins: [react()],
+ server: {
+ port: 5177,
+ },
+});