from pathlib import Path from typing import Optional from config import EPT_DIR def generate_viewer_html(pc_id: str, ept_dir: Optional[str], embed: bool = False) -> str: # Fallback : cherche ept.json si le manifest est absent if not ept_dir: out_dir = EPT_DIR / pc_id ept_json = out_dir / "ept.json" if ept_json.exists(): ept_dir = pc_id else: return "