From 0603108e5c5e4a88e9d7303ef015d21e96eb195f Mon Sep 17 00:00:00 2001 From: ryujin Date: Mon, 30 Nov 2026 22:31:34 -0500 Subject: [PATCH] Initial commit: RomM Companion desktop v0.1.0 --- .gitea/workflows/ci.yml | 30 + .gitignore | 15 + README.md | 49 + index.html | 12 + openapi.json | 1 + package-lock.json | 2778 ++++++++++++ package.json | 30 + src-tauri/Cargo.lock | 5800 ++++++++++++++++++++++++++ src-tauri/Cargo.toml | 37 + src-tauri/build.rs | 3 + src-tauri/capabilities/default.json | 11 + src-tauri/icons/128x128.png | Bin 0 -> 1696 bytes src-tauri/icons/128x128@2x.png | Bin 0 -> 3703 bytes src-tauri/icons/32x32.png | Bin 0 -> 507 bytes src-tauri/icons/icon.ico | Bin 0 -> 529 bytes src-tauri/icons/icon.png | Bin 0 -> 3703 bytes src-tauri/src/commands.rs | 1193 ++++++ src-tauri/src/config.rs | 197 + src-tauri/src/emulators.rs | 433 ++ src-tauri/src/lib.rs | 134 + src-tauri/src/main.rs | 6 + src-tauri/src/matcher.rs | 568 +++ src-tauri/src/nextui_sd.rs | 881 ++++ src-tauri/src/romm_api.rs | 835 ++++ src-tauri/src/sync_engine.rs | 503 +++ src-tauri/src/watcher.rs | 66 + src-tauri/tauri.conf.json | 38 + src/App.tsx | 234 ++ src/components/Dashboard.tsx | 247 ++ src/components/EmulatorsView.tsx | 487 +++ src/components/HandheldView.tsx | 574 +++ src/components/LibraryView.tsx | 680 +++ src/components/OnboardingConnect.tsx | 350 ++ src/components/SavesStatesView.tsx | 382 ++ src/components/SettingsView.tsx | 171 + src/index.css | 24 + src/lib/tauri.ts | 137 + src/lib/types.ts | 253 ++ src/main.tsx | 10 + tsconfig.json | 20 + vite.config.ts | 25 + 41 files changed, 17214 insertions(+) create mode 100644 .gitea/workflows/ci.yml create mode 100644 .gitignore create mode 100644 README.md create mode 100644 index.html create mode 100644 openapi.json create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 src-tauri/Cargo.lock create mode 100644 src-tauri/Cargo.toml create mode 100644 src-tauri/build.rs create mode 100644 src-tauri/capabilities/default.json create mode 100644 src-tauri/icons/128x128.png create mode 100644 src-tauri/icons/128x128@2x.png create mode 100644 src-tauri/icons/32x32.png create mode 100644 src-tauri/icons/icon.ico create mode 100644 src-tauri/icons/icon.png create mode 100644 src-tauri/src/commands.rs create mode 100644 src-tauri/src/config.rs create mode 100644 src-tauri/src/emulators.rs create mode 100644 src-tauri/src/lib.rs create mode 100644 src-tauri/src/main.rs create mode 100644 src-tauri/src/matcher.rs create mode 100644 src-tauri/src/nextui_sd.rs create mode 100644 src-tauri/src/romm_api.rs create mode 100644 src-tauri/src/sync_engine.rs create mode 100644 src-tauri/src/watcher.rs create mode 100644 src-tauri/tauri.conf.json create mode 100644 src/App.tsx create mode 100644 src/components/Dashboard.tsx create mode 100644 src/components/EmulatorsView.tsx create mode 100644 src/components/HandheldView.tsx create mode 100644 src/components/LibraryView.tsx create mode 100644 src/components/OnboardingConnect.tsx create mode 100644 src/components/SavesStatesView.tsx create mode 100644 src/components/SettingsView.tsx create mode 100644 src/index.css create mode 100644 src/lib/tauri.ts create mode 100644 src/lib/types.ts create mode 100644 src/main.tsx create mode 100644 tsconfig.json create mode 100644 vite.config.ts diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..4b72fe7 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + frontend: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + - run: npm ci + - run: npm run build + + rust-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Linux Tauri system dependencies + run: | + sudo apt-get update + sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libgtk-3-dev + - uses: dtolnay/rust-toolchain@stable + - run: cargo test --manifest-path src-tauri/Cargo.toml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2a31441 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +# Dependencies & build outputs +node_modules/ +dist/ +src-tauri/target/ +src-tauri/gen/ + +# Local private notes +references.md + +# OS & editor files +.DS_Store +Thumbs.db +*.log +.vscode/ +.idea/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..8224988 --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +# RomM Companion + +Cross-platform desktop companion app (macOS, Windows, Linux) built with **Tauri v2 (Rust + React/TypeScript)** for syncing save files, save states, and ROMs from standalone emulators with **RomM 5.1.0**. + +## Features + +- **RomM 5.1.0 Native Auth & Device Registration** + - Passwordless **Device Pairing** (`/api/auth/device/init` + `/api/auth/device/token`) + - **One-Time Pair Code** (`/api/client-tokens/exchange`) or raw API token + - **Username & Password** OAuth2 (`/api/token`) + - Automatic device registration (`/api/devices`) +- **Two-Way Save Sync & Backups** + - Uses RomM 5.1.0's `/api/sync/negotiate` protocol with stable save slots, SHA-256 content hashing, download confirmations (`/api/saves/{id}/downloaded`), and session completion (`/api/sync/sessions/{id}/complete`). + - Automatic timestamped local backups before any server save overwrites a local file or folder, with one-click restore in **Saves & States → Backups**. + - Interactive conflict resolution (**Keep Local** vs **Keep Server**) when both sides change independently. +- **Save States Sync** + - Syncs emulator save states via `/api/states`. +- **Cross-Platform Emulator Auto-Detection + Custom Rules** + - Built-in presets for **Dolphin** (GC/Wii), **PCSX2** (PS2), **RPCS3** (PS3), **Cemu** (Wii U), **DuckStation** (PS1), **PPSSPP** (PSP), **Ryujinx** (Switch), **Azahar / Citra** (3DS), **melonDS** (DS), **mGBA** (GB/GBC/GBA), **Flycast** (Dreamcast), **xemu** (Xbox), and **Xenia** (Xbox 360). + - Handles single-file saves, memory cards, and folder-per-game saves (deterministically zipped for RomM sync and safely extracted on download). + - Add custom emulator rules for any folder/extension layout. +- **ROM Library, Hash Matching & Downloads** + - Browse RomM platforms & ROMs and download directly to a local folder with live progress. + - Scan local ROM folders using streaming **CRC32 / MD5 / SHA1** lookup against `/api/roms/by-hash` with filename fallback. +- **Background File Watcher & System Tray** + - Debounced recursive file watcher triggers automatic sync when emulators write saves. + - System tray menu (*Open RomM Companion*, *Sync Saves Now*, *Quit*) with optional minimize-to-tray. + +## Running in Development + +Make sure Rust (`$HOME/.cargo/bin`) and Node.js are on your `PATH`: + +```bash +export PATH="$HOME/.cargo/bin:$PATH" +npm install +npm run tauri dev +``` + +## Building Native Installers (macOS / Windows / Linux) + +```bash +export PATH="$HOME/.cargo/bin:$PATH" +npm run tauri build +``` + +Tauri produces native installers in `src-tauri/target/release/bundle/`: +- **macOS**: `.dmg` / `.app` +- **Windows**: `.msi` / `.exe` (NSIS) +- **Linux**: `.AppImage` / `.deb` / `.rpm` diff --git a/index.html b/index.html new file mode 100644 index 0000000..185087f --- /dev/null +++ b/index.html @@ -0,0 +1,12 @@ + + + + + + RomM Companion + + +
+ + + diff --git a/openapi.json b/openapi.json new file mode 100644 index 0000000..ea22f5f --- /dev/null +++ b/openapi.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","info":{"title":"RomM API","version":"5.1.0"},"paths":{"/api/heartbeat":{"get":{"tags":["system"],"summary":"Heartbeat","description":"Endpoint to set the CSRF token in cache and return all the basic RomM config\n\nReturns:\n HeartbeatReturn: TypedDict structure with all the defined values in the HeartbeatReturn class.","operationId":"heartbeat_api_heartbeat_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatResponse"}}}}}}},"/api/heartbeat/metadata/{source}":{"get":{"tags":["system"],"summary":"Metadata Heartbeat","description":"Endpoint to return the heartbeat of the metadata sources","operationId":"metadata_heartbeat_api_heartbeat_metadata__source__get","parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string","title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"boolean","title":"Response Metadata Heartbeat Api Heartbeat Metadata Source Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/setup/library":{"get":{"tags":["system"],"summary":"Get Setup Library Info","description":"Get library structure information for setup wizard.\n\nOnly accessible during initial setup (no admin users) or with authentication.\n\nReturns:\n - detected_structure: \"struct_a\" (roms/{platform}), \"struct_b\" ({platform}/roms), or None\n - existing_platforms: list of objects with fs_slug and rom_count\n - supported_platforms: list of all supported platforms with metadata","operationId":"get_setup_library_info_api_setup_library_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBasic":[]}]}},"/api/setup/platforms":{"post":{"tags":["system"],"summary":"Create Setup Platforms","description":"Create platform folders during setup wizard.\n\nOnly accessible during initial setup (no admin users) or with authentication.\n\nArgs:\n platform_slugs: List of platform fs_slugs to create\n\nReturns:\n - success: bool\n - created_count: number of platforms created\n - message: success or error message","operationId":"create_setup_platforms_api_setup_platforms_post","requestBody":{"content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Platform Slugs"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBasic":[]}]}},"/api/login":{"post":{"tags":["auth"],"summary":"Login","description":"Session login endpoint\n\nArgs:\n request (Request): Fastapi Request object\n credentials: Defaults to Depends(HTTPBasic()).\n\nRaises:\n CredentialsException: Invalid credentials\n UserDisabledException: Auth is disabled","operationId":"login_api_login_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBasic":[]}]}},"/api/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Session logout endpoint\n\nArgs:\n request (Request): Fastapi Request object\n\nReturns:\n Optional[dict]: When OIDC RP-Initiated Logout is enabled and the session\n contains an OIDC id_token, returns a dict with the OIDC end-session URL\n so the client can redirect the browser to log out of the OIDC provider.","operationId":"logout_api_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OIDCLogoutResponse"},{"type":"null"}],"title":"Response Logout Api Logout Post"}}}}}}},"/api/token":{"post":{"tags":["auth"],"summary":"Token","description":"OAuth2 token endpoint\n\nArgs:\n form_data (Annotated[OAuth2RequestForm, Depends): Form Data with OAuth2 info\n\nRaises:\n HTTPException: Missing refresh token\n HTTPException: Invalid refresh token\n HTTPException: Missing username or password\n HTTPException: Invalid username or password\n HTTPException: Client credentials are not yet supported\n HTTPException: Invalid or unsupported grant type\n HTTPException: Insufficient scope\n\nReturns:\n TokenResponse: TypedDict with the new generated token info","operationId":"token_api_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_token_api_token_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/login/openid":{"get":{"tags":["auth"],"summary":"Login Via Openid","description":"OIDC login endpoint\n\nArgs:\n request (Request): Fastapi Request object\n\nRaises:\n OIDCDisabledException: OAuth is disabled\n OIDCNotConfiguredException: OAuth not configured\n\nReturns:\n RedirectResponse: Redirect to OIDC provider","operationId":"login_via_openid_api_login_openid_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/oauth/openid":{"get":{"tags":["auth"],"summary":"Auth Openid","description":"OIDC callback endpoint\n\nArgs:\n request (Request): Fastapi Request object\n\nRaises:\n OIDCDisabledException: OAuth is disabled\n OIDCNotConfiguredException: OAuth not configured\n AuthCredentialsException: Invalid credentials\n UserDisabledException: Auth is disabled\n\nReturns:\n RedirectResponse: Redirect to home page","operationId":"auth_openid_api_oauth_openid_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/forgot-password":{"post":{"tags":["auth"],"summary":"Request Password Reset","description":"Request a password reset link for the user.\n\nArgs:\n username (str): Username of the user requesting the reset\nReturns:\n None: Returns 200 OK status","operationId":"request_password_reset_api_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_request_password_reset_api_forgot_password_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Reset password using the token.\n\nArgs:\n token (str): Reset token from the URL\n new_password (str): New user password\n\nReturns:\n None: Returns 200 OK status","operationId":"reset_password_api_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_reset_password_api_reset_password_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/activity":{"get":{"tags":["activity"],"summary":"Get All Activity","description":"Return every currently active play session across all users.","operationId":"get_all_activity_api_activity_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ActivityEntrySchema"},"type":"array","title":"Response Get All Activity Api Activity Get"}}}}},"security":[{"OAuth2PasswordBearer":["roms.user.read"]},{"HTTPBasic":[]}]}},"/api/activity/rom/{rom_id}":{"get":{"tags":["activity"],"summary":"Get Rom Activity","description":"Return all active play sessions for a specific ROM.","operationId":"get_rom_activity_api_activity_rom__rom_id__get","security":[{"OAuth2PasswordBearer":["roms.user.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"rom_id","in":"path","required":true,"schema":{"type":"integer","title":"Rom Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActivityEntrySchema"},"title":"Response Get Rom Activity Api Activity Rom Rom Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/activity/heartbeat":{"post":{"tags":["activity"],"summary":"Device Heartbeat","description":"Heartbeat endpoint for external devices (muOS, Android, etc.).\n\nCalled periodically by devices while the user is playing a game. Writes\nactivity state to Redis and broadcasts an ``activity:update`` event over\nthe main Socket.IO namespace.","operationId":"device_heartbeat_api_activity_heartbeat_post","security":[{"OAuth2PasswordBearer":["roms.user.write"]},{"HTTPBasic":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceHeartbeatPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityEntrySchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["activity"],"summary":"Clear Device Activity","description":"Immediately clear an active session for a device (e.g. on graceful exit).","operationId":"clear_device_activity_api_activity_heartbeat_delete","security":[{"OAuth2PasswordBearer":["roms.user.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"device_id","in":"query","required":true,"schema":{"type":"string","title":"Device Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users":{"get":{"tags":["users"],"summary":"Get Users","description":"Get all users endpoint\n\nArgs:\n request (Request): Fastapi Request object\n\nReturns:\n list[UserSchema]: All users stored in the RomM's database","operationId":"get_users_api_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserSchema"},"type":"array","title":"Response Get Users Api Users Get"}}}}},"security":[{"OAuth2PasswordBearer":["users.read"]},{"HTTPBasic":[]}]},"post":{"tags":["users"],"summary":"Add User","description":"Create user endpoint\n\nArgs:\n request (Request): Fastapi Requests object\n username (str): User username\n password (str): User password\n email (str): User email\n role (str): RomM Role object represented as string\n\nReturns:\n UserSchema: Newly created user","operationId":"add_user_api_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_add_user_api_users_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBasic":[]}]}},"/api/users/invite-link":{"post":{"tags":["users"],"summary":"Create Invite Link","description":"Create an invite link for a user.\n\nArgs:\n request (Request): FastAPI Request object\n role (str): The role of the user\n expiration (int | None): Token expiration in seconds. Defaults to\n the INVITE_TOKEN_EXPIRY_SECONDS environment variable.\n\nReturns:\n InviteLinkSchema: Invite link","operationId":"create_invite_link_api_users_invite_link_post","security":[{"OAuth2PasswordBearer":[]},{"HTTPBasic":[]}],"parameters":[{"name":"role","in":"query","required":true,"schema":{"type":"string","title":"Role"}},{"name":"expiration","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expiration"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteLinkSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/register":{"post":{"tags":["users"],"summary":"Create User From Invite","description":"Create user endpoint with invite link\n\nArgs:\n username (str): User username\n email (str): User email\n password (str): User password\n token (str): Invite link token\n\nReturns:\n UserSchema: Newly created user","operationId":"create_user_from_invite_api_users_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_create_user_from_invite_api_users_register_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/identifiers":{"get":{"tags":["users"],"summary":"Get User Identifiers","description":"Get all user identifiers endpoint\n\nArgs:\n request (Request): Fastapi Request object\n\nReturns:\n list[int]: All user ids stored in the RomM's database","operationId":"get_user_identifiers_api_users_identifiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"integer"},"type":"array","title":"Response Get User Identifiers Api Users Identifiers Get"}}}}},"security":[{"OAuth2PasswordBearer":["users.read"]},{"HTTPBasic":[]}]}},"/api/users/me":{"get":{"tags":["users"],"summary":"Get Current User","description":"Get current user endpoint\n\nArgs:\n request (Request): Fastapi Request object\n\nReturns:\n UserSchema | None: Current user","operationId":"get_current_user_api_users_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UserSchema"},{"type":"null"}],"title":"Response Get Current User Api Users Me Get"}}}}},"security":[{"OAuth2PasswordBearer":["me.read"]},{"HTTPBasic":[]}]}},"/api/users/{id}":{"get":{"tags":["users"],"summary":"Get User","description":"Get user endpoint\n\nArgs:\n request (Request): Fastapi Request object\n\nReturns:\n UserSchem: User stored in the RomM's database","operationId":"get_user_api_users__id__get","security":[{"OAuth2PasswordBearer":["users.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["users"],"summary":"Update User","description":"Update user endpoint\n\nArgs:\n request (Request): Fastapi Requests object\n user_id (int): User internal id\n form_data (Annotated[UserUpdateForm, Depends): Form Data with user updated info\n\nRaises:\n HTTPException: User is not found in database\n HTTPException: Username already in use by another user\n\nReturns:\n UserSchema: Updated user info","operationId":"update_user_api_users__id__put","security":[{"OAuth2PasswordBearer":["me.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/UserForm"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["users"],"summary":"Delete User","description":"Delete a user by ID.\n\nRaises:\n HTTPException: User is not found in database\n HTTPException: User deleting itself\n HTTPException: User is the last admin user","operationId":"delete_user_api_users__id__delete","security":[{"OAuth2PasswordBearer":["users.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"User internal id.","title":"Id"},"description":"User internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request"},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/{id}/avatar":{"get":{"tags":["users"],"summary":"Get User Avatar","description":"Serve a user's avatar image. Avatars are public to any authenticated\nuser (rendered next to community content, activity, and user lists).","operationId":"get_user_avatar_api_users__id__avatar_get","security":[{"OAuth2PasswordBearer":["assets.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"User internal id.","title":"Id"},"description":"User internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/{id}/ra/refresh":{"post":{"tags":["users"],"summary":"Refresh RetroAchievements","description":"Refresh RetroAchievements progression data for a user.","operationId":"refresh_retro_achievements_api_users__id__ra_refresh_post","security":[{"OAuth2PasswordBearer":["me.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"User internal id.","title":"Id"},"description":"User internal id."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_refresh_retro_achievements_api_users__id__ra_refresh_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/client-tokens":{"get":{"tags":["client-tokens"],"summary":"List Tokens","operationId":"list_tokens_api_client_tokens_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ClientTokenSchema"},"type":"array","title":"Response List Tokens Api Client Tokens Get"}}}}},"security":[{"OAuth2PasswordBearer":["me.read"]},{"HTTPBasic":[]}]},"post":{"tags":["client-tokens"],"summary":"Create Token","operationId":"create_token_api_client_tokens_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTokenCreatePayload"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTokenCreateSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["me.write"]},{"HTTPBasic":[]}]}},"/api/client-tokens/{token_id}":{"delete":{"tags":["client-tokens"],"summary":"Delete Token","operationId":"delete_token_api_client_tokens__token_id__delete","security":[{"OAuth2PasswordBearer":["me.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"integer","title":"Token Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/client-tokens/{token_id}/regenerate":{"put":{"tags":["client-tokens"],"summary":"Regenerate Token","operationId":"regenerate_token_api_client_tokens__token_id__regenerate_put","security":[{"OAuth2PasswordBearer":["me.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"integer","title":"Token Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTokenCreateSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/client-tokens/{token_id}/pair":{"post":{"tags":["client-tokens"],"summary":"Pair Token","operationId":"pair_token_api_client_tokens__token_id__pair_post","security":[{"OAuth2PasswordBearer":["me.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"integer","title":"Token Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTokenPairSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/client-tokens/pair/{code}/status":{"get":{"tags":["client-tokens"],"summary":"Pair Status","operationId":"pair_status_api_client_tokens_pair__code__status_get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/client-tokens/exchange":{"post":{"tags":["client-tokens"],"summary":"Exchange Pair Code","operationId":"exchange_pair_code_api_client_tokens_exchange_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTokenExchangePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTokenCreateSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/client-tokens/all":{"get":{"tags":["client-tokens"],"summary":"List All Tokens","operationId":"list_all_tokens_api_client_tokens_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ClientTokenAdminSchema"},"type":"array","title":"Response List All Tokens Api Client Tokens All Get"}}}}},"security":[{"OAuth2PasswordBearer":["users.read"]},{"HTTPBasic":[]}]}},"/api/client-tokens/{token_id}/admin":{"delete":{"tags":["client-tokens"],"summary":"Admin Delete Token","operationId":"admin_delete_token_api_client_tokens__token_id__admin_delete","security":[{"OAuth2PasswordBearer":["users.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"integer","title":"Token Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devices":{"get":{"tags":["devices"],"summary":"Get Devices","operationId":"get_devices_api_devices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DeviceSchema"},"type":"array","title":"Response Get Devices Api Devices Get"}}}}},"security":[{"OAuth2PasswordBearer":["devices.read"]},{"HTTPBasic":[]}]},"post":{"tags":["devices"],"summary":"Register Device","operationId":"register_device_api_devices_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceCreatePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["devices.write"]},{"HTTPBasic":[]}]}},"/api/devices/{device_id}":{"get":{"tags":["devices"],"summary":"Get Device","operationId":"get_device_api_devices__device_id__get","security":[{"OAuth2PasswordBearer":["devices.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["devices"],"summary":"Update Device","operationId":"update_device_api_devices__device_id__put","security":[{"OAuth2PasswordBearer":["devices.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceUpdatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["devices"],"summary":"Delete Device","operationId":"delete_device_api_devices__device_id__delete","security":[{"OAuth2PasswordBearer":["devices.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/device/init":{"post":{"tags":["device-auth"],"summary":"Device Auth Init","description":"Device-initiated: start a new pairing flow. Open endpoint, rate-limited.","operationId":"device_auth_init_api_auth_device_init_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthInitPayload"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthInitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/device/pending/{user_code}":{"get":{"tags":["device-auth"],"summary":"Get Pending","description":"Fetch a pending request's metadata for the approval screen.","operationId":"get_pending_api_auth_device_pending__user_code__get","security":[{"OAuth2PasswordBearer":["me.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"user_code","in":"path","required":true,"schema":{"type":"string","title":"User Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthPendingSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/device/approve":{"post":{"tags":["device-auth"],"summary":"Approve","description":"Create the Device + bound ClientToken and mark the request approved.","operationId":"approve_api_auth_device_approve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthApprovePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthApproveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["me.write"]},{"HTTPBasic":[]}]}},"/api/auth/device/deny":{"post":{"tags":["device-auth"],"summary":"Deny","operationId":"deny_api_auth_device_deny_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthDenyPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["me.write"]},{"HTTPBasic":[]}]}},"/api/auth/device/token":{"post":{"tags":["device-auth"],"summary":"Token","description":"Device-facing polling endpoint. Open, rate-limited per-IP and per-code.","operationId":"token_api_auth_device_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthTokenPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/play-sessions":{"post":{"tags":["play-sessions"],"summary":"Ingest Play Sessions","operationId":"ingest_play_sessions_api_play_sessions_post","security":[{"OAuth2PasswordBearer":["roms.user.write"]},{"HTTPBasic":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaySessionIngestPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaySessionIngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["play-sessions"],"summary":"Get Play Sessions","operationId":"get_play_sessions_api_play_sessions_get","security":[{"OAuth2PasswordBearer":["roms.user.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"rom_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rom Id"}},{"name":"device_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"}},{"name":"start_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start After"}},{"name":"end_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Before"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlaySessionSchema"},"title":"Response Get Play Sessions Api Play Sessions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/play-sessions/{session_id}":{"delete":{"tags":["play-sessions"],"summary":"Delete Play Session","operationId":"delete_play_session_api_play_sessions__session_id__delete","security":[{"OAuth2PasswordBearer":["roms.user.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/platforms":{"post":{"tags":["platforms"],"summary":"Add Platform","description":"Create a platform.","operationId":"add_platform_api_platforms_post","security":[{"OAuth2PasswordBearer":["platforms.write"]},{"HTTPBasic":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_add_platform_api_platforms_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["platforms"],"summary":"Get Platforms","description":"Retrieve platforms.","operationId":"get_platforms_api_platforms_get","security":[{"OAuth2PasswordBearer":["platforms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"updated_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter platforms updated after this datetime (ISO 8601 format with timezone information).","title":"Updated After"},"description":"Filter platforms updated after this datetime (ISO 8601 format with timezone information)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlatformSchema"},"title":"Response Get Platforms Api Platforms Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/platforms/identifiers":{"get":{"tags":["platforms"],"summary":"Get Platform Identifiers","description":"Retrieve platform identifiers.","operationId":"get_platform_identifiers_api_platforms_identifiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"integer"},"type":"array","title":"Response Get Platform Identifiers Api Platforms Identifiers Get"}}}}},"security":[{"OAuth2PasswordBearer":["platforms.read"]},{"HTTPBasic":[]}]}},"/api/platforms/supported":{"get":{"tags":["platforms"],"summary":"Get Supported Platforms Endpoint","description":"Retrieve the list of supported platforms.","operationId":"get_supported_platforms_endpoint_api_platforms_supported_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlatformSchema"},"type":"array","title":"Response Get Supported Platforms Endpoint Api Platforms Supported Get"}}}}},"security":[{"OAuth2PasswordBearer":["platforms.read"]},{"HTTPBasic":[]}]}},"/api/platforms/filesystem":{"get":{"tags":["platforms"],"summary":"Get Filesystem Platforms Endpoint","description":"Retrieve platform folders on disk that have no database row yet.","operationId":"get_filesystem_platforms_endpoint_api_platforms_filesystem_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlatformSchema"},"type":"array","title":"Response Get Filesystem Platforms Endpoint Api Platforms Filesystem Get"}}}}},"security":[{"OAuth2PasswordBearer":["platforms.read"]},{"HTTPBasic":[]}]}},"/api/platforms/{id}":{"get":{"tags":["platforms"],"summary":"Get Platform","description":"Retrieve a platform by ID.","operationId":"get_platform_api_platforms__id__get","security":[{"OAuth2PasswordBearer":["platforms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Platform id.","title":"Id"},"description":"Platform id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSchema"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["platforms"],"summary":"Update Platform","description":"Update a platform.","operationId":"update_platform_api_platforms__id__put","security":[{"OAuth2PasswordBearer":["platforms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Platform id.","title":"Id"},"description":"Platform id."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_update_platform_api_platforms__id__put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSchema"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["platforms"],"summary":"Delete Platform","description":"Delete a platform by ID.","operationId":"delete_platform_api_platforms__id__delete","security":[{"OAuth2PasswordBearer":["platforms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Platform id.","title":"Id"},"description":"Platform id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/upload/start":{"post":{"tags":["roms","upload"],"summary":"Start Chunked Upload","description":"Initiate a chunked ROM upload session.","operationId":"start_chunked_upload_api_roms_upload_start_post","security":[{"OAuth2PasswordBearer":["roms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"x-upload-platform","in":"header","required":true,"schema":{"type":"integer","minimum":1,"title":"X-Upload-Platform"}},{"name":"x-upload-filename","in":"header","required":true,"schema":{"type":"string","title":"X-Upload-Filename"}},{"name":"x-upload-total-size","in":"header","required":true,"schema":{"type":"integer","minimum":1,"title":"X-Upload-Total-Size"}},{"name":"x-upload-total-chunks","in":"header","required":true,"schema":{"type":"integer","minimum":1,"title":"X-Upload-Total-Chunks"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Start Chunked Upload Api Roms Upload Start Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/upload/{upload_id}":{"put":{"tags":["roms","upload"],"summary":"Upload Chunk","description":"Upload a single chunk of a ROM file.","operationId":"upload_chunk_api_roms_upload__upload_id__put","security":[{"OAuth2PasswordBearer":["roms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload Id"}},{"name":"x-chunk-index","in":"header","required":true,"schema":{"type":"integer","minimum":0,"title":"X-Chunk-Index"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Chunk Api Roms Upload Upload Id Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/upload/{upload_id}/complete":{"post":{"tags":["roms","upload"],"summary":"Complete Chunked Upload","description":"Assemble all chunks into the final ROM file.","operationId":"complete_chunked_upload_api_roms_upload__upload_id__complete_post","security":[{"OAuth2PasswordBearer":["roms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/upload/{upload_id}/cancel":{"post":{"tags":["roms","upload"],"summary":"Cancel Chunked Upload","description":"Cancel a chunked upload session and clean up temp files.","operationId":"cancel_chunked_upload_api_roms_upload__upload_id__cancel_post","security":[{"OAuth2PasswordBearer":["roms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}/files":{"get":{"tags":["roms"],"summary":"Get Romfile","description":"Retrieve a rom file by ID.","operationId":"get_romfile_api_roms__id__files_get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom file internal id.","title":"Id"},"description":"Rom file internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RomFileSchema"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}/files/content/{file_name}":{"get":{"tags":["roms"],"summary":"Get Romfile Content","description":"Download a rom file.","operationId":"get_romfile_content_api_roms__id__files_content__file_name__get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom file internal id.","title":"Id"},"description":"Rom file internal id."},{"name":"file_name","in":"path","required":true,"schema":{"type":"string","description":"File name to download","title":"File Name"},"description":"File name to download"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{rom_id}/files/{file_id}":{"delete":{"tags":["roms"],"summary":"Delete Rom File","description":"Delete a single file from a ROM.","operationId":"delete_rom_file_api_roms__rom_id__files__file_id__delete","security":[{"OAuth2PasswordBearer":["roms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"rom_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Rom Id"},"description":"Rom internal id."},{"name":"file_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom file internal id.","title":"File Id"},"description":"Rom file internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}/manuals":{"post":{"tags":["roms"],"summary":"Add Rom Manuals","description":"Upload manuals for a rom.","operationId":"add_rom_manuals_api_roms__id__manuals_post","security":[{"OAuth2PasswordBearer":["roms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."},{"name":"x-upload-filename","in":"header","required":true,"schema":{"type":"string","description":"The name of the file being uploaded.","title":"X-Upload-Filename"},"description":"The name of the file being uploaded."}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["roms"],"summary":"Delete Rom Manuals","description":"Delete manuals for a rom.","operationId":"delete_rom_manuals_api_roms__id__manuals_delete","security":[{"OAuth2PasswordBearer":["roms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}/manuals/redownload":{"post":{"tags":["roms"],"summary":"Redownload Rom Manual","description":"Re-download a rom's manual from its scraped URL (e.g. screenscraper.fr).","operationId":"redownload_rom_manual_api_roms__id__manuals_redownload_post","security":[{"OAuth2PasswordBearer":["roms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"400":{"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}/manuals/files":{"post":{"tags":["roms"],"summary":"Add Rom Manual File","description":"Upload a manual PDF into the ROM's own manual/ subfolder.","operationId":"add_rom_manual_file_api_roms__id__manuals_files_post","security":[{"OAuth2PasswordBearer":["roms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."},{"name":"x-upload-filename","in":"header","required":true,"schema":{"type":"string","description":"The name of the file being uploaded.","title":"X-Upload-Filename"},"description":"The name of the file being uploaded."}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"400":{"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}/manuals/files/{file_id}":{"delete":{"tags":["roms"],"summary":"Delete Rom Manual File","description":"Delete a single manual file from a ROM's manual/ subfolder.","operationId":"delete_rom_manual_file_api_roms__id__manuals_files__file_id__delete","security":[{"OAuth2PasswordBearer":["roms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."},{"name":"file_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom file internal id.","title":"File Id"},"description":"Rom file internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}/soundtracks/metadata":{"get":{"tags":["roms"],"summary":"Get Rom Soundtrack Metadata","description":"Return compact audio metadata for every soundtrack file of a ROM.","operationId":"get_rom_soundtrack_metadata_api_roms__id__soundtracks_metadata_get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SoundtrackTrackMetaSchema"},"title":"Response Get Rom Soundtrack Metadata Api Roms Id Soundtracks Metadata Get"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}/soundtracks":{"post":{"tags":["roms"],"summary":"Add Rom Soundtracks","description":"Upload a soundtrack audio file for a multi-file ROM.","operationId":"add_rom_soundtracks_api_roms__id__soundtracks_post","security":[{"OAuth2PasswordBearer":["roms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."},{"name":"x-upload-filename","in":"header","required":true,"schema":{"type":"string","description":"The name of the file being uploaded.","title":"X-Upload-Filename"},"description":"The name of the file being uploaded."}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}/soundtracks/{file_id}":{"delete":{"tags":["roms"],"summary":"Delete Rom Soundtrack","description":"Delete a single soundtrack file from a ROM.","operationId":"delete_rom_soundtrack_api_roms__id__soundtracks__file_id__delete","security":[{"OAuth2PasswordBearer":["roms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."},{"name":"file_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom file internal id.","title":"File Id"},"description":"Rom file internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}/screenshots":{"post":{"tags":["roms"],"summary":"Add Rom Screenshots","description":"Upload a screenshot image for a multi-file ROM.","operationId":"add_rom_screenshots_api_roms__id__screenshots_post","security":[{"OAuth2PasswordBearer":["roms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."},{"name":"x-upload-filename","in":"header","required":true,"schema":{"type":"string","description":"The name of the file being uploaded.","title":"X-Upload-Filename"},"description":"The name of the file being uploaded."}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}/screenshots/{file_id}":{"delete":{"tags":["roms"],"summary":"Delete Rom Screenshot","description":"Delete a single screenshot file from a ROM.","operationId":"delete_rom_screenshot_api_roms__id__screenshots__file_id__delete","security":[{"OAuth2PasswordBearer":["roms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."},{"name":"file_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom file internal id.","title":"File Id"},"description":"Rom file internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}/notes":{"get":{"tags":["roms"],"summary":"Get Rom Notes","description":"Get all notes for a ROM.","operationId":"get_rom_notes_api_roms__id__notes_get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."},{"name":"public_only","in":"query","required":false,"schema":{"type":"boolean","description":"Only return public notes","default":false,"title":"Public Only"},"description":"Only return public notes"},{"name":"search","in":"query","required":false,"schema":{"type":"string","description":"Search notes by title or content","title":"Search"},"description":"Search notes by title or content"},{"name":"tags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Filter by tags","title":"Tags"},"description":"Filter by tags"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserNoteSchema"},"title":"Response Get Rom Notes Api Roms Id Notes Get"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["roms"],"summary":"Create Rom Note","description":"Create a new note for a ROM.","operationId":"create_rom_note_api_roms__id__notes_post","security":[{"OAuth2PasswordBearer":["roms.user.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Note Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNoteSchema"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}/notes/identifiers":{"get":{"tags":["roms"],"summary":"Get Rom Note Identifiers","description":"Get all note identifiers for a ROM.","operationId":"get_rom_note_identifiers_api_roms__id__notes_identifiers_get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"integer"},"title":"Response Get Rom Note Identifiers Api Roms Id Notes Identifiers Get"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}/notes/{note_id}":{"put":{"tags":["roms"],"summary":"Update Rom Note","description":"Update a ROM note.","operationId":"update_rom_note_api_roms__id__notes__note_id__put","security":[{"OAuth2PasswordBearer":["roms.user.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."},{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Note id.","title":"Note Id"},"description":"Note id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Note Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNoteSchema"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["roms"],"summary":"Delete Rom Note","description":"Delete a ROM note.","operationId":"delete_rom_note_api_roms__id__notes__note_id__delete","security":[{"OAuth2PasswordBearer":["roms.user.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."},{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Note id.","title":"Note Id"},"description":"Note id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Rom Note Api Roms Id Notes Note Id Delete"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}/patch":{"post":{"tags":["roms"],"summary":"Patch Rom","description":"Apply a patch to a ROM file server-side and return the patched file.\n\nThe base ROM file must exist in the library. The patch is supplied either\nas ``patch_file_id`` (a patch already in the library) or as an uploaded\n``patch_file`` (never stored in the library). Exactly one must be provided.\nThe patched ROM is streamed back as a download.","operationId":"patch_rom_api_roms__id__patch_post","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"ROM file ID (the base game file).","title":"Id"},"description":"ROM file ID (the base game file)."}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_patch_rom_api_roms__id__patch_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request"},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms":{"get":{"tags":["roms"],"summary":"Get Roms","description":"Retrieve roms.","operationId":"get_roms_api_roms_get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"with_char_index","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to get the char index.","default":true,"title":"With Char Index"},"description":"Whether to get the char index."},{"name":"with_filter_values","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to return filter values.","default":true,"title":"With Filter Values"},"description":"Whether to return filter values."},{"name":"with_rom_id_index","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to return the full ordered rom id index that backs virtual scroll.","default":true,"title":"With Rom Id Index"},"description":"Whether to return the full ordered rom id index that backs virtual scroll."},{"name":"search_term","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search term to filter roms.","title":"Search Term"},"description":"Search term to filter roms."},{"name":"platform_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"description":"Platform internal ids. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned.","title":"Platform Ids"},"description":"Platform internal ids. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned."},{"name":"collection_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Collection internal id.","title":"Collection Id"},"description":"Collection internal id."},{"name":"virtual_collection_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Virtual collection internal id.","title":"Virtual Collection Id"},"description":"Virtual collection internal id."},{"name":"smart_collection_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Smart collection internal id.","title":"Smart Collection Id"},"description":"Smart collection internal id."},{"name":"matched","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the rom matched at least one metadata source.","title":"Matched"},"description":"Whether the rom matched at least one metadata source."},{"name":"favorite","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the rom is marked as favorite.","title":"Favorite"},"description":"Whether the rom is marked as favorite."},{"name":"duplicate","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the rom is marked as duplicate.","title":"Duplicate"},"description":"Whether the rom is marked as duplicate."},{"name":"last_played","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the rom has a last played value for the current user.","title":"Last Played"},"description":"Whether the rom has a last played value for the current user."},{"name":"playable","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the rom is playable from the browser.","title":"Playable"},"description":"Whether the rom is playable from the browser."},{"name":"missing","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the rom is missing from the filesystem.","title":"Missing"},"description":"Whether the rom is missing from the filesystem."},{"name":"has_ra","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the rom has RetroAchievements data.","title":"Has Ra"},"description":"Whether the rom has RetroAchievements data."},{"name":"has_saves","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the rom has saves for the current user.","title":"Has Saves"},"description":"Whether the rom has saves for the current user."},{"name":"has_states","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the rom has save states for the current user.","title":"Has States"},"description":"Whether the rom has save states for the current user."},{"name":"verified","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the rom is verified by Hasheous.","title":"Verified"},"description":"Whether the rom is verified by Hasheous."},{"name":"has_soundtrack","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the rom has any soundtrack files.","title":"Has Soundtrack"},"description":"Whether the rom has any soundtrack files."},{"name":"group_by_meta_id","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to group roms by metadata ID (IGDB / Moby / ScreenScraper / RetroAchievements / LaunchBox).","default":false,"title":"Group By Meta Id"},"description":"Whether to group roms by metadata ID (IGDB / Moby / ScreenScraper / RetroAchievements / LaunchBox)."},{"name":"genres","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Associated genre. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned.","title":"Genres"},"description":"Associated genre. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned."},{"name":"franchises","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Associated franchise. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned.","title":"Franchises"},"description":"Associated franchise. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned."},{"name":"collections","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Associated collection. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned.","title":"Collections"},"description":"Associated collection. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned."},{"name":"companies","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Associated company. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned.","title":"Companies"},"description":"Associated company. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned."},{"name":"age_ratings","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Associated age rating. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned.","title":"Age Ratings"},"description":"Associated age rating. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned."},{"name":"statuses","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Game status, set by the current user. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned.","title":"Statuses"},"description":"Game status, set by the current user. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned."},{"name":"regions","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Associated region tag. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned.","title":"Regions"},"description":"Associated region tag. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned."},{"name":"languages","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Associated language tag. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned.","title":"Languages"},"description":"Associated language tag. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned."},{"name":"player_counts","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Associated player count. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned.","title":"Player Counts"},"description":"Associated player count. Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned."},{"name":"metadata_providers","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Matched metadata provider (igdb, moby, ss, ra, launchbox, hasheous, flashpoint, hltb, gamelist, libretro). Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned.","title":"Metadata Providers"},"description":"Matched metadata provider (igdb, moby, ss, ra, launchbox, hasheous, flashpoint, hltb, gamelist, libretro). Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned."},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Associated custom tag (parsed from the filename, e.g. Proto, Beta, Demo). Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned.","title":"Tags"},"description":"Associated custom tag (parsed from the filename, e.g. Proto, Beta, Demo). Multiple values are allowed by repeating the parameter, and results that match any of the values will be returned."},{"name":"genres_logic","in":"query","required":false,"schema":{"type":"string","description":"Logic operator for genres filter: 'any' (OR), 'all' (AND) or 'none' (NOT).","default":"any","title":"Genres Logic"},"description":"Logic operator for genres filter: 'any' (OR), 'all' (AND) or 'none' (NOT)."},{"name":"franchises_logic","in":"query","required":false,"schema":{"type":"string","description":"Logic operator for franchises filter: 'any' (OR), 'all' (AND) or 'none' (NOT).","default":"any","title":"Franchises Logic"},"description":"Logic operator for franchises filter: 'any' (OR), 'all' (AND) or 'none' (NOT)."},{"name":"collections_logic","in":"query","required":false,"schema":{"type":"string","description":"Logic operator for collections filter: 'any' (OR), 'all' (AND) or 'none' (NOT).","default":"any","title":"Collections Logic"},"description":"Logic operator for collections filter: 'any' (OR), 'all' (AND) or 'none' (NOT)."},{"name":"companies_logic","in":"query","required":false,"schema":{"type":"string","description":"Logic operator for companies filter: 'any' (OR), 'all' (AND) or 'none' (NOT).","default":"any","title":"Companies Logic"},"description":"Logic operator for companies filter: 'any' (OR), 'all' (AND) or 'none' (NOT)."},{"name":"age_ratings_logic","in":"query","required":false,"schema":{"type":"string","description":"Logic operator for age ratings filter: 'any' (OR), 'all' (AND) or 'none' (NOT).","default":"any","title":"Age Ratings Logic"},"description":"Logic operator for age ratings filter: 'any' (OR), 'all' (AND) or 'none' (NOT)."},{"name":"regions_logic","in":"query","required":false,"schema":{"type":"string","description":"Logic operator for regions filter: 'any' (OR), 'all' (AND) or 'none' (NOT).","default":"any","title":"Regions Logic"},"description":"Logic operator for regions filter: 'any' (OR), 'all' (AND) or 'none' (NOT)."},{"name":"languages_logic","in":"query","required":false,"schema":{"type":"string","description":"Logic operator for languages filter: 'any' (OR), 'all' (AND) or 'none' (NOT).","default":"any","title":"Languages Logic"},"description":"Logic operator for languages filter: 'any' (OR), 'all' (AND) or 'none' (NOT)."},{"name":"statuses_logic","in":"query","required":false,"schema":{"type":"string","description":"Logic operator for statuses filter: 'any' (OR), 'all' (AND) or 'none' (NOT).","default":"any","title":"Statuses Logic"},"description":"Logic operator for statuses filter: 'any' (OR), 'all' (AND) or 'none' (NOT)."},{"name":"player_counts_logic","in":"query","required":false,"schema":{"type":"string","description":"Logic operator for player counts filter: 'any' (OR), 'all' (AND) or 'none' (NOT).","default":"any","title":"Player Counts Logic"},"description":"Logic operator for player counts filter: 'any' (OR), 'all' (AND) or 'none' (NOT)."},{"name":"metadata_providers_logic","in":"query","required":false,"schema":{"type":"string","description":"Logic operator for metadata providers filter: 'any' (OR), 'all' (AND) or 'none' (NOT).","default":"any","title":"Metadata Providers Logic"},"description":"Logic operator for metadata providers filter: 'any' (OR), 'all' (AND) or 'none' (NOT)."},{"name":"tags_logic","in":"query","required":false,"schema":{"type":"string","description":"Logic operator for tags filter: 'any' (OR), 'all' (AND) or 'none' (NOT).","default":"any","title":"Tags Logic"},"description":"Logic operator for tags filter: 'any' (OR), 'all' (AND) or 'none' (NOT)."},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","description":"Field to order results by. Leave empty to order by search relevance when a search term is given on MySQL/MariaDB; other databases fall back to name.","default":"","title":"Order By"},"description":"Field to order results by. Leave empty to order by search relevance when a search term is given on MySQL/MariaDB; other databases fall back to name."},{"name":"order_dir","in":"query","required":false,"schema":{"type":"string","description":"Order direction, either 'asc' or 'desc'.","default":"asc","title":"Order Dir"},"description":"Order direction, either 'asc' or 'desc'."},{"name":"updated_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter roms updated after this datetime (ISO 8601 format with timezone information).","title":"Updated After"},"description":"Filter roms updated after this datetime (ISO 8601 format with timezone information)."},{"name":"with_files","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to include each rom's file entries.","default":false,"title":"With Files"},"description":"Whether to include each rom's file entries."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"description":"Page size limit","default":50,"title":"Limit"},"description":"Page size limit"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Page offset","default":0,"title":"Offset"},"description":"Page offset"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomLimitOffsetPage_SimpleRomSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/identifiers":{"get":{"tags":["roms"],"summary":"Get Rom Identifiers","description":"Retrieve rom identifiers.","operationId":"get_rom_identifiers_api_roms_identifiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"integer"},"type":"array","title":"Response Get Rom Identifiers Api Roms Identifiers Get"}}}}},"security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}]}},"/api/roms/download":{"get":{"tags":["roms"],"summary":"Download Roms","description":"Download a list of roms as a zip file.","operationId":"download_roms_api_roms_download_get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"rom_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of ROM IDs to download as a zip file.","title":"Rom Ids"},"description":"Comma-separated list of ROM IDs to download as a zip file."},{"name":"platform_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Download every ROM in this platform as a zip file.","title":"Platform Id"},"description":"Download every ROM in this platform as a zip file."},{"name":"collection_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Download every ROM in this collection as a zip file.","title":"Collection Id"},"description":"Download every ROM in this collection as a zip file."},{"name":"virtual_collection_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Download every ROM in this virtual collection as a zip file.","title":"Virtual Collection Id"},"description":"Download every ROM in this virtual collection as a zip file."},{"name":"smart_collection_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Download every ROM in this smart collection as a zip file.","title":"Smart Collection Id"},"description":"Download every ROM in this smart collection as a zip file."},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name for the zip file (optional).","title":"Filename"},"description":"Name for the zip file (optional)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/by-metadata-provider":{"get":{"tags":["roms"],"summary":"Get Rom By Metadata Provider","description":"Retrieve a rom by metadata ID.","operationId":"get_rom_by_metadata_provider_api_roms_by_metadata_provider_get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"igdb_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"IGDB ID to search by","title":"Igdb Id"},"description":"IGDB ID to search by"},{"name":"moby_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"MobyGames ID to search by","title":"Moby Id"},"description":"MobyGames ID to search by"},{"name":"ss_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"ScreenScraper ID to search by","title":"Ss Id"},"description":"ScreenScraper ID to search by"},{"name":"ra_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"RetroAchievements ID to search by","title":"Ra Id"},"description":"RetroAchievements ID to search by"},{"name":"launchbox_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"LaunchBox ID to search by","title":"Launchbox Id"},"description":"LaunchBox ID to search by"},{"name":"hasheous_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Hasheous ID to search by","title":"Hasheous Id"},"description":"Hasheous ID to search by"},{"name":"tgdb_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"TGDB ID to search by","title":"Tgdb Id"},"description":"TGDB ID to search by"},{"name":"flashpoint_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Flashpoint ID to search by","title":"Flashpoint Id"},"description":"Flashpoint ID to search by"},{"name":"hltb_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"HLTB ID to search by","title":"Hltb Id"},"description":"HLTB ID to search by"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedRomSchema"}}}},"404":{"description":"Not Found"},"400":{"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/by-hash":{"get":{"tags":["roms"],"summary":"Get Rom By Hash","operationId":"get_rom_by_hash_api_roms_by_hash_get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"crc_hash","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"CRC hash value","title":"Crc Hash"},"description":"CRC hash value"},{"name":"md5_hash","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"MD5 hash value","title":"Md5 Hash"},"description":"MD5 hash value"},{"name":"sha1_hash","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"SHA1 hash value","title":"Sha1 Hash"},"description":"SHA1 hash value"},{"name":"ra_hash","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RetroAchievements hash value","title":"Ra Hash"},"description":"RetroAchievements hash value"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedRomSchema"}}}},"404":{"description":"Not Found"},"400":{"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/filters":{"get":{"tags":["roms"],"summary":"Get Rom Filters","operationId":"get_rom_filters_api_roms_filters_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RomFiltersDict"}}}}},"security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}]}},"/api/roms/{id}/simple":{"get":{"tags":["roms"],"summary":"Get Rom Simple","description":"Retrieve a rom by ID with the lightweight schema — no eager-loaded\n`user_saves` / `user_states` / `user_screenshots` / `user_collections` /\n`all_user_notes` arrays. Designed for the v2 gallery card which only\nneeds the indicator flags (`has_notes`, `ra_id`, status, etc.) already\npresent on `SimpleRomSchema`. The full `DetailedRomSchema` is only\nfetched on user-driven detail interactions (game details page, quick-\nnote dialog open, achievements panel).","operationId":"get_rom_simple_api_roms__id__simple_get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleRomSchema"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}":{"get":{"tags":["roms"],"summary":"Get Rom","description":"Retrieve a rom by ID.","operationId":"get_rom_api_roms__id__get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedRomSchema"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["roms"],"summary":"Update Rom","description":"Update a rom.","operationId":"update_rom_api_roms__id__put","security":[{"OAuth2PasswordBearer":["roms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."},{"name":"remove_cover","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to remove the cover image for this rom.","default":false,"title":"Remove Cover"},"description":"Whether to remove the cover image for this rom."},{"name":"unmatch_metadata","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to remove the metadata matches for this game.","default":false,"title":"Unmatch Metadata"},"description":"Whether to remove the metadata matches for this game."}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_rom_api_roms__id__put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedRomSchema"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}/content/{file_name}":{"head":{"tags":["roms"],"summary":"Head Rom Content","description":"Retrieve head information for a rom file download.","operationId":"head_rom_content_api_roms__id__content__file_name__head","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."},{"name":"file_name","in":"path","required":true,"schema":{"type":"string","description":"File name to download","title":"File Name"},"description":"File name to download"},{"name":"file_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of file ids to download for multi-part roms.","title":"File Ids"},"description":"Comma-separated list of file ids to download for multi-part roms."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["roms"],"summary":"Get Rom Content","description":"Download a rom.\n\nThis endpoint serves the content of the requested rom, as:\n- A single file for single file roms.\n- A zipped file for multi-part roms, including a .m3u file if applicable.","operationId":"get_rom_content_api_roms__id__content__file_name__get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."},{"name":"file_name","in":"path","required":true,"schema":{"type":"string","description":"Zip file output name","title":"File Name"},"description":"Zip file output name"},{"name":"file_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of file ids to download for multi-part roms.","title":"File Ids"},"description":"Comma-separated list of file ids to download for multi-part roms."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/{id}/convert-to-folder":{"post":{"tags":["roms"],"summary":"Convert Rom To Folder","description":"Promote a single-file ROM to a folder ROM in place.\n\nKeeps the same id and all relations; no rescan. A no-op (clean success) if\nthe ROM is already folder-based. Returns 409 on a folder-name collision.","operationId":"convert_rom_to_folder_api_roms__id__convert_to_folder_post","security":[{"OAuth2PasswordBearer":["roms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedRomSchema"}}}},"404":{"description":"Not Found"},"409":{"description":"Conflict"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roms/delete":{"post":{"tags":["roms"],"summary":"Delete Roms","description":"Delete roms.","operationId":"delete_roms_api_roms_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_delete_roms_api_roms_delete_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationResponse"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["roms.write"]},{"HTTPBasic":[]}]}},"/api/roms/{id}/props":{"put":{"tags":["roms"],"summary":"Update Rom User","description":"Update rom data associated to the current user.","operationId":"update_rom_user_api_roms__id__props_put","security":[{"OAuth2PasswordBearer":["roms.user.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Rom internal id.","title":"Id"},"description":"Rom internal id."},{"name":"update_last_played","in":"query","required":false,"schema":{"type":"boolean","description":"Set last played timestamp to now.","default":false,"title":"Update Last Played"},"description":"Set last played timestamp to now."},{"name":"remove_last_played","in":"query","required":false,"schema":{"type":"boolean","description":"Clear the last played timestamp.","default":false,"title":"Remove Last Played"},"description":"Clear the last played timestamp."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RomUserData"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RomUserSchema"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/music/tracks":{"get":{"tags":["music"],"summary":"Get Music Tracks","description":"Flat, filterable, paginated list of soundtrack tracks.","operationId":"get_music_tracks_api_music_tracks_get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Substring match on title/artist/album.","title":"Search"},"description":"Substring match on title/artist/album."},{"name":"artist","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact artist.","title":"Artist"},"description":"Exact artist."},{"name":"album","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact album.","title":"Album"},"description":"Exact album."},{"name":"genre","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact genre.","title":"Genre"},"description":"Exact genre."},{"name":"platform_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"description":"Restrict to these platform ids.","title":"Platform Ids"},"description":"Restrict to these platform ids."},{"name":"rom_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Restrict to one rom's tracks.","title":"Rom Id"},"description":"Restrict to one rom's tracks."},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Exact release year.","title":"Year"},"description":"Exact release year."},{"name":"min_duration","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Minimum duration in seconds.","title":"Min Duration"},"description":"Minimum duration in seconds."},{"name":"max_duration","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum duration in seconds.","title":"Max Duration"},"description":"Maximum duration in seconds."},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","description":"title/artist/album/duration/year/platform/added.","default":"title","title":"Order By"},"description":"title/artist/album/duration/year/platform/added."},{"name":"order_dir","in":"query","required":false,"schema":{"type":"string","description":"asc or desc.","default":"asc","title":"Order Dir"},"description":"asc or desc."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"description":"Page size limit","default":50,"title":"Limit"},"description":"Page size limit"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Page offset","default":0,"title":"Offset"},"description":"Page offset"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MusicPage_MusicTrackSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/music/favorites":{"get":{"tags":["music"],"summary":"Get Music Favorites","description":"The requesting user's favorite tracks; same shape and filters as /tracks.","operationId":"get_music_favorites_api_music_favorites_get","security":[{"OAuth2PasswordBearer":["playlists.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Substring match on title/artist/album.","title":"Search"},"description":"Substring match on title/artist/album."},{"name":"artist","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact artist.","title":"Artist"},"description":"Exact artist."},{"name":"album","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact album.","title":"Album"},"description":"Exact album."},{"name":"genre","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact genre.","title":"Genre"},"description":"Exact genre."},{"name":"platform_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"description":"Restrict to these platform ids.","title":"Platform Ids"},"description":"Restrict to these platform ids."},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Exact release year.","title":"Year"},"description":"Exact release year."},{"name":"min_duration","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Minimum duration in seconds.","title":"Min Duration"},"description":"Minimum duration in seconds."},{"name":"max_duration","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum duration in seconds.","title":"Max Duration"},"description":"Maximum duration in seconds."},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","description":"title/artist/album/duration/year/platform/added.","default":"title","title":"Order By"},"description":"title/artist/album/duration/year/platform/added."},{"name":"order_dir","in":"query","required":false,"schema":{"type":"string","description":"asc or desc.","default":"asc","title":"Order Dir"},"description":"asc or desc."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"description":"Page size limit","default":50,"title":"Limit"},"description":"Page size limit"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Page offset","default":0,"title":"Offset"},"description":"Page offset"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MusicPage_MusicTrackSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["music"],"summary":"Add Music Favorites","description":"Mark tracks as favorites; already-favorited tracks are ignored.","operationId":"add_music_favorites_api_music_favorites_post","security":[{"OAuth2PasswordBearer":["playlists.write"]},{"HTTPBasic":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MusicTrackIdsPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Music Favorites Api Music Favorites Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["music"],"summary":"Remove Music Favorites","description":"Unmark tracks as favorites.","operationId":"remove_music_favorites_api_music_favorites_delete","security":[{"OAuth2PasswordBearer":["playlists.write"]},{"HTTPBasic":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MusicTrackIdsPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Music Favorites Api Music Favorites Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/music/artists":{"get":{"tags":["music"],"summary":"Get Music Artists","description":"Distinct artists (with counts); both a browse list and a typeahead.","operationId":"get_music_artists_api_music_artists_get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Typeahead on artist.","title":"Search"},"description":"Typeahead on artist."},{"name":"album","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Album"}},{"name":"genre","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Genre"}},{"name":"platform_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Platform Ids"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"min_duration","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Duration"}},{"name":"max_duration","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Duration"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","description":"count or value.","default":"count","title":"Order By"},"description":"count or value."},{"name":"order_dir","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Order Dir"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"description":"Page size limit","default":50,"title":"Limit"},"description":"Page size limit"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Page offset","default":0,"title":"Offset"},"description":"Page offset"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MusicPage_FacetValueSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/music/albums":{"get":{"tags":["music"],"summary":"Get Music Albums","description":"Distinct albums (with counts); both a browse list and a typeahead.","operationId":"get_music_albums_api_music_albums_get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Typeahead on album.","title":"Search"},"description":"Typeahead on album."},{"name":"artist","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artist"}},{"name":"genre","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Genre"}},{"name":"platform_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Platform Ids"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"min_duration","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Duration"}},{"name":"max_duration","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Duration"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","description":"count or value.","default":"count","title":"Order By"},"description":"count or value."},{"name":"order_dir","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Order Dir"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"description":"Page size limit","default":50,"title":"Limit"},"description":"Page size limit"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Page offset","default":0,"title":"Offset"},"description":"Page offset"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MusicPage_FacetValueSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/music/genres":{"get":{"tags":["music"],"summary":"Get Music Genres","description":"Distinct genres (with counts); both a browse list and a typeahead.","operationId":"get_music_genres_api_music_genres_get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Typeahead on genre.","title":"Search"},"description":"Typeahead on genre."},{"name":"artist","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artist"}},{"name":"album","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Album"}},{"name":"platform_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Platform Ids"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"min_duration","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Duration"}},{"name":"max_duration","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Duration"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","description":"count or value.","default":"count","title":"Order By"},"description":"count or value."},{"name":"order_dir","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Order Dir"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"description":"Page size limit","default":50,"title":"Limit"},"description":"Page size limit"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Page offset","default":0,"title":"Offset"},"description":"Page offset"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MusicPage_FacetValueSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/music/years":{"get":{"tags":["music"],"summary":"Get Music Years","description":"Distinct years (with counts); both a browse list and a typeahead.","operationId":"get_music_years_api_music_years_get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Typeahead on year.","title":"Search"},"description":"Typeahead on year."},{"name":"artist","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artist"}},{"name":"album","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Album"}},{"name":"genre","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Genre"}},{"name":"platform_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Platform Ids"}},{"name":"min_duration","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Duration"}},{"name":"max_duration","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Duration"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","description":"count or value.","default":"count","title":"Order By"},"description":"count or value."},{"name":"order_dir","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Order Dir"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"description":"Page size limit","default":50,"title":"Limit"},"description":"Page size limit"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Page offset","default":0,"title":"Offset"},"description":"Page offset"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MusicPage_FacetValueSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/music/playlists":{"get":{"tags":["music"],"summary":"Get Playlists","description":"The requesting user's playlists plus other users' public playlists.","operationId":"get_playlists_api_music_playlists_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MusicPlaylistSchema"},"type":"array","title":"Response Get Playlists Api Music Playlists Get"}}}}},"security":[{"OAuth2PasswordBearer":["playlists.read"]},{"HTTPBasic":[]}]},"post":{"tags":["music"],"summary":"Add Playlist","operationId":"add_playlist_api_music_playlists_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MusicPlaylistCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MusicPlaylistSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["playlists.write"]},{"HTTPBasic":[]}]}},"/api/music/playlists/{id}":{"get":{"tags":["music"],"summary":"Get Playlist","operationId":"get_playlist_api_music_playlists__id__get","security":[{"OAuth2PasswordBearer":["playlists.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Playlist internal id.","title":"Id"},"description":"Playlist internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MusicPlaylistSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["music"],"summary":"Update Playlist","operationId":"update_playlist_api_music_playlists__id__put","security":[{"OAuth2PasswordBearer":["playlists.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Playlist internal id.","title":"Id"},"description":"Playlist internal id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MusicPlaylistUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MusicPlaylistSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["music"],"summary":"Delete Playlist","operationId":"delete_playlist_api_music_playlists__id__delete","security":[{"OAuth2PasswordBearer":["playlists.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Playlist internal id.","title":"Id"},"description":"Playlist internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/music/playlists/{id}/tracks":{"get":{"tags":["music"],"summary":"Get Playlist Tracks","description":"Tracks of a playlist, in playlist order by default.\n\nEntries hidden from the viewer are omitted, so the page total can be lower\nthan the playlist's stored track_count.","operationId":"get_playlist_tracks_api_music_playlists__id__tracks_get","security":[{"OAuth2PasswordBearer":["playlists.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Playlist internal id.","title":"Id"},"description":"Playlist internal id."},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","description":"position/title/artist/album/duration/year/platform.","default":"position","title":"Order By"},"description":"position/title/artist/album/duration/year/platform."},{"name":"order_dir","in":"query","required":false,"schema":{"type":"string","description":"asc or desc.","default":"asc","title":"Order Dir"},"description":"asc or desc."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"description":"Page size limit","default":50,"title":"Limit"},"description":"Page size limit"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Page offset","default":0,"title":"Offset"},"description":"Page offset"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MusicPage_MusicTrackSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["music"],"summary":"Add Playlist Tracks","description":"Append tracks to the playlist; tracks already present are ignored.","operationId":"add_playlist_tracks_api_music_playlists__id__tracks_post","security":[{"OAuth2PasswordBearer":["playlists.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Playlist internal id.","title":"Id"},"description":"Playlist internal id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MusicTrackIdsPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Playlist Tracks Api Music Playlists Id Tracks Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["music"],"summary":"Remove Playlist Tracks","operationId":"remove_playlist_tracks_api_music_playlists__id__tracks_delete","security":[{"OAuth2PasswordBearer":["playlists.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Playlist internal id.","title":"Id"},"description":"Playlist internal id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MusicTrackIdsPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Playlist Tracks Api Music Playlists Id Tracks Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/music/playlists/{id}/tracks/order":{"put":{"tags":["music"],"summary":"Set Playlist Track Order","description":"Reorder the playlist to match the given rom_file_ids.\n\nEntries not covered by the payload keep their relative order after the\nlisted tracks.","operationId":"set_playlist_track_order_api_music_playlists__id__tracks_order_put","security":[{"OAuth2PasswordBearer":["playlists.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Playlist internal id.","title":"Id"},"description":"Playlist internal id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MusicTrackIdsPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/search/roms":{"get":{"tags":["search"],"summary":"Search Rom","description":"Search for rom in metadata providers\n\nArgs:\n request (Request): FastAPI request\n rom_id (int): Rom ID\n source (str): Source of the rom\n search_term (str, optional): Search term. Defaults to None.\n search_by (str, optional): Search by name or ID. Defaults to \"name\".\n search_extended (bool, optional): Search extended info. Defaults to False.\n\nReturns:\n list[SearchRomSchema]: List of matched roms","operationId":"search_rom_api_search_roms_get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"rom_id","in":"query","required":true,"schema":{"type":"integer","title":"Rom Id"}},{"name":"search_term","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search Term"}},{"name":"search_by","in":"query","required":false,"schema":{"type":"string","default":"name","title":"Search By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SearchRomSchema"},"title":"Response Search Rom Api Search Roms Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/search/cover":{"get":{"tags":["search"],"summary":"Search Cover","operationId":"search_cover_api_search_cover_get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"search_term","in":"query","required":false,"schema":{"type":"string","default":"","title":"Search Term"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SearchCoverSchema"},"title":"Response Search Cover Api Search Cover Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/saves":{"post":{"tags":["saves"],"summary":"Add Save","description":"Upload a save file for a ROM.","operationId":"add_save_api_saves_post","security":[{"OAuth2PasswordBearer":["assets.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"rom_id","in":"query","required":true,"schema":{"type":"integer","title":"Rom Id"}},{"name":"emulator","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emulator"}},{"name":"slot","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slot"}},{"name":"device_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"}},{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Session Id"}},{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Overwrite"}},{"name":"autocleanup","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Autocleanup"}},{"name":"autocleanup_limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Autocleanup Limit"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_save_api_saves_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["saves"],"summary":"Get Saves","description":"Retrieve saves for the current user.","operationId":"get_saves_api_saves_get","security":[{"OAuth2PasswordBearer":["assets.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"rom_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rom Id"}},{"name":"platform_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Platform Id"}},{"name":"device_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"}},{"name":"slot","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slot"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SaveSchema"},"title":"Response Get Saves Api Saves Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/saves/identifiers":{"get":{"tags":["saves"],"summary":"Get Save Identifiers","description":"Retrieve save identifiers.","operationId":"get_save_identifiers_api_saves_identifiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"integer"},"type":"array","title":"Response Get Save Identifiers Api Saves Identifiers Get"}}}}},"security":[{"OAuth2PasswordBearer":["assets.read"]},{"HTTPBasic":[]}]}},"/api/saves/summary":{"get":{"tags":["saves"],"summary":"Get Saves Summary","description":"Retrieve saves summary grouped by slot.","operationId":"get_saves_summary_api_saves_summary_get","security":[{"OAuth2PasswordBearer":["assets.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"rom_id","in":"query","required":true,"schema":{"type":"integer","title":"Rom Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveSummarySchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/saves/{id}":{"get":{"tags":["saves"],"summary":"Get Save","description":"Retrieve a save by ID.","operationId":"get_save_api_saves__id__get","security":[{"OAuth2PasswordBearer":["assets.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}},{"name":"device_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["saves"],"summary":"Update Save","description":"Update a save file.","operationId":"update_save_api_saves__id__put","security":[{"OAuth2PasswordBearer":["assets.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}},{"name":"device_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_save_api_saves__id__put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/saves/{id}/content":{"get":{"tags":["saves"],"summary":"Download Save","description":"Download a save file.","operationId":"download_save_api_saves__id__content_get","security":[{"OAuth2PasswordBearer":["assets.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}},{"name":"device_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"}},{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Session Id"}},{"name":"optimistic","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Optimistic"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/saves/{id}/downloaded":{"post":{"tags":["saves"],"summary":"Confirm Download","description":"Confirm a save was downloaded successfully.","operationId":"confirm_download_api_saves__id__downloaded_post","security":[{"OAuth2PasswordBearer":["devices.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_confirm_download_api_saves__id__downloaded_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/saves/{id}/visibility":{"put":{"tags":["saves"],"summary":"Update Save Visibility","description":"Toggle a save's public/private visibility (owner only).","operationId":"update_save_visibility_api_saves__id__visibility_put","security":[{"OAuth2PasswordBearer":["assets.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_update_save_visibility_api_saves__id__visibility_put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveSchema"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/saves/delete":{"post":{"tags":["saves"],"summary":"Delete Saves","description":"Delete saves.","operationId":"delete_saves_api_saves_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_delete_saves_api_saves_delete_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"integer"},"type":"array","title":"Response Delete Saves Api Saves Delete Post"}}}},"400":{"description":"Bad Request"},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["assets.write"]},{"HTTPBasic":[]}]}},"/api/saves/{id}/track":{"post":{"tags":["saves"],"summary":"Track Save","description":"Re-enable sync tracking for a save on a device.","operationId":"track_save_api_saves__id__track_post","security":[{"OAuth2PasswordBearer":["devices.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_track_save_api_saves__id__track_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/saves/{id}/untrack":{"post":{"tags":["saves"],"summary":"Untrack Save","description":"Disable sync tracking for a save on a device.","operationId":"untrack_save_api_saves__id__untrack_post","security":[{"OAuth2PasswordBearer":["devices.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_untrack_save_api_saves__id__untrack_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/states":{"post":{"tags":["states"],"summary":"Add State","operationId":"add_state_api_states_post","security":[{"OAuth2PasswordBearer":["assets.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"rom_id","in":"query","required":true,"schema":{"type":"integer","title":"Rom Id"}},{"name":"emulator","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emulator"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_state_api_states_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StateSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["states"],"summary":"Get States","operationId":"get_states_api_states_get","security":[{"OAuth2PasswordBearer":["assets.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"rom_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rom Id"}},{"name":"platform_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Platform Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StateSchema"},"title":"Response Get States Api States Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/states/identifiers":{"get":{"tags":["states"],"summary":"Get State Identifiers","description":"Get state identifiers endpoint\n\nArgs:\n request (Request): Fastapi Request object\n\nReturns:\n list[int]: List of state IDs","operationId":"get_state_identifiers_api_states_identifiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"integer"},"type":"array","title":"Response Get State Identifiers Api States Identifiers Get"}}}}},"security":[{"OAuth2PasswordBearer":["assets.read"]},{"HTTPBasic":[]}]}},"/api/states/{id}":{"get":{"tags":["states"],"summary":"Get State","operationId":"get_state_api_states__id__get","security":[{"OAuth2PasswordBearer":["assets.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StateSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["states"],"summary":"Update State","operationId":"update_state_api_states__id__put","security":[{"OAuth2PasswordBearer":["assets.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_state_api_states__id__put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StateSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/states/{id}/content":{"get":{"tags":["states"],"summary":"Download State","description":"Download a state file. Owner can download any of their states; everyone\nelse only public ones.","operationId":"download_state_api_states__id__content_get","security":[{"OAuth2PasswordBearer":["assets.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/states/{id}/visibility":{"put":{"tags":["states"],"summary":"Update State Visibility","description":"Toggle a state's public/private visibility (owner only).","operationId":"update_state_visibility_api_states__id__visibility_put","security":[{"OAuth2PasswordBearer":["assets.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_update_state_visibility_api_states__id__visibility_put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StateSchema"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/states/delete":{"post":{"tags":["states"],"summary":"Delete States","description":"Delete states.","operationId":"delete_states_api_states_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_delete_states_api_states_delete_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"integer"},"type":"array","title":"Response Delete States Api States Delete Post"}}}},"400":{"description":"Bad Request"},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["assets.write"]},{"HTTPBasic":[]}]}},"/api/sync/negotiate":{"post":{"tags":["sync"],"summary":"Negotiate Sync","description":"Negotiate sync operations between a client device and the server.\n\nThe client sends its current save state, and the server returns a list of\noperations (upload, download, conflict, no_op) to bring both sides in sync.\n\nSaves are paired on (rom_id, slot). Clients that want a save to stay in sync\nshould send a stable, non-null slot name (e.g. \"autosave\"). Null-slot saves\nare treated as archival, manual uploads: they are excluded from pairing, so a\nnull-slot client save always negotiates as an \"upload\" even when an identical\nfile (same content_hash) already exists on the server under a slot. This is\nintentional, since saves can be cloned across slots and null slots overlap\nwith manual uploads.","operationId":"negotiate_sync_api_sync_negotiate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncNegotiatePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncNegotiateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["assets.read","devices.read"]},{"HTTPBasic":[]}]}},"/api/sync/sessions/{session_id}/complete":{"post":{"tags":["sync"],"summary":"Complete Sync Session","description":"Mark a sync session as completed, optionally ingesting play sessions.","operationId":"complete_sync_session_api_sync_sessions__session_id__complete_post","security":[{"OAuth2PasswordBearer":["devices.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncCompletePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncCompleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sync/sessions":{"get":{"tags":["sync"],"summary":"Get Sync Sessions","description":"List sync sessions for the current user.","operationId":"get_sync_sessions_api_sync_sessions_get","security":[{"OAuth2PasswordBearer":["devices.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"device_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SyncSessionSchema"},"title":"Response Get Sync Sessions Api Sync Sessions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sync/sessions/{session_id}":{"get":{"tags":["sync"],"summary":"Get Sync Session","description":"Get a specific sync session.","operationId":"get_sync_session_api_sync_sessions__session_id__get","security":[{"OAuth2PasswordBearer":["devices.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncSessionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sync/devices/{device_id}/push-pull":{"post":{"tags":["sync"],"summary":"Trigger Push Pull","description":"Manually trigger a push-pull sync for a specific device.","operationId":"trigger_push_pull_api_sync_devices__device_id__push_pull_post","security":[{"OAuth2PasswordBearer":["devices.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncSessionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tasks":{"get":{"tags":["tasks"],"summary":"List Tasks","description":"List all available tasks grouped by task type.\n\nArgs:\n request (Request): FastAPI Request object\nReturns:\n GroupedTasksDict: Dictionary with tasks grouped by their type (scheduled, manual, watcher)","operationId":"list_tasks_api_tasks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"items":{"$ref":"#/components/schemas/TaskInfo"},"type":"array"},"type":"object","title":"Response List Tasks Api Tasks Get"}}}}},"security":[{"OAuth2PasswordBearer":["tasks.run"]},{"HTTPBasic":[]}]}},"/api/tasks/status":{"get":{"tags":["tasks"],"summary":"Get Tasks Status","description":"Get all active, queued, completed, and failed tasks.\n\nArgs:\n request (Request): FastAPI Request object\nReturns:\n list[TaskStatusResponse]: List of all tasks with their current status","operationId":"get_tasks_status_api_tasks_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"anyOf":[{"$ref":"#/components/schemas/ScanTaskStatusResponse"},{"$ref":"#/components/schemas/ConversionTaskStatusResponse"},{"$ref":"#/components/schemas/UpdateTaskStatusResponse"},{"$ref":"#/components/schemas/CleanupTaskStatusResponse"},{"$ref":"#/components/schemas/SyncTaskStatusResponse"},{"$ref":"#/components/schemas/WatcherTaskStatusResponse"},{"$ref":"#/components/schemas/GenericTaskStatusResponse"}]},"type":"array","title":"Response Get Tasks Status Api Tasks Status Get"}}}}},"security":[{"OAuth2PasswordBearer":["tasks.run"]},{"HTTPBasic":[]}]}},"/api/tasks/{task_id}":{"get":{"tags":["tasks"],"summary":"Get Task By Id","description":"Get the status of a task by its job ID.\n\nArgs:\n request (Request): FastAPI Request object\n task_id (str): Job ID of the task to retrieve status for\nReturns:\n TaskStatusResponse: Task status information","operationId":"get_task_by_id_api_tasks__task_id__get","security":[{"OAuth2PasswordBearer":["tasks.run"]},{"HTTPBasic":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ScanTaskStatusResponse"},{"$ref":"#/components/schemas/ConversionTaskStatusResponse"},{"$ref":"#/components/schemas/UpdateTaskStatusResponse"},{"$ref":"#/components/schemas/CleanupTaskStatusResponse"},{"$ref":"#/components/schemas/SyncTaskStatusResponse"},{"$ref":"#/components/schemas/WatcherTaskStatusResponse"},{"$ref":"#/components/schemas/GenericTaskStatusResponse"}],"title":"Response Get Task By Id Api Tasks Task Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tasks/run/{task_name}":{"post":{"tags":["tasks"],"summary":"Run Single Task","description":"Run a single task endpoint.\n\nArgs:\n request (Request): FastAPI Request object\n task_name (str): Name of the task to run\n task_kwargs (dict | None): Optional keyword arguments forwarded to the task's run() method\nReturns:\n TaskExecutionResponse: Task execution response with details","operationId":"run_single_task_api_tasks_run__task_name__post","security":[{"OAuth2PasswordBearer":["tasks.run"]},{"HTTPBasic":[]}],"parameters":[{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Task Kwargs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskExecutionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/feeds/webrcade":{"get":{"tags":["feeds"],"summary":"Platforms Webrcade Feed","description":"Get webrcade feed endpoint\nhttps://docs.webrcade.com/feeds/format/\n\nArgs:\n request (Request): Fastapi Request object\n\nReturns:\n WebrcadeFeedSchema: Webrcade feed object schema","operationId":"platforms_webrcade_feed_api_feeds_webrcade_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebrcadeFeedSchema"}}}}},"security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}]}},"/api/feeds/tinfoil":{"get":{"tags":["feeds"],"summary":"Tinfoil Index Feed","description":"Get tinfoil custom index feed endpoint\nhttps://blawar.github.io/tinfoil/custom_index/\n\nArgs:\n request (Request): Fastapi Request object\n slug (str, optional): Platform slug. Defaults to \"switch\".\n\nReturns:\n TinfoilFeedSchema: Tinfoil feed object schema","operationId":"tinfoil_index_feed_api_feeds_tinfoil_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBasic":[]}],"parameters":[{"name":"slug","in":"query","required":false,"schema":{"type":"string","default":"switch","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TinfoilFeedSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/feeds/pkgi/ps3/{content_type}":{"get":{"tags":["feeds"],"summary":"Pkgi Ps3 Feed","description":"Get PKGi PS3 feed endpoint\nhttps://github.com/bucanero/pkgi-ps3\n\nArgs:\n request (Request): Fastapi Request object\n content_type (str): Content type (game, dlc, demo, update, patch, mod, translation, prototype)\n\nReturns:\n Response: txt file with PKGi PS3 database format","operationId":"pkgi_ps3_feed_api_feeds_pkgi_ps3__content_type__get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"content_type","in":"path","required":true,"schema":{"type":"string","description":"Content type","title":"Content Type"},"description":"Content type"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/feeds/pkgi/psvita/{content_type}":{"get":{"tags":["feeds"],"summary":"Pkgi Psvita Feed","description":"Get PKGi PS Vita feed endpoint\nhttps://github.com/mmozeiko/pkgi\n\nArgs:\n request (Request): Fastapi Request object\n content_type (str): Content type (game, dlc, demo, update, patch, mod, translation, prototype)\n\nReturns:\n Response: txt file with PKGi PS Vita database format","operationId":"pkgi_psvita_feed_api_feeds_pkgi_psvita__content_type__get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"content_type","in":"path","required":true,"schema":{"type":"string","description":"Content type","title":"Content Type"},"description":"Content type"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/feeds/pkgi/psp/{content_type}":{"get":{"tags":["feeds"],"summary":"Pkgi Psp Feed","description":"Get PKGi PSP feed endpoint\nhttps://github.com/bucanero/pkgi-psp\n\nArgs:\n request (Request): Fastapi Request object\n content_type (str): Content type (game, dlc, demo, update, patch, mod, translation, prototype)\n\nReturns:\n Response: txt file with PKGi PSP database format","operationId":"pkgi_psp_feed_api_feeds_pkgi_psp__content_type__get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"content_type","in":"path","required":true,"schema":{"type":"string","description":"Content type","title":"Content Type"},"description":"Content type"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/feeds/fpkgi/{platform_slug}":{"get":{"tags":["feeds"],"summary":"Fpkgi Feed","description":"https://github.com/ItsJokerZz/FPKGi\n\nArgs:\n request (Request): Fastapi Request object\n platform_slug (str): Platform slug (ps4, ps5)\n content_type (str | None): Optional rom file category filter\n\nReturns:\n Response: JSON file in FPKGi format","operationId":"fpkgi_feed_api_feeds_fpkgi__platform_slug__get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"platform_slug","in":"path","required":true,"schema":{"type":"string","title":"Platform Slug"}},{"name":"content_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only list packages of this category (game, dlc, update, patch, demo)","title":"Content Type"},"description":"Only list packages of this category (game, dlc, update, patch, demo)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/feeds/kekatsu/{platform_slug}":{"get":{"tags":["feeds"],"summary":"Kekatsu Ds Feed","description":"Get Kekatsu DS feed endpoint\nhttps://github.com/cavv-dev/Kekatsu-DS\n\nArgs:\n request (Request): Fastapi Request object\n platform_slug (str): Platform slug (nds, nintendo-ds, ds, gba, etc.)\n\nReturns:\n Response: Text file with Kekatsu DS database format","operationId":"kekatsu_ds_feed_api_feeds_kekatsu__platform_slug__get","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"platform_slug","in":"path","required":true,"schema":{"type":"string","title":"Platform Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/feeds/pkgj/psp/games":{"get":{"tags":["feeds"],"summary":"Pkgj Psp Games Feed","operationId":"pkgj_psp_games_feed_api_feeds_pkgj_psp_games_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}]}},"/api/feeds/pkgj/psp/dlc":{"get":{"tags":["feeds"],"summary":"Pkgj Psp Dlcs Feed","operationId":"pkgj_psp_dlcs_feed_api_feeds_pkgj_psp_dlc_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}]}},"/api/feeds/pkgj/psvita/games":{"get":{"tags":["feeds"],"summary":"Pkgj Psv Games Feed","operationId":"pkgj_psv_games_feed_api_feeds_pkgj_psvita_games_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}]}},"/api/feeds/pkgj/psvita/dlc":{"get":{"tags":["feeds"],"summary":"Pkgj Psv Dlcs Feed","operationId":"pkgj_psv_dlcs_feed_api_feeds_pkgj_psvita_dlc_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}]}},"/api/feeds/pkgj/psx/games":{"get":{"tags":["feeds"],"summary":"Pkgj Psx Games Feed","operationId":"pkgj_psx_games_feed_api_feeds_pkgj_psx_games_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}]}},"/api/config":{"get":{"tags":["config"],"summary":"Get Config","description":"Get config endpoint\n\nReturns:\n ConfigResponse: RomM's configuration","operationId":"get_config_api_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigResponse"}}}}}}},"/api/config/system/platforms":{"post":{"tags":["config"],"summary":"Add Platform Binding","description":"Add platform binding to the configuration","operationId":"add_platform_binding_api_config_system_platforms_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformBindingPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["platforms.write"]},{"HTTPBasic":[]}]}},"/api/config/system/platforms/{fs_slug}":{"delete":{"tags":["config"],"summary":"Delete Platform Binding","description":"Delete platform binding from the configuration","operationId":"delete_platform_binding_api_config_system_platforms__fs_slug__delete","security":[{"OAuth2PasswordBearer":["platforms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"fs_slug","in":"path","required":true,"schema":{"type":"string","title":"Fs Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/config/system/versions":{"post":{"tags":["config"],"summary":"Add Platform Version","description":"Add platform version to the configuration","operationId":"add_platform_version_api_config_system_versions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformBindingPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["platforms.write"]},{"HTTPBasic":[]}]}},"/api/config/system/versions/{fs_slug}":{"delete":{"tags":["config"],"summary":"Delete Platform Version","description":"Delete platform version from the configuration","operationId":"delete_platform_version_api_config_system_versions__fs_slug__delete","security":[{"OAuth2PasswordBearer":["platforms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"fs_slug","in":"path","required":true,"schema":{"type":"string","title":"Fs Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/config/exclude":{"post":{"tags":["config"],"summary":"Add Exclusion","description":"Add platform exclusion to the configuration","operationId":"add_exclusion_api_config_exclude_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExclusionPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["platforms.write"]},{"HTTPBasic":[]}]}},"/api/config/exclude/{exclusion_type}/{exclusion_value}":{"delete":{"tags":["config"],"summary":"Delete Exclusion","description":"Delete platform binding from the configuration","operationId":"delete_exclusion_api_config_exclude__exclusion_type___exclusion_value__delete","security":[{"OAuth2PasswordBearer":["platforms.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"exclusion_type","in":"path","required":true,"schema":{"type":"string","title":"Exclusion Type"}},{"name":"exclusion_value","in":"path","required":true,"schema":{"type":"string","title":"Exclusion Value"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/config/scan":{"put":{"tags":["config"],"summary":"Update Scan Settings","description":"Replace the scan.* section of the configuration","operationId":"update_scan_settings_api_config_scan_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanSettingsPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["platforms.write"]},{"HTTPBasic":[]}]}},"/api/stats":{"get":{"tags":["stats"],"summary":"Stats","description":"Endpoint to return the current RomM stats\n\nReturns:\n dict: Dictionary with all the stats","operationId":"stats_api_stats_get","parameters":[{"name":"include_platform_stats","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Platform Stats"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsReturn"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/logs":{"get":{"tags":["logs"],"summary":"Get Logs","description":"Return the most recent backend log lines for backfill (admin only).\n\nArgs:\n request (Request): FastAPI Request object.\n limit (int): Maximum number of recent lines to return.\n\nReturns:\n list[LogEntrySchema]: Recent log lines, oldest-first.","operationId":"get_logs_api_logs_get","security":[{"OAuth2PasswordBearer":["logs.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":1000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LogEntrySchema"},"title":"Response Get Logs Api Logs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/screenshots":{"post":{"tags":["screenshots"],"summary":"Add Screenshot","description":"Upload a per-user gallery screenshot for a ROM.\n\nStored under the user's asset folder (not the ROM folder) and flagged\n`is_gallery=True` so it surfaces in the gallery; `is_public=False` so it\nstays private until the owner shares it.","operationId":"add_screenshot_api_screenshots_post","security":[{"OAuth2PasswordBearer":["assets.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"rom_id","in":"query","required":true,"schema":{"type":"integer","title":"Rom Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_screenshot_api_screenshots_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenshotSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/screenshots/{id}/content":{"get":{"tags":["screenshots"],"summary":"Download Screenshot","description":"Download a screenshot file. Owner can download any of their screenshots;\neveryone else only public ones.","operationId":"download_screenshot_api_screenshots__id__content_get","security":[{"OAuth2PasswordBearer":["assets.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Screenshot internal id.","title":"Id"},"description":"Screenshot internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/screenshots/{id}":{"put":{"tags":["screenshots"],"summary":"Update Screenshot","description":"Toggle a gallery screenshot's public/private visibility (owner only).","operationId":"update_screenshot_api_screenshots__id__put","security":[{"OAuth2PasswordBearer":["assets.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Screenshot internal id.","title":"Id"},"description":"Screenshot internal id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_update_screenshot_api_screenshots__id__put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenshotSchema"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["screenshots"],"summary":"Delete Screenshot","description":"Delete a gallery screenshot — its file and DB row (owner only).","operationId":"delete_screenshot_api_screenshots__id__delete","security":[{"OAuth2PasswordBearer":["assets.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Screenshot internal id.","title":"Id"},"description":"Screenshot internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/firmware":{"post":{"tags":["firmware"],"summary":"Add Firmware","description":"Upload firmware files endpoint\n\nArgs:\n request (Request): Fastapi Request object\n platform_slug (str): Slug of the platform where to upload the files\n files (list[UploadFile], optional): List of files to upload\n\nRaises:\n HTTPException\n\nReturns:\n AddFirmwareResponse: Standard message response","operationId":"add_firmware_api_firmware_post","security":[{"OAuth2PasswordBearer":["firmware.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"platform_id","in":"query","required":true,"schema":{"type":"integer","title":"Platform Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_firmware_api_firmware_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddFirmwareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["firmware"],"summary":"Get Platform Firmware","description":"Get firmware endpoint\n\nArgs:\n request (Request): Fastapi Request object\n\nReturns:\n list[FirmwareSchema]: Firmware stored in the database","operationId":"get_platform_firmware_api_firmware_get","security":[{"OAuth2PasswordBearer":["firmware.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"platform_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Platform Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FirmwareSchema"},"title":"Response Get Platform Firmware Api Firmware Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/firmware/identifiers":{"get":{"tags":["firmware"],"summary":"Get Firmware Identifiers","description":"Get firmware identifiers endpoint\n\nArgs:\n request (Request): Fastapi Request object\n\nReturns:\n list[int]: List of firmware IDs","operationId":"get_firmware_identifiers_api_firmware_identifiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"integer"},"type":"array","title":"Response Get Firmware Identifiers Api Firmware Identifiers Get"}}}}},"security":[{"OAuth2PasswordBearer":["firmware.read"]},{"HTTPBasic":[]}]}},"/api/firmware/{id}":{"get":{"tags":["firmware"],"summary":"Get Firmware","description":"Get firmware endpoint\n\nArgs:\n request (Request): Fastapi Request object\n id (int): Firmware internal id\n\nReturns:\n FirmwareSchema: Firmware stored in the database","operationId":"get_firmware_api_firmware__id__get","security":[{"OAuth2PasswordBearer":["firmware.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirmwareSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/firmware/{id}/content/{file_name}":{"head":{"tags":["firmware"],"summary":"Head Firmware Content","description":"Head firmware content endpoint\n\nArgs:\n request (Request): Fastapi Request object\n id (int): Rom internal id\n file_name (str): Required due to a bug in emulatorjs\n\nReturns:\n FileResponse: Returns the response with headers","operationId":"head_firmware_content_api_firmware__id__content__file_name__head","security":[{"OAuth2PasswordBearer":["firmware.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}},{"name":"file_name","in":"path","required":true,"schema":{"type":"string","title":"File Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["firmware"],"summary":"Get Firmware Content","description":"Download firmware endpoint\n\nArgs:\n request (Request): Fastapi Request object\n id (int): Rom internal id\n file_name (str): Required due to a bug in emulatorjs\n\nReturns:\n FileResponse: Returns the firmware file","operationId":"get_firmware_content_api_firmware__id__content__file_name__get","security":[{"OAuth2PasswordBearer":["firmware.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}},{"name":"file_name","in":"path","required":true,"schema":{"type":"string","title":"File Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/firmware/delete":{"post":{"tags":["firmware"],"summary":"Delete Firmware","description":"Delete firmware.","operationId":"delete_firmware_api_firmware_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_delete_firmware_api_firmware_delete_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["firmware.write"]},{"HTTPBasic":[]}]}},"/api/collections":{"post":{"tags":["collections"],"summary":"Add Collection","description":"Create collection endpoint\n\nArgs:\n request (Request): Fastapi Request object\n\nReturns:\n CollectionSchema: Just created collection","operationId":"add_collection_api_collections_post","security":[{"OAuth2PasswordBearer":["collections.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"is_public","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Public"}},{"name":"is_favorite","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Favorite"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_collection_api_collections_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["collections"],"summary":"Get Collections","description":"Get collections endpoint\n\nArgs:\n request (Request): Fastapi Request object\n updated_after: Filter collections updated after this datetime\n\nReturns:\n list[CollectionSchema]: List of collections","operationId":"get_collections_api_collections_get","security":[{"OAuth2PasswordBearer":["collections.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"updated_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter collections updated after this datetime (ISO 8601 format with timezone information).","title":"Updated After"},"description":"Filter collections updated after this datetime (ISO 8601 format with timezone information)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CollectionSchema"},"title":"Response Get Collections Api Collections Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/collections/smart":{"post":{"tags":["collections"],"summary":"Add Smart Collection","description":"Create smart collection endpoint\n\nArgs:\n request (Request): Fastapi Request object\n\nReturns:\n SmartCollectionSchema: Just created smart collection","operationId":"add_smart_collection_api_collections_smart_post","security":[{"OAuth2PasswordBearer":["collections.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"is_public","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Public"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_add_smart_collection_api_collections_smart_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartCollectionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["collections"],"summary":"Get Smart Collections","description":"Get smart collections endpoint\n\nArgs:\n request (Request): Fastapi Request object\n updated_after: Filter smart collections updated after this datetime\n\nReturns:\n list[SmartCollectionSchema]: List of smart collections","operationId":"get_smart_collections_api_collections_smart_get","security":[{"OAuth2PasswordBearer":["collections.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"updated_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter smart collections updated after this datetime (ISO 8601 format with timezone information).","title":"Updated After"},"description":"Filter smart collections updated after this datetime (ISO 8601 format with timezone information)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SmartCollectionSchema"},"title":"Response Get Smart Collections Api Collections Smart Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/collections/identifiers":{"get":{"tags":["collections"],"summary":"Get Collection Identifiers","description":"Get collections identifiers endpoint\n\nArgs:\n request (Request): Fastapi Request object\n\nReturns:\n list[int]: List of collection IDs","operationId":"get_collection_identifiers_api_collections_identifiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"integer"},"type":"array","title":"Response Get Collection Identifiers Api Collections Identifiers Get"}}}}},"security":[{"OAuth2PasswordBearer":["collections.read"]},{"HTTPBasic":[]}]}},"/api/collections/virtual":{"get":{"tags":["collections"],"summary":"Get Virtual Collections","description":"Get virtual collections endpoint\n\nArgs:\n request (Request): Fastapi Request object\n\nReturns:\n list[VirtualCollectionSchema]: List of virtual collections","operationId":"get_virtual_collections_api_collections_virtual_get","security":[{"OAuth2PasswordBearer":["collections.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"type","in":"query","required":true,"schema":{"type":"string","title":"Type"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VirtualCollectionSchema"},"title":"Response Get Virtual Collections Api Collections Virtual Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/collections/virtual/identifiers":{"get":{"tags":["collections"],"summary":"Get Virtual Collection Identifiers","description":"Get virtual collections identifiers endpoint\n\nArgs:\n request (Request): Fastapi Request object\n\nReturns:\n list[str]: List of generated virtual collection IDs","operationId":"get_virtual_collection_identifiers_api_collections_virtual_identifiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Get Virtual Collection Identifiers Api Collections Virtual Identifiers Get"}}}}},"security":[{"OAuth2PasswordBearer":["collections.read"]},{"HTTPBasic":[]}]}},"/api/collections/smart/identifiers":{"get":{"tags":["collections"],"summary":"Get Smart Collection Identifiers","description":"Get smart collections identifiers endpoint\n\nArgs:\n request (Request): Fastapi Request object\n\nReturns:\n list[int]: List of smart collection IDs","operationId":"get_smart_collection_identifiers_api_collections_smart_identifiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"integer"},"type":"array","title":"Response Get Smart Collection Identifiers Api Collections Smart Identifiers Get"}}}}},"security":[{"OAuth2PasswordBearer":["collections.read"]},{"HTTPBasic":[]}]}},"/api/collections/{id}":{"get":{"tags":["collections"],"summary":"Get Collection","description":"Get collections endpoint\n\nArgs:\n request (Request): Fastapi Request object\n id (int, optional): Collection id. Defaults to None.\n\nReturns:\n CollectionSchema: Collection","operationId":"get_collection_api_collections__id__get","security":[{"OAuth2PasswordBearer":["collections.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["collections"],"summary":"Update Collection","description":"Update collection endpoint\n\nArgs:\n request (Request): Fastapi Request object\n\nReturns:\n CollectionSchema: Updated collection","operationId":"update_collection_api_collections__id__put","security":[{"OAuth2PasswordBearer":["collections.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}},{"name":"remove_cover","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Remove Cover"}},{"name":"is_public","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Public"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_collection_api_collections__id__put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["collections"],"summary":"Delete Collection","description":"Delete a collection by ID.","operationId":"delete_collection_api_collections__id__delete","security":[{"OAuth2PasswordBearer":["collections.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Collection internal id.","title":"Id"},"description":"Collection internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/collections/virtual/{id}":{"get":{"tags":["collections"],"summary":"Get Virtual Collection","description":"Get virtual collections endpoint\n\nArgs:\n request (Request): Fastapi Request object\n id (str): Virtual collection id\n\nReturns:\n VirtualCollectionSchema: Virtual collection","operationId":"get_virtual_collection_api_collections_virtual__id__get","security":[{"OAuth2PasswordBearer":["collections.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VirtualCollectionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/collections/smart/{id}":{"get":{"tags":["collections"],"summary":"Get Smart Collection","description":"Get smart collection endpoint\n\nArgs:\n request (Request): Fastapi Request object\n id (int): Smart collection id\n\nReturns:\n SmartCollectionSchema: Smart collection","operationId":"get_smart_collection_api_collections_smart__id__get","security":[{"OAuth2PasswordBearer":["collections.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartCollectionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["collections"],"summary":"Update Smart Collection","description":"Update smart collection endpoint\n\nArgs:\n request (Request): Fastapi Request object\n id (int): Smart collection id\n\nReturns:\n SmartCollectionSchema: Updated smart collection","operationId":"update_smart_collection_api_collections_smart__id__put","security":[{"OAuth2PasswordBearer":["collections.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}},{"name":"is_public","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Public"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_smart_collection_api_collections_smart__id__put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartCollectionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["collections"],"summary":"Delete Smart Collection","description":"Delete a smart collection by ID.","operationId":"delete_smart_collection_api_collections_smart__id__delete","security":[{"OAuth2PasswordBearer":["collections.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Smart collection internal id.","title":"Id"},"description":"Smart collection internal id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/collections/{id}/roms":{"post":{"tags":["collections"],"summary":"Add Roms To Collection","description":"Atomically add ROMs to a collection without replacing the full list.\n\nArgs:\n request (Request): Fastapi Request object\n id (int): Collection id\n payload (CollectionRomsPayload): ROM IDs to add\n\nReturns:\n CollectionSchema: Updated collection","operationId":"add_roms_to_collection_api_collections__id__roms_post","security":[{"OAuth2PasswordBearer":["collections.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionRomsPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["collections"],"summary":"Remove Roms From Collection","description":"Atomically remove ROMs from a collection without replacing the full list.\n\nArgs:\n request (Request): Fastapi Request object\n id (int): Collection id\n payload (CollectionRomsPayload): ROM IDs to remove\n\nReturns:\n CollectionSchema: Updated collection","operationId":"remove_roms_from_collection_api_collections__id__roms_delete","security":[{"OAuth2PasswordBearer":["collections.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionRomsPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/export/gamelist-xml":{"post":{"tags":["export"],"summary":"Export Gamelist Xml","description":"Export platforms/ROMs to gamelist.xml format and write to platform directories","operationId":"export_gamelist_xml_api_export_gamelist_xml_post","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"platform_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"integer"},"description":"List of platform IDs to export","title":"Platform Ids"},"description":"List of platform IDs to export"},{"name":"local_export","in":"query","required":false,"schema":{"type":"boolean","description":"Use local paths instead of URLs","default":false,"title":"Local Export"},"description":"Use local paths instead of URLs"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/export/pegasus":{"post":{"tags":["export"],"summary":"Export Pegasus","description":"Export platforms/ROMs to Pegasus metadata.pegasus.txt format and write to platform directories","operationId":"export_pegasus_api_export_pegasus_post","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"platform_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"integer"},"description":"List of platform IDs to export","title":"Platform Ids"},"description":"List of platform IDs to export"},{"name":"local_export","in":"query","required":false,"schema":{"type":"boolean","description":"Use local paths instead of URLs","default":false,"title":"Local Export"},"description":"Use local paths instead of URLs"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/netplay/list":{"get":{"tags":["netplay"],"summary":"Get Rooms","operationId":"get_rooms_api_netplay_list_get","security":[{"OAuth2PasswordBearer":["assets.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"game_id","in":"query","required":true,"schema":{"type":"string","title":"Game Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RoomsResponse"},"title":"Response Get Rooms Api Netplay List Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/permissions/me":{"get":{"tags":["permissions"],"summary":"Get My Permissions","description":"Return the caller's effective permissions for the UI to gate on.\n\nThe backend remains the source of truth; this is a UX hint. Includes the\ngranted action keys and the platform/rom ids hidden from the caller.","operationId":"get_my_permissions_api_permissions_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsResponse"}}}}},"security":[{"OAuth2PasswordBearer":["me.read"]},{"HTTPBasic":[]}]}},"/api/permissions/catalog":{"get":{"tags":["permissions"],"summary":"Get Permission Catalog","description":"The entity/action vocabulary the admin UI renders its matrix from.","operationId":"get_permission_catalog_api_permissions_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionCatalogSchema"}}}}},"security":[{"OAuth2PasswordBearer":["users.read"]},{"HTTPBasic":[]}]}},"/api/permissions/groups":{"get":{"tags":["permissions"],"summary":"List Permission Groups","description":"List all permission groups with their grants.","operationId":"list_permission_groups_api_permissions_groups_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PermissionGroupSchema"},"type":"array","title":"Response List Permission Groups Api Permissions Groups Get"}}}}},"security":[{"OAuth2PasswordBearer":["users.read"]},{"HTTPBasic":[]}]},"post":{"tags":["permissions"],"summary":"Create Permission Group","description":"Create a permission group.","operationId":"create_permission_group_api_permissions_groups_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionGroupCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionGroupSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["users.write"]},{"HTTPBasic":[]}]}},"/api/permissions/groups/{id}":{"put":{"tags":["permissions"],"summary":"Update Permission Group","description":"Update a permission group (name/description/default/grants).","operationId":"update_permission_group_api_permissions_groups__id__put","security":[{"OAuth2PasswordBearer":["users.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionGroupUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionGroupSchema"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["permissions"],"summary":"Delete Permission Group","description":"Delete a permission group. Members fall back to the default group.","operationId":"delete_permission_group_api_permissions_groups__id__delete","security":[{"OAuth2PasswordBearer":["users.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/permissions/users/{user_id}":{"get":{"tags":["permissions"],"summary":"Get User Permissions","description":"A user's group membership, per-user overrides and hidden entities.","operationId":"get_user_permissions_api_permissions_users__user_id__get","security":[{"OAuth2PasswordBearer":["users.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPermissionsSchema"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["permissions"],"summary":"Update User Permissions","description":"Assign a user's group and/or replace their per-user overrides.","operationId":"update_user_permissions_api_permissions_users__user_id__put","security":[{"OAuth2PasswordBearer":["users.write"]},{"HTTPBasic":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPermissionsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPermissionsSchema"}}}},"404":{"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/permissions/hidden":{"post":{"tags":["permissions"],"summary":"Add Hidden Entity","description":"Hide an entity from a user OR a group (exactly one principal).","operationId":"add_hidden_entity_api_permissions_hidden_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HiddenEntityCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HiddenEntitySchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["users.write"]},{"HTTPBasic":[]}]},"delete":{"tags":["permissions"],"summary":"Remove Hidden Entity","description":"Un-hide an entity for a user OR a group.","operationId":"remove_hidden_entity_api_permissions_hidden_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_remove_hidden_entity_api_permissions_hidden_delete"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["users.write"]},{"HTTPBasic":[]}]}},"/api/streaming/config":{"get":{"tags":["streaming"],"summary":"Get Config","description":"Return streaming configuration to the frontend","operationId":"get_config_api_streaming_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}]}},"/api/streaming/sessions":{"get":{"tags":["streaming"],"summary":"List Sessions","description":"Admin debug view, active sessions keyed by broker URL.","operationId":"list_sessions_api_streaming_sessions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}]},"post":{"tags":["streaming"],"summary":"Claim Session","description":"Claim a streaming session and tell the broker to load the ROM.\n\nThe ROM's filesystem path is derived server-side from its database row -\nthe client only supplies a ROM id, never a path.\nReturns 404 if the ROM doesn't exist or no container serves its platform.\nReturns 409 if the container is already occupied.\nReturns 502/503 if the broker rejects the launch or is unreachable.","operationId":"claim_session_api_streaming_sessions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}]},"delete":{"tags":["streaming"],"summary":"Force Release All","description":"Force-release all active sessions.","operationId":"force_release_all_api_streaming_sessions_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}]}},"/api/streaming/sessions/{platform}/save-and-exit":{"post":{"tags":["streaming"],"summary":"Save And Exit Session","description":"Save game state then release the session.\nwait=true (default): blocks until broker confirms save+kill complete.\nwait=false: broker fires save+kill in background, returns immediately.","operationId":"save_and_exit_session_api_streaming_sessions__platform__save_and_exit_post","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveAndExitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/streaming/sessions/{platform}/volume":{"post":{"tags":["streaming"],"summary":"Set Volume","description":"Set emulator audio volume (0-100).","operationId":"set_volume_api_streaming_sessions__platform__volume_post","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VolumeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/streaming/sessions/{platform}/mute":{"post":{"tags":["streaming"],"summary":"Set Mute","description":"Toggle or explicitly set mute state. Omit body to toggle.","operationId":"set_mute_api_streaming_sessions__platform__mute_post","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MuteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/streaming/sessions/{platform}/save-state":{"post":{"tags":["streaming"],"summary":"Save State","description":"Save game state to a manual slot without stopping the emulator.","operationId":"save_state_api_streaming_sessions__platform__save_state_post","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveStateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/streaming/sessions/{platform}/load-state":{"post":{"tags":["streaming"],"summary":"Load State","description":"Load game state from a manual slot or the platform's autosave slot.","operationId":"load_state_api_streaming_sessions__platform__load_state_post","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadStateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/streaming/sessions/{platform}":{"delete":{"tags":["streaming"],"summary":"Release Session","description":"Release a session and tell the broker to stop the emulator.","operationId":"release_session_api_streaming_sessions__platform__delete","security":[{"OAuth2PasswordBearer":["roms.read"]},{"HTTPBasic":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ActionKey":{"type":"string","enum":["rom.view","rom.play","rom.download","rom.upload","rom.edit","rom.delete","rom.match","rom.refresh","rom.favorite","platform.view","platform.create","platform.edit","platform.delete","collection.view","collection.create","collection.edit","collection.delete","library.scan","user.view","user.create","user.edit","user.delete","app.admin"],"title":"ActionKey"},"ActivityEntrySchema":{"properties":{"user_id":{"type":"integer","title":"User Id"},"username":{"type":"string","title":"Username"},"avatar_path":{"type":"string","title":"Avatar Path"},"rom_id":{"type":"integer","title":"Rom Id"},"rom_name":{"type":"string","title":"Rom Name"},"rom_cover_path":{"type":"string","title":"Rom Cover Path","default":""},"screenshot_path":{"type":"string","title":"Screenshot Path","default":""},"platform_slug":{"type":"string","title":"Platform Slug"},"platform_name":{"type":"string","title":"Platform Name"},"device_id":{"type":"string","title":"Device Id"},"device_type":{"type":"string","title":"Device Type"},"started_at":{"type":"string","title":"Started At"}},"type":"object","required":["user_id","username","avatar_path","rom_id","rom_name","platform_slug","platform_name","device_id","device_type","started_at"],"title":"ActivityEntrySchema"},"AddFirmwareResponse":{"properties":{"uploaded":{"type":"integer","title":"Uploaded"},"firmware":{"items":{"$ref":"#/components/schemas/FirmwareSchema"},"type":"array","title":"Firmware"}},"type":"object","required":["uploaded","firmware"],"title":"AddFirmwareResponse"},"Body_add_collection_api_collections_post":{"properties":{"artwork":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Artwork","description":"Collection artwork file."},"name":{"type":"string","title":"Name","default":""},"description":{"type":"string","title":"Description","default":""},"url_cover":{"type":"string","title":"Url Cover","description":"Remote URL to fetch and use as cover artwork.","default":""}},"type":"object","title":"Body_add_collection_api_collections_post"},"Body_add_firmware_api_firmware_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_add_firmware_api_firmware_post"},"Body_add_platform_api_platforms_post":{"properties":{"fs_slug":{"type":"string","title":"Fs Slug","description":"Platform slug."}},"type":"object","required":["fs_slug"],"title":"Body_add_platform_api_platforms_post"},"Body_add_save_api_saves_post":{"properties":{"saveFile":{"type":"string","contentMediaType":"application/octet-stream","title":"Savefile","description":"Save file to upload."},"screenshotFile":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Screenshotfile","description":"Screenshot file associated with this save."}},"type":"object","required":["saveFile"],"title":"Body_add_save_api_saves_post"},"Body_add_screenshot_api_screenshots_post":{"properties":{"screenshotFile":{"type":"string","contentMediaType":"application/octet-stream","title":"Screenshotfile","description":"Screenshot file to upload."}},"type":"object","required":["screenshotFile"],"title":"Body_add_screenshot_api_screenshots_post"},"Body_add_smart_collection_api_collections_smart_post":{"properties":{"name":{"type":"string","title":"Name","default":""},"description":{"type":"string","title":"Description","default":""},"filter_criteria":{"type":"string","title":"Filter Criteria","description":"Smart collection filters as a JSON string.","default":"{}"}},"type":"object","title":"Body_add_smart_collection_api_collections_smart_post"},"Body_add_state_api_states_post":{"properties":{"stateFile":{"type":"string","contentMediaType":"application/octet-stream","title":"Statefile","description":"State file to upload."},"screenshotFile":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Screenshotfile","description":"Screenshot file associated with this state."}},"type":"object","required":["stateFile"],"title":"Body_add_state_api_states_post"},"Body_add_user_api_users_post":{"properties":{"username":{"type":"string","title":"Username"},"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"role":{"type":"string","title":"Role"}},"type":"object","required":["username","email","password","role"],"title":"Body_add_user_api_users_post"},"Body_confirm_download_api_saves__id__downloaded_post":{"properties":{"device_id":{"type":"string","title":"Device Id"}},"type":"object","required":["device_id"],"title":"Body_confirm_download_api_saves__id__downloaded_post"},"Body_create_user_from_invite_api_users_register_post":{"properties":{"username":{"type":"string","title":"Username"},"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"token":{"type":"string","title":"Token"}},"type":"object","required":["username","email","password","token"],"title":"Body_create_user_from_invite_api_users_register_post"},"Body_delete_firmware_api_firmware_delete_post":{"properties":{"firmware":{"items":{"type":"integer"},"type":"array","title":"Firmware","description":"List of firmware ids to delete from database."},"delete_from_fs":{"items":{"type":"integer"},"type":"array","title":"Delete From Fs","description":"List of firmware ids to delete from filesystem."}},"type":"object","required":["firmware"],"title":"Body_delete_firmware_api_firmware_delete_post"},"Body_delete_roms_api_roms_delete_post":{"properties":{"roms":{"items":{"type":"integer"},"type":"array","title":"Roms","description":"List of rom ids to delete from database."},"delete_from_fs":{"items":{"type":"integer"},"type":"array","title":"Delete From Fs","description":"List of rom ids to delete from filesystem."}},"type":"object","required":["roms"],"title":"Body_delete_roms_api_roms_delete_post"},"Body_delete_saves_api_saves_delete_post":{"properties":{"saves":{"items":{"type":"integer"},"type":"array","title":"Saves","description":"List of save ids to delete from database."}},"type":"object","required":["saves"],"title":"Body_delete_saves_api_saves_delete_post"},"Body_delete_states_api_states_delete_post":{"properties":{"states":{"items":{"type":"integer"},"type":"array","title":"States","description":"List of states ids to delete from database."}},"type":"object","required":["states"],"title":"Body_delete_states_api_states_delete_post"},"Body_patch_rom_api_roms__id__patch_post":{"properties":{"patch_file_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Patch File Id","description":"ID of a library patch file (RomFile) to apply."},"output_file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output File Name","description":"Custom output file name. If omitted, derived from ROM + patch names."},"patch_file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Patch File","description":"A patch file uploaded from the client, applied without being stored in the library."}},"type":"object","title":"Body_patch_rom_api_roms__id__patch_post"},"Body_refresh_retro_achievements_api_users__id__ra_refresh_post":{"properties":{"incremental":{"type":"boolean","title":"Incremental","description":"Whether to only retrieve RetroAchievements progression incrementally.","default":false}},"type":"object","title":"Body_refresh_retro_achievements_api_users__id__ra_refresh_post"},"Body_remove_hidden_entity_api_permissions_hidden_delete":{"properties":{"entity":{"$ref":"#/components/schemas/PermEntity"},"entity_id":{"type":"integer","title":"Entity Id"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group Id"}},"type":"object","required":["entity","entity_id"],"title":"Body_remove_hidden_entity_api_permissions_hidden_delete"},"Body_request_password_reset_api_forgot_password_post":{"properties":{"username":{"type":"string","title":"Username"}},"type":"object","required":["username"],"title":"Body_request_password_reset_api_forgot_password_post"},"Body_reset_password_api_reset_password_post":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["token","new_password"],"title":"Body_reset_password_api_reset_password_post"},"Body_token_api_token_post":{"properties":{"grant_type":{"type":"string","title":"Grant Type","default":"password"},"scope":{"type":"string","title":"Scope","default":""},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"}},"type":"object","title":"Body_token_api_token_post"},"Body_track_save_api_saves__id__track_post":{"properties":{"device_id":{"type":"string","title":"Device Id"}},"type":"object","required":["device_id"],"title":"Body_track_save_api_saves__id__track_post"},"Body_untrack_save_api_saves__id__untrack_post":{"properties":{"device_id":{"type":"string","title":"Device Id"}},"type":"object","required":["device_id"],"title":"Body_untrack_save_api_saves__id__untrack_post"},"Body_update_collection_api_collections__id__put":{"properties":{"artwork":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Artwork","description":"Collection artwork file."},"rom_ids":{"type":"string","title":"Rom Ids","description":"Collection ROM IDs as a JSON array string (e.g. [1,2,3])."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"url_cover":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url Cover","description":"Updated remote cover URL."}},"type":"object","required":["rom_ids"],"title":"Body_update_collection_api_collections__id__put"},"Body_update_platform_api_platforms__id__put":{"properties":{"custom_name":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}],"title":"Custom Name","description":"Custom platform name."},"description":{"anyOf":[{"type":"string","maxLength":65535},{"type":"null"}],"title":"Description","description":"Custom platform description."}},"type":"object","title":"Body_update_platform_api_platforms__id__put"},"Body_update_rom_api_roms__id__put":{"properties":{"artwork":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Artwork","description":"Custom artwork to set as cover."},"igdb_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Igdb Id"},"sgdb_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sgdb Id"},"moby_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Moby Id"},"ss_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ss Id"},"ra_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ra Id"},"launchbox_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Launchbox Id"},"hasheous_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hasheous Id"},"tgdb_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tgdb Id"},"flashpoint_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flashpoint Id"},"hltb_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hltb Id"},"libretro_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Libretro Id"},"raw_igdb_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Igdb Metadata"},"raw_moby_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Moby Metadata"},"raw_ss_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Ss Metadata"},"raw_launchbox_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Launchbox Metadata"},"raw_hasheous_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Hasheous Metadata"},"raw_flashpoint_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Flashpoint Metadata"},"raw_hltb_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Hltb Metadata"},"raw_manual_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Manual Metadata"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"name_sort_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Sort Key"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"fs_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fs Name"},"url_cover":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url Cover"},"url_manual":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url Manual"}},"type":"object","title":"Body_update_rom_api_roms__id__put"},"Body_update_save_api_saves__id__put":{"properties":{"saveFile":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Savefile","description":"Updated save file content."},"screenshotFile":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Screenshotfile","description":"Updated screenshot file."}},"type":"object","title":"Body_update_save_api_saves__id__put"},"Body_update_save_visibility_api_saves__id__visibility_put":{"properties":{"is_public":{"type":"boolean","title":"Is Public"}},"type":"object","required":["is_public"],"title":"Body_update_save_visibility_api_saves__id__visibility_put"},"Body_update_screenshot_api_screenshots__id__put":{"properties":{"is_public":{"type":"boolean","title":"Is Public"}},"type":"object","required":["is_public"],"title":"Body_update_screenshot_api_screenshots__id__put"},"Body_update_smart_collection_api_collections_smart__id__put":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"filter_criteria":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter Criteria","description":"Updated smart collection filters as a JSON string."}},"type":"object","title":"Body_update_smart_collection_api_collections_smart__id__put"},"Body_update_state_api_states__id__put":{"properties":{"stateFile":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Statefile","description":"Updated state file content."},"screenshotFile":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Screenshotfile","description":"Updated screenshot file."}},"type":"object","title":"Body_update_state_api_states__id__put"},"Body_update_state_visibility_api_states__id__visibility_put":{"properties":{"is_public":{"type":"boolean","title":"Is Public"}},"type":"object","required":["is_public"],"title":"Body_update_state_visibility_api_states__id__visibility_put"},"BulkOperationResponse":{"properties":{"successful_items":{"type":"integer","title":"Successful Items"},"failed_ids":{"items":{"type":"integer"},"type":"array","title":"Failed Ids"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"type":"object","required":["successful_items","failed_ids","errors"],"title":"BulkOperationResponse"},"ClaimSessionRequest":{"properties":{"rom_id":{"type":"integer","minimum":1.0,"title":"Rom Id"}},"type":"object","required":["rom_id"],"title":"ClaimSessionRequest"},"CleanupTaskMeta":{"properties":{"cleanup_stats":{"anyOf":[{"$ref":"#/components/schemas/OrphanedResourcesCleanupStats"},{"$ref":"#/components/schemas/MissingRomsCleanupStats"},{"type":"null"}],"title":"Cleanup Stats"}},"type":"object","required":["cleanup_stats"],"title":"CleanupTaskMeta"},"CleanupTaskStatusResponse":{"properties":{"task_name":{"type":"string","title":"Task Name"},"task_id":{"type":"string","title":"Task Id"},"status":{"$ref":"#/components/schemas/JobStatus"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"enqueued_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enqueued At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"task_type":{"type":"string","const":"cleanup","title":"Task Type"},"meta":{"$ref":"#/components/schemas/CleanupTaskMeta"}},"type":"object","required":["task_name","task_id","status","created_at","enqueued_at","started_at","ended_at","task_type","meta"],"title":"CleanupTaskStatusResponse"},"ClientSaveState":{"properties":{"rom_id":{"type":"integer","title":"Rom Id","description":"ID of the ROM this save belongs to."},"file_name":{"type":"string","title":"File Name","description":"Name of the save file on the client."},"slot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slot","description":"Save slot name. Saves are paired between client and server on (rom_id, slot), so provide a stable slot name (e.g. 'autosave') to keep a save in sync across negotiations. A null slot is treated as an archival, manual-upload save: it is never paired with slotted server saves, so a null-slot client save always negotiates as an 'upload' even when an identical file already exists on the server under a slot."},"emulator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emulator","description":"Emulator that produced the save, if known."},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash","description":"Hash of the save contents, used to detect identical saves."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Last-modified timestamp of the save on the client."},"file_size_bytes":{"type":"integer","title":"File Size Bytes","description":"Size of the save file in bytes."}},"type":"object","required":["rom_id","file_name","updated_at","file_size_bytes"],"title":"ClientSaveState"},"ClientTokenAdminSchema":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"created_at":{"type":"string","title":"Created At"},"user_id":{"type":"integer","title":"User Id"},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"},"username":{"type":"string","title":"Username"},"user_avatar_path":{"type":"string","title":"User Avatar Path"},"user_updated_at":{"type":"string","title":"User Updated At"}},"type":"object","required":["id","name","scopes","expires_at","last_used_at","created_at","user_id","username","user_avatar_path","user_updated_at"],"title":"ClientTokenAdminSchema"},"ClientTokenCreatePayload":{"properties":{"name":{"type":"string","title":"Name"},"scopes":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Scopes"},"expires_in":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires In"}},"type":"object","required":["name","scopes"],"title":"ClientTokenCreatePayload"},"ClientTokenCreateSchema":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"created_at":{"type":"string","title":"Created At"},"user_id":{"type":"integer","title":"User Id"},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"},"raw_token":{"type":"string","title":"Raw Token"}},"type":"object","required":["id","name","scopes","expires_at","last_used_at","created_at","user_id","raw_token"],"title":"ClientTokenCreateSchema"},"ClientTokenExchangePayload":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"ClientTokenExchangePayload"},"ClientTokenPairSchema":{"properties":{"code":{"type":"string","title":"Code"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["code","expires_in"],"title":"ClientTokenPairSchema"},"ClientTokenSchema":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"created_at":{"type":"string","title":"Created At"},"user_id":{"type":"integer","title":"User Id"},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"}},"type":"object","required":["id","name","scopes","expires_at","last_used_at","created_at","user_id"],"title":"ClientTokenSchema"},"CollectionRomsPayload":{"properties":{"rom_ids":{"items":{"type":"integer"},"type":"array","title":"Rom Ids"}},"type":"object","required":["rom_ids"],"title":"CollectionRomsPayload"},"CollectionSchema":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"rom_ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Rom Ids"},"rom_count":{"type":"integer","title":"Rom Count"},"path_cover_small":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path Cover Small"},"path_cover_large":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path Cover Large"},"path_covers_small":{"items":{"type":"string"},"type":"array","title":"Path Covers Small"},"path_covers_large":{"items":{"type":"string"},"type":"array","title":"Path Covers Large"},"is_public":{"type":"boolean","title":"Is Public","default":false},"is_favorite":{"type":"boolean","title":"Is Favorite","default":false},"is_virtual":{"type":"boolean","title":"Is Virtual","default":false},"is_smart":{"type":"boolean","title":"Is Smart","default":false},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","title":"Id"},"url_cover":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url Cover"},"user_id":{"type":"integer","title":"User Id"},"owner_username":{"type":"string","title":"Owner Username"}},"type":"object","required":["name","description","rom_ids","rom_count","path_cover_small","path_cover_large","path_covers_small","path_covers_large","created_at","updated_at","id","url_cover","user_id","owner_username"],"title":"CollectionSchema"},"ConfigResponse":{"properties":{"CONFIG_FILE_MOUNTED":{"type":"boolean","title":"Config File Mounted"},"CONFIG_FILE_WRITABLE":{"type":"boolean","title":"Config File Writable"},"CONFIG_FILE_PARSE_ERROR":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config File Parse Error"},"EXCLUDED_PLATFORMS":{"items":{"type":"string"},"type":"array","title":"Excluded Platforms"},"EXCLUDED_SINGLE_EXT":{"items":{"type":"string"},"type":"array","title":"Excluded Single Ext"},"EXCLUDED_SINGLE_FILES":{"items":{"type":"string"},"type":"array","title":"Excluded Single Files"},"EXCLUDED_MULTI_FILES":{"items":{"type":"string"},"type":"array","title":"Excluded Multi Files"},"EXCLUDED_MULTI_PARTS_EXT":{"items":{"type":"string"},"type":"array","title":"Excluded Multi Parts Ext"},"EXCLUDED_MULTI_PARTS_FILES":{"items":{"type":"string"},"type":"array","title":"Excluded Multi Parts Files"},"DEFAULT_EXCLUDED_DIRS":{"items":{"type":"string"},"type":"array","title":"Default Excluded Dirs"},"DEFAULT_EXCLUDED_FILES":{"items":{"type":"string"},"type":"array","title":"Default Excluded Files"},"DEFAULT_EXCLUDED_EXTENSIONS":{"items":{"type":"string"},"type":"array","title":"Default Excluded Extensions"},"PLATFORMS_BINDING":{"additionalProperties":{"type":"string"},"type":"object","title":"Platforms Binding"},"PLATFORMS_VERSIONS":{"additionalProperties":{"type":"string"},"type":"object","title":"Platforms Versions"},"SKIP_HASH_CALCULATION":{"type":"boolean","title":"Skip Hash Calculation"},"EJS_DEBUG":{"type":"boolean","title":"Ejs Debug"},"EJS_CACHE_LIMIT":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ejs Cache Limit"},"EJS_DISABLE_AUTO_UNLOAD":{"type":"boolean","title":"Ejs Disable Auto Unload"},"EJS_DISABLE_BATCH_BOOTUP":{"type":"boolean","title":"Ejs Disable Batch Bootup"},"EJS_NETPLAY_ENABLED":{"type":"boolean","title":"Ejs Netplay Enabled"},"EJS_NETPLAY_ICE_SERVERS":{"items":{"$ref":"#/components/schemas/NetplayICEServer"},"type":"array","title":"Ejs Netplay Ice Servers"},"EJS_SETTINGS":{"additionalProperties":{"additionalProperties":{"type":"string"},"type":"object"},"type":"object","title":"Ejs Settings"},"EJS_CONTROLS":{"additionalProperties":{"$ref":"#/components/schemas/EjsControls"},"type":"object","title":"Ejs Controls"},"SCAN_METADATA_PRIORITY":{"items":{"type":"string"},"type":"array","title":"Scan Metadata Priority"},"SCAN_ARTWORK_PRIORITY":{"items":{"type":"string"},"type":"array","title":"Scan Artwork Priority"},"SCAN_ARTWORK_PRIORITY_OVERRIDES":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Scan Artwork Priority Overrides"},"SCAN_REGION_PRIORITY":{"items":{"type":"string"},"type":"array","title":"Scan Region Priority"},"SCAN_LANGUAGE_PRIORITY":{"items":{"type":"string"},"type":"array","title":"Scan Language Priority"},"SCAN_MEDIA":{"items":{"type":"string"},"type":"array","title":"Scan Media"},"GAMELIST_AUTO_EXPORT_ON_SCAN":{"type":"boolean","title":"Gamelist Auto Export On Scan"},"GAMELIST_MEDIA_THUMBNAIL":{"$ref":"#/components/schemas/MetadataMediaType"},"GAMELIST_MEDIA_IMAGE":{"$ref":"#/components/schemas/MetadataMediaType"},"PEGASUS_AUTO_EXPORT_ON_SCAN":{"type":"boolean","title":"Pegasus Auto Export On Scan"}},"type":"object","required":["CONFIG_FILE_MOUNTED","CONFIG_FILE_WRITABLE","CONFIG_FILE_PARSE_ERROR","EXCLUDED_PLATFORMS","EXCLUDED_SINGLE_EXT","EXCLUDED_SINGLE_FILES","EXCLUDED_MULTI_FILES","EXCLUDED_MULTI_PARTS_EXT","EXCLUDED_MULTI_PARTS_FILES","DEFAULT_EXCLUDED_DIRS","DEFAULT_EXCLUDED_FILES","DEFAULT_EXCLUDED_EXTENSIONS","PLATFORMS_BINDING","PLATFORMS_VERSIONS","SKIP_HASH_CALCULATION","EJS_DEBUG","EJS_CACHE_LIMIT","EJS_DISABLE_AUTO_UNLOAD","EJS_DISABLE_BATCH_BOOTUP","EJS_NETPLAY_ENABLED","EJS_NETPLAY_ICE_SERVERS","EJS_SETTINGS","EJS_CONTROLS","SCAN_METADATA_PRIORITY","SCAN_ARTWORK_PRIORITY","SCAN_ARTWORK_PRIORITY_OVERRIDES","SCAN_REGION_PRIORITY","SCAN_LANGUAGE_PRIORITY","SCAN_MEDIA","GAMELIST_AUTO_EXPORT_ON_SCAN","GAMELIST_MEDIA_THUMBNAIL","GAMELIST_MEDIA_IMAGE","PEGASUS_AUTO_EXPORT_ON_SCAN"],"title":"ConfigResponse"},"ConversionStats":{"properties":{"processed":{"type":"integer","title":"Processed"},"errors":{"type":"integer","title":"Errors"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["processed","errors","total"],"title":"ConversionStats"},"ConversionTaskMeta":{"properties":{"conversion_stats":{"anyOf":[{"$ref":"#/components/schemas/ConversionStats"},{"type":"null"}]}},"type":"object","required":["conversion_stats"],"title":"ConversionTaskMeta"},"ConversionTaskStatusResponse":{"properties":{"task_name":{"type":"string","title":"Task Name"},"task_id":{"type":"string","title":"Task Id"},"status":{"$ref":"#/components/schemas/JobStatus"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"enqueued_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enqueued At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"task_type":{"type":"string","const":"conversion","title":"Task Type"},"meta":{"$ref":"#/components/schemas/ConversionTaskMeta"}},"type":"object","required":["task_name","task_id","status","created_at","enqueued_at","started_at","ended_at","task_type","meta"],"title":"ConversionTaskStatusResponse"},"CustomLimitOffsetPage_SimpleRomSchema_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SimpleRomSchema"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"limit":{"type":"integer","minimum":1.0,"title":"Limit"},"offset":{"type":"integer","minimum":0.0,"title":"Offset"},"char_index":{"additionalProperties":{"type":"integer"},"type":"object","title":"Char Index"},"rom_id_index":{"items":{"type":"integer"},"type":"array","title":"Rom Id Index"},"filter_values":{"$ref":"#/components/schemas/RomFiltersDict"}},"type":"object","required":["items","total","limit","offset","char_index","rom_id_index","filter_values"],"title":"CustomLimitOffsetPage[SimpleRomSchema]"},"DetailedRomSchema":{"properties":{"id":{"type":"integer","title":"Id"},"igdb_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Igdb Id"},"sgdb_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sgdb Id"},"moby_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Moby Id"},"ss_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ss Id"},"ra_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ra Id"},"launchbox_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Launchbox Id"},"hasheous_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hasheous Id"},"tgdb_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tgdb Id"},"flashpoint_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flashpoint Id"},"hltb_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hltb Id"},"gamelist_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gamelist Id"},"libretro_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Libretro Id"},"platform_id":{"type":"integer","title":"Platform Id"},"platform_slug":{"type":"string","title":"Platform Slug"},"platform_fs_slug":{"type":"string","title":"Platform Fs Slug"},"platform_custom_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform Custom Name"},"platform_display_name":{"type":"string","title":"Platform Display Name"},"fs_name":{"type":"string","title":"Fs Name"},"fs_name_no_tags":{"type":"string","title":"Fs Name No Tags"},"fs_name_no_ext":{"type":"string","title":"Fs Name No Ext"},"fs_extension":{"type":"string","title":"Fs Extension"},"fs_path":{"type":"string","title":"Fs Path"},"fs_size_bytes":{"type":"integer","title":"Fs Size Bytes"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"name_sort_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Sort Key"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"alternative_names":{"items":{"type":"string"},"type":"array","title":"Alternative Names"},"youtube_video_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Youtube Video Id"},"metadatum":{"$ref":"#/components/schemas/RomMetadataSchema"},"igdb_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomIGDBMetadata"},{"type":"null"}]},"moby_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomMobyMetadata"},{"type":"null"}]},"ss_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomSSMetadata"},{"type":"null"}]},"launchbox_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomLaunchboxMetadata"},{"type":"null"}]},"hasheous_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomHasheousMetadata"},{"type":"null"}]},"flashpoint_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomFlashpointMetadata"},{"type":"null"}]},"hltb_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomHLTBMetadata"},{"type":"null"}]},"gamelist_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomGamelistMetadata"},{"type":"null"}]},"manual_metadata":{"anyOf":[{"$ref":"#/components/schemas/ManualMetadata"},{"type":"null"}]},"path_cover_small":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path Cover Small"},"path_cover_large":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path Cover Large"},"url_cover":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url Cover"},"has_manual":{"type":"boolean","title":"Has Manual"},"has_soundtrack":{"type":"boolean","title":"Has Soundtrack"},"path_manual":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path Manual"},"url_manual":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url Manual"},"path_video":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path Video"},"is_identifying":{"type":"boolean","title":"Is Identifying","default":false},"is_unidentified":{"type":"boolean","title":"Is Unidentified"},"is_identified":{"type":"boolean","title":"Is Identified"},"revision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revision"},"regions":{"items":{"type":"string"},"type":"array","title":"Regions"},"languages":{"items":{"type":"string"},"type":"array","title":"Languages"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"crc_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crc Hash"},"md5_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Md5 Hash"},"sha1_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sha1 Hash"},"ra_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ra Hash"},"has_simple_single_file":{"type":"boolean","title":"Has Simple Single File"},"has_nested_single_file":{"type":"boolean","title":"Has Nested Single File"},"has_multiple_files":{"type":"boolean","title":"Has Multiple Files"},"full_path":{"type":"string","title":"Full Path"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"missing_from_fs":{"type":"boolean","title":"Missing From Fs"},"has_notes":{"type":"boolean","title":"Has Notes"},"rom_user":{"$ref":"#/components/schemas/RomUserSchema"},"merged_screenshots":{"items":{"type":"string"},"type":"array","title":"Merged Screenshots"},"merged_ra_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomRAMetadata"},{"type":"null"}]},"files":{"items":{"$ref":"#/components/schemas/RomFileSchema"},"type":"array","title":"Files"},"sibling_roms":{"items":{"$ref":"#/components/schemas/SiblingRomSchema"},"type":"array","title":"Sibling Roms"},"user_saves":{"items":{"$ref":"#/components/schemas/SaveSchema"},"type":"array","title":"User Saves"},"user_states":{"items":{"$ref":"#/components/schemas/StateSchema"},"type":"array","title":"User States"},"all_user_saves":{"items":{"$ref":"#/components/schemas/UserSaveSchema"},"type":"array","title":"All User Saves"},"all_user_states":{"items":{"$ref":"#/components/schemas/UserStateSchema"},"type":"array","title":"All User States"},"user_screenshots":{"items":{"$ref":"#/components/schemas/ScreenshotSchema"},"type":"array","title":"User Screenshots"},"all_user_screenshots":{"items":{"$ref":"#/components/schemas/UserScreenshotSchema"},"type":"array","title":"All User Screenshots"},"user_collections":{"items":{"$ref":"#/components/schemas/UserCollectionSchema"},"type":"array","title":"User Collections"},"all_user_notes":{"items":{"$ref":"#/components/schemas/UserNoteSchema"},"type":"array","title":"All User Notes"}},"type":"object","required":["id","igdb_id","sgdb_id","moby_id","ss_id","ra_id","launchbox_id","hasheous_id","tgdb_id","flashpoint_id","hltb_id","gamelist_id","libretro_id","platform_id","platform_slug","platform_fs_slug","platform_custom_name","platform_display_name","fs_name","fs_name_no_tags","fs_name_no_ext","fs_extension","fs_path","fs_size_bytes","name","name_sort_key","slug","summary","alternative_names","youtube_video_id","metadatum","igdb_metadata","moby_metadata","ss_metadata","launchbox_metadata","hasheous_metadata","flashpoint_metadata","hltb_metadata","gamelist_metadata","manual_metadata","path_cover_small","path_cover_large","url_cover","has_manual","has_soundtrack","path_manual","url_manual","path_video","is_unidentified","is_identified","revision","regions","languages","tags","crc_hash","md5_hash","sha1_hash","ra_hash","has_simple_single_file","has_nested_single_file","has_multiple_files","full_path","created_at","updated_at","missing_from_fs","has_notes","rom_user","merged_screenshots","merged_ra_metadata","files","sibling_roms","user_saves","user_states","all_user_saves","all_user_states","user_screenshots","all_user_screenshots","user_collections","all_user_notes"],"title":"DetailedRomSchema"},"DeviceAuthApprovePayload":{"properties":{"user_code":{"type":"string","maxLength":32,"minLength":1,"title":"User Code"},"approved_scopes":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Approved Scopes"},"device_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Device Name"},"expires_in":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires In"}},"type":"object","required":["user_code","approved_scopes"],"title":"DeviceAuthApprovePayload"},"DeviceAuthApproveResponse":{"properties":{"device_id":{"type":"string","title":"Device Id"},"device_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Name"}},"type":"object","required":["device_id","device_name"],"title":"DeviceAuthApproveResponse"},"DeviceAuthDenyPayload":{"properties":{"user_code":{"type":"string","maxLength":32,"minLength":1,"title":"User Code"}},"type":"object","required":["user_code"],"title":"DeviceAuthDenyPayload"},"DeviceAuthInitPayload":{"properties":{"client_device_identifier":{"type":"string","maxLength":255,"minLength":1,"title":"Client Device Identifier"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"client":{"type":"string","maxLength":50,"minLength":1,"title":"Client"},"platform":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Platform"},"client_version":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Client Version"},"requested_scopes":{"items":{"type":"string"},"type":"array","maxItems":22,"minItems":1,"title":"Requested Scopes"}},"type":"object","required":["client_device_identifier","name","client","requested_scopes"],"title":"DeviceAuthInitPayload"},"DeviceAuthInitResponse":{"properties":{"device_code":{"type":"string","title":"Device Code"},"user_code":{"type":"string","title":"User Code"},"verification_path":{"type":"string","title":"Verification Path","description":"Relative web-UI path (/pair/device). The client joins it with the origin it was configured to reach; the server is origin-agnostic."},"verification_path_complete":{"type":"string","title":"Verification Path Complete","description":"Same path with ?user_code= appended, for QR display."},"expires_in":{"type":"integer","title":"Expires In"},"interval":{"type":"integer","title":"Interval"}},"type":"object","required":["device_code","user_code","verification_path","verification_path_complete","expires_in","interval"],"title":"DeviceAuthInitResponse"},"DeviceAuthPendingSchema":{"properties":{"client_device_identifier":{"type":"string","title":"Client Device Identifier"},"name":{"type":"string","title":"Name"},"client":{"type":"string","title":"Client"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"client_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Version"},"requested_scopes":{"items":{"type":"string"},"type":"array","title":"Requested Scopes"},"allowed_scopes":{"items":{"type":"string"},"type":"array","title":"Allowed Scopes"},"expires_at":{"type":"string","title":"Expires At"}},"type":"object","required":["client_device_identifier","name","client","platform","client_version","requested_scopes","allowed_scopes","expires_at"],"title":"DeviceAuthPendingSchema"},"DeviceAuthTokenPayload":{"properties":{"device_code":{"type":"string","maxLength":128,"minLength":1,"title":"Device Code"}},"type":"object","required":["device_code"],"title":"DeviceAuthTokenPayload"},"DeviceAuthTokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"device_id":{"type":"string","title":"Device Id"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["access_token","device_id","scopes","expires_at"],"title":"DeviceAuthTokenResponse"},"DeviceCreatePayload":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"client":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client"},"client_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Version"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"mac_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mac Address"},"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostname"},"sync_mode":{"anyOf":[{"$ref":"#/components/schemas/SyncMode"},{"type":"null"}]},"sync_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sync Config"},"allow_existing":{"type":"boolean","title":"Allow Existing","default":true},"allow_duplicate":{"type":"boolean","title":"Allow Duplicate","default":false},"reset_syncs":{"type":"boolean","title":"Reset Syncs","default":false}},"type":"object","title":"DeviceCreatePayload"},"DeviceCreateResponse":{"properties":{"device_id":{"type":"string","title":"Device Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["device_id","name","created_at"],"title":"DeviceCreateResponse"},"DeviceHeartbeatPayload":{"properties":{"rom_id":{"type":"integer","minimum":1.0,"title":"Rom Id"},"device_id":{"type":"string","maxLength":255,"minLength":1,"title":"Device Id"}},"type":"object","required":["rom_id","device_id"],"title":"DeviceHeartbeatPayload"},"DeviceSchema":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"client":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client"},"client_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Version"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"mac_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mac Address"},"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostname"},"client_device_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Device Identifier"},"sync_mode":{"$ref":"#/components/schemas/SyncMode"},"sync_enabled":{"type":"boolean","title":"Sync Enabled"},"sync_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sync Config"},"last_seen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seen"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","user_id","name","platform","client","client_version","ip_address","mac_address","hostname","client_device_identifier","sync_mode","sync_enabled","sync_config","last_seen","created_at","updated_at"],"title":"DeviceSchema"},"DeviceSyncSchema":{"properties":{"device_id":{"type":"string","title":"Device Id"},"device_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Name"},"last_synced_at":{"type":"string","title":"Last Synced At"},"is_untracked":{"type":"boolean","title":"Is Untracked"},"is_current":{"type":"boolean","title":"Is Current"}},"type":"object","required":["device_id","device_name","last_synced_at","is_untracked","is_current"],"title":"DeviceSyncSchema"},"DeviceUpdatePayload":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"client":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client"},"client_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Version"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"mac_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mac Address"},"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostname"},"sync_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Enabled"},"sync_mode":{"anyOf":[{"$ref":"#/components/schemas/SyncMode"},{"type":"null"}]},"sync_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sync Config"}},"type":"object","title":"DeviceUpdatePayload"},"EarnedAchievement":{"properties":{"id":{"type":"string","title":"Id"},"date":{"type":"string","title":"Date"},"date_hardcore":{"type":"string","title":"Date Hardcore"}},"type":"object","required":["id","date"],"title":"EarnedAchievement"},"EjsControls":{"properties":{"_0":{"additionalProperties":{"$ref":"#/components/schemas/EjsControlsButton"},"type":"object","title":"0"},"_1":{"additionalProperties":{"$ref":"#/components/schemas/EjsControlsButton"},"type":"object","title":"1"},"_2":{"additionalProperties":{"$ref":"#/components/schemas/EjsControlsButton"},"type":"object","title":"2"},"_3":{"additionalProperties":{"$ref":"#/components/schemas/EjsControlsButton"},"type":"object","title":"3"}},"type":"object","required":["_0","_1","_2","_3"],"title":"EjsControls"},"EjsControlsButton":{"properties":{"value":{"type":"string","title":"Value"},"value2":{"type":"string","title":"Value2"}},"type":"object","title":"EjsControlsButton"},"EmulationDict":{"properties":{"DISABLE_EMULATOR_JS":{"type":"boolean","title":"Disable Emulator Js"},"DISABLE_RUFFLE_RS":{"type":"boolean","title":"Disable Ruffle Rs"}},"type":"object","required":["DISABLE_EMULATOR_JS","DISABLE_RUFFLE_RS"],"title":"EmulationDict"},"ExclusionPayload":{"properties":{"exclusion_value":{"type":"string","title":"Exclusion Value"},"exclusion_type":{"type":"string","title":"Exclusion Type"}},"type":"object","required":["exclusion_value","exclusion_type"],"title":"ExclusionPayload"},"FacetValueSchema":{"properties":{"value":{"anyOf":[{"type":"string"},{"type":"integer"}],"title":"Value"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["value","count"],"title":"FacetValueSchema","description":"A distinct value of a track field plus how many tracks carry it."},"FilesystemDict":{"properties":{"FS_PLATFORMS":{"items":{"type":"string"},"type":"array","title":"Fs Platforms"}},"type":"object","required":["FS_PLATFORMS"],"title":"FilesystemDict"},"FirmwareSchema":{"properties":{"id":{"type":"integer","title":"Id"},"file_name":{"type":"string","title":"File Name"},"file_name_no_tags":{"type":"string","title":"File Name No Tags"},"file_name_no_ext":{"type":"string","title":"File Name No Ext"},"file_extension":{"type":"string","title":"File Extension"},"file_path":{"type":"string","title":"File Path"},"file_size_bytes":{"type":"integer","title":"File Size Bytes"},"full_path":{"type":"string","title":"Full Path"},"is_verified":{"type":"boolean","title":"Is Verified"},"crc_hash":{"type":"string","title":"Crc Hash"},"md5_hash":{"type":"string","title":"Md5 Hash"},"sha1_hash":{"type":"string","title":"Sha1 Hash"},"missing_from_fs":{"type":"boolean","title":"Missing From Fs"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","file_name","file_name_no_tags","file_name_no_ext","file_extension","file_path","file_size_bytes","full_path","is_verified","crc_hash","md5_hash","sha1_hash","missing_from_fs","created_at","updated_at"],"title":"FirmwareSchema"},"FrontendDict":{"properties":{"DISABLE_USERPASS_LOGIN":{"type":"boolean","title":"Disable Userpass Login"},"DISABLE_LOGS_VIEWER":{"type":"boolean","title":"Disable Logs Viewer"},"YOUTUBE_BASE_URL":{"type":"string","title":"Youtube Base Url"}},"type":"object","required":["DISABLE_USERPASS_LOGIN","DISABLE_LOGS_VIEWER","YOUTUBE_BASE_URL"],"title":"FrontendDict"},"GenericTaskMeta":{"properties":{},"type":"object","title":"GenericTaskMeta"},"GenericTaskStatusResponse":{"properties":{"task_name":{"type":"string","title":"Task Name"},"task_id":{"type":"string","title":"Task Id"},"status":{"$ref":"#/components/schemas/JobStatus"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"enqueued_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enqueued At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"task_type":{"type":"string","const":"generic","title":"Task Type"},"meta":{"$ref":"#/components/schemas/GenericTaskMeta"}},"type":"object","required":["task_name","task_id","status","created_at","enqueued_at","started_at","ended_at","task_type","meta"],"title":"GenericTaskStatusResponse"},"GrantSchema":{"properties":{"action":{"$ref":"#/components/schemas/ActionKey"},"scope":{"$ref":"#/components/schemas/PermissionScopeSchema"}},"type":"object","required":["action","scope"],"title":"GrantSchema"},"GrantSchemaIO":{"properties":{"entity":{"$ref":"#/components/schemas/PermEntity"},"action":{"$ref":"#/components/schemas/PermAction"},"own_only":{"type":"boolean","title":"Own Only","default":false}},"type":"object","required":["entity","action"],"title":"GrantSchemaIO","description":"A single (entity, action) grant on a group, with the own-only flag."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HeartbeatResponse":{"properties":{"SYSTEM":{"$ref":"#/components/schemas/SystemDict"},"METADATA_SOURCES":{"$ref":"#/components/schemas/MetadataSourcesDict"},"FILESYSTEM":{"$ref":"#/components/schemas/FilesystemDict"},"EMULATION":{"$ref":"#/components/schemas/EmulationDict"},"FRONTEND":{"$ref":"#/components/schemas/FrontendDict"},"OIDC":{"$ref":"#/components/schemas/OIDCDict"},"TASKS":{"$ref":"#/components/schemas/TasksDict"}},"type":"object","required":["SYSTEM","METADATA_SOURCES","FILESYSTEM","EMULATION","FRONTEND","OIDC","TASKS"],"title":"HeartbeatResponse"},"HiddenEntitiesSchema":{"properties":{"platforms":{"items":{"type":"integer"},"type":"array","title":"Platforms"},"roms":{"items":{"type":"integer"},"type":"array","title":"Roms"}},"type":"object","required":["platforms","roms"],"title":"HiddenEntitiesSchema"},"HiddenEntityCreate":{"properties":{"entity":{"$ref":"#/components/schemas/PermEntity"},"entity_id":{"type":"integer","title":"Entity Id"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group Id"}},"type":"object","required":["entity","entity_id"],"title":"HiddenEntityCreate"},"HiddenEntitySchema":{"properties":{"entity":{"$ref":"#/components/schemas/PermEntity"},"entity_id":{"type":"integer","title":"Entity Id"}},"type":"object","required":["entity","entity_id"],"title":"HiddenEntitySchema"},"IGDBAgeRating":{"properties":{"rating":{"type":"string","title":"Rating"},"category":{"type":"string","title":"Category"},"rating_cover_url":{"type":"string","title":"Rating Cover Url"}},"type":"object","required":["rating","category","rating_cover_url"],"title":"IGDBAgeRating"},"IGDBMetadataMultiplayerMode":{"properties":{"campaigncoop":{"type":"boolean","title":"Campaigncoop"},"dropin":{"type":"boolean","title":"Dropin"},"lancoop":{"type":"boolean","title":"Lancoop"},"offlinecoop":{"type":"boolean","title":"Offlinecoop"},"offlinecoopmax":{"type":"integer","title":"Offlinecoopmax"},"offlinemax":{"type":"integer","title":"Offlinemax"},"onlinecoop":{"type":"integer","title":"Onlinecoop"},"onlinecoopmax":{"type":"integer","title":"Onlinecoopmax"},"onlinemax":{"type":"integer","title":"Onlinemax"},"splitscreen":{"type":"boolean","title":"Splitscreen"},"splitscreenonline":{"type":"boolean","title":"Splitscreenonline"},"platform":{"$ref":"#/components/schemas/IGDBMetadataPlatform"}},"type":"object","required":["campaigncoop","dropin","lancoop","offlinecoop","offlinecoopmax","offlinemax","onlinecoop","onlinecoopmax","onlinemax","splitscreen","splitscreenonline","platform"],"title":"IGDBMetadataMultiplayerMode"},"IGDBMetadataPlatform":{"properties":{"igdb_id":{"type":"integer","title":"Igdb Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["igdb_id","name"],"title":"IGDBMetadataPlatform"},"IGDBRelatedGame":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"type":{"type":"string","title":"Type"},"cover_url":{"type":"string","title":"Cover Url"}},"type":"object","required":["id","name","slug","type","cover_url"],"title":"IGDBRelatedGame"},"InviteLinkSchema":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"InviteLinkSchema"},"JobStatus":{"type":"string","enum":["created","queued","finished","failed","started","deferred","scheduled","stopped","canceled"],"title":"JobStatus","description":"The Status of Job within its lifecycle at any given time."},"LaunchboxImage":{"properties":{"url":{"type":"string","title":"Url"},"type":{"type":"string","title":"Type"},"region":{"type":"string","title":"Region"}},"type":"object","required":["url"],"title":"LaunchboxImage"},"LoadStateRequest":{"properties":{"slot":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Slot","default":1}},"type":"object","title":"LoadStateRequest"},"LogEntrySchema":{"properties":{"ts":{"type":"integer","title":"Ts"},"level":{"type":"string","title":"Level"},"module":{"type":"string","title":"Module"},"message":{"type":"string","title":"Message"}},"type":"object","required":["ts","level","module","message"],"title":"LogEntrySchema","description":"A single backend log line streamed to the admin log viewer."},"ManualMetadata":{"properties":{"genres":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Genres"},"franchises":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Franchises"},"companies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Companies"},"game_modes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Game Modes"},"age_ratings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Age Ratings"},"first_release_date":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Release Date"},"youtube_video_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Youtube Video Id"}},"type":"object","title":"ManualMetadata"},"MetadataCoverageItem":{"properties":{"source":{"type":"string","title":"Source"},"matched":{"type":"integer","title":"Matched"}},"type":"object","required":["source","matched"],"title":"MetadataCoverageItem"},"MetadataMediaType":{"type":"string","enum":["bezel","box2d","box2d_back","box2d_side","box3d","miximage","miximage_v2","physical","screenshot","title_screen","marquee","logo","fanart","video","video_normalized","manual"],"title":"MetadataMediaType"},"MetadataSourcesDict":{"properties":{"ANY_SOURCE_ENABLED":{"type":"boolean","title":"Any Source Enabled"},"IGDB_API_ENABLED":{"type":"boolean","title":"Igdb Api Enabled"},"SS_API_ENABLED":{"type":"boolean","title":"Ss Api Enabled"},"MOBY_API_ENABLED":{"type":"boolean","title":"Moby Api Enabled"},"STEAMGRIDDB_API_ENABLED":{"type":"boolean","title":"Steamgriddb Api Enabled"},"RA_API_ENABLED":{"type":"boolean","title":"Ra Api Enabled"},"LAUNCHBOX_API_ENABLED":{"type":"boolean","title":"Launchbox Api Enabled"},"HASHEOUS_API_ENABLED":{"type":"boolean","title":"Hasheous Api Enabled"},"PLAYMATCH_API_ENABLED":{"type":"boolean","title":"Playmatch Api Enabled"},"TGDB_API_ENABLED":{"type":"boolean","title":"Tgdb Api Enabled"},"FLASHPOINT_API_ENABLED":{"type":"boolean","title":"Flashpoint Api Enabled"},"HLTB_API_ENABLED":{"type":"boolean","title":"Hltb Api Enabled"},"LIBRETRO_API_ENABLED":{"type":"boolean","title":"Libretro Api Enabled"}},"type":"object","required":["ANY_SOURCE_ENABLED","IGDB_API_ENABLED","SS_API_ENABLED","MOBY_API_ENABLED","STEAMGRIDDB_API_ENABLED","RA_API_ENABLED","LAUNCHBOX_API_ENABLED","HASHEOUS_API_ENABLED","PLAYMATCH_API_ENABLED","TGDB_API_ENABLED","FLASHPOINT_API_ENABLED","HLTB_API_ENABLED","LIBRETRO_API_ENABLED"],"title":"MetadataSourcesDict"},"MissingRomsCleanupStats":{"properties":{"platform_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Platform Id"},"roms_found":{"type":"integer","title":"Roms Found"},"roms_deleted":{"type":"integer","title":"Roms Deleted"},"errors":{"type":"integer","title":"Errors"}},"type":"object","required":["platform_id","roms_found","roms_deleted","errors"],"title":"MissingRomsCleanupStats"},"MobyMetadataPlatform":{"properties":{"moby_id":{"type":"integer","title":"Moby Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["moby_id","name"],"title":"MobyMetadataPlatform"},"MusicPage_FacetValueSchema_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FacetValueSchema"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"limit":{"type":"integer","minimum":1.0,"title":"Limit"},"offset":{"type":"integer","minimum":0.0,"title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"MusicPage[FacetValueSchema]"},"MusicPage_MusicTrackSchema_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MusicTrackSchema"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"limit":{"type":"integer","minimum":1.0,"title":"Limit"},"offset":{"type":"integer","minimum":0.0,"title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"MusicPage[MusicTrackSchema]"},"MusicPlaylistCreateRequest":{"properties":{"name":{"type":"string","maxLength":400,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":65535},{"type":"null"}],"title":"Description"},"is_public":{"type":"boolean","title":"Is Public","default":false}},"type":"object","required":["name"],"title":"MusicPlaylistCreateRequest"},"MusicPlaylistSchema":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_public":{"type":"boolean","title":"Is Public","default":false},"user_id":{"type":"integer","title":"User Id"},"owner_username":{"type":"string","title":"Owner Username"},"track_count":{"type":"integer","title":"Track Count","default":0},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","user_id","owner_username","created_at","updated_at"],"title":"MusicPlaylistSchema"},"MusicPlaylistUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":400,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":65535},{"type":"null"}],"title":"Description"},"is_public":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Public"}},"type":"object","title":"MusicPlaylistUpdateRequest"},"MusicTrackIdsPayload":{"properties":{"rom_file_ids":{"items":{"type":"integer"},"type":"array","title":"Rom File Ids"}},"type":"object","required":["rom_file_ids"],"title":"MusicTrackIdsPayload"},"MusicTrackSchema":{"properties":{"rom_file_id":{"type":"integer","title":"Rom File Id"},"rom_id":{"type":"integer","title":"Rom Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"artist":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artist"},"album":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Album"},"genre":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Genre"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"},"track":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Track"},"disc":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Disc"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"has_embedded_cover":{"type":"boolean","title":"Has Embedded Cover","default":false},"is_favorite":{"type":"boolean","title":"Is Favorite","default":false},"game_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Name"},"platform_id":{"type":"integer","title":"Platform Id"},"platform_slug":{"type":"string","title":"Platform Slug"},"platform_name":{"type":"string","title":"Platform Name"},"stream_url":{"type":"string","title":"Stream Url"},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Url"}},"type":"object","required":["rom_file_id","rom_id","platform_id","platform_slug","platform_name","stream_url"],"title":"MusicTrackSchema"},"MuteRequest":{"properties":{"mute":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Mute"}},"type":"object","title":"MuteRequest"},"NetplayICEServer":{"properties":{"urls":{"type":"string","title":"Urls"},"username":{"type":"string","title":"Username"},"credential":{"type":"string","title":"Credential"}},"type":"object","required":["urls"],"title":"NetplayICEServer"},"OIDCDict":{"properties":{"ENABLED":{"type":"boolean","title":"Enabled"},"AUTOLOGIN":{"type":"boolean","title":"Autologin"},"PROVIDER":{"type":"string","title":"Provider"},"RP_INITIATED_LOGOUT":{"type":"boolean","title":"Rp Initiated Logout"}},"type":"object","required":["ENABLED","AUTOLOGIN","PROVIDER","RP_INITIATED_LOGOUT"],"title":"OIDCDict"},"OIDCLogoutResponse":{"properties":{"oidc_logout_url":{"type":"string","title":"Oidc Logout Url"}},"type":"object","required":["oidc_logout_url"],"title":"OIDCLogoutResponse"},"OrphanedResourcesCleanupStats":{"properties":{"platforms_in_db":{"type":"integer","title":"Platforms In Db"},"roms_in_db":{"type":"integer","title":"Roms In Db"},"platforms_in_fs":{"type":"integer","title":"Platforms In Fs"},"roms_in_fs":{"type":"integer","title":"Roms In Fs"},"removed_fs_platforms":{"type":"integer","title":"Removed Fs Platforms"},"removed_fs_roms":{"type":"integer","title":"Removed Fs Roms"}},"type":"object","required":["platforms_in_db","roms_in_db","platforms_in_fs","roms_in_fs","removed_fs_platforms","removed_fs_roms"],"title":"OrphanedResourcesCleanupStats"},"OverrideSchemaIO":{"properties":{"entity":{"$ref":"#/components/schemas/PermEntity"},"action":{"$ref":"#/components/schemas/PermAction"},"granted":{"type":"boolean","title":"Granted"},"own_only":{"type":"boolean","title":"Own Only","default":false}},"type":"object","required":["entity","action","granted"],"title":"OverrideSchemaIO"},"PermAction":{"type":"string","enum":["read","write","delete"],"title":"PermAction"},"PermEntity":{"type":"string","enum":["platforms","roms","collections","playlists","firmware","assets","devices","users","tasks","logs"],"title":"PermEntity","description":"Entity-type vocabulary for granular permissions.\n\nMirrors the coarse scope domains (see ``handler/auth/constants.py``) so the\ngrant matrix can be projected back onto the legacy ``Scope`` set without\ndrift (see ``handler/auth/permissions_map.py``)."},"PermissionCatalogSchema":{"properties":{"entities":{"items":{"$ref":"#/components/schemas/PermEntity"},"type":"array","title":"Entities"},"actions":{"items":{"$ref":"#/components/schemas/PermAction"},"type":"array","title":"Actions"}},"type":"object","required":["entities","actions"],"title":"PermissionCatalogSchema","description":"The vocabulary the admin UI renders the group/override matrix from."},"PermissionGroupCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"is_default":{"type":"boolean","title":"Is Default","default":false},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"grants":{"items":{"$ref":"#/components/schemas/GrantSchemaIO"},"type":"array","title":"Grants","default":[]}},"type":"object","required":["name"],"title":"PermissionGroupCreate"},"PermissionGroupSchema":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"is_default":{"type":"boolean","title":"Is Default"},"is_system":{"type":"boolean","title":"Is System"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"grants":{"items":{"$ref":"#/components/schemas/GrantSchemaIO"},"type":"array","title":"Grants"},"member_count":{"type":"integer","title":"Member Count"},"hidden":{"items":{"$ref":"#/components/schemas/HiddenEntitySchema"},"type":"array","title":"Hidden","default":[]}},"type":"object","required":["id","name","description","is_default","is_system","color","grants","member_count"],"title":"PermissionGroupSchema"},"PermissionGroupUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"grants":{"anyOf":[{"items":{"$ref":"#/components/schemas/GrantSchemaIO"},"type":"array"},{"type":"null"}],"title":"Grants"}},"type":"object","title":"PermissionGroupUpdate"},"PermissionScopeSchema":{"properties":{"kind":{"type":"string","enum":["global","platform","collection","rom"],"title":"Kind","default":"global"},"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"}},"type":"object","title":"PermissionScopeSchema"},"PermissionsResponse":{"properties":{"is_admin":{"type":"boolean","title":"Is Admin"},"grants":{"items":{"$ref":"#/components/schemas/GrantSchema"},"type":"array","title":"Grants"},"hidden":{"$ref":"#/components/schemas/HiddenEntitiesSchema"}},"type":"object","required":["is_admin","grants","hidden"],"title":"PermissionsResponse"},"PlatformBindingPayload":{"properties":{"fs_slug":{"type":"string","title":"Fs Slug"},"slug":{"type":"string","title":"Slug"}},"type":"object","required":["fs_slug","slug"],"title":"PlatformBindingPayload"},"PlatformSchema":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"fs_slug":{"type":"string","title":"Fs Slug"},"rom_count":{"type":"integer","title":"Rom Count"},"name":{"type":"string","title":"Name"},"igdb_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Igdb Slug"},"moby_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Moby Slug"},"hltb_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hltb Slug"},"libretro_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Libretro Slug"},"custom_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"igdb_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Igdb Id"},"sgdb_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sgdb Id"},"moby_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Moby Id"},"launchbox_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Launchbox Id"},"ss_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ss Id"},"ra_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ra Id"},"hasheous_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hasheous Id"},"tgdb_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tgdb Id"},"flashpoint_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Flashpoint Id"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"generation":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Generation"},"family_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Family Name"},"family_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Family Slug"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"url_logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url Logo"},"firmware":{"items":{"$ref":"#/components/schemas/FirmwareSchema"},"type":"array","title":"Firmware"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"fs_size_bytes":{"type":"integer","title":"Fs Size Bytes"},"is_unidentified":{"type":"boolean","title":"Is Unidentified"},"is_identified":{"type":"boolean","title":"Is Identified"},"missing_from_fs":{"type":"boolean","title":"Missing From Fs"},"display_name":{"type":"string","title":"Display Name","readOnly":true},"firmware_count":{"type":"integer","title":"Firmware Count","readOnly":true}},"type":"object","required":["id","slug","fs_slug","rom_count","name","igdb_slug","moby_slug","hltb_slug","libretro_slug","created_at","updated_at","fs_size_bytes","is_unidentified","is_identified","missing_from_fs","display_name","firmware_count"],"title":"PlatformSchema"},"PlaySessionEntry":{"properties":{"rom_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rom Id"},"save_slot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Save Slot"},"start_time":{"type":"string","format":"date-time","title":"Start Time"},"end_time":{"type":"string","format":"date-time","title":"End Time"},"duration_ms":{"type":"integer","minimum":0.0,"title":"Duration Ms"}},"type":"object","required":["start_time","end_time","duration_ms"],"title":"PlaySessionEntry"},"PlaySessionIngestPayload":{"properties":{"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"},"sessions":{"items":{"$ref":"#/components/schemas/PlaySessionEntry"},"type":"array","title":"Sessions"}},"type":"object","required":["sessions"],"title":"PlaySessionIngestPayload"},"PlaySessionIngestResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/PlaySessionIngestResult"},"type":"array","title":"Results"},"created_count":{"type":"integer","title":"Created Count"},"skipped_count":{"type":"integer","title":"Skipped Count"}},"type":"object","required":["results","created_count","skipped_count"],"title":"PlaySessionIngestResponse"},"PlaySessionIngestResult":{"properties":{"index":{"type":"integer","title":"Index"},"status":{"type":"string","enum":["created","duplicate","error"],"title":"Status"},"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["index","status"],"title":"PlaySessionIngestResult"},"PlaySessionSchema":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"},"rom_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rom Id"},"sync_session_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sync Session Id"},"save_slot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Save Slot"},"start_time":{"type":"string","format":"date-time","title":"Start Time"},"end_time":{"type":"string","format":"date-time","title":"End Time"},"duration_ms":{"type":"integer","title":"Duration Ms"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","user_id","device_id","rom_id","sync_session_id","save_slot","start_time","end_time","duration_ms","created_at","updated_at"],"title":"PlaySessionSchema"},"RAGameRomAchievement":{"properties":{"ra_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ra Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"points":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Points"},"num_awarded":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Awarded"},"num_awarded_hardcore":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Awarded Hardcore"},"badge_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badge Id"},"badge_url_lock":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badge Url Lock"},"badge_path_lock":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badge Path Lock"},"badge_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badge Url"},"badge_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badge Path"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","required":["ra_id","title","description","points","num_awarded","num_awarded_hardcore","badge_id","badge_url_lock","badge_path_lock","badge_url","badge_path","display_order","type"],"title":"RAGameRomAchievement"},"RAProgression":{"properties":{"total":{"type":"integer","title":"Total"},"results":{"items":{"$ref":"#/components/schemas/RAUserGameProgression"},"type":"array","title":"Results"}},"type":"object","title":"RAProgression"},"RAUserGameProgression":{"properties":{"rom_ra_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rom Ra Id"},"max_possible":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Possible"},"num_awarded":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Awarded"},"num_awarded_hardcore":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Awarded Hardcore"},"most_recent_awarded_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Most Recent Awarded Date"},"highest_award_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Highest Award Kind"},"earned_achievements":{"items":{"$ref":"#/components/schemas/EarnedAchievement"},"type":"array","title":"Earned Achievements"}},"type":"object","required":["rom_ra_id","max_possible","num_awarded","num_awarded_hardcore","earned_achievements"],"title":"RAUserGameProgression"},"RegionBreakdownItem":{"properties":{"region":{"type":"string","title":"Region"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["region","count"],"title":"RegionBreakdownItem"},"Role":{"type":"string","enum":["user","admin"],"title":"Role"},"RomArchiveMember":{"properties":{"name":{"type":"string","title":"Name"},"size":{"type":"integer","title":"Size"},"crc_hash":{"type":"string","title":"Crc Hash"},"md5_hash":{"type":"string","title":"Md5 Hash"},"sha1_hash":{"type":"string","title":"Sha1 Hash"}},"type":"object","required":["name","size","crc_hash","md5_hash","sha1_hash"],"title":"RomArchiveMember"},"RomFileCategory":{"type":"string","enum":["game","dlc","hack","manual","patch","update","mod","demo","translation","prototype","cheat","soundtrack","screenshot"],"title":"RomFileCategory"},"RomFileSchema":{"properties":{"id":{"type":"integer","title":"Id"},"rom_id":{"type":"integer","title":"Rom Id"},"file_name":{"type":"string","title":"File Name"},"file_path":{"type":"string","title":"File Path"},"file_size_bytes":{"type":"integer","title":"File Size Bytes"},"full_path":{"type":"string","title":"Full Path"},"is_top_level":{"type":"boolean","title":"Is Top Level"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"last_modified":{"type":"string","title":"Last Modified"},"crc_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crc Hash"},"md5_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Md5 Hash"},"sha1_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sha1 Hash"},"ra_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ra Hash"},"chd_sha1_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chd Sha1 Hash"},"archive_members":{"anyOf":[{"items":{"$ref":"#/components/schemas/RomArchiveMember"},"type":"array"},{"type":"null"}],"title":"Archive Members"},"category":{"anyOf":[{"$ref":"#/components/schemas/RomFileCategory"},{"type":"null"}]},"track_meta":{"anyOf":[{"$ref":"#/components/schemas/TrackMetaSchema"},{"type":"null"}]}},"type":"object","required":["id","rom_id","file_name","file_path","file_size_bytes","full_path","is_top_level","created_at","updated_at","last_modified","crc_hash","md5_hash","sha1_hash","ra_hash","chd_sha1_hash","archive_members","category"],"title":"RomFileSchema"},"RomFiltersDict":{"properties":{"genres":{"items":{"type":"string"},"type":"array","title":"Genres"},"franchises":{"items":{"type":"string"},"type":"array","title":"Franchises"},"collections":{"items":{"type":"string"},"type":"array","title":"Collections"},"companies":{"items":{"type":"string"},"type":"array","title":"Companies"},"game_modes":{"items":{"type":"string"},"type":"array","title":"Game Modes"},"age_ratings":{"items":{"type":"string"},"type":"array","title":"Age Ratings"},"player_counts":{"items":{"type":"string"},"type":"array","title":"Player Counts"},"regions":{"items":{"type":"string"},"type":"array","title":"Regions"},"languages":{"items":{"type":"string"},"type":"array","title":"Languages"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"platforms":{"items":{"type":"integer"},"type":"array","title":"Platforms"}},"type":"object","required":["genres","franchises","collections","companies","game_modes","age_ratings","player_counts","regions","languages","tags","platforms"],"title":"RomFiltersDict"},"RomFlashpointMetadata":{"properties":{"franchises":{"items":{"type":"string"},"type":"array","title":"Franchises"},"companies":{"items":{"type":"string"},"type":"array","title":"Companies"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"genres":{"items":{"type":"string"},"type":"array","title":"Genres"},"first_release_date":{"type":"string","title":"First Release Date"},"game_modes":{"items":{"type":"string"},"type":"array","title":"Game Modes"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"RomFlashpointMetadata"},"RomGamelistMetadata":{"properties":{"box2d_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Box2D Url"},"box2d_back_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Box2D Back Url"},"box3d_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Box3D Url"},"fanart_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fanart Url"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"manual_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manual Url"},"marquee_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marquee Url"},"miximage_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Miximage Url"},"miximage_v2_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Miximage V2 Url"},"physical_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Physical Url"},"screenshot_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screenshot Url"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"title_screen_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title Screen Url"},"video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Url"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating"},"first_release_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Release Date"},"sort_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort Name"},"companies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Companies"},"franchises":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Franchises"},"genres":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Genres"},"player_count":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Player Count"},"md5_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Md5 Hash"},"box3d_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Box3D Path"},"miximage_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Miximage Path"},"miximage_v2_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Miximage V2 Path"},"physical_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Physical Path"},"marquee_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marquee Path"},"video_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Path"}},"type":"object","title":"RomGamelistMetadata"},"RomHLTBMetadata":{"properties":{"main_story":{"type":"integer","title":"Main Story"},"main_story_count":{"type":"integer","title":"Main Story Count"},"main_plus_extra":{"type":"integer","title":"Main Plus Extra"},"main_plus_extra_count":{"type":"integer","title":"Main Plus Extra Count"},"completionist":{"type":"integer","title":"Completionist"},"completionist_count":{"type":"integer","title":"Completionist Count"},"all_styles":{"type":"integer","title":"All Styles"},"all_styles_count":{"type":"integer","title":"All Styles Count"},"release_year":{"type":"integer","title":"Release Year"},"review_score":{"type":"integer","title":"Review Score"},"review_count":{"type":"integer","title":"Review Count"},"popularity":{"type":"integer","title":"Popularity"},"completions":{"type":"integer","title":"Completions"}},"type":"object","title":"RomHLTBMetadata"},"RomHasheousMetadata":{"properties":{"tosec_match":{"type":"boolean","title":"Tosec Match"},"mame_arcade_match":{"type":"boolean","title":"Mame Arcade Match"},"mame_mess_match":{"type":"boolean","title":"Mame Mess Match"},"nointro_match":{"type":"boolean","title":"Nointro Match"},"redump_match":{"type":"boolean","title":"Redump Match"},"whdload_match":{"type":"boolean","title":"Whdload Match"},"ra_match":{"type":"boolean","title":"Ra Match"},"fbneo_match":{"type":"boolean","title":"Fbneo Match"},"puredos_match":{"type":"boolean","title":"Puredos Match"}},"type":"object","title":"RomHasheousMetadata"},"RomIGDBMetadata":{"properties":{"total_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Total Rating"},"aggregated_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aggregated Rating"},"first_release_date":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Release Date"},"youtube_video_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Youtube Video Id"},"genres":{"items":{"type":"string"},"type":"array","title":"Genres"},"franchises":{"items":{"type":"string"},"type":"array","title":"Franchises"},"alternative_names":{"items":{"type":"string"},"type":"array","title":"Alternative Names"},"collections":{"items":{"type":"string"},"type":"array","title":"Collections"},"companies":{"items":{"type":"string"},"type":"array","title":"Companies"},"game_modes":{"items":{"type":"string"},"type":"array","title":"Game Modes"},"age_ratings":{"items":{"$ref":"#/components/schemas/IGDBAgeRating"},"type":"array","title":"Age Ratings"},"platforms":{"items":{"$ref":"#/components/schemas/IGDBMetadataPlatform"},"type":"array","title":"Platforms"},"multiplayer_modes":{"items":{"$ref":"#/components/schemas/IGDBMetadataMultiplayerMode"},"type":"array","title":"Multiplayer Modes"},"player_count":{"type":"string","title":"Player Count"},"expansions":{"items":{"$ref":"#/components/schemas/IGDBRelatedGame"},"type":"array","title":"Expansions"},"dlcs":{"items":{"$ref":"#/components/schemas/IGDBRelatedGame"},"type":"array","title":"Dlcs"},"remasters":{"items":{"$ref":"#/components/schemas/IGDBRelatedGame"},"type":"array","title":"Remasters"},"remakes":{"items":{"$ref":"#/components/schemas/IGDBRelatedGame"},"type":"array","title":"Remakes"},"expanded_games":{"items":{"$ref":"#/components/schemas/IGDBRelatedGame"},"type":"array","title":"Expanded Games"},"ports":{"items":{"$ref":"#/components/schemas/IGDBRelatedGame"},"type":"array","title":"Ports"},"similar_games":{"items":{"$ref":"#/components/schemas/IGDBRelatedGame"},"type":"array","title":"Similar Games"}},"type":"object","title":"RomIGDBMetadata"},"RomLaunchboxMetadata":{"properties":{"first_release_date":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Release Date"},"max_players":{"type":"integer","title":"Max Players"},"release_type":{"type":"string","title":"Release Type"},"cooperative":{"type":"boolean","title":"Cooperative"},"youtube_video_id":{"type":"string","title":"Youtube Video Id"},"community_rating":{"type":"number","title":"Community Rating"},"community_rating_count":{"type":"integer","title":"Community Rating Count"},"wikipedia_url":{"type":"string","title":"Wikipedia Url"},"esrb":{"type":"string","title":"Esrb"},"genres":{"items":{"type":"string"},"type":"array","title":"Genres"},"companies":{"items":{"type":"string"},"type":"array","title":"Companies"},"images":{"items":{"$ref":"#/components/schemas/LaunchboxImage"},"type":"array","title":"Images"},"video_url":{"type":"string","title":"Video Url"},"video_path":{"type":"string","title":"Video Path"}},"type":"object","title":"RomLaunchboxMetadata"},"RomMetadataSchema":{"properties":{"rom_id":{"type":"integer","title":"Rom Id"},"genres":{"items":{"type":"string"},"type":"array","title":"Genres"},"franchises":{"items":{"type":"string"},"type":"array","title":"Franchises"},"collections":{"items":{"type":"string"},"type":"array","title":"Collections"},"companies":{"items":{"type":"string"},"type":"array","title":"Companies"},"game_modes":{"items":{"type":"string"},"type":"array","title":"Game Modes"},"age_ratings":{"items":{"type":"string"},"type":"array","title":"Age Ratings"},"player_count":{"type":"string","title":"Player Count"},"first_release_date":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Release Date"},"average_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Rating"}},"type":"object","required":["rom_id","genres","franchises","collections","companies","game_modes","age_ratings","player_count","first_release_date","average_rating"],"title":"RomMetadataSchema"},"RomMobyMetadata":{"properties":{"moby_score":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Moby Score"},"genres":{"items":{"type":"string"},"type":"array","title":"Genres"},"alternate_titles":{"items":{"type":"string"},"type":"array","title":"Alternate Titles"},"platforms":{"items":{"$ref":"#/components/schemas/MobyMetadataPlatform"},"type":"array","title":"Platforms"}},"type":"object","title":"RomMobyMetadata"},"RomRAMetadata":{"properties":{"first_release_date":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Release Date"},"genres":{"items":{"type":"string"},"type":"array","title":"Genres"},"companies":{"items":{"type":"string"},"type":"array","title":"Companies"},"achievements":{"items":{"$ref":"#/components/schemas/RAGameRomAchievement"},"type":"array","title":"Achievements"}},"type":"object","title":"RomRAMetadata"},"RomSSMetadata":{"properties":{"bezel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bezel Url"},"box2d_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Box2D Url"},"box2d_side_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Box2D Side Url"},"box2d_back_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Box2D Back Url"},"box3d_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Box3D Url"},"fanart_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fanart Url"},"fullbox_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fullbox Url"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"manual_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manual Url"},"marquee_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marquee Url"},"miximage_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Miximage Url"},"miximage_v2_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Miximage V2 Url"},"physical_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Physical Url"},"screenshot_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screenshot Url"},"steamgrid_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Steamgrid Url"},"title_screen_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title Screen Url"},"video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Url"},"video_normalized_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Normalized Url"},"bezel_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bezel Path"},"box2d_back_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Box2D Back Path"},"box2d_side_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Box2D Side Path"},"box3d_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Box3D Path"},"fanart_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fanart Path"},"miximage_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Miximage Path"},"miximage_v2_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Miximage V2 Path"},"physical_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Physical Path"},"marquee_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marquee Path"},"logo_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Path"},"title_screen_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title Screen Path"},"video_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Path"},"video_normalized_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Normalized Path"},"ss_score":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ss Score"},"first_release_date":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Release Date"},"alternative_names":{"items":{"type":"string"},"type":"array","title":"Alternative Names"},"age_ratings":{"items":{"$ref":"#/components/schemas/SSAgeRating"},"type":"array","title":"Age Ratings"},"companies":{"items":{"type":"string"},"type":"array","title":"Companies"},"franchises":{"items":{"type":"string"},"type":"array","title":"Franchises"},"game_modes":{"items":{"type":"string"},"type":"array","title":"Game Modes"},"genres":{"items":{"type":"string"},"type":"array","title":"Genres"},"player_count":{"type":"string","title":"Player Count"}},"type":"object","title":"RomSSMetadata"},"RomUserData":{"properties":{"is_main_sibling":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Main Sibling","description":"Whether this rom is the main sibling."},"backlogged":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Backlogged","description":"Whether this rom is in the backlog."},"now_playing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Now Playing","description":"Whether this rom is currently being played."},"hidden":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hidden","description":"Whether this rom is hidden."},"rating":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":0.0},{"type":"null"}],"title":"Rating","description":"User rating for this rom (0-10)."},"difficulty":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":0.0},{"type":"null"}],"title":"Difficulty","description":"User difficulty rating for this rom (0-10)."},"completion":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Completion","description":"User completion percentage for this rom (0-100)."},"status":{"anyOf":[{"$ref":"#/components/schemas/RomUserStatus"},{"type":"null"}],"description":"User play status for this rom."}},"type":"object","title":"RomUserData"},"RomUserSchema":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"rom_id":{"type":"integer","title":"Rom Id"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"last_played":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Played"},"is_main_sibling":{"type":"boolean","title":"Is Main Sibling"},"backlogged":{"type":"boolean","title":"Backlogged"},"now_playing":{"type":"boolean","title":"Now Playing"},"hidden":{"type":"boolean","title":"Hidden"},"rating":{"type":"integer","title":"Rating"},"difficulty":{"type":"integer","title":"Difficulty"},"completion":{"type":"integer","title":"Completion"},"status":{"anyOf":[{"$ref":"#/components/schemas/RomUserStatus"},{"type":"null"}]}},"type":"object","required":["id","user_id","rom_id","created_at","updated_at","last_played","is_main_sibling","backlogged","now_playing","hidden","rating","difficulty","completion","status"],"title":"RomUserSchema"},"RomUserStatus":{"type":"string","enum":["incomplete","finished","completed_100","retired","never_playing"],"title":"RomUserStatus"},"RoomsResponse":{"properties":{"room_name":{"type":"string","title":"Room Name"},"current":{"type":"integer","title":"Current"},"max":{"type":"integer","title":"Max"},"player_name":{"type":"string","title":"Player Name"},"hasPassword":{"type":"boolean","title":"Haspassword"}},"type":"object","required":["room_name","current","max","player_name","hasPassword"],"title":"RoomsResponse"},"SGDBResource":{"properties":{"thumb":{"type":"string","title":"Thumb"},"url":{"type":"string","title":"Url"},"type":{"type":"string","title":"Type"},"width":{"type":"integer","title":"Width"},"height":{"type":"integer","title":"Height"},"style":{"type":"string","title":"Style"},"author":{"type":"string","title":"Author"},"score":{"type":"integer","title":"Score"},"nsfw":{"type":"boolean","title":"Nsfw"},"humor":{"type":"boolean","title":"Humor"},"epilepsy":{"type":"boolean","title":"Epilepsy"}},"type":"object","required":["thumb","url","type","width","height","style","author","score","nsfw","humor","epilepsy"],"title":"SGDBResource"},"SSAgeRating":{"properties":{"rating":{"type":"string","title":"Rating"},"category":{"type":"string","title":"Category"}},"type":"object","required":["rating","category"],"title":"SSAgeRating"},"SaveAndExitRequest":{"properties":{"slot":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Slot","default":0},"wait":{"type":"boolean","title":"Wait","default":true}},"type":"object","title":"SaveAndExitRequest"},"SaveSchema":{"properties":{"id":{"type":"integer","title":"Id"},"rom_id":{"type":"integer","title":"Rom Id"},"user_id":{"type":"integer","title":"User Id"},"file_name":{"type":"string","title":"File Name"},"file_name_no_tags":{"type":"string","title":"File Name No Tags"},"file_name_no_ext":{"type":"string","title":"File Name No Ext"},"file_extension":{"type":"string","title":"File Extension"},"file_path":{"type":"string","title":"File Path"},"file_size_bytes":{"type":"integer","title":"File Size Bytes"},"full_path":{"type":"string","title":"Full Path"},"download_path":{"type":"string","title":"Download Path"},"missing_from_fs":{"type":"boolean","title":"Missing From Fs"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"emulator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emulator"},"slot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slot"},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash"},"is_public":{"type":"boolean","title":"Is Public","default":false},"screenshot":{"anyOf":[{"$ref":"#/components/schemas/ScreenshotSchema"},{"type":"null"}]},"origin_device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Device Id"},"device_syncs":{"items":{"$ref":"#/components/schemas/DeviceSyncSchema"},"type":"array","title":"Device Syncs","default":[]}},"type":"object","required":["id","rom_id","user_id","file_name","file_name_no_tags","file_name_no_ext","file_extension","file_path","file_size_bytes","full_path","download_path","missing_from_fs","created_at","updated_at","emulator","screenshot"],"title":"SaveSchema"},"SaveStateRequest":{"properties":{"slot":{"type":"integer","maximum":9.0,"minimum":1.0,"title":"Slot","default":1}},"type":"object","title":"SaveStateRequest"},"SaveSummarySchema":{"properties":{"total_count":{"type":"integer","title":"Total Count"},"slots":{"items":{"$ref":"#/components/schemas/SlotSummarySchema"},"type":"array","title":"Slots"}},"type":"object","required":["total_count","slots"],"title":"SaveSummarySchema"},"ScanSettingsPayload":{"properties":{"metadata_priority":{"items":{"type":"string"},"type":"array","title":"Metadata Priority"},"artwork_priority":{"items":{"type":"string"},"type":"array","title":"Artwork Priority"},"cover_priority":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Cover Priority"},"screenshot_priority":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Screenshot Priority"},"manual_priority":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Manual Priority"},"region_priority":{"items":{"type":"string"},"type":"array","title":"Region Priority"},"language_priority":{"items":{"type":"string"},"type":"array","title":"Language Priority"},"media":{"items":{"$ref":"#/components/schemas/MetadataMediaType"},"type":"array","title":"Media"},"gamelist_export":{"type":"boolean","title":"Gamelist Export"},"gamelist_thumbnail":{"$ref":"#/components/schemas/MetadataMediaType"},"gamelist_image":{"$ref":"#/components/schemas/MetadataMediaType"},"pegasus_export":{"type":"boolean","title":"Pegasus Export"}},"type":"object","required":["metadata_priority","artwork_priority","region_priority","language_priority","media","gamelist_export","gamelist_thumbnail","gamelist_image","pegasus_export"],"title":"ScanSettingsPayload","description":"Full replacement of the scan.* config section.\n\nThe three artwork override lists (cover/screenshot/manual) are optional:\na null value clears the override so that field falls back to\n`artwork_priority`."},"ScanStats":{"properties":{"total_platforms":{"type":"integer","title":"Total Platforms"},"total_roms":{"type":"integer","title":"Total Roms"},"scanned_platforms":{"type":"integer","title":"Scanned Platforms"},"new_platforms":{"type":"integer","title":"New Platforms"},"identified_platforms":{"type":"integer","title":"Identified Platforms"},"scanned_roms":{"type":"integer","title":"Scanned Roms"},"new_roms":{"type":"integer","title":"New Roms"},"identified_roms":{"type":"integer","title":"Identified Roms"},"scanned_firmware":{"type":"integer","title":"Scanned Firmware"},"new_firmware":{"type":"integer","title":"New Firmware"}},"type":"object","required":["total_platforms","total_roms","scanned_platforms","new_platforms","identified_platforms","scanned_roms","new_roms","identified_roms","scanned_firmware","new_firmware"],"title":"ScanStats"},"ScanTaskMeta":{"properties":{"scan_stats":{"anyOf":[{"$ref":"#/components/schemas/ScanStats"},{"type":"null"}]}},"type":"object","required":["scan_stats"],"title":"ScanTaskMeta"},"ScanTaskStatusResponse":{"properties":{"task_name":{"type":"string","title":"Task Name"},"task_id":{"type":"string","title":"Task Id"},"status":{"$ref":"#/components/schemas/JobStatus"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"enqueued_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enqueued At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"task_type":{"type":"string","const":"scan","title":"Task Type"},"meta":{"$ref":"#/components/schemas/ScanTaskMeta"}},"type":"object","required":["task_name","task_id","status","created_at","enqueued_at","started_at","ended_at","task_type","meta"],"title":"ScanTaskStatusResponse"},"ScreenshotSchema":{"properties":{"id":{"type":"integer","title":"Id"},"rom_id":{"type":"integer","title":"Rom Id"},"user_id":{"type":"integer","title":"User Id"},"file_name":{"type":"string","title":"File Name"},"file_name_no_tags":{"type":"string","title":"File Name No Tags"},"file_name_no_ext":{"type":"string","title":"File Name No Ext"},"file_extension":{"type":"string","title":"File Extension"},"file_path":{"type":"string","title":"File Path"},"file_size_bytes":{"type":"integer","title":"File Size Bytes"},"full_path":{"type":"string","title":"Full Path"},"download_path":{"type":"string","title":"Download Path"},"missing_from_fs":{"type":"boolean","title":"Missing From Fs"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"is_gallery":{"type":"boolean","title":"Is Gallery","default":false},"is_public":{"type":"boolean","title":"Is Public","default":false}},"type":"object","required":["id","rom_id","user_id","file_name","file_name_no_tags","file_name_no_ext","file_extension","file_path","file_size_bytes","full_path","download_path","missing_from_fs","created_at","updated_at"],"title":"ScreenshotSchema"},"SearchCoverSchema":{"properties":{"name":{"type":"string","title":"Name"},"resources":{"items":{"$ref":"#/components/schemas/SGDBResource"},"type":"array","title":"Resources"}},"type":"object","required":["name","resources"],"title":"SearchCoverSchema"},"SearchRomSchema":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"igdb_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Igdb Id"},"moby_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Moby Id"},"ss_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ss Id"},"sgdb_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sgdb Id"},"flashpoint_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flashpoint Id"},"launchbox_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Launchbox Id"},"libretro_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Libretro Id"},"platform_id":{"type":"integer","title":"Platform Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug","default":""},"summary":{"type":"string","title":"Summary","default":""},"igdb_url_cover":{"type":"string","title":"Igdb Url Cover","default":""},"moby_url_cover":{"type":"string","title":"Moby Url Cover","default":""},"ss_url_cover":{"type":"string","title":"Ss Url Cover","default":""},"sgdb_url_cover":{"type":"string","title":"Sgdb Url Cover","default":""},"flashpoint_url_cover":{"type":"string","title":"Flashpoint Url Cover","default":""},"launchbox_url_cover":{"type":"string","title":"Launchbox Url Cover","default":""},"libretro_url_cover":{"type":"string","title":"Libretro Url Cover","default":""},"is_unidentified":{"type":"boolean","title":"Is Unidentified"},"is_identified":{"type":"boolean","title":"Is Identified"}},"type":"object","required":["platform_id","name","is_unidentified","is_identified"],"title":"SearchRomSchema"},"SiblingRomSchema":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"fs_name_no_tags":{"type":"string","title":"Fs Name No Tags"},"fs_name_no_ext":{"type":"string","title":"Fs Name No Ext"},"is_main_sibling":{"type":"boolean","title":"Is Main Sibling"},"sort_comparator":{"type":"string","title":"Sort Comparator","readOnly":true}},"type":"object","required":["id","name","fs_name_no_tags","fs_name_no_ext","is_main_sibling","sort_comparator"],"title":"SiblingRomSchema"},"SimpleRomSchema":{"properties":{"id":{"type":"integer","title":"Id"},"igdb_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Igdb Id"},"sgdb_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sgdb Id"},"moby_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Moby Id"},"ss_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ss Id"},"ra_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ra Id"},"launchbox_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Launchbox Id"},"hasheous_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hasheous Id"},"tgdb_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tgdb Id"},"flashpoint_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flashpoint Id"},"hltb_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hltb Id"},"gamelist_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gamelist Id"},"libretro_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Libretro Id"},"platform_id":{"type":"integer","title":"Platform Id"},"platform_slug":{"type":"string","title":"Platform Slug"},"platform_fs_slug":{"type":"string","title":"Platform Fs Slug"},"platform_custom_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform Custom Name"},"platform_display_name":{"type":"string","title":"Platform Display Name"},"fs_name":{"type":"string","title":"Fs Name"},"fs_name_no_tags":{"type":"string","title":"Fs Name No Tags"},"fs_name_no_ext":{"type":"string","title":"Fs Name No Ext"},"fs_extension":{"type":"string","title":"Fs Extension"},"fs_path":{"type":"string","title":"Fs Path"},"fs_size_bytes":{"type":"integer","title":"Fs Size Bytes"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"name_sort_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Sort Key"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"alternative_names":{"items":{"type":"string"},"type":"array","title":"Alternative Names"},"youtube_video_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Youtube Video Id"},"metadatum":{"$ref":"#/components/schemas/RomMetadataSchema"},"igdb_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomIGDBMetadata"},{"type":"null"}]},"moby_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomMobyMetadata"},{"type":"null"}]},"ss_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomSSMetadata"},{"type":"null"}]},"launchbox_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomLaunchboxMetadata"},{"type":"null"}]},"hasheous_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomHasheousMetadata"},{"type":"null"}]},"flashpoint_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomFlashpointMetadata"},{"type":"null"}]},"hltb_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomHLTBMetadata"},{"type":"null"}]},"gamelist_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomGamelistMetadata"},{"type":"null"}]},"manual_metadata":{"anyOf":[{"$ref":"#/components/schemas/ManualMetadata"},{"type":"null"}]},"path_cover_small":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path Cover Small"},"path_cover_large":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path Cover Large"},"url_cover":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url Cover"},"has_manual":{"type":"boolean","title":"Has Manual"},"has_soundtrack":{"type":"boolean","title":"Has Soundtrack"},"path_manual":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path Manual"},"url_manual":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url Manual"},"path_video":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path Video"},"is_identifying":{"type":"boolean","title":"Is Identifying","default":false},"is_unidentified":{"type":"boolean","title":"Is Unidentified"},"is_identified":{"type":"boolean","title":"Is Identified"},"revision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revision"},"regions":{"items":{"type":"string"},"type":"array","title":"Regions"},"languages":{"items":{"type":"string"},"type":"array","title":"Languages"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"crc_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crc Hash"},"md5_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Md5 Hash"},"sha1_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sha1 Hash"},"ra_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ra Hash"},"has_simple_single_file":{"type":"boolean","title":"Has Simple Single File"},"has_nested_single_file":{"type":"boolean","title":"Has Nested Single File"},"has_multiple_files":{"type":"boolean","title":"Has Multiple Files"},"full_path":{"type":"string","title":"Full Path"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"missing_from_fs":{"type":"boolean","title":"Missing From Fs"},"has_notes":{"type":"boolean","title":"Has Notes"},"rom_user":{"$ref":"#/components/schemas/RomUserSchema"},"merged_screenshots":{"items":{"type":"string"},"type":"array","title":"Merged Screenshots"},"merged_ra_metadata":{"anyOf":[{"$ref":"#/components/schemas/RomRAMetadata"},{"type":"null"}]},"files":{"items":{"$ref":"#/components/schemas/RomFileSchema"},"type":"array","title":"Files"},"sibling_roms":{"items":{"$ref":"#/components/schemas/SiblingRomSchema"},"type":"array","title":"Sibling Roms"},"screenshot_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screenshot Path"}},"type":"object","required":["id","igdb_id","sgdb_id","moby_id","ss_id","ra_id","launchbox_id","hasheous_id","tgdb_id","flashpoint_id","hltb_id","gamelist_id","libretro_id","platform_id","platform_slug","platform_fs_slug","platform_custom_name","platform_display_name","fs_name","fs_name_no_tags","fs_name_no_ext","fs_extension","fs_path","fs_size_bytes","name","name_sort_key","slug","summary","alternative_names","youtube_video_id","metadatum","igdb_metadata","moby_metadata","ss_metadata","launchbox_metadata","hasheous_metadata","flashpoint_metadata","hltb_metadata","gamelist_metadata","manual_metadata","path_cover_small","path_cover_large","url_cover","has_manual","has_soundtrack","path_manual","url_manual","path_video","is_unidentified","is_identified","revision","regions","languages","tags","crc_hash","md5_hash","sha1_hash","ra_hash","has_simple_single_file","has_nested_single_file","has_multiple_files","full_path","created_at","updated_at","missing_from_fs","has_notes","rom_user","merged_screenshots","merged_ra_metadata","files","sibling_roms"],"title":"SimpleRomSchema"},"SlotSummarySchema":{"properties":{"slot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slot"},"count":{"type":"integer","title":"Count"},"latest":{"$ref":"#/components/schemas/SaveSchema"}},"type":"object","required":["slot","count","latest"],"title":"SlotSummarySchema"},"SmartCollectionSchema":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"rom_ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Rom Ids"},"rom_count":{"type":"integer","title":"Rom Count"},"path_cover_small":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path Cover Small"},"path_cover_large":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path Cover Large"},"path_covers_small":{"items":{"type":"string"},"type":"array","title":"Path Covers Small"},"path_covers_large":{"items":{"type":"string"},"type":"array","title":"Path Covers Large"},"is_public":{"type":"boolean","title":"Is Public","default":false},"is_favorite":{"type":"boolean","title":"Is Favorite","default":false},"is_virtual":{"type":"boolean","title":"Is Virtual","default":false},"is_smart":{"type":"boolean","title":"Is Smart","default":true},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"integer","title":"Id"},"filter_criteria":{"additionalProperties":true,"type":"object","title":"Filter Criteria"},"filter_summary":{"type":"string","title":"Filter Summary"},"user_id":{"type":"integer","title":"User Id"},"owner_username":{"type":"string","title":"Owner Username"}},"type":"object","required":["name","rom_ids","rom_count","path_cover_small","path_cover_large","path_covers_small","path_covers_large","created_at","updated_at","id","filter_criteria","filter_summary","user_id","owner_username"],"title":"SmartCollectionSchema"},"SoundtrackTrackMetaSchema":{"properties":{"file_id":{"type":"integer","title":"File Id"},"file_name":{"type":"string","title":"File Name"},"file_size_bytes":{"type":"integer","title":"File Size Bytes"},"track_meta":{"anyOf":[{"$ref":"#/components/schemas/TrackMetaSchema"},{"type":"null"}]}},"type":"object","required":["file_id","file_name","file_size_bytes"],"title":"SoundtrackTrackMetaSchema"},"StateSchema":{"properties":{"id":{"type":"integer","title":"Id"},"rom_id":{"type":"integer","title":"Rom Id"},"user_id":{"type":"integer","title":"User Id"},"file_name":{"type":"string","title":"File Name"},"file_name_no_tags":{"type":"string","title":"File Name No Tags"},"file_name_no_ext":{"type":"string","title":"File Name No Ext"},"file_extension":{"type":"string","title":"File Extension"},"file_path":{"type":"string","title":"File Path"},"file_size_bytes":{"type":"integer","title":"File Size Bytes"},"full_path":{"type":"string","title":"Full Path"},"download_path":{"type":"string","title":"Download Path"},"missing_from_fs":{"type":"boolean","title":"Missing From Fs"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"emulator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emulator"},"is_public":{"type":"boolean","title":"Is Public","default":false},"screenshot":{"anyOf":[{"$ref":"#/components/schemas/ScreenshotSchema"},{"type":"null"}]}},"type":"object","required":["id","rom_id","user_id","file_name","file_name_no_tags","file_name_no_ext","file_extension","file_path","file_size_bytes","full_path","download_path","missing_from_fs","created_at","updated_at","emulator","screenshot"],"title":"StateSchema"},"StatsReturn":{"properties":{"PLATFORMS":{"type":"integer","title":"Platforms"},"ROMS":{"type":"integer","title":"Roms"},"SAVES":{"type":"integer","title":"Saves"},"STATES":{"type":"integer","title":"States"},"SCREENSHOTS":{"type":"integer","title":"Screenshots"},"TOTAL_FILESIZE_BYTES":{"type":"integer","title":"Total Filesize Bytes"},"METADATA_COVERAGE":{"additionalProperties":{"items":{"$ref":"#/components/schemas/MetadataCoverageItem"},"type":"array"},"type":"object","title":"Metadata Coverage"},"REGION_BREAKDOWN":{"additionalProperties":{"items":{"$ref":"#/components/schemas/RegionBreakdownItem"},"type":"array"},"type":"object","title":"Region Breakdown"}},"type":"object","title":"StatsReturn"},"SyncCompletePayload":{"properties":{"operations_completed":{"type":"integer","title":"Operations Completed","default":0},"operations_failed":{"type":"integer","title":"Operations Failed","default":0},"play_sessions":{"anyOf":[{"items":{"$ref":"#/components/schemas/SyncPlaySessionEntry"},"type":"array"},{"type":"null"}],"title":"Play Sessions"}},"type":"object","title":"SyncCompletePayload"},"SyncCompleteResponse":{"properties":{"session":{"$ref":"#/components/schemas/SyncSessionSchema"},"play_session_ingest":{"anyOf":[{"$ref":"#/components/schemas/PlaySessionIngestResponse"},{"type":"null"}]}},"type":"object","required":["session"],"title":"SyncCompleteResponse"},"SyncMode":{"type":"string","enum":["api","file_transfer","push_pull"],"title":"SyncMode"},"SyncNegotiatePayload":{"properties":{"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id","description":"ID of the syncing device. Optional when the request uses a device-bound client token, in which case the device is inferred from the token."},"saves":{"items":{"$ref":"#/components/schemas/ClientSaveState"},"type":"array","title":"Saves","description":"Current save state on the client."}},"type":"object","required":["saves"],"title":"SyncNegotiatePayload"},"SyncNegotiateResponse":{"properties":{"session_id":{"type":"integer","title":"Session Id"},"operations":{"items":{"$ref":"#/components/schemas/SyncOperationSchema"},"type":"array","title":"Operations"},"total_upload":{"type":"integer","title":"Total Upload"},"total_download":{"type":"integer","title":"Total Download"},"total_conflict":{"type":"integer","title":"Total Conflict"},"total_no_op":{"type":"integer","title":"Total No Op"}},"type":"object","required":["session_id","operations","total_upload","total_download","total_conflict","total_no_op"],"title":"SyncNegotiateResponse"},"SyncOperationSchema":{"properties":{"action":{"type":"string","enum":["upload","download","conflict","no_op"],"title":"Action","description":"Operation the client should perform. 'upload' when the client has a save the server lacks (including any null-slot save, which is never paired with server saves), 'download' when the server has a newer or unknown save, 'conflict' when both sides changed independently, and 'no_op' when no action is needed."},"rom_id":{"type":"integer","title":"Rom Id","description":"ID of the ROM this operation applies to."},"save_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Save Id","description":"ID of the server save, if one exists (null for uploads)."},"file_name":{"type":"string","title":"File Name","description":"Name of the save file."},"slot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slot","description":"Slot the operation applies to. Echoes the client slot for uploads; for downloads and conflicts it is the server save's slot."},"emulator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emulator","description":"Emulator associated with the save, if known."},"reason":{"type":"string","title":"Reason","description":"Human-readable explanation of why this operation was chosen."},"server_updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server Updated At","description":"Last-modified timestamp of the server save, when applicable."},"server_content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server Content Hash","description":"Content hash of the server save, when applicable."}},"type":"object","required":["action","rom_id","file_name","reason"],"title":"SyncOperationSchema"},"SyncPlaySessionEntry":{"properties":{"rom_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rom Id"},"save_slot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Save Slot"},"start_time":{"type":"string","format":"date-time","title":"Start Time"},"end_time":{"type":"string","format":"date-time","title":"End Time"},"duration_ms":{"type":"integer","minimum":0.0,"title":"Duration Ms"}},"type":"object","required":["start_time","end_time","duration_ms"],"title":"SyncPlaySessionEntry"},"SyncSessionSchema":{"properties":{"id":{"type":"integer","title":"Id"},"device_id":{"type":"string","title":"Device Id"},"user_id":{"type":"integer","title":"User Id"},"status":{"type":"string","title":"Status"},"initiated_at":{"type":"string","title":"Initiated At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"operations_planned":{"type":"integer","title":"Operations Planned"},"operations_completed":{"type":"integer","title":"Operations Completed"},"operations_failed":{"type":"integer","title":"Operations Failed"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","device_id","user_id","status","initiated_at","operations_planned","operations_completed","operations_failed","created_at","updated_at"],"title":"SyncSessionSchema"},"SyncTaskMeta":{"properties":{},"type":"object","title":"SyncTaskMeta"},"SyncTaskStatusResponse":{"properties":{"task_name":{"type":"string","title":"Task Name"},"task_id":{"type":"string","title":"Task Id"},"status":{"$ref":"#/components/schemas/JobStatus"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"enqueued_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enqueued At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"task_type":{"type":"string","const":"sync","title":"Task Type"},"meta":{"$ref":"#/components/schemas/SyncTaskMeta"}},"type":"object","required":["task_name","task_id","status","created_at","enqueued_at","started_at","ended_at","task_type","meta"],"title":"SyncTaskStatusResponse"},"SystemDict":{"properties":{"VERSION":{"type":"string","title":"Version"},"SHOW_SETUP_WIZARD":{"type":"boolean","title":"Show Setup Wizard"}},"type":"object","required":["VERSION","SHOW_SETUP_WIZARD"],"title":"SystemDict"},"TaskExecutionResponse":{"properties":{"task_name":{"type":"string","title":"Task Name"},"task_id":{"type":"string","title":"Task Id"},"status":{"$ref":"#/components/schemas/JobStatus"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"enqueued_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enqueued At"}},"type":"object","required":["task_name","task_id","status","created_at","enqueued_at"],"title":"TaskExecutionResponse"},"TaskInfo":{"properties":{"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/TaskType"},"manual_run":{"type":"boolean","title":"Manual Run"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"enabled":{"type":"boolean","title":"Enabled"},"cron_string":{"type":"string","title":"Cron String"}},"type":"object","required":["name","type","manual_run","title","description","enabled","cron_string"],"title":"TaskInfo"},"TaskType":{"type":"string","enum":["scan","conversion","cleanup","update","sync","watcher","generic"],"title":"TaskType","description":"Enumeration of task types for categorization and UI display."},"TasksDict":{"properties":{"ENABLE_SCHEDULED_RESCAN":{"type":"boolean","title":"Enable Scheduled Rescan"},"SCHEDULED_RESCAN_CRON":{"type":"string","title":"Scheduled Rescan Cron"},"ENABLE_SCHEDULED_UPDATE_SWITCH_TITLEDB":{"type":"boolean","title":"Enable Scheduled Update Switch Titledb"},"SCHEDULED_UPDATE_SWITCH_TITLEDB_CRON":{"type":"string","title":"Scheduled Update Switch Titledb Cron"},"ENABLE_SCHEDULED_UPDATE_LAUNCHBOX_METADATA":{"type":"boolean","title":"Enable Scheduled Update Launchbox Metadata"},"SCHEDULED_UPDATE_LAUNCHBOX_METADATA_CRON":{"type":"string","title":"Scheduled Update Launchbox Metadata Cron"},"ENABLE_SCHEDULED_CONVERT_IMAGES_TO_WEBP":{"type":"boolean","title":"Enable Scheduled Convert Images To Webp"},"SCHEDULED_CONVERT_IMAGES_TO_WEBP_CRON":{"type":"string","title":"Scheduled Convert Images To Webp Cron"}},"type":"object","required":["ENABLE_SCHEDULED_RESCAN","SCHEDULED_RESCAN_CRON","ENABLE_SCHEDULED_UPDATE_SWITCH_TITLEDB","SCHEDULED_UPDATE_SWITCH_TITLEDB_CRON","ENABLE_SCHEDULED_UPDATE_LAUNCHBOX_METADATA","SCHEDULED_UPDATE_LAUNCHBOX_METADATA_CRON","ENABLE_SCHEDULED_CONVERT_IMAGES_TO_WEBP","SCHEDULED_CONVERT_IMAGES_TO_WEBP_CRON"],"title":"TasksDict"},"TinfoilFeedFileSchema":{"properties":{"url":{"type":"string","title":"Url"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["url","size"],"title":"TinfoilFeedFileSchema"},"TinfoilFeedSchema":{"properties":{"files":{"items":{"$ref":"#/components/schemas/TinfoilFeedFileSchema"},"type":"array","title":"Files"},"directories":{"items":{"type":"string"},"type":"array","title":"Directories"},"titledb":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Titledb"},"success":{"type":"string","title":"Success"},"error":{"type":"string","title":"Error"}},"type":"object","required":["files","directories"],"title":"TinfoilFeedSchema"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type"},"expires":{"type":"integer","title":"Expires"},"refresh_token":{"type":"string","title":"Refresh Token"},"refresh_expires":{"type":"integer","title":"Refresh Expires"}},"type":"object","required":["access_token","token_type","expires"],"title":"TokenResponse"},"TrackMetaSchema":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"artist":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artist"},"album":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Album"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"},"genre":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Genre"},"track":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Track"},"disc":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Disc"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"has_embedded_cover":{"type":"boolean","title":"Has Embedded Cover","default":false},"cover_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Path"}},"type":"object","title":"TrackMetaSchema"},"UpdateStats":{"properties":{"processed":{"type":"integer","title":"Processed"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["processed","total"],"title":"UpdateStats"},"UpdateTaskMeta":{"properties":{"update_stats":{"anyOf":[{"$ref":"#/components/schemas/UpdateStats"},{"type":"null"}]}},"type":"object","required":["update_stats"],"title":"UpdateTaskMeta"},"UpdateTaskStatusResponse":{"properties":{"task_name":{"type":"string","title":"Task Name"},"task_id":{"type":"string","title":"Task Id"},"status":{"$ref":"#/components/schemas/JobStatus"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"enqueued_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enqueued At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"task_type":{"type":"string","const":"update","title":"Task Type"},"meta":{"$ref":"#/components/schemas/UpdateTaskMeta"}},"type":"object","required":["task_name","task_id","status","created_at","enqueued_at","started_at","ended_at","task_type","meta"],"title":"UpdateTaskStatusResponse"},"UserCollectionSchema":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"is_smart":{"type":"boolean","title":"Is Smart","default":false}},"type":"object","required":["id","name"],"title":"UserCollectionSchema"},"UserForm":{"properties":{"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"ra_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ra Username"},"avatar":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Avatar"},"ui_settings":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ui Settings"}},"type":"object","title":"UserForm"},"UserNoteSchema":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"is_public":{"type":"boolean","title":"Is Public"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"user_id":{"type":"integer","title":"User Id"},"username":{"type":"string","title":"Username"},"user_avatar_path":{"type":"string","title":"User Avatar Path","default":""},"user_updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Updated At"}},"type":"object","required":["id","title","content","is_public","created_at","updated_at","user_id","username"],"title":"UserNoteSchema"},"UserPermissionsSchema":{"properties":{"user_id":{"type":"integer","title":"User Id"},"permission_group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Permission Group Id"},"overrides":{"items":{"$ref":"#/components/schemas/OverrideSchemaIO"},"type":"array","title":"Overrides"},"hidden":{"items":{"$ref":"#/components/schemas/HiddenEntitySchema"},"type":"array","title":"Hidden"}},"type":"object","required":["user_id","permission_group_id","overrides","hidden"],"title":"UserPermissionsSchema","description":"Admin view of one user's permission assignment."},"UserPermissionsUpdate":{"properties":{"permission_group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Permission Group Id"},"set_group":{"type":"boolean","title":"Set Group","default":false},"overrides":{"anyOf":[{"items":{"$ref":"#/components/schemas/OverrideSchemaIO"},"type":"array"},{"type":"null"}],"title":"Overrides"}},"type":"object","title":"UserPermissionsUpdate"},"UserSaveSchema":{"properties":{"id":{"type":"integer","title":"Id"},"rom_id":{"type":"integer","title":"Rom Id"},"user_id":{"type":"integer","title":"User Id"},"file_name":{"type":"string","title":"File Name"},"file_name_no_tags":{"type":"string","title":"File Name No Tags"},"file_name_no_ext":{"type":"string","title":"File Name No Ext"},"file_extension":{"type":"string","title":"File Extension"},"file_path":{"type":"string","title":"File Path"},"file_size_bytes":{"type":"integer","title":"File Size Bytes"},"full_path":{"type":"string","title":"Full Path"},"download_path":{"type":"string","title":"Download Path"},"missing_from_fs":{"type":"boolean","title":"Missing From Fs"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"emulator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emulator"},"slot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slot"},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash"},"is_public":{"type":"boolean","title":"Is Public","default":false},"screenshot":{"anyOf":[{"$ref":"#/components/schemas/ScreenshotSchema"},{"type":"null"}]},"origin_device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Device Id"},"device_syncs":{"items":{"$ref":"#/components/schemas/DeviceSyncSchema"},"type":"array","title":"Device Syncs","default":[]},"username":{"type":"string","title":"Username"},"user_avatar_path":{"type":"string","title":"User Avatar Path","default":""},"user_updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Updated At"}},"type":"object","required":["id","rom_id","user_id","file_name","file_name_no_tags","file_name_no_ext","file_extension","file_path","file_size_bytes","full_path","download_path","missing_from_fs","created_at","updated_at","emulator","screenshot","username"],"title":"UserSaveSchema","description":"A save enriched with its owner's username, for the community (My /\nCommunity) view. Mirrors UserScreenshotSchema."},"UserSchema":{"properties":{"id":{"type":"integer","title":"Id"},"username":{"type":"string","title":"Username"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"enabled":{"type":"boolean","title":"Enabled"},"role":{"$ref":"#/components/schemas/Role"},"permission_group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Permission Group Id"},"oauth_scopes":{"items":{"type":"string"},"type":"array","title":"Oauth Scopes"},"avatar_path":{"type":"string","title":"Avatar Path"},"last_login":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Login"},"last_active":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Active"},"ra_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ra Username"},"ra_progression":{"anyOf":[{"$ref":"#/components/schemas/RAProgression"},{"type":"null"}]},"ui_settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ui Settings"},"current_device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Device Id"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","username","email","enabled","role","oauth_scopes","avatar_path","last_login","last_active","created_at","updated_at"],"title":"UserSchema"},"UserScreenshotSchema":{"properties":{"id":{"type":"integer","title":"Id"},"rom_id":{"type":"integer","title":"Rom Id"},"user_id":{"type":"integer","title":"User Id"},"file_name":{"type":"string","title":"File Name"},"file_name_no_tags":{"type":"string","title":"File Name No Tags"},"file_name_no_ext":{"type":"string","title":"File Name No Ext"},"file_extension":{"type":"string","title":"File Extension"},"file_path":{"type":"string","title":"File Path"},"file_size_bytes":{"type":"integer","title":"File Size Bytes"},"full_path":{"type":"string","title":"Full Path"},"download_path":{"type":"string","title":"Download Path"},"missing_from_fs":{"type":"boolean","title":"Missing From Fs"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"is_gallery":{"type":"boolean","title":"Is Gallery","default":false},"is_public":{"type":"boolean","title":"Is Public","default":false},"username":{"type":"string","title":"Username"},"user_avatar_path":{"type":"string","title":"User Avatar Path","default":""},"user_updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Updated At"}},"type":"object","required":["id","rom_id","user_id","file_name","file_name_no_tags","file_name_no_ext","file_extension","file_path","file_size_bytes","full_path","download_path","missing_from_fs","created_at","updated_at","username"],"title":"UserScreenshotSchema","description":"A gallery screenshot enriched with its owner's username, for the\ncommunity (My / Community) view. Mirrors UserNoteSchema."},"UserStateSchema":{"properties":{"id":{"type":"integer","title":"Id"},"rom_id":{"type":"integer","title":"Rom Id"},"user_id":{"type":"integer","title":"User Id"},"file_name":{"type":"string","title":"File Name"},"file_name_no_tags":{"type":"string","title":"File Name No Tags"},"file_name_no_ext":{"type":"string","title":"File Name No Ext"},"file_extension":{"type":"string","title":"File Extension"},"file_path":{"type":"string","title":"File Path"},"file_size_bytes":{"type":"integer","title":"File Size Bytes"},"full_path":{"type":"string","title":"Full Path"},"download_path":{"type":"string","title":"Download Path"},"missing_from_fs":{"type":"boolean","title":"Missing From Fs"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"emulator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emulator"},"is_public":{"type":"boolean","title":"Is Public","default":false},"screenshot":{"anyOf":[{"$ref":"#/components/schemas/ScreenshotSchema"},{"type":"null"}]},"username":{"type":"string","title":"Username"},"user_avatar_path":{"type":"string","title":"User Avatar Path","default":""},"user_updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Updated At"}},"type":"object","required":["id","rom_id","user_id","file_name","file_name_no_tags","file_name_no_ext","file_extension","file_path","file_size_bytes","full_path","download_path","missing_from_fs","created_at","updated_at","emulator","screenshot","username"],"title":"UserStateSchema","description":"A state enriched with its owner's username, for the community (My /\nCommunity) view. Mirrors UserScreenshotSchema."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VirtualCollectionSchema":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"rom_ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Rom Ids"},"rom_count":{"type":"integer","title":"Rom Count"},"path_cover_small":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path Cover Small"},"path_cover_large":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path Cover Large"},"path_covers_small":{"items":{"type":"string"},"type":"array","title":"Path Covers Small"},"path_covers_large":{"items":{"type":"string"},"type":"array","title":"Path Covers Large"},"is_public":{"type":"boolean","title":"Is Public","default":false},"is_favorite":{"type":"boolean","title":"Is Favorite","default":false},"is_virtual":{"type":"boolean","title":"Is Virtual","default":true},"is_smart":{"type":"boolean","title":"Is Smart","default":false},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"}},"type":"object","required":["name","description","rom_ids","rom_count","path_cover_small","path_cover_large","path_covers_small","path_covers_large","created_at","updated_at","id","type"],"title":"VirtualCollectionSchema"},"VolumeRequest":{"properties":{"level":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Level"}},"type":"object","required":["level"],"title":"VolumeRequest"},"WatcherTaskMeta":{"properties":{},"type":"object","title":"WatcherTaskMeta"},"WatcherTaskStatusResponse":{"properties":{"task_name":{"type":"string","title":"Task Name"},"task_id":{"type":"string","title":"Task Id"},"status":{"$ref":"#/components/schemas/JobStatus"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"enqueued_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enqueued At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"task_type":{"type":"string","const":"watcher","title":"Task Type"},"meta":{"$ref":"#/components/schemas/WatcherTaskMeta"}},"type":"object","required":["task_name","task_id","status","created_at","enqueued_at","started_at","ended_at","task_type","meta"],"title":"WatcherTaskStatusResponse"},"WebrcadeFeedCategorySchema":{"properties":{"title":{"type":"string","title":"Title"},"longTitle":{"type":"string","title":"Longtitle"},"background":{"type":"string","title":"Background"},"thumbnail":{"type":"string","title":"Thumbnail"},"description":{"type":"string","title":"Description"},"items":{"items":{"$ref":"#/components/schemas/WebrcadeFeedItemSchema"},"type":"array","title":"Items"}},"type":"object","required":["title","items"],"title":"WebrcadeFeedCategorySchema"},"WebrcadeFeedItemPropsSchema":{"properties":{"rom":{"type":"string","title":"Rom"}},"type":"object","required":["rom"],"title":"WebrcadeFeedItemPropsSchema"},"WebrcadeFeedItemSchema":{"properties":{"title":{"type":"string","title":"Title"},"longTitle":{"type":"string","title":"Longtitle"},"description":{"type":"string","title":"Description"},"type":{"type":"string","title":"Type"},"thumbnail":{"type":"string","title":"Thumbnail"},"background":{"type":"string","title":"Background"},"props":{"$ref":"#/components/schemas/WebrcadeFeedItemPropsSchema"}},"type":"object","required":["title","type","props"],"title":"WebrcadeFeedItemSchema"},"WebrcadeFeedSchema":{"properties":{"title":{"type":"string","title":"Title"},"longTitle":{"type":"string","title":"Longtitle"},"description":{"type":"string","title":"Description"},"thumbnail":{"type":"string","title":"Thumbnail"},"background":{"type":"string","title":"Background"},"categories":{"items":{"$ref":"#/components/schemas/WebrcadeFeedCategorySchema"},"type":"array","title":"Categories"}},"type":"object","required":["title","categories"],"title":"WebrcadeFeedSchema"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{"me.read":"View your profile","roms.read":"View ROMs","platforms.read":"View platforms","assets.read":"View assets","devices.read":"View devices","firmware.read":"View firmware","roms.user.read":"View user-rom properties","collections.read":"View collections","playlists.read":"View music playlists","me.write":"Modify your profile","assets.write":"Modify assets","devices.write":"Modify devices","roms.user.write":"Modify user-rom properties","collections.write":"Modify collections","playlists.write":"Modify music playlists","roms.write":"Modify ROMs","platforms.write":"Modify platforms","firmware.write":"Modify firmware","users.read":"View users","users.write":"Modify users","tasks.run":"Run tasks","logs.read":"View backend logs"},"tokenUrl":"/token"}}},"HTTPBasic":{"type":"http","scheme":"basic"}}}} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..8d5d56e --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2778 @@ +{ + "name": "romm-companion", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "romm-companion", + "version": "0.1.0", + "dependencies": { + "@tauri-apps/api": "^2.5.0", + "@tauri-apps/plugin-dialog": "^2.2.1", + "@tauri-apps/plugin-opener": "^2.2.6", + "lucide-react": "^0.511.0", + "react": "^19.1.0", + "react-dom": "^19.1.0" + }, + "devDependencies": { + "@tailwindcss/vite": "^4.1.7", + "@tauri-apps/cli": "^2.5.0", + "@types/react": "^19.1.4", + "@types/react-dom": "^19.1.4", + "@vitejs/plugin-react": "^4.7.0", + "tailwindcss": "^4.1.7", + "typescript": "^5.8.3", + "vite": "^6.3.5" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.16", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.16.tgz", + "integrity": "sha512-qK40pOeReBJY7B0JX6CCIfauMLAa0IlvuVYJ+aZBYLVJwmNUTvsQcEu0En9hVMmNjeSUSQYwvpi1JgXn5imIQw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.16", + "@babel/helper-compilation-targets": "^7.29.13", + "@babel/helper-module-transforms": "^7.29.16", + "@babel/helpers": "^7.29.16", + "@babel/parser": "^7.29.15", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.16", + "@babel/types": "^7.29.15", + "@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.16", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.16.tgz", + "integrity": "sha512-yRtddtrcYdLJt0l70aP7usb2YpMHNXAdAvJW2hXdka5boR4vKMS/F5BTR5sULkbht9xPk/EKzbY2mCczMutZqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.15", + "@babel/types": "^7.29.15", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.13.tgz", + "integrity": "sha512-8WxJ4/Vmes3ghacj8VOJy3NW8eyHiFY/4thU/LSBuBE470+igjR/j1ZTNn8fV5VdNrLx6iXUwig526UdOvfP0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.16", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.16.tgz", + "integrity": "sha512-jzdW9nRNJXbNAfcbtfZA75vcQK8c/PRniwNL1KIQukiptryb5JlCl+nwi3idOSj611tMgiZxb9PuKg1FI0BvVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.16" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.15.tgz", + "integrity": "sha512-C2FuapQ2Kh1OnVHAoLi5rD3GBJ8COb9Q609T6HEpLqaBAo560PDP5OxBE5dCI/h951MBO/+bCUYU5SZ+8ZlV+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.16", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.16.tgz", + "integrity": "sha512-JGNbyEyvOAvceLDQoO6b/w/HbW6KX3sdWgrPCFcAyHfhfsqRoRN14vfaG3GZ90g2dVK7UEe65giopuldeimBjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.15.tgz", + "integrity": "sha512-RpKWyisHoP81twtSCgmE02iU0RnPcq1DN5bBEbpUePrjA9Q3wXhufnCJrrayPpoZieqFh3zyZQqwtSK0gGccRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.15" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.29.7.tgz", + "integrity": "sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.29.7.tgz", + "integrity": "sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.16", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.16.tgz", + "integrity": "sha512-a16ah9dTLOLUq5BL7NElJ7keefg/276vgfTfExDf1PizddYboqRnQXDTooVPb0VArIqrKe8KLlghnTxlZFEZtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.16", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.15", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.15", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.15.tgz", + "integrity": "sha512-/XKpKDakL//LZ66bq1XsZOswuqeI5MZqPLDu18o3XdkU1fNJ7bdPtzgnc4ZNS+bBGHV0FJG8jjb8SwcC3nNVQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.15", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.3.tgz", + "integrity": "sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.27", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", + "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.68.9.tgz", + "integrity": "sha512-Z1hkXtnYKf3sHDD8F2Ll7g9ZGwgAdVNThyz3KiTGSWkjKgYPz/a3TEPoR7ZXE9YlLvbpaO8g+3zisGbU40WQsg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.68.9.tgz", + "integrity": "sha512-9FG3WZfMVLlbYB8Vyy2w2t50IMbGQ1dWfiCvkacTtXAmXxkHDkxCdomxW6869YEMD1gTsgDF5i9RXASw/8iaZw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-x64": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-x64/-/rollup-android-x64-4.68.9.tgz", + "integrity": "sha512-nsxur8e5bfr8YdUwupKED/XJD6X02FVIQkv2zDVJQkesfI0/Lt4vMDFjlWNqWgHbZ38nt8xhk/gbJWdzVtWCfA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.68.9.tgz", + "integrity": "sha512-tkqdvGDK6pmcd419n4zHSFkJcnEIuluYKZArnzWq+O02RYe5jymtAF/c92VP6/JR9nawrV6+LC23GhSPeNZUmA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.68.9.tgz", + "integrity": "sha512-1vWrRYmFBNs1UKMogcvl5Vg9mdOA3yQgGQGJrQaxHgnR2Qj57L5QiAJBKk1Ednwanxa6dzxGvBaw4I+Evuxz6g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.68.9.tgz", + "integrity": "sha512-4YhNOyTvFKzrL0/abahYjSG1mIEFqFR+xtVom2T8prSk96z8aNgN3f8GUGCtkkC2eYbZvN9tUAGvgMgVq5FfXg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.68.9.tgz", + "integrity": "sha512-Ng7i+xFFd6I21dpTyA/1VKOuKVUCw5+s9kjeffTmg0OkP3Ldnf2F+XcmNfFAqIirK4Nadi505MVG6delN4XqMw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.68.9.tgz", + "integrity": "sha512-J9JGwMHb6B2Pi6ewp6kVMhzKHSblqC5QS5gV5u8NKw7semdTzETwwZeJLLUfV3YQqAAQxXNz5FGZDGukcwgO4A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.68.9.tgz", + "integrity": "sha512-cD3CbynGfXBU0BKX6AJ2TCqyd14ChhDQsH2P6BMAKSQaDXGzY1DUPZoQWcNXeJnsTqmoEWo59VlKgnZ9iAAd1w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.68.9.tgz", + "integrity": "sha512-pEMURtf2ARso1VzpDp66G7FGdvpHcOKAT1+9TEqbbkWZ2ek91/KUGSP7RUSH1io8JpZiBkvoNhwELdgHH9b38g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.68.9.tgz", + "integrity": "sha512-x3Ei7a0FYjMe2FMonmgjtRqVlCmrek2NgWC57b4mUbpwtHI9mZV58F0aEdTeA90U0liRks/NRXGQSVETsGP1kg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.68.9.tgz", + "integrity": "sha512-teiOZq8Eka0Yb3IJypBc4dq2U3u5l6P1vZ4sVjOPWJhOFBeOc3bjUnxv2RHn88jsL2qwX4tXuPc0MoqTO+8gww==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.68.9.tgz", + "integrity": "sha512-51rITRfuF6LN+kZgAdYwk7qkQFlO87Tm1L/nO34kWEIuu8tJmMn1EBdBNdCOM68f93dILWY64QZECKcW2j2i7Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.68.9.tgz", + "integrity": "sha512-nA1dtgROg2B4FPJbp3cpldu1dfbAs/uGFGsy+ZgZyIojvrGldgdeasnsKHNRuDI6gF47mb63rge6GKZHCiItuA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.68.9.tgz", + "integrity": "sha512-BG9NS84ehLVomSi35jSFDeMCRL+Mkz0PsBrjuAkgGHT/k+ZZIQ6rlQBmrAa11q/voQsiH8UeaUzi4FZFQn3syw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.68.9.tgz", + "integrity": "sha512-771hNPYszO5g7FeqxR4LO8Qmi2xpjRcXjXfMYsgXLFz+5bNkCR4OPllgyz65v9wlTX4ZoVmbh8pCZhpm2LsykA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.68.9.tgz", + "integrity": "sha512-zLCA6Rw0J04hsqogzzsUxEUr5jaInUgqkKnw3WsSHuCSQPbXWexrgphDDRJZGMeSCn2GQP7gJtzq/I5NwzVc3w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.68.9.tgz", + "integrity": "sha512-TDl99JOOD8/uz6I3ECtboFOTZzodZ4VzJqfVjHqCo12fF+F/3bcf4dC5UC3lsGXQCGBMCxGZqrjj3h7fQijf1Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.68.9.tgz", + "integrity": "sha512-oagkVYyesngXT4SmFKcGigT1rOZm/uYYowzg7JPP2k9wngF8cw8Kaunzn+HjejJl+Ec2ZD1F68hiXw2FB4cHYA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.68.9.tgz", + "integrity": "sha512-uDyXfmD1FCL+6WtyjhHDjqBKl4j0Kej11iQybR6+h72o5fFL6xyEmWsQWoMngJph9tOeiCeD45f+X0OccYyRlQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.68.9.tgz", + "integrity": "sha512-sHr4zSqntivPmVau57RrRBMEoTqW8V/iLLfWghbvWcLMOR9PuswVASI4cGA4rJ3PLt8rynrNGK5tVftrH2g+dw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.68.9.tgz", + "integrity": "sha512-WCZET31LREmsAQCWictbgAdkJLejg7Gzm7hYL51wEROMZ7gziQK38WEfLKRp1Rdm2jnwnLxoJu7ttpjHQWr9CQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.68.9.tgz", + "integrity": "sha512-UwlCeuUlZqWrLpw4LuMgfpp+2e0HOe7cnbkUPoICxCtAFVv3IaB1qKfGaC/iRG3T29hGuzX1Dr20/rqtuVN4bw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.68.9.tgz", + "integrity": "sha512-NgU7PKTSftWBK2wecMH/McGvM3a4nSa/I8zoS8o22sjPSScuGGyAfr1FoDQWEs+iuvFEQ/PKuRcZ3vO5u0Xqjw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.68.9.tgz", + "integrity": "sha512-xbFrHua9IPguaCF7I2bRiebq/OGdIJbHbTUruHMrVD91CcIxhNRpkl2JAiGEPpPaqW7hJLUbroXQ07Kde/ziGg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.68.9.tgz", + "integrity": "sha512-7xXs09Zvhwb0aaVJQ+t+NZYp/G7SMKxt+0BVsoNVP1ckLsTxazNBeqL8b91STBOOPj0o/6NEGLXnFaICm9Yi5Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@tailwindcss/node": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.5.tgz", + "integrity": "sha512-yT53FzV4ke0cr/BguDxhWMpm5MJu1O2muzk+tKw6lKHjODAsYArBbWwFbJiaksfzFv1tpkO9QHGzmfs1hJT66g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "^5.24.5", + "jiti": "^2.7.0", + "lightningcss": "1.33.0", + "magic-string": "^1.1.0", + "source-map-js": "^1.2.1", + "tailwindcss": "4.3.5" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.5.tgz", + "integrity": "sha512-PynqGLZsZvwM9tqD/CUxkOIfyd6K5elZ2MooauzJryP/UqXYgi3yYbtt3N0Xe+MHV/eFKPFQCEfIKAqlAS1CBg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.3.5", + "@tailwindcss/oxide-darwin-arm64": "4.3.5", + "@tailwindcss/oxide-darwin-x64": "4.3.5", + "@tailwindcss/oxide-freebsd-x64": "4.3.5", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.5", + "@tailwindcss/oxide-linux-arm64-gnu": "4.3.5", + "@tailwindcss/oxide-linux-arm64-musl": "4.3.5", + "@tailwindcss/oxide-linux-x64-gnu": "4.3.5", + "@tailwindcss/oxide-linux-x64-musl": "4.3.5", + "@tailwindcss/oxide-wasm32-wasi": "4.3.5", + "@tailwindcss/oxide-win32-arm64-msvc": "4.3.5", + "@tailwindcss/oxide-win32-x64-msvc": "4.3.5" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.5.tgz", + "integrity": "sha512-Se0z5xMqcSQanJD1IYmO0cGpK3iv0fp3ZsIT7xRJZ1Da5PghvNoc46zz4jIQn+aan3dV9T8AermFNN9QPmsh0Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.5.tgz", + "integrity": "sha512-UPrgTDuUbvmqGMZuCnmI3FKee/tYKzKdp00/kuB4oSGB213VYg8QTdF7lVhnPoBXq/mIfJ+ILoBFqNOboWcMwQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.5.tgz", + "integrity": "sha512-E+p7HEtjI0b8D7kbbWxH067cGui6d4c79COGko9fAPVE3rwc1E7ld2HFCbaG86AOGWS5VKQYqZOaf38ya4uxTQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.5.tgz", + "integrity": "sha512-yWEWcWyAG7rWOcTpJTjdhQ3pcaFY2h+0bqTRfgU3G2fz87ZU3AKdvdZKhslD+kyHnjBUWKvNdRYwIYC5dI1tIg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.5.tgz", + "integrity": "sha512-WmeVjtJhZlr+smpqcdR2kQkkn6arHIJnUIBxTO2EJcTLGY1ecVXNo2hbSn8xc0IH2aEtys936iMWKGyj0GaKnA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.5.tgz", + "integrity": "sha512-DTCSyucc6ShMp1QMqV5R94Z7xlgNgUzkGmFF1rL5HH2Qjy4eSmEqy+YLGkqqYvWa4sILtgrBt1JjRKbneQtiFQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.5.tgz", + "integrity": "sha512-H9lsvO4x9E4nE4Hi8h7NHHw0O/kcVSu+iOyFHNGdYzazGgDjFHZbE6S3hQ8kMcbNXSBlMdNi67LV5EVqtpaJtw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.5.tgz", + "integrity": "sha512-4uxQvtBvPuIdl13WfUBj9xMZHH14PtHZ8OZdtLmdyDtG66sCa1t599NZT+jagkUzRtWhuul1qRZQ1nAJscXN5g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.5.tgz", + "integrity": "sha512-0JQAzs7jwbA7O6+z/adU+Jk3AXwsu3npAhtr5escXS7TqEqWcaDV7qHuI+0Vy/KQRuVGnLQREcSJWYauyV3oqg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.5.tgz", + "integrity": "sha512-OJhFmlEfdzMr+avACdi40RPtnkW0B6hXyxL/8r+tnEHBWZji36CYRjEXrrvgBmaYsD3oEOBqwYFRKsYvzFe7Bw==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.11.3", + "@emnapi/runtime": "^1.11.3", + "@emnapi/wasi-threads": "^1.2.3", + "@napi-rs/wasm-runtime": "^1.2.2", + "@tybys/wasm-util": "^0.10.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/core": { + "version": "1.11.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.3", + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/runtime": { + "version": "1.11.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/wasi-threads": { + "version": "1.2.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { + "version": "1.2.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.3" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1 || ^2.0.0-alpha.3", + "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.3" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@tybys/wasm-util": { + "version": "0.10.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/tslib": { + "version": "2.8.1", + "dev": true, + "inBundle": true, + "license": "0BSD", + "optional": true + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.5.tgz", + "integrity": "sha512-9o8jgthi+QE5eandnboiJT64VQfnIArfZzSTdgbhEK5aafdiu2jTW9Honi/mwYHxBZuH1vAC57IFyrh+0iK5Gg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.5.tgz", + "integrity": "sha512-XiKFfIy1RWe7qK4WqByxNW7Oz1/nkOy8o/BWhHminyV1PmpUd8Eedj5v2A8h2kpqeVlz6xRnwk9Fr/ZXNLcZfg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.5.tgz", + "integrity": "sha512-BCNiY0a1ZjdOHVqw7kyb7U72BwfMF3dfUuN+tQsLWky/J5JOI/r7abibglXfygrZhVO/3u3V+E25kkKTeMkXaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.3.5", + "@tailwindcss/oxide": "4.3.5", + "tailwindcss": "4.3.5" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7 || ^8" + } + }, + "node_modules/@tauri-apps/api": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.13.0.tgz", + "integrity": "sha512-O0uLpOZcFxbHMtkSv8sE6WNTuoUu4pOHtKQn0R6GPAFNJaOgaFa+LrR3emw1jRWA9ebVC8PZUS3Q2p881yFNrA==", + "license": "Apache-2.0 OR MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/tauri" + } + }, + "node_modules/@tauri-apps/cli": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.13.0.tgz", + "integrity": "sha512-NhPUU24BnPfofhfPlPCJFPHVG9sVq7B4V9zGCRXFEhXFeNnLtjwnHSDoiR3IXoJUumsKd/q6sNLsMr/rr88GBQ==", + "dev": true, + "license": "Apache-2.0 OR MIT", + "bin": { + "tauri": "tauri.js" + }, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/tauri" + }, + "optionalDependencies": { + "@tauri-apps/cli-darwin-arm64": "2.13.0", + "@tauri-apps/cli-darwin-x64": "2.13.0", + "@tauri-apps/cli-linux-arm-gnueabihf": "2.13.0", + "@tauri-apps/cli-linux-arm64-gnu": "2.13.0", + "@tauri-apps/cli-linux-arm64-musl": "2.13.0", + "@tauri-apps/cli-linux-riscv64-gnu": "2.13.0", + "@tauri-apps/cli-linux-x64-gnu": "2.13.0", + "@tauri-apps/cli-linux-x64-musl": "2.13.0", + "@tauri-apps/cli-win32-arm64-msvc": "2.13.0", + "@tauri-apps/cli-win32-ia32-msvc": "2.13.0", + "@tauri-apps/cli-win32-x64-msvc": "2.13.0" + } + }, + "node_modules/@tauri-apps/cli-darwin-arm64": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.13.0.tgz", + "integrity": "sha512-xqWG7E1j6HEcU0ZMXIxNP5MqtR3LKfvb+6iH5bvG6e3QgpaEP1Syz/j1fnX7M55Raqi6Rs4FJGTHlsG8C65Mtg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-darwin-x64": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.13.0.tgz", + "integrity": "sha512-L4WEEqEc7WH3KFCnbpSUnlPud5Qs/CQ+i1USaOvhwTy3PO3JpeW1sTKB7WKUG9QeGke7tE1KL8liVd8/3lpqgg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm-gnueabihf": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.13.0.tgz", + "integrity": "sha512-SRjozN64oQgs1I8ErMsNqTKmlSSyAQ9yVM7X+0FUkZQ0isqx42qOzJ02HkKhoEG/+ucZ15HjsL+LEe0ooFjxVg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm64-gnu": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.13.0.tgz", + "integrity": "sha512-ZZWiHcyrtLCCoUdfOBVWazKwDtc/c09BXrxziXcL2lUSnUBOWpzd9ROo0EzNDGDJEFB8S4cQHx+wRG6GL2MyFA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm64-musl": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.13.0.tgz", + "integrity": "sha512-0W9GgBF155WPbcVnYJHxDxVXDM/gYSywGKfGZIQrMMLv03AqeMcc+mxz4/NZBT5FO36jHPxhy8VNiy0yk+qfzQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-riscv64-gnu": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.13.0.tgz", + "integrity": "sha512-1kKCOh768IIoqgE4o7g5zhi5SnbzqW8p82RmPcg8zFYLb17+LNwvMzpJexUWqIM2U2QkbT8rH0wfcjiaR6rTDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-x64-gnu": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.13.0.tgz", + "integrity": "sha512-Riq+64bPGAFoLjgnqcslFIb0Rijnm5oCjLCX6xZETWClNPMADmHflCyNwLO7XO3s97Uv6ZX2yTnpwULAyII08A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-x64-musl": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.13.0.tgz", + "integrity": "sha512-xbkW27qp9+YrU1pLebEJy300jH9NtUWEAMpMsCYS3KiZ00jv9ui3p26YWINhTgo+Yj53CDTK9B7ROViCKAluqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-arm64-msvc": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.13.0.tgz", + "integrity": "sha512-gjjU8TYHXPenmQvmdvJYwGX1KNHBG/3dXviJvBuX2S1hV4uOFMulTVWnPKPn3N/HgfCn0p5+7HzPKKobdNAfSg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-ia32-msvc": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.13.0.tgz", + "integrity": "sha512-9Ln67dSuuIaVJAhdvOnJOtD9gQxeHCvhQ6OcbkxaM0EZu1Ed1ZqxImpyVBov6c7AJfzpollO93i7ZXJGsnYMtQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-x64-msvc": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.13.0.tgz", + "integrity": "sha512-IPcIRMjzAXgYTH+rQxFQFwrHu4/3txIA2ONNmQpWUCHXQgukazrPYJrKaMJSjDh83ysbusjsQ16Z89qhtxFNJA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/plugin-dialog": { + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-dialog/-/plugin-dialog-2.8.4.tgz", + "integrity": "sha512-+6ZOiXenOaxXwb8qCbBPdT2jX2cFPaVVHGIskrpmJLpmWj+qKRTD6X/z9x7hTdSQn7NedcoXCkWGej4a7dC4lw==", + "license": "MIT OR Apache-2.0", + "dependencies": { + "@tauri-apps/api": "^2.12.0" + } + }, + "node_modules/@tauri-apps/plugin-opener": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-opener/-/plugin-opener-2.7.3.tgz", + "integrity": "sha512-Nm+v7vLBCDzYZxrmCJhpMgtPsPsKt5myMs7SMU/aBjPOmAFI1RrHfhMz7t5KlxjMOzRcelyNq1/j0pmC9SmBVA==", + "license": "MIT OR Apache-2.0", + "dependencies": { + "@tauri-apps/api": "^2.12.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/estree": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.11.tgz", + "integrity": "sha512-YBdNe5JcjYR0sPhJW1QIeRCmI11YhYvaRuGCs9+WCeTTb+Yhb2BE2XMe5/wAqF10FK5g3+q1PDhQABfT7aX0gg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "19.3.3", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.3.tgz", + "integrity": "sha512-K8uWpJc4teiuOPdiP1umjeA9rGMgVPiXuoL66fcS1QlwBT1WMqY8PORmub9FadopIs+RCW6siYEs7Lpq+vDlog==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.3.0.tgz", + "integrity": "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.3.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", + "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.28.0", + "@babel/plugin-transform-react-jsx-self": "^7.27.1", + "@babel/plugin-transform-react-jsx-source": "^7.27.1", + "@rolldown/pluginutils": "1.0.0-beta.27", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.17.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.11.40", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.40.tgz", + "integrity": "sha512-WJhaQ3kW5+5BpOduI64ewvykhCyK/IHHG5jCIzivmW2nkYPRowUjs0DbBXY4CAr1LLrN7QEzZGL9727aXH9sJA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/browserslist": { + "version": "4.29.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.6.tgz", + "integrity": "sha512-CmVVIQ3RVc5HxYEc9X84GvxK/C8C1wH8TlKAiO7uTxF8PDwt7r8t9Qk3J9NkMOVzX5O/HbLv3yzxZg9HPrnI9w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "baseline-browser-mapping": "^2.11.37", + "caniuse-lite": "^1.0.30001826", + "electron-to-chromium": "^1.5.486", + "node-releases": "^2.0.64", + "update-browserslist-db": "^1.4.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001829", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001829.tgz", + "integrity": "sha512-FeVvlaVr3r+cdHIYXyZhtVkqroSYjYaoNxItxQNjusurUE+IqODawDsbzk02HJgi2RdKiaGGFm+EKbXku+yITg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.4.tgz", + "integrity": "sha512-PoKaoPzQapnEoqUSnHx1u6W6ku8CVEgKsnpmmzU3m1nwkidpPBQ8V/Zq2+bWNrsOKoKLwTGdbx6xF7BXP1zLVQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.495", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.495.tgz", + "integrity": "sha512-dZcmtNbDI5oeT9uP9Z+D7h/H5C1mvBewDTLgZgo9WgyPmqOXSt2cmoCK99evPygUOn9lyXZ4w0Eb8APrkBjqBA==", + "dev": true, + "license": "ISC" + }, + "node_modules/enhanced-resolve": { + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.27.0.tgz", + "integrity": "sha512-Do6BB2xzlcc/odFg+XEYyneAx4T/WfywO71yw9ePS2tVfRsf7JVR4mUeELadIeHzixkzbG5DpluiEFPi2WGfYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.12", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.12.tgz", + "integrity": "sha512-iuyGF2E4oafQfPsRrG2wtY2ILupMhvtdrhzrxB+0VcjsPpSPttpfYdjnGFGsTi5MaJFjI1jOKHPQ6UTbTj9TAw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/jiti": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", + "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/lucide-react": { + "version": "0.511.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.511.0.tgz", + "integrity": "sha512-VK5a2ydJ7xm8GvBeKLS9mu1pVK6ucef9780JVUjw6bAjJL/QXnd4Y0p7SPeOUMC27YhzNCZvm5d/QX0Tp3rc0w==", + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/magic-string": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.5.tgz", + "integrity": "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.6.0" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.66", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.66.tgz", + "integrity": "sha512-uSMWN9/XtWzxaE0d9ZNHe00Hda6028AXH3WRjTsK71neiPCSeL5nGSD9MXTQX/6Qx0k7Op1AyyinmIUw9fBzrg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.34", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.34.tgz", + "integrity": "sha512-P1Qzj0XXZjMda74C7qiVnBG90UKNbyNUAOeQRBW8X63RsIMV57gevRqjnkELdwtZ/S2/uQFksJhmwuN8xShLPw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.4" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/react": { + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-19.3.1.tgz", + "integrity": "sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.3.1.tgz", + "integrity": "sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.28.0" + }, + "peerDependencies": { + "react": "^19.3.1" + } + }, + "node_modules/react-refresh": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", + "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.68.9", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.68.9.tgz", + "integrity": "sha512-cv6sHP984hH1Wo4m1yBwyYOTtOVczamnB4KapDqQHCJZLVsMNDsEEP3/+6mHkt7NIAeVGPoE+fFKXRBL5dIjHg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.10" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.68.9", + "@rollup/rollup-android-arm64": "4.68.9", + "@rollup/rollup-android-x64": "4.68.9", + "@rollup/rollup-darwin-arm64": "4.68.9", + "@rollup/rollup-darwin-x64": "4.68.9", + "@rollup/rollup-freebsd-arm64": "4.68.9", + "@rollup/rollup-freebsd-x64": "4.68.9", + "@rollup/rollup-linux-arm-gnueabihf": "4.68.9", + "@rollup/rollup-linux-arm-musleabihf": "4.68.9", + "@rollup/rollup-linux-arm64-gnu": "4.68.9", + "@rollup/rollup-linux-arm64-musl": "4.68.9", + "@rollup/rollup-linux-loong64-gnu": "4.68.9", + "@rollup/rollup-linux-loong64-musl": "4.68.9", + "@rollup/rollup-linux-ppc64-gnu": "4.68.9", + "@rollup/rollup-linux-ppc64-musl": "4.68.9", + "@rollup/rollup-linux-riscv64-gnu": "4.68.9", + "@rollup/rollup-linux-riscv64-musl": "4.68.9", + "@rollup/rollup-linux-s390x-gnu": "4.68.9", + "@rollup/rollup-linux-x64-gnu": "4.68.9", + "@rollup/rollup-linux-x64-musl": "4.68.9", + "@rollup/rollup-openbsd-x64": "4.68.9", + "@rollup/rollup-openharmony-arm64": "4.68.9", + "@rollup/rollup-win32-arm64-msvc": "4.68.9", + "@rollup/rollup-win32-ia32-msvc": "4.68.9", + "@rollup/rollup-win32-x64-gnu": "4.68.9", + "@rollup/rollup-win32-x64-msvc": "4.68.9", + "fsevents": "~2.3.2" + } + }, + "node_modules/scheduler": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz", + "integrity": "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.2.tgz", + "integrity": "sha512-GYrCADwpu6yV5OAvchkQ27Z5wwMxWAEMg5NNWjyHh/5DboFFqbdbvYNIvZouQpxXyeMPoTOh0vdPYKlf0ZswdQ==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/source-map-js": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.4.tgz", + "integrity": "sha512-J7ZjMvHd9O1fcT/5V09QWaaSl2BbWx3F6O08spde82Namf9UB0GxRVIPiNbVsdKkoizHiSpTodo3vp2bAy91MA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/tailwindcss": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.5.tgz", + "integrity": "sha512-FcQk9BuffmEHJP2G0XmB2SplU1aLTI7j07Kunk+U74Ny+XiWOtzXz9aujFZ/avntw1e2cOv/3PkgzflQ7gX2vQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.4.tgz", + "integrity": "sha512-NHFiWnAbMJxNNpBwiO7jJVGDuqMxT9/oV8v57RR+fgBQShkJil5inGD8/xWy0hjLyHQyX1tu27QANhlz3KBqCg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "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/update-browserslist-db": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.4.0.tgz", + "integrity": "sha512-WPJuOnjI9FWDct4fB+ej4Mz8opLaw5CDcZ2t44tFZ0vIQVYWzBhWR3mkixuUj/A7+vY4V9+ApOZ2YYLwdgq46w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/vite": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.6.tgz", + "integrity": "sha512-RtsraAwEG68idOA6iUOoIpOlcSKROnf815aIq9qHTSrDNpLoBrBa12suyfcEd8qn0xwOVQI1Yhm1GbmTjF600A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "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==", + "dev": true, + "license": "ISC" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..93f44ba --- /dev/null +++ b/package.json @@ -0,0 +1,30 @@ +{ + "name": "romm-companion", + "private": true, + "version": "0.1.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview", + "tauri": "tauri" + }, + "dependencies": { + "@tauri-apps/api": "^2.5.0", + "@tauri-apps/plugin-dialog": "^2.2.1", + "@tauri-apps/plugin-opener": "^2.2.6", + "lucide-react": "^0.511.0", + "react": "^19.1.0", + "react-dom": "^19.1.0" + }, + "devDependencies": { + "@tailwindcss/vite": "^4.1.7", + "@tauri-apps/cli": "^2.5.0", + "@types/react": "^19.1.4", + "@types/react-dom": "^19.1.4", + "@vitejs/plugin-react": "^4.7.0", + "tailwindcss": "^4.1.7", + "typescript": "^5.8.3", + "vite": "^6.3.5" + } +} diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock new file mode 100644 index 0000000..222efb8 --- /dev/null +++ b/src-tauri/Cargo.lock @@ -0,0 +1,5800 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2fb6cfd47bf496ff64095c20eaba0c201404ee38714d4142fcfa1dc334fcc7a" + +[[package]] +name = "alloc-stdlib" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5c1865780388bfa186411ab5f247819487fc4864c6e9c3106611fa347586e1" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cb931c189b85683d69a5cfad41d4d418671e1ac413dd209f3f2fc31e3cfd902" + +[[package]] +name = "arbitrary" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bc62ac97cc33321f50863d514c3bc38a453947a8f9e781137e47c7401020aed" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "async-broadcast" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-channel" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f426a31126c735126297bc5ea7a521263c9faff4f63ca415267ee625651c4f37" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" +dependencies = [ + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-lock" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0876700b0d007ad25d5508865a4259c3af9af6d296bf663a0d586d0bc3369f6f" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-process" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" +dependencies = [ + "async-channel", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix", +] + +[[package]] +name = "async-recursion" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f8abc12baad266b1c8cec146854c195b5864b4221d4b2ca7296a7ae82d9e451" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "async-signal" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix", + "signal-hook-registry", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-trait" +version = "0.1.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "atk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b" +dependencies = [ + "atk-sys", + "glib", + "libc", +] + +[[package]] +name = "atk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec 0.8.0", +] + +[[package]] +name = "bit-set" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56d87354e4229f54a44f7bf2435906a4656dba36026ab6eaca629a2c436a691c" +dependencies = [ + "bit-vec 0.10.2", +] + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bit-vec" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72503af1e72be411d74ca45cd6b309878fcb35354e252fc2a3a8bda3a97082a0" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" +dependencies = [ + "serde_core", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + +[[package]] +name = "blocking" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a70e4329df6cb94385eed412ec92375c3cdd8a6e502493d1229b6414e4036dfa" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + +[[package]] +name = "brotli" +version = "9.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9071f285ed78f04f37d675abaaef5de7689e2f30a216c8dc6795465d81910a13" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "6.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "664148598c930650998ef56df301329ffe7b4cdb02d49b2a3fca3bcaf2185bcb" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + +[[package]] +name = "bytes" +version = "1.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "776dfebd015e2d8732c684a2c71003674ccb49457b539b9e82151ba38e96dd7c" +dependencies = [ + "serde", +] + +[[package]] +name = "cairo-rs" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" +dependencies = [ + "bitflags 2.13.2", + "cairo-sys-rs", + "glib", + "libc", + "once_cell", + "thiserror 1.0.69", +] + +[[package]] +name = "cairo-sys-rs" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "camino" +version = "1.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbbad30e4b4c14a39e3cc8aed085a12a327257c316619c93581e017bc52be591" +dependencies = [ + "serde_core", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror 2.0.21", +] + +[[package]] +name = "cargo_toml" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f4b26e751e711a5302649417f2da046dce6391b2ea30a4820f37462314f0b9" +dependencies = [ + "semver", + "serde", + "toml 1.2.3+spec-1.1.0", +] + +[[package]] +name = "cc" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95e45cf2980b2d467be49a9ed942c9179b701063a7ca3d037de7ee9bd67f8d66" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfb" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a347dcabdae9c31b0825fd6a8bed285ec9c2acb89c47827126d52fa4f59cece3" +dependencies = [ + "fnv", + "uuid", + "web-time", +] + +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.1", + "rand_core", +] + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "combine" +version = "4.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4356eba6976435498d05a311ee9fc486da3bc81c200d3f0d7dd9703b41913f92" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "const-oid" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be95d4a884358a21a199689323c29e9256b4a1b315e22f183d155422041d3a9a" + +[[package]] +name = "cookie" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d55f2d6c30eeec7d5c6f98bd4395d4abb1895629eab97ee6522d340623615f8a" +dependencies = [ + "time", + "version_check", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97" +dependencies = [ + "bitflags 2.13.2", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" +dependencies = [ + "bitflags 2.13.2", + "core-foundation", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd9ae8fcb3ea71b0b26338b4ffb13006bb175de8fd07921089a906ce7e5e6945" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-common" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "cssparser" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9cdaae01d5ed7882b04d795e7f752f46ff52d2fa3b50a20d28c464510bba98" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa", + "phf 0.13.1", + "smallvec", +] + +[[package]] +name = "cssparser" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11119743ad110e8c1bdccd930d7f5c30c99e5fc76a7b63ec9807e84eef0c5f59" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa", + "phf 0.14.0", + "smallvec", +] + +[[package]] +name = "cssparser-macros" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d045de693cb712d0b22c6a64be5b953f67b3ce00ab5ad3dd5d8b441886ab8e1a" +dependencies = [ + "quote", + "syn 3.0.10", +] + +[[package]] +name = "ctor" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea691ed9f36489d087419b8b2ba3ef27d89621380b4178c73e2445a379e4e0f4" +dependencies = [ + "link-section", +] + +[[package]] +name = "darling" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed17f5901b6630b993ca003def43f2f8ef4014fc13b047b57aad617ff32bc2ec" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6837e2cf7485aaae18f86181d2f0e9a7ed297a025e220aeabf63fdebd3a2ddff" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 3.0.10", +] + +[[package]] +name = "darling_macro" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ac7135c3ef02b2f7833bbeb1be5ba7f966dcde8a87c6b87f65a778d71a02785" +dependencies = [ + "darling_core", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "dbus" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab69f03cc8c4340c9c8e315114e1658e6775a9b16a04357973aa21cec22b32e" +dependencies = [ + "libc", + "libdbus-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "deranged" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e" +dependencies = [ + "serde_core", +] + +[[package]] +name = "derive_arbitrary" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b034bd7d5f032402a2479444dcc6f74e36a03f31854d41680fb240ef682a1ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.119", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common 0.1.7", +] + +[[package]] +name = "digest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" +dependencies = [ + "block-buffer 0.12.1", + "const-oid", + "crypto-common 0.2.2", +] + +[[package]] +name = "directories" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16f5094c54661b38d03bd7e50df373292118db60b585c08a411c6d840017fe7d" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d57d423b3c82e89b9a24ca3091fee61f456a26edbd28d26c65906f4bc1dcd8f" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.61.2", +] + +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.13.2", + "block2", + "libc", + "objc2", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "dlopen2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2c5bd4158e66d1e215c49b837e11d62f3267b30c92f1d171c4d3105e3dc4d4" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbbb781877580993a8707ec48672673ec7b81eeba04cfd2310bd28c08e47c8f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "dom_query" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fac5fca71e65e94cc718a6e2af65d6e0f9c6027751c2aa562fbb5087fda639bc" +dependencies = [ + "bit-set 0.8.0", + "cssparser 0.37.0", + "foldhash", + "html5ever 0.39.0", + "precomputed-hash", + "selectors 0.38.0", + "tendril", +] + +[[package]] +name = "dom_query" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35b4f772a1a8b88e5545a67c2d3a62a93d4edccc5a68f2145fe52e39c96d275" +dependencies = [ + "bit-set 0.11.1", + "cssparser 0.38.0", + "foldhash", + "html5ever 0.40.1", + "precomputed-hash", + "selectors 0.41.0", + "tendril", +] + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" +dependencies = [ + "serde", +] + +[[package]] +name = "dtoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" + +[[package]] +name = "dtoa-short" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" +dependencies = [ + "dtoa", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "embed-resource" +version = "3.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6168487b5e7eb2673e6efe1200b1848016e436a6ca0b8031bf04bd9d493a249f" +dependencies = [ + "cc", + "memchr", + "rustc_version", + "toml 1.2.3+spec-1.1.0", + "vswhom", + "winreg", +] + +[[package]] +name = "embed_plist" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" + +[[package]] +name = "endi" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" + +[[package]] +name = "enumflags2" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "equivalent" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" + +[[package]] +name = "erased-serde" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e59b668157f32d3459d4bd634861a06ffa2503a461ca5f0916b9f0252605e66" +dependencies = [ + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "errno" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35d6e78f4cebb90e51d543db8fe41528851d6deeef6ef21ebd4bfdc1e784776" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "event-listener" +version = "5.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" +dependencies = [ + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "field-offset" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +dependencies = [ + "memoffset", + "rustc_version", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e44f110d1777dc6559a51e7d45083945ded4f1bf3305494350f693b6d20b9c8" + +[[package]] +name = "flate2" +version = "1.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626d4928326b646e70f65ed36fc7cf9f206bdb68a0019ee7c6b4709da4e084c4" +dependencies = [ + "crc32fast", + "miniz_oxide 0.9.1", + "zlib-rs", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afa489199eaffb1211795df1c6236ce1ad0d41a6fa45250add73e3b02420f06e" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-executor" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" + +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "futures-sink" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "gdk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691" +dependencies = [ + "cairo-rs", + "gdk-pixbuf", + "gdk-sys", + "gio", + "glib", + "libc", + "pango", +] + +[[package]] +name = "gdk-pixbuf" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" +dependencies = [ + "gdk-pixbuf-sys", + "gio", + "glib", + "libc", + "once_cell", +] + +[[package]] +name = "gdk-pixbuf-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gdk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkwayland-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "140071d506d223f7572b9f09b5e155afbd77428cd5cc7af8f2694c41d98dfe69" +dependencies = [ + "gdk-sys", + "glib-sys", + "gobject-sys", + "libc", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkx11" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3caa00e14351bebbc8183b3c36690327eb77c49abc2268dd4bd36b856db3fbfe" +dependencies = [ + "gdk", + "gdkx11-sys", + "gio", + "glib", + "libc", + "x11", +] + +[[package]] +name = "gdkx11-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e7445fe01ac26f11601db260dd8608fe172514eb63b3b5e261ea6b0f4428d" +dependencies = [ + "gdk-sys", + "glib-sys", + "libc", + "system-deps", + "x11", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 6.0.0", + "rand_core", + "wasm-bindgen", +] + +[[package]] +name = "gio" +version = "0.18.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "gio-sys", + "glib", + "libc", + "once_cell", + "pin-project-lite", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "gio-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "winapi", +] + +[[package]] +name = "glib" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" +dependencies = [ + "bitflags 2.13.2", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "memchr", + "once_cell", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "glib-macros" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" +dependencies = [ + "heck 0.4.1", + "proc-macro-crate 2.0.2", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "glib-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +dependencies = [ + "libc", + "system-deps", +] + +[[package]] +name = "glob" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" + +[[package]] +name = "gobject-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gtk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a" +dependencies = [ + "atk", + "cairo-rs", + "field-offset", + "futures-channel", + "gdk", + "gdk-pixbuf", + "gio", + "glib", + "gtk-sys", + "gtk3-macros", + "libc", + "pango", + "pkg-config", +] + +[[package]] +name = "gtk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414" +dependencies = [ + "atk-sys", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "system-deps", +] + +[[package]] +name = "gtk3-macros" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "735eaa21a6a5ffb2e84362faaeb90c05ba8e19797ca30428478cb6ea3a4921bc" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hostname" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617aaa3557aef3810a6369d0a99fac8a080891b68bd9f9812a1eeda0c0730cbd" +dependencies = [ + "cfg-if", + "libc", + "windows-link", +] + +[[package]] +name = "html5ever" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a1761807faccc9a19e86944bbf40610014066306f96edcdedc2fb714bcb7b8" +dependencies = [ + "log", + "markup5ever 0.39.0", +] + +[[package]] +name = "html5ever" +version = "0.40.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456a1a377e608e555d22ddab27ac0114bc7a7b4199078108e34c2aeae6c9b130" +dependencies = [ + "log", + "markup5ever 0.40.0", + "memchr", +] + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hybrid-array" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17" +dependencies = [ + "typenum", +] + +[[package]] +name = "hyper" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229c6ff5584df4c6becbfe00567128bac768c8cd32ebc8a8366bd81ed072e8f3" +dependencies = [ + "atomic-waker", + "bytes", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa8e654703247911e29c23fbeaa261834bd9bb74efba2f9acddc37bfb127f53" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-util" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc03d96684f9226b8a787cdb71488417b53ab5ea8fdb1dac946cb9431cc8bff" +dependencies = [ + "base64 0.23.1", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "httparse", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ico" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75e94d66081e4d8dcd098bd8dc5254800fea14a26389b298410158d834de167" +dependencies = [ + "byteorder", + "png", +] + +[[package]] +name = "icu_collections" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe090a42a0d3140fed8c63263ed1fecc02422cb2f4bfe55cd8de2de1b8e105dd" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25d29b57c17c6528d0dc4c2141cfa2d08200465acb537a3909c8b9b8a4a984c0" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "404a3b8c486f205c87fe7f23ab6894d84a4ad76d6e4671ae1981ba7def87c599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20f0088bfb7441f7a37fa0c9e20cb1e9cba1cac6b9ce8cd2a6dc44294f8e8cbc" + +[[package]] +name = "icu_properties" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ea83d991c56158f7cf898bf86436c1dfe7c07ee82fe88951f2695c9f37a379f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98f29af82d02b163fe50161388350e743bb3107cc8e8c2f7314cb505faddfcf" + +[[package]] +name = "icu_provider" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413099315636c588ee8f011190b329b971a09a8fae9d157e01dcae8379468514" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "image" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +dependencies = [ + "bytemuck", + "byteorder-lite", + "moxcms", + "num-traits", + "png", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" +dependencies = [ + "equivalent", + "hashbrown 0.17.2", + "serde", + "serde_core", +] + +[[package]] +name = "infer" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4200d433cbd5178df7797c9c2e75b348b728e39631cf14520d1e2fc424201f4" +dependencies = [ + "cfb", +] + +[[package]] +name = "inotify" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cc00ea907cab49550b7da656f80ebb97be1b997d931fbcd28d39734e17ce592" +dependencies = [ + "bitflags 2.13.2", + "inotify-sys", + "libc", +] + +[[package]] +name = "inotify-sys" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c033f80b2c113cdf91ab7a33faa9cbc014726dcad99880c8609af2a370edf37d" +dependencies = [ + "libc", +] + +[[package]] +name = "ipnet" +version = "2.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" + +[[package]] +name = "is-docker" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" +dependencies = [ + "once_cell", +] + +[[package]] +name = "is-wsl" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +dependencies = [ + "is-docker", + "once_cell", +] + +[[package]] +name = "itoa" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4" + +[[package]] +name = "javascriptcore-rs" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc" +dependencies = [ + "bitflags 1.3.2", + "glib", + "javascriptcore-rs-sys", +] + +[[package]] +name = "javascriptcore-rs-sys" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "jiff" +version = "0.2.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175dc66334db3b9ab9985bf8b61cfed50dc16d20964bb47f9e479adcae984a7f" +dependencies = [ + "jiff-core 0.1.8", + "jiff-static 0.2.46", + "jiff-tzdb-platform 0.1.3", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", + "windows-link", +] + +[[package]] +name = "jiff" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "107f2e89536b6818514025f6787b0d94d819e54fe3b40365275fc753de485b3f" +dependencies = [ + "jiff-core 1.0.2", + "jiff-static 1.0.3", + "jiff-tzdb-platform 1.0.0", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", + "windows-link", +] + +[[package]] +name = "jiff-core" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e599b80292e597019b8b3e392de3f4bea2959ddfb8c7dff60e035e9e311a2c1b" +dependencies = [ + "log", +] + +[[package]] +name = "jiff-core" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d44c923edf2bf456a982253f1a9ee1f6e89e421dffd0065d9b9a581da0def58f" +dependencies = [ + "log", +] + +[[package]] +name = "jiff-static" +version = "0.2.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7b1af7547d47354bc438d797e3854601bde8f8d185780c5ba4ab27afa54f1ba" +dependencies = [ + "jiff-core 0.1.8", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jiff-static" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4996f71e569e3a3e32b925c28ef8f0027dc30bb1d594b33eeda409eea185f5c8" +dependencies = [ + "jiff-core 1.0.2", + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "jiff-tzdb" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0980fca2cc272465bd60e82397607ba9f33add9e48defd77923301bbd03808f2" + +[[package]] +name = "jiff-tzdb" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12e71a1b68a875a44a33bb7a1dd84392cb77145a3367a552a3cfe6a4f5cf3afc" + +[[package]] +name = "jiff-tzdb-platform" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" +dependencies = [ + "jiff-tzdb 0.1.10", +] + +[[package]] +name = "jiff-tzdb-platform" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc65b284afcfa8f6cf189c7274c805505314a7ab975c60e1f548bff56525420e" +dependencies = [ + "jiff-tzdb 1.0.0", +] + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys 0.3.1", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "js-sys" +version = "0.3.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "json-patch" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7421438de105a0827e44fadd05377727847d717c80ce29a229f85fd04c427b72" +dependencies = [ + "jsonptr", + "serde", + "serde_json", + "thiserror 2.0.21", +] + +[[package]] +name = "jsonptr" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5a3cc660ba5d72bce0b3bb295bf20847ccbb40fd423f3f05b61273672e561fe" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "keyboard-types" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbe853b403ae61a04233030ae8a79d94975281ed9770a1f9e246732b534b28d" +dependencies = [ + "bitflags 2.13.2", + "serde", +] + +[[package]] +name = "kqueue" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d763e5b24120b4ddf50de6c92308156765aabfbbccebf401da7cff2d70a41ea" +dependencies = [ + "kqueue-sys", + "libc", +] + +[[package]] +name = "kqueue-sys" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07293a4e297ac234359b510362495713f75ea345d5307140414f20c69ffeb087" +dependencies = [ + "bitflags 2.13.2", + "libc", +] + +[[package]] +name = "libappindicator" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" +dependencies = [ + "glib", + "gtk", + "gtk-sys", + "libappindicator-sys", + "log", +] + +[[package]] +name = "libappindicator-sys" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" +dependencies = [ + "gtk-sys", + "libloading", + "once_cell", +] + +[[package]] +name = "libc" +version = "0.2.191" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" + +[[package]] +name = "libdbus-sys" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "328c4789d42200f1eeec05bd86c9c13c7f091d2ba9a6ea35acdf51f31bc0f043" +dependencies = [ + "pkg-config", +] + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libredox" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" +dependencies = [ + "libc", +] + +[[package]] +name = "link-section" +version = "0.19.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d9aae57673c1a235149777a74d152f3210ebd3e3b13346d2cdb6809e566bd3c" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c" + +[[package]] +name = "lru-slab" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f" + +[[package]] +name = "markup5ever" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7122d987ec5f704ee56f6e5b41a7d93722e9aae27ae07cafa4036c4d3f9757de" +dependencies = [ + "log", + "tendril", + "web_atoms 0.2.6", +] + +[[package]] +name = "markup5ever" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab3dc68ac4a0f5719e560136778c1ee716e296030d75dbd4484e37e39e3a842" +dependencies = [ + "log", + "tendril", + "web_atoms 0.3.0", +] + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mime" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5848f5a9e8117cf94f2f90faac24a87ff81600ff8628c1e3deaab572e76bfa1" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "miniz_oxide" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20521a903f02b0a573cd6840e9d0a5a0cc043d361fe924092cd70f8556cc9c4a" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "moxcms" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" +dependencies = [ + "num-traits", + "pxfm", +] + +[[package]] +name = "muda" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cca139e57da4383727f189e43e66e84fa372347027fc996f9f1a007ec0a37996" +dependencies = [ + "crossbeam-channel", + "dpi", + "gtk", + "keyboard-types", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "once_cell", + "png", + "serde", + "thiserror 2.0.21", + "windows-sys 0.61.2", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.13.2", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "notify" +version = "8.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c41a04a5f59df9322cc657286dd2d79f90816119b22c5f847607c850110205ab" +dependencies = [ + "bitflags 2.13.2", + "inotify", + "kqueue", + "libc", + "log", + "mio", + "notify-types", + "objc2-core-foundation", + "objc2-core-services", + "walkdir", + "windows-sys 0.61.2", +] + +[[package]] +name = "notify-debouncer-mini" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a689eb4262184d9a1727f9087cd03883ea716682ab03ed24efec57d7716dccb8" +dependencies = [ + "log", + "notify", + "notify-types", + "tempfile", +] + +[[package]] +name = "notify-types" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbd044e85df3d939d8e32a1c35a3b737c7d0a4eeb7acd737bd207644e00f4e5f" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "objc2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8" +dependencies = [ + "objc2-encode", + "objc2-exception-helper", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.13.2", + "block2", + "objc2", + "objc2-core-foundation", + "objc2-foundation", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" +dependencies = [ + "bitflags 2.13.2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-core-image" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-location" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca347214e24bc973fc025fd0d36ebb179ff30536ed1f80252706db19ee452009" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-services" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583300ad934cba24ff5292aee751ecc070f7ca6b39a574cc21b7b5e588e06a0b" +dependencies = [ + "libc", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-core-text" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" +dependencies = [ + "bitflags 2.13.2", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-exception-helper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a" +dependencies = [ + "cc", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.13.2", + "block2", + "libc", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.13.2", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags 2.13.2", + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags 2.13.2", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-image", + "objc2-core-location", + "objc2-core-text", + "objc2-foundation", + "objc2-quartz-core", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9df9128cbbfef73cda168416ccf7f837b62737d748333bfe9ab71c245d76613e" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-web-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f" +dependencies = [ + "bitflags 2.13.2", + "block2", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "open" +version = "5.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d8c8b8e725ad26404d6896eb2f064294a0a7b4f1d9120210d85544684c4ca95" +dependencies = [ + "dunce", + "is-wsl", + "libc", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "pango" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" +dependencies = [ + "gio", + "glib", + "libc", + "once_cell", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "phf" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_macros 0.13.1", + "phf_shared 0.13.1", + "serde", +] + +[[package]] +name = "phf" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "010378780309880b08997fae13be7834dba947d36393bd372f2b1556deb2a2f6" +dependencies = [ + "phf_macros 0.14.0", + "phf_shared 0.14.0", + "serde", +] + +[[package]] +name = "phf_codegen" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1" +dependencies = [ + "phf_generator 0.13.1", + "phf_shared 0.13.1", +] + +[[package]] +name = "phf_codegen" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b585a510fb76fdebead6897982ef2a03a21d8e6cbcca904999742a4afc6ffe" +dependencies = [ + "phf_generator 0.14.0", + "phf_shared 0.14.0", +] + +[[package]] +name = "phf_generator" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +dependencies = [ + "fastrand", + "phf_shared 0.13.1", +] + +[[package]] +name = "phf_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeb62e0959d5a1bebc965f4d15d9e2b7cea002b6b0f5ba8cde6cc26738467100" +dependencies = [ + "fastrand", + "phf_shared 0.14.0", +] + +[[package]] +name = "phf_macros" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +dependencies = [ + "phf_generator 0.13.1", + "phf_shared 0.13.1", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "phf_macros" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fa8d0ca26d424d27630da600c6624696e7dec8bf7b3b492b383c5dc49e5e085" +dependencies = [ + "phf_generator 0.14.0", + "phf_shared 0.14.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher", +] + +[[package]] +name = "phf_shared" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6fd9027e2d9319be6349febd1db4e8d02aa544921200c9b777720ac34a3aa89" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c938015719552d665fd0553b90d96cd7ff58e83e4c061ca99e6bb78865a72752" + +[[package]] +name = "piper" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "plist" +version = "1.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7a42747bbcc4374e6922a15040dccacf720e4ce48a77e668f7116b9aa19a0a" +dependencies = [ + "base64 0.23.1", + "indexmap 2.14.2", + "quick-xml", + "serde", + "time", +] + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.8.9", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "portable-atomic" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" + +[[package]] +name = "portable-atomic-util" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "potential_utf" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime 0.6.3", + "toml_edit 0.20.2", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit 0.25.21+spec-1.1.0", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "pxfm" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" + +[[package]] +name = "quick-xml" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b1177fdf999d2321d3fb46ff47159d9c1fb9ad66a4879f8c50a0b504615e9b" +dependencies = [ + "memchr", +] + +[[package]] +name = "quinn" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4051e23e9185c255a7e33ef59cdbca87a22d359052eecd22fc6b901fb37d9d11" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.21", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e750cca55fe4f0439a15d0bb529da9651e79993e8e72c61a899a36d462befbe" +dependencies = [ + "bytes", + "getrandom 0.4.3", + "lru-slab", + "rand", + "rand_pcg", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.21", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af66907df18639dcf4db56ca65490cabc4b27a97dbadd96f2926cca73298f016" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.61.2", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6fa277c67e6ea590466f04c3fe82cb509f0864fe470643e5570de9514a9b11" +dependencies = [ + "chacha20", + "getrandom 0.4.3", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_pcg" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb95882a1e14462c69aea9984bb261293ccfe6022ef8de0eda18bd5afb0052df" +dependencies = [ + "rand_core", +] + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "redox_users" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60dc65c0ff1a7ae1294b0c67b9f14baf70b644404010370171787bfac1038fc0" +dependencies = [ + "libredox", + "thiserror 2.0.21", +] + +[[package]] +name = "ref-cast" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e440fb4e4b4147295338efb76001ab9e4efc0e5839df2c47fc5ac2381d365c3" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "regex" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9807af0e638c12e753aa1b4e601791bf2a8f71274023c8bbeec12fc149950857" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d60ef07df457506a0a1a2073112eb4aae5733dbd2813c3da77d1b0fd441158" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d902046e6a28a1e4c3cab97258a0ce11e994903f01c2d97a9447a0b3df85f4f6" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams 0.4.2", + "web-sys", + "webpki-roots", +] + +[[package]] +name = "reqwest" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16a1cfa75cc186dd73d5818e510e042e40927bccc9c236b061cea97e1eb08029" +dependencies = [ + "base64 0.23.1", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "sync_wrapper", + "tokio", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams 0.5.0", + "web-sys", +] + +[[package]] +name = "rfd" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20dafead71c16a34e1ff357ddefc8afc11e7d51d6d2b9fbd07eaa48e3e540220" +dependencies = [ + "block2", + "dispatch2", + "glib-sys", + "gobject-sys", + "gtk-sys", + "js-sys", + "libc", + "log", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "percent-encoding", + "raw-window-handle", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "romm-companion" +version = "0.1.0" +dependencies = [ + "chrono", + "crc32fast", + "directories", + "futures-util", + "hex", + "hostname", + "md-5", + "notify", + "notify-debouncer-mini", + "reqwest 0.12.28", + "serde", + "serde_json", + "sha1", + "sha2 0.10.9", + "tauri", + "tauri-build", + "tauri-plugin-dialog", + "tauri-plugin-opener", + "thiserror 2.0.21", + "tokio", + "uuid", + "walkdir", + "zip", +] + +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "102f35f7de7b06d8c61f1cff6592f5253e0dea431c74867aad5dfd70f44663fb" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a0760a887c14823fca5a1c970b01d47c328c696c0c64829d1df50e8f853fd5" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "indexmap 1.9.3", + "schemars_derive", + "serde", + "serde_json", + "url", + "uuid", +] + +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab508826f74a77ca9d5aba6ff19b522583ee3eaf28a19384ff3d0e5835fadf6e" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.119", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "selectors" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8adfa1c298912827b8a28b223b3b874357397ae706e6190acd9bf28cee99114d" +dependencies = [ + "bitflags 2.13.2", + "cssparser 0.37.0", + "derive_more", + "log", + "new_debug_unreachable", + "phf 0.13.1", + "phf_codegen 0.13.1", + "precomputed-hash", + "rustc-hash", + "servo_arc 0.4.3", + "smallvec", +] + +[[package]] +name = "selectors" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8322aebea94a6cc288ff884e8a49bdbceef60206c400c6c46d22e62fc4fd91a6" +dependencies = [ + "bitflags 2.13.2", + "cssparser 0.38.0", + "derive_more", + "log", + "new_debug_unreachable", + "precomputed-hash", + "rustc-hash", + "servo_arc 0.5.0", + "smallvec", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde-untagged" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058" +dependencies = [ + "erased-serde", + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "serde_json" +version = "1.0.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_repr" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_spanned" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c187e0a369471c550af028cba56d4f4fa2a489ad28151ae95a4d340a2a8b782" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56cb1ca7c93ae63d6439b5250f6b6b040f7e121f32e5dd2f5d523dd4149b3204" +dependencies = [ + "base64 0.23.1", + "bs58", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.14.2", + "jiff 0.2.46", + "jiff 1.0.3", + "schemars 0.9.0", + "schemars 1.2.3", + "serde_core", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff15a7c864bbec77d9586ca6822bc7c369bdf19e9243134a62b0b51ce26b31f" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "serialize-to-javascript" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04f3666a07a197cdb77cdf306c32be9b7f598d7060d50cfd4d5aa04bfd92f6c5" +dependencies = [ + "serde", + "serde_json", + "serialize-to-javascript-impl", +] + +[[package]] +name = "serialize-to-javascript-impl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "servo_arc" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "170fb83ab34de17dc69aa7c67482b22218ddb85da56546f9bd6b929e32a05930" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "servo_arc" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4eceb519ec34d8290aaf6e46f435102f2bfa63f22b05a144fb16ab266d3b198" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "sha1" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0e5c7d67bc53f435386b2130fdc900488c5703770f6d8a4633060e34288a27" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.1", + "digest 0.11.3", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[package]] +name = "siphasher" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.16.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3244542535d5de959d90ec55d1b5ff0fd2bb7b1310223907d5f11932847f7b59" + +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "softbuffer" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac18da81ebbf05109ab275b157c22a653bb3c12cf884450179942f81bcbf6c3" +dependencies = [ + "bytemuck", + "js-sys", + "ndk", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "objc2-quartz-core", + "raw-window-handle", + "redox_syscall", + "tracing", + "wasm-bindgen", + "web-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "soup3" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" +dependencies = [ + "futures-channel", + "gio", + "glib", + "libc", + "soup3-sys", +] + +[[package]] +name = "soup3-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_vcruntime" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff7589a1859b09232522bb9edf076ca7fcf14ded96685d3fa629db73023ffbb7" + +[[package]] +name = "string_cache" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared 0.13.1", + "precomputed-hash", +] + +[[package]] +name = "string_cache" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffa8a5dbe8b3f0bbe29d4c3225daafaeead63afdc1b65fc4c01a1384166038e6" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared 0.14.0", + "precomputed-hash", +] + +[[package]] +name = "string_cache_codegen" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69" +dependencies = [ + "phf_generator 0.13.1", + "phf_shared 0.13.1", + "proc-macro2", + "quote", +] + +[[package]] +name = "string_cache_codegen" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928dcdf75e47626b3617a976ec205d9f057584c371c1f23b782129268d0e6edc" +dependencies = [ + "phf_generator 0.14.0", + "phf_shared 0.14.0", + "proc-macro2", + "quote", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "swift-rs" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cefd87076fd385308ee4aff597256c902f1fbb4d031de1558efc12f8ffefadd9" +dependencies = [ + "base64 0.21.7", + "serde", + "serde_json", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr", + "heck 0.5.0", + "pkg-config", + "toml 0.8.2", + "version-compare", +] + +[[package]] +name = "tao" +version = "0.37.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02ca9c0ce2a2fd70dc4ef4449ca5e8d30e6fa0db111cd8008594602a06a68371" +dependencies = [ + "bitflags 2.13.2", + "block2", + "core-foundation", + "core-graphics", + "crossbeam-channel", + "dbus", + "dispatch2", + "dlopen2", + "dpi", + "gdkwayland-sys", + "gdkx11-sys", + "gtk", + "jni", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "parking_lot", + "percent-encoding", + "raw-window-handle", + "tao-macros", + "unicode-segmentation", + "url", + "windows", + "windows-core", + "windows-version", + "x11-dl", +] + +[[package]] +name = "tao-macros" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7eeb6d99155545da6150a1795945f16ac9c178deb2a5f2e74d776107bd5849" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + +[[package]] +name = "tauri" +version = "2.12.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30fbfbb9dc9a2697b0e96d909ddc295fb18d2d82a58ed542ab8d9eba2edbe6da" +dependencies = [ + "anyhow", + "bytes", + "cookie", + "dirs", + "dunce", + "embed_plist", + "getrandom 0.3.4", + "glob", + "gtk", + "heck 0.5.0", + "http", + "image", + "jni", + "libc", + "log", + "mime", + "muda", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "percent-encoding", + "plist", + "raw-window-handle", + "reqwest 0.13.5", + "serde", + "serde_json", + "serde_repr", + "serialize-to-javascript", + "swift-rs", + "tauri-build", + "tauri-macros", + "tauri-runtime", + "tauri-runtime-wry", + "tauri-utils", + "thiserror 2.0.21", + "tokio", + "tray-icon", + "url", + "webkit2gtk", + "webview2-com", + "window-vibrancy", + "windows", +] + +[[package]] +name = "tauri-build" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73d80784e874fa117b9b00a6680cf2f9b8a51bbd14406bea980cf8f328b00646" +dependencies = [ + "anyhow", + "cargo_toml", + "dirs", + "glob", + "heck 0.5.0", + "json-patch", + "schemars 0.8.22", + "semver", + "serde", + "serde_json", + "static_vcruntime", + "strsim", + "tauri-utils", + "tauri-winres", + "walkdir", +] + +[[package]] +name = "tauri-codegen" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5dc6caab4da5646f57648f39b794bae118f0dd4a4305eeb8c892966171f4852" +dependencies = [ + "base64 0.23.1", + "brotli", + "ico", + "json-patch", + "plist", + "png", + "proc-macro2", + "quote", + "semver", + "serde", + "serde_json", + "sha2 0.11.2", + "syn 2.0.119", + "tauri-utils", + "thiserror 2.0.21", + "time", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-macros" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2831c5da8603a96b1efc0b650c2cb6decc69b6cda257d815fe70c7f5be53818e" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", + "tauri-codegen", + "tauri-utils", +] + +[[package]] +name = "tauri-plugin" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c18076d9b04211cb4899387aab97497e8edd0d02cd21710623afcdde27145d1" +dependencies = [ + "anyhow", + "glob", + "plist", + "schemars 0.8.22", + "serde", + "serde_json", + "tauri-utils", + "walkdir", +] + +[[package]] +name = "tauri-plugin-dialog" +version = "2.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce0fb9c2b6d34a9720627ed930ebc8af26f61e648695aecaeb03d5c33c5896f5" +dependencies = [ + "log", + "raw-window-handle", + "rfd", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "tauri-plugin-fs", + "thiserror 2.0.21", + "url", +] + +[[package]] +name = "tauri-plugin-fs" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d58eb1d4984e535f47a642ffec09a2da6f5c18a12b5902d12126cb7626d628b" +dependencies = [ + "anyhow", + "dunce", + "glob", + "log", + "objc2-foundation", + "percent-encoding", + "schemars 0.8.22", + "serde", + "serde_json", + "serde_repr", + "tauri", + "tauri-plugin", + "tauri-utils", + "thiserror 2.0.21", + "toml 1.2.3+spec-1.1.0", + "url", +] + +[[package]] +name = "tauri-plugin-opener" +version = "2.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54592c6718b42ab198bf11bda6a428a3553ca2f2f8e506df56f6a063ec328331" +dependencies = [ + "dunce", + "glob", + "objc2-app-kit", + "objc2-foundation", + "open", + "schemars 0.8.22", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "thiserror 2.0.21", + "url", + "windows", + "zbus", +] + +[[package]] +name = "tauri-runtime" +version = "2.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60c2b14bd5265b63993cdc34ad526fb836e0fd0cf64a4634a895db0784844d5e" +dependencies = [ + "cookie", + "dpi", + "gtk", + "http", + "jni", + "objc2", + "objc2-ui-kit", + "objc2-web-kit", + "raw-window-handle", + "serde", + "serde_json", + "tauri-utils", + "thiserror 2.0.21", + "url", + "webkit2gtk", + "webview2-com", + "windows", +] + +[[package]] +name = "tauri-runtime-wry" +version = "2.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8c14a025255cc9816d401635035075b09b6cc9973b7b8fd7b8fcb8753f30f92" +dependencies = [ + "gtk", + "http", + "jni", + "log", + "objc2", + "objc2-app-kit", + "percent-encoding", + "raw-window-handle", + "softbuffer", + "tao", + "tauri-runtime", + "tauri-utils", + "url", + "webkit2gtk", + "webview2-com", + "windows", + "wry", +] + +[[package]] +name = "tauri-utils" +version = "2.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d1d33d4453c5df0bf1672dbc7ada69d8ed74f56a4316d964a4aa73d4ecd3ad" +dependencies = [ + "anyhow", + "brotli", + "cargo_metadata", + "ctor", + "dom_query 0.28.0", + "dunce", + "glob", + "http", + "infer", + "json-patch", + "log", + "memchr", + "phf 0.13.1", + "plist", + "proc-macro2", + "quote", + "regex", + "schemars 0.8.22", + "semver", + "serde", + "serde-untagged", + "serde_json", + "serde_with", + "swift-rs", + "thiserror 2.0.21", + "toml 1.2.3+spec-1.1.0", + "url", + "urlpattern", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-winres" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c52bb6904475a6ca662f15ef787f18ade61d5740a1ee12c45d3b748efdb6f796" +dependencies = [ + "dunce", + "embed-resource", + "toml 1.2.3+spec-1.1.0", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "tendril" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fed54709c5b3a53d09bb1c113ea4f5ceafd1e772ddcb0030a82e1d56c087b08" +dependencies = [ + "new_debug_unreachable", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" +dependencies = [ + "thiserror-impl 2.0.21", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" + +[[package]] +name = "tokio" +version = "1.54.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9cc2678c2cdd569ef8215e2afd7954ada2ae20b4fdd2c5fe6139a3b02d105db" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e464cf451ba96ebfc6f9b6542f17ee8b8956e33f1e40d9690624e59d7a7f8a4b" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.3", + "toml_edit 0.20.2", +] + +[[package]] +name = "toml" +version = "1.2.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b1f26e9485c1fa43ee89fe76e9f3fb9e2e52bb227f8594b4d687496b83d073" +dependencies = [ + "indexmap 2.14.2", + "serde_core", + "serde_spanned 1.1.3", + "toml_datetime 1.1.3+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 1.0.5", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173f25c883cd2176a2d8212155638c0a60d484a9d84546d270866f40f56b6e49" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.14.2", + "toml_datetime 0.6.3", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.14.2", + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.3", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.25.21+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88497dab46de5bf343ec66b05c251e48c6213f3e9170c70a70a823f7abe886a4" +dependencies = [ + "indexmap 2.14.2", + "toml_datetime 1.1.3+spec-1.1.0", + "toml_parser", + "winnow 1.0.5", +] + +[[package]] +name = "toml_parser" +version = "1.1.7+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb28d6e049a9766c3bd91a8326e6179f5b132dec87906bb97018ef7a2f3431a" +dependencies = [ + "winnow 1.0.5", +] + +[[package]] +name = "toml_writer" +version = "1.2.0+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "009dbb7700f11c55ef83aebbe4c0e9cf1f1ac0844bd8d6f00dc38f302026e13a" + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags 2.13.2", + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", + "url", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tray-icon" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b9c52859a94554803ccd4a24b98f74148ebc73b90676d783f3490b1bff9d72" +dependencies = [ + "crossbeam-channel", + "dirs", + "libappindicator", + "muda", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "once_cell", + "png", + "serde", + "thiserror 2.0.21", + "windows-sys 0.61.2", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "uds_windows" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" +dependencies = [ + "memoffset", + "tempfile", + "windows-sys 0.61.2", +] + +[[package]] +name = "unicase" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" + +[[package]] +name = "unicode-ident" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f00cd2407bb42c0ef17be88d4cf020f5cceffd121665bac9b8b9493a369b3b1a" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", + "serde_derive", +] + +[[package]] +name = "urlpattern" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df16f50ef4cc145211879a3867ba757076b25dfee812040dcb0658bd9ae7904b" +dependencies = [ + "icu_properties", + "regex", + "serde", + "url", +] + +[[package]] +name = "utf8_iter" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af3bd9d3e571c26fcce9d033b87ea5ab061b8d2ffe9b7a5675d810d68f03edf0" +dependencies = [ + "utf_types", +] + +[[package]] +name = "utf_types" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6" + +[[package]] +name = "uuid" +version = "1.29.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c14b15dffa2f4bd712103e857140aa04a4f2ff6e955c77d7eb8e53ee02a3b64" +dependencies = [ + "getrandom 0.4.3", + "js-sys", + "serde_core", + "wasm-bindgen", +] + +[[package]] +name = "version-compare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "vswhom" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b" +dependencies = [ + "libc", + "vswhom-sys", +] + +[[package]] +name = "vswhom-sys" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb067e4cbd1ff067d1df46c9194b5de0e98efd2810bbc95c5d5e5f25a3231150" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "walkdir" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42e295b7452c4604982280d8586001fcad9b8b201cac67bca9771e7a7475403" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec4cdd0dd910afe868b7ef477227d8d538b46b3075031afee8a9f2acb0a2ed0b" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c" +dependencies = [ + "cfg-if", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e14e0327cb5368ad60ccb22d04a9827a693c95a926d8d125e9fa39e0baec501" +dependencies = [ + "js-sys", + "tokio", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.10", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-streams" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wasm-streams" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d179596ff5ec0f6de4db64d54011bde6289cc49603d3a6e4ce3f329207ab88" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web_atoms" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba8b815c1b593dc0baf78dd0f4fc8fdb2de53198fb1163738093e9a311c33fb3" +dependencies = [ + "phf 0.13.1", + "phf_codegen 0.13.1", + "string_cache 0.9.0", + "string_cache_codegen 0.6.1", +] + +[[package]] +name = "web_atoms" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7572660c8890448ba236b7376f27e389c6a7e1c70195622faced601f855c0ada" +dependencies = [ + "phf 0.14.0", + "phf_codegen 0.14.0", + "string_cache 0.11.0", + "string_cache_codegen 0.11.2", +] + +[[package]] +name = "webkit2gtk" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1027150013530fb2eaf806408df88461ae4815a45c541c8975e61d6f2fc4793" +dependencies = [ + "bitflags 1.3.2", + "cairo-rs", + "gdk", + "gdk-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "gtk", + "gtk-sys", + "javascriptcore-rs", + "libc", + "once_cell", + "soup3", + "webkit2gtk-sys", +] + +[[package]] +name = "webkit2gtk-sys" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916a5f65c2ef0dfe12fff695960a2ec3d4565359fdbb2e9943c974e06c734ea5" +dependencies = [ + "bitflags 1.3.2", + "cairo-sys-rs", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "gtk-sys", + "javascriptcore-rs-sys", + "libc", + "pkg-config", + "soup3-sys", + "system-deps", +] + +[[package]] +name = "webpki-roots" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7265c9301c16a8711c992c2d8da90ee77ef54b1ed51482d6dfeb00dc756b1297" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "webview2-com" +version = "0.39.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f89fca7a704cee10dcb3654c1dbb8941d1783132f1917358af75bec37a7d7e6" +dependencies = [ + "webview2-com-macros", + "webview2-com-sys", + "windows", + "windows-core", +] + +[[package]] +name = "webview2-com-macros" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a921c1b6914c367b2b823cd4cde6f96beec77d30a939c8199bb377cf9b9b54" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "webview2-com-sys" +version = "0.39.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a07132775117d6065853d9d1178157b8c90e228de47129d6bce2c7edebedfb" +dependencies = [ + "thiserror 2.0.21", + "windows", + "windows-core", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "window-vibrancy" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "111e51caca442cafd9bab396628ac4d814880eaea4e63dfd76a12e9f342b5580" +dependencies = [ + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "objc2-quartz-core", + "raw-window-handle", + "windows-sys 0.61.2", + "windows-version", +] + +[[package]] +name = "windows" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" +dependencies = [ + "windows-collections", + "windows-core", + "windows-future", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" +dependencies = [ + "windows-core", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-future" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" +dependencies = [ + "windows-core", + "windows-link", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" +dependencies = [ + "windows-core", + "windows-link", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-version" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4060a1da109b9d0326b7262c8e12c84df67cc0dbc9e33cf49e01ccc2eb63631" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3b93199df0ab874cdf0c6a94f0a0dc3423fe41f1cafb62b8bd7b1deb277aef" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d6f32a0ff4a9f6f01231eb2059cc85479330739333e0e58cadf03b6af2cca10" +dependencies = [ + "cfg-if", + "windows-sys 0.61.2", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "writeable" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" + +[[package]] +name = "wry" +version = "0.57.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c7bdc0b007462dd8a6cdb598e131e6899efa7eec16afdab4ee94b33f344c705" +dependencies = [ + "base64 0.23.1", + "block2", + "cookie", + "crossbeam-channel", + "dirs", + "dom_query 0.30.0", + "dpi", + "dunce", + "gdkx11", + "gtk", + "http", + "javascriptcore-rs", + "jni", + "libc", + "ndk", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "percent-encoding", + "raw-window-handle", + "sha2 0.10.9", + "soup3", + "tao-macros", + "thiserror 2.0.21", + "url", + "webkit2gtk", + "webkit2gtk-sys", + "webview2-com", + "windows", + "windows-core", + "windows-version", + "x11-dl", +] + +[[package]] +name = "x11" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "yoke" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "417ef3fcf6c300b7dbd25c85531a746931c02ad536f3cf4786ed1e88223340b3" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", + "synstructure", +] + +[[package]] +name = "zbus" +version = "5.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5db4be7c075cb421e4b7ee645541604239bd243ba7c357511f4ff3a74b555907" +dependencies = [ + "async-broadcast", + "async-executor", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener", + "futures-core", + "futures-lite", + "hex", + "libc", + "ordered-stream", + "rustix", + "serde", + "serde_repr", + "tracing", + "uds_windows", + "uuid", + "windows-sys 0.61.2", + "winnow 1.0.5", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "5.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2990635d09ade6df1868f72f8cac69a876a90981e8bd3c40b1be413f8dc88f40" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 3.0.10", + "zbus_names", + "zvariant", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "4.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812a12be4ead7a59e18ea8f047d08add0066b73bc62fc1467066a2472ae088dd" +dependencies = [ + "serde", + "winnow 1.0.5", + "zvariant", +] + +[[package]] +name = "zcheapstr" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da34e7164b75d803c3197b86e6cf61b874106fbd472c5082575a8bc5fbd0907" +dependencies = [ + "serde", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ccff8a4805aba1eaa4cd4afcd49f7557dd2cf5fd79ffc37f8959466effc5aa" + +[[package]] +name = "zerotrie" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "zip" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dcb24d0152526ae49b9b96c1dcf71850ca1e0b882e4e28ed898a93c41334744" +dependencies = [ + "arbitrary", + "crc32fast", + "crossbeam-utils", + "flate2", + "indexmap 2.14.2", + "memchr", + "zopfli", +] + +[[package]] +name = "zlib-rs" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa76918995d776d9dd34d371030be228d021137449771493d56e29f77e4148ac" + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" + +[[package]] +name = "zopfli" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaf7fc5d30c28483d93805c4a5e12b05bbb52407fa67c5f8bd552374cd01fb11" +dependencies = [ + "bumpalo", + "crc32fast", + "log", + "simd-adler32", +] + +[[package]] +name = "zvariant" +version = "5.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80bf6d6cd6a4b601acb64cfb8284cdc643fcfa75ef26ae3c46ec8aa4e8a1fbb7" +dependencies = [ + "endi", + "enumflags2", + "serde", + "winnow 1.0.5", + "zcheapstr", + "zvariant_derive", + "zvariant_utils", +] + +[[package]] +name = "zvariant_derive" +version = "5.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2672456ba1cb54b5eaec136e63135b3c7495fb938e53b28a62e633496d486d" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 3.0.10", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad0294361a320b694a328460dc73add56c306150f5cb6bfafc44446120008a3" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn 3.0.10", + "winnow 1.0.5", +] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml new file mode 100644 index 0000000..ec55cd1 --- /dev/null +++ b/src-tauri/Cargo.toml @@ -0,0 +1,37 @@ +[package] +name = "romm-companion" +version = "0.1.0" +description = "Cross-platform RomM 5.1.0 companion for save/state sync, ROM matching, and emulator detection" +authors = ["RomM Companion"] +edition = "2021" + +[lib] +name = "romm_companion_lib" +crate-type = ["staticlib", "cdylib", "rlib"] + +[build-dependencies] +tauri-build = { version = "2", features = [] } + +[dependencies] +tauri = { version = "2", features = ["tray-icon", "image-png"] } +tauri-plugin-dialog = "2" +tauri-plugin-opener = "2" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +tokio = { version = "1", features = ["full"] } +reqwest = { version = "0.12", default-features = false, features = ["json", "multipart", "stream", "rustls-tls"] } +chrono = { version = "0.4", features = ["serde"] } +directories = "6" +walkdir = "2" +notify = "8" +notify-debouncer-mini = "0.6" +sha2 = "0.10" +sha1 = "0.10" +md-5 = "0.10" +crc32fast = "1" +hex = "0.4" +uuid = { version = "1", features = ["v4"] } +hostname = "0.4" +thiserror = "2" +futures-util = "0.3" +zip = { version = "2", default-features = false, features = ["deflate"] } diff --git a/src-tauri/build.rs b/src-tauri/build.rs new file mode 100644 index 0000000..d860e1e --- /dev/null +++ b/src-tauri/build.rs @@ -0,0 +1,3 @@ +fn main() { + tauri_build::build() +} diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json new file mode 100644 index 0000000..01a4101 --- /dev/null +++ b/src-tauri/capabilities/default.json @@ -0,0 +1,11 @@ +{ + "$schema": "../gen/schemas/desktop-schema.json", + "identifier": "default", + "description": "Capability for the main window", + "windows": ["main"], + "permissions": [ + "core:default", + "dialog:default", + "opener:default" + ] +} diff --git a/src-tauri/icons/128x128.png b/src-tauri/icons/128x128.png new file mode 100644 index 0000000000000000000000000000000000000000..7d2dd90c55e4f4379582401b671d87afe2bcdeed GIT binary patch literal 1696 zcmZWqYgAKL7QVS8mgcb@678ys;MhqfrG#FU4%xFb2?P0%8@&0|x|!Fk}QJ1ro734zJ6Aa+OP%!}3>G&syi~wa;Vk?|f(P zeZGv3i*j;U=Kw*FQ%rQkJ|MA`PPYeR2b%lUrw6g1MzO&j6%UGDDr zb$hG5#ntX8ef~4wJQp_WBT!EEWhyqj&?G(_8HJaFBRmj~Kd~4S^m7^L@(MQpuiCIeu>`9j3Op0qxBEjAQL^Sa=ga`xV zd$4>S%l6Mk?J(H)nKkJLAQ~){a74i}u2Dp;wF5h(cvXEY%gI(1D8hVjS-3EeX-PUx z#T~W5^QNb3&>)OWNOUgaPN*NYije3xvGgm)M)69FcXfw60?W@Ru3(dUr4+G2<(yN( z#s5HYZQosE1*qiv@=gO>Vm(hlB#U*z3gEw$8f@jIEp;NB-G~XvWRoon=$Dn$FB~*y ztIWTL*P-sBdqU!5o3YMUNpJEck+8EjF)#JRD%7YmB8b1sM)A8LENLCZpT zOx<|Kq9mKxOyLunM}VHXoQ4nOQ4VO3$gnBHLv6;E zoD6>ee{{F}Uj-pPlfy$>i0~Z$<;c)P5nNb2!N%Qq)3`Hv^G*dl*c=Na(n=F36#fSPUnR#k2+2i ziC_&=w6iLfZlT%Y;aE;_B;*Uc4|)tstj3fns|jU0k;b(YSDPQQy*wIHc8EZcc@ z9&gT5B*N*O;se+|fMlRKAf-U4s`^{3KSo8}vE$yV+9P+Dmfw60-3bZm-BxH=K6Wh+ z3U=GtyZFjOuZc2uoM2U~23!OZT{N|=b>br^nN$3FXAB60OVidH!3~v5>Dn)$3tV*S z&xN`!syZO~XHQ~InoU&0)k+neKcY(=(Ryc9O&q`m;<#TyUU=OGm_AhJ3SVkBF8E+S z0xTk5QYKJ*3M`JM|CDPgg9f;0Z{s_2l3R5C)U#Pn>}sybPq&Ns0vf0>iz(aF6D8FC z(=%eKPp+bTO-0%-cTUaJ{#anFgbKN64OE4PQ+gJrS`u3)KZa86u08)G#_}P2|C_)= zw=!gRKHq`Zwo(%G+IB}ezpW{G_;!tSD1xBN@!P%GqVcY&FLdkbNvQw7WX}osbyxi zGp=UrwM?JH5Yc%o-PR`NRA*m_#REPxbd#}g%Dp3s8gE#>z|^&?yZyoqLm>a_)5b4k z9_?n4rO-zpI_~-1qObb4)1Jq~hCA3+T_Kw=F>r0|1`+U&XxF1bP($v;wz`Y>L2&r- zC61tG*_h;otwA^HHjX@A%K|Ye{;K$8qpZei(rE3;!`b!F{NR+h;C-3C?p2mduWepn zdt*a(v0kg#)woR2C&sr>T6u@u*_&Eca@hlp2(5oFxY?>uA`FXepFxOdm=&|7MITef zVANAo%@H6xw~Ao-)6O`9;!;K`C=cF!)n}+<>rg+D3o*FD6OUElEq~ho!9;xT`UDU! z5=&A@tvCbb{>SQJ9UHCVi!zA8qKQX3LB7h-f}jm&p13}^o!}21^@^3n36*^#UC2`* z3UH6;@EF5`NVNrT-O<+fFy_C=3yUp9hMGjEkuK;Ar0e0jtR&7XSbN literal 0 HcmV?d00001 diff --git a/src-tauri/icons/128x128@2x.png b/src-tauri/icons/128x128@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..229e645a47f0b8d35355fe19694cd7523d845c8c GIT binary patch literal 3703 zcmbtXdsq`^zW!zsNVq29Dp*LwTh|+SIi)Hz@dyX&1?W~vTforTty|qTC~81zW+J7C zirVc3d(rUpviL|fz3djMwUfxrQ(A%D_F$`YCW(TS0+Wa`z%X-u6T1KG^PFe@IRC)p zyZpZQdw;k0tI5sI3JZ=8MhJyHx*_BD2x0JvA!Q)^E8KJTd4$3rc{F3)*0P_5`zH28 z4Me}X+xWzY-@Tpet)~{m4ag*4i3hB zXTCOd#%^o+xsyoWW8Zvp!ZY6Ty7?LR zw)AG|{N>)5@ejP0nw>>YmlOK0dWp1y)Tw6U@xGjGH|^mgcYCJp1)9qzu6_LV;>Dv! zTPn6!R@`kE8a*F2GF&;e=icEC%*r6dIaR{Td<=&4oYU@1R!IYv1j`G^p|Y^Myf*?7&nSpAOD7_= zJk#Yg#rk)bbLVknVJr2q)E58J0T1O-`={c0pMPzytIoffilK7+OBy`mO27Fa%R&D@ zC%a1~88IFauYGBM`Ckpv=9%STmU92{A$HTu@}u-ah*9V{kGEh3Uby8FBIywEb5Srg z$f#6dI{gDg8Y_wXTMg;#koSfh@vFJK>#6DNfSVcuoESg~6OS#=Qu?cJuYxAdG8jH^m{=-mda(S&xJ*-Wvgk zU+Arz+^Y~?;Ge*d*dyCLr6%cBfYUN&6>s&G!dO-sDbqd5g%t~jW*MFV08O7JQ zzhS4ATiEixLjR54TQBb?>1Bu+cpxby7VO=L(>L$zD`cg6yl0e8b`bO&m_3(KpDK}U zYmBfag0=3&mhQ3gbT>tf=g`uy+WHMQNuz~x5O*Zx^%RH&Uh@0!mZ#OQLzsbG}pkHGvoD`38MCJDm zlNz156&XZj@trDmZ@3|VcOz2#>v(@4ThT$ie4PFun457u?XFF~uSse3Me9z$d;pE4NhUC^+DxeMJXH zuv~Xj2t=RO`+jz>@~pQYz)(xiN6d-x#~KRI1OB@+U1ga~o8*P8zC=mNEY*nA4@CF< zGWvO>pcrVA46pQF%F@lIR-t8FvJ@PJe7L5>X_^gzulGdvEz{(>nnDc=EI_oqO`q1h zJ^{^#*!(s?FMiq~6BE29Y$y2hYP($+Q&5T28hj_Ox<(9Zz<{yJsKpY5>ToQVpZg_bUp_G%$YV#3;w5SL+uTQ3t}8#F9v7atleNA0 z7-5`+MO!E|k1>al!NjV`PfJ_vp(IY_BZq!ApPa;08RM`3iw(_lnWgb~;iCGiH~9=b z5Jhg_6R{1gb|o2UN##1aFp)($)hNT$tEeyKvy*?>+o6xPZsyHlmXNCsdzfK`r6Gr4 zO|jNL@#Z!v;5nD*n1i0;?5Du#H!=-X#%OZ$Og$LNt}#km|Bjw>ONo6WOBYWSpr<{t z3Z07Bj~rU9HI#3Wr6u5ME4>0~xHmCGOev++hA1F$j3ibg#-xR###@Qd!>y)h@v1a=dt&$-6`Xwu{k7c|huZ#85oAadTs~ZV0`g76 z&Bq?(?u_`b4OeV&WGMd-cKC`7iqJroPD4E|9r>%8Ok}lk-9&9VLukk){OEi!-LMMW zpXA-4&`s?tVhGFITms%50ioE#_2J!)g$G9NJB+77ig~Q2> za20!~VV(s~Ndzjhu|HbHnoTH)ZN$~JHuQ10Ay63Kf_Dc~ndp6XF@Dl2Cg3IR&)Bu{ z`uYFF9iqpsFZ&ImANOfE3C7aUc|SnF|Du=rLj?IhTn!mcEdmI&IJjXwn2aRv0Zn$L zVV|7#8c~#n}u7>fLUc}Lcbm{K0rRn|ERgznuD?fbu!|4hy}5I z4($6}cCt$BA6G#Bsy0ig(}2a5vXix9|5NzMTEhF`Ht@Z>PTF;!mObZQh`KJe>0+VzolN}U7CM%xix-#RDKb78V$2v15tARF$z_Z;hmX&#zar-P25tVp z1)5LRi2EBfx$Z8NArYE7gu(Q3gOzGhej6nI1~Uq><_)f*hKvW2d!W&)Yv|>84;MQ= z@?`^~5Z{@q%K|Fb2IxY>5{6EM`##0#_bLrB!mdN;<0FQLgq@mGi-kGpZRi?TTZt`E zn1atsVh$Pa4ccm%i9!*IL!7tKZ zyc8isLNx;`OZeU@&DldDbN>w8_fcuZV>>qSF*f19xfj9R#)$$$9>3jeayzJJkenk1 z)F?o34PL&e1kG~*%GZNX9s3$4+fQU7{;rdl1*P}}^gUNy3i|1;w^Kje#&s`rty=<#8=nJK}SVf?C3DtDEnj?&Wx(WJ+Sp4u4^5Q$DnP*Q&}h!@}zh* zOh$@o6w6a}3WwZZd9`X-5dvBIJXeILL}P4kEA?*&8Phm4{O`GhxuCJKn5GaiM0odk?8yY2UE5*{h6dM&9(HLHnZem$i7-PU zDrwcfw*wFheO_X3j}BeqPS5?M`Ad&^`s=Nr4WU(E!yb+}6z4LF78nRKMDr~x`J2R@ znBKKQFkQKk(_iFFU4TxTc=IurqNGT9&TaSYv%d-j{Q}pR$&@J4~INVKr+Ys;Hn(K!c2d&gs} zbJr=a(4O9NYoN9)@{F#=Z>E7b?3P)Qknjz68PAOpSx0y=NyS5(i|WV$ax}p68mIIX zMm>T~yB5l)TSkL`+60gG%ug~MyB0c8y@}62{0OJtuQYUVHHbUy?Ubb`_|7g?mY>e0 zd+Gv$F6s19 z;qS+{_2{=%CGu-sO`yqcP@gs^##%t=3OUQBJLW?7D=(_kbM_PU3Sx)M0W(>)k>TShDZh8^^H!2!js?F!3MNg$8b5`70#c0bNKN1>_sHUA3!C%@*en-N(m zAx%=j@T9OEg_bO7^}Al8|Nnd+tn=&pMoDi=&w(28^WHH3r(Qu7`R4}w_~ETm2x00s zd_p`C?*ID#y;{WA!2{A$2b#M7@M@?}|NafPy#2{rg6cclwdd9?Ej|qoO7v)EcE*MO HEI#zVZX^JW literal 0 HcmV?d00001 diff --git a/src-tauri/icons/32x32.png b/src-tauri/icons/32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..b02e4724ab417ed0c022eb35dac23f58b8b4bfa8 GIT binary patch literal 507 zcmVxsRhEX^u&lD8vYKqeTJjzYfiU6gDMlbnI4j@+@4SDo2@2mxJ(vO#+y=G9 z55AdZ1bPYAvB9@E0arM^bK7?ue47&p3YQ9w+e6_ynMYHg7jS*&++Gad_D5e^?mjnO+002ovPDHLkV1f*};>rL3 literal 0 HcmV?d00001 diff --git a/src-tauri/icons/icon.ico b/src-tauri/icons/icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..7b4211db6f3c6bf95e25fa90bc818dfa7bd520cc GIT binary patch literal 529 zcmV+s0`C0)0096203aX$0096X0Q&&|02TlM0EtjeM-2)Z3IG5A4M|8uQUCw|AOHXW zAP5Ek0047(dh`GQ0m4Z{K~#9!?Uq+g12GVWb1ZH^APJ-wdhflL(8IB~PCA{32q6t# zgr#9T-dTreU%=A;w)Xc)9?xtf^1r@Uy1xn;m29*MIhB0028Dqd6je$pBZGAqRT)zm zkJVu!*7(X~ya7}3CQPf$B$_a*GM8w<{7?%PR2Eg1hTE{LvZAt@Y{Ode9t?pn;p-_z zAWS$b-~#Wwf3OJ(-$*@}0utN?wZ#vc~w>SY;IK6Y*cN~1169@{I3Xa=D z;X9c}Q=k`cedpX>4BzDhXtj3>*LP0$WB48?;P=!xc;8*;N4SE+XJGh#mJ#rK=Mr3p z792fC!w<4grU346-N1Ed!Qrzs{Lm(#+biBg?_3g~)sD~7@S_|ffP1@NdzA!ewd1oi z{FoEKg9UG*)h-FpYR6}3_(|^B6u?uB77u-D-N3zQ_-URIpifO2EE3!+I2*jo2}r%& zZ?H&kFBo3VznB8F+Fb^V1owjBX9Y&!H-p6$e$ENF3>L1p+rH!A7o330Uez69@{&1&4dP3;d?U2!si*l-^8%FyXhHz@J^8GIc1X T8n~AP00000NkvXXu0mjf{Vn7_ literal 0 HcmV?d00001 diff --git a/src-tauri/icons/icon.png b/src-tauri/icons/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..229e645a47f0b8d35355fe19694cd7523d845c8c GIT binary patch literal 3703 zcmbtXdsq`^zW!zsNVq29Dp*LwTh|+SIi)Hz@dyX&1?W~vTforTty|qTC~81zW+J7C zirVc3d(rUpviL|fz3djMwUfxrQ(A%D_F$`YCW(TS0+Wa`z%X-u6T1KG^PFe@IRC)p zyZpZQdw;k0tI5sI3JZ=8MhJyHx*_BD2x0JvA!Q)^E8KJTd4$3rc{F3)*0P_5`zH28 z4Me}X+xWzY-@Tpet)~{m4ag*4i3hB zXTCOd#%^o+xsyoWW8Zvp!ZY6Ty7?LR zw)AG|{N>)5@ejP0nw>>YmlOK0dWp1y)Tw6U@xGjGH|^mgcYCJp1)9qzu6_LV;>Dv! zTPn6!R@`kE8a*F2GF&;e=icEC%*r6dIaR{Td<=&4oYU@1R!IYv1j`G^p|Y^Myf*?7&nSpAOD7_= zJk#Yg#rk)bbLVknVJr2q)E58J0T1O-`={c0pMPzytIoffilK7+OBy`mO27Fa%R&D@ zC%a1~88IFauYGBM`Ckpv=9%STmU92{A$HTu@}u-ah*9V{kGEh3Uby8FBIywEb5Srg z$f#6dI{gDg8Y_wXTMg;#koSfh@vFJK>#6DNfSVcuoESg~6OS#=Qu?cJuYxAdG8jH^m{=-mda(S&xJ*-Wvgk zU+Arz+^Y~?;Ge*d*dyCLr6%cBfYUN&6>s&G!dO-sDbqd5g%t~jW*MFV08O7JQ zzhS4ATiEixLjR54TQBb?>1Bu+cpxby7VO=L(>L$zD`cg6yl0e8b`bO&m_3(KpDK}U zYmBfag0=3&mhQ3gbT>tf=g`uy+WHMQNuz~x5O*Zx^%RH&Uh@0!mZ#OQLzsbG}pkHGvoD`38MCJDm zlNz156&XZj@trDmZ@3|VcOz2#>v(@4ThT$ie4PFun457u?XFF~uSse3Me9z$d;pE4NhUC^+DxeMJXH zuv~Xj2t=RO`+jz>@~pQYz)(xiN6d-x#~KRI1OB@+U1ga~o8*P8zC=mNEY*nA4@CF< zGWvO>pcrVA46pQF%F@lIR-t8FvJ@PJe7L5>X_^gzulGdvEz{(>nnDc=EI_oqO`q1h zJ^{^#*!(s?FMiq~6BE29Y$y2hYP($+Q&5T28hj_Ox<(9Zz<{yJsKpY5>ToQVpZg_bUp_G%$YV#3;w5SL+uTQ3t}8#F9v7atleNA0 z7-5`+MO!E|k1>al!NjV`PfJ_vp(IY_BZq!ApPa;08RM`3iw(_lnWgb~;iCGiH~9=b z5Jhg_6R{1gb|o2UN##1aFp)($)hNT$tEeyKvy*?>+o6xPZsyHlmXNCsdzfK`r6Gr4 zO|jNL@#Z!v;5nD*n1i0;?5Du#H!=-X#%OZ$Og$LNt}#km|Bjw>ONo6WOBYWSpr<{t z3Z07Bj~rU9HI#3Wr6u5ME4>0~xHmCGOev++hA1F$j3ibg#-xR###@Qd!>y)h@v1a=dt&$-6`Xwu{k7c|huZ#85oAadTs~ZV0`g76 z&Bq?(?u_`b4OeV&WGMd-cKC`7iqJroPD4E|9r>%8Ok}lk-9&9VLukk){OEi!-LMMW zpXA-4&`s?tVhGFITms%50ioE#_2J!)g$G9NJB+77ig~Q2> za20!~VV(s~Ndzjhu|HbHnoTH)ZN$~JHuQ10Ay63Kf_Dc~ndp6XF@Dl2Cg3IR&)Bu{ z`uYFF9iqpsFZ&ImANOfE3C7aUc|SnF|Du=rLj?IhTn!mcEdmI&IJjXwn2aRv0Zn$L zVV|7#8c~#n}u7>fLUc}Lcbm{K0rRn|ERgznuD?fbu!|4hy}5I z4($6}cCt$BA6G#Bsy0ig(}2a5vXix9|5NzMTEhF`Ht@Z>PTF;!mObZQh`KJe>0+VzolN}U7CM%xix-#RDKb78V$2v15tARF$z_Z;hmX&#zar-P25tVp z1)5LRi2EBfx$Z8NArYE7gu(Q3gOzGhej6nI1~Uq><_)f*hKvW2d!W&)Yv|>84;MQ= z@?`^~5Z{@q%K|Fb2IxY>5{6EM`##0#_bLrB!mdN;<0FQLgq@mGi-kGpZRi?TTZt`E zn1atsVh$Pa4ccm%i9!*IL!7tKZ zyc8isLNx;`OZeU@&DldDbN>w8_fcuZV>>qSF*f19xfj9R#)$$$9>3jeayzJJkenk1 z)F?o34PL&e1kG~*%GZNX9s3$4+fQU7{;rdl1*P}}^gUNy3i|1;w^Kje#&s`rty=<#8=nJK}SVf?C3DtDEnj?&Wx(WJ+Sp4u4^5Q$DnP*Q&}h!@}zh* zOh$@o6w6a}3WwZZd9`X-5dvBIJXeILL}P4kEA?*&8Phm4{O`GhxuCJKn5GaiM0odk?8yY2UE5*{h6dM&9(HLHnZem$i7-PU zDrwcfw*wFheO_X3j}BeqPS5?M`Ad&^`s=Nr4WU(E!yb+}6z4LF78nRKMDr~x`J2R@ znBKKQFkQKk(_iFFU4TxTc=IurqNGT9&TaSYv%d-j{Q}pR$&@J4~INVKr+Ys;Hn(K!c2d&gs} zbJr=a(4O9NYoN9)@{F#=Z>E7b?3P)Qknjz68PAOpSx0y=NyS5(i|WV$ax}p68mIIX zMm>T~yB5l)TSkL`+60gG%ug~MyB0c8y@}62{0OJtuQYUVHHbUy?Ubb`_|7g?mY>e0 zd+Gv$F6s19 z;qS+{_2{=%CGu-sO`yqcP@gs^##%t=3OUQBJLW?7D=(_kbM_PU3Sx)M0W(>)k>TShDZh8^^H!2!js?F!3MNg$8b5`70#c0bNKN1>_sHUA3!C%@*en-N(m zAx%=j@T9OEg_bO7^}Al8|Nnd+tn=&pMoDi=&w(28^WHH3r(Qu7`R4}w_~ETm2x00s zd_p`C?*ID#y;{WA!2{A$2b#M7@M@?}|NafPy#2{rg6cclwdd9?Ej|qoO7v)EcE*MO HEI#zVZX^JW literal 0 HcmV?d00001 diff --git a/src-tauri/src/commands.rs b/src-tauri/src/commands.rs new file mode 100644 index 0000000..6d290b9 --- /dev/null +++ b/src-tauri/src/commands.rs @@ -0,0 +1,1193 @@ +use crate::config::{ + push_log, save_config, AppConfig, EmulatorRule, ManualLink, SyncLogEntry, WatcherSettings, +}; +use crate::emulators::{detect_emulator_presets, preset_to_rule, EmulatorPresetInfo}; +use crate::matcher::{ + compute_rom_hashes, discover_saves_for_emulators, match_name_to_roms, + read_save_payload_and_hash, DiscoveredSaveItem, LocalRomScanResult, +}; +use crate::nextui_sd::{ + detect_nextui_volumes as detect_nextui_vols_impl, inspect_nextui_card as inspect_nextui_impl, + load_handheld_meta, resolve_nextui_rom_folder, save_handheld_meta, + sync_nextui_card as sync_nextui_impl, DetectedNextUiVolume, NextUiCardInspection, +}; +use crate::romm_api::{ + DeviceAuthInitResponse, PlatformSchema, RomPageResponse, RommClient, SaveSchema, + SimpleRomSchema, StateSchema, UserSchema, +}; +use crate::sync_engine::{ + create_backup, list_all_backups, restore_backup_to_path, run_sync, write_downloaded_save, + BackupEntry, SyncConflictItem, SyncRunSummary, +}; +use crate::watcher::{start_watcher, WatcherHandle}; +use serde::{Deserialize, Serialize}; +use std::path::{Path, PathBuf}; +use std::sync::Mutex; +use tauri::{AppHandle, Emitter, State}; +use walkdir::WalkDir; + +pub struct AppState { + pub config: Mutex, + pub rom_cache: Mutex>, + pub conflicts: Mutex>, + pub watcher: Mutex>, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct AppStateSnapshot { + pub connected: bool, + pub server_url: String, + pub username: Option, + pub device_id: Option, + pub device_name: String, + pub emulators: Vec, + pub settings: WatcherSettings, + pub watcher_active: bool, + pub watched_paths: Vec, + pub cached_rom_count: usize, + pub conflicts: Vec, + pub logs: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct RemoteSavesAndStates { + pub saves: Vec, + pub states: Vec, +} + +fn make_client(cfg: &AppConfig) -> Result { + RommClient::new(&cfg.connection.server_url, cfg.connection.access_token.clone()) +} + +fn snapshot_from_state(state: &AppState) -> AppStateSnapshot { + let cfg = state.config.lock().unwrap(); + let rom_count = state.rom_cache.lock().unwrap().len(); + let conflicts = state.conflicts.lock().unwrap().clone(); + let watcher_guard = state.watcher.lock().unwrap(); + let watched_paths = watcher_guard + .as_ref() + .map(|w| w.watched_paths.clone()) + .unwrap_or_default(); + AppStateSnapshot { + connected: cfg.connection.access_token.is_some() && !cfg.connection.server_url.is_empty(), + server_url: cfg.connection.server_url.clone(), + username: cfg.connection.username.clone(), + device_id: cfg.connection.device_id.clone(), + device_name: cfg.connection.device_name.clone(), + emulators: cfg.emulators.clone(), + settings: cfg.settings.clone(), + watcher_active: watcher_guard.is_some(), + watched_paths, + cached_rom_count: rom_count, + conflicts, + logs: cfg.sync_logs.clone(), + } +} + +#[tauri::command] +pub fn get_app_state(state: State<'_, AppState>) -> AppStateSnapshot { + snapshot_from_state(&state) +} + +#[tauri::command] +pub async fn test_server(server_url: String) -> Result { + let client = RommClient::new(&server_url, None)?; + client.heartbeat().await +} + +#[tauri::command] +pub async fn start_device_auth( + server_url: String, + device_name: String, + state: State<'_, AppState>, +) -> Result { + let identifier = { + let mut cfg = state.config.lock().unwrap(); + cfg.connection.server_url = server_url.trim().trim_end_matches('/').to_string(); + if !device_name.trim().is_empty() { + cfg.connection.device_name = device_name.trim().to_string(); + } + let _ = save_config(&cfg); + ( + cfg.connection.client_device_identifier.clone(), + cfg.connection.device_name.clone(), + ) + }; + let client = RommClient::new(&server_url, None)?; + client.device_auth_init(&identifier.0, &identifier.1).await +} + +#[tauri::command] +pub async fn poll_device_auth( + server_url: String, + device_code: String, + state: State<'_, AppState>, +) -> Result, String> { + let client = RommClient::new(&server_url, None)?; + let Some(token_resp) = client.device_auth_poll(&device_code).await? else { + return Ok(None); + }; + let authed = RommClient::new(&server_url, Some(token_resp.access_token.clone()))?; + let user = authed.get_me().await?; + + { + let mut cfg = state.config.lock().unwrap(); + cfg.connection.server_url = server_url.trim().trim_end_matches('/').to_string(); + cfg.connection.access_token = Some(token_resp.access_token); + cfg.connection.device_id = Some(token_resp.device_id); + cfg.connection.username = Some(user.username.clone()); + push_log( + &mut cfg, + "success", + "auth", + format!("Paired with RomM as {}", user.username), + None, + None, + ); + save_config(&cfg)?; + } + + Ok(Some(user)) +} + +#[tauri::command] +pub async fn exchange_pair_code( + server_url: String, + code: String, + state: State<'_, AppState>, +) -> Result { + let client = RommClient::new(&server_url, None)?; + let token = client.exchange_pair_code(&code).await?; + let authed = RommClient::new(&server_url, Some(token.raw_token.clone()))?; + let user = authed.get_me().await?; + let device_name = state.config.lock().unwrap().connection.device_name.clone(); + let device_id = match token.device_id { + Some(id) => Some(id), + None => authed.register_device(&device_name).await.ok().map(|d| d.id), + }; + + { + let mut cfg = state.config.lock().unwrap(); + cfg.connection.server_url = server_url.trim().trim_end_matches('/').to_string(); + cfg.connection.access_token = Some(token.raw_token); + cfg.connection.device_id = device_id; + cfg.connection.username = Some(user.username.clone()); + push_log( + &mut cfg, + "success", + "auth", + format!("Connected with pair code as {}", user.username), + None, + None, + ); + save_config(&cfg)?; + } + + Ok(user) +} + +#[tauri::command] +pub async fn connect_with_token( + server_url: String, + token: String, + state: State<'_, AppState>, +) -> Result { + let authed = RommClient::new(&server_url, Some(token.trim().to_string()))?; + let user = authed.get_me().await?; + let device_name = state.config.lock().unwrap().connection.device_name.clone(); + let device_id = authed + .register_device(&device_name) + .await + .ok() + .map(|d| d.id) + .or(user.current_device_id.clone()); + + { + let mut cfg = state.config.lock().unwrap(); + cfg.connection.server_url = server_url.trim().trim_end_matches('/').to_string(); + cfg.connection.access_token = Some(token.trim().to_string()); + cfg.connection.device_id = device_id; + cfg.connection.username = Some(user.username.clone()); + push_log( + &mut cfg, + "success", + "auth", + format!("Connected with API token as {}", user.username), + None, + None, + ); + save_config(&cfg)?; + } + + Ok(user) +} + +#[tauri::command] +pub async fn login_with_password( + server_url: String, + username: String, + password: String, + state: State<'_, AppState>, +) -> Result { + let client = RommClient::new(&server_url, None)?; + let tok = client.login_password(&username, &password).await?; + let authed = RommClient::new(&server_url, Some(tok.access_token.clone()))?; + let user = authed.get_me().await?; + let device_name = state.config.lock().unwrap().connection.device_name.clone(); + let device_id = authed + .register_device(&device_name) + .await + .ok() + .map(|d| d.id) + .or(user.current_device_id.clone()); + + { + let mut cfg = state.config.lock().unwrap(); + cfg.connection.server_url = server_url.trim().trim_end_matches('/').to_string(); + cfg.connection.access_token = Some(tok.access_token); + cfg.connection.refresh_token = tok.refresh_token; + cfg.connection.device_id = device_id; + cfg.connection.username = Some(user.username.clone()); + push_log( + &mut cfg, + "success", + "auth", + format!("Signed in as {}", user.username), + None, + None, + ); + save_config(&cfg)?; + } + + Ok(user) +} + +#[tauri::command] +pub fn disconnect(state: State<'_, AppState>) -> Result { + { + let mut cfg = state.config.lock().unwrap(); + cfg.connection.access_token = None; + cfg.connection.refresh_token = None; + cfg.connection.username = None; + save_config(&cfg)?; + } + state.rom_cache.lock().unwrap().clear(); + state.conflicts.lock().unwrap().clear(); + Ok(snapshot_from_state(&state)) +} + +// ---------- Emulators ---------- + +#[tauri::command] +pub fn get_emulator_presets() -> Vec { + detect_emulator_presets() +} + +#[tauri::command] +pub fn auto_populate_detected_emulators( + app: AppHandle, + state: State<'_, AppState>, +) -> Result { + let presets = detect_emulator_presets(); + { + let mut cfg = state.config.lock().unwrap(); + for p in &presets { + if p.detected && !cfg.emulators.iter().any(|e| e.id == p.id) { + cfg.emulators.push(preset_to_rule(p)); + } + } + save_config(&cfg)?; + } + let _ = refresh_watcher_internal(app, &state); + Ok(snapshot_from_state(&state)) +} + +#[tauri::command] +pub fn upsert_emulator_rule( + rule: EmulatorRule, + app: AppHandle, + state: State<'_, AppState>, +) -> Result { + { + let mut cfg = state.config.lock().unwrap(); + if let Some(existing) = cfg.emulators.iter_mut().find(|e| e.id == rule.id) { + *existing = rule; + } else { + cfg.emulators.push(rule); + } + save_config(&cfg)?; + } + let _ = refresh_watcher_internal(app, &state); + Ok(snapshot_from_state(&state)) +} + +#[tauri::command] +pub fn delete_emulator_rule( + emulator_id: String, + app: AppHandle, + state: State<'_, AppState>, +) -> Result { + { + let mut cfg = state.config.lock().unwrap(); + cfg.emulators.retain(|e| e.id != emulator_id); + save_config(&cfg)?; + } + let _ = refresh_watcher_internal(app, &state); + Ok(snapshot_from_state(&state)) +} + +// ---------- Library, ROM Matching & Downloads ---------- + +#[tauri::command] +pub async fn fetch_platforms(state: State<'_, AppState>) -> Result, String> { + let client = { + let cfg = state.config.lock().unwrap(); + make_client(&cfg)? + }; + client.get_platforms().await +} + +#[tauri::command] +pub async fn fetch_roms( + platform_id: Option, + search_term: Option, + limit: Option, + offset: Option, + state: State<'_, AppState>, +) -> Result { + let client = { + let cfg = state.config.lock().unwrap(); + make_client(&cfg)? + }; + let page = client + .get_roms( + platform_id, + search_term.as_deref(), + limit.unwrap_or(100), + offset.unwrap_or(0), + ) + .await?; + + // Merge into local ROM cache for fast save matching + { + let mut cache = state.rom_cache.lock().unwrap(); + for rom in &page.items { + if let Some(pos) = cache.iter().position(|r| r.id == rom.id) { + cache[pos] = rom.clone(); + } else { + cache.push(rom.clone()); + } + } + } + + Ok(page) +} + +#[tauri::command] +pub async fn refresh_rom_cache(state: State<'_, AppState>) -> Result { + let client = { + let cfg = state.config.lock().unwrap(); + make_client(&cfg)? + }; + let roms = client.get_all_roms_for_platforms(&[]).await?; + let count = roms.len(); + *state.rom_cache.lock().unwrap() = roms; + Ok(count) +} + +#[tauri::command] +pub async fn scan_local_rom_folder( + folder_path: String, + use_hash_lookup: bool, + state: State<'_, AppState>, +) -> Result, String> { + let client = { + let cfg = state.config.lock().unwrap(); + make_client(&cfg)? + }; + let cached_roms = state.rom_cache.lock().unwrap().clone(); + let root = PathBuf::from(&folder_path); + if !root.exists() { + return Err("Folder does not exist".into()); + } + + let rom_exts = [ + "iso", "chd", "rvz", "gcz", "wbfs", "cso", "nsp", "xci", "cia", "3ds", "cci", "nds", + "gba", "gbc", "gb", "bin", "cue", "pbp", "pkg", "wud", "wux", "wua", "xiso", "gdi", + "cdi", "zip", "7z", "nes", "sfc", "smc", "n64", "z64", "v64", + ]; + + let mut files = Vec::new(); + for entry in WalkDir::new(&root).max_depth(3).into_iter().flatten() { + let p = entry.path(); + if !p.is_file() { + continue; + } + let ext = p + .extension() + .and_then(|e| e.to_str()) + .unwrap_or("") + .to_lowercase(); + if rom_exts.contains(&ext.as_str()) { + files.push(p.to_path_buf()); + } + } + + let mut results = Vec::new(); + for path in files.into_iter().take(200) { + let file_name = path + .file_name() + .map(|n| n.to_string_lossy().to_string()) + .unwrap_or_default(); + let stem = path + .file_stem() + .map(|s| s.to_string_lossy().to_string()) + .unwrap_or_default(); + + // Hash files up to 512MB when hash lookup is enabled + let max_bytes = if use_hash_lookup { + 512 * 1024 * 1024 + } else { + 0 + }; + let (size_bytes, crc32, md5, sha1) = + compute_rom_hashes(&path, max_bytes).unwrap_or((0, None, None, None)); + + let mut matched: Option<(i64, String, String, String)> = None; + + // 1. Try RomM /api/roms/by-hash + if use_hash_lookup && (crc32.is_some() || md5.is_some() || sha1.is_some()) { + if let Ok(Some(rom)) = client + .get_rom_by_hash(crc32.as_deref(), md5.as_deref(), sha1.as_deref()) + .await + { + matched = Some(( + rom.id, + rom.name.unwrap_or(rom.fs_name_no_ext), + rom.platform_display_name, + "hash".to_string(), + )); + } + } + + // 2. Fallback to filename matching against cached ROMs + if matched.is_none() { + if let Some((rom, _, _)) = match_name_to_roms(&stem, &[], &cached_roms) { + matched = Some(( + rom.id, + rom.name.clone().unwrap_or_else(|| rom.fs_name_no_ext.clone()), + rom.platform_display_name.clone(), + "filename".to_string(), + )); + } + } + + results.push(LocalRomScanResult { + local_path: path.to_string_lossy().to_string(), + file_name, + size_bytes, + crc32, + md5, + sha1, + matched_rom_id: matched.as_ref().map(|m| m.0), + matched_rom_name: matched.as_ref().map(|m| m.1.clone()), + matched_platform: matched.as_ref().map(|m| m.2.clone()), + match_source: matched + .map(|m| m.3) + .unwrap_or_else(|| "unmatched".to_string()), + }); + } + + Ok(results) +} + +#[tauri::command] +pub async fn download_rom_to_folder( + rom_id: i64, + file_name: String, + dest_folder: Option, + platform_slug: Option, + platform_fs_slug: Option, + app: AppHandle, + state: State<'_, AppState>, +) -> Result { + let (client, resolved_dir) = { + let cfg = state.config.lock().unwrap(); + let client = make_client(&cfg)?; + let dir = dest_folder + .filter(|d| !d.trim().is_empty()) + .or_else(|| { + find_emulator_for_platform( + &cfg.emulators, + platform_slug.as_deref(), + platform_fs_slug.as_deref(), + ) + .and_then(|e| e.rom_dir.clone()) + .filter(|d| !d.trim().is_empty()) + }) + .or_else(|| cfg.settings.default_rom_download_dir.clone()) + .ok_or_else(|| { + "No ROM directory configured for this platform or default download folder".to_string() + })?; + (client, dir) + }; + let dest_path = PathBuf::from(&resolved_dir).join(&file_name); + let app_clone = app.clone(); + let emit_file_name = file_name.clone(); + client + .download_rom(rom_id, &file_name, &dest_path, move |downloaded, total| { + let _ = app_clone.emit( + "rom:download-progress", + serde_json::json!({ + "romId": rom_id, + "fileName": emit_file_name, + "downloaded": downloaded, + "total": total, + }), + ); + }) + .await?; + + { + let mut cfg = state.config.lock().unwrap(); + push_log( + &mut cfg, + "success", + "download_rom", + format!("Downloaded ROM to {}", dest_path.display()), + Some(rom_id), + Some(dest_path.to_string_lossy().to_string()), + ); + let _ = save_config(&cfg); + } + + Ok(dest_path.to_string_lossy().to_string()) +} + +fn find_emulator_for_platform<'a>( + emulators: &'a [EmulatorRule], + platform_slug: Option<&str>, + platform_fs_slug: Option<&str>, +) -> Option<&'a EmulatorRule> { + let matches = |e: &&EmulatorRule| { + e.platform_slugs.iter().any(|s| { + platform_slug.is_some_and(|ps| s.eq_ignore_ascii_case(ps)) + || platform_fs_slug.is_some_and(|pfs| s.eq_ignore_ascii_case(pfs)) + }) + }; + // Prefer enabled emulator first, then any configured emulator + emulators + .iter() + .find(|e| e.enabled && matches(e)) + .or_else(|| emulators.iter().find(matches)) +} + +#[tauri::command] +pub async fn download_single_save( + save_id: i64, + rom_id: i64, + file_name: String, + platform_slug: String, + platform_fs_slug: Option, + emulator_hint: Option, + dest_override: Option, + state: State<'_, AppState>, +) -> Result { + let (client, device_id, max_backups, target_path, is_dir) = { + let cfg = state.config.lock().unwrap(); + let client = make_client(&cfg)?; + let emu = emulator_hint + .as_deref() + .and_then(|eid| cfg.emulators.iter().find(|e| e.id.eq_ignore_ascii_case(eid))) + .or_else(|| { + find_emulator_for_platform( + &cfg.emulators, + Some(&platform_slug), + platform_fs_slug.as_deref(), + ) + }); + + let (base_dir, is_dir, depth) = if let Some(override_dir) = + dest_override.filter(|d| !d.trim().is_empty()) + { + let dir_mode = emu + .map(|e| e.structure == crate::config::SaveStructure::FolderPerGame) + .unwrap_or(false); + (override_dir, dir_mode, emu.map(|e| e.folder_depth).unwrap_or(1)) + } else if let Some(e) = emu { + if e.save_dir.trim().is_empty() { + return Err(format!("Emulator '{}' has no Save Directory configured", e.name)); + } + ( + e.save_dir.clone(), + e.structure == crate::config::SaveStructure::FolderPerGame, + e.folder_depth, + ) + } else { + return Err(format!( + "No emulator rule configured for platform '{}'. Add one in Emulators first.", + platform_slug + )); + }; + + let target_path = if is_dir { + let trimmed = file_name.strip_suffix(".zip").unwrap_or(&file_name); + if depth > 1 { + let mut p = PathBuf::from(&base_dir); + for part in trimmed.splitn(depth, '_') { + p.push(part); + } + p + } else { + PathBuf::from(&base_dir).join(trimmed) + } + } else { + PathBuf::from(&base_dir).join(&file_name) + }; + + ( + client, + cfg.connection.device_id.clone(), + cfg.settings.max_backups_per_save, + target_path, + is_dir, + ) + }; + + let bytes = client + .download_save_bytes(save_id, device_id.as_deref(), None) + .await?; + let _ = create_backup(&target_path, rom_id, is_dir, max_backups); + write_downloaded_save(&target_path, &bytes, is_dir)?; + if let Some(ref did) = device_id { + let _ = client.confirm_save_downloaded(save_id, did).await; + } + + { + let mut cfg = state.config.lock().unwrap(); + push_log( + &mut cfg, + "success", + "download_save", + format!("Downloaded save '{}' to {}", file_name, target_path.display()), + Some(rom_id), + Some(target_path.to_string_lossy().to_string()), + ); + let _ = save_config(&cfg); + } + + Ok(target_path.to_string_lossy().to_string()) +} + +#[tauri::command] +pub async fn download_single_state( + state_id: i64, + rom_id: i64, + file_name: String, + platform_slug: String, + platform_fs_slug: Option, + emulator_hint: Option, + dest_override: Option, + state: State<'_, AppState>, +) -> Result { + let (client, max_backups, target_path) = { + let cfg = state.config.lock().unwrap(); + let client = make_client(&cfg)?; + let emu = emulator_hint + .as_deref() + .and_then(|eid| cfg.emulators.iter().find(|e| e.id.eq_ignore_ascii_case(eid))) + .or_else(|| { + find_emulator_for_platform( + &cfg.emulators, + Some(&platform_slug), + platform_fs_slug.as_deref(), + ) + }); + + let base_dir = if let Some(override_dir) = dest_override.filter(|d| !d.trim().is_empty()) { + override_dir + } else if let Some(e) = emu { + e.state_dir + .clone() + .filter(|d| !d.trim().is_empty()) + .unwrap_or_else(|| e.save_dir.clone()) + } else { + return Err(format!( + "No emulator rule configured for platform '{}'. Add one in Emulators first.", + platform_slug + )); + }; + + ( + client, + cfg.settings.max_backups_per_save, + PathBuf::from(&base_dir).join(&file_name), + ) + }; + + let bytes = client.download_state_bytes(state_id).await?; + let _ = create_backup(&target_path, rom_id, false, max_backups); + write_downloaded_save(&target_path, &bytes, false)?; + + { + let mut cfg = state.config.lock().unwrap(); + push_log( + &mut cfg, + "success", + "download_state", + format!("Downloaded save state '{}' to {}", file_name, target_path.display()), + Some(rom_id), + Some(target_path.to_string_lossy().to_string()), + ); + let _ = save_config(&cfg); + } + + Ok(target_path.to_string_lossy().to_string()) +} + +#[tauri::command] +pub async fn upload_single_save( + local_path: String, + file_name: String, + rom_id: i64, + emulator_id: String, + slot: String, + is_directory: bool, + is_state: bool, + state: State<'_, AppState>, +) -> Result<(), String> { + let (client, device_id) = { + let cfg = state.config.lock().unwrap(); + (make_client(&cfg)?, cfg.connection.device_id.clone()) + }; + let (bytes, hash) = read_save_payload_and_hash(Path::new(&local_path), is_directory)?; + + if is_state { + let existing = client + .get_states(Some(rom_id), None) + .await + .unwrap_or_default() + .into_iter() + .find(|s| s.file_name.eq_ignore_ascii_case(&file_name)); + if let Some(remote) = existing { + client.update_state(remote.id, &file_name, bytes).await?; + } else { + client + .upload_state(rom_id, Some(&emulator_id), &file_name, bytes) + .await?; + } + let mut cfg = state.config.lock().unwrap(); + cfg.synced_state_hashes.insert(local_path.clone(), hash); + push_log( + &mut cfg, + "success", + "upload_state", + format!("Uploaded save state '{}'", file_name), + Some(rom_id), + Some(local_path), + ); + let _ = save_config(&cfg); + } else { + let slot_val = if slot.trim().is_empty() { "default" } else { &slot }; + client + .upload_save( + rom_id, + Some(&emulator_id), + Some(slot_val), + device_id.as_deref(), + None, + true, + &file_name, + bytes, + ) + .await?; + let mut cfg = state.config.lock().unwrap(); + push_log( + &mut cfg, + "success", + "upload_save", + format!("Uploaded save '{}' (slot: {})", file_name, slot_val), + Some(rom_id), + Some(local_path), + ); + let _ = save_config(&cfg); + } + + Ok(()) +} + +// ---------- Saves, States & Sync ---------- + +#[tauri::command] +pub fn discover_local_saves(state: State<'_, AppState>) -> Vec { + let cfg = state.config.lock().unwrap(); + let roms = state.rom_cache.lock().unwrap(); + discover_saves_for_emulators(&cfg.emulators, &roms, &cfg.manual_links) +} + +#[tauri::command] +pub fn link_save_to_rom( + local_path: String, + rom_id: i64, + rom_name: String, + emulator_id: String, + slot: String, + is_state: bool, + state: State<'_, AppState>, +) -> Result<(), String> { + let mut cfg = state.config.lock().unwrap(); + cfg.manual_links.insert( + local_path.clone(), + ManualLink { + local_path, + rom_id, + rom_name, + emulator_id, + slot: if slot.trim().is_empty() { + "default".to_string() + } else { + slot + }, + is_state, + }, + ); + save_config(&cfg) +} + +#[tauri::command] +pub fn unlink_save(local_path: String, state: State<'_, AppState>) -> Result<(), String> { + let mut cfg = state.config.lock().unwrap(); + cfg.manual_links.remove(&local_path); + save_config(&cfg) +} + +#[tauri::command] +pub async fn fetch_remote_saves_and_states( + rom_id: Option, + state: State<'_, AppState>, +) -> Result { + let (client, device_id) = { + let cfg = state.config.lock().unwrap(); + (make_client(&cfg)?, cfg.connection.device_id.clone()) + }; + let saves = client + .get_saves(rom_id, None, device_id.as_deref()) + .await?; + let states = client.get_states(rom_id, None).await?; + Ok(RemoteSavesAndStates { saves, states }) +} + +#[tauri::command] +pub async fn run_full_sync( + app: AppHandle, + state: State<'_, AppState>, +) -> Result { + let (client, mut cfg_clone) = { + let cfg = state.config.lock().unwrap(); + (make_client(&cfg)?, cfg.clone()) + }; + + // Ensure ROM cache is populated before matching + let roms = { + let current = state.rom_cache.lock().unwrap().clone(); + if current.is_empty() { + let fetched = client.get_all_roms_for_platforms(&[]).await?; + *state.rom_cache.lock().unwrap() = fetched.clone(); + fetched + } else { + current + } + }; + + let summary = run_sync(&client, &mut cfg_clone, &roms).await?; + + { + let mut cfg = state.config.lock().unwrap(); + cfg.synced_state_hashes = cfg_clone.synced_state_hashes; + cfg.sync_logs = cfg_clone.sync_logs; + let _ = save_config(&cfg); + } + *state.conflicts.lock().unwrap() = summary.conflicts.clone(); + let _ = app.emit("sync:completed", &summary); + + Ok(summary) +} + +#[tauri::command] +pub async fn resolve_sync_conflict( + conflict_id: String, + resolution: String, // "keep_local" | "keep_server" + state: State<'_, AppState>, +) -> Result<(), String> { + let conflict = { + let conflicts = state.conflicts.lock().unwrap(); + conflicts + .iter() + .find(|c| c.id == conflict_id) + .cloned() + .ok_or_else(|| "Conflict not found".to_string())? + }; + + let (client, device_id, max_backups) = { + let cfg = state.config.lock().unwrap(); + ( + make_client(&cfg)?, + cfg.connection.device_id.clone(), + cfg.settings.max_backups_per_save, + ) + }; + + let local_path = Path::new(&conflict.local_path); + match resolution.as_str() { + "keep_local" => { + let (bytes, _) = read_save_payload_and_hash(local_path, conflict.is_directory)?; + client + .upload_save( + conflict.rom_id, + Some(&conflict.emulator_id), + Some(&conflict.slot), + device_id.as_deref(), + None, + true, + &conflict.file_name, + bytes, + ) + .await?; + let mut cfg = state.config.lock().unwrap(); + push_log( + &mut cfg, + "success", + "resolve_conflict", + format!("Resolved conflict for '{}' by uploading local save", conflict.file_name), + Some(conflict.rom_id), + Some(conflict.local_path.clone()), + ); + let _ = save_config(&cfg); + } + "keep_server" => { + let save_id = conflict + .save_id + .ok_or_else(|| "No server save ID for conflict".to_string())?; + let bytes = client + .download_save_bytes(save_id, device_id.as_deref(), None) + .await?; + let _ = create_backup(local_path, conflict.rom_id, conflict.is_directory, max_backups); + write_downloaded_save(local_path, &bytes, conflict.is_directory)?; + if let Some(ref did) = device_id { + let _ = client.confirm_save_downloaded(save_id, did).await; + } + let mut cfg = state.config.lock().unwrap(); + push_log( + &mut cfg, + "success", + "resolve_conflict", + format!( + "Resolved conflict for '{}' by downloading server save (backup saved)", + conflict.file_name + ), + Some(conflict.rom_id), + Some(conflict.local_path.clone()), + ); + let _ = save_config(&cfg); + } + _ => return Err("Invalid resolution (use keep_local or keep_server)".into()), + } + + state.conflicts.lock().unwrap().retain(|c| c.id != conflict_id); + Ok(()) +} + +#[tauri::command] +pub fn list_backups() -> Vec { + list_all_backups() +} + +#[tauri::command] +pub fn restore_backup( + backup_path: String, + target_path: String, + is_directory: bool, +) -> Result<(), String> { + restore_backup_to_path(Path::new(&backup_path), Path::new(&target_path), is_directory) +} + +// ---------- Settings & Watcher ---------- + +#[tauri::command] +pub fn save_settings( + settings: WatcherSettings, + device_name: Option, + app: AppHandle, + state: State<'_, AppState>, +) -> Result { + { + let mut cfg = state.config.lock().unwrap(); + cfg.settings = settings; + if let Some(dn) = device_name { + if !dn.trim().is_empty() { + cfg.connection.device_name = dn.trim().to_string(); + } + } + save_config(&cfg)?; + } + let _ = refresh_watcher_internal(app, &state); + Ok(snapshot_from_state(&state)) +} + +#[tauri::command] +pub fn clear_sync_logs(state: State<'_, AppState>) -> Result<(), String> { + let mut cfg = state.config.lock().unwrap(); + cfg.sync_logs.clear(); + save_config(&cfg) +} + +#[tauri::command] +pub fn restart_watcher( + app: AppHandle, + state: State<'_, AppState>, +) -> Result { + refresh_watcher_internal(app, &state)?; + Ok(snapshot_from_state(&state)) +} + +pub fn refresh_watcher_internal(app: AppHandle, state: &AppState) -> Result<(), String> { + let (enabled, debounce, emulators) = { + let cfg = state.config.lock().unwrap(); + ( + cfg.settings.enabled, + cfg.settings.debounce_seconds, + cfg.emulators.clone(), + ) + }; + let mut guard = state.watcher.lock().unwrap(); + *guard = None; + if enabled { + let handle = start_watcher(app, &emulators, debounce)?; + *guard = Some(handle); + } + Ok(()) +} + +// ---------- NextUI USB / SD Card Handheld Mode ---------- + +#[tauri::command] +pub fn detect_nextui_volumes() -> Vec { + detect_nextui_vols_impl() +} + +#[tauri::command] +pub fn inspect_nextui_card( + sd_root: String, + state: State<'_, AppState>, +) -> NextUiCardInspection { + let cfg = state.config.lock().unwrap(); + let roms = state.rom_cache.lock().unwrap(); + inspect_nextui_impl(Path::new(&sd_root), &roms, &cfg.manual_links) +} + +#[tauri::command] +pub fn rename_nextui_handheld(sd_root: String, device_name: String) -> Result<(), String> { + let root = Path::new(&sd_root); + let (existing_id, _) = load_handheld_meta(root, &device_name); + save_handheld_meta(root, existing_id, device_name.trim()); + Ok(()) +} + +#[tauri::command] +pub async fn sync_nextui_card( + sd_root: String, + sync_states: bool, + app: AppHandle, + state: State<'_, AppState>, +) -> Result { + let (client, mut cfg_clone) = { + let cfg = state.config.lock().unwrap(); + (make_client(&cfg)?, cfg.clone()) + }; + + let roms = { + let current = state.rom_cache.lock().unwrap().clone(); + if current.is_empty() { + let fetched = client.get_all_roms_for_platforms(&[]).await?; + *state.rom_cache.lock().unwrap() = fetched.clone(); + fetched + } else { + current + } + }; + + let summary = + sync_nextui_impl(&client, &mut cfg_clone, &roms, Path::new(&sd_root), sync_states).await?; + + { + let mut cfg = state.config.lock().unwrap(); + cfg.synced_state_hashes = cfg_clone.synced_state_hashes; + cfg.sync_logs = cfg_clone.sync_logs; + let _ = save_config(&cfg); + } + { + let mut conflicts = state.conflicts.lock().unwrap(); + for c in &summary.conflicts { + if !conflicts.iter().any(|existing| existing.id == c.id) { + conflicts.push(c.clone()); + } + } + } + let _ = app.emit("sync:completed", &summary); + + Ok(summary) +} + +#[tauri::command] +pub async fn download_rom_to_nextui( + sd_root: String, + rom_id: i64, + file_name: String, + platform_slug: String, + platform_display_name: String, + app: AppHandle, + state: State<'_, AppState>, +) -> Result { + let client = { + let cfg = state.config.lock().unwrap(); + make_client(&cfg)? + }; + let dest_dir = resolve_nextui_rom_folder( + Path::new(&sd_root), + &platform_slug, + &platform_display_name, + ); + let dest_path = dest_dir.join(&file_name); + let app_clone = app.clone(); + let emit_file_name = file_name.clone(); + client + .download_rom(rom_id, &file_name, &dest_path, move |downloaded, total| { + let _ = app_clone.emit( + "rom:download-progress", + serde_json::json!({ + "romId": rom_id, + "fileName": emit_file_name, + "downloaded": downloaded, + "total": total, + }), + ); + }) + .await?; + + { + let mut cfg = state.config.lock().unwrap(); + push_log( + &mut cfg, + "success", + "nextui_rom_download", + format!("[NextUI USB] Sent ROM to {}", dest_path.display()), + Some(rom_id), + Some(dest_path.to_string_lossy().to_string()), + ); + let _ = save_config(&cfg); + } + + Ok(dest_path.to_string_lossy().to_string()) +} diff --git a/src-tauri/src/config.rs b/src-tauri/src/config.rs new file mode 100644 index 0000000..1131485 --- /dev/null +++ b/src-tauri/src/config.rs @@ -0,0 +1,197 @@ +use directories::ProjectDirs; +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; +use std::fs; +use std::path::PathBuf; +use uuid::Uuid; + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ConnectionConfig { + pub server_url: String, + pub access_token: Option, + pub refresh_token: Option, + pub username: Option, + pub device_id: Option, + pub device_name: String, + pub client_device_identifier: String, +} + +impl Default for ConnectionConfig { + fn default() -> Self { + let host = hostname::get() + .ok() + .and_then(|h| h.into_string().ok()) + .unwrap_or_else(|| "My Computer".to_string()); + Self { + server_url: String::new(), + access_token: None, + refresh_token: None, + username: None, + device_id: None, + device_name: format!("{} (RomM Companion)", host), + client_device_identifier: Uuid::new_v4().to_string(), + } + } +} + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "snake_case")] +pub enum SaveStructure { + /// Individual save files named after the ROM (e.g. `Game (USA).sav`, `Game.mcr`) + FilePerGame, + /// Directory per game (e.g. RPCS3, Ryujinx, Cemu, Azahar, PPSSPP) — zipped as a single archive for RomM sync + FolderPerGame, + /// Shared memory card / system file (e.g. PCSX2 Mcd001.ps2, Dolphin MemoryCardA.USA.raw) + MemoryCard, +} + +fn default_folder_depth() -> usize { + 1 +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct EmulatorRule { + pub id: String, + pub name: String, + pub platform_slugs: Vec, + pub save_dir: String, + pub state_dir: Option, + pub rom_dir: Option, + pub save_extensions: Vec, + pub state_extensions: Vec, + pub structure: SaveStructure, + #[serde(default = "default_folder_depth")] + pub folder_depth: usize, + pub enabled: bool, + pub is_custom: bool, + pub sync_states: bool, + /// Optional default slot name sent to RomM `/api/sync/negotiate` + pub default_slot: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ManualLink { + pub local_path: String, + pub rom_id: i64, + pub rom_name: String, + pub emulator_id: String, + pub slot: String, + pub is_state: bool, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct WatcherSettings { + pub enabled: bool, + pub debounce_seconds: u64, + pub auto_sync_on_change: bool, + pub max_backups_per_save: usize, + pub minimize_to_tray: bool, + pub default_rom_download_dir: Option, +} + +impl Default for WatcherSettings { + fn default() -> Self { + Self { + enabled: true, + debounce_seconds: 5, + auto_sync_on_change: true, + max_backups_per_save: 10, + minimize_to_tray: true, + default_rom_download_dir: None, + } + } +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SyncLogEntry { + pub id: String, + pub timestamp: String, + pub level: String, // "info" | "success" | "warning" | "error" + pub action: String, + pub message: String, + pub rom_id: Option, + pub file_path: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +#[serde(rename_all = "camelCase")] +pub struct AppConfig { + pub connection: ConnectionConfig, + pub emulators: Vec, + pub manual_links: HashMap, + pub settings: WatcherSettings, + /// Tracks last-known local content hash per canonical path for state/save change detection + pub synced_state_hashes: HashMap, + pub sync_logs: Vec, +} + +pub fn app_data_dir() -> PathBuf { + if let Some(proj) = ProjectDirs::from("com", "romm", "RomMCompanion") { + let dir = proj.data_local_dir().to_path_buf(); + let _ = fs::create_dir_all(&dir); + dir + } else { + let dir = PathBuf::from(".romm-companion"); + let _ = fs::create_dir_all(&dir); + dir + } +} + +pub fn backups_dir() -> PathBuf { + let dir = app_data_dir().join("backups"); + let _ = fs::create_dir_all(&dir); + dir +} + +pub fn config_file_path() -> PathBuf { + app_data_dir().join("config.json") +} + +pub fn load_config() -> AppConfig { + let path = config_file_path(); + if let Ok(raw) = fs::read_to_string(&path) { + if let Ok(cfg) = serde_json::from_str::(&raw) { + return cfg; + } + } + AppConfig::default() +} + +pub fn save_config(cfg: &AppConfig) -> Result<(), String> { + let path = config_file_path(); + if let Some(parent) = path.parent() { + fs::create_dir_all(parent).map_err(|e| e.to_string())?; + } + let json = serde_json::to_string_pretty(cfg).map_err(|e| e.to_string())?; + fs::write(&path, json).map_err(|e| e.to_string()) +} + +pub fn push_log( + cfg: &mut AppConfig, + level: &str, + action: &str, + message: impl Into, + rom_id: Option, + file_path: Option, +) { + cfg.sync_logs.insert( + 0, + SyncLogEntry { + id: Uuid::new_v4().to_string(), + timestamp: chrono::Utc::now().to_rfc3339(), + level: level.to_string(), + action: action.to_string(), + message: message.into(), + rom_id, + file_path, + }, + ); + if cfg.sync_logs.len() > 250 { + cfg.sync_logs.truncate(250); + } +} diff --git a/src-tauri/src/emulators.rs b/src-tauri/src/emulators.rs new file mode 100644 index 0000000..e3b22ee --- /dev/null +++ b/src-tauri/src/emulators.rs @@ -0,0 +1,433 @@ +use crate::config::{EmulatorRule, SaveStructure}; +use directories::BaseDirs; +use serde::{Deserialize, Serialize}; +use std::path::{Path, PathBuf}; + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct EmulatorPresetInfo { + pub id: String, + pub name: String, + pub category: String, // "console" | "handheld" + pub platform_slugs: Vec, + pub detected: bool, + pub detected_save_dir: Option, + pub detected_state_dir: Option, + pub default_save_dir: String, + pub default_state_dir: Option, + pub save_extensions: Vec, + pub state_extensions: Vec, + pub structure: SaveStructure, + pub folder_depth: usize, + pub notes: String, +} + +fn home_dir() -> PathBuf { + BaseDirs::new() + .map(|b| b.home_dir().to_path_buf()) + .unwrap_or_else(|| PathBuf::from(".")) +} + +fn config_dir() -> PathBuf { + BaseDirs::new() + .map(|b| b.config_dir().to_path_buf()) + .unwrap_or_else(home_dir) +} + +fn data_dir() -> PathBuf { + BaseDirs::new() + .map(|b| b.data_dir().to_path_buf()) + .unwrap_or_else(home_dir) +} + +fn data_local_dir() -> PathBuf { + BaseDirs::new() + .map(|b| b.data_local_dir().to_path_buf()) + .unwrap_or_else(home_dir) +} + +fn first_existing(candidates: &[PathBuf]) -> Option { + candidates.iter().find(|p| p.exists()).cloned() +} + +fn path_to_string(p: &Path) -> String { + p.to_string_lossy().to_string() +} + +struct PresetDef { + id: &'static str, + name: &'static str, + category: &'static str, + platform_slugs: Vec<&'static str>, + save_candidates: Vec, + state_candidates: Vec, + save_extensions: Vec<&'static str>, + state_extensions: Vec<&'static str>, + structure: SaveStructure, + folder_depth: usize, + notes: &'static str, +} + +fn build_preset_defs() -> Vec { + let home = home_dir(); + let cfg = config_dir(); + let data = data_dir(); + let local = data_local_dir(); + + #[cfg(target_os = "macos")] + let app_support = home.join("Library/Application Support"); + #[cfg(not(target_os = "macos"))] + let app_support = data.clone(); + + let docs = home.join("Documents"); + + vec![ + // ---------- Standalone Console Emulators ---------- + PresetDef { + id: "dolphin", + name: "Dolphin (GameCube / Wii)", + category: "console", + platform_slugs: vec!["ngc", "gc", "gamecube", "wii"], + save_candidates: vec![ + app_support.join("Dolphin/GC"), + docs.join("Dolphin Emulator/GC"), + data.join("dolphin-emu/GC"), + home.join(".local/share/dolphin-emu/GC"), + home.join(".var/app/org.DolphinEmu.dolphin-emu/data/dolphin-emu/GC"), + ], + state_candidates: vec![ + app_support.join("Dolphin/StateSaves"), + docs.join("Dolphin Emulator/StateSaves"), + data.join("dolphin-emu/StateSaves"), + home.join(".local/share/dolphin-emu/StateSaves"), + home.join(".var/app/org.DolphinEmu.dolphin-emu/data/dolphin-emu/StateSaves"), + ], + save_extensions: vec!["gci", "raw", "sav", "bin"], + state_extensions: vec!["s01", "s02", "s03", "s04", "s05", "s06", "s07", "s08", "s09", "s10", "sav"], + structure: SaveStructure::FilePerGame, + folder_depth: 1, + notes: "Supports GCI Folder mode (recommended for per-game matching) and raw memory cards.", + }, + PresetDef { + id: "pcsx2", + name: "PCSX2 (PlayStation 2)", + category: "console", + platform_slugs: vec!["ps2"], + save_candidates: vec![ + app_support.join("PCSX2/memcards"), + docs.join("PCSX2/memcards"), + cfg.join("PCSX2/memcards"), + home.join(".config/PCSX2/memcards"), + home.join(".var/app/net.pcsx2.PCSX2/config/PCSX2/memcards"), + ], + state_candidates: vec![ + app_support.join("PCSX2/sstates"), + docs.join("PCSX2/sstates"), + cfg.join("PCSX2/sstates"), + home.join(".config/PCSX2/sstates"), + home.join(".var/app/net.pcsx2.PCSX2/config/PCSX2/sstates"), + ], + save_extensions: vec!["ps2", "mcd"], + state_extensions: vec!["p2s"], + structure: SaveStructure::MemoryCard, + folder_depth: 1, + notes: "Tip: Enable Folder Memory Cards in PCSX2 or link individual .ps2 cards to ROMs.", + }, + PresetDef { + id: "rpcs3", + name: "RPCS3 (PlayStation 3)", + category: "console", + platform_slugs: vec!["ps3"], + save_candidates: vec![ + app_support.join("rpcs3/dev_hdd0/home/00000001/savedata"), + cfg.join("rpcs3/dev_hdd0/home/00000001/savedata"), + home.join(".config/rpcs3/dev_hdd0/home/00000001/savedata"), + home.join(".var/app/net.rpcs3.RPCS3/config/rpcs3/dev_hdd0/home/00000001/savedata"), + ], + state_candidates: vec![ + app_support.join("rpcs3/savestates"), + cfg.join("rpcs3/savestates"), + home.join(".config/rpcs3/savestates"), + home.join(".var/app/net.rpcs3.RPCS3/config/rpcs3/savestates"), + ], + save_extensions: vec![], + state_extensions: vec!["sav"], + structure: SaveStructure::FolderPerGame, + folder_depth: 1, + notes: "Each PS3 title stores a folder inside savedata; zipped automatically for RomM sync.", + }, + PresetDef { + id: "cemu", + name: "Cemu (Wii U)", + category: "console", + platform_slugs: vec!["wiiu"], + save_candidates: vec![ + app_support.join("Cemu/mlc01/usr/save"), + data.join("Cemu/mlc01/usr/save"), + local.join("Cemu/mlc01/usr/save"), + home.join(".local/share/Cemu/mlc01/usr/save"), + home.join(".var/app/info.cemu.Cemu/data/Cemu/mlc01/usr/save"), + ], + state_candidates: vec![], + save_extensions: vec![], + state_extensions: vec![], + structure: SaveStructure::FolderPerGame, + folder_depth: 2, + notes: "Wii U title save directories inside mlc01/usr/save// (depth 2) are zipped per title for RomM.", + }, + PresetDef { + id: "duckstation", + name: "DuckStation (PlayStation)", + category: "console", + platform_slugs: vec!["psx", "ps1", "ps"], + save_candidates: vec![ + app_support.join("DuckStation/memcards"), + docs.join("DuckStation/memcards"), + data.join("duckstation/memcards"), + home.join(".local/share/duckstation/memcards"), + home.join(".var/app/org.duckstation.DuckStation/data/duckstation/memcards"), + ], + state_candidates: vec![ + app_support.join("DuckStation/savestates"), + docs.join("DuckStation/savestates"), + data.join("duckstation/savestates"), + home.join(".local/share/duckstation/savestates"), + home.join(".var/app/org.duckstation.DuckStation/data/duckstation/savestates"), + ], + save_extensions: vec!["mcd", "mcr", "srm"], + state_extensions: vec!["sav"], + structure: SaveStructure::FilePerGame, + folder_depth: 1, + notes: "Works best with 'Separate Card Per Game (Title)' enabled in DuckStation.", + }, + PresetDef { + id: "ppsspp", + name: "PPSSPP (PSP)", + category: "console", + platform_slugs: vec!["psp"], + save_candidates: vec![ + cfg.join("ppsspp/PSP/SAVEDATA"), + home.join(".config/ppsspp/PSP/SAVEDATA"), + docs.join("PPSSPP/PSP/SAVEDATA"), + home.join(".var/app/org.ppsspp.PPSSPP/config/ppsspp/PSP/SAVEDATA"), + ], + state_candidates: vec![ + cfg.join("ppsspp/PSP/PPSSPP_STATE"), + home.join(".config/ppsspp/PSP/PPSSPP_STATE"), + docs.join("PPSSPP/PSP/PPSSPP_STATE"), + home.join(".var/app/org.ppsspp.PPSSPP/config/ppsspp/PSP/PPSSPP_STATE"), + ], + save_extensions: vec![], + state_extensions: vec!["ppst"], + structure: SaveStructure::FolderPerGame, + folder_depth: 1, + notes: "PSP savedata folders are zipped per game; PPSSPP_STATE .ppst files sync as save states.", + }, + PresetDef { + id: "ryujinx", + name: "Ryujinx (Nintendo Switch)", + category: "console", + platform_slugs: vec!["switch", "ns", "nintendo-switch"], + save_candidates: vec![ + app_support.join("Ryujinx/bis/user/save"), + cfg.join("Ryujinx/bis/user/save"), + data.join("Ryujinx/bis/user/save"), + home.join(".config/Ryujinx/bis/user/save"), + ], + state_candidates: vec![], + save_extensions: vec![], + state_extensions: vec![], + structure: SaveStructure::FolderPerGame, + folder_depth: 1, + notes: "Switch save folders under bis/user/save are archived per title; link Title IDs in Saves view.", + }, + PresetDef { + id: "azahar", + name: "Azahar / Citra (Nintendo 3DS)", + category: "console", + platform_slugs: vec!["3ds", "n3ds"], + save_candidates: vec![ + app_support.join("Azahar/sdmc/Nintendo 3DS"), + app_support.join("Citra/sdmc/Nintendo 3DS"), + data.join("azahar-emu/sdmc/Nintendo 3DS"), + data.join("citra-emu/sdmc/Nintendo 3DS"), + home.join(".local/share/azahar-emu/sdmc/Nintendo 3DS"), + home.join(".local/share/citra-emu/sdmc/Nintendo 3DS"), + ], + state_candidates: vec![ + app_support.join("Azahar/states"), + app_support.join("Citra/states"), + data.join("azahar-emu/states"), + data.join("citra-emu/states"), + home.join(".local/share/azahar-emu/states"), + ], + save_extensions: vec!["sav", "dat"], + state_extensions: vec!["cst"], + structure: SaveStructure::FolderPerGame, + folder_depth: 5, + notes: "Detects both Azahar and legacy Citra 3DS directories (depth 5 reaches //title//).", + }, + // ---------- Handheld & PC-Adjacent Emulators ---------- + PresetDef { + id: "melonds", + name: "melonDS (Nintendo DS / DSi)", + category: "handheld", + platform_slugs: vec!["nds", "ds", "dsi"], + save_candidates: vec![ + app_support.join("melonDS"), + cfg.join("melonDS"), + home.join(".config/melonDS"), + home.join(".var/app/net.kuribo64.melonDS/config/melonDS"), + ], + state_candidates: vec![ + app_support.join("melonDS"), + cfg.join("melonDS"), + home.join(".config/melonDS"), + ], + save_extensions: vec!["sav", "dsv"], + state_extensions: vec!["ml0", "ml1", "ml2", "ml3", "ml4", "ml5", "ml6", "ml7", "ml8", "mln"], + structure: SaveStructure::FilePerGame, + folder_depth: 1, + notes: "Point to your melonDS saves folder (or ROM folder if saves live alongside .nds files).", + }, + PresetDef { + id: "mgba", + name: "mGBA (GB / GBC / GBA)", + category: "handheld", + platform_slugs: vec!["gba", "gbc", "gb"], + save_candidates: vec![ + app_support.join("mGBA"), + cfg.join("mgba"), + home.join(".config/mgba"), + home.join(".var/app/io.mgba.mGBA/config/mgba"), + ], + state_candidates: vec![ + app_support.join("mGBA"), + cfg.join("mgba"), + home.join(".config/mgba"), + ], + save_extensions: vec!["sav", "srm"], + state_extensions: vec!["ss0", "ss1", "ss2", "ss3", "ss4", "ss5", "ss6", "ss7", "ss8", "ss9"], + structure: SaveStructure::FilePerGame, + folder_depth: 1, + notes: "Matches .sav/.srm files by ROM name; set save directory to your mGBA save/ROM path.", + }, + PresetDef { + id: "flycast", + name: "Flycast (Dreamcast / Naomi)", + category: "handheld", + platform_slugs: vec!["dc", "dreamcast", "naomi"], + save_candidates: vec![ + app_support.join("Flycast/data"), + data.join("flycast/data"), + home.join(".local/share/flycast/data"), + home.join(".var/app/org.flycast.Flycast/data/flycast/data"), + ], + state_candidates: vec![ + app_support.join("Flycast/data"), + data.join("flycast/data"), + home.join(".local/share/flycast/data"), + ], + save_extensions: vec!["bin", "vmu"], + state_extensions: vec!["state", "state1", "state2", "state3"], + structure: SaveStructure::FilePerGame, + folder_depth: 1, + notes: "Enable 'Per-Game VMUs' in Flycast for automatic per-game ROM matching.", + }, + PresetDef { + id: "xemu", + name: "xemu (Original Xbox)", + category: "handheld", + platform_slugs: vec!["xbox"], + save_candidates: vec![ + app_support.join("xemu/xemu"), + data.join("xemu/xemu"), + home.join(".local/share/xemu/xemu"), + home.join(".var/app/app.xemu.xemu/data/xemu/xemu"), + ], + state_candidates: vec![], + save_extensions: vec!["qcow2", "bin", "sav"], + state_extensions: vec![], + structure: SaveStructure::MemoryCard, + folder_depth: 1, + notes: "Tracks xemu memory unit / extracted save folders.", + }, + PresetDef { + id: "xenia", + name: "Xenia (Xbox 360)", + category: "handheld", + platform_slugs: vec!["xbox360", "x360"], + save_candidates: vec![ + docs.join("Xenia/content"), + local.join("Xenia/content"), + data.join("xenia/content"), + ], + state_candidates: vec![], + save_extensions: vec![], + state_extensions: vec![], + structure: SaveStructure::FolderPerGame, + folder_depth: 1, + notes: "Xbox 360 title save folders under Xenia/content are archived per game.", + }, + ] +} + +pub fn detect_emulator_presets() -> Vec { + build_preset_defs() + .into_iter() + .map(|d| { + let detected_save = first_existing(&d.save_candidates); + let detected_state = first_existing(&d.state_candidates); + let default_save = detected_save + .as_ref() + .or_else(|| d.save_candidates.first()) + .map(|p| path_to_string(p)) + .unwrap_or_default(); + let default_state = detected_state + .as_ref() + .or_else(|| d.state_candidates.first()) + .map(|p| path_to_string(p)); + EmulatorPresetInfo { + id: d.id.to_string(), + name: d.name.to_string(), + category: d.category.to_string(), + platform_slugs: d.platform_slugs.into_iter().map(String::from).collect(), + detected: detected_save.is_some(), + detected_save_dir: detected_save.map(|p| path_to_string(&p)), + detected_state_dir: detected_state.map(|p| path_to_string(&p)), + default_save_dir: default_save, + default_state_dir: default_state, + save_extensions: d.save_extensions.into_iter().map(String::from).collect(), + state_extensions: d.state_extensions.into_iter().map(String::from).collect(), + structure: d.structure, + folder_depth: d.folder_depth, + notes: d.notes.to_string(), + } + }) + .collect() +} + +pub fn preset_to_rule(preset: &EmulatorPresetInfo) -> EmulatorRule { + EmulatorRule { + id: preset.id.clone(), + name: preset.name.clone(), + platform_slugs: preset.platform_slugs.clone(), + save_dir: preset + .detected_save_dir + .clone() + .unwrap_or_else(|| preset.default_save_dir.clone()), + state_dir: preset + .detected_state_dir + .clone() + .or_else(|| preset.default_state_dir.clone()), + rom_dir: None, + save_extensions: preset.save_extensions.clone(), + state_extensions: preset.state_extensions.clone(), + structure: preset.structure.clone(), + folder_depth: preset.folder_depth, + enabled: preset.detected, + is_custom: false, + sync_states: preset.default_state_dir.is_some(), + default_slot: "default".to_string(), + } +} diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs new file mode 100644 index 0000000..64deff2 --- /dev/null +++ b/src-tauri/src/lib.rs @@ -0,0 +1,134 @@ +mod commands; +mod config; +mod emulators; +mod matcher; +mod nextui_sd; +mod romm_api; +mod sync_engine; +mod watcher; + +use commands::{refresh_watcher_internal, AppState}; +use config::load_config; +use std::sync::Mutex; +use tauri::menu::{Menu, MenuItem}; +use tauri::tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent}; +use tauri::{Emitter, Manager, WindowEvent}; + +#[cfg_attr(mobile, tauri::mobile_entry_point)] +pub fn run() { + let cfg = load_config(); + let app_state = AppState { + config: Mutex::new(cfg), + rom_cache: Mutex::new(Vec::new()), + conflicts: Mutex::new(Vec::new()), + watcher: Mutex::new(None), + }; + + tauri::Builder::default() + .plugin(tauri_plugin_dialog::init()) + .plugin(tauri_plugin_opener::init()) + .manage(app_state) + .setup(|app| { + // Start background file watcher if enabled + let state = app.state::(); + let _ = refresh_watcher_internal(app.handle().clone(), &state); + + // Build cross-platform system tray menu + let show_item = MenuItem::with_id(app, "show", "Open RomM Companion", true, None::<&str>)?; + let sync_item = MenuItem::with_id(app, "sync", "Sync Saves Now", true, None::<&str>)?; + let quit_item = MenuItem::with_id(app, "quit", "Quit", true, None::<&str>)?; + let menu = Menu::with_items(app, &[&show_item, &sync_item, &quit_item])?; + + let mut tray_builder = TrayIconBuilder::with_id("main-tray") + .menu(&menu) + .tooltip("RomM Companion — Save Sync"); + + if let Some(icon) = app.default_window_icon() { + tray_builder = tray_builder.icon(icon.clone()); + } + + tray_builder + .on_menu_event(|app, event| match event.id.as_ref() { + "show" => { + if let Some(win) = app.get_webview_window("main") { + let _ = win.show(); + let _ = win.set_focus(); + } + } + "sync" => { + let _ = app.emit("tray:sync-now", ()); + } + "quit" => { + app.exit(0); + } + _ => {} + }) + .on_tray_icon_event(|tray, event| { + if let TrayIconEvent::Click { + button: MouseButton::Left, + button_state: MouseButtonState::Up, + .. + } = event + { + let app = tray.app_handle(); + if let Some(win) = app.get_webview_window("main") { + let _ = win.show(); + let _ = win.set_focus(); + } + } + }) + .build(app)?; + + Ok(()) + }) + .on_window_event(|window, event| { + if let WindowEvent::CloseRequested { api, .. } = event { + let state = window.state::(); + let minimize = state.config.lock().unwrap().settings.minimize_to_tray; + if minimize { + let _ = window.hide(); + api.prevent_close(); + } + } + }) + .invoke_handler(tauri::generate_handler![ + commands::get_app_state, + commands::test_server, + commands::start_device_auth, + commands::poll_device_auth, + commands::exchange_pair_code, + commands::connect_with_token, + commands::login_with_password, + commands::disconnect, + commands::get_emulator_presets, + commands::auto_populate_detected_emulators, + commands::upsert_emulator_rule, + commands::delete_emulator_rule, + commands::fetch_platforms, + commands::fetch_roms, + commands::refresh_rom_cache, + commands::scan_local_rom_folder, + commands::download_rom_to_folder, + commands::download_single_save, + commands::download_single_state, + commands::upload_single_save, + commands::discover_local_saves, + commands::link_save_to_rom, + commands::unlink_save, + commands::fetch_remote_saves_and_states, + commands::run_full_sync, + commands::resolve_sync_conflict, + commands::list_backups, + commands::restore_backup, + commands::save_settings, + commands::clear_sync_logs, + commands::restart_watcher, + commands::detect_nextui_volumes, + commands::inspect_nextui_card, + commands::rename_nextui_handheld, + commands::sync_nextui_card, + commands::download_rom_to_nextui, + ]) + .run(tauri::generate_context!()) + .expect("error while running RomM Companion"); +} diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs new file mode 100644 index 0000000..556a82a --- /dev/null +++ b/src-tauri/src/main.rs @@ -0,0 +1,6 @@ +// Prevents additional console window on Windows in release, DO NOT REMOVE!! +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] + +fn main() { + romm_companion_lib::run() +} diff --git a/src-tauri/src/matcher.rs b/src-tauri/src/matcher.rs new file mode 100644 index 0000000..2b5ab19 --- /dev/null +++ b/src-tauri/src/matcher.rs @@ -0,0 +1,568 @@ +use crate::config::{EmulatorRule, ManualLink, SaveStructure}; +use crate::romm_api::SimpleRomSchema; +use chrono::{DateTime, Utc}; +use crc32fast::Hasher as Crc32Hasher; +use md5::{Digest as Md5Digest, Md5}; +use serde::{Deserialize, Serialize}; +use sha1::Sha1; +use sha2::Sha256; +use std::collections::{HashMap, HashSet}; +use std::fs::{self, File}; +use std::io::{Read, Write}; +use std::path::{Path, PathBuf}; +use walkdir::WalkDir; +use zip::write::SimpleFileOptions; +use zip::ZipWriter; + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct DiscoveredSaveItem { + pub local_path: String, + pub file_name: String, + pub emulator_id: String, + pub emulator_name: String, + pub is_directory: bool, + pub is_state: bool, + pub size_bytes: u64, + pub updated_at: String, + pub slot: String, + pub matched_rom_id: Option, + pub matched_rom_name: Option, + pub matched_platform: Option, + pub match_confidence: f32, + pub match_source: String, // "manual" | "exact" | "fuzzy" | "unmatched" +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct LocalRomScanResult { + pub local_path: String, + pub file_name: String, + pub size_bytes: u64, + pub crc32: Option, + pub md5: Option, + pub sha1: Option, + pub matched_rom_id: Option, + pub matched_rom_name: Option, + pub matched_platform: Option, + pub match_source: String, // "hash" | "filename" | "unmatched" +} + +/// Strips parenthesized/bracketed ROM tags like `(USA)`, `(Rev 1)`, `[!]` and normalizes for matching. +pub fn normalize_title(input: &str) -> String { + let mut cleaned = String::with_capacity(input.len()); + let mut paren_depth = 0usize; + let mut bracket_depth = 0usize; + for ch in input.chars() { + match ch { + '(' => paren_depth += 1, + ')' => paren_depth = paren_depth.saturating_sub(1), + '[' => bracket_depth += 1, + ']' => bracket_depth = bracket_depth.saturating_sub(1), + _ if paren_depth == 0 && bracket_depth == 0 => { + if ch.is_alphanumeric() { + for lc in ch.to_lowercase() { + cleaned.push(lc); + } + } else { + cleaned.push(' '); + } + } + _ => {} + } + } + cleaned + .split_whitespace() + .collect::>() + .join(" ") +} + +fn tokenize(norm: &str) -> HashSet { + norm.split_whitespace() + .filter(|t| t.len() >= 2) + .map(|s| s.to_string()) + .collect() +} + +pub fn similarity_score(a: &str, b: &str) -> f32 { + let na = normalize_title(a); + let nb = normalize_title(b); + if na.is_empty() || nb.is_empty() { + return 0.0; + } + if na == nb { + return 1.0; + } + if na.contains(&nb) || nb.contains(&na) { + let min_len = na.len().min(nb.len()) as f32; + let max_len = na.len().max(nb.len()) as f32; + if min_len >= 4.0 { + return 0.78 + 0.18 * (min_len / max_len); + } + } + let ta = tokenize(&na); + let tb = tokenize(&nb); + if ta.is_empty() || tb.is_empty() { + return 0.0; + } + let inter = ta.intersection(&tb).count() as f32; + let union = ta.union(&tb).count() as f32; + inter / union +} + +pub fn match_name_to_roms<'a>( + candidate_stem: &str, + platform_slugs: &[String], + roms: &'a [SimpleRomSchema], +) -> Option<(&'a SimpleRomSchema, f32, &'static str)> { + let cand_lower = candidate_stem.trim().to_lowercase(); + let cand_norm = normalize_title(candidate_stem); + if cand_norm.is_empty() && cand_lower.is_empty() { + return None; + } + + let mut best: Option<(&SimpleRomSchema, f32, &'static str)> = None; + + for rom in roms { + let platform_bonus: f32 = if platform_slugs.is_empty() { + 0.0 + } else { + let p_slug = rom.platform_slug.to_lowercase(); + let p_fs = rom.platform_fs_slug.to_lowercase(); + if platform_slugs + .iter() + .any(|s| s.eq_ignore_ascii_case(&p_slug) || s.eq_ignore_ascii_case(&p_fs)) + { + 0.08 + } else { + -0.12 + } + }; + + // 1. Exact stem match on fs_name_no_ext or fs_name_no_tags + if rom.fs_name_no_ext.to_lowercase() == cand_lower + || rom.fs_name_no_tags.to_lowercase() == cand_lower + { + let score = (1.0 + platform_bonus).min(1.0); + if best.map_or(true, |(_, bs, _)| score > bs) { + best = Some((rom, score, "exact")); + } + continue; + } + + // 2. Fuzzy similarity against fs_name_no_tags and display name + let mut sim = similarity_score(candidate_stem, &rom.fs_name_no_tags); + if let Some(ref name) = rom.name { + sim = sim.max(similarity_score(candidate_stem, name)); + } + let adjusted = (sim + platform_bonus).clamp(0.0, 1.0); + if sim >= 0.55 && best.map_or(true, |(_, bs, _)| adjusted > bs) { + let src = if sim >= 0.99 { "exact" } else { "fuzzy" }; + best = Some((rom, adjusted, src)); + } + } + + best +} + +pub fn discover_saves_for_emulators( + emulators: &[EmulatorRule], + roms: &[SimpleRomSchema], + manual_links: &HashMap, +) -> Vec { + let mut results = Vec::new(); + + for emu in emulators.iter().filter(|e| e.enabled) { + // 1. Regular saves + let save_root = Path::new(&emu.save_dir); + if save_root.exists() { + match emu.structure { + SaveStructure::FolderPerGame => { + let depth = emu.folder_depth.max(1); + for entry in WalkDir::new(save_root) + .min_depth(depth) + .max_depth(depth) + .into_iter() + .flatten() + { + let path = entry.path(); + if !path.is_dir() { + continue; + } + let leaf_name = entry.file_name().to_string_lossy().to_string(); + if leaf_name.starts_with('.') { + continue; + } + let archive_base = if depth > 1 { + path.strip_prefix(save_root) + .ok() + .map(|rel| { + rel.components() + .map(|c| c.as_os_str().to_string_lossy().to_string()) + .collect::>() + .join("_") + }) + .unwrap_or_else(|| leaf_name.clone()) + } else { + leaf_name.clone() + }; + let (size, updated) = dir_size_and_mtime(path); + if size == 0 { + continue; + } + results.push(build_discovered_item( + path, + format!("{}.zip", archive_base), + &leaf_name, + emu, + true, + false, + size, + updated, + roms, + manual_links, + )); + } + } + SaveStructure::FilePerGame | SaveStructure::MemoryCard => { + for entry in WalkDir::new(save_root) + .max_depth(3) + .into_iter() + .flatten() + { + let path = entry.path(); + if !path.is_file() { + continue; + } + if !matches_extensions(path, &emu.save_extensions) { + continue; + } + let file_name = path + .file_name() + .map(|n| n.to_string_lossy().to_string()) + .unwrap_or_default(); + if file_name.starts_with('.') { + continue; + } + let stem = path + .file_stem() + .map(|s| s.to_string_lossy().to_string()) + .unwrap_or_else(|| file_name.clone()); + let (size, updated) = file_size_and_mtime(path); + results.push(build_discovered_item( + path, + file_name, + &stem, + emu, + false, + false, + size, + updated, + roms, + manual_links, + )); + } + } + } + } + + // 2. Save states (when enabled and state_dir exists) + if emu.sync_states { + if let Some(ref sdir) = emu.state_dir { + let state_root = Path::new(sdir); + if state_root.exists() && !emu.state_extensions.is_empty() { + for entry in WalkDir::new(state_root) + .max_depth(3) + .into_iter() + .flatten() + { + let path = entry.path(); + if !path.is_file() { + continue; + } + if !matches_extensions(path, &emu.state_extensions) { + continue; + } + let file_name = path + .file_name() + .map(|n| n.to_string_lossy().to_string()) + .unwrap_or_default(); + if file_name.starts_with('.') { + continue; + } + let stem = path + .file_stem() + .map(|s| s.to_string_lossy().to_string()) + .unwrap_or_else(|| file_name.clone()); + let (size, updated) = file_size_and_mtime(path); + results.push(build_discovered_item( + path, + file_name, + &stem, + emu, + false, + true, + size, + updated, + roms, + manual_links, + )); + } + } + } + } + } + + results +} + +#[allow(clippy::too_many_arguments)] +fn build_discovered_item( + path: &Path, + file_name: String, + stem: &str, + emu: &EmulatorRule, + is_directory: bool, + is_state: bool, + size_bytes: u64, + updated_at: String, + roms: &[SimpleRomSchema], + manual_links: &HashMap, +) -> DiscoveredSaveItem { + let path_str = path.to_string_lossy().to_string(); + + if let Some(link) = manual_links.get(&path_str) { + let rom_platform = roms + .iter() + .find(|r| r.id == link.rom_id) + .map(|r| r.platform_display_name.clone()); + return DiscoveredSaveItem { + local_path: path_str, + file_name, + emulator_id: emu.id.clone(), + emulator_name: emu.name.clone(), + is_directory, + is_state, + size_bytes, + updated_at, + slot: link.slot.clone(), + matched_rom_id: Some(link.rom_id), + matched_rom_name: Some(link.rom_name.clone()), + matched_platform: rom_platform, + match_confidence: 1.0, + match_source: "manual".to_string(), + }; + } + + if let Some((rom, conf, src)) = match_name_to_roms(stem, &emu.platform_slugs, roms) { + DiscoveredSaveItem { + local_path: path_str, + file_name, + emulator_id: emu.id.clone(), + emulator_name: emu.name.clone(), + is_directory, + is_state, + size_bytes, + updated_at, + slot: emu.default_slot.clone(), + matched_rom_id: Some(rom.id), + matched_rom_name: Some(rom.name.clone().unwrap_or_else(|| rom.fs_name_no_ext.clone())), + matched_platform: Some(rom.platform_display_name.clone()), + match_confidence: conf, + match_source: src.to_string(), + } + } else { + DiscoveredSaveItem { + local_path: path_str, + file_name, + emulator_id: emu.id.clone(), + emulator_name: emu.name.clone(), + is_directory, + is_state, + size_bytes, + updated_at, + slot: emu.default_slot.clone(), + matched_rom_id: None, + matched_rom_name: None, + matched_platform: None, + match_confidence: 0.0, + match_source: "unmatched".to_string(), + } + } +} + +fn matches_extensions(path: &Path, exts: &[String]) -> bool { + if exts.is_empty() { + return true; + } + let ext = match path.extension().and_then(|e| e.to_str()) { + Some(e) => e.to_lowercase(), + None => return false, + }; + exts.iter().any(|allowed| allowed.eq_ignore_ascii_case(&ext)) +} + +fn file_size_and_mtime(path: &Path) -> (u64, String) { + match fs::metadata(path) { + Ok(m) => { + let dt: DateTime = m + .modified() + .map(DateTime::::from) + .unwrap_or_else(|_| Utc::now()); + (m.len(), dt.to_rfc3339()) + } + Err(_) => (0, Utc::now().to_rfc3339()), + } +} + +fn dir_size_and_mtime(dir: &Path) -> (u64, String) { + let mut total = 0u64; + let mut latest: Option = None; + for entry in WalkDir::new(dir).into_iter().flatten() { + if entry.path().is_file() { + if let Ok(m) = entry.metadata() { + total += m.len(); + if let Ok(mt) = m.modified() { + if latest.map_or(true, |l| mt > l) { + latest = Some(mt); + } + } + } + } + } + let dt: DateTime = latest.map(DateTime::::from).unwrap_or_else(Utc::now); + (total, dt.to_rfc3339()) +} + +/// Reads a save file or deterministically zips a save directory into bytes, and returns `(bytes, sha256_hex)`. +pub fn read_save_payload_and_hash(path: &Path, is_directory: bool) -> Result<(Vec, String), String> { + let bytes = if is_directory { + zip_directory_deterministic(path)? + } else { + fs::read(path).map_err(|e| format!("Failed to read {}: {}", path.display(), e))? + }; + let mut hasher = Sha256::new(); + hasher.update(&bytes); + let hash = hex::encode(hasher.finalize()); + Ok((bytes, hash)) +} + +fn zip_directory_deterministic(dir: &Path) -> Result, String> { + let mut files: Vec = WalkDir::new(dir) + .into_iter() + .flatten() + .filter(|e| e.path().is_file()) + .map(|e| e.into_path()) + .collect(); + files.sort(); + + let mut cursor = std::io::Cursor::new(Vec::new()); + { + let mut zip = ZipWriter::new(&mut cursor); + let options = SimpleFileOptions::default() + .compression_method(zip::CompressionMethod::Deflated) + .last_modified_time(zip::DateTime::default()); + for file_path in files { + let rel = file_path + .strip_prefix(dir) + .map_err(|e| e.to_string())? + .to_string_lossy() + .replace('\\', "/"); + zip.start_file(rel, options).map_err(|e| e.to_string())?; + let data = fs::read(&file_path).map_err(|e| e.to_string())?; + zip.write_all(&data).map_err(|e| e.to_string())?; + } + zip.finish().map_err(|e| e.to_string())?; + } + Ok(cursor.into_inner()) +} + +/// Computes CRC32, MD5, and SHA1 in a single streaming pass over a local ROM file. +/// Skips hashing files larger than `max_hash_bytes` (e.g. 512 MB) unless requested, falling back to filename matching. +pub fn compute_rom_hashes( + path: &Path, + max_hash_bytes: u64, +) -> Result<(u64, Option, Option, Option), String> { + let meta = fs::metadata(path).map_err(|e| e.to_string())?; + let size = meta.len(); + if size > max_hash_bytes { + return Ok((size, None, None, None)); + } + let mut file = File::open(path).map_err(|e| e.to_string())?; + let mut crc = Crc32Hasher::new(); + let mut md5 = Md5::new(); + let mut sha1 = Sha1::new(); + let mut buf = vec![0u8; 256 * 1024]; + loop { + let n = file.read(&mut buf).map_err(|e| e.to_string())?; + if n == 0 { + break; + } + let chunk = &buf[..n]; + crc.update(chunk); + md5.update(chunk); + sha1.update(chunk); + } + let crc_hex = format!("{:08x}", crc.finalize()); + let md5_hex = hex::encode(md5.finalize()); + let sha1_hex = hex::encode(sha1.finalize()); + Ok((size, Some(crc_hex), Some(md5_hex), Some(sha1_hex))) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_normalize_title_strips_region_and_revision_tags() { + assert_eq!( + normalize_title("The Legend of Zelda - The Wind Waker (USA) (Rev 1) [!]"), + "the legend of zelda the wind waker" + ); + assert_eq!(normalize_title("Super_Mario_Sunshine.gci"), "super mario sunshine gci"); + } + + #[test] + fn test_similarity_score_matches_cleaned_titles() { + let score = similarity_score( + "Metroid Prime (USA)", + "Metroid Prime (Europe) (En,Fr,De,Es,It)", + ); + assert!(score >= 0.99, "expected >= 0.99, got {}", score); + + let partial = similarity_score("Paper Mario TTYD", "Super Mario Sunshine"); + assert!(partial < 0.55, "expected < 0.55, got {}", partial); + } + + #[test] + fn test_folder_per_game_nested_depth() { + let base = std::env::temp_dir().join(format!("romm_depth_test_{}", uuid::Uuid::new_v4())); + let nested = base.join("00050000").join("101c9400"); + fs::create_dir_all(&nested).unwrap(); + fs::write(nested.join("save.dat"), b"hello-wiiu").unwrap(); + + let rule = EmulatorRule { + id: "cemu".into(), + name: "Cemu".into(), + platform_slugs: vec!["wiiu".into()], + save_dir: base.to_string_lossy().to_string(), + state_dir: None, + rom_dir: None, + save_extensions: vec![], + state_extensions: vec![], + structure: SaveStructure::FolderPerGame, + folder_depth: 2, + enabled: true, + is_custom: false, + sync_states: false, + default_slot: "default".into(), + }; + + let found = discover_saves_for_emulators(&[rule], &[], &HashMap::new()); + let _ = fs::remove_dir_all(&base); + assert_eq!(found.len(), 1); + assert_eq!(found[0].file_name, "00050000_101c9400.zip"); + assert!(found[0].is_directory); + } +} + diff --git a/src-tauri/src/nextui_sd.rs b/src-tauri/src/nextui_sd.rs new file mode 100644 index 0000000..8984d34 --- /dev/null +++ b/src-tauri/src/nextui_sd.rs @@ -0,0 +1,881 @@ +use crate::config::{push_log, AppConfig, ManualLink}; +use crate::matcher::{match_name_to_roms, read_save_payload_and_hash}; +use crate::romm_api::{ClientSaveState, RommClient, SimpleRomSchema}; +use crate::sync_engine::{create_backup, write_downloaded_save, SyncConflictItem, SyncRunSummary}; +use chrono::{DateTime, Utc}; +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; +use std::fs; +use std::path::{Path, PathBuf}; +use walkdir::WalkDir; + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct DetectedNextUiVolume { + pub path: String, + pub label: String, + pub detected_platform: String, // "tg5050" | "tg5040" | "nextui" + pub device_label: String, + pub system_tags: Vec, + pub has_saves: bool, + pub has_roms: bool, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct NextUiSdSaveItem { + pub local_path: String, + pub file_name: String, + pub system_tag: String, + pub is_directory: bool, + pub is_state: bool, + pub size_bytes: u64, + pub updated_at: String, + pub slot: String, + pub matched_rom_id: Option, + pub matched_rom_name: Option, + pub matched_platform: Option, + pub match_confidence: f32, + pub match_source: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct NextUiCardInspection { + pub sd_root: String, + pub detected_platform: String, + pub device_name: String, + pub handheld_device_id: Option, + pub system_tags: Vec, + pub saves: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +struct HandheldDeviceMeta { + device_id: Option, + device_name: String, +} + +fn handheld_meta_path(sd_root: &Path) -> PathBuf { + sd_root.join(".userdata/shared/romm-companion/handheld_device.json") +} + +pub fn load_handheld_meta(sd_root: &Path, default_name: &str) -> (Option, String) { + let p = handheld_meta_path(sd_root); + if let Ok(raw) = fs::read_to_string(&p) { + if let Ok(meta) = serde_json::from_str::(&raw) { + return (meta.device_id, meta.device_name); + } + } + (None, default_name.to_string()) +} + +pub fn save_handheld_meta(sd_root: &Path, device_id: Option, device_name: &str) { + let p = handheld_meta_path(sd_root); + if let Some(parent) = p.parent() { + let _ = fs::create_dir_all(parent); + } + let meta = HandheldDeviceMeta { + device_id, + device_name: device_name.to_string(), + }; + if let Ok(json) = serde_json::to_string_pretty(&meta) { + let _ = fs::write(&p, json); + } +} + +pub fn tag_to_romm_slugs(tag: &str) -> Vec { + let list: &[&str] = match tag.trim().to_uppercase().as_str() { + "GB" => &["gb"], + "GBC" => &["gbc"], + "GBA" | "MGBA" | "GPSP" => &["gba"], + "FC" | "NES" => &["nes", "famicom"], + "SFC" | "SNES" | "SUPA" => &["snes", "sfam"], + "N64" => &["n64"], + "NDS" | "DS" => &["nds", "ds"], + "PS" | "PSX" | "PS1" => &["psx", "ps1", "ps"], + "PSP" => &["psp"], + "MD" | "GEN" => &["genesis", "md", "megadrive"], + "SMS" => &["sms"], + "GG" => &["gamegear", "gg"], + "SEGACD" | "MCD" | "SCD" => &["segacd"], + "32X" => &["sega32x", "32x"], + "DC" | "DREAMCAST" => &["dc", "dreamcast"], + "SATURN" | "SS" => &["saturn"], + "PCE" | "TG16" => &["tg16", "turbografx16", "pce"], + "PCECD" | "TGCD" => &["turbografx-cd", "pcecd"], + "NGP" | "NGPC" => &["ngp", "ngpc"], + "WS" | "WSC" => &["wonderswan", "wonderswan-color"], + "PKM" | "POKEMINI" => &["pokemon-mini", "pokemini"], + "VB" => &["virtualboy", "vb"], + "A2600" | "2600" | "ATARI" => &["atari2600"], + "A7800" | "7800" => &["atari7800"], + "LYNX" => &["lynx"], + "FBN" | "FBNEO" | "ARCADE" | "MAME" | "CPS1" | "CPS2" | "CPS3" => &["arcade", "fbneo"], + "NEOGEO" | "NEO" => &["neogeo", "arcade"], + "PICO" | "PICO8" => &["pico8"], + _ => return vec![tag.to_lowercase()], + }; + list.iter().map(|s| s.to_string()).collect() +} + +pub fn romm_slug_to_default_tag(slug: &str) -> String { + match slug.to_lowercase().as_str() { + "gb" => "GB", + "gbc" => "GBC", + "gba" => "GBA", + "nes" | "famicom" => "FC", + "snes" | "sfam" => "SFC", + "n64" => "N64", + "nds" | "ds" => "NDS", + "psx" | "ps1" | "ps" => "PS", + "psp" => "PSP", + "genesis" | "md" | "megadrive" => "MD", + "sms" => "SMS", + "gamegear" | "gg" => "GG", + "segacd" => "SEGACD", + "sega32x" | "32x" => "32X", + "dc" | "dreamcast" => "DC", + "saturn" => "SATURN", + "tg16" | "turbografx16" | "pce" => "PCE", + "ngp" | "ngpc" => "NGPC", + "wonderswan" | "wonderswan-color" => "WSC", + "virtualboy" | "vb" => "VB", + "lynx" => "LYNX", + "neogeo" => "NEOGEO", + "arcade" | "fbneo" => "FBN", + "pico8" => "PICO", + other => return other.to_uppercase(), + } + .to_string() +} + +fn extract_tag_from_rom_folder(name: &str) -> Option { + let open = name.rfind('(')?; + let close = name.rfind(')')?; + if close > open + 1 { + let tag = name[open + 1..close].trim(); + if !tag.is_empty() { + return Some(tag.to_string()); + } + } + None +} + +fn detect_platform_on_root(root: &Path) -> (String, String) { + if root.join("Tools/tg5050").exists() + || root.join("Emus/tg5050").exists() + || root.join(".userdata/tg5050").exists() + { + ( + "tg5050".to_string(), + "TrimUI Smart Pro S (NextUI USB)".to_string(), + ) + } else if root.join("Tools/tg5040").exists() + || root.join("Emus/tg5040").exists() + || root.join(".userdata/tg5040").exists() + { + ( + "tg5040".to_string(), + "TrimUI Brick / Smart Pro (NextUI USB)".to_string(), + ) + } else { + ("nextui".to_string(), "NextUI Handheld (USB)".to_string()) + } +} + +fn collect_system_tags(root: &Path) -> Vec { + let mut tags: Vec = Vec::new(); + if let Ok(entries) = fs::read_dir(root.join("Saves")) { + for e in entries.flatten() { + if e.path().is_dir() { + let n = e.file_name().to_string_lossy().to_string(); + if !n.starts_with('.') && !tags.iter().any(|t| t.eq_ignore_ascii_case(&n)) { + tags.push(n); + } + } + } + } + if let Ok(entries) = fs::read_dir(root.join("Roms")) { + for e in entries.flatten() { + if e.path().is_dir() { + let n = e.file_name().to_string_lossy().to_string(); + if let Some(tag) = extract_tag_from_rom_folder(&n) { + if !tags.iter().any(|t| t.eq_ignore_ascii_case(&tag)) { + tags.push(tag); + } + } + } + } + } + tags.sort(); + tags +} + +fn is_likely_nextui_root(root: &Path) -> bool { + let has_saves = root.join("Saves").is_dir(); + let has_roms = root.join("Roms").is_dir(); + if !has_saves && !has_roms { + return false; + } + let has_markers = root.join(".userdata").is_dir() + || root.join("Tools/tg5040").is_dir() + || root.join("Tools/tg5050").is_dir() + || root.join("Emus/tg5040").is_dir() + || root.join("Emus/tg5050").is_dir() + || root.join("Bios").is_dir(); + if has_markers { + return true; + } + // Check for NextUI-style `System (TAG)` folder inside Roms/ + if has_roms { + if let Ok(entries) = fs::read_dir(root.join("Roms")) { + for e in entries.flatten() { + if e.path().is_dir() + && extract_tag_from_rom_folder(&e.file_name().to_string_lossy()).is_some() + { + return true; + } + } + } + } + false +} + +/// Scans mounted removable volumes on macOS, Linux, and Windows for NextUI SD cards. +pub fn detect_nextui_volumes() -> Vec { + let mut candidates: Vec = Vec::new(); + + #[cfg(target_os = "macos")] + { + if let Ok(entries) = fs::read_dir("/Volumes") { + for e in entries.flatten() { + let p = e.path(); + if p.is_dir() { + candidates.push(p); + } + } + } + } + + #[cfg(target_os = "linux")] + { + let user = std::env::var("USER").unwrap_or_default(); + for base in [ + PathBuf::from("/mnt"), + PathBuf::from(format!("/media/{}", user)), + PathBuf::from(format!("/run/media/{}", user)), + ] { + if let Ok(entries) = fs::read_dir(base) { + for e in entries.flatten() { + if e.path().is_dir() { + candidates.push(e.path()); + } + } + } + } + } + + #[cfg(target_os = "windows")] + { + for letter in b'D'..=b'Z' { + let p = PathBuf::from(format!("{}:\\", letter as char)); + if p.exists() { + candidates.push(p); + } + } + } + + let mut found = Vec::new(); + for root in candidates { + if !is_likely_nextui_root(&root) { + continue; + } + let (platform, device_label) = detect_platform_on_root(&root); + let label = root + .file_name() + .map(|n| n.to_string_lossy().to_string()) + .unwrap_or_else(|| root.to_string_lossy().to_string()); + found.push(DetectedNextUiVolume { + path: root.to_string_lossy().to_string(), + label, + detected_platform: platform, + device_label, + system_tags: collect_system_tags(&root), + has_saves: root.join("Saves").is_dir(), + has_roms: root.join("Roms").is_dir(), + }); + } + found +} + +/// Classifies a file inside `/Saves//` as Save vs Save State and returns `(is_state, clean_stem)`. +pub fn classify_nextui_save_file(path: &Path) -> Option<(bool, String)> { + let file_name = path.file_name()?.to_str()?; + if file_name.starts_with('.') || file_name.ends_with(".romm_part") { + return None; + } + let lower = file_name.to_lowercase(); + if lower.ends_with(".png") + || lower.ends_with(".jpg") + || lower.ends_with(".txt") + || lower.ends_with(".json") + || lower.ends_with(".cfg") + || lower.ends_with(".auto") + { + return None; + } + + let (is_state, without_save_ext) = if let Some(idx) = lower.rfind(".state") { + (true, &file_name[..idx]) + } else if lower.ends_with(".ppst") { + (true, &file_name[..file_name.len() - 5]) + } else if let Some(dot) = lower.rfind('.') { + let ext = &lower[dot + 1..]; + if (ext.starts_with("st") || ext.starts_with("ss")) + && ext.len() <= 4 + && ext.len() > 2 + && ext[2..].chars().all(|c| c.is_ascii_digit()) + { + (true, &file_name[..dot]) + } else if matches!( + ext, + "sav" | "srm" | "mcr" | "mcd" | "dsv" | "eep" | "fla" | "mpk" | "vmu" | "bin" | "rtc" | "brm" + ) { + (false, &file_name[..dot]) + } else { + return None; + } + } else { + return None; + }; + + let rom_exts = [ + ".gba", ".gbc", ".gb", ".nes", ".sfc", ".smc", ".n64", ".z64", ".v64", ".nds", ".iso", + ".chd", ".pbp", ".cue", ".bin", ".cso", ".md", ".gen", ".sms", ".gg", ".pce", ".ngp", + ".ngc", ".ws", ".wsc", ".zip", ".7z", ".min", ".vb", ".lnx", ".a26", ".a78", + ]; + let mut stem = without_save_ext.to_string(); + let stem_lower = stem.to_lowercase(); + for rext in rom_exts { + if stem_lower.ends_with(rext) { + stem.truncate(stem.len() - rext.len()); + break; + } + } + Some((is_state, stem)) +} + +pub fn inspect_nextui_card( + sd_root: &Path, + roms: &[SimpleRomSchema], + manual_links: &HashMap, +) -> NextUiCardInspection { + let (platform, default_name) = detect_platform_on_root(sd_root); + let (handheld_device_id, device_name) = load_handheld_meta(sd_root, &default_name); + let system_tags = collect_system_tags(sd_root); + let saves = discover_saves_on_card(sd_root, roms, manual_links); + + NextUiCardInspection { + sd_root: sd_root.to_string_lossy().to_string(), + detected_platform: platform, + device_name, + handheld_device_id, + system_tags, + saves, + } +} + +pub fn discover_saves_on_card( + sd_root: &Path, + roms: &[SimpleRomSchema], + manual_links: &HashMap, +) -> Vec { + let saves_root = sd_root.join("Saves"); + if !saves_root.is_dir() { + return Vec::new(); + } + + let mut out = Vec::new(); + let Ok(tag_dirs) = fs::read_dir(&saves_root) else { + return out; + }; + + for tag_entry in tag_dirs.flatten() { + let tag_path = tag_entry.path(); + if !tag_path.is_dir() { + continue; + } + let tag = tag_entry.file_name().to_string_lossy().to_string(); + if tag.starts_with('.') { + continue; + } + let slugs = tag_to_romm_slugs(&tag); + + // Handle PSP folder saves under /Saves/PSP/PSP/SAVEDATA/ + if tag.eq_ignore_ascii_case("PSP") { + let psp_dir = tag_path.join("PSP/SAVEDATA"); + if psp_dir.is_dir() { + if let Ok(entries) = fs::read_dir(&psp_dir) { + for e in entries.flatten() { + let p = e.path(); + if !p.is_dir() { + continue; + } + let name = e.file_name().to_string_lossy().to_string(); + if name.starts_with('.') { + continue; + } + let (size, updated) = dir_size_and_mtime(&p); + if size == 0 { + continue; + } + out.push(build_sd_item( + &p, + format!("{}.zip", name), + &name, + &tag, + &slugs, + true, + false, + size, + updated, + roms, + manual_links, + )); + } + } + } + } + + for entry in WalkDir::new(&tag_path).max_depth(2).into_iter().flatten() { + let p = entry.path(); + if !p.is_file() { + continue; + } + let Some((is_state, stem)) = classify_nextui_save_file(p) else { + continue; + }; + let file_name = p + .file_name() + .map(|n| n.to_string_lossy().to_string()) + .unwrap_or_default(); + let (size, updated) = file_size_and_mtime(p); + out.push(build_sd_item( + p, + file_name, + &stem, + &tag, + &slugs, + false, + is_state, + size, + updated, + roms, + manual_links, + )); + } + } + + out +} + +#[allow(clippy::too_many_arguments)] +fn build_sd_item( + path: &Path, + file_name: String, + stem: &str, + tag: &str, + slugs: &[String], + is_directory: bool, + is_state: bool, + size_bytes: u64, + updated_at: String, + roms: &[SimpleRomSchema], + manual_links: &HashMap, +) -> NextUiSdSaveItem { + let local_path = path.to_string_lossy().to_string(); + + if let Some(link) = manual_links.get(&local_path) { + let plat = roms + .iter() + .find(|r| r.id == link.rom_id) + .map(|r| r.platform_display_name.clone()); + return NextUiSdSaveItem { + local_path, + file_name, + system_tag: tag.to_string(), + is_directory, + is_state, + size_bytes, + updated_at, + slot: link.slot.clone(), + matched_rom_id: Some(link.rom_id), + matched_rom_name: Some(link.rom_name.clone()), + matched_platform: plat, + match_confidence: 1.0, + match_source: "manual".to_string(), + }; + } + + if let Some((rom, conf, src)) = match_name_to_roms(stem, slugs, roms) { + NextUiSdSaveItem { + local_path, + file_name, + system_tag: tag.to_string(), + is_directory, + is_state, + size_bytes, + updated_at, + slot: "default".to_string(), + matched_rom_id: Some(rom.id), + matched_rom_name: Some(rom.name.clone().unwrap_or_else(|| rom.fs_name_no_ext.clone())), + matched_platform: Some(rom.platform_display_name.clone()), + match_confidence: conf, + match_source: src.to_string(), + } + } else { + NextUiSdSaveItem { + local_path, + file_name, + system_tag: tag.to_string(), + is_directory, + is_state, + size_bytes, + updated_at, + slot: "default".to_string(), + matched_rom_id: None, + matched_rom_name: None, + matched_platform: None, + match_confidence: 0.0, + match_source: "unmatched".to_string(), + } + } +} + +/// Resolves the target `/Roms/ ()/` directory on the NextUI SD card for a RomM platform. +pub fn resolve_nextui_rom_folder( + sd_root: &Path, + platform_slug: &str, + platform_display_name: &str, +) -> PathBuf { + let roms_root = sd_root.join("Roms"); + if let Ok(entries) = fs::read_dir(&roms_root) { + for e in entries.flatten() { + let p = e.path(); + if !p.is_dir() { + continue; + } + let name = e.file_name().to_string_lossy().to_string(); + if let Some(tag) = extract_tag_from_rom_folder(&name) { + let slugs = tag_to_romm_slugs(&tag); + if slugs.iter().any(|s| s.eq_ignore_ascii_case(platform_slug)) { + return p; + } + } + } + } + let tag = romm_slug_to_default_tag(platform_slug); + let safe_name = platform_display_name.replace(['/', '\\', ':', '*', '?', '"', '<', '>', '|'], ""); + roms_root.join(format!("{} ({})", safe_name.trim(), tag)) +} + +/// Runs a full two-way RomM 5.1.0 save + state sync for a mounted NextUI SD card. +pub async fn sync_nextui_card( + client: &RommClient, + cfg: &mut AppConfig, + roms: &[SimpleRomSchema], + sd_root: &Path, + sync_states: bool, +) -> Result { + let (_, default_name) = detect_platform_on_root(sd_root); + let (mut handheld_device_id, device_name) = load_handheld_meta(sd_root, &default_name); + + // Register a dedicated RomM device for this handheld SD card if not registered yet + if handheld_device_id.is_none() { + if let Ok(dev) = client.register_device(&device_name).await { + handheld_device_id = Some(dev.id.clone()); + save_handheld_meta(sd_root, Some(dev.id), &device_name); + } + } + + let effective_device_id = handheld_device_id.or_else(|| cfg.connection.device_id.clone()); + let discovered = discover_saves_on_card(sd_root, roms, &cfg.manual_links); + let rom_by_id: HashMap = roms.iter().map(|r| (r.id, r)).collect(); + + let mut summary = SyncRunSummary { + session_id: None, + uploaded_saves: 0, + downloaded_saves: 0, + uploaded_states: 0, + up_to_date: 0, + conflicts: Vec::new(), + errors: Vec::new(), + }; + + let matched_saves: Vec<&NextUiSdSaveItem> = discovered + .iter() + .filter(|d| !d.is_state && d.matched_rom_id.is_some()) + .collect(); + let matched_states: Vec<&NextUiSdSaveItem> = discovered + .iter() + .filter(|d| d.is_state && d.matched_rom_id.is_some()) + .collect(); + + let mut local_map: HashMap<(i64, String), (&NextUiSdSaveItem, Vec)> = HashMap::new(); + let mut client_states: Vec = Vec::new(); + + for item in matched_saves { + let Some(rom_id) = item.matched_rom_id else { + continue; + }; + match read_save_payload_and_hash(Path::new(&item.local_path), item.is_directory) { + Ok((bytes, hash)) => { + let slot = if item.slot.trim().is_empty() { + "default".to_string() + } else { + item.slot.clone() + }; + client_states.push(ClientSaveState { + rom_id, + file_name: item.file_name.clone(), + slot: Some(slot.clone()), + emulator: Some(format!("nextui-{}", item.system_tag.to_lowercase())), + content_hash: Some(hash), + updated_at: item.updated_at.clone(), + file_size_bytes: bytes.len() as i64, + }); + local_map.insert((rom_id, slot), (item, bytes)); + } + Err(e) => summary.errors.push(format!("{}: {}", item.file_name, e)), + } + } + + if !client_states.is_empty() || effective_device_id.is_some() { + let neg = client + .negotiate_sync(effective_device_id.clone(), client_states) + .await?; + summary.session_id = Some(neg.session_id); + let mut completed = 0i64; + let mut failed = 0i64; + + for op in neg.operations { + let slot_key = op.slot.clone().unwrap_or_else(|| "default".to_string()); + match op.action.as_str() { + "no_op" => summary.up_to_date += 1, + "upload" => { + if let Some((item, bytes)) = local_map.get(&(op.rom_id, slot_key.clone())) { + let emu_id = format!("nextui-{}", item.system_tag.to_lowercase()); + match client + .upload_save( + op.rom_id, + Some(&emu_id), + Some(&slot_key), + effective_device_id.as_deref(), + Some(neg.session_id), + true, + &item.file_name, + bytes.clone(), + ) + .await + { + Ok(_) => { + summary.uploaded_saves += 1; + completed += 1; + push_log( + cfg, + "success", + "nextui_upload", + format!("[NextUI USB] Uploaded {} ({})", item.file_name, item.system_tag), + Some(op.rom_id), + Some(item.local_path.clone()), + ); + } + Err(e) => { + failed += 1; + summary.errors.push(format!("Upload {}: {}", item.file_name, e)); + } + } + } + } + "download" => { + let Some(save_id) = op.save_id else { + continue; + }; + let target = local_map + .get(&(op.rom_id, slot_key.clone())) + .map(|(item, _)| (PathBuf::from(&item.local_path), item.is_directory)) + .or_else(|| { + rom_by_id.get(&op.rom_id).map(|rom| { + let tag = romm_slug_to_default_tag(&rom.platform_slug); + let is_dir = tag == "PSP" && op.file_name.ends_with(".zip"); + let name = if is_dir { + op.file_name + .strip_suffix(".zip") + .unwrap_or(&op.file_name) + .to_string() + } else { + op.file_name.clone() + }; + (sd_root.join("Saves").join(tag).join(name), is_dir) + }) + }); + + if let Some((dest_path, is_dir)) = target { + match client + .download_save_bytes( + save_id, + effective_device_id.as_deref(), + Some(neg.session_id), + ) + .await + { + Ok(bytes) => { + let _ = create_backup( + &dest_path, + op.rom_id, + is_dir, + cfg.settings.max_backups_per_save, + ); + match write_downloaded_save(&dest_path, &bytes, is_dir) { + Ok(()) => { + if let Some(ref did) = effective_device_id { + let _ = client + .confirm_save_downloaded(save_id, did) + .await; + } + summary.downloaded_saves += 1; + completed += 1; + push_log( + cfg, + "success", + "nextui_download", + format!("[NextUI USB] Downloaded {} to SD card (backup saved)", op.file_name), + Some(op.rom_id), + Some(dest_path.to_string_lossy().to_string()), + ); + } + Err(e) => { + failed += 1; + summary.errors.push(format!("Write {}: {}", op.file_name, e)); + } + } + } + Err(e) => { + failed += 1; + summary.errors.push(format!("Download {}: {}", op.file_name, e)); + } + } + } + } + "conflict" => { + if let Some((item, _)) = local_map.get(&(op.rom_id, slot_key.clone())) { + summary.conflicts.push(SyncConflictItem { + id: format!("nextui:{}:{}:{}", op.rom_id, slot_key, op.save_id.unwrap_or(0)), + rom_id: op.rom_id, + rom_name: item + .matched_rom_name + .clone() + .unwrap_or_else(|| format!("ROM #{}", op.rom_id)), + save_id: op.save_id, + local_path: item.local_path.clone(), + file_name: item.file_name.clone(), + is_directory: item.is_directory, + emulator_id: format!("nextui-{}", item.system_tag.to_lowercase()), + slot: slot_key, + local_updated_at: item.updated_at.clone(), + server_updated_at: op.server_updated_at.clone(), + reason: format!("[NextUI SD] {}", op.reason), + }); + } + } + _ => {} + } + } + + let _ = client + .complete_sync_session(neg.session_id, completed, failed) + .await; + } + + if sync_states { + for item in matched_states { + let Some(rom_id) = item.matched_rom_id else { + continue; + }; + match read_save_payload_and_hash(Path::new(&item.local_path), false) { + Ok((bytes, hash)) => { + if cfg.synced_state_hashes.get(&item.local_path) == Some(&hash) { + summary.up_to_date += 1; + continue; + } + let existing = client + .get_states(Some(rom_id), None) + .await + .unwrap_or_default() + .into_iter() + .find(|s| s.file_name.eq_ignore_ascii_case(&item.file_name)); + let emu_id = format!("nextui-{}", item.system_tag.to_lowercase()); + let res = if let Some(remote) = existing { + client.update_state(remote.id, &item.file_name, bytes).await + } else { + client + .upload_state(rom_id, Some(&emu_id), &item.file_name, bytes) + .await + }; + match res { + Ok(_) => { + cfg.synced_state_hashes.insert(item.local_path.clone(), hash); + summary.uploaded_states += 1; + push_log( + cfg, + "success", + "nextui_state", + format!("[NextUI USB] Synced state {} ({})", item.file_name, item.system_tag), + Some(rom_id), + Some(item.local_path.clone()), + ); + } + Err(e) => summary.errors.push(format!("State {}: {}", item.file_name, e)), + } + } + Err(e) => summary.errors.push(format!("State {}: {}", item.file_name, e)), + } + } + } + + Ok(summary) +} + +fn file_size_and_mtime(path: &Path) -> (u64, String) { + match fs::metadata(path) { + Ok(m) => { + let dt: DateTime = m + .modified() + .map(DateTime::::from) + .unwrap_or_else(|_| Utc::now()); + (m.len(), dt.to_rfc3339()) + } + Err(_) => (0, Utc::now().to_rfc3339()), + } +} + +fn dir_size_and_mtime(dir: &Path) -> (u64, String) { + let mut total = 0u64; + let mut latest: Option = None; + for entry in WalkDir::new(dir).into_iter().flatten() { + if entry.path().is_file() { + if let Ok(m) = entry.metadata() { + total += m.len(); + if let Ok(mt) = m.modified() { + if latest.map_or(true, |l| mt > l) { + latest = Some(mt); + } + } + } + } + } + let dt: DateTime = latest.map(DateTime::::from).unwrap_or_else(Utc::now); + (total, dt.to_rfc3339()) +} diff --git a/src-tauri/src/romm_api.rs b/src-tauri/src/romm_api.rs new file mode 100644 index 0000000..a3e46b6 --- /dev/null +++ b/src-tauri/src/romm_api.rs @@ -0,0 +1,835 @@ +use futures_util::StreamExt; +use reqwest::multipart::{Form, Part}; +use reqwest::{Client, Method, RequestBuilder}; +use serde::{Deserialize, Serialize}; +use std::path::Path; +use tokio::io::AsyncWriteExt; + +#[derive(Debug, Clone)] +pub struct RommClient { + http: Client, + base_url: String, + token: Option, +} + +// ---------- Auth Schemas (RomM 5.1.0) ---------- + +#[derive(Debug, Serialize)] +pub struct DeviceAuthInitPayload { + pub client_device_identifier: String, + pub name: String, + pub client: String, + pub platform: Option, + pub client_version: Option, + pub requested_scopes: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct DeviceAuthInitResponse { + pub device_code: String, + pub user_code: String, + pub verification_path: String, + pub verification_path_complete: String, + pub expires_in: i64, + pub interval: i64, +} + +#[derive(Debug, Serialize)] +pub struct DeviceAuthTokenPayload { + pub device_code: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct DeviceAuthTokenResponse { + pub access_token: String, + pub device_id: String, + pub scopes: Vec, + pub expires_at: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct TokenResponse { + pub access_token: String, + pub token_type: String, + pub expires: Option, + pub refresh_token: Option, + pub refresh_expires: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ClientTokenCreateSchema { + pub id: i64, + pub name: String, + pub scopes: Vec, + pub expires_at: Option, + pub device_id: Option, + pub raw_token: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct UserSchema { + pub id: i64, + pub username: String, + pub email: Option, + pub role: Option, + pub current_device_id: Option, +} + +// ---------- Device Schemas ---------- + +#[derive(Debug, Serialize)] +pub struct DeviceCreatePayload { + pub name: Option, + pub platform: Option, + pub client: Option, + pub client_version: Option, + pub hostname: Option, + pub sync_mode: Option, + pub allow_existing: bool, + pub allow_duplicate: bool, + pub reset_syncs: bool, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct DeviceSchema { + pub id: String, + pub user_id: i64, + pub name: Option, + pub platform: Option, + pub client: Option, + pub client_version: Option, + pub hostname: Option, + pub sync_enabled: Option, + pub sync_mode: Option, +} + +// ---------- Platform & ROM Schemas ---------- + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct PlatformSchema { + pub id: i64, + pub slug: String, + pub fs_slug: String, + pub name: String, + pub display_name: String, + pub rom_count: i64, + pub url_logo: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct RomFileSchema { + pub id: i64, + pub rom_id: i64, + pub file_name: String, + pub file_path: String, + pub file_size_bytes: i64, + pub full_path: String, + pub crc_hash: Option, + pub md5_hash: Option, + pub sha1_hash: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct SimpleRomSchema { + pub id: i64, + pub platform_id: i64, + pub platform_slug: String, + pub platform_fs_slug: String, + pub platform_display_name: String, + pub fs_name: String, + pub fs_name_no_tags: String, + pub fs_name_no_ext: String, + pub fs_extension: String, + pub fs_size_bytes: i64, + pub name: Option, + pub slug: Option, + pub path_cover_small: Option, + pub url_cover: Option, + pub crc_hash: Option, + pub md5_hash: Option, + pub sha1_hash: Option, + pub ra_hash: Option, + #[serde(default)] + pub regions: Vec, + #[serde(default)] + pub files: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct RomPageResponse { + pub items: Vec, + pub total: i64, + pub limit: i64, + pub offset: i64, +} + +// ---------- Save, State & Sync Negotiation Schemas (RomM 5.1.0) ---------- + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct SaveSchema { + pub id: i64, + pub rom_id: i64, + pub user_id: i64, + pub file_name: String, + pub file_name_no_tags: String, + pub file_name_no_ext: String, + pub file_extension: String, + pub file_size_bytes: i64, + pub download_path: String, + pub created_at: String, + pub updated_at: String, + pub emulator: Option, + pub slot: Option, + pub content_hash: Option, + pub origin_device_id: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct StateSchema { + pub id: i64, + pub rom_id: i64, + pub user_id: i64, + pub file_name: String, + pub file_name_no_tags: String, + pub file_name_no_ext: String, + pub file_extension: String, + pub file_size_bytes: i64, + pub download_path: String, + pub created_at: String, + pub updated_at: String, + pub emulator: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ClientSaveState { + pub rom_id: i64, + pub file_name: String, + pub slot: Option, + pub emulator: Option, + pub content_hash: Option, + pub updated_at: String, + pub file_size_bytes: i64, +} + +#[derive(Debug, Serialize)] +pub struct SyncNegotiatePayload { + pub device_id: Option, + pub saves: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct SyncOperationSchema { + pub action: String, // "upload" | "download" | "conflict" | "no_op" + pub rom_id: i64, + pub save_id: Option, + pub file_name: String, + pub slot: Option, + pub emulator: Option, + pub reason: String, + pub server_updated_at: Option, + pub server_content_hash: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct SyncNegotiateResponse { + pub session_id: i64, + pub operations: Vec, + pub total_upload: i64, + pub total_download: i64, + pub total_conflict: i64, + pub total_no_op: i64, +} + +#[derive(Debug, Serialize)] +pub struct SyncCompletePayload { + pub operations_completed: i64, + pub operations_failed: i64, +} + +#[derive(Debug, Serialize)] +struct ConfirmDownloadPayload { + device_id: String, +} + +#[derive(Debug, Serialize)] +struct PairExchangePayload { + code: String, +} + +impl RommClient { + pub fn new(base_url: &str, token: Option) -> Result { + let normalized = base_url.trim().trim_end_matches('/').to_string(); + if normalized.is_empty() { + return Err("RomM server URL is required".into()); + } + let http = Client::builder() + .user_agent("RomM-Companion/0.1.0") + .build() + .map_err(|e| format!("Failed to create HTTP client: {e}"))?; + Ok(Self { + http, + base_url: normalized, + token, + }) + } + + pub fn base_url(&self) -> &str { + &self.base_url + } + + fn request(&self, method: Method, path: &str) -> RequestBuilder { + let url = format!("{}{}", self.base_url, path); + let mut req = self.http.request(method, url); + if let Some(ref token) = self.token { + req = req.bearer_auth(token); + } + req + } + + async fn parse_json Deserialize<'de>>( + resp: reqwest::Response, + ) -> Result { + let status = resp.status(); + let text = resp + .text() + .await + .map_err(|e| format!("Failed to read response body: {e}"))?; + if !status.is_success() { + return Err(format!("HTTP {}: {}", status.as_u16(), text)); + } + serde_json::from_str(&text) + .map_err(|e| format!("Failed to parse JSON ({}): {}", e, &text[..text.len().min(300)])) + } + + // ---------- Auth ---------- + + pub async fn heartbeat(&self) -> Result { + let resp = self + .request(Method::GET, "/api/heartbeat") + .send() + .await + .map_err(|e| format!("Could not reach RomM server: {e}"))?; + Self::parse_json(resp).await + } + + pub async fn get_me(&self) -> Result { + let resp = self + .request(Method::GET, "/api/users/me") + .send() + .await + .map_err(|e| format!("Request failed: {e}"))?; + Self::parse_json(resp).await + } + + pub async fn device_auth_init( + &self, + client_device_identifier: &str, + device_name: &str, + ) -> Result { + let payload = DeviceAuthInitPayload { + client_device_identifier: client_device_identifier.to_string(), + name: device_name.to_string(), + client: "romm-companion".to_string(), + platform: Some(std::env::consts::OS.to_string()), + client_version: Some("0.1.0".to_string()), + requested_scopes: vec![ + "me.read".into(), + "roms.read".into(), + "platforms.read".into(), + "assets.read".into(), + "assets.write".into(), + "devices.read".into(), + "devices.write".into(), + "roms.user.read".into(), + "roms.user.write".into(), + ], + }; + let resp = self + .request(Method::POST, "/api/auth/device/init") + .json(&payload) + .send() + .await + .map_err(|e| format!("Device auth init failed: {e}"))?; + Self::parse_json(resp).await + } + + pub async fn device_auth_poll( + &self, + device_code: &str, + ) -> Result, String> { + let resp = self + .request(Method::POST, "/api/auth/device/token") + .json(&DeviceAuthTokenPayload { + device_code: device_code.to_string(), + }) + .send() + .await + .map_err(|e| format!("Device auth poll failed: {e}"))?; + let status = resp.status(); + let text = resp.text().await.map_err(|e| e.to_string())?; + if status.is_success() { + let parsed: DeviceAuthTokenResponse = + serde_json::from_str(&text).map_err(|e| format!("Parse error: {e}"))?; + return Ok(Some(parsed)); + } + // Pending approval typically returns 400/428/403 with authorization_pending + if status.as_u16() == 400 || status.as_u16() == 428 || status.as_u16() == 202 { + if text.contains("pending") || text.contains("slow_down") { + return Ok(None); + } + } + Err(format!("HTTP {}: {}", status.as_u16(), text)) + } + + pub async fn exchange_pair_code(&self, code: &str) -> Result { + let resp = self + .request(Method::POST, "/api/client-tokens/exchange") + .json(&PairExchangePayload { + code: code.trim().to_string(), + }) + .send() + .await + .map_err(|e| format!("Pair code exchange failed: {e}"))?; + Self::parse_json(resp).await + } + + pub async fn login_password( + &self, + username: &str, + password: &str, + ) -> Result { + let scopes = "me.read roms.read platforms.read assets.read assets.write devices.read devices.write roms.user.read roms.user.write"; + let resp = self + .request(Method::POST, "/api/token") + .form(&[ + ("grant_type", "password"), + ("username", username), + ("password", password), + ("scope", scopes), + ]) + .send() + .await + .map_err(|e| format!("Login request failed: {e}"))?; + Self::parse_json(resp).await + } + + // ---------- Devices ---------- + + pub async fn register_device(&self, name: &str) -> Result { + let host = hostname::get() + .ok() + .and_then(|h| h.into_string().ok()); + let payload = DeviceCreatePayload { + name: Some(name.to_string()), + platform: Some(std::env::consts::OS.to_string()), + client: Some("romm-companion".to_string()), + client_version: Some("0.1.0".to_string()), + hostname: host, + sync_mode: Some("api".to_string()), + allow_existing: true, + allow_duplicate: false, + reset_syncs: false, + }; + let resp = self + .request(Method::POST, "/api/devices") + .json(&payload) + .send() + .await + .map_err(|e| format!("Register device failed: {e}"))?; + Self::parse_json(resp).await + } + + // ---------- Platforms & ROMs ---------- + + pub async fn get_platforms(&self) -> Result, String> { + let resp = self + .request(Method::GET, "/api/platforms") + .send() + .await + .map_err(|e| format!("Get platforms failed: {e}"))?; + Self::parse_json(resp).await + } + + pub async fn get_roms( + &self, + platform_id: Option, + search_term: Option<&str>, + limit: i64, + offset: i64, + ) -> Result { + let mut req = self.request(Method::GET, "/api/roms").query(&[ + ("limit", limit.to_string()), + ("offset", offset.to_string()), + ("with_files", "true".to_string()), + ]); + if let Some(pid) = platform_id { + req = req.query(&[("platform_ids", pid.to_string())]); + } + if let Some(term) = search_term { + if !term.trim().is_empty() { + req = req.query(&[("search_term", term.trim().to_string())]); + } + } + let resp = req + .send() + .await + .map_err(|e| format!("Get ROMs failed: {e}"))?; + Self::parse_json(resp).await + } + + pub async fn get_all_roms_for_platforms( + &self, + platform_ids: &[i64], + ) -> Result, String> { + let mut all = Vec::new(); + if platform_ids.is_empty() { + let mut offset = 0; + loop { + let page = self.get_roms(None, None, 200, offset).await?; + let count = page.items.len() as i64; + all.extend(page.items); + offset += count; + if count == 0 || offset >= page.total { + break; + } + } + } else { + for &pid in platform_ids { + let mut offset = 0; + loop { + let page = self.get_roms(Some(pid), None, 200, offset).await?; + let count = page.items.len() as i64; + all.extend(page.items); + offset += count; + if count == 0 || offset >= page.total { + break; + } + } + } + } + Ok(all) + } + + pub async fn get_rom_by_hash( + &self, + crc_hash: Option<&str>, + md5_hash: Option<&str>, + sha1_hash: Option<&str>, + ) -> Result, String> { + let mut req = self.request(Method::GET, "/api/roms/by-hash"); + if let Some(h) = crc_hash { + req = req.query(&[("crc_hash", h)]); + } + if let Some(h) = md5_hash { + req = req.query(&[("md5_hash", h)]); + } + if let Some(h) = sha1_hash { + req = req.query(&[("sha1_hash", h)]); + } + let resp = req + .send() + .await + .map_err(|e| format!("Hash lookup failed: {e}"))?; + if resp.status().as_u16() == 404 { + return Ok(None); + } + let rom: SimpleRomSchema = Self::parse_json(resp).await?; + Ok(Some(rom)) + } + + pub async fn download_rom( + &self, + rom_id: i64, + file_name: &str, + dest_path: &Path, + mut on_progress: impl FnMut(u64, Option), + ) -> Result<(), String> { + let encoded = urlencoding_path_segment(file_name); + let path = format!("/api/roms/{}/content/{}", rom_id, encoded); + let resp = self + .request(Method::GET, &path) + .send() + .await + .map_err(|e| format!("ROM download request failed: {e}"))?; + if !resp.status().is_success() { + return Err(format!("ROM download failed with HTTP {}", resp.status())); + } + let total = resp.content_length(); + if let Some(parent) = dest_path.parent() { + tokio::fs::create_dir_all(parent) + .await + .map_err(|e| format!("Failed to create destination folder: {e}"))?; + } + let tmp_path = dest_path.with_extension("romm_part"); + let mut file = tokio::fs::File::create(&tmp_path) + .await + .map_err(|e| format!("Failed to create file: {e}"))?; + let mut stream = resp.bytes_stream(); + let mut downloaded: u64 = 0; + while let Some(chunk) = stream.next().await { + let bytes = chunk.map_err(|e| format!("Download stream error: {e}"))?; + file.write_all(&bytes) + .await + .map_err(|e| format!("Disk write error: {e}"))?; + downloaded += bytes.len() as u64; + on_progress(downloaded, total); + } + file.flush().await.map_err(|e| e.to_string())?; + drop(file); + tokio::fs::rename(&tmp_path, dest_path) + .await + .map_err(|e| format!("Failed to finalize downloaded ROM: {e}"))?; + Ok(()) + } + + // ---------- Saves & Sync Negotiation ---------- + + pub async fn get_saves( + &self, + rom_id: Option, + platform_id: Option, + device_id: Option<&str>, + ) -> Result, String> { + let mut req = self.request(Method::GET, "/api/saves"); + if let Some(id) = rom_id { + req = req.query(&[("rom_id", id.to_string())]); + } + if let Some(pid) = platform_id { + req = req.query(&[("platform_id", pid.to_string())]); + } + if let Some(did) = device_id { + req = req.query(&[("device_id", did.to_string())]); + } + let resp = req + .send() + .await + .map_err(|e| format!("Get saves failed: {e}"))?; + Self::parse_json(resp).await + } + + pub async fn negotiate_sync( + &self, + device_id: Option, + saves: Vec, + ) -> Result { + let resp = self + .request(Method::POST, "/api/sync/negotiate") + .json(&SyncNegotiatePayload { device_id, saves }) + .send() + .await + .map_err(|e| format!("Sync negotiate failed: {e}"))?; + Self::parse_json(resp).await + } + + pub async fn upload_save( + &self, + rom_id: i64, + emulator: Option<&str>, + slot: Option<&str>, + device_id: Option<&str>, + session_id: Option, + overwrite: bool, + file_name: &str, + bytes: Vec, + ) -> Result { + let mut req = self.request(Method::POST, "/api/saves").query(&[ + ("rom_id", rom_id.to_string()), + ("overwrite", overwrite.to_string()), + ]); + if let Some(e) = emulator { + req = req.query(&[("emulator", e)]); + } + if let Some(s) = slot { + req = req.query(&[("slot", s)]); + } + if let Some(d) = device_id { + req = req.query(&[("device_id", d)]); + } + if let Some(sid) = session_id { + req = req.query(&[("session_id", sid.to_string())]); + } + + let part = Part::bytes(bytes) + .file_name(file_name.to_string()) + .mime_str("application/octet-stream") + .map_err(|e| e.to_string())?; + let form = Form::new().part("saveFile", part); + + let resp = req + .multipart(form) + .send() + .await + .map_err(|e| format!("Upload save failed: {e}"))?; + Self::parse_json(resp).await + } + + pub async fn download_save_bytes( + &self, + save_id: i64, + device_id: Option<&str>, + session_id: Option, + ) -> Result, String> { + let mut req = self.request(Method::GET, &format!("/api/saves/{}/content", save_id)); + if let Some(d) = device_id { + req = req.query(&[("device_id", d)]); + } + if let Some(sid) = session_id { + req = req.query(&[("session_id", sid.to_string())]); + } + let resp = req + .send() + .await + .map_err(|e| format!("Download save failed: {e}"))?; + if !resp.status().is_success() { + return Err(format!("Download save failed: HTTP {}", resp.status())); + } + resp.bytes() + .await + .map(|b| b.to_vec()) + .map_err(|e| format!("Failed reading save bytes: {e}")) + } + + pub async fn confirm_save_downloaded( + &self, + save_id: i64, + device_id: &str, + ) -> Result<(), String> { + let resp = self + .request(Method::POST, &format!("/api/saves/{}/downloaded", save_id)) + .json(&ConfirmDownloadPayload { + device_id: device_id.to_string(), + }) + .send() + .await + .map_err(|e| format!("Confirm download failed: {e}"))?; + if !resp.status().is_success() { + let status = resp.status(); + let txt = resp.text().await.unwrap_or_default(); + return Err(format!("Confirm download HTTP {}: {}", status, txt)); + } + Ok(()) + } + + pub async fn complete_sync_session( + &self, + session_id: i64, + completed: i64, + failed: i64, + ) -> Result<(), String> { + let resp = self + .request( + Method::POST, + &format!("/api/sync/sessions/{}/complete", session_id), + ) + .json(&SyncCompletePayload { + operations_completed: completed, + operations_failed: failed, + }) + .send() + .await + .map_err(|e| format!("Complete sync session failed: {e}"))?; + if !resp.status().is_success() { + let status = resp.status(); + let txt = resp.text().await.unwrap_or_default(); + return Err(format!("Complete sync session HTTP {}: {}", status, txt)); + } + Ok(()) + } + + // ---------- Save States ---------- + + pub async fn get_states( + &self, + rom_id: Option, + platform_id: Option, + ) -> Result, String> { + let mut req = self.request(Method::GET, "/api/states"); + if let Some(id) = rom_id { + req = req.query(&[("rom_id", id.to_string())]); + } + if let Some(pid) = platform_id { + req = req.query(&[("platform_id", pid.to_string())]); + } + let resp = req + .send() + .await + .map_err(|e| format!("Get states failed: {e}"))?; + Self::parse_json(resp).await + } + + pub async fn upload_state( + &self, + rom_id: i64, + emulator: Option<&str>, + file_name: &str, + bytes: Vec, + ) -> Result { + let mut req = self + .request(Method::POST, "/api/states") + .query(&[("rom_id", rom_id.to_string())]); + if let Some(e) = emulator { + req = req.query(&[("emulator", e)]); + } + let part = Part::bytes(bytes) + .file_name(file_name.to_string()) + .mime_str("application/octet-stream") + .map_err(|e| e.to_string())?; + let form = Form::new().part("stateFile", part); + let resp = req + .multipart(form) + .send() + .await + .map_err(|e| format!("Upload state failed: {e}"))?; + Self::parse_json(resp).await + } + + pub async fn update_state( + &self, + state_id: i64, + file_name: &str, + bytes: Vec, + ) -> Result { + let part = Part::bytes(bytes) + .file_name(file_name.to_string()) + .mime_str("application/octet-stream") + .map_err(|e| e.to_string())?; + let form = Form::new().part("stateFile", part); + let resp = self + .request(Method::PUT, &format!("/api/states/{}", state_id)) + .multipart(form) + .send() + .await + .map_err(|e| format!("Update state failed: {e}"))?; + Self::parse_json(resp).await + } + + pub async fn download_state_bytes(&self, state_id: i64) -> Result, String> { + let resp = self + .request(Method::GET, &format!("/api/states/{}/content", state_id)) + .send() + .await + .map_err(|e| format!("Download state failed: {e}"))?; + if !resp.status().is_success() { + return Err(format!("Download state failed: HTTP {}", resp.status())); + } + resp.bytes() + .await + .map(|b| b.to_vec()) + .map_err(|e| format!("Failed reading state bytes: {e}")) + } +} + +fn urlencoding_path_segment(s: &str) -> String { + let mut out = String::with_capacity(s.len()); + for b in s.bytes() { + match b { + b'A'..=b'Z' | b'a'..=b'z' | b'0'..=b'9' | b'-' | b'_' | b'.' | b'~' => { + out.push(b as char); + } + _ => { + out.push_str(&format!("%{:02X}", b)); + } + } + } + out +} diff --git a/src-tauri/src/sync_engine.rs b/src-tauri/src/sync_engine.rs new file mode 100644 index 0000000..985d865 --- /dev/null +++ b/src-tauri/src/sync_engine.rs @@ -0,0 +1,503 @@ +use crate::config::{backups_dir, push_log, AppConfig}; +use crate::matcher::{discover_saves_for_emulators, read_save_payload_and_hash, DiscoveredSaveItem}; +use crate::romm_api::{ClientSaveState, RommClient, SimpleRomSchema}; +use chrono::Utc; +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; +use std::fs; +use std::io::Cursor; +use std::path::{Path, PathBuf}; +use zip::ZipArchive; + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SyncConflictItem { + pub id: String, + pub rom_id: i64, + pub rom_name: String, + pub save_id: Option, + pub local_path: String, + pub file_name: String, + pub is_directory: bool, + pub emulator_id: String, + pub slot: String, + pub local_updated_at: String, + pub server_updated_at: Option, + pub reason: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SyncRunSummary { + pub session_id: Option, + pub uploaded_saves: usize, + pub downloaded_saves: usize, + pub uploaded_states: usize, + pub up_to_date: usize, + pub conflicts: Vec, + pub errors: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct BackupEntry { + pub backup_path: String, + pub rom_id: String, + pub file_name: String, + pub created_at: String, + pub size_bytes: u64, +} + +pub fn create_backup( + local_path: &Path, + rom_id: i64, + is_directory: bool, + max_backups: usize, +) -> Result, String> { + if !local_path.exists() { + return Ok(None); + } + let rom_backup_dir = backups_dir().join(rom_id.to_string()); + fs::create_dir_all(&rom_backup_dir).map_err(|e| format!("Failed creating backup dir: {e}"))?; + + let stamp = Utc::now().format("%Y%m%dT%H%M%SZ").to_string(); + let base_name = local_path + .file_name() + .map(|n| n.to_string_lossy().to_string()) + .unwrap_or_else(|| "save".to_string()); + + let dest = if is_directory { + let (zip_bytes, _) = read_save_payload_and_hash(local_path, true)?; + let zip_path = rom_backup_dir.join(format!("{}_{}.zip", stamp, base_name)); + fs::write(&zip_path, zip_bytes).map_err(|e| format!("Backup write failed: {e}"))?; + zip_path + } else { + let copy_path = rom_backup_dir.join(format!("{}_{}", stamp, base_name)); + fs::copy(local_path, ©_path).map_err(|e| format!("Backup copy failed: {e}"))?; + copy_path + }; + + // Prune oldest backups beyond max_backups + if max_backups > 0 { + if let Ok(entries) = fs::read_dir(&rom_backup_dir) { + let mut files: Vec = entries + .flatten() + .map(|e| e.path()) + .filter(|p| p.is_file()) + .collect(); + files.sort(); + if files.len() > max_backups { + let to_remove = files.len() - max_backups; + for old in files.into_iter().take(to_remove) { + let _ = fs::remove_file(old); + } + } + } + } + + Ok(Some(dest)) +} + +pub fn write_downloaded_save( + dest_path: &Path, + bytes: &[u8], + is_directory: bool, +) -> Result<(), String> { + if is_directory { + fs::create_dir_all(dest_path).map_err(|e| format!("Failed creating save dir: {e}"))?; + let cursor = Cursor::new(bytes); + let mut archive = + ZipArchive::new(cursor).map_err(|e| format!("Downloaded archive is not a valid zip: {e}"))?; + for i in 0..archive.len() { + let mut file = archive.by_index(i).map_err(|e| e.to_string())?; + let Some(enclosed) = file.enclosed_name().map(|p| p.to_path_buf()) else { + continue; + }; + let out_path = dest_path.join(enclosed); + if file.is_dir() { + fs::create_dir_all(&out_path).map_err(|e| e.to_string())?; + } else { + if let Some(parent) = out_path.parent() { + fs::create_dir_all(parent).map_err(|e| e.to_string())?; + } + let mut out_file = fs::File::create(&out_path).map_err(|e| e.to_string())?; + std::io::copy(&mut file, &mut out_file).map_err(|e| e.to_string())?; + } + } + Ok(()) + } else { + if let Some(parent) = dest_path.parent() { + fs::create_dir_all(parent).map_err(|e| e.to_string())?; + } + fs::write(dest_path, bytes).map_err(|e| format!("Failed writing save file: {e}")) + } +} + +pub fn list_all_backups() -> Vec { + let root = backups_dir(); + let mut out = Vec::new(); + if let Ok(rom_dirs) = fs::read_dir(&root) { + for rom_dir in rom_dirs.flatten() { + if !rom_dir.path().is_dir() { + continue; + } + let rom_id = rom_dir.file_name().to_string_lossy().to_string(); + if let Ok(files) = fs::read_dir(rom_dir.path()) { + for f in files.flatten() { + let p = f.path(); + if !p.is_file() { + continue; + } + let meta = fs::metadata(&p).ok(); + let size = meta.as_ref().map(|m| m.len()).unwrap_or(0); + let created = meta + .and_then(|m| m.modified().ok()) + .map(|t| chrono::DateTime::::from(t).to_rfc3339()) + .unwrap_or_default(); + out.push(BackupEntry { + backup_path: p.to_string_lossy().to_string(), + rom_id: rom_id.clone(), + file_name: f.file_name().to_string_lossy().to_string(), + created_at: created, + size_bytes: size, + }); + } + } + } + } + out.sort_by(|a, b| b.created_at.cmp(&a.created_at)); + out +} + +pub fn restore_backup_to_path( + backup_path: &Path, + target_path: &Path, + is_directory: bool, +) -> Result<(), String> { + let bytes = fs::read(backup_path).map_err(|e| format!("Failed reading backup: {e}"))?; + write_downloaded_save(target_path, &bytes, is_directory) +} + +pub async fn run_sync( + client: &RommClient, + cfg: &mut AppConfig, + roms: &[SimpleRomSchema], +) -> Result { + let discovered = discover_saves_for_emulators(&cfg.emulators, roms, &cfg.manual_links); + let rom_by_id: HashMap = roms.iter().map(|r| (r.id, r)).collect(); + + let mut summary = SyncRunSummary { + session_id: None, + uploaded_saves: 0, + downloaded_saves: 0, + uploaded_states: 0, + up_to_date: 0, + conflicts: Vec::new(), + errors: Vec::new(), + }; + + // Split matched saves vs matched states + let matched_saves: Vec<&DiscoveredSaveItem> = discovered + .iter() + .filter(|d| !d.is_state && d.matched_rom_id.is_some()) + .collect(); + let matched_states: Vec<&DiscoveredSaveItem> = discovered + .iter() + .filter(|d| d.is_state && d.matched_rom_id.is_some()) + .collect(); + + // Map (rom_id, slot) -> (DiscoveredSaveItem, bytes, hash) + let mut local_save_map: HashMap<(i64, String), (&DiscoveredSaveItem, Vec, String)> = + HashMap::new(); + let mut client_states: Vec = Vec::new(); + + for item in matched_saves { + let Some(rom_id) = item.matched_rom_id else { + continue; + }; + let path = Path::new(&item.local_path); + match read_save_payload_and_hash(path, item.is_directory) { + Ok((bytes, hash)) => { + let slot = if item.slot.trim().is_empty() { + "default".to_string() + } else { + item.slot.clone() + }; + client_states.push(ClientSaveState { + rom_id, + file_name: item.file_name.clone(), + slot: Some(slot.clone()), + emulator: Some(item.emulator_id.clone()), + content_hash: Some(hash.clone()), + updated_at: item.updated_at.clone(), + file_size_bytes: bytes.len() as i64, + }); + local_save_map.insert((rom_id, slot), (item, bytes, hash)); + } + Err(e) => { + summary.errors.push(format!("{}: {}", item.file_name, e)); + } + } + } + + // 1. Negotiate two-way save sync with RomM 5.1.0 + if !client_states.is_empty() || cfg.connection.device_id.is_some() { + let neg = client + .negotiate_sync(cfg.connection.device_id.clone(), client_states) + .await?; + summary.session_id = Some(neg.session_id); + let mut ops_completed = 0i64; + let mut ops_failed = 0i64; + + for op in neg.operations { + let slot_key = op.slot.clone().unwrap_or_else(|| "default".to_string()); + match op.action.as_str() { + "no_op" => { + summary.up_to_date += 1; + } + "upload" => { + if let Some((item, bytes, _hash)) = local_save_map.get(&(op.rom_id, slot_key.clone())) { + match client + .upload_save( + op.rom_id, + Some(&item.emulator_id), + Some(&slot_key), + cfg.connection.device_id.as_deref(), + Some(neg.session_id), + true, + &item.file_name, + bytes.clone(), + ) + .await + { + Ok(_) => { + summary.uploaded_saves += 1; + ops_completed += 1; + push_log( + cfg, + "success", + "upload_save", + format!( + "Uploaded save '{}' for {}", + item.file_name, + item.matched_rom_name.as_deref().unwrap_or("ROM") + ), + Some(op.rom_id), + Some(item.local_path.clone()), + ); + } + Err(e) => { + ops_failed += 1; + summary.errors.push(format!("Upload {}: {}", item.file_name, e)); + push_log( + cfg, + "error", + "upload_save", + format!("Failed uploading {}: {}", item.file_name, e), + Some(op.rom_id), + Some(item.local_path.clone()), + ); + } + } + } + } + "download" => { + let Some(save_id) = op.save_id else { + continue; + }; + // Determine local target path: either existing matched local file, or emulator save_dir + let target_info = local_save_map + .get(&(op.rom_id, slot_key.clone())) + .map(|(item, _, _)| (PathBuf::from(&item.local_path), item.is_directory)) + .or_else(|| { + // Find enabled emulator matching op.emulator, or inherit from the ROM's platform slug + let matched_emu = op + .emulator + .as_ref() + .and_then(|emu_id| { + cfg.emulators + .iter() + .find(|e| e.enabled && e.id.eq_ignore_ascii_case(emu_id)) + }) + .or_else(|| { + rom_by_id.get(&op.rom_id).and_then(|rom| { + cfg.emulators.iter().find(|e| { + e.enabled + && e.platform_slugs.iter().any(|s| { + s.eq_ignore_ascii_case(&rom.platform_slug) + || s.eq_ignore_ascii_case(&rom.platform_fs_slug) + }) + }) + }) + }); + + matched_emu.map(|e| { + let is_dir = + e.structure == crate::config::SaveStructure::FolderPerGame; + let target_path = if is_dir { + let trimmed = op + .file_name + .strip_suffix(".zip") + .unwrap_or(&op.file_name); + if e.folder_depth > 1 { + let parts: Vec<&str> = + trimmed.splitn(e.folder_depth, '_').collect(); + let mut p = PathBuf::from(&e.save_dir); + for part in parts { + p.push(part); + } + p + } else { + PathBuf::from(&e.save_dir).join(trimmed) + } + } else { + PathBuf::from(&e.save_dir).join(&op.file_name) + }; + (target_path, is_dir) + }) + }); + + if let Some((target_path, is_dir)) = target_info { + match client + .download_save_bytes( + save_id, + cfg.connection.device_id.as_deref(), + Some(neg.session_id), + ) + .await + { + Ok(bytes) => { + let _ = create_backup( + &target_path, + op.rom_id, + is_dir, + cfg.settings.max_backups_per_save, + ); + match write_downloaded_save(&target_path, &bytes, is_dir) { + Ok(()) => { + if let Some(ref dev_id) = cfg.connection.device_id { + let _ = client + .confirm_save_downloaded(save_id, dev_id) + .await; + } + summary.downloaded_saves += 1; + ops_completed += 1; + push_log( + cfg, + "success", + "download_save", + format!("Downloaded '{}' (backup created)", op.file_name), + Some(op.rom_id), + Some(target_path.to_string_lossy().to_string()), + ); + } + Err(e) => { + ops_failed += 1; + summary.errors.push(format!("Write {}: {}", op.file_name, e)); + } + } + } + Err(e) => { + ops_failed += 1; + summary.errors.push(format!("Download {}: {}", op.file_name, e)); + } + } + } + } + "conflict" => { + if let Some((item, _, _)) = local_save_map.get(&(op.rom_id, slot_key.clone())) { + let conflict = SyncConflictItem { + id: format!("{}:{}:{}", op.rom_id, slot_key, op.save_id.unwrap_or(0)), + rom_id: op.rom_id, + rom_name: item + .matched_rom_name + .clone() + .unwrap_or_else(|| format!("ROM #{}", op.rom_id)), + save_id: op.save_id, + local_path: item.local_path.clone(), + file_name: item.file_name.clone(), + is_directory: item.is_directory, + emulator_id: item.emulator_id.clone(), + slot: slot_key, + local_updated_at: item.updated_at.clone(), + server_updated_at: op.server_updated_at.clone(), + reason: op.reason.clone(), + }; + push_log( + cfg, + "warning", + "conflict", + format!("Conflict detected for '{}': {}", item.file_name, op.reason), + Some(op.rom_id), + Some(item.local_path.clone()), + ); + summary.conflicts.push(conflict); + } + } + _ => {} + } + } + + let _ = client + .complete_sync_session(neg.session_id, ops_completed, ops_failed) + .await; + } + + // 2. Sync Save States (/api/states) for changed local state files + for item in matched_states { + let Some(rom_id) = item.matched_rom_id else { + continue; + }; + let path = Path::new(&item.local_path); + match read_save_payload_and_hash(path, false) { + Ok((bytes, hash)) => { + if cfg.synced_state_hashes.get(&item.local_path) == Some(&hash) { + summary.up_to_date += 1; + continue; + } + // Check if a remote state with same file_name exists for this ROM + let existing = client + .get_states(Some(rom_id), None) + .await + .unwrap_or_default() + .into_iter() + .find(|s| s.file_name.eq_ignore_ascii_case(&item.file_name)); + + let res = if let Some(remote_state) = existing { + client + .update_state(remote_state.id, &item.file_name, bytes) + .await + } else { + client + .upload_state(rom_id, Some(&item.emulator_id), &item.file_name, bytes) + .await + }; + + match res { + Ok(_) => { + cfg.synced_state_hashes.insert(item.local_path.clone(), hash); + summary.uploaded_states += 1; + push_log( + cfg, + "success", + "upload_state", + format!("Synced save state '{}'", item.file_name), + Some(rom_id), + Some(item.local_path.clone()), + ); + } + Err(e) => { + summary + .errors + .push(format!("State {}: {}", item.file_name, e)); + } + } + } + Err(e) => { + summary.errors.push(format!("State {}: {}", item.file_name, e)); + } + } + } + + Ok(summary) +} diff --git a/src-tauri/src/watcher.rs b/src-tauri/src/watcher.rs new file mode 100644 index 0000000..93b4b82 --- /dev/null +++ b/src-tauri/src/watcher.rs @@ -0,0 +1,66 @@ +use crate::config::EmulatorRule; +use notify_debouncer_mini::{new_debouncer, notify::RecursiveMode, DebounceEventResult, Debouncer}; +use std::path::PathBuf; +use std::time::Duration; +use tauri::{AppHandle, Emitter}; + +pub struct WatcherHandle { + _debouncer: Debouncer, + pub watched_paths: Vec, +} + +pub fn start_watcher( + app: AppHandle, + emulators: &[EmulatorRule], + debounce_seconds: u64, +) -> Result { + let debounce = Duration::from_secs(debounce_seconds.max(1)); + let app_clone = app.clone(); + + let mut debouncer = new_debouncer(debounce, move |res: DebounceEventResult| { + if let Ok(events) = res { + let paths: Vec = events + .into_iter() + .map(|e| e.path.to_string_lossy().to_string()) + .filter(|p| !p.contains(".romm_part") && !p.contains(".DS_Store")) + .collect(); + if !paths.is_empty() { + let _ = app_clone.emit("watcher:change", paths); + } + } + }) + .map_err(|e| format!("Failed to initialize file watcher: {e}"))?; + + let mut watched_paths = Vec::new(); + for emu in emulators.iter().filter(|e| e.enabled) { + let save_p = PathBuf::from(&emu.save_dir); + if save_p.exists() { + if debouncer + .watcher() + .watch(&save_p, RecursiveMode::Recursive) + .is_ok() + { + watched_paths.push(emu.save_dir.clone()); + } + } + if emu.sync_states { + if let Some(ref sdir) = emu.state_dir { + let state_p = PathBuf::from(sdir); + if state_p.exists() && sdir != &emu.save_dir { + if debouncer + .watcher() + .watch(&state_p, RecursiveMode::Recursive) + .is_ok() + { + watched_paths.push(sdir.clone()); + } + } + } + } + } + + Ok(WatcherHandle { + _debouncer: debouncer, + watched_paths, + }) +} diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json new file mode 100644 index 0000000..616f825 --- /dev/null +++ b/src-tauri/tauri.conf.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://schema.tauri.app/config/2", + "productName": "RomM Companion", + "version": "0.1.0", + "identifier": "com.romm.companion", + "build": { + "beforeDevCommand": "npm run dev", + "devUrl": "http://localhost:1420", + "beforeBuildCommand": "npm run build", + "frontendDist": "../dist" + }, + "app": { + "windows": [ + { + "title": "RomM Companion", + "width": 1240, + "height": 820, + "minWidth": 960, + "minHeight": 640, + "resizable": true + } + ], + "security": { + "csp": null + } + }, + "bundle": { + "active": true, + "targets": "all", + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/128x128@2x.png", + "icons/icon.ico", + "icons/icon.png" + ] + } +} diff --git a/src/App.tsx b/src/App.tsx new file mode 100644 index 0000000..e8bf220 --- /dev/null +++ b/src/App.tsx @@ -0,0 +1,234 @@ +import React, { useCallback, useEffect, useState } from "react"; +import { listen } from "@tauri-apps/api/event"; +import { + FolderSync, + Gamepad2, + HardDrive, + LayoutDashboard, + Library, + Settings, + Usb, +} from "lucide-react"; +import { api } from "./lib/tauri"; +import type { AppStateSnapshot, DiscoveredSaveItem, SyncRunSummary } from "./lib/types"; +import { OnboardingConnect } from "./components/OnboardingConnect"; +import { Dashboard } from "./components/Dashboard"; +import { EmulatorsView } from "./components/EmulatorsView"; +import { LibraryView } from "./components/LibraryView"; +import { SavesStatesView } from "./components/SavesStatesView"; +import { HandheldView } from "./components/HandheldView"; +import { SettingsView } from "./components/SettingsView"; + +type NavPage = "dashboard" | "emulators" | "handheld" | "library" | "saves" | "settings"; + +export default function App() { + const [appState, setAppState] = useState(null); + const [page, setPage] = useState("dashboard"); + const [discoveredSaves, setDiscoveredSaves] = useState([]); + const [syncing, setSyncing] = useState(false); + const [lastSummary, setLastSummary] = useState(null); + + const refreshAll = useCallback(async () => { + const snap = await api.getAppState(); + setAppState(snap); + if (snap.connected) { + const saves = await api.discoverLocalSaves(); + setDiscoveredSaves(saves); + } + }, []); + + const handleSyncNow = useCallback(async () => { + setSyncing(true); + try { + const summary = await api.runFullSync(); + setLastSummary(summary); + await refreshAll(); + } catch (e) { + console.error("Sync failed:", e); + } finally { + setSyncing(false); + } + }, [refreshAll]); + + useEffect(() => { + refreshAll(); + }, [refreshAll]); + + // Listen to file watcher & system tray events from Rust backend + useEffect(() => { + const unlistenWatcher = listen("watcher:change", async () => { + const snap = await api.getAppState(); + setAppState(snap); + if (snap.connected && snap.settings.autoSyncOnChange) { + await handleSyncNow(); + } else if (snap.connected) { + const saves = await api.discoverLocalSaves(); + setDiscoveredSaves(saves); + } + }); + + const unlistenTray = listen("tray:sync-now", async () => { + await handleSyncNow(); + }); + + return () => { + unlistenWatcher.then((u) => u()); + unlistenTray.then((u) => u()); + }; + }, [handleSyncNow]); + + const handleConnected = async () => { + await api.refreshRomCache().catch(() => {}); + await refreshAll(); + }; + + const handleAutoDetect = async () => { + await api.autoPopulateDetectedEmulators(); + await refreshAll(); + }; + + const handleResolveConflict = async ( + id: string, + resolution: "keep_local" | "keep_server" + ) => { + await api.resolveSyncConflict(id, resolution); + await refreshAll(); + }; + + const handleClearLogs = async () => { + await api.clearSyncLogs(); + await refreshAll(); + }; + + const handleDisconnect = async () => { + const snap = await api.disconnect(); + setAppState(snap); + setDiscoveredSaves([]); + setLastSummary(null); + }; + + if (!appState) { + return ( +
+ Loading RomM Companion... +
+ ); + } + + if (!appState.connected) { + return ( + + ); + } + + const navItems: { id: NavPage; label: string; icon: React.ComponentType<{ className?: string }> }[] = + [ + { id: "dashboard", label: "Dashboard", icon: LayoutDashboard }, + { id: "emulators", label: "Emulators", icon: HardDrive }, + { id: "handheld", label: "NextUI USB / SD", icon: Usb }, + { id: "saves", label: "Saves & States", icon: FolderSync }, + { id: "library", label: "ROM Library", icon: Library }, + { id: "settings", label: "Settings", icon: Settings }, + ]; + + return ( +
+ {/* Sidebar */} + + + {/* Main Content */} +
+ {page === "dashboard" && ( + + )} + {page === "emulators" && ( + + )} + {page === "handheld" && } + {page === "saves" && ( + + )} + {page === "library" && ( + + )} + {page === "settings" && ( + + )} +
+
+ ); +} diff --git a/src/components/Dashboard.tsx b/src/components/Dashboard.tsx new file mode 100644 index 0000000..515481d --- /dev/null +++ b/src/components/Dashboard.tsx @@ -0,0 +1,247 @@ +import React from "react"; +import { + AlertTriangle, + CheckCircle2, + CloudDownload, + CloudUpload, + Eye, + FolderSync, + HardDrive, + Loader2, + RefreshCw, + Trash2, +} from "lucide-react"; +import type { AppStateSnapshot, DiscoveredSaveItem, SyncRunSummary } from "../lib/types"; + +interface Props { + appState: AppStateSnapshot; + discoveredSaves: DiscoveredSaveItem[]; + syncing: boolean; + lastSummary: SyncRunSummary | null; + onSyncNow: () => void; + onResolveConflict: (id: string, resolution: "keep_local" | "keep_server") => void; + onClearLogs: () => void; + onAutoDetect: () => void; +} + +export const Dashboard: React.FC = ({ + appState, + discoveredSaves, + syncing, + lastSummary, + onSyncNow, + onResolveConflict, + onClearLogs, + onAutoDetect, +}) => { + const matchedCount = discoveredSaves.filter((s) => s.matchedRomId !== null).length; + const enabledEmulators = appState.emulators.filter((e) => e.enabled).length; + + return ( +
+
+
+

Dashboard

+

+ Connected to {appState.serverUrl} as{" "} + {appState.username} +

+
+
+ {appState.emulators.length === 0 && ( + + )} + +
+
+ + {/* Stat Cards */} +
+
+
+ ACTIVE EMULATORS + +
+
{enabledEmulators}
+
+ {appState.emulators.length} configured rules +
+
+ +
+
+ MATCHED SAVES / STATES + +
+
+ {matchedCount}{" "} + / {discoveredSaves.length} +
+
+ {appState.cachedRomCount} ROMs indexed from RomM +
+
+ +
+
+ FILE WATCHER + +
+
+ {appState.watcherActive ? "Active" : "Paused"} +
+
+ Watching {appState.watchedPaths.length} folder(s) +
+
+ +
+
+ CONFLICTS + 0 ? "text-amber-400" : "text-slate-500"}`} + /> +
+
{appState.conflicts.length}
+
+ {appState.conflicts.length === 0 ? "All saves clean" : "Needs your decision"} +
+
+
+ + {/* Last Sync Summary Banner */} + {lastSummary && ( +
+
+ + + Last sync completed: {lastSummary.uploadedSaves} saves uploaded,{" "} + {lastSummary.downloadedSaves} downloaded,{" "} + {lastSummary.uploadedStates} states synced,{" "} + {lastSummary.upToDate} already up to date. + +
+ {lastSummary.errors.length > 0 && ( + + {lastSummary.errors.length} error(s) — check log below + + )} +
+ )} + + {/* Pending Conflicts */} + {appState.conflicts.length > 0 && ( +
+

+ Save Conflicts Requiring Resolution +

+
+ {appState.conflicts.map((c) => ( +
+
+
+ {c.romName}{" "} + + ({c.fileName} • slot: {c.slot}) + +
+
{c.reason}
+
+ Local: {new Date(c.localUpdatedAt).toLocaleString()} | Server:{" "} + {c.serverUpdatedAt ? new Date(c.serverUpdatedAt).toLocaleString() : "Unknown"} +
+
+
+ + +
+
+ ))} +
+
+ )} + + {/* Activity Log */} +
+
+

Recent Sync Activity

+ {appState.logs.length > 0 && ( + + )} +
+
+ {appState.logs.length === 0 ? ( +
+ No sync activity yet. Configure an emulator and click Sync Saves & States. +
+ ) : ( + appState.logs.slice(0, 50).map((log) => ( +
+
+ +
+
{log.message}
+ {log.filePath && ( +
+ {log.filePath} +
+ )} +
+
+ + {new Date(log.timestamp).toLocaleTimeString()} + +
+ )) + )} +
+
+
+ ); +}; diff --git a/src/components/EmulatorsView.tsx b/src/components/EmulatorsView.tsx new file mode 100644 index 0000000..7b1bf15 --- /dev/null +++ b/src/components/EmulatorsView.tsx @@ -0,0 +1,487 @@ +import React, { useEffect, useState } from "react"; +import { + CheckCircle2, + FolderOpen, + Plus, + Sparkles, + Trash2, + X, +} from "lucide-react"; +import { api } from "../lib/tauri"; +import type { EmulatorPresetInfo, EmulatorRule, SaveStructure } from "../lib/types"; + +interface Props { + emulators: EmulatorRule[]; + onRefreshState: () => Promise; +} + +export const EmulatorsView: React.FC = ({ emulators, onRefreshState }) => { + const [presets, setPresets] = useState([]); + const [editing, setEditing] = useState(null); + const [extInput, setExtInput] = useState(""); + const [stateExtInput, setStateExtInput] = useState(""); + const [slugInput, setSlugInput] = useState(""); + + useEffect(() => { + api.getEmulatorPresets().then(setPresets).catch(console.error); + }, []); + + const openEditor = (rule: EmulatorRule) => { + setEditing({ ...rule }); + setExtInput(rule.saveExtensions.join(", ")); + setStateExtInput(rule.stateExtensions.join(", ")); + setSlugInput(rule.platformSlugs.join(", ")); + }; + + const handleAddPreset = async (p: EmulatorPresetInfo) => { + const rule: EmulatorRule = { + id: p.id, + name: p.name, + platformSlugs: p.platformSlugs, + saveDir: p.detectedSaveDir || p.defaultSaveDir, + stateDir: p.detectedStateDir || p.defaultStateDir, + romDir: null, + saveExtensions: p.saveExtensions, + stateExtensions: p.stateExtensions, + structure: p.structure, + folderDepth: p.folderDepth || 1, + enabled: true, + isCustom: false, + syncStates: Boolean(p.detectedStateDir || p.defaultStateDir), + defaultSlot: "default", + }; + openEditor(rule); + }; + + const handleNewCustom = () => { + openEditor({ + id: `custom-${Date.now()}`, + name: "Custom Emulator", + platformSlugs: [], + saveDir: "", + stateDir: null, + romDir: null, + saveExtensions: ["sav", "srm"], + stateExtensions: ["state"], + structure: "file_per_game", + folderDepth: 1, + enabled: true, + isCustom: true, + syncStates: false, + defaultSlot: "default", + }); + }; + + const handleSaveRule = async (e: React.FormEvent) => { + e.preventDefault(); + if (!editing) return; + const cleaned: EmulatorRule = { + ...editing, + saveExtensions: extInput + .split(",") + .map((s) => s.trim().replace(/^\./, "")) + .filter(Boolean), + stateExtensions: stateExtInput + .split(",") + .map((s) => s.trim().replace(/^\./, "")) + .filter(Boolean), + platformSlugs: slugInput + .split(",") + .map((s) => s.trim().toLowerCase()) + .filter(Boolean), + }; + await api.upsertEmulatorRule(cleaned); + setEditing(null); + await onRefreshState(); + }; + + const handleToggleEnabled = async (rule: EmulatorRule) => { + await api.upsertEmulatorRule({ ...rule, enabled: !rule.enabled }); + await onRefreshState(); + }; + + const handleDelete = async (id: string) => { + await api.deleteEmulatorRule(id); + await onRefreshState(); + }; + + const handleAutoDetectAll = async () => { + await api.autoPopulateDetectedEmulators(); + await onRefreshState(); + }; + + const configuredIds = new Set(emulators.map((e) => e.id)); + + return ( +
+
+
+

Emulators & Save Rules

+

+ Auto-detect standalone console & handheld emulators or define custom save folders. +

+
+
+ + +
+
+ + {/* Configured Rules */} +
+

+ Configured Rules ({emulators.length}) +

+ {emulators.length === 0 ? ( +
+ No emulators configured yet. Click Auto-Add Detected or pick a preset + below. +
+ ) : ( +
+ {emulators.map((rule) => ( +
+
+
+
+ {rule.name} + + {rule.structure.replace(/_/g, " ")} + +
+
+ Saves: {rule.saveDir || "(not set)"} +
+ {rule.romDir && ( +
+ ROMs: {rule.romDir} +
+ )} + {rule.syncStates && rule.stateDir && ( +
+ States: {rule.stateDir} +
+ )} +
+
+ ))} +
+ )} +
+ + {/* Presets Catalog */} +
+

+ Built-In Emulator Presets +

+
+ {presets.map((p) => { + const added = configuredIds.has(p.id); + return ( +
+
+
+ {p.name} + {p.detected ? ( + + Detected + + ) : ( + + Not found + + )} +
+

{p.notes}

+
+
+ {p.category} + +
+
+ ); + })} +
+
+ + {/* Edit Modal */} + {editing && ( +
+
+
+

Configure Emulator Rule

+ +
+ +
+
+ + setEditing({ ...editing, name: e.target.value })} + className="w-full px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-sm" + /> +
+ +
+ +
+ setEditing({ ...editing, saveDir: e.target.value })} + className="flex-1 px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-xs font-mono" + /> + +
+
+ +
+ +
+ setEditing({ ...editing, romDir: e.target.value || null })} + placeholder="Optional — e.g. ~/ROMs/GameCube" + className="flex-1 px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-xs font-mono" + /> + +
+
+ +
+
+ + +
+
+ + setEditing({ ...editing, defaultSlot: e.target.value })} + placeholder="default" + className="w-full px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-sm" + /> +
+
+ + {editing.structure === "folder_per_game" && ( +
+ + + setEditing({ + ...editing, + folderDepth: Math.max(1, Math.min(6, Number(e.target.value) || 1)), + }) + } + className="w-full px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-sm" + /> +
+ )} + +
+ + setSlugInput(e.target.value)} + className="w-full px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-xs font-mono" + /> +
+ +
+ + setExtInput(e.target.value)} + placeholder="sav, srm, gci, mcd" + className="w-full px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-xs font-mono" + /> +
+ +
+ + {editing.syncStates && ( + <> +
+ +
+ + setEditing({ ...editing, stateDir: e.target.value || null }) + } + className="flex-1 px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-xs font-mono" + /> + +
+
+
+ + setStateExtInput(e.target.value)} + placeholder="p2s, ppst, s01, ss0, sav" + className="w-full px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-xs font-mono" + /> +
+ + )} +
+
+ +
+ + +
+
+
+ )} +
+ ); +}; diff --git a/src/components/HandheldView.tsx b/src/components/HandheldView.tsx new file mode 100644 index 0000000..ead0bda --- /dev/null +++ b/src/components/HandheldView.tsx @@ -0,0 +1,574 @@ +import React, { useCallback, useEffect, useState } from "react"; +import { listen } from "@tauri-apps/api/event"; +import { + Archive, + CheckCircle2, + Download, + Folder, + FolderOpen, + HardDrive, + Link2, + Loader2, + RefreshCw, + Search, + Usb, + X, +} from "lucide-react"; +import { api } from "../lib/tauri"; +import { + formatBytes, + type DetectedNextUiVolume, + type NextUiCardInspection, + type NextUiSdSaveItem, + type PlatformSchema, + type SimpleRomSchema, + type SyncRunSummary, +} from "../lib/types"; + +interface Props { + onRefreshState: () => Promise; +} + +export const HandheldView: React.FC = ({ onRefreshState }) => { + const [volumes, setVolumes] = useState([]); + const [selectedRoot, setSelectedRoot] = useState(""); + const [inspection, setInspection] = useState(null); + const [syncStates, setSyncStates] = useState(true); + const [syncing, setSyncing] = useState(false); + const [lastSummary, setLastSummary] = useState(null); + const [toast, setToast] = useState(null); + + const [subTab, setSubTab] = useState<"saves" | "roms">("saves"); + + // Manual save linking + const [linkingItem, setLinkingItem] = useState(null); + const [linkSearch, setLinkSearch] = useState(""); + const [linkResults, setLinkResults] = useState([]); + + // Send ROMs to SD card + const [platforms, setPlatforms] = useState([]); + const [selectedPlatform, setSelectedPlatform] = useState(null); + const [romSearch, setRomSearch] = useState(""); + const [roms, setRoms] = useState([]); + const [loadingRoms, setLoadingRoms] = useState(false); + const [downloadingId, setDownloadingId] = useState(null); + const [downloadPct, setDownloadPct] = useState(0); + + const scanVolumes = useCallback(async () => { + const vols = await api.detectNextUiVolumes(); + setVolumes(vols); + if (vols.length > 0 && !selectedRoot) { + setSelectedRoot(vols[0].path); + } + }, [selectedRoot]); + + const inspectCard = useCallback(async (root: string) => { + if (!root) { + setInspection(null); + return; + } + const info = await api.inspectNextUiCard(root); + setInspection(info); + }, []); + + useEffect(() => { + scanVolumes(); + api.fetchPlatforms().then(setPlatforms).catch(() => {}); + const unlistenPromise = listen<{ romId: number; downloaded: number; total: number | null }>( + "rom:download-progress", + (event) => { + const { romId, downloaded, total } = event.payload; + setDownloadingId(romId); + if (total && total > 0) { + setDownloadPct(Math.round((downloaded / total) * 100)); + } + } + ); + return () => { + unlistenPromise.then((u) => u()); + }; + }, [scanVolumes]); + + useEffect(() => { + if (selectedRoot) { + inspectCard(selectedRoot); + } + }, [selectedRoot, inspectCard]); + + const loadRoms = useCallback(async () => { + setLoadingRoms(true); + try { + const page = await api.fetchRoms({ + platformId: selectedPlatform, + searchTerm: romSearch || null, + limit: 80, + offset: 0, + }); + setRoms(page.items); + } catch (e) { + setToast(String(e)); + } finally { + setLoadingRoms(false); + } + }, [selectedPlatform, romSearch]); + + useEffect(() => { + if (subTab === "roms") { + loadRoms(); + } + }, [subTab, selectedPlatform, loadRoms]); + + const handleBrowseSd = async () => { + const picked = await api.pickFolder("Select Mounted NextUI SD Card Root"); + if (picked) { + setSelectedRoot(picked); + } + }; + + const handleSyncCard = async () => { + if (!selectedRoot) return; + setSyncing(true); + setToast(null); + try { + const summary = await api.syncNextUiCard(selectedRoot, syncStates); + setLastSummary(summary); + await inspectCard(selectedRoot); + await onRefreshState(); + } catch (e) { + setToast(`Sync failed: ${e}`); + } finally { + setSyncing(false); + } + }; + + const handleSendRom = async (rom: SimpleRomSchema) => { + if (!selectedRoot) return; + setDownloadingId(rom.id); + setDownloadPct(0); + setToast(null); + try { + const dest = await api.downloadRomToNextUi({ + sdRoot: selectedRoot, + romId: rom.id, + fileName: rom.fs_name, + platformSlug: rom.platform_slug, + platformDisplayName: rom.platform_display_name, + }); + setToast(`Sent to SD card: ${dest}`); + await inspectCard(selectedRoot); + } catch (e) { + setToast(`Transfer failed: ${e}`); + } finally { + setDownloadingId(null); + setDownloadPct(0); + } + }; + + const openLinker = async (item: NextUiSdSaveItem) => { + setLinkingItem(item); + setLinkSearch(""); + const page = await api.fetchRoms({ limit: 30, offset: 0 }); + setLinkResults(page.items); + }; + + const handleLink = async (rom: SimpleRomSchema) => { + if (!linkingItem) return; + await api.linkSaveToRom({ + localPath: linkingItem.localPath, + romId: rom.id, + romName: rom.name || rom.fs_name_no_ext, + emulatorId: `nextui-${linkingItem.systemTag.toLowerCase()}`, + slot: linkingItem.slot || "default", + isState: linkingItem.isState, + }); + setLinkingItem(null); + if (selectedRoot) await inspectCard(selectedRoot); + }; + + const matchedCount = inspection + ? inspection.saves.filter((s) => s.matchedRomId !== null).length + : 0; + + return ( +
+
+
+

+ + NextUI Handheld (USB / SD Card) +

+

+ Sync saves, states, and ROMs with your TrimUI Smart Pro S / Brick over USB Storage or + an SD card reader — no handheld Wi-Fi needed. +

+
+ +
+ + +
+
+ + {/* Detected Drives Strip */} + {volumes.length > 0 && ( +
+ {volumes.map((v) => { + const active = selectedRoot === v.path; + return ( + + ); + })} +
+ )} + + {!inspection ? ( +
+ +
No NextUI SD card selected
+

+ Plug your TrimUI Smart Pro S into your computer in USB Storage mode (or + insert its microSD card), then click Rescan Drives or{" "} + Select SD Folder. +

+
+ ) : ( + <> + {/* Active SD Card Summary & Sync Action */} +
+
+
+ {inspection.deviceName} + + {inspection.detectedPlatform} + +
+
{inspection.sdRoot}
+
+ {inspection.systemTags.map((tag) => ( + + {tag} + + ))} +
+
+ +
+ + +
+
+ + {lastSummary && ( +
+ + + SD Card Sync Complete: {lastSummary.uploadedSaves} saves uploaded,{" "} + {lastSummary.downloadedSaves} downloaded to SD card,{" "} + {lastSummary.uploadedStates} states synced,{" "} + {lastSummary.upToDate} up to date + {lastSummary.conflicts.length > 0 && + ` • ${lastSummary.conflicts.length} conflict(s) (see Dashboard)`} + +
+ )} + + {toast && ( +
+ {toast} +
+ )} + + {/* Sub-tabs */} +
+ + +
+ + {subTab === "saves" ? ( +
+ {inspection.saves.length === 0 ? ( +
+ No saves found under /Saves/<TAG>/ on this SD card yet. +
+ ) : ( + inspection.saves.map((item) => ( +
+
+
+ {item.isDirectory ? ( + + ) : ( + + )} + {item.fileName} + + {item.systemTag} + + + {item.isState ? "State" : "Save"} + +
+
+ {formatBytes(item.sizeBytes)} • {item.localPath} +
+
+ +
+ {item.matchedRomId ? ( +
+
+ + {item.matchedRomName} +
+
+ {item.matchedPlatform} • {item.matchSource} +
+
+ ) : ( + Unmatched + )} + +
+
+ )) + )} +
+ ) : ( +
+
+ +
{ + e.preventDefault(); + loadRoms(); + }} + className="flex-1 flex gap-2 min-w-[200px]" + > +
+ + setRomSearch(e.target.value)} + placeholder="Search RomM games to copy to your TrimUI..." + className="w-full pl-9 pr-3 py-2 bg-slate-900 border border-slate-800 rounded-lg text-sm" + /> +
+ +
+
+ +
+ {loadingRoms ? ( +
+ Loading ROMs... +
+ ) : roms.length === 0 ? ( +
No ROMs found.
+ ) : ( + roms.map((rom) => { + const isDl = downloadingId === rom.id; + return ( +
+
+
+ {rom.name || rom.fs_name_no_ext} +
+
+ + {rom.platform_display_name} + + + {rom.fs_name} + + {formatBytes(rom.fs_size_bytes)} +
+
+ +
+ ); + }) + )} +
+
+ )} + + )} + + {/* Manual Link Modal */} + {linkingItem && ( +
+
+
+
+

Link SD Save to RomM Game

+

+ {linkingItem.fileName} +

+
+ +
+
{ + e.preventDefault(); + const page = await api.fetchRoms({ searchTerm: linkSearch, limit: 30, offset: 0 }); + setLinkResults(page.items); + }} + className="flex gap-2" + > + setLinkSearch(e.target.value)} + placeholder="Search RomM games..." + className="flex-1 px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-sm" + /> + +
+
+ {linkResults.map((rom) => ( + + ))} +
+
+
+ )} +
+ ); +}; diff --git a/src/components/LibraryView.tsx b/src/components/LibraryView.tsx new file mode 100644 index 0000000..8c824b8 --- /dev/null +++ b/src/components/LibraryView.tsx @@ -0,0 +1,680 @@ +import React, { useEffect, useState } from "react"; +import { listen } from "@tauri-apps/api/event"; +import { + Archive, + CheckCircle2, + CloudDownload, + CloudUpload, + Download, + FolderSearch, + Hash, + Loader2, + Search, + X, +} from "lucide-react"; +import { api } from "../lib/tauri"; +import { + formatBytes, + type DiscoveredSaveItem, + type EmulatorRule, + type LocalRomScanResult, + type PlatformSchema, + type RemoteSavesAndStates, + type SimpleRomSchema, +} from "../lib/types"; + +interface Props { + defaultDownloadDir: string | null; + emulators: EmulatorRule[]; + discoveredSaves: DiscoveredSaveItem[]; + onRefreshAll: () => Promise; +} + +function findEmulatorForRom( + emulators: EmulatorRule[], + rom: SimpleRomSchema +): EmulatorRule | undefined { + const matches = (e: EmulatorRule) => + e.platformSlugs.some( + (s) => + s.toLowerCase() === rom.platform_slug.toLowerCase() || + s.toLowerCase() === rom.platform_fs_slug.toLowerCase() + ); + return emulators.find((e) => e.enabled && matches(e)) || emulators.find(matches); +} + +export const LibraryView: React.FC = ({ + defaultDownloadDir, + emulators, + discoveredSaves, + onRefreshAll, +}) => { + const [tab, setTab] = useState<"romm" | "scanner">("romm"); + const [platforms, setPlatforms] = useState([]); + const [selectedPlatform, setSelectedPlatform] = useState(null); + const [search, setSearch] = useState(""); + const [roms, setRoms] = useState([]); + const [total, setTotal] = useState(0); + const [loading, setLoading] = useState(false); + + const [downloadingId, setDownloadingId] = useState(null); + const [downloadPct, setDownloadPct] = useState(0); + const [toast, setToast] = useState(null); + + // Per-game Saves & States modal + const [activeRom, setActiveRom] = useState(null); + const [remoteAssets, setRemoteAssets] = useState(null); + const [loadingAssets, setLoadingAssets] = useState(false); + const [busyAction, setBusyAction] = useState(null); + + // Local ROM folder scanner state + const [scanFolder, setScanFolder] = useState(""); + const [useHashLookup, setUseHashLookup] = useState(true); + const [scanning, setScanning] = useState(false); + const [scanResults, setScanResults] = useState([]); + + useEffect(() => { + api.fetchPlatforms().then(setPlatforms).catch(console.error); + const unlistenPromise = listen<{ romId: number; downloaded: number; total: number | null }>( + "rom:download-progress", + (event) => { + const { romId, downloaded, total } = event.payload; + setDownloadingId(romId); + if (total && total > 0) { + setDownloadPct(Math.round((downloaded / total) * 100)); + } + } + ); + return () => { + unlistenPromise.then((u) => u()); + }; + }, []); + + const loadRoms = async () => { + setLoading(true); + try { + const page = await api.fetchRoms({ + platformId: selectedPlatform, + searchTerm: search || null, + limit: 80, + offset: 0, + }); + setRoms(page.items); + setTotal(page.total); + } catch (e) { + setToast(String(e)); + } finally { + setLoading(false); + } + }; + + useEffect(() => { + loadRoms(); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [selectedPlatform]); + + const handleDownloadRom = async (rom: SimpleRomSchema) => { + const inheritedEmu = findEmulatorForRom(emulators, rom); + let dest: string | null = inheritedEmu?.romDir || defaultDownloadDir; + if (!dest) { + dest = await api.pickFolder(`Choose Download Folder for ${rom.name || rom.fs_name}`); + } + if (!dest) return; + setDownloadingId(rom.id); + setDownloadPct(0); + setToast(null); + try { + const savedPath = await api.downloadRomToFolder({ + romId: rom.id, + fileName: rom.fs_name, + destFolder: dest, + platformSlug: rom.platform_slug, + platformFsSlug: rom.platform_fs_slug, + }); + setToast(`Downloaded to ${savedPath}`); + } catch (e) { + setToast(`Download failed: ${e}`); + } finally { + setDownloadingId(null); + setDownloadPct(0); + } + }; + + const openGameSaves = async (rom: SimpleRomSchema) => { + setActiveRom(rom); + setRemoteAssets(null); + setLoadingAssets(true); + try { + const data = await api.fetchRemoteSavesAndStates(rom.id); + setRemoteAssets(data); + } catch (e) { + setToast(`Failed to load saves for ${rom.name || rom.fs_name}: ${e}`); + } finally { + setLoadingAssets(false); + } + }; + + const handlePullSave = async ( + rom: SimpleRomSchema, + saveId: number, + fileName: string, + emulatorHint: string | null + ) => { + const inheritedEmu = findEmulatorForRom(emulators, rom); + let destOverride: string | null = null; + if (!inheritedEmu || !inheritedEmu.saveDir) { + destOverride = await api.pickFolder(`Select Save Folder for ${rom.platform_display_name}`); + if (!destOverride) return; + } + setBusyAction(`save-${saveId}`); + setToast(null); + try { + const placed = await api.downloadSingleSave({ + saveId, + romId: rom.id, + fileName, + platformSlug: rom.platform_slug, + platformFsSlug: rom.platform_fs_slug, + emulatorHint, + destOverride, + }); + setToast(`Downloaded save to ${placed}`); + await onRefreshAll(); + } catch (e) { + setToast(`Save download failed: ${e}`); + } finally { + setBusyAction(null); + } + }; + + const handlePullState = async ( + rom: SimpleRomSchema, + stateId: number, + fileName: string, + emulatorHint: string | null + ) => { + const inheritedEmu = findEmulatorForRom(emulators, rom); + let destOverride: string | null = null; + if (!inheritedEmu || (!inheritedEmu.stateDir && !inheritedEmu.saveDir)) { + destOverride = await api.pickFolder( + `Select Save States Folder for ${rom.platform_display_name}` + ); + if (!destOverride) return; + } + setBusyAction(`state-${stateId}`); + setToast(null); + try { + const placed = await api.downloadSingleState({ + stateId, + romId: rom.id, + fileName, + platformSlug: rom.platform_slug, + platformFsSlug: rom.platform_fs_slug, + emulatorHint, + destOverride, + }); + setToast(`Downloaded state to ${placed}`); + await onRefreshAll(); + } catch (e) { + setToast(`State download failed: ${e}`); + } finally { + setBusyAction(null); + } + }; + + const handlePushLocal = async (item: DiscoveredSaveItem, rom: SimpleRomSchema) => { + setBusyAction(`push-${item.localPath}`); + setToast(null); + try { + await api.uploadSingleSave({ + localPath: item.localPath, + fileName: item.fileName, + romId: rom.id, + emulatorId: item.emulatorId, + slot: item.slot || "default", + isDirectory: item.isDirectory, + isState: item.isState, + }); + setToast(`Uploaded '${item.fileName}' to RomM!`); + const refreshed = await api.fetchRemoteSavesAndStates(rom.id); + setRemoteAssets(refreshed); + await onRefreshAll(); + } catch (e) { + setToast(`Upload failed: ${e}`); + } finally { + setBusyAction(null); + } + }; + + const handleScanLocal = async () => { + let folder = scanFolder; + if (!folder) { + const picked = await api.pickFolder("Select Local ROMs Folder"); + if (!picked) return; + folder = picked; + setScanFolder(picked); + } + setScanning(true); + setToast(null); + try { + const res = await api.scanLocalRomFolder(folder, useHashLookup); + setScanResults(res); + } catch (e) { + setToast(String(e)); + } finally { + setScanning(false); + } + }; + + const activeInheritedEmu = activeRom ? findEmulatorForRom(emulators, activeRom) : undefined; + const activeLocalItems = activeRom + ? discoveredSaves.filter((s) => s.matchedRomId === activeRom.id) + : []; + + return ( +
+
+
+

ROM Library & Hash Matcher

+

+ ROMs and individual saves automatically inherit the configured emulator paths for their + system. +

+
+
+ + +
+
+ + {toast && ( +
+ {toast} +
+ )} + + {tab === "romm" ? ( + <> +
+ + +
{ + e.preventDefault(); + loadRoms(); + }} + className="flex-1 flex gap-2 min-w-[220px]" + > +
+ + setSearch(e.target.value)} + placeholder="Search ROMs by title or filename..." + className="w-full pl-9 pr-3 py-2 bg-slate-900 border border-slate-800 rounded-lg text-sm focus:outline-none focus:border-indigo-500" + /> +
+ +
+
+ +
+ {loading ? ( +
+ Loading ROMs from RomM... +
+ ) : roms.length === 0 ? ( +
No ROMs found.
+ ) : ( +
+ {roms.map((rom) => { + const isDl = downloadingId === rom.id; + const inherited = findEmulatorForRom(emulators, rom); + return ( +
+
+
+ {rom.name || rom.fs_name_no_ext} +
+
+ + {rom.platform_display_name} + + {inherited && ( + + → {inherited.name} + + )} + + {rom.fs_name} + + {formatBytes(rom.fs_size_bytes)} +
+
+ +
+ + +
+
+ ); + })} +
+ )} +
+ + ) : ( +
+
+
+ setScanFolder(e.target.value)} + placeholder="Choose a local ROM directory to scan..." + className="flex-1 px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-xs font-mono" + /> + + +
+ +
+ + {scanResults.length > 0 && ( +
+ {scanResults.map((item) => ( +
+
+
{item.fileName}
+
+ {formatBytes(item.sizeBytes)} + {item.crc32 && CRC32: {item.crc32}} +
+
+
+ {item.matchedRomId ? ( +
+ + {item.matchedRomName} + + {item.matchSource} + +
+ ) : ( + Unmatched + )} +
+
+ ))} +
+ )} +
+ )} + + {/* Per-Game Individual Saves & States Modal */} + {activeRom && ( +
+
+
+
+

+ {activeRom.name || activeRom.fs_name_no_ext} +

+

+ {activeRom.platform_display_name} •{" "} + {activeInheritedEmu ? ( + + Inherited Emulator: {activeInheritedEmu.name} ({activeInheritedEmu.saveDir}) + + ) : ( + + No emulator configured for {activeRom.platform_slug} (will prompt for folder) + + )} +

+
+ +
+ + {loadingAssets ? ( +
+ Loading saves & states from RomM... +
+ ) : ( +
+ {/* Server Saves */} +
+

+ RomM Server Saves ({remoteAssets?.saves.length ?? 0}) +

+ {!remoteAssets || remoteAssets.saves.length === 0 ? ( +
+ No saves stored on RomM for this game yet. +
+ ) : ( +
+ {remoteAssets.saves.map((s) => ( +
+
+
{s.file_name}
+
+ Slot: {s.slot || "manual"} • {formatBytes(s.file_size_bytes)} •{" "} + {new Date(s.updated_at).toLocaleString()} +
+
+ +
+ ))} +
+ )} +
+ + {/* Server States */} +
+

+ RomM Server Save States ({remoteAssets?.states.length ?? 0}) +

+ {!remoteAssets || remoteAssets.states.length === 0 ? ( +
+ No save states stored on RomM for this game yet. +
+ ) : ( +
+ {remoteAssets.states.map((st) => ( +
+
+
{st.file_name}
+
+ {formatBytes(st.file_size_bytes)} •{" "} + {new Date(st.updated_at).toLocaleString()} +
+
+ +
+ ))} +
+ )} +
+ + {/* Local Saves & States for this ROM */} +
+

+ Local Saves & States ({activeLocalItems.length}) +

+ {activeLocalItems.length === 0 ? ( +
+ No local saves matched to this game yet. +
+ ) : ( +
+ {activeLocalItems.map((item) => ( +
+
+
{item.fileName}
+
+ {item.isState ? "State" : `Save • ${item.slot}`} •{" "} + {formatBytes(item.sizeBytes)} • {item.localPath} +
+
+ +
+ ))} +
+ )} +
+
+ )} +
+
+ )} +
+ ); +}; diff --git a/src/components/OnboardingConnect.tsx b/src/components/OnboardingConnect.tsx new file mode 100644 index 0000000..45bc359 --- /dev/null +++ b/src/components/OnboardingConnect.tsx @@ -0,0 +1,350 @@ +import React, { useEffect, useRef, useState } from "react"; +import { + CheckCircle2, + ExternalLink, + Gamepad2, + KeyRound, + Loader2, + Lock, + Server, + Smartphone, +} from "lucide-react"; +import { api } from "../lib/tauri"; +import type { DeviceAuthInitResponse } from "../lib/types"; + +interface Props { + initialServerUrl: string; + initialDeviceName: string; + onConnected: () => Promise; +} + +type AuthTab = "device" | "token" | "password"; + +export const OnboardingConnect: React.FC = ({ + initialServerUrl, + initialDeviceName, + onConnected, +}) => { + const [serverUrl, setServerUrl] = useState(initialServerUrl || "https://"); + const [deviceName, setDeviceName] = useState(initialDeviceName); + const [tab, setTab] = useState("device"); + + const [pairCode, setPairCode] = useState(""); + const [rawToken, setRawToken] = useState(""); + const [username, setUsername] = useState(""); + const [password, setPassword] = useState(""); + + const [deviceAuth, setDeviceAuth] = useState(null); + const [loading, setLoading] = useState(false); + const [serverOk, setServerOk] = useState(null); + const [error, setError] = useState(null); + const pollRef = useRef(null); + + useEffect(() => { + return () => { + if (pollRef.current) window.clearInterval(pollRef.current); + }; + }, []); + + const handleTestServer = async () => { + setError(null); + setServerOk(null); + setLoading(true); + try { + await api.testServer(serverUrl); + setServerOk("Connected to RomM server!"); + } catch (e) { + setError(String(e)); + } finally { + setLoading(false); + } + }; + + const handleStartDeviceAuth = async () => { + setError(null); + setLoading(true); + try { + const init = await api.startDeviceAuth(serverUrl, deviceName); + setDeviceAuth(init); + const base = serverUrl.trim().replace(/\/+$/, ""); + const verifyUrl = init.verification_path_complete.startsWith("http") + ? init.verification_path_complete + : `${base}${init.verification_path_complete}`; + await api.openExternalUrl(verifyUrl).catch(() => {}); + + if (pollRef.current) window.clearInterval(pollRef.current); + const intervalMs = Math.max((init.interval || 5) * 1000, 2500); + pollRef.current = window.setInterval(async () => { + try { + const user = await api.pollDeviceAuth(serverUrl, init.device_code); + if (user) { + if (pollRef.current) window.clearInterval(pollRef.current); + setDeviceAuth(null); + await onConnected(); + } + } catch (err) { + if (pollRef.current) window.clearInterval(pollRef.current); + setDeviceAuth(null); + setError(String(err)); + } + }, intervalMs); + } catch (e) { + setError(String(e)); + } finally { + setLoading(false); + } + }; + + const handleTokenOrPair = async (e: React.FormEvent) => { + e.preventDefault(); + setError(null); + setLoading(true); + try { + if (pairCode.trim()) { + await api.exchangePairCode(serverUrl, pairCode.trim()); + } else if (rawToken.trim()) { + await api.connectWithToken(serverUrl, rawToken.trim()); + } else { + throw new Error("Enter either a pair code or an API token."); + } + await onConnected(); + } catch (err) { + setError(String(err)); + } finally { + setLoading(false); + } + }; + + const handlePasswordLogin = async (e: React.FormEvent) => { + e.preventDefault(); + setError(null); + setLoading(true); + try { + await api.loginWithPassword(serverUrl, username, password); + await onConnected(); + } catch (err) { + setError(String(err)); + } finally { + setLoading(false); + } + }; + + return ( +
+
+
+
+ +
+
+

RomM Companion

+

+ Sync saves, states & ROMs for standalone emulators with RomM 5.1.0 +

+
+
+ + {/* Server URL & Device Name */} +
+
+ +
+
+ + setServerUrl(e.target.value)} + placeholder="https://rom.example.com" + className="w-full pl-9 pr-3 py-2.5 bg-slate-950 border border-slate-800 rounded-lg text-sm focus:outline-none focus:border-indigo-500" + /> +
+ +
+ {serverOk && ( +

+ {serverOk} +

+ )} +
+ +
+ + setDeviceName(e.target.value)} + className="w-full px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-sm focus:outline-none focus:border-indigo-500" + /> +
+
+ + {/* Auth Method Tabs */} +
+ {( + [ + { id: "device", label: "Device Pairing", icon: Smartphone }, + { id: "token", label: "Pair Code / Token", icon: KeyRound }, + { id: "password", label: "Username", icon: Lock }, + ] as const + ).map((t) => { + const Icon = t.icon; + const active = tab === t.id; + return ( + + ); + })} +
+ + {tab === "device" && ( +
+ {!deviceAuth ? ( + <> +

+ Start passwordless device pairing via RomM 5.1.0. Your browser will open so you + can approve this machine in one click. +

+ + + ) : ( +
+

+ Approve this code in your RomM browser tab +

+
+ {deviceAuth.user_code} +
+
+ + Waiting for approval... +
+ +
+ )} +
+ )} + + {tab === "token" && ( +
+
+ + setPairCode(e.target.value)} + placeholder="e.g. ABCD-1234" + className="w-full px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-sm font-mono focus:outline-none focus:border-indigo-500" + /> +
+
— or —
+
+ + setRawToken(e.target.value)} + placeholder="Paste bearer token..." + className="w-full px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-sm font-mono focus:outline-none focus:border-indigo-500" + /> +
+ +
+ )} + + {tab === "password" && ( +
+
+ + setUsername(e.target.value)} + className="w-full px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-sm focus:outline-none focus:border-indigo-500" + /> +
+
+ + setPassword(e.target.value)} + className="w-full px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-sm focus:outline-none focus:border-indigo-500" + /> +
+ +
+ )} + + {error && ( +
+ {error} +
+ )} +
+
+ ); +}; diff --git a/src/components/SavesStatesView.tsx b/src/components/SavesStatesView.tsx new file mode 100644 index 0000000..0217dd7 --- /dev/null +++ b/src/components/SavesStatesView.tsx @@ -0,0 +1,382 @@ +import React, { useEffect, useState } from "react"; +import { + Archive, + CheckCircle2, + CloudUpload, + Folder, + History, + Link2, + Loader2, + RefreshCw, + Search, + Unlink, + X, +} from "lucide-react"; +import { api } from "../lib/tauri"; +import { + formatBytes, + type BackupEntry, + type DiscoveredSaveItem, + type SimpleRomSchema, +} from "../lib/types"; + +interface Props { + discoveredSaves: DiscoveredSaveItem[]; + onRefreshSaves: () => Promise; +} + +export const SavesStatesView: React.FC = ({ discoveredSaves, onRefreshSaves }) => { + const [subTab, setSubTab] = useState<"local" | "backups">("local"); + const [filter, setFilter] = useState<"all" | "matched" | "unmatched" | "states">("all"); + const [linkingItem, setLinkingItem] = useState(null); + const [romSearch, setRomSearch] = useState(""); + const [romResults, setRomResults] = useState([]); + const [slotInput, setSlotInput] = useState("default"); + + const [backups, setBackups] = useState([]); + const [toast, setToast] = useState(null); + const [uploadingPath, setUploadingPath] = useState(null); + + const handleUploadSingle = async (item: DiscoveredSaveItem) => { + if (!item.matchedRomId) return; + setUploadingPath(item.localPath); + setToast(null); + try { + await api.uploadSingleSave({ + localPath: item.localPath, + fileName: item.fileName, + romId: item.matchedRomId, + emulatorId: item.emulatorId, + slot: item.slot || "default", + isDirectory: item.isDirectory, + isState: item.isState, + }); + setToast(`Uploaded '${item.fileName}' to RomM!`); + await onRefreshSaves(); + } catch (e) { + setToast(`Upload failed: ${e}`); + } finally { + setUploadingPath(null); + } + }; + + useEffect(() => { + if (subTab === "backups") { + api.listBackups().then(setBackups).catch(console.error); + } + }, [subTab]); + + const filtered = discoveredSaves.filter((s) => { + if (filter === "matched") return s.matchedRomId !== null; + if (filter === "unmatched") return s.matchedRomId === null; + if (filter === "states") return s.isState; + return true; + }); + + const openLinker = async (item: DiscoveredSaveItem) => { + setLinkingItem(item); + setSlotInput(item.slot || "default"); + setRomSearch(""); + const page = await api.fetchRoms({ limit: 30, offset: 0 }); + setRomResults(page.items); + }; + + const searchRomsForLink = async (e: React.FormEvent) => { + e.preventDefault(); + const page = await api.fetchRoms({ searchTerm: romSearch, limit: 30, offset: 0 }); + setRomResults(page.items); + }; + + const handleLink = async (rom: SimpleRomSchema) => { + if (!linkingItem) return; + await api.linkSaveToRom({ + localPath: linkingItem.localPath, + romId: rom.id, + romName: rom.name || rom.fs_name_no_ext, + emulatorId: linkingItem.emulatorId, + slot: slotInput || "default", + isState: linkingItem.isState, + }); + setLinkingItem(null); + await onRefreshSaves(); + }; + + const handleUnlink = async (localPath: string) => { + await api.unlinkSave(localPath); + await onRefreshSaves(); + }; + + const handleRestoreBackup = async (b: BackupEntry) => { + const destFolder = await api.pickFolder("Select Target Folder to Restore Backup Into"); + if (!destFolder) return; + const isZip = b.fileName.endsWith(".zip"); + const targetPath = `${destFolder}/${b.fileName.replace(/^\d{8}T\d{6}Z_/, "").replace(/\.zip$/, "")}`; + try { + await api.restoreBackup(b.backupPath, targetPath, isZip); + setToast(`Restored backup to ${targetPath}`); + } catch (e) { + setToast(`Restore failed: ${e}`); + } + }; + + return ( +
+
+
+

Saves, States & Backups

+

+ Inspect matched save files & save states, manually link Title ID folders, or restore + automatic backups. +

+
+ +
+
+ + +
+ +
+
+ + {toast && ( +
+ {toast} +
+ )} + + {subTab === "local" ? ( + <> +
+ {(["all", "matched", "unmatched", "states"] as const).map((f) => ( + + ))} +
+ +
+ {filtered.length === 0 ? ( +
+ No saves discovered matching this filter. Make sure at least one emulator rule is + enabled in Emulators. +
+ ) : ( + filtered.map((item) => ( +
+
+
+ {item.isDirectory ? ( + + ) : ( + + )} + {item.fileName} + + {item.isState ? "State" : `Save • ${item.slot}`} + +
+
+ {item.emulatorName} • {formatBytes(item.sizeBytes)} • {item.localPath} +
+
+ +
+ {item.matchedRomId ? ( +
+
+ + {item.matchedRomName} +
+
+ {item.matchedPlatform} • {item.matchSource} ( + {Math.round(item.matchConfidence * 100)}%) +
+
+ ) : ( + Unmatched + )} + + {item.matchedRomId && ( + + )} + + + {item.matchSource === "manual" && ( + + )} +
+
+ )) + )} +
+ + ) : ( +
+ {backups.length === 0 ? ( +
+ No local backups yet. Backups are automatically created before any server save + overwrites a local file. +
+ ) : ( + backups.map((b) => ( +
+
+
{b.fileName}
+
+ ROM #{b.romId} • {formatBytes(b.sizeBytes)} •{" "} + {new Date(b.createdAt).toLocaleString()} +
+
+ +
+ )) + )} +
+ )} + + {/* Manual Link Modal */} + {linkingItem && ( +
+
+
+
+

Link Save to RomM Game

+

+ {linkingItem.fileName} +

+
+ +
+ + {!linkingItem.isState && ( +
+ + setSlotInput(e.target.value)} + className="w-full px-3 py-1.5 bg-slate-950 border border-slate-800 rounded-lg text-sm" + /> +
+ )} + +
+
+ + setRomSearch(e.target.value)} + placeholder="Search RomM games..." + className="w-full pl-9 pr-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-sm" + /> +
+ +
+ +
+ {romResults.map((rom) => ( + + ))} +
+
+
+ )} +
+ ); +}; diff --git a/src/components/SettingsView.tsx b/src/components/SettingsView.tsx new file mode 100644 index 0000000..1f00a0a --- /dev/null +++ b/src/components/SettingsView.tsx @@ -0,0 +1,171 @@ +import React, { useState } from "react"; +import { FolderOpen, LogOut, Save } from "lucide-react"; +import { api } from "../lib/tauri"; +import type { AppStateSnapshot, WatcherSettings } from "../lib/types"; + +interface Props { + appState: AppStateSnapshot; + onRefreshState: () => Promise; + onDisconnect: () => Promise; +} + +export const SettingsView: React.FC = ({ + appState, + onRefreshState, + onDisconnect, +}) => { + const [settings, setSettings] = useState(appState.settings); + const [deviceName, setDeviceName] = useState(appState.deviceName); + const [savedMsg, setSavedMsg] = useState(false); + + const handleSave = async (e: React.FormEvent) => { + e.preventDefault(); + await api.saveSettings(settings, deviceName); + await onRefreshState(); + setSavedMsg(true); + setTimeout(() => setSavedMsg(false), 2500); + }; + + return ( +
+
+

Settings

+

+ Configure background watching, backup retention, tray behavior, and device identity. +

+
+ +
+
+ + setDeviceName(e.target.value)} + className="w-full px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-sm" + /> +

+ RomM Device ID: {appState.deviceId || "Not registered"} +

+
+ +
+ + + + + +
+ +
+
+ + + setSettings({ ...settings, debounceSeconds: Number(e.target.value) || 5 }) + } + className="w-full px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-sm" + /> +
+
+ + + setSettings({ ...settings, maxBackupsPerSave: Number(e.target.value) || 10 }) + } + className="w-full px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-sm" + /> +
+
+ +
+ +
+ + setSettings({ ...settings, defaultRomDownloadDir: e.target.value || null }) + } + placeholder="Ask every time" + className="flex-1 px-3 py-2 bg-slate-950 border border-slate-800 rounded-lg text-xs font-mono" + /> + +
+
+ +
+ + {savedMsg && Saved!} +
+
+ +
+
+
Disconnect from RomM
+
+ Clears the saved auth token from this machine. Local emulator rules are kept. +
+
+ +
+
+ ); +}; diff --git a/src/index.css b/src/index.css new file mode 100644 index 0000000..f46ab79 --- /dev/null +++ b/src/index.css @@ -0,0 +1,24 @@ +@import "tailwindcss"; + +@layer base { + body { + font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif; + background-color: #020617; + color: #f1f5f9; + } + + ::-webkit-scrollbar { + width: 8px; + height: 8px; + } + ::-webkit-scrollbar-track { + background: #0f172a; + } + ::-webkit-scrollbar-thumb { + background: #334155; + border-radius: 9999px; + } + ::-webkit-scrollbar-thumb:hover { + background: #475569; + } +} diff --git a/src/lib/tauri.ts b/src/lib/tauri.ts new file mode 100644 index 0000000..2101383 --- /dev/null +++ b/src/lib/tauri.ts @@ -0,0 +1,137 @@ +import { invoke } from "@tauri-apps/api/core"; +import { open } from "@tauri-apps/plugin-dialog"; +import { openUrl } from "@tauri-apps/plugin-opener"; +import type { + AppStateSnapshot, + BackupEntry, + DetectedNextUiVolume, + DeviceAuthInitResponse, + DiscoveredSaveItem, + EmulatorPresetInfo, + EmulatorRule, + LocalRomScanResult, + NextUiCardInspection, + PlatformSchema, + RemoteSavesAndStates, + RomPageResponse, + SyncRunSummary, + UserSchema, + WatcherSettings, +} from "./types"; + +export const api = { + getAppState: () => invoke("get_app_state"), + testServer: (serverUrl: string) => invoke("test_server", { serverUrl }), + startDeviceAuth: (serverUrl: string, deviceName: string) => + invoke("start_device_auth", { serverUrl, deviceName }), + pollDeviceAuth: (serverUrl: string, deviceCode: string) => + invoke("poll_device_auth", { serverUrl, deviceCode }), + exchangePairCode: (serverUrl: string, code: string) => + invoke("exchange_pair_code", { serverUrl, code }), + connectWithToken: (serverUrl: string, token: string) => + invoke("connect_with_token", { serverUrl, token }), + loginWithPassword: (serverUrl: string, username: string, password: string) => + invoke("login_with_password", { serverUrl, username, password }), + disconnect: () => invoke("disconnect"), + + getEmulatorPresets: () => invoke("get_emulator_presets"), + autoPopulateDetectedEmulators: () => + invoke("auto_populate_detected_emulators"), + upsertEmulatorRule: (rule: EmulatorRule) => + invoke("upsert_emulator_rule", { rule }), + deleteEmulatorRule: (emulatorId: string) => + invoke("delete_emulator_rule", { emulatorId }), + + fetchPlatforms: () => invoke("fetch_platforms"), + fetchRoms: (params: { + platformId?: number | null; + searchTerm?: string | null; + limit?: number; + offset?: number; + }) => invoke("fetch_roms", params), + refreshRomCache: () => invoke("refresh_rom_cache"), + scanLocalRomFolder: (folderPath: string, useHashLookup: boolean) => + invoke("scan_local_rom_folder", { folderPath, useHashLookup }), + downloadRomToFolder: (params: { + romId: number; + fileName: string; + destFolder?: string | null; + platformSlug?: string | null; + platformFsSlug?: string | null; + }) => invoke("download_rom_to_folder", params), + + fetchRemoteSavesAndStates: (romId?: number | null) => + invoke("fetch_remote_saves_and_states", { romId: romId ?? null }), + downloadSingleSave: (params: { + saveId: number; + romId: number; + fileName: string; + platformSlug: string; + platformFsSlug?: string | null; + emulatorHint?: string | null; + destOverride?: string | null; + }) => invoke("download_single_save", params), + downloadSingleState: (params: { + stateId: number; + romId: number; + fileName: string; + platformSlug: string; + platformFsSlug?: string | null; + emulatorHint?: string | null; + destOverride?: string | null; + }) => invoke("download_single_state", params), + uploadSingleSave: (params: { + localPath: string; + fileName: string; + romId: number; + emulatorId: string; + slot: string; + isDirectory: boolean; + isState: boolean; + }) => invoke("upload_single_save", params), + + discoverLocalSaves: () => invoke("discover_local_saves"), + linkSaveToRom: (params: { + localPath: string; + romId: number; + romName: string; + emulatorId: string; + slot: string; + isState: boolean; + }) => invoke("link_save_to_rom", params), + unlinkSave: (localPath: string) => invoke("unlink_save", { localPath }), + + runFullSync: () => invoke("run_full_sync"), + resolveSyncConflict: (conflictId: string, resolution: "keep_local" | "keep_server") => + invoke("resolve_sync_conflict", { conflictId, resolution }), + + listBackups: () => invoke("list_backups"), + restoreBackup: (backupPath: string, targetPath: string, isDirectory: boolean) => + invoke("restore_backup", { backupPath, targetPath, isDirectory }), + + saveSettings: (settings: WatcherSettings, deviceName?: string) => + invoke("save_settings", { settings, deviceName }), + clearSyncLogs: () => invoke("clear_sync_logs"), + restartWatcher: () => invoke("restart_watcher"), + + detectNextUiVolumes: () => invoke("detect_nextui_volumes"), + inspectNextUiCard: (sdRoot: string) => + invoke("inspect_nextui_card", { sdRoot }), + renameNextUiHandheld: (sdRoot: string, deviceName: string) => + invoke("rename_nextui_handheld", { sdRoot, deviceName }), + syncNextUiCard: (sdRoot: string, syncStates: boolean) => + invoke("sync_nextui_card", { sdRoot, syncStates }), + downloadRomToNextUi: (params: { + sdRoot: string; + romId: number; + fileName: string; + platformSlug: string; + platformDisplayName: string; + }) => invoke("download_rom_to_nextui", params), + + pickFolder: async (title = "Select Folder"): Promise => { + const selected = await open({ directory: true, multiple: false, title }); + return typeof selected === "string" ? selected : null; + }, + openExternalUrl: (url: string) => openUrl(url), +}; diff --git a/src/lib/types.ts b/src/lib/types.ts new file mode 100644 index 0000000..feddfcc --- /dev/null +++ b/src/lib/types.ts @@ -0,0 +1,253 @@ +export type SaveStructure = "file_per_game" | "folder_per_game" | "memory_card"; + +export interface EmulatorRule { + id: string; + name: string; + platformSlugs: string[]; + saveDir: string; + stateDir: string | null; + romDir: string | null; + saveExtensions: string[]; + stateExtensions: string[]; + structure: SaveStructure; + folderDepth: number; + enabled: boolean; + isCustom: boolean; + syncStates: boolean; + defaultSlot: string; +} + +export interface EmulatorPresetInfo { + id: string; + name: string; + category: "console" | "handheld"; + platformSlugs: string[]; + detected: boolean; + detectedSaveDir: string | null; + detectedStateDir: string | null; + defaultSaveDir: string; + defaultStateDir: string | null; + saveExtensions: string[]; + stateExtensions: string[]; + structure: SaveStructure; + folderDepth: number; + notes: string; +} + +export interface WatcherSettings { + enabled: boolean; + debounceSeconds: number; + autoSyncOnChange: boolean; + maxBackupsPerSave: number; + minimizeToTray: boolean; + defaultRomDownloadDir: string | null; +} + +export interface SyncConflictItem { + id: string; + romId: number; + romName: string; + saveId: number | null; + localPath: string; + fileName: string; + isDirectory: boolean; + emulatorId: string; + slot: string; + localUpdatedAt: string; + serverUpdatedAt: string | null; + reason: string; +} + +export interface SyncLogEntry { + id: string; + timestamp: string; + level: "info" | "success" | "warning" | "error"; + action: string; + message: string; + romId: number | null; + filePath: string | null; +} + +export interface AppStateSnapshot { + connected: boolean; + serverUrl: string; + username: string | null; + deviceId: string | null; + deviceName: string; + emulators: EmulatorRule[]; + settings: WatcherSettings; + watcherActive: boolean; + watchedPaths: string[]; + cachedRomCount: number; + conflicts: SyncConflictItem[]; + logs: SyncLogEntry[]; +} + +export interface DeviceAuthInitResponse { + device_code: string; + user_code: string; + verification_path: string; + verification_path_complete: string; + expires_in: number; + interval: number; +} + +export interface UserSchema { + id: number; + username: string; + email: string | null; +} + +export interface PlatformSchema { + id: number; + slug: string; + fs_slug: string; + name: string; + display_name: string; + rom_count: number; + url_logo: string | null; +} + +export interface SimpleRomSchema { + id: number; + platform_id: number; + platform_slug: string; + platform_fs_slug: string; + platform_display_name: string; + fs_name: string; + fs_name_no_tags: string; + fs_name_no_ext: string; + fs_extension: string; + fs_size_bytes: number; + name: string | null; + url_cover: string | null; + path_cover_small: string | null; + crc_hash: string | null; + md5_hash: string | null; + sha1_hash: string | null; + regions: string[]; +} + +export interface RomPageResponse { + items: SimpleRomSchema[]; + total: number; + limit: number; + offset: number; +} + +export interface DiscoveredSaveItem { + localPath: string; + fileName: string; + emulatorId: string; + emulatorName: string; + isDirectory: boolean; + isState: boolean; + sizeBytes: number; + updatedAt: string; + slot: string; + matchedRomId: number | null; + matchedRomName: string | null; + matchedPlatform: string | null; + matchConfidence: number; + matchSource: "manual" | "exact" | "fuzzy" | "unmatched"; +} + +export interface LocalRomScanResult { + localPath: string; + fileName: string; + sizeBytes: number; + crc32: string | null; + md5: string | null; + sha1: string | null; + matchedRomId: number | null; + matchedRomName: string | null; + matchedPlatform: string | null; + matchSource: "hash" | "filename" | "unmatched"; +} + +export interface SyncRunSummary { + sessionId: number | null; + uploadedSaves: number; + downloadedSaves: number; + uploadedStates: number; + upToDate: number; + conflicts: SyncConflictItem[]; + errors: string[]; +} + +export interface BackupEntry { + backupPath: string; + romId: string; + fileName: string; + createdAt: string; + sizeBytes: number; +} + +export interface RemoteSaveSchema { + id: number; + rom_id: number; + file_name: string; + file_size_bytes: number; + created_at: string; + updated_at: string; + emulator: string | null; + slot: string | null; + content_hash: string | null; +} + +export interface RemoteStateSchema { + id: number; + rom_id: number; + file_name: string; + file_size_bytes: number; + created_at: string; + updated_at: string; + emulator: string | null; +} + +export interface RemoteSavesAndStates { + saves: RemoteSaveSchema[]; + states: RemoteStateSchema[]; +} + +export interface DetectedNextUiVolume { + path: string; + label: string; + detectedPlatform: string; + deviceLabel: string; + systemTags: string[]; + hasSaves: boolean; + hasRoms: boolean; +} + +export interface NextUiSdSaveItem { + localPath: string; + fileName: string; + systemTag: string; + isDirectory: boolean; + isState: boolean; + sizeBytes: number; + updatedAt: string; + slot: string; + matchedRomId: number | null; + matchedRomName: string | null; + matchedPlatform: string | null; + matchConfidence: number; + matchSource: "manual" | "exact" | "fuzzy" | "unmatched"; +} + +export interface NextUiCardInspection { + sdRoot: string; + detectedPlatform: string; + deviceName: string; + handheldDeviceId: string | null; + systemTags: string[]; + saves: NextUiSdSaveItem[]; +} + +export function formatBytes(bytes: number): string { + if (bytes === 0) return "0 B"; + const units = ["B", "KB", "MB", "GB", "TB"]; + const i = Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), units.length - 1); + return `${(bytes / Math.pow(1024, i)).toFixed(i === 0 ? 0 : 1)} ${units[i]}`; +} diff --git a/src/main.tsx b/src/main.tsx new file mode 100644 index 0000000..9b67590 --- /dev/null +++ b/src/main.tsx @@ -0,0 +1,10 @@ +import React from "react"; +import ReactDOM from "react-dom/client"; +import App from "./App"; +import "./index.css"; + +ReactDOM.createRoot(document.getElementById("root")!).render( + + + +); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..c1183c9 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "ES2021", + "useDefineForClassFields": true, + "lib": ["ES2021", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + "strict": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..439ae30 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,25 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; +import tailwindcss from "@tailwindcss/vite"; + +const host = process.env.TAURI_DEV_HOST; + +export default defineConfig({ + plugins: [react(), tailwindcss()], + clearScreen: false, + server: { + port: 1420, + strictPort: true, + host: host || false, + hmr: host + ? { + protocol: "ws", + host, + port: 1421, + } + : undefined, + watch: { + ignored: ["**/src-tauri/**"], + }, + }, +});