From 450d51db0eb8efb7dca0c0587c9230df5535a8fc Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 15:57:58 -0800 Subject: [PATCH 1/4] hub: count stray HTTP requests and which limit fired The 404s in Fly's status chart are scanners and crawlers that found the hub's name (certificate logs list it): Fly's proxy log shows `/` and `/phpinfo`, and none of the apps or pages asks for anything but /ws. The hub now counts every request that is not a WebSocket to /ws or a health check in hub_http_strays_total by a fixed class of its path (root, favicon, robots, well_known, ws_not_websocket, other), never the path, query or address, and answers /robots.txt with Disallow: / so well-behaved crawlers stop. 404s and the /ws refusals keep their old answers. /ws/ (a hub address typed with a slash) is /ws. hub_limited_total{limit} says which limit refused something (join rate, a guest's or a client's signals, room clients, connections, rooms), next to the rate_limited error the client gets, and hub_rooms_closed_total counts rooms their host closed, so opened = closed + expired + open. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- engine/crates/ps5upload-hub/PROTOCOL.md | 14 +- engine/crates/ps5upload-hub/deploy/Caddyfile | 5 +- engine/crates/ps5upload-hub/deploy/FLY.md | 19 +- engine/crates/ps5upload-hub/fly.toml | 3 +- engine/crates/ps5upload-hub/src/hub.rs | 64 ++++++- engine/crates/ps5upload-hub/src/lib.rs | 5 +- engine/crates/ps5upload-hub/src/metrics.rs | 186 ++++++++++++++++++- engine/crates/ps5upload-hub/tests/hub.rs | 148 +++++++++++++++ 8 files changed, 426 insertions(+), 18 deletions(-) diff --git a/engine/crates/ps5upload-hub/PROTOCOL.md b/engine/crates/ps5upload-hub/PROTOCOL.md index ac414ca1e..748751130 100644 --- a/engine/crates/ps5upload-hub/PROTOCOL.md +++ b/engine/crates/ps5upload-hub/PROTOCOL.md @@ -202,10 +202,16 @@ IPv6. It ignores every other message and does no TURN. ## Other endpoints - `GET /health`: `ok`. -- `GET /metrics`: Prometheus text, counts only (rooms, guests, connections, hosts, reclaims, - joins, signals, dropped host signals, expired rooms and guests, STUN requests, errors by - kind). Kept private: localhost only behind Caddy, or a separate private port - (`HUB_METRICS_LISTEN`) on Fly. +- `/ws/` is `/ws`. A request to `/ws` that is not a WebSocket upgrade gets 400, 405 or 426. +- `GET /robots.txt`: `User-agent: *` / `Disallow: /`. +- Anything else: 404. The hub's name is public, so scanners and crawlers ask for `/`, `/.env` + and the like all day; these are counted by a fixed class of the path (`root`, `favicon`, + `robots`, `well_known`, `ws_not_websocket`, `other`) and never logged. +- `GET /metrics`: Prometheus text, counts only (rooms, guests, connections, rooms opened, + reclaimed, closed and expired, joins, signals, dropped host signals, expired guests, STUN + requests, errors by kind, refusals by the limit that fired, stray HTTP requests by class). + Kept private: localhost only behind Caddy, or a separate private port (`HUB_METRICS_LISTEN`) + on Fly. ## Privacy diff --git a/engine/crates/ps5upload-hub/deploy/Caddyfile b/engine/crates/ps5upload-hub/deploy/Caddyfile index dd37477e3..e6c7875af 100644 --- a/engine/crates/ps5upload-hub/deploy/Caddyfile +++ b/engine/crates/ps5upload-hub/deploy/Caddyfile @@ -11,12 +11,13 @@ hub.phantomptr.com { path /metrics not remote_ip 127.0.0.1 ::1 } - @hub path /ws /health /metrics + @hub path /ws /ws/ /health /metrics /robots.txt route { # /metrics only from the server itself. respond @metrics_remote 403 - # WebSocket upgrades pass through reverse_proxy as they are. + # WebSocket upgrades pass through reverse_proxy as they are. Other paths get Caddy's 404 + # (the hub would count them, but Caddy never passes them on). reverse_proxy @hub 127.0.0.1:8787 respond 404 } diff --git a/engine/crates/ps5upload-hub/deploy/FLY.md b/engine/crates/ps5upload-hub/deploy/FLY.md index 516fa373b..a2ca3dd34 100644 --- a/engine/crates/ps5upload-hub/deploy/FLY.md +++ b/engine/crates/ps5upload-hub/deploy/FLY.md @@ -79,7 +79,7 @@ fly logs --no-tail # recent ``` The hub logs only counts and error kinds, never addresses, room ids or payloads, and only a few -lines: `started`, `stopped`, and an hourly `hub: summary rooms=... errors=... refused=...` when +lines: `started`, `stopped`, and an hourly `hub: summary rooms=... errors=... refused=... strays=...` when something happened in that hour (an idle hub logs nothing). Bad frames and refusals are counted in `/metrics`, not logged one by one. @@ -106,6 +106,23 @@ fly proxy 9091 # leave running, then in another terminal: curl -s http://127.0.0.1:9091/metrics ``` +Reading it: + +- `hub_hosts_total` counts rooms opened, not connections: every Play Together internet invite, + phone link and Share opens one. A host that reconnects within 2 minutes takes its room back + (`hub_reclaims_total`); rooms go when their host closes them (`hub_rooms_closed_total`) or + stays away 2 minutes (`hub_rooms_expired_total`: a computer asleep, an app quit). +- `hub_limited_total{limit=...}` says which limit refused something, beside the + `hub_errors_total{kind="rate_limited"}` a client got. +- `hub_errors_total{kind="no_room"}` is a guest opening a link whose room is gone (an old + invite, a host that closed Play Together or is asleep). The page tells them to ask for a new link. +- `hub_http_strays_total{class=...}`: plain HTTP requests that were not a WebSocket to `/ws`, + by class of path only. These are the 404s in Fly's HTTP status chart: the hub's name is in + public certificate logs, so scanners and crawlers ask for `/`, `/.env`, `/phpinfo` and so on + all day (Fly's proxy logs show some as `client problem: invalid authority`, which it answers + itself). The apps and the pages only ever open `/ws`. `/robots.txt` tells crawlers to stay + away; nothing else is worth doing about them. + ## Settings Limits and the rest are `HUB_*` variables (see `src/config.rs` and `deploy/ps5upload-hub.env`). diff --git a/engine/crates/ps5upload-hub/fly.toml b/engine/crates/ps5upload-hub/fly.toml index d2d8ca84d..0823d6e99 100644 --- a/engine/crates/ps5upload-hub/fly.toml +++ b/engine/crates/ps5upload-hub/fly.toml @@ -17,7 +17,8 @@ kill_timeout = "10s" [env] HUB_HTTP_LISTEN = "0.0.0.0:8080" # /metrics on its own port, reachable only over Fly's private network (Fly scrapes it; the - # owner reads it with `fly proxy 9091`). The public port serves /ws and /health only. + # owner reads it with `fly proxy 9091`). The public port serves /ws, /health and + # /robots.txt; everything else is a 404 counted in hub_http_strays_total (FLY.md, Metrics). HUB_METRICS_LISTEN = "[::]:9091" # Fly's proxy is the only way in from the internet and it puts the client's address in # Fly-Client-IP. The proxy's own addresses are not fixed, so every peer is trusted for that diff --git a/engine/crates/ps5upload-hub/src/hub.rs b/engine/crates/ps5upload-hub/src/hub.rs index 8ff30caa8..7330dd4b3 100644 --- a/engine/crates/ps5upload-hub/src/hub.rs +++ b/engine/crates/ps5upload-hub/src/hub.rs @@ -10,11 +10,12 @@ use std::sync::atomic::Ordering; use std::sync::{Arc, Mutex}; use std::time::{Duration, Instant}; +use axum::extract::ws::rejection::WebSocketUpgradeRejection; use axum::extract::ws::{CloseFrame, Message, WebSocket, WebSocketUpgrade}; use axum::extract::{ConnectInfo, State as AxState}; -use axum::http::{header, HeaderMap, StatusCode}; +use axum::http::{header, HeaderMap, StatusCode, Uri}; use axum::response::{IntoResponse, Response}; -use axum::routing::get; +use axum::routing::{any, get}; use axum::Router; use base64::Engine as _; use futures_util::{SinkExt, StreamExt}; @@ -27,7 +28,7 @@ use tokio::sync::{mpsc, Notify}; use crate::config::Config; use crate::limits::{canonical_ip, v6_site, IpKey, RateTable, Window}; -use crate::metrics::{ErrorKind, Gauges, Metrics}; +use crate::metrics::{ErrorKind, Gauges, Limit, Metrics, Stray}; use crate::{Field, Shared}; pub const PROTOCOL_VERSION: u64 = 1; @@ -183,16 +184,44 @@ pub(crate) fn gauges(shared: &Shared) -> Gauges { } } +/// What `/robots.txt` says: nothing here is for crawlers. +pub const ROBOTS_TXT: &str = "User-agent: *\nDisallow: /\n"; + +/// The public routes. `/ws/` is `/ws` (a hub address typed with a slash at the end). Everything +/// else answers 404 and is counted by the class of its path ([`Stray`]), never logged: the hub's +/// name is public (certificate logs list it), so scanners and crawlers ask for `/`, `/.env` and +/// the like all day. `/robots.txt` tells well-behaved crawlers to stay away. pub(crate) fn router(shared: Arc, with_metrics: bool) -> Router { let r = Router::new() - .route("/ws", get(ws_handler)) - .route("/health", get(|| async { "ok\n" })); + // Every method reaches the handler, so a request that is not a WebSocket upgrade is + // counted; it gets the same answer as before (405, 400 or 426). + .route("/ws", any(ws_handler)) + .route("/ws/", any(ws_handler)) + .route("/health", get(|| async { "ok\n" })) + .route("/robots.txt", get(robots_handler)); let r = if with_metrics { r.route("/metrics", get(metrics_handler)) } else { r }; - r.with_state(shared) + r.fallback(not_found).with_state(shared) +} + +async fn robots_handler(AxState(shared): AxState>) -> Response { + shared.metrics.stray(Stray::Robots); + ( + [ + (header::CONTENT_TYPE, "text/plain; charset=utf-8"), + (header::CACHE_CONTROL, "public, max-age=86400"), + ], + ROBOTS_TXT, + ) + .into_response() +} + +async fn not_found(AxState(shared): AxState>, uri: Uri) -> Response { + shared.metrics.stray(Stray::of_path(uri.path())); + (StatusCode::NOT_FOUND, "not found\n").into_response() } /// The private metrics listener's routes. @@ -231,8 +260,15 @@ async fn ws_handler( AxState(shared): AxState>, ConnectInfo(peer): ConnectInfo, headers: HeaderMap, - ws: WebSocketUpgrade, + ws: Result, ) -> Response { + let ws = match ws { + Ok(ws) => ws, + Err(rejection) => { + shared.metrics.stray(Stray::WsNotWebSocket); + return rejection.into_response(); + } + }; if let Some(origin) = headers.get(header::ORIGIN) { let ok = origin .to_str() @@ -276,16 +312,20 @@ impl ConnSlot { fn take(shared: &Arc, ip: IpKey, site: Option) -> Result { let cfg = &shared.config; let mut st = shared.state.lock().unwrap_or_else(|e| e.into_inner()); + let m = &shared.metrics; if shared.connections.load(Ordering::Relaxed) >= cfg.max_connections { + m.limited(Limit::Connections); return Err(ErrorKind::ServerFull); } // Both limits are checked before either count moves, so a refusal leaves no entry. if st.conns_per_ip.get(&ip).copied().unwrap_or(0) >= cfg.max_connections_per_ip { + m.limited(Limit::ConnectionsPerClient); return Err(ErrorKind::TooManyConnections); } if let Some(site) = site { let open = st.conns_per_v6_site.get(&site).copied().unwrap_or(0); if open >= cfg.max_connections_per_v6_site { + m.limited(Limit::ConnectionsPerV6Site); return Err(ErrorKind::TooManyConnections); } *st.conns_per_v6_site.entry(site).or_insert(0) += 1; @@ -631,10 +671,12 @@ fn on_host( Metrics::inc(&shared.metrics.reclaims); } else { if st.rooms.len() >= cfg.max_rooms { + shared.metrics.limited(Limit::Rooms); return Err(ErrorKind::ServerFull); } let owned = st.rooms_per_ip.get(&ip).copied().unwrap_or(0); if owned >= cfg.max_rooms_per_ip { + shared.metrics.limited(Limit::RoomsPerClient); return Err(ErrorKind::TooManyRooms); } *st.rooms_per_ip.entry(ip).or_insert(0) += 1; @@ -673,6 +715,7 @@ fn on_join( let mut st = shared.state.lock().unwrap_or_else(|e| e.into_inner()); // Every attempt counts, found or not: this is what makes guessing room ids pointless. if !st.joins.hit(ip, now, cfg.rate_window, cfg.max_joins_per_ip) { + shared.metrics.limited(Limit::JoinRate); return Err(ErrorKind::RateLimited); } let room_id = str_field(msg, "room")?.unwrap_or_default(); @@ -701,6 +744,7 @@ fn on_join( room.guest_clients .retain(|_, w| !w.expired(now, cfg.rate_window)); if room.guest_clients.len() >= cap { + shared.metrics.limited(Limit::RoomClients); return Err(ErrorKind::RateLimited); } } @@ -709,6 +753,7 @@ fn on_join( .entry(ip) .or_insert_with(|| Window::new(now)); if budget.used_up(now, cfg.rate_window, cfg.max_signals_per_guest_client) { + shared.metrics.limited(Limit::ClientBudget); return Err(ErrorKind::RateLimited); } let gid = loop { @@ -767,6 +812,7 @@ fn on_signal(shared: &Shared, role: &mut Role, msg: &Msg) -> Result Result Result Result { if let Some(r) = st.remove_room(&room) { + Metrics::inc(&shared.metrics.rooms_closed); for g in r.guests.values() { close_guest(&g.peer, &shared.metrics); } @@ -945,6 +994,7 @@ pub(crate) async fn sweeper(shared: Arc, stun_table: Arc &'static str { + match self { + Limit::JoinRate => "join_rate", + Limit::RoomClients => "room_clients", + Limit::ClientBudget => "client_budget", + Limit::GuestSignals => "guest_signals", + Limit::ClientSignals => "client_signals", + Limit::HostSignals => "host_signals", + Limit::ConnectionsPerClient => "connections_per_client", + Limit::ConnectionsPerV6Site => "connections_per_v6_site", + Limit::Connections => "connections", + Limit::Rooms => "rooms", + Limit::RoomsPerClient => "rooms_per_client", + } + } + + fn index(self) -> usize { + Self::ALL + .iter() + .position(|k| *k == self) + .expect("every limit is in ALL") + } +} + +/// A plain HTTP request that was not a WebSocket to `/ws` or a health check, by a fixed class of +/// its path (`hub_http_strays_total{class=...}`). Only the class is kept: never the path, its +/// query, or who asked. The apps and pages only ever open `/ws`; these are scanners and crawlers +/// that found the name (certificate transparency logs publish it). +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Stray { + /// `/` (404). + Root, + /// `/favicon.ico` (404). + Favicon, + /// `/robots.txt` (answered: 200, everything disallowed). + Robots, + /// `/.well-known/...` (404). + WellKnown, + /// `/ws` that is not a WebSocket upgrade: another method, or the upgrade headers missing. + /// Answered as before (405, 400 or 426). + WsNotWebSocket, + /// Anything else (404). + Other, +} + +impl Stray { + pub const ALL: [Stray; 6] = [ + Stray::Root, + Stray::Favicon, + Stray::Robots, + Stray::WellKnown, + Stray::WsNotWebSocket, + Stray::Other, + ]; + + pub fn as_str(self) -> &'static str { + match self { + Stray::Root => "root", + Stray::Favicon => "favicon", + Stray::Robots => "robots", + Stray::WellKnown => "well_known", + Stray::WsNotWebSocket => "ws_not_websocket", + Stray::Other => "other", + } + } + + /// The class of a path nothing serves. + pub fn of_path(path: &str) -> Stray { + match path { + "/" | "" => Stray::Root, + "/favicon.ico" => Stray::Favicon, + "/robots.txt" => Stray::Robots, + p if p.starts_with("/.well-known/") => Stray::WellKnown, + _ => Stray::Other, + } + } + + fn index(self) -> usize { + Self::ALL + .iter() + .position(|k| *k == self) + .expect("every class is in ALL") + } +} + #[derive(Default)] pub struct Metrics { pub hosts: AtomicU64, @@ -118,11 +246,15 @@ pub struct Metrics { pub signals: AtomicU64, pub host_signals_dropped: AtomicU64, pub rooms_expired: AtomicU64, + /// Rooms their host closed (`leave`). Rooms opened = closed + expired + those still open. + pub rooms_closed: AtomicU64, pub guests_expired: AtomicU64, pub stun_requests: AtomicU64, pub stun_ignored: AtomicU64, pub stun_limited: AtomicU64, errors: [AtomicU64; ErrorKind::ALL.len()], + limited: [AtomicU64; Limit::ALL.len()], + strays: [AtomicU64; Stray::ALL.len()], } /// The live numbers `/metrics` reports next to the counters. @@ -146,6 +278,26 @@ impl Metrics { self.errors.iter().map(|e| e.load(Ordering::Relaxed)).sum() } + pub fn limited(&self, limit: Limit) { + self.limited[limit.index()].fetch_add(1, Ordering::Relaxed); + } + + pub fn limited_by(&self, limit: Limit) -> u64 { + self.limited[limit.index()].load(Ordering::Relaxed) + } + + pub fn stray(&self, class: Stray) { + self.strays[class.index()].fetch_add(1, Ordering::Relaxed); + } + + pub fn strays(&self, class: Stray) -> u64 { + self.strays[class.index()].load(Ordering::Relaxed) + } + + pub fn strays_total(&self) -> u64 { + self.strays.iter().map(|e| e.load(Ordering::Relaxed)).sum() + } + /// Requests refused by a limit (rate, size of the hub, rooms or connections per client), and /// host signals dropped by the host's. pub fn refused_total(&self) -> u64 { @@ -163,7 +315,7 @@ impl Metrics { } /// A number that grows whenever any counter does: the summary skips an interval in which it - /// did not. + /// did not. Strays are left out: scanners alone do not make an idle hub log. pub fn activity(&self) -> u64 { [ &self.hosts, @@ -172,6 +324,7 @@ impl Metrics { &self.signals, &self.host_signals_dropped, &self.rooms_expired, + &self.rooms_closed, &self.guests_expired, &self.stun_requests, &self.stun_ignored, @@ -230,6 +383,11 @@ impl Metrics { "Rooms removed after their host stayed away.", &self.rooms_expired, ); + counter( + "hub_rooms_closed_total", + "Rooms their host closed (leave).", + &self.rooms_closed, + ); counter( "hub_guests_expired_total", "Guests removed for staying in a room past the longest a join takes.", @@ -262,6 +420,32 @@ impl Metrics { self.errors(k) ); } + let _ = writeln!( + s, + "# HELP hub_limited_total Refusals (and dropped host signals) by the limit that fired.\n\ + # TYPE hub_limited_total counter" + ); + for l in Limit::ALL { + let _ = writeln!( + s, + "hub_limited_total{{limit=\"{}\"}} {}", + l.as_str(), + self.limited_by(l) + ); + } + let _ = writeln!( + s, + "# HELP hub_http_strays_total Plain HTTP requests other than a WebSocket to /ws or a \ + health check, by path class (no paths kept).\n# TYPE hub_http_strays_total counter" + ); + for c in Stray::ALL { + let _ = writeln!( + s, + "hub_http_strays_total{{class=\"{}\"}} {}", + c.as_str(), + self.strays(c) + ); + } s } } diff --git a/engine/crates/ps5upload-hub/tests/hub.rs b/engine/crates/ps5upload-hub/tests/hub.rs index e6950e558..c511437aa 100644 --- a/engine/crates/ps5upload-hub/tests/hub.rs +++ b/engine/crates/ps5upload-hub/tests/hub.rs @@ -1107,3 +1107,151 @@ async fn an_idle_hub_logs_no_summary() { // One for the room that opened; none for the idle time before or after it. assert_eq!(summaries, 1, "{logs:?}"); } + +/// One plain HTTP request; the whole answer (status line, headers, body). +async fn http_req(addr: SocketAddr, method: &str, path: &str) -> String { + let mut s = TcpStream::connect(addr).await.unwrap(); + s.write_all( + format!("{method} {path} HTTP/1.1\r\nhost: x\r\nconnection: close\r\n\r\n").as_bytes(), + ) + .await + .unwrap(); + let mut out = String::new(); + tokio::time::timeout(WAIT, s.read_to_string(&mut out)) + .await + .unwrap() + .unwrap(); + out +} + +fn labelled(text: &str, name: &str, label: &str, value: &str) -> u64 { + metric(text, &format!("{name}{{{label}=\"{value}\"}}")) +} + +/// What is not a WebSocket to `/ws` (scanners, crawlers) answers 404 as before, is counted by the +/// class of its path and is never logged; `/robots.txt` keeps crawlers away; `/ws/` is `/ws`. +#[tokio::test] +async fn strays_are_counted_by_class_and_never_logged() { + let t = start(Config { + summary_interval: Duration::from_millis(1), + sweep_interval: Duration::from_millis(10), + ..cfg() + }) + .await; + let a = t.hub.http_addr; + for (path, class) in [ + ("/", "root"), + ("/favicon.ico", "favicon"), + ("/.well-known/security.txt", "well_known"), + ("/phpinfo?looks-like-a-query=1", "other"), + ("/wp-login.php", "other"), + ("/ws/extra", "other"), + ] { + let r = http_req(a, "GET", path).await; + assert!(r.starts_with("HTTP/1.1 404"), "{path}: {r}"); + let m = t.hub.shared.metrics_text(); + assert!( + labelled(&m, "hub_http_strays_total", "class", class) > 0, + "{path}" + ); + } + let robots = http_req(a, "GET", "/robots.txt").await; + assert!(robots.starts_with("HTTP/1.1 200"), "{robots}"); + assert!(robots.ends_with("User-agent: *\nDisallow: /\n"), "{robots}"); + // `/ws` without the upgrade, or with another method: the answers it always had. + for (method, path, status) in [ + ("GET", "/ws", "400"), + ("GET", "/ws/", "400"), + ("HEAD", "/ws", "405"), + ("POST", "/ws", "405"), + ] { + let r = http_req(a, method, path).await; + assert!( + r.starts_with(&format!("HTTP/1.1 {status}")), + "{method} {path}: {r}" + ); + } + // The health check is not a stray. + assert!(http_req(a, "GET", "/health").await.ends_with("ok\n")); + let m = t.hub.shared.metrics_text(); + assert_eq!(labelled(&m, "hub_http_strays_total", "class", "root"), 1); + assert_eq!(labelled(&m, "hub_http_strays_total", "class", "other"), 3); + assert_eq!(labelled(&m, "hub_http_strays_total", "class", "robots"), 1); + assert_eq!( + labelled(&m, "hub_http_strays_total", "class", "ws_not_websocket"), + 4 + ); + assert_eq!(t.hub.shared.metrics.strays_total(), 11, "{m}"); + // `/ws/` (a hub address typed with a slash at the end) is the hub. + let (mut ws, _) = tokio_tungstenite::connect_async(format!("ws://{a}/ws/")) + .await + .expect("/ws/ upgrades"); + let r = room(90); + send( + &mut ws, + json!({"v":1,"t":"host","room":r,"secret":secret(90)}), + ) + .await; + assert_eq!(recv(&mut ws).await, json!({"t":"hosted","room":r})); + tokio::time::sleep(Duration::from_millis(100)).await; + let logs = t.logs.lock().unwrap().join("\n"); + for bad in [ + "phpinfo", + "looks-like", + "wp-login", + "favicon", + "well-known", + "robots", + "/", + ] { + assert!(!logs.contains(bad), "{bad} in {logs}"); + } + assert!(logs.contains(" strays=11"), "{logs}"); +} + +/// Each limit that fires is counted by name, beside the error the client gets. +#[tokio::test] +async fn the_limit_that_fired_is_counted() { + let t = start(Config { + max_signals_per_guest: 2, + max_joins_per_ip: 2, + ..cfg() + }) + .await; + let r = room(91); + let mut h = host(&t, &r, &secret(91)).await; + let (mut g, _) = join(&t, &mut h, &r).await; + for i in 0..2 { + send(&mut g, json!({"t":"signal","to":"host","data":{"i":i}})).await; + recv(&mut h).await; + } + send(&mut g, json!({"t":"signal","to":"host","data":{"i":2}})).await; + expect_fatal(&mut g, "rate_limited").await; + recv(&mut h).await; // left + let (_g2, _) = join(&t, &mut h, &r).await; + let mut third = connect(&t).await; + send(&mut third, json!({"v":1,"t":"join","room":r})).await; + expect_fatal(&mut third, "rate_limited").await; + let m = t.hub.shared.metrics_text(); + assert_eq!( + labelled(&m, "hub_limited_total", "limit", "guest_signals"), + 1 + ); + assert_eq!(labelled(&m, "hub_limited_total", "limit", "join_rate"), 1); + assert_eq!( + labelled(&m, "hub_limited_total", "limit", "client_signals"), + 0 + ); + assert_eq!( + labelled(&m, "hub_errors_total", "kind", "rate_limited"), + 2, + "{m}" + ); + // A room its host closes counts as closed, not expired. + send(&mut h, json!({"t":"leave"})).await; + assert_eq!(recv_close(&mut h).await, Some(1000)); + tokio::time::sleep(Duration::from_millis(50)).await; + let m = t.hub.shared.metrics_text(); + assert_eq!(metric(&m, "hub_rooms_closed_total"), 1); + assert_eq!(metric(&m, "hub_rooms_expired_total"), 0); +} From 31dd79c0f5badad290192355ac92d83aa008417b Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 16:01:27 -0800 Subject: [PATCH 2/4] hub: let a guest's browser send all its ICE candidates Each guest sends its offer and then every ICE candidate its browser finds, one signal each, and the hub closed a guest past 20 signals a minute. The Play Together page offers a data channel, a video and an audio track, and browsers gather a set of candidates for each: Firefox found 20 on one plain network, so with the offer it was closed (rate_limited) before it could connect, and the page showed "can't reach the hub". Homes with IPv6 or a VPN find twice as many, and a family behind one address shared 60 a minute for all their tries. Per guest is now 60 a minute and per client in a room 300. A test plays a home of three devices, each trying twice with 40 candidates, and checks that no limit fires (and that the old limits did). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- engine/crates/ps5upload-hub/PROTOCOL.md | 9 ++- .../ps5upload-hub/deploy/ps5upload-hub.env | 4 +- engine/crates/ps5upload-hub/src/config.rs | 13 +++- engine/crates/ps5upload-hub/tests/hub.rs | 64 +++++++++++++++++++ 4 files changed, 83 insertions(+), 7 deletions(-) diff --git a/engine/crates/ps5upload-hub/PROTOCOL.md b/engine/crates/ps5upload-hub/PROTOCOL.md index 748751130..08c31fb0f 100644 --- a/engine/crates/ps5upload-hub/PROTOCOL.md +++ b/engine/crates/ps5upload-hub/PROTOCOL.md @@ -159,8 +159,8 @@ Forwarded as `{"t":"signal","from":"host"|"","data":}`. | Limit | Default | |-------|---------| | guests per room | 8 | -| signals per guest | 20 per minute | -| signals per guest client in one room (its guests together, joins again included) | 60 per minute | +| signals per guest | 60 per minute (was 20: one try of a browser that trickles each candidate went past it) | +| signals per guest client in one room (its guests together, joins again included) | 300 per minute (was 60) | | signals per host (all its guests together) | 200 per minute (past it: dropped) | | `join` attempts per client | 30 per minute (found or not) | | rooms on the hub | 5,000 | @@ -176,6 +176,11 @@ Forwarded as `{"t":"signal","from":"host"|"","data":}`. A *client* is an IPv4 address or an IPv6 /64. Behind a reverse proxy, the client address comes from the proxy's header (last entry) only when the proxy is configured as trusted. +A guest's signals are its offer and each ICE candidate, one signal each, so a client should send +few: one transport for all its sections (`bundlePolicy: "max-bundle"`), and none of the +candidates the host cannot use (the engine takes UDP candidates with an address; `.local` and +TCP ones it drops). The guest pages do both: about 5 signals a try instead of 20 to 40. + ## Close codes | Code | Meaning | diff --git a/engine/crates/ps5upload-hub/deploy/ps5upload-hub.env b/engine/crates/ps5upload-hub/deploy/ps5upload-hub.env index 7561fd30f..7e4eb40d5 100644 --- a/engine/crates/ps5upload-hub/deploy/ps5upload-hub.env +++ b/engine/crates/ps5upload-hub/deploy/ps5upload-hub.env @@ -13,9 +13,9 @@ HUB_CLIENT_IP_HEADER=x-forwarded-for # Limits (defaults shown): #HUB_MAX_GUESTS_PER_ROOM=8 -#HUB_MAX_SIGNALS_PER_GUEST=20 +#HUB_MAX_SIGNALS_PER_GUEST=60 # One client's guests in one room together, joining again included: -#HUB_MAX_SIGNALS_PER_GUEST_CLIENT=60 +#HUB_MAX_SIGNALS_PER_GUEST_CLIENT=300 #HUB_MAX_SIGNALS_PER_HOST=200 #HUB_MAX_JOINS_PER_IP=30 #HUB_MAX_ROOMS=5000 diff --git a/engine/crates/ps5upload-hub/src/config.rs b/engine/crates/ps5upload-hub/src/config.rs index d40643375..7120ce416 100644 --- a/engine/crates/ps5upload-hub/src/config.rs +++ b/engine/crates/ps5upload-hub/src/config.rs @@ -103,7 +103,7 @@ pub struct Config { pub max_signals_per_guest: u32, /// Signals one guest client (an address, see `limits.rs`) may send in one room per window, /// all its guests there together, those that left included: joining again does not refill - /// it. Room for a few guests from one home. + /// it. Room for a few guests from one home (or behind one carrier-grade NAT). pub max_signals_per_guest_client: u32, /// Signals a host may send per window, to all its guests together. Past it they are /// dropped, not forwarded; the host stays. @@ -162,8 +162,15 @@ impl Default for Config { trusted_proxies: Vec::new(), client_ip_header: "x-forwarded-for".to_string(), max_guests_per_room: 8, - max_signals_per_guest: 20, - max_signals_per_guest_client: 60, + // One try of a guest: its offer, then every ICE candidate its browser finds, one + // signal each. Firefox on one network found 20 for the Play Together page as it was + // (a data channel, a video and an audio track: a set of candidates for each), so with + // the offer it went past the old 20 and was closed before it could connect; a home + // with IPv6 or a VPN finds twice as many. The pages now ask for one set and leave out + // the candidates the engine cannot use, a fifth as many; older pages stay in use. + max_signals_per_guest: 60, + // Room for a home of three or four, each trying twice in the minute with such a page. + max_signals_per_guest_client: 300, max_signals_per_host: 200, max_joins_per_ip: 30, max_rooms: 5_000, diff --git a/engine/crates/ps5upload-hub/tests/hub.rs b/engine/crates/ps5upload-hub/tests/hub.rs index c511437aa..0ff6e3b19 100644 --- a/engine/crates/ps5upload-hub/tests/hub.rs +++ b/engine/crates/ps5upload-hub/tests/hub.rs @@ -1255,3 +1255,67 @@ async fn the_limit_that_fired_is_counted() { assert_eq!(metric(&m, "hub_rooms_closed_total"), 1); assert_eq!(metric(&m, "hub_rooms_expired_total"), 0); } + +/// One home (one IPv4: a family, or a carrier-grade NAT) with three devices joining one Play +/// Together, each trying twice within the minute (the first try dropped and the page made a new +/// one), with the page as it was before it asked for one set of candidates: its offer, then 40 +/// candidates (Firefox found 20 on one plain network for the page's data channel, video and +/// audio; IPv6 or a VPN doubles that). The host answers each try with its answer and 10 +/// candidates. Returns how many times a limit fired. +async fn family_session(c: Config) -> u64 { + let t = start(Config { + trusted_proxies: vec!["127.0.0.1".parse::().unwrap()], + ..c + }) + .await; + let r = room(92); + let mut h = host(&t, &r, &secret(92)).await; + let home = Some("203.0.113.5"); + 'tries: for _try in 0..2 { + for _device in 0..3 { + let mut g = connect_with(&t, None, home).await; + send(&mut g, json!({"v":1,"t":"join","room":r})).await; + if recv(&mut g).await["t"] != "joined" { + break 'tries; + } + let gid = recv(&mut h).await["gid"].as_str().unwrap().to_string(); + for i in 0..41 { + let data = if i == 0 { + json!({"type":"offer","sdp":"v=0"}) + } else { + json!({"type":"candidate","sdpMid":"0", + "candidate":format!("candidate:{i} 1 udp 1 192.0.2.1 {i} typ host")}) + }; + send(&mut g, json!({"t":"signal","to":"host","data":data})).await; + if recv(&mut h).await["t"] != "signal" { + // `left`: the guest was refused and closed. + break 'tries; + } + } + for i in 0..11 { + send(&mut h, json!({"t":"signal","to":gid,"data":{"i":i}})).await; + assert_eq!(recv(&mut g).await["data"]["i"], i); + } + // Connected: the page leaves the hub. + send(&mut g, json!({"t":"leave"})).await; + assert_eq!(recv(&mut h).await, json!({"t":"left","gid":gid})); + } + } + let m = &t.hub.shared.metrics; + ps5upload_hub::metrics::Limit::ALL + .iter() + .map(|l| m.limited_by(*l)) + .sum() +} + +#[tokio::test] +async fn a_homes_play_together_never_hits_a_limit() { + assert_eq!(family_session(cfg()).await, 0); + // The limits before (20 per guest, 60 per client) closed the first try of such a page. + let before = Config { + max_signals_per_guest: 20, + max_signals_per_guest_client: 60, + ..cfg() + }; + assert!(family_session(before).await > 0); +} From 59a550b3d8c2cd15d2ab410bae2d9de0ba1799c3 Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 16:08:54 -0800 Subject: [PATCH 3/4] Play Together page: don't send the hub candidates the engine drops The guest and phone pages sent every ICE candidate the browser found through the hub, one signal each, and the browser finds a set for each of the page's sections (data channel, video, audio): Firefox 20 on one plain network, which with the offer went past the hub's per-guest limit and closed the join before it could connect. Half of them were never used: the engine drops .local (mDNS) candidates and has no TCP sockets. The page now leaves those out. Measured in Playwright on this Mac for the Play Together page: Firefox 20 candidates found, 10 sent; Chromium 6 found, 3 sent. What the engine receives is unchanged, so it works with every app version. Rebuilt the embedded pages and the website's copies. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- client/src/join/rtcTransport.test.ts | 25 +++++++++++++++++++ client/src/join/rtcTransport.ts | 14 +++++++++++ .../ps5upload-engine/src/join_page.html | 6 ++--- .../crates/ps5upload-engine/src/pad_page.html | 2 +- engine/crates/ps5upload-hub/PROTOCOL.md | 8 +++--- engine/crates/ps5upload-hub/src/config.rs | 4 +-- engine/crates/ps5upload-hub/tests/hub.rs | 6 ++--- site/join/index.html | 6 ++--- site/pad/index.html | 2 +- 9 files changed, 56 insertions(+), 17 deletions(-) diff --git a/client/src/join/rtcTransport.test.ts b/client/src/join/rtcTransport.test.ts index 4b2273d07..f49a3f580 100644 --- a/client/src/join/rtcTransport.test.ts +++ b/client/src/join/rtcTransport.test.ts @@ -26,6 +26,7 @@ import { sdpFingerprint, STUN_SERVERS, trackCodecs, + usefulCandidate, type InternetInvite, } from "./rtcTransport"; @@ -75,6 +76,27 @@ describe("internet invite link", () => { }); }); +describe("the candidates the page sends", () => { + it("are the UDP ones with an address: the engine drops .local ones and has no TCP", () => { + for (const ok of [ + "candidate:1 1 udp 2122260223 192.0.2.1 5000 typ host generation 0", + "candidate:2 1 UDP 1686052607 203.0.113.9 6000 typ srflx raddr 0.0.0.0 rport 0", + "a=candidate:3 1 udp 1 2001:db8::1 7000 typ srflx", + // A shape this does not know goes as before. + "candidate:x", + ]) { + expect(usefulCandidate(ok), ok).toBe(true); + } + for (const no of [ + "candidate:4 1 udp 2122260223 0f3c1a2b-1111-4222-8333-944445555666.local 5001 typ host", + "candidate:5 1 TCP 2105524479 192.0.2.1 9 typ host tcptype active", + "candidate:6 1 tcp 1 203.0.113.9 443 typ srflx tcptype passive", + ]) { + expect(usefulCandidate(no), no).toBe(false); + } + }); +}); + describe("the answer's fingerprint", () => { const sdp = (lines: string[]) => ["v=0", "o=- 1 2 IN IP4 0.0.0.0", "s=-", ...lines, "m=application 9 UDP/DTLS/SCTP webrtc-datachannel", ""].join("\r\n"); @@ -374,6 +396,9 @@ describe("the WebRTC transport", () => { expect(dc.binaryType).toBe("arraybuffer"); expect(hub.signals("offer")).toEqual([{ t: "signal", to: "host", data: { type: "offer", sdp: "v=0\r\nOFFER\r\n" } }]); pc.onicecandidate?.({ candidate: { candidate: "candidate:1 1 udp 1 192.0.2.1 5000 typ host", sdpMid: "0" } }); + // What the engine can't use is not sent: each candidate is a signal the hub counts. + pc.onicecandidate?.({ candidate: { candidate: "candidate:7 1 udp 1 0f3c1a2b-1111-4222-8333-944445555666.local 5001 typ host generation 0", sdpMid: "0" } }); + pc.onicecandidate?.({ candidate: { candidate: "candidate:8 1 TCP 1 192.0.2.1 9 typ host tcptype active", sdpMid: "0" } }); pc.onicecandidate?.({ candidate: null }); expect(hub.signals("candidate")).toEqual([ { t: "signal", to: "host", data: { type: "candidate", candidate: "candidate:1 1 udp 1 192.0.2.1 5000 typ host", sdpMid: "0" } }, diff --git a/client/src/join/rtcTransport.ts b/client/src/join/rtcTransport.ts index 3202c47ef..e47298958 100644 --- a/client/src/join/rtcTransport.ts +++ b/client/src/join/rtcTransport.ts @@ -133,6 +133,19 @@ export { NET_CLOSE, netFailure, type NetWhy }; export const STUN_SERVERS = ["stun:stun.cloudflare.com:3478", "stun:stun.l.google.com:19302"]; /** ICE must reach "connected" (and the channel open) this soon, or the networks can't meet. */ export const ICE_TIMEOUT_MS = 15_000; + +/** A candidate the engine can use: UDP, with an address. It drops `.local` (mDNS) ones and has + * no TCP (join_net/rtc.rs, `Cmd::Remote`). Each candidate sent is a signal the hub counts, and + * it closes a guest past its per-minute limit: the browser gathers a set for each of the page's + * sections (data, video, audio), and Firefox found 20 on one plain network, half of them + * `.local` or TCP. A line of a shape this does not know is sent as before. */ +export function usefulCandidate(line: string): boolean { + // candidate:
typ ... + const f = line.trim().replace(/^a=/, "").split(/\s+/); + if (f.length < 8 || f[6] !== "typ") return true; + return f[2].toLowerCase() === "udp" && !f[4].toLowerCase().endsWith(".local"); +} + /** The hub closed with 1001 (going away: it is restarting for an update) before the host * answered: try again after this long, for at most HUB_BACK_FOR_MS. The hosts reconnect and open * their rooms again within seconds, so a `no_room` in that time means "not back yet". */ @@ -462,6 +475,7 @@ export function rtcTransport(inv: InternetInvite, o: RtcTransportOptions = {}): const c = e.candidate; // The end of gathering (null or empty) needs nothing: the engine takes what came. if (!c || !c.candidate) return; + if (!usefulCandidate(c.candidate)) return; const data = { type: "candidate", candidate: c.candidate, sdpMid: c.sdpMid ?? "0" }; // Found while the hub was still connecting: right behind the offer (never ahead of it). if (this.offerSent) this.signal(data); diff --git a/engine/crates/ps5upload-engine/src/join_page.html b/engine/crates/ps5upload-engine/src/join_page.html index a1377f178..dca7207d2 100644 --- a/engine/crates/ps5upload-engine/src/join_page.html +++ b/engine/crates/ps5upload-engine/src/join_page.html @@ -15,8 +15,8 @@ `);for(i=r=0;ri||c[r]!==l[i]){var u=` `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Le=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ie(n):``}function ze(e,t){switch(e.tag){case 26:case 27:case 5:return Ie(e.type);case 16:return Ie(`Lazy`);case 13:return e.child!==t&&t!==null?Ie(`Suspense Fallback`):Ie(`Suspense`);case 19:return Ie(`SuspenseList`);case 0:case 15:return Re(e.type,!1);case 11:return Re(e.type.render,!1);case 1:return Re(e.type,!0);case 31:return Ie(`Activity`);case 30:return Ie(`ViewTransition`);default:return``}}function Be(e){try{var t=``,n=null;do t+=ze(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` -`+e.stack}}var Ve=Object.prototype.hasOwnProperty,He=t.unstable_scheduleCallback,Ue=t.unstable_cancelCallback,We=t.unstable_shouldYield,Ge=t.unstable_requestPaint,Ke=t.unstable_now,qe=t.unstable_getCurrentPriorityLevel,Je=t.unstable_ImmediatePriority,Ye=t.unstable_UserBlockingPriority,Xe=t.unstable_NormalPriority,Ze=t.unstable_LowPriority,Qe=t.unstable_IdlePriority,$e=t.log,et=t.unstable_setDisableYieldValue,tt=null,nt=null;function rt(e){if(typeof $e==`function`&&et(e),nt&&typeof nt.setStrictMode==`function`)try{nt.setStrictMode(tt,e)}catch{}}var it=Math.clz32?Math.clz32:st,at=Math.log,ot=Math.LN2;function st(e){return e>>>=0,e===0?32:31-(at(e)/ot|0)|0}var ct=256,lt=262144,ut=4194304;function dt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ft(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=dt(n))):i=dt(o):i=dt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=dt(n))):i=dt(o)):i=dt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function pt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function mt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0n;n++)t.push(e);return t}function vt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function yt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0=vr),xr=` `,Sr=!1;function Cr(e,t){switch(e){case`keyup`:return gr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function wr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Tr=!1;function Er(e,t){switch(e){case`compositionend`:return wr(t);case`keypress`:return t.which===32?(Sr=!0,xr):null;case`textInput`:return e=t.data,e===xr&&Sr?null:e;default:return null}}function Dr(e,t){if(Tr)return e===`compositionend`||!_r&&Cr(e,t)?(e=zn(),Rn=Ln=In=null,Tr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Xr(n)}}function Qr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $r(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Yr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yr(e.document)}return t}function ei(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var ti=Nn&&`documentMode`in document&&11>=document.documentMode,ni=null,ri=null,ii=null,ai=!1;function oi(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ai||ni==null||ni!==Yr(r)||(r=ni,`selectionStart`in r&&ei(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ii&&Jr(ii,r)||(ii=r,r=Jf(ri,`onSelect`),0>=o,i-=o,ea=1<<32-it(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),L&&na(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),L&&na(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return L&&na(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),L&&na(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===ie&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case ne:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===ie){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),uo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&ro(l)===r.type){n(e,r.sibling),c=a(r,o.props),uo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===ie?(c=F(o.props.children,e.mode,c,o.key),uo(c,o),c.return=e,e=c):(c=Vi(o.type,o.key,o.props,null,e.mode,c),uo(c,o),c.return=e,e=c)}return s(e);case re:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Wi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=ro(o),_(e,r,o,c)}if(be(o))return h(e,r,o,c);if(_e(o)){if(l=_e(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,lo(o),c);if(o.$$typeof===se)return _(e,r,ka(e,o),c);fo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Hi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{co=0;var i=_(e,t,n,r);return so=null,i}catch(t){if(t===Za||t===$a)throw t;var a=Li(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var mo=po(!0),ho=po(!1),go=!1;function _o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function yo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function bo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Pi(e),Ni(e,null,n),t}return Ai(e,r,t,n),Pi(e)}function xo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xt(e,n)}}function So(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Co=!1;function wo(){if(Co){var e=Ha;if(e!==null)throw e}}function To(e,t,n,r){Co=!1;var i=e.updateQueue;go=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===Va&&(Co=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=E({},d,f);break a;case 2:go=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),od|=o,e.lanes=o,e.memoizedState=d}}function Eo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Do(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=A.T,s={};s.types=o===null?null:o.types,A.T=s,dc(e,!1,t,n);try{var c=i(),l=A.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?uc(e,t,Ga(c,r),jd(e)):uc(e,t,r,jd(e))}catch(n){uc(e,t,{then:function(){},status:`rejected`,reason:n},jd())}finally{j.p=a,o!==null&&s.types!==null&&(o.types=s.types),A.T=o}}function ec(){}function tc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=nc(e).queue;$s(e,a,t,xe,n===null?ec:function(){return rc(e),n(r)})}function nc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:xe,baseState:xe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:xe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function rc(e){var t=nc(e);t.next===null&&(t=e.alternate.memoizedState),uc(e,t.next.queue,{},jd())}function ic(){return Oa(sh)}function ac(){return ss().memoizedState}function oc(){return ss().memoizedState}function sc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=jd();e=yo(n);var r=bo(t,e,n);r!==null&&(Pd(r,t,n),xo(r,t,n)),t={cache:Pa()},e.payload=t;return}t=t.return}}function cc(e,t,n){var r=jd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fc(e)?pc(t,n):(n=ji(e,t,n,r),n!==null&&(Pd(n,e,r),mc(n,t,r)))}function lc(e,t,n){uc(e,t,n,jd())}function uc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fc(e))pc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,qr(s,o))return Ai(e,t,i,0),q===null&&ki(),!1}catch{}if(n=ji(e,t,i,r),n!==null)return Pd(n,e,r),mc(n,t,r),!0}return!1}function dc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},fc(e)){if(t)throw Error(i(479))}else t=ji(e,n,r,2),t!==null&&Pd(t,e,2)}function fc(e){var t=e.alternate;return e===B||t!==null&&t===B}function pc(e,t){Ko=Go=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function mc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xt(e,n)}}var hc={readContext:Oa,use:us,useCallback:H,useContext:H,useEffect:H,useImperativeHandle:H,useLayoutEffect:H,useInsertionEffect:H,useMemo:H,useReducer:H,useRef:H,useState:H,useDebugValue:H,useDeferredValue:H,useTransition:H,useSyncExternalStore:H,useId:H,useHostTransitionStatus:H,useFormState:H,useActionState:H,useOptimistic:H,useMemoCache:H,useCacheRefresh:H,useEffectEvent:H},gc={readContext:Oa,use:us,useCallback:function(e,t){return os().memoizedState=[e,t===void 0?null:t],e},useContext:Oa,useEffect:Bs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Rs(4194308,4,Ks.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Rs(4194308,4,e,t)},useInsertionEffect:function(e,t){Rs(4,2,e,t)},useMemo:function(e,t){var n=os();t=t===void 0?null:t;var r=e();if(qo){rt(!0);try{e()}finally{rt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=os();if(n!==void 0){var i=n(t);if(qo){rt(!0);try{n(t)}finally{rt(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=cc.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=os();return e={current:e},t.memoizedState=e},useState:function(e){e=Ss(e);var t=e.queue,n=lc.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Js,useDeferredValue:function(e,t){return Zs(os(),e,t)},useTransition:function(){var e=Ss(!1);return e=$s.bind(null,B,e.queue,!0,!1),os().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,a=os();if(L){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),q===null)throw Error(i(349));Y&127||_s(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Bs(ys.bind(null,r,o,e),[e]),r.flags|=2048,Is(9,{destroy:void 0},vs.bind(null,r,o,n,t),null),n},useId:function(){var e=os(),t=q.identifierPrefix;if(L){var n=ta,r=ea;n=(r&~(1<<32-it(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Jo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Ot]=t,o[kt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(np(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&ml(t)}}return U(t),t.subtreeFlags&=-33554433,hl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ml(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Oe.current,ma(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=sa,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ot]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ep(e.nodeValue,n)),e||da(t,!0)}else e=lp(e).createTextNode(r),e[Ot]=t,t.stateNode=e}return U(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ma(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Ot]=t}else ha(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),e=!1}else n=ga(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(zo(t),t):(zo(t),null);if(t.flags&128)throw Error(i(558))}return U(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ma(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Ot]=t}else ha(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),a=!1}else a=ga(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(zo(t),t):(zo(t),null)}return zo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),_l(t,t.updateQueue),U(t),null);case 4:return je(),e===null&&Wf(t.stateNode.containerInfo),t.flags|=67108864,U(t),null;case 10:return Sa(t.type),U(t),null;case 19:if(Vo(t),r=t.memoizedState,r===null)return U(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)vl(r,!1);else{if(ad!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ho(e),o!==null){for(t.flags|=128,vl(r,!1),e=o.updateQueue,t.updateQueue=e,_l(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Bi(n,e),n=n.sibling;return z(t,Bo.current&1|2),L&&na(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ke()>gd&&(t.flags|=128,a=!0,vl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Ho(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,_l(t,e),vl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!L)return U(t),null}else 2*Ke()-r.renderingStartTime>gd&&n!==536870912&&(t.flags|=128,a=!0,vl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ke(),e.sibling=null,o=Bo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||L?z(t,o):(n=o,M(No,t),M(Bo,n),Po===null&&(Po=t)),L&&na(t,r.treeForkCount),e}return U(t),null;case 22:case 23:return zo(t),Mo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(U(t),t.subtreeFlags&6&&(t.flags|=8192)):U(t),n=t.updateQueue,n!==null&&_l(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Te(qa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Sa(Na),U(t),null;case 25:return null;case 30:return t.flags|=33554432,U(t),null}throw Error(i(156,t.tag))}function bl(e,t){switch(aa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sa(Na),je(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ne(t),null;case 31:if(t.memoizedState!==null){if(zo(t),t.alternate===null)throw Error(i(340));ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(zo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Vo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return je(),null;case 10:return Sa(t.type),null;case 22:case 23:return zo(t),Mo(),e!==null&&Te(qa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Sa(Na),null;case 25:return null;default:return null}}function xl(e,t){switch(aa(t),t.tag){case 3:Sa(Na),je();break;case 26:case 27:case 5:Ne(t);break;case 4:je();break;case 31:t.memoizedState!==null&&zo(t);break;case 13:zo(t);break;case 19:Vo(t);break;case 10:Sa(t.type);break;case 22:case 23:zo(t),Mo(),e!==null&&Te(qa);break;case 24:Sa(Na)}}function Sl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Cl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function wl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Do(t,n)}catch(t){Z(e,e.return,t)}}}function Tl(e,t,n){n.props=Cc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function El(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=Si(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);f(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Dl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}}function Ol(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n title`))),np(r,t,n),r[Ot]=e,Ht(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;sg&&(o=g,g=h,h=o);var _=Zr(s,h),v=Zr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,A.T=null,n=wd,wd=null;var o=bd,s=Sd;if(yd=0,xd=bd=null,Sd=0,K&6)throw Error(i(331));var c=K;if(K|=4,Yu(o.current),Vu(o,o.current,s,n),K=c,Df(0,!1),nt&&typeof nt.onPostCommitFiberRoot==`function`)try{nt.onPostCommitFiberRoot(tt,o)}catch{}return!0}finally{j.p=a,A.T=r,uf(e,t)}}function pf(e,t,n){t=Ki(n,t),t=kc(e.stateNode,t,2),e=bo(e,t,2),e!==null&&(vt(e,2),Ef(e))}function Z(e,t,n){if(e.tag===3)pf(e,e,n);else for(;t!==null;){if(t.tag===3){pf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(vd===null||!vd.has(r))){e=Ki(n,e),n=Ac(2),r=bo(t,n,2),r!==null&&(jc(n,r,t,e),vt(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $u;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(rd=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(ad===4||ad===3&&(Y&62914560)===Y&&300>Ke()-md?K&2?cd|=n:Vd(e,0):cd|=n,ud===Y&&(ud=0)),Ef(e)}function gf(e,t){t===0&&(t=gt()),e=Mi(e,t),e!==null&&(vt(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),gf(e,n)}function yf(e,t){return He(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-it(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=Y,a=ft(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||pt(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&hp()&&(e=Tf);for(var t=Ke(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}yd!==0&&yd!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=ln(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),Ht(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+ln(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+ln(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+ln(n.imageSizes)+`"]`)):i+=`[href="`+ln(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=E({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[It]=!0,o.onload=o.onerror=function(){Ut(o)}),Ht(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+ln(r)+`"][href="`+ln(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=E({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),Ht(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=Vt(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=E({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Ht(c),np(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=Vt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=E({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Ht(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=Vt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=E({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Ht(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var a=(a=Oe.current)?bm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Vt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=Vt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Vt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+ln(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[It]){r.loading=1;return}}else t=e.createElement(`link`),t[It]=!0,t.onload=t.onerror=Ut.bind(null,t),np(t,`link`,n),Ht(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+ln(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+ln(n.href)+`"]`);if(r)return t.instance=r,Ht(r),r;var a=E({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ht(r),np(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,Ht(o),o;r=Im(n),(a=vm.get(a))&&Hm(r,a),o=(e.ownerDocument||e).createElement(`link`),Ht(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,Ht(a),a):(r=n,(a=vm.get(o))&&(r=E({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ht(a),np(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ht(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),Ht(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=b()}))(),S=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function ee(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:S(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var C=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},w=e=>{let t=C(e);return t.charAt(0).toUpperCase()+t.slice(1)},T=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),E={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function te(e){return e!=null}function ne(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??E.width,a=e.size??e.height??E.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?T(...c):T(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??E[`stroke-width`])*Number(e.size??e.width??E.width)/Number(t.size??t.width??E.width):t.strokeWidth??E[`stroke-width`];return[`svg`,{...Object.entries(E).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&te(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&te(t.width)&&{[r(`width`)]:t.width},...`height`in t&&te(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function re(e,t={}){return ne(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var ie=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},D=u(_(),1),ae=(0,D.createContext)({}),oe=()=>(0,D.useContext)(ae),se=(0,D.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=oe()??{},y=!!c||ie(d),[b,x,S=[]]=re(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:T(v,s),hasA11yProp:y,attributes:d});return(0,D.createElement)(b,{ref:f,...x},[...S.map(([e,t])=>(0,D.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function ce(e,t=[],n=[]){let r=typeof e==`string`?ee(e,t,n):e,i=(0,D.forwardRef)(({className:e,...t},n)=>(0,D.createElement)(se,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=w(r.name)),i}var le={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};le.node;var ue=ce(le),de={name:`expand`,size:24,node:[[`path`,{d:`m15 15 6 6`,key:`1s409w`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}],[`path`,{d:`M21 16v5h-5`,key:`1ck2sf`}],[`path`,{d:`M21 8V3h-5`,key:`1qoq8a`}],[`path`,{d:`M3 16v5h5`,key:`1t08am`}],[`path`,{d:`m3 21 6-6`,key:`wwnumi`}],[`path`,{d:`M3 8V3h5`,key:`1ln10m`}],[`path`,{d:`M9 9 3 3`,key:`v551iv`}]]};de.node;var O=ce(de),fe={name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};fe.node;var pe=ce(fe),k={name:`gamepad-2`,size:24,node:[[`line`,{x1:`6`,x2:`10`,y1:`11`,y2:`11`,key:`1gktln`}],[`line`,{x1:`8`,x2:`8`,y1:`9`,y2:`13`,key:`qnk9ow`}],[`line`,{x1:`15`,x2:`15.01`,y1:`12`,y2:`12`,key:`krot7o`}],[`line`,{x1:`18`,x2:`18.01`,y1:`10`,y2:`10`,key:`1lcuu1`}],[`path`,{d:`M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z`,key:`mfqc10`}]]};k.node;var me=ce(k),he={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};he.node;var ge=ce(he),_e={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};_e.node;var ve=ce(_e),ye={name:`minimize`,size:24,node:[[`path`,{d:`M8 3v3a2 2 0 0 1-2 2H3`,key:`hohbtr`}],[`path`,{d:`M21 8h-3a2 2 0 0 1-2-2V3`,key:`5jw1f3`}],[`path`,{d:`M3 16h3a2 2 0 0 1 2 2v3`,key:`198tvr`}],[`path`,{d:`M16 21v-3a2 2 0 0 1 2-2h3`,key:`ph8mxp`}]]};ye.node;var be=ce(ye),A={name:`rotate-cw`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]};A.node;var j=ce(A),xe={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};xe.node;var Se=ce(xe),Ce={name:`volume-2`,size:24,node:[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]};Ce.node;var we=ce(Ce),Te={name:`volume-x`,size:24,node:[[`path`,{d:`M11 4.702a.7.7 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.7.7 0 0 0 11 19.298z`,key:`1p7khw`}],[`path`,{d:`m16.5 14.5 5-5`,key:`cul3yw`}],[`path`,{d:`m16.5 9.5 5 5`,key:`1akey5`}]]};Te.node;var M=ce(Te),Ee={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Ee.node;var De=ce(Ee),Oe=({"ar":{"usb_skipped_not_payload":"{name}: ليس ملف .elf أو .bin","usb_skipped_unknown":"{id}: لم يعد في قائمة الحمولات","browser_unsupported":"يتطلب هذا تطبيق سطح المكتب. لا يعمل في المتصفح.","video_recovered_notice":"تعطّل «العب» في المرة السابقة أثناء بدء الصورة، لذا يُفك ترميز الصورة الآن بدون بطاقة الرسومات (للتغيير: الإعدادات › النافذة › الرسومات › فك ترميز الفيديو بالعتاد).","video_recovered_title":"يُفك ترميز الصورة الآن برمجيًا","open_in_title":"هل تفتحه في تطبيق PS5Upload؟","open_in_body":"هل لديك تطبيق PS5Upload على هذا الجهاز؟ افتح الرابط فيه، أو تابع في المتصفح.","open_in_app":"فتح في التطبيق","open_in_browser":"المتابعة في المتصفح","open_in_remember":"تذكّر اختياري على هذا الجهاز","open_in_opening":"جارٍ فتح تطبيق PS5Upload…","open_in_not_opened":"لم يحدث شيء؟ ربما التطبيق غير مثبّت على هذا الجهاز.","open_in_again":"حاول مجددًا","pad_8bitdo_no_xinput":"لا يحتوي جهاز 8BitDo هذا على وضع X-input. إذا كان أحد الأزرار خاطئًا، فافحص وحدة التحكم.","pad_8bitdo_how_switch":"اضبط المفتاح في الخلف على X ثم اضغط Start","pad_8bitdo_how_startx":"أطفئه، ثم اضغط مطولًا على Start + X لتشغيله","pad_8bitdo_how_receiver":"استخدم جهاز الاستقبال 2.4G أو كابل USB","pad_8bitdo_how_manual":"يشرح دليله الطريقة","pad_8bitdo_xinput":"للحصول على أفضل نتيجة، بدّل وحدة 8BitDo إلى وضع X-input: {how}.","rp_touch_left_stick":"العصا اليسرى","rp_touch_right_stick":"العصا اليمنى","rp_touch_touchpad":"لوحة اللمس","rp_menu":"القائمة","rp_pad_step_lx":"ادفع العصا اليسرى إلى اليمين","rp_pad_step_ly":"ادفع العصا اليسرى إلى الأسفل","rp_pad_step_rx":"ادفع العصا اليمنى إلى اليمين","rp_pad_step_ry":"ادفع العصا اليمنى إلى الأسفل","join_check_bottom":"اضغط زر الوجه السفلي (✕)","join_check_right":"اضغط زر الوجه الأيمن (○)","join_check_left":"اضغط زر الوجه الأيسر (□)","join_check_top":"اضغط زر الوجه العلوي (△)","rp_pad_press":"اضغط {name}","join_check_saved":"تم الحفظ لوحدة التحكم هذه على هذا الجهاز. جرّبها أدناه.","join_check_title":"افحص وحدة التحكم","join_done":"تم","rp_pads_none":"لم تُرصد أي يد تحكم بعد. وصّل واحدة واضغط أي زر فيها.","rp_pad_mapped":"تلعب بتعيين أزرارك","join_check_unknown":"وحدة التحكم هذه ليست في قائمتنا، لذا قد تكون أزرارها مختلطة. يستغرق إعدادها بضع ثوانٍ.","rp_pad_standard":"معروفة","rp_pad_progress":"{n} من {total}","rp_pad_skip":"تخطٍّ","rp_pad_back":"رجوع","rp_pad_cancel":"إلغاء","join_check_try":"اضغط الأزرار وحرّك العصي: ما تضغطه يضيء.","join_check_redo":"إعادة","join_check_map":"إعداد الأزرار","rp_pad_reset":"إعادة ضبط","join_open_lan_body":"لا يمكنك الوصول إلى الإنترنت؟ إذا كنت على شبكة Wi-Fi نفسها مع صديقك، فافتح اللعبة هناك.","join_open_lan":"افتح على شبكة Wi-Fi هذه","join_path_lan":"الشبكة المنزلية","join_path_internet":"الإنترنت","join_seat_taken":"احتاج {host} إلى استعادة يد التحكم ولم تكن هناك يد تحكم أخرى متاحة على PS5، لذا خرجت من اللعبة. اطلب من {host} أن يسمح لك بالدخول مرة أخرى.","join_refused_key":"انتهت صلاحية هذه الدعوة. اطلب من {host} رابطًا جديدًا.","join_refused_expired":"فقدت مكانك في اللعبة. اطلب من {host} إدخالك مجددًا.","join_refused_full":"اللعبة ممتلئة: يوجد أربعة لاعبين بالفعل.","join_refused_denied":"لم يسمح لك {host} بالدخول هذه المرة.","join_refused_no_answer":"لم يُجب {host} في الوقت المناسب. أخبر {host} ثم حاول مرة أخرى.","join_refused_closed":"{host} لا يستضيف العب معًا الآن.","join_refused_old_helper":"يحتاج PS5 الخاص بـ {host} إلى مساعد محدّث لميزة العب معًا.","join_refused_not_playing":"{host} لا يلعب الآن. اطلب من {host} أن يبدأ اللعب أولًا.","join_refused_unreachable":"لم يتمكن حاسوب {host} من الوصول إلى جهاز PS5. حاول مرة أخرى بعد قليل.","join_refused_slow_down":"رموز خاطئة كثيرة جدًا. انتظر دقيقة ثم حاول مرة أخرى.","join_refused_address":"عنوان هذا الرابط خارج شبكتك المنزلية، لذا لن يستخدمه التطبيق. اطلب من {host} رابطًا يحمل عنوان IP لجهازه.","join_refused_other":"لم يسمح لك {host} بالدخول.","join_ended_kicked":"أخرجك {host} من اللعبة.","join_ended_closed":"أغلق {host} العب معًا.","join_ended_host_stopped":"توقف المضيف عن اللعب.","join_ended_replaced":"فُتحت هذه اللعبة في علامة تبويب أخرى أو على جهاز آخر، لذا توقفت هنا.","join_ended_pad_lost":"فقد PS5 يد التحكم الخاصة بك، لذا خرجت من اللعبة. اطلب من {host} إدخالك مجددًا.","join_ended_gave_up":"لم يعد الاتصال بـ {host} في الوقت المناسب.","join_net_lost":"انقطع الاتصال بـ{host}. تحقق من اتصالك بالإنترنت ثم اطلب مرة أخرى.","join_ended_lost":"تعذّر الوصول إلى {host}. تأكد أنكما على الشبكة نفسها.","join_ended_left":"غادرت اللعبة.","join_net_mismatch":"هذا الرابط لا يطابق المضيف؛ اطلب منه رابطًا جديدًا.","join_net_no_direct":"لا يمكن إنشاء اتصال مباشر من هذه الشبكة (الموجّهان لدى الطرفين صارمان). جرّب Wi-Fi بدلًا من بيانات الجوال، أو اطلب من المضيف تشغيل UPnP.","join_net_no_room":"هذه الدعوة لم تعد مفتوحة. اطلب من {host} رابطًا جديدًا.","join_net_full":"لا يتّسع لعب {host} لصديق آخر الآن. حاول مجددًا بعد لحظة.","join_net_no_hub":"تعذّر الوصول إلى خدمة دعوات PS5Upload. تحقّق من اتصالك بالإنترنت ثم حاول مجددًا.","join_net_offer":"تعذّر على كمبيوتر {host} الاتصال بهذا المتصفح. جرّب متصفحًا آخر.","join_net_no_webrtc":"هذا المتصفح لا يستطيع إنشاء اتصالات مباشرة. جرّب إصدارًا حديثًا من Chrome أو Safari أو Firefox.","join_cancel":"إلغاء","join_host_fallback":"صديقك","join_connecting":"جارٍ الاتصال بـ {host}…","join_waiting":"بانتظار أن يسمح لك {host} بالدخول","join_waiting_body":"يرى {host} اسمك على شاشته ويضغط سماح.","join_retry":"حاول مجددًا","join_again":"اطلب الانضمام مجددًا","join_playing_at":"تلعب لدى {host}","join_you_are":"أنت اللاعب {n}","join_seat_stream":"أنت تلعب بمستخدم PS5 الخاص بـ {host}. لا حاجة لاختيار مستخدم.","join_plays_as":"أنت تلعب باسم {profile}. لا حاجة لاختيار مستخدم.","join_seat_tv_asks":"اختار {host} ملفًا شخصيًا لك، لكن تعذّر استخدامه. سيسألك التلفاز عن هويتك.","join_picking":"اضغط PS، ثم اختر اللعب السريع على التلفاز","join_hide_controls":"إخفاء","join_sound":"اضغط لتشغيل الصوت","rp_unmute":"تشغيل الصوت","rp_mute":"كتم","join_no_sound":"لا يوجد صوت في هذا المتصفح","join_exit_fullscreen":"الخروج من ملء الشاشة","pad_fill":"ملء الشاشة","join_leave":"مغادرة","join_show_controls":"إظهار عناصر التحكم","join_hold_hint":"اضغط مطولاً على الصورة لإظهار الأزرار","pad_watch_no_hevc":"لا يستطيع هذا الجهاز تشغيل صورة هذا البث: الحاسوب يبث بـ HEVC وهذا الجهاز يشغّل H.264 فقط.","pad_watch_decode":"تعذّر تشغيل الصورة هنا.","join_pad_ready":"يد التحكم جاهزة","join_check_unknown_short":"ليست في قائمتنا: قد تكون الأزرار مختلطة.","join_full_to_play":"اضغط على ملء الشاشة للعب بيد التحكم التي على الشاشة.","join_pad_none":"وصّل يد تحكم (USB أو Bluetooth) واضغط أي زر.","join_pad_keys":"أو استخدم لوحة المفاتيح: WASD للتحريك، الأسهم للأزرار الاتجاهية، Enter ✕، Backspace ○، Q □، E △، Tab Options.","join_tv_back_hint":"اضغط على زر الرجوع في جهاز التحكم عن بُعد لإظهار الأزرار.","join_block_note":"أوقف {host} زرَّي PS وCreate للأصدقاء.","join_guide_title":"خطوة أخيرة على التلفاز","join_guide_body":"اضغط زر PS مرة واحدة على يد التحكم. يسأل التلفاز «من يستخدم يد التحكم هذه؟». اختر اللعب السريع أو مستخدمك الخاص. لا يحتاج المضيف إلى فعل أي شيء.","join_guide_menus":"في الشاشة الرئيسية لجهاز PS5 يتحكم المضيف وحده بالقوائم؛ يد التحكم الخاصة بك تلعب داخل الألعاب.","join_guide_ok":"فهمت","join_host_away":"توقف المضيف عن اللعب — بانتظار أن يبدأ من جديد ({time})","join_reconnecting":"جارٍ إعادة الاتصال…","join_reconnecting_left":"مكانك محفوظ لمدة {time}.","pad_turn":"أدر الهاتف أفقيًا","join_game_label":"لعبة {host}","join_title":"انضم إلى لعبة صديق","join_title_body":"العب على PS5 الخاص بـ {host} كلاعب 2 أو 3 أو 4.","join_name_label":"اسمك","join_name_hint":"يرى صديقك هذا الاسم عندما تطلب الانضمام.","join_button":"انضمام"},"bn":{"usb_skipped_not_payload":"{name}: .elf বা .bin ফাইল নয়","usb_skipped_unknown":"{id}: আর পেলোড তালিকায় নেই","browser_unsupported":"এর জন্য ডেস্কটপ অ্যাপ দরকার। এটি ব্রাউজারে কাজ করে না।","video_recovered_notice":"গতবার ছবি শুরু করার সময় খেলুন ক্র্যাশ করেছিল, তাই ছবি এখন গ্রাফিক্স কার্ড ছাড়া ডিকোড হয় (বদলাতে সেটিংস › উইন্ডো › গ্রাফিক্স › হার্ডওয়্যার ভিডিও ডিকোডিং)।","video_recovered_title":"ছবি এখন সফটওয়্যারে ডিকোড হয়","open_in_title":"PS5Upload অ্যাপে খুলবেন?","open_in_body":"এই ডিভাইসে PS5Upload অ্যাপ আছে? সেখানে খুলুন, অথবা ব্রাউজারেই চালিয়ে যান।","open_in_app":"অ্যাপে খুলুন","open_in_browser":"ব্রাউজারে চালিয়ে যান","open_in_remember":"এই ডিভাইসে আমার পছন্দ মনে রাখুন","open_in_opening":"PS5Upload অ্যাপ খোলা হচ্ছে…","open_in_not_opened":"কিছু হলো না? হয়তো এই ডিভাইসে অ্যাপটি নেই।","open_in_again":"আবার চেষ্টা করুন","pad_8bitdo_no_xinput":"এই 8BitDo-তে X-input মোড নেই। কোনো বোতাম ভুল হলে কন্ট্রোলারটি পরীক্ষা করুন।","pad_8bitdo_how_switch":"পেছনের সুইচটি X-এ দিন, তারপর Start চাপুন","pad_8bitdo_how_startx":"এটি বন্ধ করুন, তারপর Start + X চেপে ধরে চালু করুন","pad_8bitdo_how_receiver":"এর 2.4G রিসিভার বা একটি USB কেবল ব্যবহার করুন","pad_8bitdo_how_manual":"এর ম্যানুয়ালে উপায় দেওয়া আছে","pad_8bitdo_xinput":"সেরা ফলের জন্য আপনার 8BitDo-কে X-input মোডে নিন: {how}।","rp_touch_left_stick":"বাম স্টিক","rp_touch_right_stick":"ডান স্টিক","rp_touch_touchpad":"টাচপ্যাড","rp_menu":"মেনু","rp_pad_step_lx":"বাম স্টিক ডানে ঠেলুন","rp_pad_step_ly":"বাম স্টিক নিচে ঠেলুন","rp_pad_step_rx":"ডান স্টিক ডানে ঠেলুন","rp_pad_step_ry":"ডান স্টিক নিচে ঠেলুন","join_check_bottom":"নিচের ফেস বোতামটি চাপুন (✕)","join_check_right":"ডান দিকের ফেস বোতামটি চাপুন (○)","join_check_left":"বাঁ দিকের ফেস বোতামটি চাপুন (□)","join_check_top":"উপরের ফেস বোতামটি চাপুন (△)","rp_pad_press":"{name} চাপুন","join_check_saved":"এই ডিভাইসে এই কন্ট্রোলারের জন্য সেভ হয়েছে। নিচে চেষ্টা করে দেখুন।","join_check_title":"আপনার কন্ট্রোলার পরীক্ষা করুন","join_done":"হয়ে গেছে","rp_pads_none":"এখনও কোনো কন্ট্রোলার দেখা যায়নি। একটি সংযুক্ত করে তার যেকোনো বোতাম চাপুন।","rp_pad_mapped":"আপনার ম্যাপিং দিয়ে খেলে","join_check_unknown":"এই কন্ট্রোলারটি আমাদের তালিকায় নেই, তাই এর বোতামগুলো এলোমেলো হতে পারে। সেট আপ করতে কয়েক সেকেন্ড লাগে।","rp_pad_standard":"শনাক্ত হয়েছে","rp_pad_progress":"{total}-এর মধ্যে {n}","rp_pad_skip":"এড়িয়ে যান","rp_pad_back":"পেছনে","rp_pad_cancel":"বাতিল","join_check_try":"বোতাম চাপুন ও স্টিক নাড়ান: যা চাপবেন তা জ্বলে উঠবে।","join_check_redo":"আবার করুন","join_check_map":"বোতাম সেট আপ করুন","rp_pad_reset":"রিসেট","join_open_lan_body":"ইন্টারনেট পাচ্ছেন না? বন্ধুর সাথে একই Wi-Fi-তে থাকলে সেখানেই গেমটি খুলুন।","join_open_lan":"এই Wi-Fi-তে খুলুন","join_path_lan":"হোম নেটওয়ার্ক","join_path_internet":"ইন্টারনেট","join_seat_taken":"{host}-এর নিজের কন্ট্রোলার ফেরত দরকার ছিল এবং PS5-এ আর কোনো কন্ট্রোলার খালি ছিল না, তাই আপনি গেম থেকে বেরিয়ে গেছেন। {host}-কে আবার ঢুকতে দিতে বলুন।","join_refused_key":"এই আমন্ত্রণের মেয়াদ শেষ। {host}-এর কাছে নতুন লিংক চান।","join_refused_expired":"গেমে আপনার জায়গা চলে গেছে। {host}-কে আবার ঢুকতে দিতে বলুন।","join_refused_full":"গেম পূর্ণ: ইতিমধ্যে চারজন খেলছে।","join_refused_denied":"{host} এবার আপনাকে ঢুকতে দেয়নি।","join_refused_no_answer":"{host} সময়মতো উত্তর দেননি। {host}-কে জানান, তারপর আবার চেষ্টা করুন।","join_refused_closed":"{host} এখন \"একসাথে খেলুন\" চালাচ্ছে না।","join_refused_old_helper":"\"একসাথে খেলুন\"-এর জন্য {host}-এর PS5-এ আপডেট করা হেল্পার দরকার।","join_refused_not_playing":"{host} এখন খেলছে না। {host}-কে আগে খেলা শুরু করতে বলুন।","join_refused_unreachable":"{host}-এর কম্পিউটার তাদের PS5-এ পৌঁছাতে পারেনি। একটু পরে আবার চেষ্টা করুন।","join_refused_slow_down":"অনেক বেশি ভুল কোড। এক মিনিট অপেক্ষা করে আবার চেষ্টা করুন।","join_refused_address":"এই লিঙ্কের ঠিকানা আপনার হোম নেটওয়ার্কের বাইরে, তাই অ্যাপ এটি ব্যবহার করবে না। {host}-এর কাছে তাঁর কম্পিউটারের IP ঠিকানা সহ একটি লিঙ্ক চান।","join_refused_other":"{host} আপনাকে ঢুকতে দেয়নি।","join_ended_kicked":"{host} আপনাকে গেম থেকে বের করে দিয়েছে।","join_ended_closed":"{host} \"একসাথে খেলুন\" বন্ধ করেছে।","join_ended_host_stopped":"হোস্ট খেলা বন্ধ করেছে।","join_ended_replaced":"এই গেমটি অন্য ট্যাব বা ডিভাইসে খোলা হয়েছে, তাই এখানে থেমে গেছে।","join_ended_pad_lost":"PS5 আপনার কন্ট্রোলার হারিয়েছে, তাই আপনি গেমের বাইরে। {host}-কে আবার ঢুকতে দিতে বলুন।","join_ended_gave_up":"{host}-এর সাথে সংযোগ সময়মতো ফিরে আসেনি।","join_net_lost":"{host}-এর সাথে সংযোগ কেটে গেছে। আপনার ইন্টারনেট সংযোগ দেখুন, তারপর আবার অনুরোধ করুন।","join_ended_lost":"{host}-এর কাছে পৌঁছানো যায়নি। আপনারা একই নেটওয়ার্কে আছেন কিনা দেখুন।","join_ended_left":"আপনি গেম ছেড়ে গেছেন।","join_net_mismatch":"এই লিংকটি হোস্টের সঙ্গে মেলে না; তাঁর কাছে নতুন লিংক চান।","join_net_no_direct":"এই নেটওয়ার্ক থেকে সরাসরি সংযোগ সম্ভব নয় (দুই দিকের রাউটারই কড়া)। মোবাইল ডেটার বদলে Wi-Fi চেষ্টা করুন, অথবা হোস্টকে UPnP চালু করতে বলুন।","join_net_no_room":"এই আমন্ত্রণটি আর খোলা নেই। {host}-এর কাছে নতুন লিংক চান।","join_net_full":"{host}-এর গেমে এখন আরেকজন বন্ধুর জায়গা নেই। একটু পরে আবার চেষ্টা করুন।","join_net_no_hub":"PS5Upload আমন্ত্রণ পরিষেবায় পৌঁছানো যায়নি। ইন্টারনেট সংযোগ দেখে আবার চেষ্টা করুন।","join_net_offer":"{host}-এর কম্পিউটার এই ব্রাউজারের সঙ্গে সংযোগ করতে পারেনি। অন্য ব্রাউজার চেষ্টা করুন।","join_net_no_webrtc":"এই ব্রাউজার সরাসরি সংযোগ করতে পারে না। Chrome, Safari বা Firefox-এর নতুন সংস্করণ চেষ্টা করুন।","join_cancel":"বাতিল","join_host_fallback":"আপনার বন্ধু","join_connecting":"{host}-এর সাথে সংযোগ হচ্ছে…","join_waiting":"{host} আপনাকে ঢুকতে দেওয়ার অপেক্ষায়","join_waiting_body":"{host} তার স্ক্রিনে আপনার নাম দেখে \"অনুমতি দিন\" চাপবে।","join_retry":"আবার চেষ্টা করুন","join_again":"আবার যোগ দিতে অনুরোধ করুন","join_playing_at":"{host}-এর কাছে খেলছেন","join_you_are":"আপনি প্লেয়ার {n}","join_seat_stream":"আপনি {host}-এর PS5 ইউজার হিসেবে খেলছেন। ইউজার বাছার দরকার নেই।","join_plays_as":"আপনি {profile} হিসেবে খেলছেন। কাউকে বেছে নিতে হবে না।","join_seat_tv_asks":"{host} আপনার জন্য একটি প্রোফাইল বেছে রেখেছিল, কিন্তু সেটা ব্যবহার করা যায়নি। টিভি জিজ্ঞেস করবে আপনি কে।","join_picking":"PS চাপুন, তারপর টিভিতে দ্রুত খেলা বেছে নিন","join_hide_controls":"লুকান","join_sound":"শব্দের জন্য ট্যাপ করুন","rp_unmute":"শব্দ চালু","rp_mute":"নিঃশব্দ","join_no_sound":"এই ব্রাউজারে শব্দ নেই","join_exit_fullscreen":"ফুল স্ক্রিন থেকে বের হন","pad_fill":"পূর্ণ স্ক্রিন","join_leave":"ছেড়ে যান","join_show_controls":"নিয়ন্ত্রণগুলি দেখান","join_hold_hint":"বোতামগুলো দেখাতে ছবিতে চেপে ধরে রাখুন","pad_watch_no_hevc":"এই ডিভাইস এই স্ট্রিমের ছবি চালাতে পারে না: কম্পিউটার HEVC-তে স্ট্রিম করে, আর এই ডিভাইস শুধু H.264 চালায়।","pad_watch_decode":"ছবিটি এখানে চালানো যায়নি।","join_pad_ready":"আপনার কন্ট্রোলার প্রস্তুত","join_check_unknown_short":"আমাদের তালিকায় নেই: বোতামগুলো এলোমেলো হতে পারে।","join_full_to_play":"অন-স্ক্রিন কন্ট্রোলার দিয়ে খেলতে ফুল স্ক্রিনে ট্যাপ করুন।","join_pad_none":"একটি কন্ট্রোলার সংযুক্ত করুন (USB বা Bluetooth) এবং যেকোনো বোতাম চাপুন।","join_pad_keys":"অথবা কিবোর্ড ব্যবহার করুন: WASD নড়াচড়া, তীর চিহ্ন D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options।","join_tv_back_hint":"বোতামগুলো দেখতে রিমোটে Back চাপুন।","join_block_note":"{host} বন্ধুদের জন্য PS ও Create বন্ধ করে রেখেছে।","join_guide_title":"টিভিতে আর একটি ধাপ","join_guide_body":"আপনার কন্ট্রোলারে একবার PS চাপুন। টিভি জিজ্ঞেস করবে \"এই কন্ট্রোলার কে ব্যবহার করছে?\"। দ্রুত খেলা বা নিজের ইউজার বেছে নিন। হোস্টকে কিছু করতে হবে না।","join_guide_menus":"PS5-এর হোম স্ক্রিনে শুধু হোস্ট মেনু চালাতে পারে; আপনার কন্ট্রোলার গেমের ভেতরে খেলে।","join_guide_ok":"বুঝেছি","join_host_away":"হোস্ট খেলা বন্ধ করেছে — আবার শুরু করার অপেক্ষায় ({time})","join_reconnecting":"আবার সংযোগ হচ্ছে…","join_reconnecting_left":"আপনার জায়গা {time} ধরে রাখা থাকবে।","pad_turn":"ফোনটি আড়াআড়ি ঘোরান","join_game_label":"{host}-এর গেম","join_title":"বন্ধুর গেমে যোগ দিন","join_title_body":"{host}-এর PS5-এ প্লেয়ার 2, 3 বা 4 হিসেবে খেলুন।","join_name_label":"আপনার নাম","join_name_hint":"যোগ দিতে অনুরোধ করলে আপনার বন্ধু এটি দেখবে।","join_button":"যোগ দিন"},"de":{"usb_skipped_not_payload":"{name}: keine .elf- oder .bin-Datei","usb_skipped_unknown":"{id}: nicht mehr in der Payload-Liste","browser_unsupported":"Dafür brauchst du die Desktop-App. Im Browser funktioniert das nicht.","video_recovered_notice":"Play ist beim letzten Mal beim Starten des Bildes abgestürzt, daher wird das Bild jetzt ohne Grafikkarte dekodiert (ändern unter Einstellungen › Fenster › Grafik › Hardware-Videodekodierung).","video_recovered_title":"Bild wird jetzt per Software dekodiert","open_in_title":"In der PS5Upload-App öffnen?","open_in_body":"Hast du die PS5Upload-App auf diesem Gerät? Öffne dies dort oder mach im Browser weiter.","open_in_app":"In der App öffnen","open_in_browser":"Im Browser weiter","open_in_remember":"Meine Wahl auf diesem Gerät merken","open_in_opening":"PS5Upload-App wird geöffnet …","open_in_not_opened":"Nichts passiert? Die App ist vielleicht nicht auf diesem Gerät.","open_in_again":"Erneut versuchen","pad_8bitdo_no_xinput":"Dieser 8BitDo hat keinen X-input-Modus. Wenn eine Taste falsch ist, prüfe den Controller.","pad_8bitdo_how_switch":"stell den Schalter auf der Rückseite auf X und drück dann Start","pad_8bitdo_how_startx":"schalte ihn aus und halte dann Start + X gedrückt, um ihn einzuschalten","pad_8bitdo_how_receiver":"nutze seinen 2.4G-Empfänger oder ein USB-Kabel","pad_8bitdo_how_manual":"wie, steht in seiner Anleitung","pad_8bitdo_xinput":"Für das beste Ergebnis schalte deinen 8BitDo in den X-input-Modus: {how}.","rp_touch_left_stick":"Linker Stick","rp_touch_right_stick":"Rechter Stick","rp_menu":"Menü","rp_pad_step_lx":"Drücke den linken Stick nach rechts","rp_pad_step_ly":"Drücke den linken Stick nach unten","rp_pad_step_rx":"Drücke den rechten Stick nach rechts","rp_pad_step_ry":"Drücke den rechten Stick nach unten","join_check_bottom":"Drück die untere Aktionstaste (✕)","join_check_right":"Drück die rechte Aktionstaste (○)","join_check_left":"Drück die linke Aktionstaste (□)","join_check_top":"Drück die obere Aktionstaste (△)","rp_pad_press":"Drücke {name}","join_check_saved":"Für diesen Controller auf diesem Gerät gespeichert. Probier es unten aus.","join_check_title":"Controller prüfen","join_done":"Fertig","rp_pads_none":"Noch kein Controller erkannt. Schließe einen an und drücke eine beliebige Taste darauf.","rp_pad_mapped":"Spielt mit deiner Belegung","join_check_unknown":"Dieser Controller ist nicht auf unserer Liste, die Tasten könnten also vertauscht sein. Das Einrichten dauert nur ein paar Sekunden.","rp_pad_standard":"Erkannt","rp_pad_progress":"{n} von {total}","rp_pad_skip":"Überspringen","rp_pad_back":"Zurück","rp_pad_cancel":"Abbrechen","join_check_try":"Drück Tasten und beweg die Sticks: Was du drückst, leuchtet auf.","join_check_redo":"Neu einrichten","join_check_map":"Tasten einrichten","rp_pad_reset":"Zurücksetzen","join_open_lan_body":"Kein Internet? Wenn du im selben WLAN wie dein Freund bist, öffne das Spiel dort.","join_open_lan":"In diesem WLAN öffnen","join_path_lan":"Heimnetz","join_seat_taken":"{host} brauchte seinen Controller zurück, und auf der PS5 war kein anderer Controller frei, daher bist du aus dem Spiel. Bitte {host}, dich wieder hereinzulassen.","join_refused_key":"Diese Einladung ist abgelaufen. Bitte {host} um einen neuen Link.","join_refused_expired":"Dein Platz im Spiel ist verloren. Bitte {host}, dich wieder hereinzulassen.","join_refused_full":"Das Spiel ist voll: Es sind schon vier Spieler da.","join_refused_denied":"{host} hat dich diesmal nicht reingelassen.","join_refused_no_answer":"{host} hat nicht rechtzeitig geantwortet. Sag {host} Bescheid und versuche es noch einmal.","join_refused_closed":"{host} bietet gerade kein „Zusammen spielen“ an.","join_refused_old_helper":"Die PS5 von {host} braucht einen aktuellen Helfer für „Zusammen spielen“.","join_refused_not_playing":"{host} spielt gerade nicht. Bitte {host}, zuerst Spielen zu starten.","join_refused_unreachable":"Der Computer von {host} hat die PS5 nicht erreicht. Versuch es gleich noch einmal.","join_refused_slow_down":"Zu viele falsche Codes. Warte eine Minute und versuch es dann noch einmal.","join_refused_address":"Die Adresse dieses Links liegt außerhalb deines Heimnetzes, daher verwendet die App sie nicht. Bitte {host} um einen Link mit der IP-Adresse des Computers.","join_refused_other":"{host} hat dich nicht reingelassen.","join_ended_kicked":"{host} hat dich aus dem Spiel genommen.","join_ended_closed":"{host} hat „Zusammen spielen“ beendet.","join_ended_host_stopped":"Der Gastgeber hat aufgehört zu spielen.","join_ended_replaced":"Dieses Spiel wurde in einem anderen Tab oder auf einem anderen Gerät geöffnet, daher wurde es hier beendet.","join_ended_pad_lost":"Die PS5 hat deinen Controller verloren, daher bist du aus dem Spiel. Bitte {host}, dich wieder hereinzulassen.","join_ended_gave_up":"Die Verbindung zu {host} kam nicht rechtzeitig zurück.","join_net_lost":"Die Verbindung zu {host} ist abgebrochen. Prüfe deine Internetverbindung und frage dann erneut.","join_ended_lost":"{host} nicht erreichbar. Prüfe, ob ihr im selben Netzwerk seid.","join_ended_left":"Du hast das Spiel verlassen.","join_net_mismatch":"Dieser Link passt nicht zum Gastgeber. Bitte ihn um einen neuen.","join_net_no_direct":"Von diesem Netzwerk aus ist keine direkte Verbindung möglich (die Router beider Seiten sind streng). Versuche WLAN statt mobiler Daten oder bitte den Gastgeber, UPnP einzuschalten.","join_net_no_room":"Diese Einladung ist nicht mehr offen. Bitte {host} um einen neuen Link.","join_net_full":"Im Spiel von {host} ist gerade kein Platz für einen weiteren Freund. Versuche es gleich noch einmal.","join_net_no_hub":"Der Einladungsdienst von PS5Upload ist nicht erreichbar. Prüfe deine Internetverbindung und versuche es dann erneut.","join_net_offer":"Der Computer von {host} konnte sich nicht mit diesem Browser verbinden. Versuche einen anderen Browser.","join_net_no_webrtc":"Dieser Browser kann keine direkten Verbindungen herstellen. Versuche ein aktuelles Chrome, Safari oder Firefox.","join_cancel":"Abbrechen","join_host_fallback":"dein Freund","join_connecting":"Verbinde mit {host}…","join_waiting":"Warte, bis {host} dich reinlässt","join_waiting_body":"{host} sieht deinen Namen auf dem Bildschirm und tippt auf „Zulassen“.","join_retry":"Erneut versuchen","join_again":"Erneut zum Mitspielen anfragen","join_playing_at":"Du spielst bei {host}","join_you_are":"Du bist Spieler {n}","join_seat_stream":"Du spielst als PS5-Benutzer von {host}. Du musst keinen wählen.","join_plays_as":"Du spielst als {profile}. Du musst keinen wählen.","join_seat_tv_asks":"{host} hat ein Profil für dich gewählt, aber es konnte nicht genutzt werden. Der Fernseher fragt, wer du bist.","join_picking":"PS drücken, dann am Fernseher „Schnellspiel“ wählen","join_hide_controls":"Ausblenden","join_sound":"Für Ton tippen","rp_unmute":"Ton an","rp_mute":"Stumm","join_no_sound":"Kein Ton in diesem Browser","join_exit_fullscreen":"Vollbild verlassen","pad_fill":"Vollbild","join_leave":"Verlassen","join_show_controls":"Steuerelemente einblenden","join_hold_hint":"Bild gedrückt halten, um die Tasten einzublenden","pad_watch_no_hevc":"Dieses Gerät kann das Bild dieses Streams nicht abspielen: Der Computer streamt HEVC, dieses Gerät kann nur H.264.","pad_watch_decode":"Das Bild konnte hier nicht abgespielt werden.","join_pad_ready":"Dein Controller ist bereit","join_check_unknown_short":"Nicht auf unserer Liste: Tasten könnten vertauscht sein.","join_full_to_play":"Tippe auf Vollbild, um mit dem Bildschirm-Controller zu spielen.","join_pad_none":"Schließe einen Controller an (USB oder Bluetooth) und drücke eine beliebige Taste.","join_pad_keys":"Oder nutze die Tastatur: WASD bewegen, Pfeiltasten Steuerkreuz, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Drücke auf der Fernbedienung Zurück, um die Schaltflächen einzublenden.","join_block_note":"{host} hat PS und Create für Freunde ausgeschaltet.","join_guide_title":"Noch ein Schritt am Fernseher","join_guide_body":"Drücke einmal PS auf deinem Controller. Der Fernseher fragt „Wer benutzt diesen Controller?“. Wähle „Schnellspiel“ oder deinen eigenen Benutzer. Der Gastgeber muss nichts tun.","join_guide_menus":"Auf dem Startbildschirm der PS5 steuert nur der Gastgeber die Menüs; dein Controller spielt in den Spielen.","join_guide_ok":"Verstanden","join_host_away":"Der Gastgeber hat aufgehört zu spielen – wir warten, bis er wieder anfängt ({time})","join_reconnecting":"Verbinde neu…","join_reconnecting_left":"Dein Platz wird {time} lang freigehalten.","pad_turn":"Dreh das Handy quer","join_game_label":"Spiel von {host}","join_title":"Bei Freunden mitspielen","join_title_body":"Spiele auf der PS5 von {host} als Spieler 2, 3 oder 4.","join_name_label":"Dein Name","join_name_hint":"Das sieht dein Freund, wenn du zum Mitspielen anfragst.","join_button":"Mitspielen"},"en":{"usb_skipped_not_payload":"{name}: not an .elf or .bin file","usb_skipped_unknown":"{id}: not in the payload list any more","browser_unsupported":"This needs the desktop app. It does not work in the browser.","video_recovered_notice":"Play crashed while starting the picture last time, so the picture is now decoded without the graphics card (Settings › Window › Graphics › Hardware video decoding to change it).","video_recovered_title":"Picture now decoded in software","open_in_title":"Open in the PS5Upload app?","open_in_body":"Have the PS5Upload app on this device? Open this there, or carry on in the browser.","open_in_app":"Open in the app","open_in_browser":"Continue in browser","open_in_remember":"Remember my choice on this device","open_in_opening":"Opening the PS5Upload app…","open_in_not_opened":"Nothing happened? The app may not be on this device.","open_in_again":"Try again","pad_8bitdo_no_xinput":"This 8BitDo has no X-input mode. If a button is wrong, check the controller.","pad_8bitdo_how_switch":"set the switch on the back to X, then press Start","pad_8bitdo_how_startx":"turn it off, then hold Start + X to turn it on","pad_8bitdo_how_receiver":"use its 2.4G receiver or a USB cable","pad_8bitdo_how_manual":"its manual says how","pad_8bitdo_xinput":"For the best result, switch your 8BitDo to X-input mode: {how}.","rp_touch_left_stick":"Left stick","rp_touch_right_stick":"Right stick","rp_touch_touchpad":"Touchpad","rp_menu":"Menu","rp_pad_step_lx":"Push the left stick right","rp_pad_step_ly":"Push the left stick down","rp_pad_step_rx":"Push the right stick right","rp_pad_step_ry":"Push the right stick down","join_check_bottom":"Press the bottom face button (✕)","join_check_right":"Press the right face button (○)","join_check_left":"Press the left face button (□)","join_check_top":"Press the top face button (△)","rp_pad_press":"Press {name}","join_check_saved":"Saved for this controller on this device. Try it below.","join_check_title":"Check your controller","join_done":"Done","rp_pads_none":"No controller seen yet. Connect one and press any button on it.","rp_pad_mapped":"Plays with your mapping","join_check_unknown":"This controller isn't on our list, so its buttons may be mixed up. Setting it up takes a few seconds.","rp_pad_standard":"Recognized","rp_pad_progress":"{n} of {total}","rp_pad_skip":"Skip","rp_pad_back":"Back","rp_pad_cancel":"Cancel","join_check_try":"Press buttons and move the sticks: what you press lights up.","join_check_redo":"Redo","join_check_map":"Set up the buttons","rp_pad_reset":"Reset","join_open_lan_body":"Can't reach the internet? If you're on the same Wi-Fi as your friend, open the game there.","join_open_lan":"Open on this Wi-Fi","join_path_lan":"Home network","join_path_tailscale":"Tailscale","join_path_internet":"Internet","join_seat_taken":"{host} needed their controller back and no other controller was free on the PS5, so you're out of the game. Ask {host} to let you in again.","join_refused_key":"This invite has expired. Ask {host} for a new link.","join_refused_expired":"Your place in the game was lost. Ask {host} to let you in again.","join_refused_full":"The game is full: four players already.","join_refused_denied":"{host} didn't let you in this time.","join_refused_no_answer":"{host} didn't answer in time. Tell {host}, then try again.","join_refused_closed":"{host} isn't hosting Play Together right now.","join_refused_old_helper":"{host}'s PS5 needs an updated helper for Play Together.","join_refused_not_playing":"{host} isn't playing right now. Ask {host} to start Play first.","join_refused_unreachable":"{host}'s computer couldn't reach their PS5. Try again in a moment.","join_refused_slow_down":"Too many wrong codes. Wait a minute, then try again.","join_refused_address":"This link's address is outside your home network, so the app will not use it. Ask {host} for a link with their computer's IP address.","join_refused_other":"{host} didn't let you in.","join_ended_kicked":"{host} took you out of the game.","join_ended_closed":"{host} closed Play Together.","join_ended_host_stopped":"The host stopped playing.","join_ended_replaced":"This game was opened in another tab or on another device, so it stopped here.","join_ended_pad_lost":"The PS5 lost your controller, so you're out of the game. Ask {host} to let you in again.","join_ended_gave_up":"The connection to {host} didn't come back in time.","join_net_lost":"The connection to {host} dropped. Check your internet connection, then ask again.","join_ended_lost":"Couldn't reach {host}. Check that you're on the same network.","join_ended_left":"You left the game.","join_net_mismatch":"This link doesn't match the host; ask them for a new one.","join_net_no_direct":"A direct connection isn't possible from this network (both sides' routers are strict). Try Wi-Fi instead of mobile data, or ask the host to turn on UPnP.","join_net_no_room":"This invite isn't open any more. Ask {host} for a new link.","join_net_full":"{host}'s game has no room for another friend right now. Try again in a moment.","join_net_no_hub":"Couldn't reach the PS5Upload invite service. Check your internet connection, then try again.","join_net_offer":"{host}'s computer couldn't connect to this browser. Try another browser.","join_net_no_webrtc":"This browser can't make direct connections. Try a recent Chrome, Safari or Firefox.","join_cancel":"Cancel","join_host_fallback":"your friend","join_connecting":"Connecting to {host}…","join_waiting":"Waiting for {host} to let you in","join_waiting_body":"{host} sees your name on their screen and taps Allow.","join_retry":"Try again","join_again":"Ask to join again","join_playing_at":"Playing at {host}'s","join_you_are":"You are Player {n}","join_seat_stream":"You're playing as {host}'s PS5 user. No need to pick one.","join_plays_as":"You're playing as {profile}. No need to pick one.","join_seat_tv_asks":"{host} chose a profile for you, but it couldn't be used. The TV will ask who you are.","join_picking":"Press PS, then pick Quick Play on the TV","join_hide_controls":"Hide","join_sound":"Tap for sound","rp_unmute":"Sound on","rp_mute":"Mute","join_no_sound":"No sound in this browser","join_exit_fullscreen":"Leave full screen","pad_fill":"Full screen","join_leave":"Leave","join_show_controls":"Show controls","join_hold_hint":"Press and hold the picture to show the buttons","pad_watch_no_hevc":"This device can't play this stream's picture: the computer streams HEVC, and this device plays only H.264.","pad_watch_decode":"The picture could not be played here.","join_pad_ready":"Your controller is ready","join_check_unknown_short":"Not on our list: buttons may be mixed up.","join_full_to_play":"Tap full screen to play with the on-screen controller.","join_pad_none":"Connect a controller (USB or Bluetooth) and press any button.","join_pad_keys":"Or use the keyboard: WASD move, arrows D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Press Back on the remote for the buttons.","join_block_note":"{host} turned off PS and Create for friends.","join_guide_title":"One more step on the TV","join_guide_body":"On your controller, press PS once. The TV asks \"Who's using this controller?\". Pick Quick Play or your own user. The host doesn't need to do anything.","join_guide_menus":"On the PS5's home screen only the host controls the menus; your controller plays inside games.","join_guide_ok":"Got it","join_host_away":"The host stopped playing — waiting for them to start again ({time})","join_reconnecting":"Reconnecting…","join_reconnecting_left":"Your place is kept for {time}.","pad_turn":"Turn the phone sideways","join_game_label":"{host}'s game","join_title":"Join a friend's game","join_title_body":"Play on {host}'s PS5 as Player 2, 3 or 4.","join_name_label":"Your name","join_name_hint":"Your friend sees this when you ask to join.","join_button":"Join"},"es":{"usb_skipped_not_payload":"{name}: no es un archivo .elf ni .bin","usb_skipped_unknown":"{id}: ya no está en la lista de payloads","browser_unsupported":"Esto necesita la aplicación de escritorio. No funciona en el navegador.","video_recovered_notice":"Play se cerró al iniciar la imagen la última vez, así que ahora la imagen se decodifica sin la tarjeta gráfica (cámbialo en Configuración › Ventana › Gráficos › Decodificación de vídeo por hardware).","video_recovered_title":"La imagen ahora se decodifica por software","open_in_title":"¿Abrir en la app PS5Upload?","open_in_body":"¿Tienes la app PS5Upload en este dispositivo? Ábrelo ahí o sigue en el navegador.","open_in_app":"Abrir en la app","open_in_browser":"Seguir en el navegador","open_in_remember":"Recordar mi elección en este dispositivo","open_in_opening":"Abriendo la app PS5Upload…","open_in_not_opened":"¿No pasó nada? Puede que la app no esté en este dispositivo.","open_in_again":"Reintentar","pad_8bitdo_no_xinput":"Este 8BitDo no tiene modo X-input. Si un botón no va bien, comprueba el mando.","pad_8bitdo_how_switch":"pon el interruptor de atrás en X y pulsa Start","pad_8bitdo_how_startx":"apágalo y luego mantén Start + X para encenderlo","pad_8bitdo_how_receiver":"usa su receptor 2.4G o un cable USB","pad_8bitdo_how_manual":"su manual explica cómo","pad_8bitdo_xinput":"Para el mejor resultado, pon tu 8BitDo en modo X-input: {how}.","rp_touch_left_stick":"Joystick izquierdo","rp_touch_right_stick":"Joystick derecho","rp_touch_touchpad":"Panel táctil","rp_menu":"Menú","rp_pad_step_lx":"Mueve el stick izquierdo a la derecha","rp_pad_step_ly":"Mueve el stick izquierdo hacia abajo","rp_pad_step_rx":"Mueve el stick derecho a la derecha","rp_pad_step_ry":"Mueve el stick derecho hacia abajo","join_check_bottom":"Pulsa el botón de acción de abajo (✕)","join_check_right":"Pulsa el botón de acción de la derecha (○)","join_check_left":"Pulsa el botón de acción de la izquierda (□)","join_check_top":"Pulsa el botón de acción de arriba (△)","rp_pad_press":"Pulsa {name}","join_check_saved":"Guardado para este mando en este dispositivo. Pruébalo abajo.","join_check_title":"Comprueba tu mando","join_done":"Listo","rp_pads_none":"Aún no se ve ningún mando. Conecta uno y pulsa cualquier botón.","rp_pad_mapped":"Juega con tu asignación","join_check_unknown":"Este mando no está en nuestra lista, así que sus botones pueden estar cambiados. Configurarlo lleva unos segundos.","rp_pad_standard":"Reconocido","rp_pad_progress":"{n} de {total}","rp_pad_skip":"Omitir","rp_pad_back":"Atrás","rp_pad_cancel":"Cancelar","join_check_try":"Pulsa botones y mueve los sticks: lo que pulses se ilumina.","join_check_redo":"Rehacer","join_check_map":"Configurar los botones","rp_pad_reset":"Restablecer","join_open_lan_body":"¿Sin internet? Si estás en el mismo Wi-Fi que tu amigo, abre la partida desde ahí.","join_open_lan":"Abrir en este Wi-Fi","join_path_lan":"Red doméstica","join_seat_taken":"{host} necesitaba recuperar su mando y no había otro mando libre en la PS5, así que has salido de la partida. Pide a {host} que te deje entrar otra vez.","join_refused_key":"Esta invitación ha caducado. Pide a {host} un enlace nuevo.","join_refused_expired":"Perdiste tu sitio en la partida. Pide a {host} que te deje entrar de nuevo.","join_refused_full":"La partida está llena: ya hay cuatro jugadores.","join_refused_denied":"{host} no te dejó entrar esta vez.","join_refused_no_answer":"{host} no respondió a tiempo. Avisa a {host} e inténtalo de nuevo.","join_refused_closed":"{host} no está ofreciendo Jugar juntos ahora mismo.","join_refused_old_helper":"La PS5 de {host} necesita un ayudante actualizado para Jugar juntos.","join_refused_not_playing":"{host} no está jugando ahora. Pide a {host} que inicie Jugar primero.","join_refused_unreachable":"El ordenador de {host} no pudo conectar con su PS5. Inténtalo de nuevo en un momento.","join_refused_slow_down":"Demasiados códigos incorrectos. Espera un minuto y vuelve a intentarlo.","join_refused_address":"La dirección de este enlace está fuera de tu red doméstica, así que la aplicación no la usará. Pide a {host} un enlace con la dirección IP de su equipo.","join_refused_other":"{host} no te dejó entrar.","join_ended_kicked":"{host} te sacó de la partida.","join_ended_closed":"{host} cerró Jugar juntos.","join_ended_host_stopped":"El anfitrión dejó de jugar.","join_ended_replaced":"Esta partida se abrió en otra pestaña o en otro dispositivo, así que terminó aquí.","join_ended_pad_lost":"La PS5 perdió tu mando, así que estás fuera de la partida. Pide a {host} que te deje entrar de nuevo.","join_ended_gave_up":"La conexión con {host} no volvió a tiempo.","join_net_lost":"Se cortó la conexión con {host}. Revisa tu conexión a internet y vuelve a pedirlo.","join_ended_lost":"No se pudo contactar con {host}. Comprueba que estéis en la misma red.","join_ended_left":"Saliste de la partida.","join_net_mismatch":"Este enlace no coincide con el anfitrión; pídele uno nuevo.","join_net_no_direct":"No es posible una conexión directa desde esta red (los routers de ambos lados son estrictos). Prueba con Wi-Fi en lugar de datos móviles o pide al anfitrión que active UPnP.","join_net_no_room":"Esta invitación ya no está abierta. Pide a {host} un enlace nuevo.","join_net_full":"La partida de {host} no tiene sitio para otro amigo ahora mismo. Inténtalo de nuevo en un momento.","join_net_no_hub":"No se pudo contactar con el servicio de invitaciones de PS5Upload. Comprueba tu conexión a internet e inténtalo de nuevo.","join_net_offer":"El ordenador de {host} no pudo conectar con este navegador. Prueba con otro navegador.","join_net_no_webrtc":"Este navegador no puede hacer conexiones directas. Prueba una versión reciente de Chrome, Safari o Firefox.","join_cancel":"Cancelar","join_host_fallback":"tu amigo","join_connecting":"Conectando con {host}…","join_waiting":"Esperando a que {host} te deje entrar","join_waiting_body":"{host} ve tu nombre en su pantalla y toca Permitir.","join_retry":"Reintentar","join_again":"Pedir unirme otra vez","join_playing_at":"Jugando en casa de {host}","join_you_are":"Eres el Jugador {n}","join_seat_stream":"Juegas con el usuario de PS5 de {host}. No hace falta elegir uno.","join_plays_as":"Juegas como {profile}. No hace falta elegir uno.","join_seat_tv_asks":"{host} eligió un perfil para ti, pero no se pudo usar. La TV te preguntará quién eres.","join_picking":"Pulsa PS y luego elige Juego rápido en la tele","join_hide_controls":"Ocultar","join_sound":"Activar sonido","rp_unmute":"Activar sonido","rp_mute":"Silenciar","join_no_sound":"Sin sonido en este navegador","join_exit_fullscreen":"Salir de pantalla completa","pad_fill":"Pantalla completa","join_leave":"Salir","join_show_controls":"Mostrar controles","join_hold_hint":"Mantén pulsada la imagen para mostrar los botones","pad_watch_no_hevc":"Este dispositivo no puede reproducir la imagen de este stream: el ordenador emite en HEVC y este dispositivo solo reproduce H.264.","pad_watch_decode":"La imagen no se pudo reproducir aquí.","join_pad_ready":"Tu mando está listo","join_check_unknown_short":"No está en nuestra lista: los botones pueden estar cambiados.","join_full_to_play":"Toca pantalla completa para jugar con el mando en pantalla.","join_pad_none":"Conecta un mando (USB o Bluetooth) y pulsa cualquier botón.","join_pad_keys":"O usa el teclado: WASD para moverte, flechas cruceta, Enter ✕, Retroceso ○, Q □, E △, Tab Options.","join_tv_back_hint":"Pulsa Atrás en el mando a distancia para ver los botones.","join_block_note":"{host} desactivó PS y Create para los amigos.","join_guide_title":"Un paso más en la tele","join_guide_body":"Pulsa PS una vez en tu mando. La tele pregunta «¿Quién usa este mando?». Elige Juego rápido o tu propio usuario. El anfitrión no tiene que hacer nada.","join_guide_menus":"En la pantalla de inicio de la PS5 solo el anfitrión controla los menús; tu mando juega dentro de los juegos.","join_guide_ok":"Entendido","join_host_away":"El anfitrión dejó de jugar: esperando a que vuelva a empezar ({time})","join_reconnecting":"Reconectando…","join_reconnecting_left":"Tu sitio se guarda durante {time}.","pad_turn":"Gira el móvil en horizontal","join_game_label":"Partida de {host}","join_title":"Unirse a la partida de un amigo","join_title_body":"Juega en la PS5 de {host} como Jugador 2, 3 o 4.","join_name_label":"Tu nombre","join_name_hint":"Tu amigo lo verá cuando pidas unirte.","join_button":"Unirme"},"fa":{"usb_skipped_not_payload":"{name}: فایل .elf یا .bin نیست","usb_skipped_unknown":"{id}: دیگر در فهرست پیلودها نیست","browser_unsupported":"این کار به برنامه رومیزی نیاز دارد. در مرورگر کار نمی‌کند.","video_recovered_notice":"دفعهٔ پیش «بازی» هنگام شروع تصویر از کار افتاد، پس تصویر اکنون بدون کارت گرافیک رمزگشایی می‌شود (برای تغییر: تنظیمات › پنجره › گرافیک › رمزگشایی ویدیو با سخت‌افزار).","video_recovered_title":"تصویر اکنون با نرم‌افزار رمزگشایی می‌شود","open_in_title":"در برنامهٔ PS5Upload باز شود؟","open_in_body":"برنامهٔ PS5Upload روی این دستگاه هست؟ این را آنجا باز کنید، یا در مرورگر ادامه دهید.","open_in_app":"باز کردن در برنامه","open_in_browser":"ادامه در مرورگر","open_in_remember":"انتخابم را روی این دستگاه به خاطر بسپار","open_in_opening":"در حال باز کردن برنامهٔ PS5Upload…","open_in_not_opened":"اتفاقی نیفتاد؟ شاید برنامه روی این دستگاه نیست.","open_in_again":"دوباره امتحان کنید","pad_8bitdo_no_xinput":"این 8BitDo حالت X-input ندارد. اگر دکمه‌ای اشتباه است، کنترلر را بررسی کنید.","pad_8bitdo_how_switch":"کلید پشت را روی X بگذارید، سپس Start را بزنید","pad_8bitdo_how_startx":"آن را خاموش کنید، سپس Start + X را نگه دارید تا روشن شود","pad_8bitdo_how_receiver":"از گیرنده 2.4G آن یا کابل USB استفاده کنید","pad_8bitdo_how_manual":"دفترچه راهنمای آن روش را می‌گوید","pad_8bitdo_xinput":"برای بهترین نتیجه، 8BitDo خود را به حالت X-input ببرید: {how}.","rp_touch_left_stick":"استیک چپ","rp_touch_right_stick":"استیک راست","rp_touch_touchpad":"صفحه لمسی","rp_menu":"منو","rp_pad_step_lx":"استیک چپ را به راست فشار دهید","rp_pad_step_ly":"استیک چپ را به پایین فشار دهید","rp_pad_step_rx":"استیک راست را به راست فشار دهید","rp_pad_step_ry":"استیک راست را به پایین فشار دهید","join_check_bottom":"دکمهٔ پایینی را بزنید (✕)","join_check_right":"دکمهٔ سمت راست را بزنید (○)","join_check_left":"دکمهٔ سمت چپ را بزنید (□)","join_check_top":"دکمهٔ بالایی را بزنید (△)","rp_pad_press":"{name} را فشار دهید","join_check_saved":"برای این کنترلر روی این دستگاه ذخیره شد. پایین امتحانش کنید.","join_check_title":"کنترلر خود را بررسی کنید","join_done":"تمام","rp_pads_none":"هنوز دسته‌ای دیده نشده. یکی وصل کنید و یکی از دکمه‌هایش را فشار دهید.","rp_pad_mapped":"با نگاشت شما بازی می‌کند","join_check_unknown":"این کنترلر در فهرست ما نیست، پس ممکن است دکمه‌هایش جابه‌جا باشند. تنظیم آن چند ثانیه طول می‌کشد.","rp_pad_standard":"شناخته شد","rp_pad_progress":"{n} از {total}","rp_pad_skip":"رد کردن","rp_pad_back":"بازگشت","rp_pad_cancel":"لغو","join_check_try":"دکمه‌ها را بزنید و استیک‌ها را حرکت دهید: هر چه بزنید روشن می‌شود.","join_check_redo":"انجام دوباره","join_check_map":"تنظیم دکمه‌ها","rp_pad_reset":"بازنشانی","join_open_lan_body":"به اینترنت دسترسی ندارید؟ اگر با دوستتان روی یک Wi-Fi هستید، بازی را آنجا باز کنید.","join_open_lan":"باز کردن روی همین Wi-Fi","join_path_lan":"شبکهٔ خانگی","join_path_internet":"اینترنت","join_seat_taken":"{host} دستهٔ خودش را لازم داشت و دستهٔ آزاد دیگری روی PS5 نبود، پس از بازی بیرون رفتید. از {host} بخواهید دوباره راهتان بدهد.","join_refused_key":"این دعوت منقضی شده است. از {host} پیوند جدید بخواهید.","join_refused_expired":"جای شما در بازی از دست رفت. از {host} بخواهید دوباره راهتان بدهد.","join_refused_full":"بازی پر است: چهار بازیکن از قبل هستند.","join_refused_denied":"{host} این بار اجازهٔ ورود نداد.","join_refused_no_answer":"{host} به‌موقع پاسخ نداد. به {host} خبر دهید و دوباره امتحان کنید.","join_refused_closed":"{host} الان «بازی با هم» را میزبانی نمی‌کند.","join_refused_old_helper":"PS5 {host} برای «بازی با هم» به دستیار به‌روز نیاز دارد.","join_refused_not_playing":"{host} الان بازی نمی‌کند. از {host} بخواهید اول بازی را شروع کند.","join_refused_unreachable":"رایانهٔ {host} به PS5 دسترسی پیدا نکرد. کمی بعد دوباره امتحان کنید.","join_refused_slow_down":"تعداد کدهای اشتباه زیاد است. یک دقیقه صبر کنید و دوباره امتحان کنید.","join_refused_address":"نشانی این پیوند بیرون از شبکه خانگی شماست، پس برنامه از آن استفاده نمی‌کند. از {host} پیوندی با نشانی IP رایانه‌اش بخواهید.","join_refused_other":"{host} اجازهٔ ورود نداد.","join_ended_kicked":"{host} شما را از بازی بیرون کرد.","join_ended_closed":"{host} «بازی با هم» را بست.","join_ended_host_stopped":"میزبان بازی را متوقف کرد.","join_ended_replaced":"این بازی در زبانه یا دستگاه دیگری باز شد، پس اینجا متوقف شد.","join_ended_pad_lost":"PS5 دستهٔ شما را از دست داد، پس از بازی بیرون رفتید. از {host} بخواهید دوباره راهتان بدهد.","join_ended_gave_up":"اتصال به {host} به‌موقع برنگشت.","join_net_lost":"اتصال به {host} قطع شد. اتصال اینترنت خود را بررسی کنید و دوباره درخواست دهید.","join_ended_lost":"دسترسی به {host} ممکن نشد. بررسی کنید روی یک شبکه باشید.","join_ended_left":"از بازی خارج شدید.","join_net_mismatch":"این پیوند با میزبان جور نیست؛ از او پیوند تازه‌ای بخواهید.","join_net_no_direct":"اتصال مستقیم از این شبکه ممکن نیست (روترهای هر دو طرف سخت‌گیرند). به‌جای داده همراه Wi-Fi را امتحان کنید یا از میزبان بخواهید UPnP را روشن کند.","join_net_no_room":"این دعوت دیگر باز نیست. از {host} پیوند تازه‌ای بخواهید.","join_net_full":"بازی {host} اکنون جای دوست دیگری ندارد. کمی بعد دوباره امتحان کنید.","join_net_no_hub":"دسترسی به سرویس دعوت PS5Upload ممکن نشد. اتصال اینترنت را بررسی کنید و دوباره امتحان کنید.","join_net_offer":"رایانه {host} نتوانست به این مرورگر وصل شود. مرورگر دیگری را امتحان کنید.","join_net_no_webrtc":"این مرورگر نمی‌تواند اتصال مستقیم برقرار کند. نسخه تازه Chrome، Safari یا Firefox را امتحان کنید.","join_cancel":"لغو","join_host_fallback":"دوستتان","join_connecting":"در حال اتصال به {host}…","join_waiting":"منتظر اجازهٔ ورود از {host}","join_waiting_body":"{host} نام شما را روی صفحه‌اش می‌بیند و «اجازه» را می‌زند.","join_retry":"دوباره امتحان کنید","join_again":"دوباره درخواست پیوستن","join_playing_at":"در حال بازی پیش {host}","join_you_are":"شما بازیکن {n} هستید","join_seat_stream":"شما با کاربر PS5 {host} بازی می‌کنید. لازم نیست کاربری انتخاب کنید.","join_plays_as":"شما با {profile} بازی می‌کنید. نیازی به انتخاب نیست.","join_seat_tv_asks":"{host} پروفایلی برای شما انتخاب کرد، اما نشد از آن استفاده کرد. تلویزیون می‌پرسد شما کیستید.","join_picking":"PS را بزنید، سپس روی تلویزیون «بازی سریع» را انتخاب کنید","join_hide_controls":"پنهان کردن","join_sound":"برای صدا ضربه بزنید","rp_unmute":"صدا روشن","rp_mute":"بی‌صدا","join_no_sound":"در این مرورگر صدا پخش نمی‌شود","join_exit_fullscreen":"خروج از تمام‌صفحه","pad_fill":"تمام‌صفحه","join_leave":"خروج","join_show_controls":"نمایش کنترل‌ها","join_hold_hint":"برای نمایش دکمه‌ها، تصویر را لمس کرده و نگه دارید","pad_watch_no_hevc":"این دستگاه نمی‌تواند تصویر این استریم را پخش کند: کامپیوتر HEVC می‌فرستد و این دستگاه فقط H.264 پخش می‌کند.","pad_watch_decode":"تصویر اینجا پخش نشد.","join_pad_ready":"دستهٔ شما آماده است","join_check_unknown_short":"در فهرست ما نیست: ممکن است دکمه‌ها جابه‌جا باشند.","join_full_to_play":"برای بازی با دسته روی صفحه، تمام‌صفحه را بزنید.","join_pad_none":"یک دسته وصل کنید (USB یا Bluetooth) و هر دکمه‌ای را بزنید.","join_pad_keys":"یا از صفحه‌کلید استفاده کنید: WASD حرکت، کلیدهای جهت D-pad، Enter ✕، Backspace ○، Q □، E △، Tab Options.","join_tv_back_hint":"برای دیدن دکمه‌ها، روی کنترل از راه دور دکمهٔ بازگشت را بزنید.","join_block_note":"{host} دکمه‌های PS و Create را برای دوستان خاموش کرده است.","join_guide_title":"یک قدم دیگر روی تلویزیون","join_guide_body":"یک بار PS را روی دسته‌تان بزنید. تلویزیون می‌پرسد «چه کسی از این دسته استفاده می‌کند؟». «بازی سریع» یا کاربر خودتان را انتخاب کنید. میزبان لازم نیست کاری بکند.","join_guide_menus":"در صفحه اصلی PS5 فقط میزبان منوها را کنترل می‌کند؛ دسته شما داخل بازی‌ها بازی می‌کند.","join_guide_ok":"متوجه شدم","join_host_away":"میزبان بازی را متوقف کرد — در انتظار شروع دوباره ({time})","join_reconnecting":"در حال اتصال دوباره…","join_reconnecting_left":"جای شما تا {time} نگه داشته می‌شود.","pad_turn":"گوشی را افقی کنید","join_game_label":"بازی {host}","join_title":"پیوستن به بازی یک دوست","join_title_body":"روی PS5 {host} به‌عنوان بازیکن ۲، ۳ یا ۴ بازی کنید.","join_name_label":"نام شما","join_name_hint":"وقتی درخواست پیوستن بدهید، دوستتان این را می‌بیند.","join_button":"پیوستن"},"fr":{"usb_skipped_not_payload":"{name} : pas un fichier .elf ou .bin","usb_skipped_unknown":"{id} : n'est plus dans la liste des payloads","browser_unsupported":"Il faut l'application de bureau. Cela ne fonctionne pas dans le navigateur.","video_recovered_notice":"Play a planté au démarrage de l'image la dernière fois : l'image est donc maintenant décodée sans la carte graphique (modifiable dans Paramètres › Fenêtre › Graphismes › Décodage vidéo matériel).","video_recovered_title":"Image désormais décodée par logiciel","open_in_title":"Ouvrir dans l’app PS5Upload ?","open_in_body":"Vous avez l’app PS5Upload sur cet appareil ? Ouvrez ceci dedans, ou continuez dans le navigateur.","open_in_app":"Ouvrir dans l’app","open_in_browser":"Continuer dans le navigateur","open_in_remember":"Retenir mon choix sur cet appareil","open_in_opening":"Ouverture de l’app PS5Upload…","open_in_not_opened":"Rien ne s’est passé ? L’app n’est peut-être pas sur cet appareil.","open_in_again":"Réessayer","pad_8bitdo_no_xinput":"Cette manette 8BitDo n'a pas de mode X-input. Si un bouton ne correspond pas, vérifiez la manette.","pad_8bitdo_how_switch":"mettez l'interrupteur à l'arrière sur X, puis appuyez sur Start","pad_8bitdo_how_startx":"éteignez-la, puis maintenez Start + X pour l'allumer","pad_8bitdo_how_receiver":"utilisez son récepteur 2.4G ou un câble USB","pad_8bitdo_how_manual":"son manuel explique comment","pad_8bitdo_xinput":"Pour un meilleur résultat, passez votre 8BitDo en mode X-input : {how}.","rp_touch_left_stick":"Joystick gauche","rp_touch_right_stick":"Joystick droit","rp_touch_touchpad":"Pavé tactile","rp_pad_step_lx":"Poussez le stick gauche vers la droite","rp_pad_step_ly":"Poussez le stick gauche vers le bas","rp_pad_step_rx":"Poussez le stick droit vers la droite","rp_pad_step_ry":"Poussez le stick droit vers le bas","join_check_bottom":"Appuyez sur le bouton du bas (✕)","join_check_right":"Appuyez sur le bouton de droite (○)","join_check_left":"Appuyez sur le bouton de gauche (□)","join_check_top":"Appuyez sur le bouton du haut (△)","rp_pad_press":"Appuyez sur {name}","join_check_saved":"Enregistré pour cette manette sur cet appareil. Essayez-la ci-dessous.","join_check_title":"Vérifier la manette","join_done":"Terminé","rp_pads_none":"Aucune manette détectée. Connectez-en une et appuyez sur n'importe quel bouton.","rp_pad_mapped":"Joue avec votre configuration","join_check_unknown":"Cette manette n'est pas dans notre liste, ses boutons peuvent donc être inversés. La configurer ne prend que quelques secondes.","rp_pad_standard":"Reconnue","rp_pad_progress":"{n} sur {total}","rp_pad_skip":"Passer","rp_pad_back":"Retour","rp_pad_cancel":"Annuler","join_check_try":"Appuyez sur des boutons et bougez les sticks : ce que vous pressez s'allume.","join_check_redo":"Refaire","join_check_map":"Configurer les boutons","rp_pad_reset":"Réinitialiser","join_open_lan_body":"Pas d'accès à Internet ? Si vous êtes sur le même Wi-Fi que votre ami, ouvrez la partie par là.","join_open_lan":"Ouvrir sur ce Wi-Fi","join_path_lan":"Réseau domestique","join_seat_taken":"{host} avait besoin de récupérer sa manette et aucune autre manette n'était libre sur la PS5 : vous avez quitté la partie. Demandez à {host} de vous laisser revenir.","join_refused_key":"Cette invitation a expiré. Demandez un nouveau lien à {host}.","join_refused_expired":"Votre place dans la partie est perdue. Demandez à {host} de vous laisser revenir.","join_refused_full":"La partie est pleine : il y a déjà quatre joueurs.","join_refused_denied":"{host} ne vous a pas laissé entrer cette fois.","join_refused_no_answer":"{host} n'a pas répondu à temps. Prévenez {host}, puis réessayez.","join_refused_closed":"{host} n'organise pas de Jouer ensemble pour le moment.","join_refused_old_helper":"La PS5 de {host} a besoin d'un assistant à jour pour Jouer ensemble.","join_refused_not_playing":"{host} ne joue pas en ce moment. Demandez d'abord à {host} de lancer Jouer.","join_refused_unreachable":"L'ordinateur de {host} n'a pas pu joindre sa PS5. Réessayez dans un instant.","join_refused_slow_down":"Trop de codes erronés. Attendez une minute, puis réessayez.","join_refused_address":"L'adresse de ce lien est hors de ton réseau domestique, l'application ne l'utilisera donc pas. Demande à {host} un lien avec l'adresse IP de son ordinateur.","join_refused_other":"{host} ne vous a pas laissé entrer.","join_ended_kicked":"{host} vous a retiré de la partie.","join_ended_closed":"{host} a fermé Jouer ensemble.","join_ended_host_stopped":"L'hôte a arrêté de jouer.","join_ended_replaced":"Cette partie a été ouverte dans un autre onglet ou sur un autre appareil, elle s'est donc arrêtée ici.","join_ended_pad_lost":"La PS5 a perdu votre manette, vous êtes donc sorti de la partie. Demandez à {host} de vous laisser revenir.","join_ended_gave_up":"La connexion à {host} n'est pas revenue à temps.","join_net_lost":"La connexion à {host} a été coupée. Vérifiez votre connexion Internet, puis redemandez.","join_ended_lost":"Impossible de joindre {host}. Vérifiez que vous êtes sur le même réseau.","join_ended_left":"Vous avez quitté la partie.","join_net_mismatch":"Ce lien ne correspond pas à l'hôte ; demandez-lui-en un nouveau.","join_net_no_direct":"Une connexion directe est impossible depuis ce réseau (les routeurs des deux côtés sont stricts). Essayez le Wi-Fi plutôt que les données mobiles, ou demandez à l'hôte d'activer l'UPnP.","join_net_no_room":"Cette invitation n'est plus ouverte. Demandez un nouveau lien à {host}.","join_net_full":"La partie de {host} n'a pas de place pour un autre ami pour le moment. Réessayez dans un instant.","join_net_no_hub":"Impossible de joindre le service d'invitations de PS5Upload. Vérifiez votre connexion internet, puis réessayez.","join_net_offer":"L'ordinateur de {host} n'a pas pu se connecter à ce navigateur. Essayez un autre navigateur.","join_net_no_webrtc":"Ce navigateur ne peut pas établir de connexions directes. Essayez une version récente de Chrome, Safari ou Firefox.","join_cancel":"Annuler","join_host_fallback":"votre ami","join_connecting":"Connexion à {host}…","join_waiting":"En attente que {host} vous laisse entrer","join_waiting_body":"{host} voit votre nom à l'écran et appuie sur Autoriser.","join_retry":"Réessayer","join_again":"Redemander à rejoindre","join_playing_at":"En jeu chez {host}","join_you_are":"Vous êtes le joueur {n}","join_seat_stream":"Vous jouez avec l'utilisateur PS5 de {host}. Inutile d'en choisir un.","join_plays_as":"Vous jouez en tant que {profile}. Inutile d'en choisir un.","join_seat_tv_asks":"{host} a choisi un profil pour vous, mais il n'a pas pu être utilisé. La TV va vous demander qui vous êtes.","join_picking":"Appuyez sur PS, puis choisissez Jeu rapide sur la télé","join_hide_controls":"Masquer","join_sound":"Touchez pour le son","rp_unmute":"Son activé","rp_mute":"Couper le son","join_no_sound":"Pas de son dans ce navigateur","join_exit_fullscreen":"Quitter le plein écran","pad_fill":"Plein écran","join_leave":"Quitter","join_show_controls":"Afficher les commandes","join_hold_hint":"Maintenez l'image appuyée pour afficher les boutons","pad_watch_no_hevc":"Cet appareil ne peut pas lire l'image de ce stream : l'ordinateur diffuse en HEVC et cet appareil ne lit que le H.264.","pad_watch_decode":"L'image n'a pas pu être lue ici.","join_pad_ready":"Votre manette est prête","join_check_unknown_short":"Pas dans notre liste : les boutons peuvent être inversés.","join_full_to_play":"Touchez plein écran pour jouer avec la manette à l'écran.","join_pad_none":"Branchez une manette (USB ou Bluetooth) et appuyez sur un bouton.","join_pad_keys":"Ou utilisez le clavier : ZQSD/WASD pour bouger, flèches croix directionnelle, Entrée ✕, Retour arrière ○, Q □, E △, Tab Options.","join_tv_back_hint":"Appuyez sur Retour sur la télécommande pour afficher les boutons.","join_block_note":"{host} a désactivé PS et Create pour les amis.","join_guide_title":"Encore une étape sur la télé","join_guide_body":"Appuyez une fois sur PS sur votre manette. La télé demande « Qui utilise cette manette ? ». Choisissez Jeu rapide ou votre propre utilisateur. L'hôte n'a rien à faire.","join_guide_menus":"Sur l'écran d'accueil de la PS5, seul l'hôte contrôle les menus ; votre manette joue dans les jeux.","join_guide_ok":"Compris","join_host_away":"L'hôte a arrêté de jouer — en attente de sa reprise ({time})","join_reconnecting":"Reconnexion…","join_reconnecting_left":"Votre place est gardée pendant {time}.","pad_turn":"Tournez le téléphone à l'horizontale","join_game_label":"Partie de {host}","join_title":"Rejoindre la partie d'un ami","join_title_body":"Jouez sur la PS5 de {host} en tant que joueur 2, 3 ou 4.","join_name_label":"Votre nom","join_name_hint":"Votre ami le verra quand vous demanderez à rejoindre.","join_button":"Rejoindre"},"hi":{"usb_skipped_not_payload":"{name}: .elf या .bin फ़ाइल नहीं है","usb_skipped_unknown":"{id}: अब पेलोड सूची में नहीं है","browser_unsupported":"इसके लिए डेस्कटॉप ऐप चाहिए। यह ब्राउज़र में काम नहीं करता।","video_recovered_notice":"पिछली बार तस्वीर शुरू करते समय खेलें क्रैश हो गया था, इसलिए तस्वीर अब ग्राफ़िक्स कार्ड के बिना डिकोड होती है (बदलने के लिए सेटिंग्स › विंडो › ग्राफ़िक्स › हार्डवेयर वीडियो डिकोडिंग)।","video_recovered_title":"तस्वीर अब सॉफ़्टवेयर से डिकोड होती है","open_in_title":"PS5Upload ऐप में खोलें?","open_in_body":"क्या इस डिवाइस पर PS5Upload ऐप है? इसे वहाँ खोलें, या ब्राउज़र में ही जारी रखें।","open_in_app":"ऐप में खोलें","open_in_browser":"ब्राउज़र में जारी रखें","open_in_remember":"इस डिवाइस पर मेरी पसंद याद रखें","open_in_opening":"PS5Upload ऐप खुल रहा है…","open_in_not_opened":"कुछ नहीं हुआ? शायद इस डिवाइस पर ऐप नहीं है।","open_in_again":"फिर कोशिश करें","pad_8bitdo_no_xinput":"इस 8BitDo में X-input मोड नहीं है। अगर कोई बटन गलत है, तो कंट्रोलर जाँचें।","pad_8bitdo_how_switch":"पीछे का स्विच X पर करें, फिर Start दबाएँ","pad_8bitdo_how_startx":"इसे बंद करें, फिर Start + X दबाकर रखें ताकि यह चालू हो","pad_8bitdo_how_receiver":"इसका 2.4G रिसीवर या USB केबल इस्तेमाल करें","pad_8bitdo_how_manual":"इसकी मैनुअल में तरीका दिया है","pad_8bitdo_xinput":"सबसे अच्छे नतीजे के लिए अपने 8BitDo को X-input मोड में करें: {how}।","rp_touch_left_stick":"बायाँ स्टिक","rp_touch_right_stick":"दायाँ स्टिक","rp_touch_touchpad":"टचपैड","rp_menu":"मेनू","rp_pad_step_lx":"बायाँ स्टिक दाईं ओर धकेलें","rp_pad_step_ly":"बायाँ स्टिक नीचे धकेलें","rp_pad_step_rx":"दायाँ स्टिक दाईं ओर धकेलें","rp_pad_step_ry":"दायाँ स्टिक नीचे धकेलें","join_check_bottom":"नीचे वाला फ़ेस बटन दबाएँ (✕)","join_check_right":"दाईं ओर वाला फ़ेस बटन दबाएँ (○)","join_check_left":"बाईं ओर वाला फ़ेस बटन दबाएँ (□)","join_check_top":"ऊपर वाला फ़ेस बटन दबाएँ (△)","rp_pad_press":"{name} दबाएँ","join_check_saved":"इस डिवाइस पर इस कंट्रोलर के लिए सेव हो गया। नीचे आज़माएँ।","join_check_title":"अपना कंट्रोलर जाँचें","join_done":"हो गया","rp_pads_none":"अभी तक कोई कंट्रोलर नहीं दिखा। एक कनेक्ट करें और उस पर कोई भी बटन दबाएँ।","rp_pad_mapped":"आपकी मैपिंग से खेलता है","join_check_unknown":"यह कंट्रोलर हमारी सूची में नहीं है, इसलिए इसके बटन आपस में बदले हो सकते हैं। सेट अप करने में कुछ सेकंड लगते हैं।","rp_pad_standard":"पहचाना गया","rp_pad_progress":"{total} में से {n}","rp_pad_skip":"छोड़ें","rp_pad_back":"वापस","rp_pad_cancel":"रद्द करें","join_check_try":"बटन दबाएँ और स्टिक हिलाएँ: जो दबाएँगे वह जल उठेगा।","join_check_redo":"फिर से करें","join_check_map":"बटन सेट करें","rp_pad_reset":"रीसेट करें","join_open_lan_body":"इंटरनेट नहीं मिल रहा? अगर आप दोस्त वाले Wi-Fi पर ही हैं, तो गेम वहीं खोलें।","join_open_lan":"इसी Wi-Fi पर खोलें","join_path_lan":"होम नेटवर्क","join_path_internet":"इंटरनेट","join_seat_taken":"{host} को अपना कंट्रोलर वापस चाहिए था और PS5 पर कोई दूसरा कंट्रोलर खाली नहीं था, इसलिए आप गेम से बाहर हो गए। {host} से फिर से अंदर आने देने को कहें।","join_refused_key":"इस न्योते की समय-सीमा खत्म हो गई है। {host} से नया लिंक माँगें।","join_refused_expired":"गेम में आपकी जगह चली गई। {host} से फिर अंदर लेने को कहें।","join_refused_full":"गेम भर गया है: पहले से चार प्लेयर हैं।","join_refused_denied":"{host} ने इस बार आपको अंदर नहीं आने दिया।","join_refused_no_answer":"{host} ने समय पर जवाब नहीं दिया। {host} को बताएँ, फिर कोशिश करें।","join_refused_closed":"{host} अभी 'साथ खेलें' नहीं चला रहे हैं।","join_refused_old_helper":"'साथ खेलें' के लिए {host} के PS5 को अपडेटेड हेल्पर चाहिए।","join_refused_not_playing":"{host} अभी नहीं खेल रहे हैं। {host} से पहले खेलें शुरू करने को कहें।","join_refused_unreachable":"{host} का कंप्यूटर उनके PS5 तक नहीं पहुँच सका। थोड़ी देर में फिर कोशिश करें।","join_refused_slow_down":"बहुत सारे गलत कोड। एक मिनट रुकें, फिर कोशिश करें।","join_refused_address":"इस लिंक का पता आपके होम नेटवर्क से बाहर है, इसलिए ऐप इसका उपयोग नहीं करेगा। {host} से उनके कंप्यूटर के IP पते वाला लिंक माँगें।","join_refused_other":"{host} ने आपको अंदर नहीं आने दिया।","join_ended_kicked":"{host} ने आपको गेम से हटा दिया।","join_ended_closed":"{host} ने 'साथ खेलें' बंद कर दिया।","join_ended_host_stopped":"होस्ट ने खेलना बंद कर दिया।","join_ended_replaced":"यह गेम किसी दूसरे टैब या डिवाइस पर खुल गया, इसलिए यहाँ रुक गया।","join_ended_pad_lost":"PS5 ने आपका कंट्रोलर खो दिया, इसलिए आप गेम से बाहर हैं। {host} से फिर अंदर लेने को कहें।","join_ended_gave_up":"{host} से कनेक्शन समय पर वापस नहीं आया।","join_net_lost":"{host} से कनेक्शन टूट गया। अपना इंटरनेट कनेक्शन जाँचें, फिर दोबारा पूछें।","join_ended_lost":"{host} तक नहीं पहुँच सके। देखें कि आप एक ही नेटवर्क पर हैं।","join_ended_left":"आपने गेम छोड़ दिया।","join_net_mismatch":"यह लिंक होस्ट से मेल नहीं खाता; उनसे नया लिंक माँगें।","join_net_no_direct":"इस नेटवर्क से सीधा कनेक्शन संभव नहीं है (दोनों तरफ़ के राउटर सख़्त हैं)। मोबाइल डेटा की जगह Wi-Fi आज़माएँ, या होस्ट से UPnP चालू करने को कहें।","join_net_no_room":"यह न्योता अब खुला नहीं है। {host} से नया लिंक माँगें।","join_net_full":"{host} के गेम में अभी एक और दोस्त की जगह नहीं है। थोड़ी देर में फिर कोशिश करें।","join_net_no_hub":"PS5Upload न्योता सेवा तक नहीं पहुँच सके। अपना इंटरनेट कनेक्शन जाँचें, फिर कोशिश करें।","join_net_offer":"{host} का कंप्यूटर इस ब्राउज़र से कनेक्ट नहीं हो सका। कोई दूसरा ब्राउज़र आज़माएँ।","join_net_no_webrtc":"यह ब्राउज़र सीधे कनेक्शन नहीं बना सकता। Chrome, Safari या Firefox का नया संस्करण आज़माएँ।","join_cancel":"रद्द करें","join_host_fallback":"आपका दोस्त","join_connecting":"{host} से जुड़ रहे हैं…","join_waiting":"{host} के अंदर आने देने का इंतज़ार","join_waiting_body":"{host} अपनी स्क्रीन पर आपका नाम देखकर 'अनुमति दें' पर टैप करेंगे।","join_retry":"फिर कोशिश करें","join_again":"फिर से जुड़ने के लिए पूछें","join_playing_at":"{host} के यहाँ खेल रहे हैं","join_you_are":"आप प्लेयर {n} हैं","join_seat_stream":"आप {host} के PS5 यूज़र के रूप में खेल रहे हैं। यूज़र चुनने की ज़रूरत नहीं।","join_plays_as":"आप {profile} के रूप में खेल रहे हैं। कुछ चुनने की ज़रूरत नहीं।","join_seat_tv_asks":"{host} ने आपके लिए एक प्रोफ़ाइल चुनी थी, पर वह इस्तेमाल नहीं हो सकी। टीवी पूछेगा कि आप कौन हैं।","join_picking":"PS दबाएँ, फिर TV पर क्विक प्ले चुनें","join_hide_controls":"छिपाएँ","join_sound":"आवाज़ के लिए टैप करें","rp_unmute":"ध्वनि चालू","rp_mute":"म्यूट","join_no_sound":"इस ब्राउज़र में आवाज़ नहीं है","join_exit_fullscreen":"फ़ुल स्क्रीन से बाहर निकलें","pad_fill":"फ़ुल स्क्रीन","join_leave":"छोड़ें","join_show_controls":"कंट्रोल दिखाएं","join_hold_hint":"बटन दिखाने के लिए तस्वीर को दबाकर रखें","pad_watch_no_hevc":"यह डिवाइस इस स्ट्रीम की तस्वीर नहीं चला सकता: कंप्यूटर HEVC में स्ट्रीम करता है और यह डिवाइस सिर्फ़ H.264 चलाता है।","pad_watch_decode":"तस्वीर यहाँ नहीं चल सकी।","join_pad_ready":"आपका कंट्रोलर तैयार है","join_check_unknown_short":"हमारी सूची में नहीं: बटन बदले हुए हो सकते हैं।","join_full_to_play":"ऑन-स्क्रीन कंट्रोलर से खेलने के लिए फ़ुल स्क्रीन पर टैप करें।","join_pad_none":"कंट्रोलर जोड़ें (USB या Bluetooth) और कोई भी बटन दबाएँ।","join_pad_keys":"या कीबोर्ड इस्तेमाल करें: WASD चलना, ऐरो D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options।","join_tv_back_hint":"बटन देखने के लिए रिमोट पर Back दबाएँ।","join_block_note":"{host} ने दोस्तों के लिए PS और Create बंद कर दिए हैं।","join_guide_title":"TV पर एक और कदम","join_guide_body":"अपने कंट्रोलर पर एक बार PS दबाएँ। TV पूछेगा \"यह कंट्रोलर कौन इस्तेमाल कर रहा है?\"। क्विक प्ले या अपना यूज़र चुनें। होस्ट को कुछ नहीं करना है।","join_guide_menus":"PS5 की होम स्क्रीन पर सिर्फ़ होस्ट मेन्यू चलाता है; आपका कंट्रोलर गेम के अंदर खेलता है।","join_guide_ok":"ठीक है","join_host_away":"होस्ट ने खेलना बंद कर दिया — उनके फिर से शुरू करने का इंतज़ार ({time})","join_reconnecting":"फिर से जुड़ रहे हैं…","join_reconnecting_left":"आपकी जगह {time} तक रखी जाएगी।","pad_turn":"फ़ोन को आड़ा घुमाएँ","join_game_label":"{host} का गेम","join_title":"दोस्त के गेम में जुड़ें","join_title_body":"{host} के PS5 पर प्लेयर 2, 3 या 4 बनकर खेलें।","join_name_label":"आपका नाम","join_name_hint":"जुड़ने के लिए पूछने पर आपका दोस्त यह देखेगा।","join_button":"जुड़ें"},"hu":{"usb_skipped_not_payload":"{name}: nem .elf vagy .bin fájl","usb_skipped_unknown":"{id}: már nincs a payloadok listáján","browser_unsupported":"Ehhez az asztali alkalmazás kell. Böngészőben nem működik.","video_recovered_notice":"Legutóbb a Play összeomlott a kép indításakor, ezért a kép mostantól videokártya nélkül dekódolódik (módosítás: Beállítások › Ablak › Grafika › Hardveres videódekódolás).","video_recovered_title":"A kép mostantól szoftveresen dekódolódik","open_in_title":"Megnyitod a PS5Upload appban?","open_in_body":"Megvan a PS5Upload app ezen az eszközön? Nyisd meg ott, vagy folytasd a böngészőben.","open_in_app":"Megnyitás az appban","open_in_browser":"Folytatás a böngészőben","open_in_remember":"Választásom megjegyzése ezen az eszközön","open_in_opening":"A PS5Upload app megnyitása…","open_in_not_opened":"Nem történt semmi? Lehet, hogy az app nincs ezen az eszközön.","open_in_again":"Újra","pad_8bitdo_no_xinput":"Ennek a 8BitDo-nak nincs X-input módja. Ha egy gomb rossz, ellenőrizd a kontrollert.","pad_8bitdo_how_switch":"állítsd a hátsó kapcsolót X-re, majd nyomd meg a Start gombot","pad_8bitdo_how_startx":"kapcsold ki, majd a Start + X nyomva tartásával kapcsold be","pad_8bitdo_how_receiver":"használd a 2.4G vevőjét vagy egy USB-kábelt","pad_8bitdo_how_manual":"a kézikönyve leírja, hogyan","pad_8bitdo_xinput":"A legjobb eredményért kapcsold a 8BitDo-t X-input módba: {how}.","rp_touch_left_stick":"Bal kar","rp_touch_right_stick":"Jobb kar","rp_touch_touchpad":"Érintőpad","rp_menu":"Menü","rp_pad_step_lx":"Told a bal kart jobbra","rp_pad_step_ly":"Told a bal kart lefelé","rp_pad_step_rx":"Told a jobb kart jobbra","rp_pad_step_ry":"Told a jobb kart lefelé","join_check_bottom":"Nyomd meg az alsó előlapi gombot (✕)","join_check_right":"Nyomd meg a jobb oldali előlapi gombot (○)","join_check_left":"Nyomd meg a bal oldali előlapi gombot (□)","join_check_top":"Nyomd meg a felső előlapi gombot (△)","rp_pad_press":"Nyomd meg: {name}","join_check_saved":"Elmentve ehhez a kontrollerhez ezen az eszközön. Próbáld ki lent.","join_check_title":"Kontroller ellenőrzése","join_done":"Kész","rp_pads_none":"Még nem látható kontroller. Csatlakoztass egyet, és nyomd meg bármelyik gombját.","rp_pad_mapped":"A saját kiosztásoddal játszik","join_check_unknown":"Ez a kontroller nincs a listánkon, így a gombjai összekeveredhetnek. A beállítás csak pár másodperc.","rp_pad_standard":"Felismerve","rp_pad_progress":"{n} / {total}","rp_pad_skip":"Kihagyás","rp_pad_back":"Vissza","rp_pad_cancel":"Mégse","join_check_try":"Nyomj gombokat és mozgasd a karokat: amit megnyomsz, az felvillan.","join_check_redo":"Újra","join_check_map":"Gombok beállítása","rp_pad_reset":"Visszaállítás","join_open_lan_body":"Nem éred el az internetet? Ha ugyanazon a Wi-Fin vagy, mint a barátod, ott nyisd meg a játékot.","join_open_lan":"Megnyitás ezen a Wi-Fin","join_path_lan":"Otthoni hálózat","join_seat_taken":"{host} visszakérte a kontrollerét, és a PS5-ön nem volt más szabad kontroller, ezért kikerültél a játékból. Kérd meg {host} játékost, hogy engedjen be újra.","join_refused_key":"Ez a meghívó lejárt. Kérj új linket tőle: {host}.","join_refused_expired":"Elveszett a helyed a játékban. Kérd meg {host} felhasználót, hogy engedjen be újra.","join_refused_full":"A játék megtelt: már négy játékos van bent.","join_refused_denied":"{host} most nem engedett be.","join_refused_no_answer":"{host} nem válaszolt időben. Szólj neki ({host}), majd próbáld újra.","join_refused_closed":"{host} most nem indított Közös játékot.","join_refused_old_helper":"{host} PS5-jének frissített segédprogram kell a Közös játékhoz.","join_refused_not_playing":"{host} most nem játszik. Kérd meg, hogy előbb indítsa el a Játékot ({host}).","join_refused_unreachable":"{host} számítógépe nem érte el a PS5-öt. Próbáld újra egy kicsit később.","join_refused_slow_down":"Túl sok hibás kód. Várj egy percet, aztán próbáld újra.","join_refused_address":"A hivatkozás címe kívül esik az otthoni hálózatodon, ezért az alkalmazás nem használja. Kérj {host} felhasználótól olyan hivatkozást, amely a számítógépe IP-címét tartalmazza.","join_refused_other":"{host} nem engedett be.","join_ended_kicked":"{host} kivett a játékból.","join_ended_closed":"{host} bezárta a Közös játékot.","join_ended_host_stopped":"A házigazda abbahagyta a játékot.","join_ended_replaced":"Ezt a játékot egy másik lapon vagy eszközön nyitották meg, ezért itt leállt.","join_ended_pad_lost":"A PS5 elvesztette a kontrollered, ezért kikerültél a játékból. Kérd meg {host} felhasználót, hogy engedjen be újra.","join_ended_gave_up":"A kapcsolat {host} felé nem állt helyre időben.","join_net_lost":"Megszakadt a kapcsolat ezzel: {host}. Ellenőrizd az internetkapcsolatod, aztán kérd újra.","join_ended_lost":"{host} nem érhető el. Ellenőrizd, hogy ugyanazon a hálózaton vagytok-e.","join_ended_left":"Kiléptél a játékból.","join_net_mismatch":"Ez a link nem egyezik a házigazdával; kérj tőle újat.","join_net_no_direct":"Erről a hálózatról nem lehet közvetlen kapcsolatot létrehozni (mindkét oldal routere szigorú). Próbáld Wi-Fi-vel mobilnet helyett, vagy kérd meg a házigazdát, hogy kapcsolja be az UPnP-t.","join_net_no_room":"Ez a meghívó már nem érvényes. Kérj új linket {host} felhasználótól.","join_net_full":"{host} játékában most nincs hely egy újabb barátnak. Próbáld újra egy kicsit később.","join_net_no_hub":"A PS5Upload meghívószolgáltatása nem érhető el. Ellenőrizd az internetkapcsolatot, majd próbáld újra.","join_net_offer":"{host} számítógépe nem tudott kapcsolódni ehhez a böngészőhöz. Próbálj ki egy másik böngészőt.","join_net_no_webrtc":"Ez a böngésző nem tud közvetlen kapcsolatot létrehozni. Próbáld egy friss Chrome-mal, Safarival vagy Firefoxszal.","join_cancel":"Mégse","join_host_fallback":"a barátod","join_connecting":"Csatlakozás ehhez: {host}…","join_waiting":"Várakozás, amíg {host} beenged","join_waiting_body":"{host} látja a neved a képernyőjén, és az Engedélyezésre koppint.","join_retry":"Újra","join_again":"Csatlakozás kérése újra","join_playing_at":"Játék itt: {host}","join_you_are":"Te vagy a(z) {n}. játékos","join_seat_stream":"{host} PS5-felhasználójaként játszol. Nem kell felhasználót választanod.","join_plays_as":"{profile} néven játszol. Nem kell választanod.","join_seat_tv_asks":"{host} választott neked egy profilt, de nem lehetett használni. A tévé megkérdezi, ki vagy.","join_picking":"Nyomd meg a PS gombot, aztán a tévén válaszd a Gyors játékot","join_hide_controls":"Elrejtés","join_sound":"Koppints a hanghoz","rp_unmute":"Hang be","rp_mute":"Némítás","join_no_sound":"Ebben a böngészőben nincs hang","join_exit_fullscreen":"Kilépés a teljes képernyőből","pad_fill":"Teljes képernyő","join_leave":"Kilépés","join_show_controls":"Vezérlők megjelenítése","join_hold_hint":"A gombok megjelenítéséhez tartsd lenyomva a képet","pad_watch_no_hevc":"Ez az eszköz nem tudja lejátszani ennek a streamnek a képét: a számítógép HEVC-ben streamel, ez az eszköz csak H.264-et játszik le.","pad_watch_decode":"A képet itt nem sikerült lejátszani.","join_pad_ready":"A kontrollered készen áll","join_check_unknown_short":"Nincs a listánkon: a gombok összekeveredhetnek.","join_full_to_play":"Koppints a Teljes képernyő gombra, hogy a képernyős kontrollerrel játssz.","join_pad_none":"Csatlakoztass egy kontrollert (USB vagy Bluetooth), és nyomj meg egy gombot.","join_pad_keys":"Vagy használd a billentyűzetet: WASD mozgás, nyilak D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"A gombokhoz nyomd meg a távirányítón a Vissza gombot.","join_block_note":"{host} kikapcsolta a PS és Create gombot a barátoknak.","join_guide_title":"Még egy lépés a tévén","join_guide_body":"Nyomd meg egyszer a PS gombot a kontrollereden. A tévé megkérdezi: „Ki használja ezt a kontrollert?”. Válaszd a Gyors játékot vagy a saját felhasználódat. A házigazdának semmit sem kell tennie.","join_guide_menus":"A PS5 kezdőképernyőjén csak a házigazda kezeli a menüket; a te kontrollered a játékokban működik.","join_guide_ok":"Értem","join_host_away":"A házigazda abbahagyta a játékot – várjuk, hogy újra elkezdje ({time})","join_reconnecting":"Újracsatlakozás…","join_reconnecting_left":"A helyed még {time} ideig fenntartjuk.","pad_turn":"Fordítsd el a telefont fekvőre","join_game_label":"{host} játéka","join_title":"Csatlakozás egy barát játékához","join_title_body":"Játssz {host} PS5-jén 2., 3. vagy 4. játékosként.","join_name_label":"A neved","join_name_hint":"A barátod ezt látja, amikor csatlakozni szeretnél.","join_button":"Csatlakozás"},"id":{"usb_skipped_not_payload":"{name}: bukan file .elf atau .bin","usb_skipped_unknown":"{id}: tidak ada lagi di daftar payload","browser_unsupported":"Ini memerlukan aplikasi desktop. Tidak berfungsi di browser.","video_recovered_notice":"Terakhir kali Play crash saat memulai gambar, jadi gambar kini didekode tanpa kartu grafis (ubah di Pengaturan › Jendela › Grafis › Dekode video perangkat keras).","video_recovered_title":"Gambar kini didekode oleh perangkat lunak","open_in_title":"Buka di aplikasi PS5Upload?","open_in_body":"Punya aplikasi PS5Upload di perangkat ini? Buka di sana, atau lanjutkan di browser.","open_in_app":"Buka di aplikasi","open_in_browser":"Lanjutkan di browser","open_in_remember":"Ingat pilihan saya di perangkat ini","open_in_opening":"Membuka aplikasi PS5Upload…","open_in_not_opened":"Tidak terjadi apa-apa? Mungkin aplikasinya tidak ada di perangkat ini.","open_in_again":"Coba lagi","pad_8bitdo_no_xinput":"8BitDo ini tidak punya mode X-input. Jika ada tombol yang salah, periksa kontrolernya.","pad_8bitdo_how_switch":"geser sakelar di belakang ke X, lalu tekan Start","pad_8bitdo_how_startx":"matikan, lalu tahan Start + X untuk menyalakannya","pad_8bitdo_how_receiver":"gunakan receiver 2.4G-nya atau kabel USB","pad_8bitdo_how_manual":"caranya ada di buku panduannya","pad_8bitdo_xinput":"Untuk hasil terbaik, ubah 8BitDo kamu ke mode X-input: {how}.","rp_touch_left_stick":"Stik kiri","rp_touch_right_stick":"Stik kanan","rp_pad_step_lx":"Dorong stik kiri ke kanan","rp_pad_step_ly":"Dorong stik kiri ke bawah","rp_pad_step_rx":"Dorong stik kanan ke kanan","rp_pad_step_ry":"Dorong stik kanan ke bawah","join_check_bottom":"Tekan tombol muka bawah (✕)","join_check_right":"Tekan tombol muka kanan (○)","join_check_left":"Tekan tombol muka kiri (□)","join_check_top":"Tekan tombol muka atas (△)","rp_pad_press":"Tekan {name}","join_check_saved":"Disimpan untuk kontroler ini di perangkat ini. Coba di bawah.","join_check_title":"Periksa kontrolermu","join_done":"Selesai","rp_pads_none":"Belum ada kontroler terdeteksi. Sambungkan satu dan tekan tombol apa saja.","rp_pad_mapped":"Bermain dengan pemetaan Anda","join_check_unknown":"Kontroler ini tidak ada di daftar kami, jadi tombolnya bisa tertukar. Mengaturnya hanya butuh beberapa detik.","rp_pad_standard":"Dikenali","rp_pad_progress":"{n} dari {total}","rp_pad_skip":"Lewati","rp_pad_back":"Kembali","rp_pad_cancel":"Batal","join_check_try":"Tekan tombol dan gerakkan stik: yang kamu tekan akan menyala.","join_check_redo":"Ulangi","join_check_map":"Atur tombol","rp_pad_reset":"Atur ulang","join_open_lan_body":"Tidak bisa ke internet? Kalau kamu di Wi-Fi yang sama dengan temanmu, buka game-nya di sana.","join_open_lan":"Buka di Wi-Fi ini","join_path_lan":"Jaringan rumah","join_seat_taken":"{host} membutuhkan kontrolernya kembali dan tidak ada kontroler lain yang kosong di PS5, jadi Anda keluar dari permainan. Minta {host} untuk mengizinkan Anda masuk lagi.","join_refused_key":"Undangan ini sudah kedaluwarsa. Minta tautan baru ke {host}.","join_refused_expired":"Tempat Anda di permainan hilang. Minta {host} untuk memasukkan Anda lagi.","join_refused_full":"Game sudah penuh: sudah ada empat pemain.","join_refused_denied":"{host} tidak mengizinkan Anda masuk kali ini.","join_refused_no_answer":"{host} tidak menjawab tepat waktu. Beri tahu {host}, lalu coba lagi.","join_refused_closed":"{host} sedang tidak membuka Main Bareng.","join_refused_old_helper":"PS5 milik {host} perlu helper terbaru untuk Main Bareng.","join_refused_not_playing":"{host} sedang tidak main. Minta {host} memulai Main dulu.","join_refused_unreachable":"Komputer {host} tidak bisa menjangkau PS5-nya. Coba lagi sebentar lagi.","join_refused_slow_down":"Terlalu banyak kode yang salah. Tunggu satu menit, lalu coba lagi.","join_refused_address":"Alamat tautan ini berada di luar jaringan rumah Anda, jadi aplikasi tidak akan memakainya. Minta {host} tautan dengan alamat IP komputernya.","join_refused_other":"{host} tidak mengizinkan Anda masuk.","join_ended_kicked":"{host} mengeluarkan Anda dari game.","join_ended_closed":"{host} menutup Main Bareng.","join_ended_host_stopped":"Host berhenti main.","join_ended_replaced":"Permainan ini dibuka di tab atau perangkat lain, jadi berhenti di sini.","join_ended_pad_lost":"PS5 kehilangan kontroler Anda, jadi Anda keluar dari permainan. Minta {host} untuk memasukkan Anda lagi.","join_ended_gave_up":"Koneksi ke {host} tidak pulih tepat waktu.","join_net_lost":"Koneksi ke {host} terputus. Periksa koneksi internetmu, lalu minta lagi.","join_ended_lost":"Tidak bisa menjangkau {host}. Pastikan Anda di jaringan yang sama.","join_ended_left":"Anda keluar dari game.","join_net_mismatch":"Tautan ini tidak cocok dengan host; minta tautan baru kepadanya.","join_net_no_direct":"Koneksi langsung tidak mungkin dari jaringan ini (router kedua pihak ketat). Coba Wi-Fi alih-alih data seluler, atau minta host menyalakan UPnP.","join_net_no_room":"Undangan ini sudah tidak terbuka. Minta tautan baru kepada {host}.","join_net_full":"Permainan {host} tidak punya tempat untuk teman lain sekarang. Coba lagi sebentar lagi.","join_net_no_hub":"Tidak bisa menjangkau layanan undangan PS5Upload. Periksa koneksi internet Anda, lalu coba lagi.","join_net_offer":"Komputer {host} tidak bisa terhubung ke browser ini. Coba browser lain.","join_net_no_webrtc":"Browser ini tidak bisa membuat koneksi langsung. Coba Chrome, Safari, atau Firefox versi terbaru.","join_cancel":"Batal","join_host_fallback":"teman Anda","join_connecting":"Menghubungkan ke {host}…","join_waiting":"Menunggu {host} mengizinkan Anda masuk","join_waiting_body":"{host} melihat nama Anda di layarnya lalu mengetuk Izinkan.","join_retry":"Coba lagi","join_again":"Minta bergabung lagi","join_playing_at":"Main di tempat {host}","join_you_are":"Anda Pemain {n}","join_seat_stream":"Anda bermain sebagai pengguna PS5 {host}. Tidak perlu memilih pengguna.","join_plays_as":"Anda bermain sebagai {profile}. Tidak perlu memilih.","join_seat_tv_asks":"{host} memilihkan profil untuk Anda, tetapi tidak bisa dipakai. TV akan menanyakan siapa Anda.","join_picking":"Tekan PS, lalu pilih Main Cepat di TV","join_hide_controls":"Sembunyikan","join_sound":"Ketuk untuk suara","rp_unmute":"Suara aktif","rp_mute":"Bisukan","join_no_sound":"Tidak ada suara di browser ini","join_exit_fullscreen":"Keluar dari layar penuh","pad_fill":"Layar penuh","join_leave":"Keluar","join_show_controls":"Tampilkan kontrol","join_hold_hint":"Tekan dan tahan gambar untuk menampilkan tombol","pad_watch_no_hevc":"Perangkat ini tidak bisa memutar gambar stream ini: komputer mengirim HEVC, dan perangkat ini hanya memutar H.264.","pad_watch_decode":"Gambar tidak dapat diputar di sini.","join_pad_ready":"Kontroler Anda siap","join_check_unknown_short":"Tidak ada di daftar kami: tombol bisa tertukar.","join_full_to_play":"Ketuk Layar penuh untuk main dengan kontroler di layar.","join_pad_none":"Hubungkan kontroler (USB atau Bluetooth) lalu tekan tombol apa saja.","join_pad_keys":"Atau pakai keyboard: WASD gerak, panah D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Tekan Kembali di remote untuk menampilkan tombol.","join_block_note":"{host} mematikan PS dan Create untuk teman.","join_guide_title":"Satu langkah lagi di TV","join_guide_body":"Tekan PS sekali di kontroler Anda. TV bertanya \"Siapa yang memakai kontroler ini?\". Pilih Main Cepat atau pengguna Anda sendiri. Tuan rumah tidak perlu melakukan apa pun.","join_guide_menus":"Di layar beranda PS5 hanya host yang mengendalikan menu; kontroler Anda berfungsi di dalam game.","join_guide_ok":"Mengerti","join_host_away":"Host berhenti main — menunggu mereka mulai lagi ({time})","join_reconnecting":"Menyambung ulang…","join_reconnecting_left":"Tempat Anda disimpan selama {time}.","pad_turn":"Miringkan ponsel ke samping","join_game_label":"Game {host}","join_title":"Gabung ke game teman","join_title_body":"Main di PS5 milik {host} sebagai Pemain 2, 3, atau 4.","join_name_label":"Nama Anda","join_name_hint":"Teman Anda melihat nama ini saat Anda minta bergabung.","join_button":"Gabung"},"it":{"usb_skipped_not_payload":"{name}: non è un file .elf o .bin","usb_skipped_unknown":"{id}: non è più nell'elenco dei payload","browser_unsupported":"Serve l'app desktop. Non funziona nel browser.","video_recovered_notice":"L'ultima volta Play si è chiuso all'avvio dell'immagine, quindi ora l'immagine è decodificata senza la scheda grafica (modificabile in Impostazioni › Finestra › Grafica › Decodifica video hardware).","video_recovered_title":"Immagine ora decodificata via software","open_in_title":"Aprire nell’app PS5Upload?","open_in_body":"Hai l’app PS5Upload su questo dispositivo? Aprilo lì, oppure continua nel browser.","open_in_app":"Apri nell’app","open_in_browser":"Continua nel browser","open_in_remember":"Ricorda la mia scelta su questo dispositivo","open_in_opening":"Apertura dell’app PS5Upload…","open_in_not_opened":"Non è successo niente? Forse l’app non è su questo dispositivo.","open_in_again":"Riprova","pad_8bitdo_no_xinput":"Questo 8BitDo non ha la modalità X-input. Se un tasto è sbagliato, controlla il controller.","pad_8bitdo_how_switch":"porta l'interruttore sul retro su X, poi premi Start","pad_8bitdo_how_startx":"spegnilo, poi tieni premuto Start + X per accenderlo","pad_8bitdo_how_receiver":"usa il suo ricevitore 2.4G o un cavo USB","pad_8bitdo_how_manual":"il suo manuale spiega come","pad_8bitdo_xinput":"Per il risultato migliore, passa il tuo 8BitDo in modalità X-input: {how}.","rp_touch_left_stick":"Levetta sinistra","rp_touch_right_stick":"Levetta destra","rp_pad_step_lx":"Spingi la levetta sinistra a destra","rp_pad_step_ly":"Spingi la levetta sinistra in basso","rp_pad_step_rx":"Spingi la levetta destra a destra","rp_pad_step_ry":"Spingi la levetta destra in basso","join_check_bottom":"Premi il tasto frontale in basso (✕)","join_check_right":"Premi il tasto frontale a destra (○)","join_check_left":"Premi il tasto frontale a sinistra (□)","join_check_top":"Premi il tasto frontale in alto (△)","rp_pad_press":"Premi {name}","join_check_saved":"Salvato per questo controller su questo dispositivo. Provalo qui sotto.","join_check_title":"Controlla il controller","join_done":"Fatto","rp_pads_none":"Nessun controller rilevato. Collegane uno e premi un tasto qualsiasi.","rp_pad_mapped":"Gioca con la tua mappatura","join_check_unknown":"Questo controller non è nel nostro elenco, quindi i tasti potrebbero essere scambiati. Configurarlo richiede pochi secondi.","rp_pad_standard":"Riconosciuto","rp_pad_progress":"{n} di {total}","rp_pad_skip":"Salta","rp_pad_back":"Indietro","rp_pad_cancel":"Annulla","join_check_try":"Premi i tasti e muovi le levette: ciò che premi si illumina.","join_check_redo":"Rifai","join_check_map":"Configura i tasti","rp_pad_reset":"Ripristina","join_open_lan_body":"Niente Internet? Se sei sullo stesso Wi-Fi del tuo amico, apri la partita da lì.","join_open_lan":"Apri su questo Wi-Fi","join_path_lan":"Rete domestica","join_seat_taken":"{host} aveva bisogno di riavere il suo controller e sulla PS5 non c'era un altro controller libero, quindi sei uscito dalla partita. Chiedi a {host} di farti entrare di nuovo.","join_refused_key":"Questo invito è scaduto. Chiedi a {host} un nuovo link.","join_refused_expired":"Il tuo posto nella partita è perso. Chiedi a {host} di farti rientrare.","join_refused_full":"La partita è piena: ci sono già quattro giocatori.","join_refused_denied":"Stavolta {host} non ti ha fatto entrare.","join_refused_no_answer":"{host} non ha risposto in tempo. Avvisa {host}, poi riprova.","join_refused_closed":"Al momento {host} non sta ospitando Gioca insieme.","join_refused_old_helper":"La PS5 di {host} ha bisogno di un helper aggiornato per Gioca insieme.","join_refused_not_playing":"{host} non sta giocando ora. Chiedi prima a {host} di avviare Gioca.","join_refused_unreachable":"Il computer di {host} non è riuscito a raggiungere la PS5. Riprova tra poco.","join_refused_slow_down":"Troppi codici errati. Aspetta un minuto e riprova.","join_refused_address":"L'indirizzo di questo link è fuori dalla tua rete domestica, quindi l'app non lo userà. Chiedi a {host} un link con l'indirizzo IP del suo computer.","join_refused_other":"{host} non ti ha fatto entrare.","join_ended_kicked":"{host} ti ha tolto dalla partita.","join_ended_closed":"{host} ha chiuso Gioca insieme.","join_ended_host_stopped":"L'host ha smesso di giocare.","join_ended_replaced":"Questa partita è stata aperta in un'altra scheda o su un altro dispositivo, quindi qui si è fermata.","join_ended_pad_lost":"La PS5 ha perso il tuo controller, quindi sei fuori dalla partita. Chiedi a {host} di farti rientrare.","join_ended_gave_up":"La connessione con {host} non è tornata in tempo.","join_net_lost":"La connessione con {host} si è interrotta. Controlla la connessione Internet, poi chiedi di nuovo.","join_ended_lost":"Impossibile raggiungere {host}. Controlla di essere sulla stessa rete.","join_ended_left":"Sei uscito dalla partita.","join_net_mismatch":"Questo link non corrisponde all'host; chiedigliene uno nuovo.","join_net_no_direct":"Da questa rete non è possibile una connessione diretta (i router di entrambi i lati sono restrittivi). Prova il Wi-Fi invece dei dati mobili, oppure chiedi all'host di attivare UPnP.","join_net_no_room":"Questo invito non è più aperto. Chiedi a {host} un nuovo link.","join_net_full":"La partita di {host} non ha posto per un altro amico in questo momento. Riprova tra poco.","join_net_no_hub":"Impossibile raggiungere il servizio inviti di PS5Upload. Controlla la connessione a internet, poi riprova.","join_net_offer":"Il computer di {host} non è riuscito a connettersi a questo browser. Prova un altro browser.","join_net_no_webrtc":"Questo browser non può creare connessioni dirette. Prova una versione recente di Chrome, Safari o Firefox.","join_cancel":"Annulla","join_host_fallback":"il tuo amico","join_connecting":"Connessione a {host}…","join_waiting":"In attesa che {host} ti faccia entrare","join_waiting_body":"{host} vede il tuo nome sullo schermo e tocca Consenti.","join_retry":"Riprova","join_again":"Chiedi di nuovo di entrare","join_playing_at":"Giochi da {host}","join_you_are":"Sei il Giocatore {n}","join_seat_stream":"Stai giocando con l'utente PS5 di {host}. Non serve sceglierne uno.","join_plays_as":"Stai giocando come {profile}. Non devi sceglierne uno.","join_seat_tv_asks":"{host} ha scelto un profilo per te, ma non si è potuto usare. La TV ti chiederà chi sei.","join_picking":"Premi PS, poi scegli Gioco rapido sulla TV","join_hide_controls":"Nascondi","join_sound":"Tocca per l'audio","rp_unmute":"Audio attivo","rp_mute":"Muto","join_no_sound":"Nessun suono in questo browser","join_exit_fullscreen":"Esci da schermo intero","pad_fill":"Schermo intero","join_leave":"Esci","join_show_controls":"Mostra i comandi","join_hold_hint":"Tieni premuto sull'immagine per mostrare i pulsanti","pad_watch_no_hevc":"Questo dispositivo non può riprodurre l'immagine di questo stream: il computer trasmette in HEVC e questo dispositivo riproduce solo H.264.","pad_watch_decode":"Non è stato possibile riprodurre l'immagine qui.","join_pad_ready":"Il tuo controller è pronto","join_check_unknown_short":"Non è nel nostro elenco: i tasti potrebbero essere scambiati.","join_full_to_play":"Tocca schermo intero per giocare con il controller a schermo.","join_pad_none":"Collega un controller (USB o Bluetooth) e premi un tasto qualsiasi.","join_pad_keys":"Oppure usa la tastiera: WASD per muoverti, frecce croce direzionale, Invio ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Premi Indietro sul telecomando per vedere i pulsanti.","join_block_note":"{host} ha disattivato PS e Create per gli amici.","join_guide_title":"Ancora un passo sulla TV","join_guide_body":"Premi PS una volta sul controller. La TV chiede \"Chi sta usando questo controller?\". Scegli Gioco rapido o il tuo utente. L'host non deve fare nulla.","join_guide_menus":"Nella schermata iniziale della PS5 solo chi ospita controlla i menu; il tuo controller gioca dentro i giochi.","join_guide_ok":"Ho capito","join_host_away":"L'host ha smesso di giocare: in attesa che ricominci ({time})","join_reconnecting":"Riconnessione…","join_reconnecting_left":"Il tuo posto resta riservato per {time}.","pad_turn":"Ruota il telefono in orizzontale","join_game_label":"Partita di {host}","join_title":"Unisciti alla partita di un amico","join_title_body":"Gioca sulla PS5 di {host} come Giocatore 2, 3 o 4.","join_name_label":"Il tuo nome","join_name_hint":"Il tuo amico lo vede quando chiedi di entrare.","join_button":"Unisciti"},"ja":{"usb_skipped_not_payload":"{name}:.elf または .bin ファイルではありません","usb_skipped_unknown":"{id}: ペイロード一覧にありません","browser_unsupported":"デスクトップアプリが必要です。ブラウザーでは動作しません。","video_recovered_notice":"前回 Play が映像の開始中にクラッシュしたため、映像をグラフィックカードを使わずにデコードするようにしました(設定 › ウィンドウ › グラフィック › ハードウェア映像デコード で変更できます)。","video_recovered_title":"映像はソフトウェアでデコードされます","open_in_title":"PS5Upload アプリで開きますか?","open_in_body":"この端末に PS5Upload アプリがあれば、アプリで開けます。ブラウザーのまま続けることもできます。","open_in_app":"アプリで開く","open_in_browser":"ブラウザーで続ける","open_in_remember":"この端末で選択を記憶する","open_in_opening":"PS5Upload アプリを開いています…","open_in_not_opened":"何も起きませんか?この端末にアプリが入っていないかもしれません。","open_in_again":"再試行","pad_8bitdo_no_xinput":"この 8BitDo には X-input モードがありません。ボタンが違う場合はコントローラーを確認してください。","pad_8bitdo_how_switch":"背面のスイッチを X にして Start を押す","pad_8bitdo_how_startx":"電源を切り、Start + X を押したまま電源を入れる","pad_8bitdo_how_receiver":"付属の 2.4G レシーバーか USB ケーブルを使う","pad_8bitdo_how_manual":"方法は取扱説明書にあります","pad_8bitdo_xinput":"最適に使うには、8BitDo を X-input モードにしてください: {how}。","rp_touch_left_stick":"左スティック","rp_touch_right_stick":"右スティック","rp_touch_touchpad":"タッチパッド","rp_menu":"メニュー","rp_pad_step_lx":"左スティックを右に倒してください","rp_pad_step_ly":"左スティックを下に倒してください","rp_pad_step_rx":"右スティックを右に倒してください","rp_pad_step_ry":"右スティックを下に倒してください","join_check_bottom":"下のボタンを押してください (✕)","join_check_right":"右のボタンを押してください (○)","join_check_left":"左のボタンを押してください (□)","join_check_top":"上のボタンを押してください (△)","rp_pad_press":"{name} を押してください","join_check_saved":"このデバイスでこのコントローラー用に保存しました。下で試してください。","join_check_title":"コントローラーを確認","join_done":"完了","rp_pads_none":"コントローラーがまだ見つかりません。接続して、いずれかのボタンを押してください。","rp_pad_mapped":"あなたの割り当てで操作します","join_check_unknown":"このコントローラーは一覧にないため、ボタンが入れ替わっている可能性があります。設定は数秒で終わります。","rp_pad_standard":"認識済み","rp_pad_progress":"{n} / {total}","rp_pad_skip":"スキップ","rp_pad_back":"戻る","rp_pad_cancel":"キャンセル","join_check_try":"ボタンを押したりスティックを動かしたりしてください。押したものが光ります。","join_check_redo":"やり直す","join_check_map":"ボタンを設定","rp_pad_reset":"リセット","join_open_lan_body":"インターネットにつながりませんか?友だちと同じ Wi-Fi にいるなら、そこでゲームを開いてください。","join_open_lan":"この Wi-Fi で開く","join_path_lan":"ホームネットワーク","join_path_internet":"インターネット","join_seat_taken":"{host}が自分のコントローラーを必要とし、PS5に空いているコントローラーがほかになかったため、ゲームから退出しました。もう一度入れてもらうよう{host}に頼んでください。","join_refused_key":"この招待は期限切れです。{host}さんに新しいリンクをもらってください。","join_refused_expired":"ゲームの席がなくなりました。{host} さんにもう一度入れてもらってください。","join_refused_full":"満員です:すでに4人がプレイしています。","join_refused_denied":"今回は{host}さんに参加を許可されませんでした。","join_refused_no_answer":"{host} さんが時間内に応答しませんでした。{host} さんに伝えてから、もう一度お試しください。","join_refused_closed":"{host}さんは今「いっしょにプレイ」を開いていません。","join_refused_old_helper":"「いっしょにプレイ」を使うには、{host}さんのPS5のヘルパーを更新する必要があります。","join_refused_not_playing":"{host}さんは今プレイしていません。先に{host}さんにプレイを始めてもらってください。","join_refused_unreachable":"{host}さんのコンピューターがPS5に接続できませんでした。少ししてからもう一度お試しください。","join_refused_slow_down":"間違ったコードが多すぎます。1分待ってからもう一度お試しください。","join_refused_address":"このリンクのアドレスはホームネットワークの外にあるため、アプリは使用しません。{host} にコンピューターの IP アドレスのリンクを頼んでください。","join_refused_other":"{host}さんに参加を許可されませんでした。","join_ended_kicked":"{host}さんにゲームから外されました。","join_ended_closed":"{host}さんが「いっしょにプレイ」を終了しました。","join_ended_host_stopped":"ホストがプレイをやめました。","join_ended_replaced":"このゲームが別のタブまたは別のデバイスで開かれたため、ここでは終了しました。","join_ended_pad_lost":"PS5 があなたのコントローラーを見失ったため、ゲームから外れました。{host} さんにもう一度入れてもらってください。","join_ended_gave_up":"{host}さんとの接続が時間内に戻りませんでした。","join_net_lost":"{host} との接続が切れました。インターネット接続を確認してから、もう一度お願いしてください。","join_ended_lost":"{host}さんに接続できませんでした。同じネットワークにいるか確認してください。","join_ended_left":"ゲームから退出しました。","join_net_mismatch":"このリンクはホストと一致しません。ホストに新しいリンクをもらってください。","join_net_no_direct":"このネットワークからは直接接続できません(双方のルーターが厳しい設定です)。モバイルデータではなく Wi-Fi を試すか、ホストに UPnP をオンにしてもらってください。","join_net_no_room":"この招待はもう有効ではありません。{host}さんに新しいリンクをもらってください。","join_net_full":"{host}さんのゲームには今これ以上友だちが入れません。少ししてからもう一度お試しください。","join_net_no_hub":"PS5Upload の招待サービスに接続できませんでした。インターネット接続を確認して、もう一度お試しください。","join_net_offer":"{host}さんのコンピューターがこのブラウザーに接続できませんでした。別のブラウザーをお試しください。","join_net_no_webrtc":"このブラウザーは直接接続ができません。最新の Chrome、Safari、Firefox をお試しください。","join_cancel":"キャンセル","join_host_fallback":"フレンド","join_connecting":"{host}さんに接続中…","join_waiting":"{host}さんの許可を待っています","join_waiting_body":"{host}さんの画面にあなたの名前が表示され、「許可」をタップすると参加できます。","join_retry":"再試行","join_again":"もう一度参加をリクエスト","join_playing_at":"{host}さんのPS5でプレイ中","join_you_are":"あなたはプレイヤー{n}です","join_seat_stream":"{host}のPS5ユーザーとしてプレイしています。ユーザーを選ぶ必要はありません。","join_plays_as":"{profile}としてプレイしています。選ぶ必要はありません。","join_seat_tv_asks":"{host}があなた用のプロフィールを選びましたが、使えませんでした。テレビで誰がプレイするかを聞かれます。","join_picking":"PSボタンを押して、テレビで「クイックプレイ」を選んでください","join_hide_controls":"隠す","join_sound":"タップして音を出す","rp_unmute":"音声オン","rp_mute":"ミュート","join_no_sound":"このブラウザーでは音声を再生できません","join_exit_fullscreen":"全画面を終了","pad_fill":"全画面","join_leave":"退出","join_show_controls":"操作ボタンを表示","join_hold_hint":"画面を長押しするとボタンが表示されます","pad_watch_no_hevc":"この端末ではこの配信の映像を再生できません。PC は HEVC で配信していますが、この端末は H.264 のみ再生できます。","pad_watch_decode":"ここでは映像を再生できませんでした。","join_pad_ready":"コントローラーの準備ができました","join_check_unknown_short":"一覧にありません: ボタンが入れ替わっている可能性があります。","join_full_to_play":"全画面をタップすると、画面上のコントローラーでプレイできます。","join_pad_none":"コントローラーをつないで(USBまたはBluetooth)、いずれかのボタンを押してください。","join_pad_keys":"キーボードでも遊べます:WASDで移動、矢印キーで方向キー、Enter ✕、Backspace ○、Q □、E △、Tab OPTIONS。","join_tv_back_hint":"ボタンを表示するには、リモコンの戻るを押してください。","join_block_note":"{host}さんがフレンドのPSボタンとCreateボタンを無効にしています。","join_guide_title":"テレビであと1ステップ","join_guide_body":"コントローラーのPSボタンを1回押してください。テレビに「このコントローラーを使うのは誰ですか?」と表示されます。クイックプレイか自分のユーザーを選んでください。ホストの操作は不要です。","join_guide_menus":"PS5のホーム画面でメニューを操作できるのはホストだけです。あなたのコントローラーはゲームの中で使えます。","join_guide_ok":"OK","join_host_away":"ホストがプレイをやめました — 再開を待っています({time})","join_reconnecting":"再接続中…","join_reconnecting_left":"あと{time}は枠が確保されています。","pad_turn":"スマホを横向きにしてください","join_game_label":"{host}さんのゲーム","join_title":"フレンドのゲームに参加","join_title_body":"{host}さんのPS5でプレイヤー2・3・4として遊べます。","join_name_label":"あなたの名前","join_name_hint":"参加をリクエストすると、フレンドにこの名前が表示されます。","join_button":"参加"},"ko":{"usb_skipped_not_payload":"{name}: .elf 또는 .bin 파일이 아님","usb_skipped_unknown":"{id}: 더 이상 페이로드 목록에 없습니다","browser_unsupported":"데스크톱 앱이 필요합니다. 브라우저에서는 작동하지 않습니다.","video_recovered_notice":"지난번 화면을 시작하는 중에 Play가 충돌하여, 이제 그래픽 카드 없이 화면을 디코딩합니다(설정 › 창 › 그래픽 › 하드웨어 영상 디코딩에서 변경).","video_recovered_title":"이제 화면을 소프트웨어로 디코딩합니다","open_in_title":"PS5Upload 앱에서 열까요?","open_in_body":"이 기기에 PS5Upload 앱이 있나요? 앱에서 열거나 브라우저에서 계속하세요.","open_in_app":"앱에서 열기","open_in_browser":"브라우저에서 계속","open_in_remember":"이 기기에서 선택 기억하기","open_in_opening":"PS5Upload 앱을 여는 중…","open_in_not_opened":"아무 일도 없나요? 이 기기에 앱이 없을 수 있습니다.","open_in_again":"다시 시도","pad_8bitdo_no_xinput":"이 8BitDo에는 X-input 모드가 없습니다. 버튼이 다르게 동작하면 컨트롤러를 확인하세요.","pad_8bitdo_how_switch":"뒷면 스위치를 X로 놓고 Start를 누르세요","pad_8bitdo_how_startx":"전원을 끈 다음 Start + X를 누른 채로 켜세요","pad_8bitdo_how_receiver":"2.4G 수신기나 USB 케이블을 사용하세요","pad_8bitdo_how_manual":"방법은 설명서에 있습니다","pad_8bitdo_xinput":"가장 잘 동작하도록 8BitDo를 X-input 모드로 바꾸세요: {how}.","rp_touch_left_stick":"왼쪽 스틱","rp_touch_right_stick":"오른쪽 스틱","rp_touch_touchpad":"터치패드","rp_menu":"메뉴","rp_pad_step_lx":"왼쪽 스틱을 오른쪽으로 미세요","rp_pad_step_ly":"왼쪽 스틱을 아래로 미세요","rp_pad_step_rx":"오른쪽 스틱을 오른쪽으로 미세요","rp_pad_step_ry":"오른쪽 스틱을 아래로 미세요","join_check_bottom":"아래쪽 버튼을 누르세요 (✕)","join_check_right":"오른쪽 버튼을 누르세요 (○)","join_check_left":"왼쪽 버튼을 누르세요 (□)","join_check_top":"위쪽 버튼을 누르세요 (△)","rp_pad_press":"{name} 버튼을 누르세요","join_check_saved":"이 기기에서 이 컨트롤러용으로 저장했습니다. 아래에서 시험해 보세요.","join_check_title":"컨트롤러 확인","join_done":"완료","rp_pads_none":"아직 컨트롤러가 보이지 않습니다. 컨트롤러를 연결하고 아무 버튼이나 누르세요.","rp_pad_mapped":"내 버튼 설정으로 플레이","join_check_unknown":"이 컨트롤러는 목록에 없어서 버튼이 뒤바뀌어 있을 수 있습니다. 설정은 몇 초면 됩니다.","rp_pad_standard":"인식됨","rp_pad_progress":"{n} / {total}","rp_pad_skip":"건너뛰기","rp_pad_back":"뒤로","rp_pad_cancel":"취소","join_check_try":"버튼을 누르고 스틱을 움직여 보세요. 누른 것이 켜집니다.","join_check_redo":"다시 하기","join_check_map":"버튼 설정","rp_pad_reset":"초기화","join_open_lan_body":"인터넷에 연결되지 않나요? 친구와 같은 Wi-Fi에 있다면 거기서 게임을 여세요.","join_open_lan":"이 Wi-Fi에서 열기","join_path_lan":"홈 네트워크","join_path_internet":"인터넷","join_seat_taken":"{host} 님이 컨트롤러를 다시 써야 했는데 PS5에 남은 컨트롤러가 없어서 게임에서 나왔어요. {host} 님에게 다시 들여보내 달라고 하세요.","join_refused_key":"초대가 만료됐어요. {host} 님에게 새 링크를 요청하세요.","join_refused_expired":"게임 자리를 잃었습니다. {host} 님에게 다시 들여보내 달라고 하세요.","join_refused_full":"게임이 꽉 찼어요. 이미 4명이 플레이 중이에요.","join_refused_denied":"이번에는 {host} 님이 참여를 허용하지 않았어요.","join_refused_no_answer":"{host} 님이 제시간에 응답하지 않았습니다. {host} 님에게 알린 뒤 다시 시도하세요.","join_refused_closed":"{host} 님은 지금 함께 플레이를 열고 있지 않아요.","join_refused_old_helper":"함께 플레이를 하려면 {host} 님의 PS5 헬퍼를 업데이트해야 해요.","join_refused_not_playing":"{host} 님은 지금 플레이 중이 아니에요. {host} 님에게 먼저 플레이를 시작해 달라고 하세요.","join_refused_unreachable":"{host} 님의 컴퓨터가 PS5에 연결하지 못했어요. 잠시 후 다시 시도하세요.","join_refused_slow_down":"잘못된 코드를 너무 많이 입력했어요. 1분 후에 다시 시도하세요.","join_refused_address":"이 링크의 주소는 홈 네트워크 밖에 있어 앱에서 사용하지 않습니다. {host}에게 컴퓨터의 IP 주소가 있는 링크를 요청하세요.","join_refused_other":"{host} 님이 참여를 허용하지 않았어요.","join_ended_kicked":"{host} 님이 나를 게임에서 내보냈어요.","join_ended_closed":"{host} 님이 함께 플레이를 닫았어요.","join_ended_host_stopped":"호스트가 플레이를 멈췄어요.","join_ended_replaced":"이 게임이 다른 탭이나 다른 기기에서 열려서 여기서는 멈췄습니다.","join_ended_pad_lost":"PS5가 컨트롤러를 잃어서 게임에서 나왔습니다. {host} 님에게 다시 들여보내 달라고 하세요.","join_ended_gave_up":"{host} 님과의 연결이 제때 돌아오지 않았어요.","join_net_lost":"{host}와의 연결이 끊겼어요. 인터넷 연결을 확인한 다음 다시 요청하세요.","join_ended_lost":"{host} 님에게 연결할 수 없어요. 같은 네트워크에 있는지 확인하세요.","join_ended_left":"게임에서 나왔어요.","join_net_mismatch":"이 링크는 호스트와 일치하지 않아요. 새 링크를 요청하세요.","join_net_no_direct":"이 네트워크에서는 직접 연결할 수 없어요(양쪽 공유기가 모두 엄격해요). 모바일 데이터 대신 Wi-Fi를 쓰거나 호스트에게 UPnP를 켜 달라고 하세요.","join_net_no_room":"이 초대는 더 이상 열려 있지 않아요. {host} 님에게 새 링크를 요청하세요.","join_net_full":"{host} 님의 게임에 지금은 친구가 더 들어갈 자리가 없어요. 잠시 후 다시 시도하세요.","join_net_no_hub":"PS5Upload 초대 서비스에 연결할 수 없어요. 인터넷 연결을 확인한 뒤 다시 시도하세요.","join_net_offer":"{host} 님의 컴퓨터가 이 브라우저에 연결하지 못했어요. 다른 브라우저를 써 보세요.","join_net_no_webrtc":"이 브라우저는 직접 연결을 할 수 없어요. 최신 Chrome, Safari 또는 Firefox를 써 보세요.","join_cancel":"취소","join_host_fallback":"친구","join_connecting":"{host} 님에게 연결 중…","join_waiting":"{host} 님이 허용하기를 기다리는 중","join_waiting_body":"{host} 님 화면에 내 이름이 보이고, 허용을 누르면 들어갈 수 있어요.","join_retry":"다시 시도","join_again":"다시 참여 요청","join_playing_at":"{host} 님의 PS5에서 플레이 중","join_you_are":"나는 플레이어 {n}","join_seat_stream":"{host} 님의 PS5 사용자로 플레이하고 있어요. 사용자를 고를 필요가 없어요.","join_plays_as":"{profile}(으)로 플레이하고 있어요. 고를 필요가 없어요.","join_seat_tv_asks":"{host} 님이 프로필을 골라 두었지만 쓸 수 없었어요. TV에서 누구인지 물어볼 거예요.","join_picking":"PS 버튼을 누른 다음 TV에서 빠른 플레이를 선택하세요","join_hide_controls":"숨기기","join_sound":"눌러서 소리 켜기","rp_unmute":"소리 켜기","rp_mute":"음소거","join_no_sound":"이 브라우저에서는 소리가 나오지 않습니다","join_exit_fullscreen":"전체 화면 종료","pad_fill":"전체 화면","join_leave":"나가기","join_show_controls":"컨트롤 표시","join_hold_hint":"화면을 길게 누르면 버튼이 표시됩니다","pad_watch_no_hevc":"이 기기는 이 스트림의 화면을 재생할 수 없습니다. 컴퓨터는 HEVC로 스트리밍하고 이 기기는 H.264만 재생합니다.","pad_watch_decode":"여기서 화면을 재생할 수 없었습니다.","join_pad_ready":"컨트롤러가 준비됐어요","join_check_unknown_short":"목록에 없음: 버튼이 뒤바뀌어 있을 수 있습니다.","join_full_to_play":"전체 화면을 탭하면 화면 컨트롤러로 플레이할 수 있어요.","join_pad_none":"컨트롤러를 연결(USB 또는 Bluetooth)하고 아무 버튼이나 누르세요.","join_pad_keys":"키보드로도 할 수 있어요: WASD 이동, 방향키 D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"버튼을 보려면 리모컨의 뒤로 버튼을 누르세요.","join_block_note":"{host} 님이 친구의 PS 및 Create 버튼을 막아 두었어요.","join_guide_title":"TV에서 한 단계만 더","join_guide_body":"컨트롤러의 PS 버튼을 한 번 누르세요. TV에 \"이 컨트롤러를 누가 사용하나요?\"가 나타나요. 빠른 플레이나 내 사용자를 선택하세요. 호스트는 아무것도 하지 않아도 돼요.","join_guide_menus":"PS5 홈 화면에서는 호스트만 메뉴를 조작할 수 있어요. 내 컨트롤러는 게임 안에서 플레이합니다.","join_guide_ok":"알겠어요","join_host_away":"호스트가 플레이를 멈췄어요 — 다시 시작하기를 기다리는 중 ({time})","join_reconnecting":"다시 연결 중…","join_reconnecting_left":"{time} 동안 자리가 유지돼요.","pad_turn":"휴대폰을 가로로 돌리세요","join_game_label":"{host} 님의 게임","join_title":"친구 게임에 참여","join_title_body":"{host} 님의 PS5에서 플레이어 2, 3, 4로 플레이하세요.","join_name_label":"내 이름","join_name_hint":"참여를 요청하면 친구에게 이 이름이 보여요.","join_button":"참여"},"pl":{"usb_skipped_not_payload":"{name}: to nie jest plik .elf ani .bin","usb_skipped_unknown":"{id}: nie ma już na liście payloadów","browser_unsupported":"To wymaga aplikacji na komputer. W przeglądarce nie działa.","video_recovered_notice":"Ostatnio Play zawiesił się przy uruchamianiu obrazu, więc obraz jest teraz dekodowany bez karty graficznej (zmień w Ustawienia › Okno › Grafika › Sprzętowe dekodowanie wideo).","video_recovered_title":"Obraz jest teraz dekodowany programowo","open_in_title":"Otworzyć w aplikacji PS5Upload?","open_in_body":"Masz aplikację PS5Upload na tym urządzeniu? Otwórz to w niej albo kontynuuj w przeglądarce.","open_in_app":"Otwórz w aplikacji","open_in_browser":"Kontynuuj w przeglądarce","open_in_remember":"Zapamiętaj mój wybór na tym urządzeniu","open_in_opening":"Otwieranie aplikacji PS5Upload…","open_in_not_opened":"Nic się nie stało? Aplikacji może nie być na tym urządzeniu.","open_in_again":"Spróbuj ponownie","pad_8bitdo_no_xinput":"Ten 8BitDo nie ma trybu X-input. Jeśli któryś przycisk działa źle, sprawdź kontroler.","pad_8bitdo_how_switch":"ustaw przełącznik z tyłu na X, a potem naciśnij Start","pad_8bitdo_how_startx":"wyłącz go, a potem przytrzymaj Start + X, aby go włączyć","pad_8bitdo_how_receiver":"użyj jego odbiornika 2.4G lub kabla USB","pad_8bitdo_how_manual":"instrukcja podaje, jak to zrobić","pad_8bitdo_xinput":"Aby działał najlepiej, przełącz 8BitDo w tryb X-input: {how}.","rp_touch_left_stick":"Lewa gałka","rp_touch_right_stick":"Prawa gałka","rp_touch_touchpad":"Panel dotykowy","rp_pad_step_lx":"Wychyl lewą gałkę w prawo","rp_pad_step_ly":"Wychyl lewą gałkę w dół","rp_pad_step_rx":"Wychyl prawą gałkę w prawo","rp_pad_step_ry":"Wychyl prawą gałkę w dół","join_check_bottom":"Naciśnij dolny przycisk (✕)","join_check_right":"Naciśnij prawy przycisk (○)","join_check_left":"Naciśnij lewy przycisk (□)","join_check_top":"Naciśnij górny przycisk (△)","rp_pad_press":"Naciśnij {name}","join_check_saved":"Zapisano dla tego kontrolera na tym urządzeniu. Wypróbuj poniżej.","join_check_title":"Sprawdź kontroler","join_done":"Gotowe","rp_pads_none":"Nie wykryto jeszcze kontrolera. Podłącz go i naciśnij dowolny przycisk.","rp_pad_mapped":"Gra z twoim mapowaniem","join_check_unknown":"Tego kontrolera nie ma na naszej liście, więc przyciski mogą być pomieszane. Konfiguracja zajmuje kilka sekund.","rp_pad_standard":"Rozpoznany","rp_pad_progress":"{n} z {total}","rp_pad_skip":"Pomiń","rp_pad_back":"Wstecz","rp_pad_cancel":"Anuluj","join_check_try":"Naciskaj przyciski i ruszaj gałkami: to, co naciśniesz, się podświetli.","join_check_redo":"Powtórz","join_check_map":"Ustaw przyciski","rp_pad_reset":"Resetuj","join_open_lan_body":"Brak internetu? Jeśli jesteś w tej samej sieci Wi-Fi co znajomy, otwórz grę tam.","join_open_lan":"Otwórz w tej sieci Wi-Fi","join_path_lan":"Sieć domowa","join_seat_taken":"{host} potrzebował z powrotem swojego kontrolera, a na PS5 nie było innego wolnego kontrolera, więc wypadasz z gry. Poproś {host}, żeby wpuścił Cię ponownie.","join_refused_key":"To zaproszenie wygasło. Poproś {host} o nowy link.","join_refused_expired":"Twoje miejsce w grze przepadło. Poproś {host} o ponowne wpuszczenie.","join_refused_full":"Brak miejsc: gra już czterech graczy.","join_refused_denied":"{host} tym razem cię nie wpuścił.","join_refused_no_answer":"{host}: brak odpowiedzi na czas. Daj znać ({host}) i spróbuj ponownie.","join_refused_closed":"{host} nie prowadzi teraz Graj razem.","join_refused_old_helper":"PS5 {host} potrzebuje zaktualizowanego pomocnika do Graj razem.","join_refused_not_playing":"{host} teraz nie gra. Poproś {host}, żeby najpierw uruchomił Graj.","join_refused_unreachable":"Komputer {host} nie mógł połączyć się z PS5. Spróbuj ponownie za chwilę.","join_refused_slow_down":"Zbyt wiele błędnych kodów. Odczekaj minutę i spróbuj ponownie.","join_refused_address":"Adres tego linku jest poza Twoją siecią domową, więc aplikacja go nie użyje. Poproś {host} o link z adresem IP komputera.","join_refused_other":"{host} cię nie wpuścił.","join_ended_kicked":"{host} usunął cię z gry.","join_ended_closed":"{host} zamknął Graj razem.","join_ended_host_stopped":"Gospodarz przestał grać.","join_ended_replaced":"Tę grę otwarto w innej karcie lub na innym urządzeniu, więc tu się zatrzymała.","join_ended_pad_lost":"PS5 straciła Twój kontroler, więc wypadasz z gry. Poproś {host} o ponowne wpuszczenie.","join_ended_gave_up":"Połączenie z {host} nie wróciło na czas.","join_net_lost":"Połączenie z {host} zostało przerwane. Sprawdź połączenie internetowe i poproś ponownie.","join_ended_lost":"Nie można połączyć się z {host}. Sprawdź, czy jesteście w tej samej sieci.","join_ended_left":"Opuściłeś grę.","join_net_mismatch":"Ten link nie pasuje do gospodarza; poproś go o nowy.","join_net_no_direct":"Z tej sieci nie da się nawiązać bezpośredniego połączenia (routery po obu stronach są restrykcyjne). Spróbuj Wi-Fi zamiast danych komórkowych albo poproś gospodarza o włączenie UPnP.","join_net_no_room":"To zaproszenie nie jest już otwarte. Poproś {host} o nowy link.","join_net_full":"W grze {host} nie ma teraz miejsca dla kolejnego znajomego. Spróbuj ponownie za chwilę.","join_net_no_hub":"Nie można połączyć się z usługą zaproszeń PS5Upload. Sprawdź połączenie z internetem i spróbuj ponownie.","join_net_offer":"Komputer {host} nie mógł połączyć się z tą przeglądarką. Spróbuj innej przeglądarki.","join_net_no_webrtc":"Ta przeglądarka nie potrafi nawiązywać bezpośrednich połączeń. Spróbuj aktualnego Chrome, Safari lub Firefoksa.","join_cancel":"Anuluj","join_host_fallback":"twój znajomy","join_connecting":"Łączenie z {host}…","join_waiting":"Czekasz, aż {host} cię wpuści","join_waiting_body":"{host} widzi twoje imię na ekranie i stuka Zezwól.","join_retry":"Spróbuj ponownie","join_again":"Poproś ponownie o dołączenie","join_playing_at":"Grasz u {host}","join_you_are":"Jesteś Graczem {n}","join_seat_stream":"Grasz jako użytkownik PS5 gospodarza {host}. Nie musisz nikogo wybierać.","join_plays_as":"Grasz jako {profile}. Nie musisz niczego wybierać.","join_seat_tv_asks":"{host} wybrał dla ciebie profil, ale nie dało się go użyć. Telewizor zapyta, kim jesteś.","join_picking":"Naciśnij PS, a potem wybierz Szybką grę na telewizorze","join_hide_controls":"Ukryj","join_sound":"Włącz dźwięk","rp_unmute":"Dźwięk wł.","rp_mute":"Wycisz","join_no_sound":"Brak dźwięku w tej przeglądarce","join_exit_fullscreen":"Wyjdź z pełnego ekranu","pad_fill":"Pełny ekran","join_leave":"Wyjdź","join_show_controls":"Pokaż przyciski","join_hold_hint":"Przytrzymaj obraz, aby pokazać przyciski","pad_watch_no_hevc":"To urządzenie nie odtworzy obrazu tego streamu: komputer nadaje w HEVC, a to urządzenie odtwarza tylko H.264.","pad_watch_decode":"Nie udało się tu odtworzyć obrazu.","join_pad_ready":"Twój kontroler jest gotowy","join_check_unknown_short":"Nie ma go na liście: przyciski mogą być pomieszane.","join_full_to_play":"Stuknij Pełny ekran, aby grać kontrolerem ekranowym.","join_pad_none":"Podłącz kontroler (USB lub Bluetooth) i naciśnij dowolny przycisk.","join_pad_keys":"Albo użyj klawiatury: WASD ruch, strzałki krzyżak, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Naciśnij Wstecz na pilocie, aby pokazać przyciski.","join_block_note":"{host} wyłączył PS i Create dla znajomych.","join_guide_title":"Jeszcze jeden krok na telewizorze","join_guide_body":"Naciśnij raz PS na kontrolerze. Telewizor zapyta „Kto używa tego kontrolera?”. Wybierz Szybką grę albo swojego użytkownika. Gospodarz nie musi nic robić.","join_guide_menus":"Na ekranie głównym PS5 menu steruje tylko gospodarz; twój kontroler działa w grach.","join_guide_ok":"Rozumiem","join_host_away":"Gospodarz przestał grać — czekamy, aż zacznie znowu ({time})","join_reconnecting":"Ponowne łączenie…","join_reconnecting_left":"Twoje miejsce czeka jeszcze {time}.","pad_turn":"Obróć telefon poziomo","join_game_label":"Gra {host}","join_title":"Dołącz do gry znajomego","join_title_body":"Graj na PS5 {host} jako Gracz 2, 3 lub 4.","join_name_label":"Twoje imię","join_name_hint":"Znajomy zobaczy je, gdy poprosisz o dołączenie.","join_button":"Dołącz"},"pt-BR":{"usb_skipped_not_payload":"{name}: não é um arquivo .elf ou .bin","usb_skipped_unknown":"{id}: não está mais na lista de payloads","browser_unsupported":"Isso precisa do aplicativo para desktop. Não funciona no navegador.","video_recovered_notice":"O Play travou ao iniciar a imagem da última vez, então a imagem agora é decodificada sem a placa de vídeo (altere em Configurações › Janela › Gráficos › Decodificação de vídeo por hardware).","video_recovered_title":"Imagem agora decodificada por software","open_in_title":"Abrir no app PS5Upload?","open_in_body":"Tem o app PS5Upload neste aparelho? Abra por ele ou continue no navegador.","open_in_app":"Abrir no app","open_in_browser":"Continuar no navegador","open_in_remember":"Lembrar minha escolha neste aparelho","open_in_opening":"Abrindo o app PS5Upload…","open_in_not_opened":"Nada aconteceu? Talvez o app não esteja neste aparelho.","open_in_again":"Tentar de novo","pad_8bitdo_no_xinput":"Este 8BitDo não tem modo X-input. Se algum botão estiver errado, verifique o controle.","pad_8bitdo_how_switch":"coloque a chave de trás em X e aperte Start","pad_8bitdo_how_startx":"desligue e depois segure Start + X para ligar","pad_8bitdo_how_receiver":"use o receptor 2.4G dele ou um cabo USB","pad_8bitdo_how_manual":"o manual dele explica como","pad_8bitdo_xinput":"Para o melhor resultado, coloque seu 8BitDo no modo X-input: {how}.","rp_touch_left_stick":"Analógico esquerdo","rp_touch_right_stick":"Analógico direito","rp_pad_step_lx":"Mova o analógico esquerdo para a direita","rp_pad_step_ly":"Mova o analógico esquerdo para baixo","rp_pad_step_rx":"Mova o analógico direito para a direita","rp_pad_step_ry":"Mova o analógico direito para baixo","join_check_bottom":"Aperte o botão de baixo (✕)","join_check_right":"Aperte o botão da direita (○)","join_check_left":"Aperte o botão da esquerda (□)","join_check_top":"Aperte o botão de cima (△)","rp_pad_press":"Pressione {name}","join_check_saved":"Salvo para este controle neste aparelho. Teste abaixo.","join_check_title":"Verificar seu controle","join_done":"Concluído","rp_pads_none":"Nenhum controle detectado ainda. Conecte um e pressione qualquer botão nele.","rp_pad_mapped":"Joga com o seu mapeamento","join_check_unknown":"Este controle não está na nossa lista, então os botões podem estar trocados. Configurar leva poucos segundos.","rp_pad_standard":"Reconhecido","rp_pad_progress":"{n} de {total}","rp_pad_skip":"Pular","rp_pad_back":"Voltar","rp_pad_cancel":"Cancelar","join_check_try":"Aperte botões e mova os analógicos: o que você apertar acende.","join_check_redo":"Refazer","join_check_map":"Configurar os botões","rp_pad_reset":"Redefinir","join_open_lan_body":"Sem internet? Se você está no mesmo Wi-Fi que seu amigo, abra o jogo por lá.","join_open_lan":"Abrir neste Wi-Fi","join_path_lan":"Rede doméstica","join_seat_taken":"{host} precisou do controle de volta e não havia outro controle livre no PS5, então você saiu do jogo. Peça para {host} deixar você entrar de novo.","join_refused_key":"Este convite expirou. Peça um novo link a {host}.","join_refused_expired":"Seu lugar no jogo foi perdido. Peça a {host} para deixar você entrar de novo.","join_refused_full":"O jogo está cheio: já tem quatro jogadores.","join_refused_denied":"{host} não deixou você entrar desta vez.","join_refused_no_answer":"{host} não respondeu a tempo. Avise {host} e tente de novo.","join_refused_closed":"{host} não está com o Jogar juntos aberto agora.","join_refused_old_helper":"O PS5 de {host} precisa de um auxiliar atualizado para o Jogar juntos.","join_refused_not_playing":"{host} não está jogando agora. Peça para {host} iniciar o Jogar primeiro.","join_refused_unreachable":"O computador de {host} não conseguiu acessar o PS5. Tente de novo daqui a pouco.","join_refused_slow_down":"Muitos códigos errados. Espere um minuto e tente de novo.","join_refused_address":"O endereço deste link está fora da sua rede doméstica, então o aplicativo não vai usá-lo. Peça a {host} um link com o endereço IP do computador.","join_refused_other":"{host} não deixou você entrar.","join_ended_kicked":"{host} tirou você do jogo.","join_ended_closed":"{host} fechou o Jogar juntos.","join_ended_host_stopped":"O anfitrião parou de jogar.","join_ended_replaced":"Este jogo foi aberto em outra aba ou em outro dispositivo, então parou aqui.","join_ended_pad_lost":"O PS5 perdeu seu controle, então você saiu do jogo. Peça a {host} para deixar você entrar de novo.","join_ended_gave_up":"A conexão com {host} não voltou a tempo.","join_net_lost":"A conexão com {host} caiu. Verifique sua conexão de internet e peça de novo.","join_ended_lost":"Não foi possível alcançar {host}. Verifique se vocês estão na mesma rede.","join_ended_left":"Você saiu do jogo.","join_net_mismatch":"Este link não corresponde ao anfitrião; peça um novo a ele.","join_net_no_direct":"Não é possível uma conexão direta a partir desta rede (os roteadores dos dois lados são restritos). Tente o Wi-Fi em vez dos dados móveis ou peça ao anfitrião para ativar o UPnP.","join_net_no_room":"Este convite não está mais aberto. Peça a {host} um novo link.","join_net_full":"O jogo de {host} não tem lugar para mais um amigo agora. Tente de novo daqui a pouco.","join_net_no_hub":"Não foi possível alcançar o serviço de convites do PS5Upload. Verifique sua conexão com a internet e tente de novo.","join_net_offer":"O computador de {host} não conseguiu se conectar a este navegador. Tente outro navegador.","join_net_no_webrtc":"Este navegador não consegue fazer conexões diretas. Tente uma versão recente do Chrome, Safari ou Firefox.","join_cancel":"Cancelar","join_host_fallback":"seu amigo","join_connecting":"Conectando a {host}…","join_waiting":"Esperando {host} deixar você entrar","join_waiting_body":"{host} vê seu nome na tela e toca em Permitir.","join_retry":"Tentar de novo","join_again":"Pedir para entrar de novo","join_playing_at":"Jogando na casa de {host}","join_you_are":"Você é o Jogador {n}","join_seat_stream":"Você está jogando com o usuário do PS5 de {host}. Não precisa escolher um.","join_plays_as":"Você está jogando como {profile}. Não precisa escolher.","join_seat_tv_asks":"{host} escolheu um perfil para você, mas não foi possível usá-lo. A TV vai perguntar quem você é.","join_picking":"Aperte PS e depois escolha Jogo rápido na TV","join_hide_controls":"Ocultar","join_sound":"Ativar som","rp_unmute":"Ativar som","rp_mute":"Silenciar","join_no_sound":"Sem som neste navegador","join_exit_fullscreen":"Sair da tela cheia","pad_fill":"Tela cheia","join_leave":"Sair","join_show_controls":"Mostrar controles","join_hold_hint":"Toque e segure a imagem para mostrar os botões","pad_watch_no_hevc":"Este aparelho não reproduz a imagem deste stream: o computador transmite em HEVC e este aparelho reproduz apenas H.264.","pad_watch_decode":"Não foi possível reproduzir a imagem aqui.","join_pad_ready":"Seu controle está pronto","join_check_unknown_short":"Não está na nossa lista: os botões podem estar trocados.","join_full_to_play":"Toque em tela cheia para jogar com o controle na tela.","join_pad_none":"Conecte um controle (USB ou Bluetooth) e aperte qualquer botão.","join_pad_keys":"Ou use o teclado: WASD move, setas direcional, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Aperte Voltar no controle remoto para ver os botões.","join_block_note":"{host} desativou PS e Create para amigos.","join_guide_title":"Mais um passo na TV","join_guide_body":"Aperte PS uma vez no seu controle. A TV pergunta \"Quem está usando este controle?\". Escolha Jogo rápido ou o seu próprio usuário. O anfitrião não precisa fazer nada.","join_guide_menus":"Na tela inicial do PS5 só o anfitrião controla os menus; seu controle joga dentro dos jogos.","join_guide_ok":"Entendi","join_host_away":"O anfitrião parou de jogar — esperando ele começar de novo ({time})","join_reconnecting":"Reconectando…","join_reconnecting_left":"Seu lugar fica guardado por {time}.","pad_turn":"Vire o celular na horizontal","join_game_label":"Jogo de {host}","join_title":"Entrar no jogo de um amigo","join_title_body":"Jogue no PS5 de {host} como Jogador 2, 3 ou 4.","join_name_label":"Seu nome","join_name_hint":"Seu amigo vê isto quando você pede para entrar.","join_button":"Entrar"},"ru":{"usb_skipped_not_payload":"{name}: не файл .elf или .bin","usb_skipped_unknown":"{id}: больше нет в списке пейлоадов","browser_unsupported":"Для этого нужно настольное приложение. В браузере это не работает.","video_recovered_notice":"В прошлый раз Play упал при запуске картинки, поэтому теперь картинка декодируется без видеокарты (изменить: Настройки › Окно › Графика › Аппаратное декодирование видео).","video_recovered_title":"Картинка теперь декодируется программно","open_in_title":"Открыть в приложении PS5Upload?","open_in_body":"Приложение PS5Upload есть на этом устройстве? Откройте это там или продолжите в браузере.","open_in_app":"Открыть в приложении","open_in_browser":"Продолжить в браузере","open_in_remember":"Запомнить выбор на этом устройстве","open_in_opening":"Открываем приложение PS5Upload…","open_in_not_opened":"Ничего не произошло? Возможно, приложения нет на этом устройстве.","open_in_again":"Повторить","pad_8bitdo_no_xinput":"У этого 8BitDo нет режима X-input. Если кнопка срабатывает не так, проверьте контроллер.","pad_8bitdo_how_switch":"переведите переключатель сзади в положение X, затем нажмите Start","pad_8bitdo_how_startx":"выключите его, затем включите, удерживая Start + X","pad_8bitdo_how_receiver":"используйте его приёмник 2.4G или кабель USB","pad_8bitdo_how_manual":"как это сделать, сказано в его инструкции","pad_8bitdo_xinput":"Для лучшего результата переключите 8BitDo в режим X-input: {how}.","rp_touch_left_stick":"Левый стик","rp_touch_right_stick":"Правый стик","rp_touch_touchpad":"Сенсорная панель","rp_menu":"Меню","rp_pad_step_lx":"Отклоните левый стик вправо","rp_pad_step_ly":"Отклоните левый стик вниз","rp_pad_step_rx":"Отклоните правый стик вправо","rp_pad_step_ry":"Отклоните правый стик вниз","join_check_bottom":"Нажмите нижнюю кнопку (✕)","join_check_right":"Нажмите правую кнопку (○)","join_check_left":"Нажмите левую кнопку (□)","join_check_top":"Нажмите верхнюю кнопку (△)","rp_pad_press":"Нажмите {name}","join_check_saved":"Сохранено для этого контроллера на этом устройстве. Попробуйте ниже.","join_check_title":"Проверить контроллер","join_done":"Готово","rp_pads_none":"Контроллер пока не найден. Подключите его и нажмите любую кнопку.","rp_pad_mapped":"Играет с вашей раскладкой","join_check_unknown":"Этого контроллера нет в нашем списке, поэтому кнопки могут быть перепутаны. Настройка займёт несколько секунд.","rp_pad_standard":"Распознан","rp_pad_progress":"{n} из {total}","rp_pad_skip":"Пропустить","rp_pad_back":"Назад","rp_pad_cancel":"Отмена","join_check_try":"Нажимайте кнопки и двигайте стики: нажатое подсвечивается.","join_check_redo":"Заново","join_check_map":"Настроить кнопки","rp_pad_reset":"Сбросить","join_open_lan_body":"Нет доступа к интернету? Если вы в той же сети Wi-Fi, что и друг, откройте игру там.","join_open_lan":"Открыть в этой сети Wi-Fi","join_path_lan":"Домашняя сеть","join_path_internet":"Интернет","join_seat_taken":"{host} понадобился его контроллер, а других свободных контроллеров на PS5 не было, поэтому вы вышли из игры. Попросите {host} впустить вас снова.","join_refused_key":"Срок приглашения истёк. Попросите у {host} новую ссылку.","join_refused_expired":"Ваше место в игре потеряно. Попросите {host} впустить вас снова.","join_refused_full":"Мест нет: уже играют четверо.","join_refused_denied":"{host} в этот раз вас не впустил.","join_refused_no_answer":"{host} не ответил вовремя. Сообщите {host} и попробуйте ещё раз.","join_refused_closed":"{host} сейчас не проводит «Совместную игру».","join_refused_old_helper":"Для «Совместной игры» на PS5 {host} нужен обновлённый помощник.","join_refused_not_playing":"{host} сейчас не играет. Попросите {host} сначала запустить Игру.","join_refused_unreachable":"Компьютер {host} не смог связаться с PS5. Попробуйте ещё раз чуть позже.","join_refused_slow_down":"Слишком много неверных кодов. Подождите минуту и попробуйте снова.","join_refused_address":"Адрес этой ссылки находится вне вашей домашней сети, поэтому приложение его не использует. Попросите {host} дать ссылку с IP-адресом компьютера.","join_refused_other":"{host} вас не впустил.","join_ended_kicked":"{host} убрал вас из игры.","join_ended_closed":"{host} закрыл «Совместную игру».","join_ended_host_stopped":"Хост перестал играть.","join_ended_replaced":"Эту игру открыли в другой вкладке или на другом устройстве, поэтому здесь она остановилась.","join_ended_pad_lost":"PS5 потеряла ваш контроллер, поэтому вы вышли из игры. Попросите {host} впустить вас снова.","join_ended_gave_up":"Соединение с {host} не восстановилось вовремя.","join_net_lost":"Соединение с {host} прервалось. Проверьте подключение к интернету и попросите ещё раз.","join_ended_lost":"Не удалось связаться с {host}. Проверьте, что вы в одной сети.","join_ended_left":"Вы вышли из игры.","join_net_mismatch":"Эта ссылка не совпадает с хостом; попросите у него новую.","join_net_no_direct":"Из этой сети прямое подключение невозможно (роутеры с обеих сторон строгие). Попробуйте Wi-Fi вместо мобильного интернета или попросите хоста включить UPnP.","join_net_no_room":"Это приглашение больше не действует. Попросите у {host} новую ссылку.","join_net_full":"В игре {host} сейчас нет места для ещё одного друга. Попробуйте чуть позже.","join_net_no_hub":"Не удалось связаться со службой приглашений PS5Upload. Проверьте подключение к интернету и попробуйте снова.","join_net_offer":"Компьютер {host} не смог подключиться к этому браузеру. Попробуйте другой браузер.","join_net_no_webrtc":"Этот браузер не умеет устанавливать прямые подключения. Попробуйте свежую версию Chrome, Safari или Firefox.","join_cancel":"Отмена","join_host_fallback":"ваш друг","join_connecting":"Подключение к {host}…","join_waiting":"Ждём, пока {host} вас впустит","join_waiting_body":"{host} видит ваше имя на экране и нажимает «Разрешить».","join_retry":"Повторить","join_again":"Снова попроситься в игру","join_playing_at":"Игра у {host}","join_you_are":"Вы — Игрок {n}","join_seat_stream":"Вы играете под пользователем PS5 хоста {host}. Выбирать пользователя не нужно.","join_plays_as":"Вы играете как {profile}. Выбирать никого не нужно.","join_seat_tv_asks":"{host} выбрал для вас профиль, но использовать его не удалось. Телевизор спросит, кто вы.","join_picking":"Нажмите PS, затем выберите «Быстрая игра» на телевизоре","join_hide_controls":"Скрыть","join_sound":"Включить звук","rp_unmute":"Включить звук","rp_mute":"Без звука","join_no_sound":"В этом браузере нет звука","join_exit_fullscreen":"Выйти из полноэкранного режима","pad_fill":"Во весь экран","join_leave":"Выйти","join_show_controls":"Показать кнопки","join_hold_hint":"Нажмите и удерживайте изображение, чтобы показать кнопки","pad_watch_no_hevc":"Это устройство не может показать картинку этой трансляции: компьютер передаёт HEVC, а устройство воспроизводит только H.264.","pad_watch_decode":"Картинку не удалось воспроизвести здесь.","join_pad_ready":"Ваш контроллер готов","join_check_unknown_short":"Нет в нашем списке: кнопки могут быть перепутаны.","join_full_to_play":"Нажмите «Во весь экран», чтобы играть с экранным контроллером.","join_pad_none":"Подключите контроллер (USB или Bluetooth) и нажмите любую кнопку.","join_pad_keys":"Или играйте с клавиатуры: WASD — движение, стрелки — крестовина, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Нажмите «Назад» на пульте, чтобы показать кнопки.","join_block_note":"{host} отключил PS и Create для друзей.","join_guide_title":"Ещё один шаг на телевизоре","join_guide_body":"Нажмите PS на контроллере один раз. Телевизор спросит «Кто использует этот контроллер?». Выберите «Быстрая игра» или своего пользователя. Хосту ничего делать не нужно.","join_guide_menus":"На главном экране PS5 меню управляет только хост; ваш контроллер работает внутри игр.","join_guide_ok":"Понятно","join_host_away":"Хост перестал играть — ждём, когда он начнёт снова ({time})","join_reconnecting":"Переподключение…","join_reconnecting_left":"Ваше место сохраняется ещё {time}.","pad_turn":"Поверните телефон горизонтально","join_game_label":"Игра {host}","join_title":"Присоединиться к игре друга","join_title_body":"Играйте на PS5 {host} как Игрок 2, 3 или 4.","join_name_label":"Ваше имя","join_name_hint":"Друг увидит его, когда вы попроситесь в игру.","join_button":"Войти"},"th":{"usb_skipped_not_payload":"{name}: ไม่ใช่ไฟล์ .elf หรือ .bin","usb_skipped_unknown":"{id}: ไม่อยู่ในรายการเพย์โหลดแล้ว","browser_unsupported":"ต้องใช้แอปเดสก์ท็อป ใช้ในเบราว์เซอร์ไม่ได้","video_recovered_notice":"ครั้งก่อนหน้าเล่นล่มขณะเริ่มภาพ ตอนนี้จึงถอดรหัสภาพโดยไม่ใช้การ์ดจอ (เปลี่ยนได้ที่ การตั้งค่า › หน้าต่าง › กราฟิก › ถอดรหัสวิดีโอด้วยฮาร์ดแวร์)","video_recovered_title":"ตอนนี้ถอดรหัสภาพด้วยซอฟต์แวร์","open_in_title":"เปิดในแอป PS5Upload ไหม","open_in_body":"มีแอป PS5Upload ในอุปกรณ์นี้ไหม เปิดในแอป หรือใช้ต่อในเบราว์เซอร์ก็ได้","open_in_app":"เปิดในแอป","open_in_browser":"ใช้ต่อในเบราว์เซอร์","open_in_remember":"จำตัวเลือกของฉันในอุปกรณ์นี้","open_in_opening":"กำลังเปิดแอป PS5Upload…","open_in_not_opened":"ไม่มีอะไรเกิดขึ้นใช่ไหม อุปกรณ์นี้อาจไม่มีแอป","open_in_again":"ลองอีกครั้ง","pad_8bitdo_no_xinput":"8BitDo รุ่นนี้ไม่มีโหมด X-input หากปุ่มใดทำงานผิด ให้ตรวจสอบคอนโทรลเลอร์","pad_8bitdo_how_switch":"เลื่อนสวิตช์ด้านหลังไปที่ X แล้วกด Start","pad_8bitdo_how_startx":"ปิดเครื่อง แล้วกด Start + X ค้างไว้เพื่อเปิด","pad_8bitdo_how_receiver":"ใช้ตัวรับสัญญาณ 2.4G หรือสาย USB","pad_8bitdo_how_manual":"ดูวิธีได้ในคู่มือ","pad_8bitdo_xinput":"เพื่อผลลัพธ์ที่ดีที่สุด ให้เปลี่ยน 8BitDo เป็นโหมด X-input: {how}","rp_touch_left_stick":"สติกซ้าย","rp_touch_right_stick":"สติกขวา","rp_touch_touchpad":"ทัชแพด","rp_menu":"เมนู","rp_pad_step_lx":"ดันอนาล็อกซ้ายไปทางขวา","rp_pad_step_ly":"ดันอนาล็อกซ้ายลง","rp_pad_step_rx":"ดันอนาล็อกขวาไปทางขวา","rp_pad_step_ry":"ดันอนาล็อกขวาลง","join_check_bottom":"กดปุ่มด้านล่าง (✕)","join_check_right":"กดปุ่มด้านขวา (○)","join_check_left":"กดปุ่มด้านซ้าย (□)","join_check_top":"กดปุ่มด้านบน (△)","rp_pad_press":"กด {name}","join_check_saved":"บันทึกสำหรับคอนโทรลเลอร์นี้บนอุปกรณ์นี้แล้ว ลองใช้ด้านล่าง","join_check_title":"ตรวจสอบคอนโทรลเลอร์","join_done":"เสร็จสิ้น","rp_pads_none":"ยังไม่พบคอนโทรลเลอร์ เชื่อมต่อแล้วกดปุ่มใดก็ได้บนคอนโทรลเลอร์","rp_pad_mapped":"เล่นตามการกำหนดปุ่มของคุณ","join_check_unknown":"คอนโทรลเลอร์นี้ไม่อยู่ในรายการของเรา ปุ่มจึงอาจสลับกัน การตั้งค่าใช้เวลาเพียงไม่กี่วินาที","rp_pad_standard":"รู้จักแล้ว","rp_pad_progress":"{n} จาก {total}","rp_pad_skip":"ข้าม","rp_pad_back":"ย้อนกลับ","rp_pad_cancel":"ยกเลิก","join_check_try":"กดปุ่มและขยับสติ๊ก: ปุ่มที่กดจะสว่างขึ้น","join_check_redo":"ทำใหม่","join_check_map":"ตั้งค่าปุ่ม","rp_pad_reset":"รีเซ็ต","join_open_lan_body":"เข้าอินเทอร์เน็ตไม่ได้? ถ้าคุณอยู่บน Wi-Fi เดียวกับเพื่อน ให้เปิดเกมที่นั่น","join_open_lan":"เปิดบน Wi-Fi นี้","join_path_lan":"เครือข่ายในบ้าน","join_path_internet":"อินเทอร์เน็ต","join_seat_taken":"{host} ต้องใช้คอนโทรลเลอร์ของตัวเองคืน และไม่มีคอนโทรลเลอร์อื่นว่างบน PS5 คุณจึงออกจากเกม ขอให้ {host} ให้คุณเข้าอีกครั้ง","join_refused_key":"คำเชิญนี้หมดอายุแล้ว ขอลิงก์ใหม่จาก {host}","join_refused_expired":"ที่ของคุณในเกมหายไปแล้ว ขอให้ {host} ให้เข้าใหม่","join_refused_full":"เกมเต็มแล้ว: มีผู้เล่นครบสี่คน","join_refused_denied":"{host} ไม่ได้ให้คุณเข้าในครั้งนี้","join_refused_no_answer":"{host} ไม่ตอบทันเวลา แจ้ง {host} แล้วลองอีกครั้ง","join_refused_closed":"ตอนนี้ {host} ไม่ได้เปิดเล่นด้วยกัน","join_refused_old_helper":"PS5 ของ {host} ต้องอัปเดตตัวช่วยเพื่อเล่นด้วยกัน","join_refused_not_playing":"ตอนนี้ {host} ไม่ได้เล่นอยู่ ขอให้ {host} เริ่มเล่นก่อน","join_refused_unreachable":"คอมพิวเตอร์ของ {host} เชื่อมต่อกับ PS5 ไม่ได้ ลองใหม่อีกครั้งในอีกสักครู่","join_refused_slow_down":"ใส่รหัสผิดหลายครั้งเกินไป รอหนึ่งนาทีแล้วลองใหม่","join_refused_address":"ที่อยู่ของลิงก์นี้อยู่นอกเครือข่ายภายในบ้าน แอปจึงไม่ใช้ ขอลิงก์ที่มีที่อยู่ IP ของคอมพิวเตอร์จาก {host}","join_refused_other":"{host} ไม่ได้ให้คุณเข้า","join_ended_kicked":"{host} นำคุณออกจากเกม","join_ended_closed":"{host} ปิดเล่นด้วยกันแล้ว","join_ended_host_stopped":"โฮสต์หยุดเล่นแล้ว","join_ended_replaced":"เกมนี้ถูกเปิดในแท็บอื่นหรืออุปกรณ์อื่น จึงหยุดที่นี่","join_ended_pad_lost":"PS5 ทำคอนโทรลเลอร์ของคุณหาย คุณจึงออกจากเกม ขอให้ {host} ให้เข้าใหม่","join_ended_gave_up":"การเชื่อมต่อกับ {host} ไม่กลับมาทันเวลา","join_net_lost":"การเชื่อมต่อกับ {host} หลุด ตรวจสอบการเชื่อมต่ออินเทอร์เน็ต แล้วขอเข้าร่วมอีกครั้ง","join_ended_lost":"ติดต่อ {host} ไม่ได้ ตรวจสอบว่าอยู่ในเครือข่ายเดียวกัน","join_ended_left":"คุณออกจากเกมแล้ว","join_net_mismatch":"ลิงก์นี้ไม่ตรงกับโฮสต์ ขอลิงก์ใหม่จากเขา","join_net_no_direct":"เชื่อมต่อโดยตรงจากเครือข่ายนี้ไม่ได้ (เราเตอร์ทั้งสองฝั่งเข้มงวด) ลองใช้ Wi-Fi แทนเน็ตมือถือ หรือขอให้โฮสต์เปิด UPnP","join_net_no_room":"คำเชิญนี้ปิดไปแล้ว ขอลิงก์ใหม่จาก {host}","join_net_full":"เกมของ {host} ไม่มีที่ว่างสำหรับเพื่อนเพิ่มในตอนนี้ ลองใหม่อีกสักครู่","join_net_no_hub":"ติดต่อบริการคำเชิญของ PS5Upload ไม่ได้ ตรวจสอบการเชื่อมต่ออินเทอร์เน็ตแล้วลองใหม่","join_net_offer":"คอมพิวเตอร์ของ {host} เชื่อมต่อกับเบราว์เซอร์นี้ไม่ได้ ลองเบราว์เซอร์อื่น","join_net_no_webrtc":"เบราว์เซอร์นี้เชื่อมต่อโดยตรงไม่ได้ ลองใช้ Chrome, Safari หรือ Firefox เวอร์ชันล่าสุด","join_cancel":"ยกเลิก","join_host_fallback":"เพื่อนของคุณ","join_connecting":"กำลังเชื่อมต่อกับ {host}…","join_waiting":"กำลังรอ {host} ให้คุณเข้า","join_waiting_body":"{host} จะเห็นชื่อคุณบนหน้าจอและแตะอนุญาต","join_retry":"ลองอีกครั้ง","join_again":"ขอเข้าร่วมอีกครั้ง","join_playing_at":"กำลังเล่นที่บ้าน {host}","join_you_are":"คุณคือผู้เล่น {n}","join_seat_stream":"คุณกำลังเล่นด้วยผู้ใช้ PS5 ของ {host} ไม่ต้องเลือกผู้ใช้","join_plays_as":"คุณกำลังเล่นในนาม {profile} ไม่ต้องเลือกอะไร","join_seat_tv_asks":"{host} เลือกโปรไฟล์ไว้ให้คุณ แต่ใช้ไม่ได้ ทีวีจะถามว่าคุณเป็นใคร","join_picking":"กด PS แล้วเลือกเล่นด่วนบนทีวี","join_hide_controls":"ซ่อน","join_sound":"แตะเพื่อเปิดเสียง","rp_unmute":"เปิดเสียง","rp_mute":"ปิดเสียง","join_no_sound":"เบราว์เซอร์นี้ไม่มีเสียง","join_exit_fullscreen":"ออกจากเต็มจอ","pad_fill":"เต็มจอ","join_leave":"ออก","join_show_controls":"แสดงปุ่มควบคุม","join_hold_hint":"กดค้างที่ภาพเพื่อแสดงปุ่ม","pad_watch_no_hevc":"อุปกรณ์นี้เล่นภาพของสตรีมนี้ไม่ได้: คอมพิวเตอร์สตรีมเป็น HEVC แต่อุปกรณ์นี้เล่นได้แค่ H.264","pad_watch_decode":"เล่นภาพที่นี่ไม่ได้","join_pad_ready":"คอนโทรลเลอร์ของคุณพร้อมแล้ว","join_check_unknown_short":"ไม่อยู่ในรายการ: ปุ่มอาจสลับกัน","join_full_to_play":"แตะเต็มหน้าจอเพื่อเล่นด้วยคอนโทรลเลอร์บนหน้าจอ","join_pad_none":"เชื่อมต่อคอนโทรลเลอร์ (USB หรือ Bluetooth) แล้วกดปุ่มใดก็ได้","join_pad_keys":"หรือใช้คีย์บอร์ด: WASD เคลื่อนที่, ลูกศร D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options","join_tv_back_hint":"กดปุ่มย้อนกลับบนรีโมตเพื่อแสดงปุ่ม","join_block_note":"{host} ปิดปุ่ม PS และ Create สำหรับเพื่อน","join_guide_title":"อีกขั้นตอนเดียวบนทีวี","join_guide_body":"กด PS บนคอนโทรลเลอร์หนึ่งครั้ง ทีวีจะถามว่า \"ใครกำลังใช้คอนโทรลเลอร์นี้?\" เลือกเล่นด่วนหรือผู้ใช้ของคุณเอง เจ้าของเกมไม่ต้องทำอะไร","join_guide_menus":"บนหน้าจอหลักของ PS5 มีแค่โฮสต์ที่ควบคุมเมนูได้ คอนโทรลเลอร์ของคุณใช้เล่นในเกม","join_guide_ok":"เข้าใจแล้ว","join_host_away":"โฮสต์หยุดเล่นแล้ว — กำลังรอให้เริ่มเล่นอีกครั้ง ({time})","join_reconnecting":"กำลังเชื่อมต่อใหม่…","join_reconnecting_left":"ที่ของคุณจะถูกเก็บไว้ {time}","pad_turn":"หมุนมือถือเป็นแนวนอน","join_game_label":"เกมของ {host}","join_title":"เข้าร่วมเกมของเพื่อน","join_title_body":"เล่นบน PS5 ของ {host} เป็นผู้เล่น 2, 3 หรือ 4","join_name_label":"ชื่อของคุณ","join_name_hint":"เพื่อนจะเห็นชื่อนี้เมื่อคุณขอเข้าร่วม","join_button":"เข้าร่วม"},"tr":{"usb_skipped_not_payload":"{name}: .elf veya .bin dosyası değil","usb_skipped_unknown":"{id}: artık payload listesinde değil","browser_unsupported":"Bunun için masaüstü uygulaması gerekir. Tarayıcıda çalışmaz.","video_recovered_notice":"Play geçen sefer görüntüyü başlatırken çöktü, bu yüzden görüntü artık ekran kartı olmadan çözülüyor (değiştirmek için Ayarlar › Pencere › Grafik › Donanımsal video çözme).","video_recovered_title":"Görüntü artık yazılımla çözülüyor","open_in_title":"PS5Upload uygulamasında açılsın mı?","open_in_body":"Bu cihazda PS5Upload uygulaması var mı? Bunu orada aç ya da tarayıcıda devam et.","open_in_app":"Uygulamada aç","open_in_browser":"Tarayıcıda devam et","open_in_remember":"Bu cihazda seçimimi hatırla","open_in_opening":"PS5Upload uygulaması açılıyor…","open_in_not_opened":"Bir şey olmadı mı? Uygulama bu cihazda olmayabilir.","open_in_again":"Tekrar dene","pad_8bitdo_no_xinput":"Bu 8BitDo'nun X-input modu yok. Bir tuş yanlışsa kumandayı kontrol et.","pad_8bitdo_how_switch":"arkadaki düğmeyi X'e getir, sonra Start'a bas","pad_8bitdo_how_startx":"kapat, sonra açmak için Start + X'e basılı tut","pad_8bitdo_how_receiver":"2.4G alıcısını ya da bir USB kablosu kullan","pad_8bitdo_how_manual":"nasıl yapılacağı kılavuzunda yazıyor","pad_8bitdo_xinput":"En iyi sonuç için 8BitDo'nu X-input moduna al: {how}.","rp_touch_left_stick":"Sol çubuk","rp_touch_right_stick":"Sağ çubuk","rp_touch_touchpad":"Dokunmatik yüzey","rp_menu":"Menü","rp_pad_step_lx":"Sol çubuğu sağa itin","rp_pad_step_ly":"Sol çubuğu aşağı itin","rp_pad_step_rx":"Sağ çubuğu sağa itin","rp_pad_step_ry":"Sağ çubuğu aşağı itin","join_check_bottom":"Alttaki yüz tuşuna bas (✕)","join_check_right":"Sağdaki yüz tuşuna bas (○)","join_check_left":"Soldaki yüz tuşuna bas (□)","join_check_top":"Üstteki yüz tuşuna bas (△)","rp_pad_press":"{name} tuşuna basın","join_check_saved":"Bu cihazda bu kumanda için kaydedildi. Aşağıda dene.","join_check_title":"Kumandanı kontrol et","join_done":"Tamam","rp_pads_none":"Henüz kumanda görülmedi. Bir tane bağlayın ve herhangi bir tuşuna basın.","rp_pad_mapped":"Sizin eşlemenizle oynuyor","join_check_unknown":"Bu kumanda listemizde yok, bu yüzden tuşları karışık olabilir. Ayarlamak birkaç saniye sürer.","rp_pad_standard":"Tanındı","rp_pad_progress":"{n} / {total}","rp_pad_skip":"Atla","rp_pad_back":"Geri","rp_pad_cancel":"İptal","join_check_try":"Tuşlara bas ve çubukları oynat: bastığın şey yanar.","join_check_redo":"Yeniden yap","join_check_map":"Tuşları ayarla","rp_pad_reset":"Sıfırla","join_open_lan_body":"İnternete ulaşamıyor musun? Arkadaşınla aynı Wi-Fi'daysan oyunu orada aç.","join_open_lan":"Bu Wi-Fi'da aç","join_path_lan":"Ev ağı","join_path_internet":"İnternet","join_seat_taken":"{host} kumandasını geri istedi ve PS5'te boş başka kumanda yoktu, bu yüzden oyundan çıktın. {host} adlı kişiden seni tekrar almasını iste.","join_refused_key":"Bu davetin süresi doldu. {host} kullanıcısından yeni bir bağlantı iste.","join_refused_expired":"Oyundaki yerin gitti. {host} seni yeniden alsın diye iste.","join_refused_full":"Oyun dolu: zaten dört oyuncu var.","join_refused_denied":"{host} bu sefer seni içeri almadı.","join_refused_no_answer":"{host} zamanında yanıt vermedi. {host} kişisine haber ver, sonra yeniden dene.","join_refused_closed":"{host} şu anda Birlikte Oyna açmıyor.","join_refused_old_helper":"Birlikte Oyna için {host} adlı kişinin PS5'inde yardımcının güncellenmesi gerekiyor.","join_refused_not_playing":"{host} şu anda oynamıyor. Önce Oyna'yı başlatmasını {host} kullanıcısından iste.","join_refused_unreachable":"{host} adlı kişinin bilgisayarı PS5'e ulaşamadı. Biraz sonra tekrar dene.","join_refused_slow_down":"Çok fazla yanlış kod. Bir dakika bekle, sonra tekrar dene.","join_refused_address":"Bu bağlantının adresi ev ağınızın dışında olduğundan uygulama bunu kullanmaz. {host} kullanıcısından bilgisayarının IP adresini içeren bir bağlantı isteyin.","join_refused_other":"{host} seni içeri almadı.","join_ended_kicked":"{host} seni oyundan çıkardı.","join_ended_closed":"{host}, Birlikte Oyna'yı kapattı.","join_ended_host_stopped":"Ev sahibi oynamayı bıraktı.","join_ended_replaced":"Bu oyun başka bir sekmede veya cihazda açıldı, bu yüzden burada durdu.","join_ended_pad_lost":"PS5 kumandanı kaybetti, bu yüzden oyundan çıktın. {host} seni yeniden alsın diye iste.","join_ended_gave_up":"{host} ile bağlantı zamanında geri gelmedi.","join_net_lost":"{host} ile bağlantı koptu. İnternet bağlantını kontrol et, sonra yeniden iste.","join_ended_lost":"{host} kullanıcısına ulaşılamadı. Aynı ağda olduğunuzu kontrol et.","join_ended_left":"Oyundan ayrıldın.","join_net_mismatch":"Bu bağlantı ev sahibiyle eşleşmiyor; ondan yeni bir bağlantı iste.","join_net_no_direct":"Bu ağdan doğrudan bağlantı mümkün değil (iki tarafın yönlendiricisi de katı). Mobil veri yerine Wi-Fi dene ya da ev sahibinden UPnP'yi açmasını iste.","join_net_no_room":"Bu davet artık açık değil. {host} kullanıcısından yeni bir bağlantı iste.","join_net_full":"{host} kullanıcısının oyununda şu an başka bir arkadaşa yer yok. Biraz sonra tekrar dene.","join_net_no_hub":"PS5Upload davet hizmetine ulaşılamadı. İnternet bağlantını kontrol et, sonra tekrar dene.","join_net_offer":"{host} kullanıcısının bilgisayarı bu tarayıcıya bağlanamadı. Başka bir tarayıcı dene.","join_net_no_webrtc":"Bu tarayıcı doğrudan bağlantı kuramıyor. Güncel bir Chrome, Safari veya Firefox dene.","join_cancel":"İptal","join_host_fallback":"arkadaşın","join_connecting":"Bağlanılıyor: {host}…","join_waiting":"{host} seni içeri alsın diye bekleniyor","join_waiting_body":"{host} adını ekranında görür ve İzin ver'e dokunur.","join_retry":"Tekrar dene","join_again":"Tekrar katılmak iste","join_playing_at":"Oynadığın yer: {host}","join_you_are":"Sen {n}. Oyuncusun","join_seat_stream":"{host} adlı kişinin PS5 kullanıcısıyla oynuyorsun. Kullanıcı seçmene gerek yok.","join_plays_as":"{profile} olarak oynuyorsunuz. Seçim yapmanıza gerek yok.","join_seat_tv_asks":"{host} sizin için bir profil seçti ama kullanılamadı. TV kim olduğunuzu soracak.","join_picking":"PS'ye bas, sonra televizyonda Hızlı Oyna'yı seç","join_hide_controls":"Gizle","join_sound":"Ses için dokun","rp_unmute":"Sesi aç","rp_mute":"Sessiz","join_no_sound":"Bu tarayıcıda ses yok","join_exit_fullscreen":"Tam ekrandan çık","pad_fill":"Tam ekran","join_leave":"Ayrıl","join_show_controls":"Kontrolleri göster","join_hold_hint":"Düğmeleri göstermek için görüntüye basılı tut","pad_watch_no_hevc":"Bu cihaz bu yayının görüntüsünü oynatamıyor: bilgisayar HEVC yayınlıyor, bu cihaz yalnızca H.264 oynatıyor.","pad_watch_decode":"Görüntü burada oynatılamadı.","join_pad_ready":"Kumandan hazır","join_check_unknown_short":"Listemizde yok: tuşlar karışık olabilir.","join_full_to_play":"Ekran kumandasıyla oynamak için Tam ekran'a dokun.","join_pad_none":"Bir kumanda bağla (USB veya Bluetooth) ve herhangi bir tuşa bas.","join_pad_keys":"Ya da klavyeyi kullan: WASD hareket, ok tuşları yön tuşları, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Düğmeleri görmek için kumandada Geri'ye bas.","join_block_note":"{host}, arkadaşlar için PS ve Create tuşlarını kapattı.","join_guide_title":"Televizyonda bir adım daha","join_guide_body":"Kumandandaki PS tuşuna bir kez bas. Televizyon \"Bu kumandayı kim kullanıyor?\" diye sorar. Hızlı Oyna'yı ya da kendi kullanıcını seç. Ev sahibinin bir şey yapması gerekmez.","join_guide_menus":"PS5 ana ekranında menüleri yalnızca ev sahibi kontrol eder; senin kumandan oyunların içinde çalışır.","join_guide_ok":"Anladım","join_host_away":"Ev sahibi oynamayı bıraktı — yeniden başlaması bekleniyor ({time})","join_reconnecting":"Yeniden bağlanıyor…","join_reconnecting_left":"Yerin {time} boyunca tutuluyor.","pad_turn":"Telefonu yan çevirin","join_game_label":"{host} adlı kişinin oyunu","join_title":"Bir arkadaşının oyununa katıl","join_title_body":"{host} adlı kişinin PS5'inde 2., 3. veya 4. Oyuncu olarak oyna.","join_name_label":"Adın","join_name_hint":"Katılmak istediğinde arkadaşın bunu görür.","join_button":"Katıl"},"vi":{"usb_skipped_not_payload":"{name}: không phải tệp .elf hoặc .bin","usb_skipped_unknown":"{id}: không còn trong danh sách payload","browser_unsupported":"Việc này cần ứng dụng máy tính. Không hoạt động trong trình duyệt.","video_recovered_notice":"Lần trước Play bị sập khi bắt đầu hình, nên giờ hình được giải mã không dùng card đồ họa (đổi trong Cài đặt › Cửa sổ › Đồ họa › Giải mã video bằng phần cứng).","video_recovered_title":"Hình giờ được giải mã bằng phần mềm","open_in_title":"Mở trong ứng dụng PS5Upload?","open_in_body":"Thiết bị này có ứng dụng PS5Upload? Mở trong ứng dụng, hoặc tiếp tục trên trình duyệt.","open_in_app":"Mở trong ứng dụng","open_in_browser":"Tiếp tục trên trình duyệt","open_in_remember":"Nhớ lựa chọn của tôi trên thiết bị này","open_in_opening":"Đang mở ứng dụng PS5Upload…","open_in_not_opened":"Không có gì xảy ra? Có thể thiết bị này chưa có ứng dụng.","open_in_again":"Thử lại","pad_8bitdo_no_xinput":"8BitDo này không có chế độ X-input. Nếu có nút sai, hãy kiểm tra tay cầm.","pad_8bitdo_how_switch":"gạt công tắc phía sau sang X, rồi nhấn Start","pad_8bitdo_how_startx":"tắt tay cầm, rồi giữ Start + X để bật lại","pad_8bitdo_how_receiver":"dùng bộ thu 2.4G của nó hoặc cáp USB","pad_8bitdo_how_manual":"cách làm có trong sách hướng dẫn","pad_8bitdo_xinput":"Để chơi tốt nhất, hãy chuyển 8BitDo sang chế độ X-input: {how}.","rp_touch_left_stick":"Cần trái","rp_touch_right_stick":"Cần phải","rp_touch_touchpad":"Bàn di cảm ứng","rp_pad_step_lx":"Đẩy cần trái sang phải","rp_pad_step_ly":"Đẩy cần trái xuống dưới","rp_pad_step_rx":"Đẩy cần phải sang phải","rp_pad_step_ry":"Đẩy cần phải xuống dưới","join_check_bottom":"Nhấn nút mặt phía dưới (✕)","join_check_right":"Nhấn nút mặt bên phải (○)","join_check_left":"Nhấn nút mặt bên trái (□)","join_check_top":"Nhấn nút mặt phía trên (△)","rp_pad_press":"Nhấn {name}","join_check_saved":"Đã lưu cho tay cầm này trên thiết bị này. Thử ngay bên dưới.","join_check_title":"Kiểm tra tay cầm","join_done":"Xong","rp_pads_none":"Chưa thấy tay cầm nào. Hãy kết nối một tay cầm và nhấn nút bất kỳ.","rp_pad_mapped":"Chơi theo cách gán nút của bạn","join_check_unknown":"Tay cầm này không có trong danh sách của chúng tôi nên các nút có thể bị lẫn. Thiết lập chỉ mất vài giây.","rp_pad_standard":"Đã nhận diện","rp_pad_progress":"{n}/{total}","rp_pad_skip":"Bỏ qua","rp_pad_back":"Quay lại","rp_pad_cancel":"Hủy","join_check_try":"Nhấn nút và di chuyển cần: nút bạn nhấn sẽ sáng lên.","join_check_redo":"Làm lại","join_check_map":"Thiết lập nút","rp_pad_reset":"Đặt lại","join_open_lan_body":"Không vào được internet? Nếu bạn dùng cùng Wi-Fi với bạn mình, hãy mở trò chơi ở đó.","join_open_lan":"Mở trên Wi-Fi này","join_path_lan":"Mạng nhà","join_seat_taken":"{host} cần lấy lại tay cầm và trên PS5 không còn tay cầm nào trống, nên bạn đã rời trò chơi. Hãy nhờ {host} cho bạn vào lại.","join_refused_key":"Lời mời này đã hết hạn. Hãy xin {host} liên kết mới.","join_refused_expired":"Bạn đã mất chỗ trong trò chơi. Hãy nhờ {host} cho vào lại.","join_refused_full":"Trò chơi đã đủ người: đã có bốn người chơi.","join_refused_denied":"Lần này {host} chưa cho bạn vào.","join_refused_no_answer":"{host} không trả lời kịp. Hãy báo {host}, rồi thử lại.","join_refused_closed":"{host} hiện không mở Chơi cùng nhau.","join_refused_old_helper":"PS5 của {host} cần cập nhật trình trợ giúp để Chơi cùng nhau.","join_refused_not_playing":"{host} hiện không chơi. Hãy nhờ {host} bắt đầu Chơi trước.","join_refused_unreachable":"Máy tính của {host} không kết nối được với PS5. Hãy thử lại sau giây lát.","join_refused_slow_down":"Nhập sai mã quá nhiều lần. Hãy đợi một phút rồi thử lại.","join_refused_address":"Địa chỉ của liên kết này nằm ngoài mạng gia đình nên ứng dụng sẽ không dùng. Hãy nhờ {host} gửi liên kết có địa chỉ IP của máy tính.","join_refused_other":"{host} không cho bạn vào.","join_ended_kicked":"{host} đã mời bạn ra khỏi trò chơi.","join_ended_closed":"{host} đã đóng Chơi cùng nhau.","join_ended_host_stopped":"Chủ phòng đã dừng chơi.","join_ended_replaced":"Trò chơi này đã được mở ở tab khác hoặc thiết bị khác, nên đã dừng ở đây.","join_ended_pad_lost":"PS5 đã mất tay cầm của bạn, nên bạn đã ra khỏi trò chơi. Hãy nhờ {host} cho vào lại.","join_ended_gave_up":"Kết nối tới {host} không trở lại kịp.","join_net_lost":"Kết nối tới {host} đã bị ngắt. Hãy kiểm tra kết nối internet, rồi xin vào lại.","join_ended_lost":"Không liên lạc được với {host}. Hãy kiểm tra hai bên có cùng mạng không.","join_ended_left":"Bạn đã rời trò chơi.","join_net_mismatch":"Liên kết này không khớp với chủ phòng; hãy xin họ một liên kết mới.","join_net_no_direct":"Không thể kết nối trực tiếp từ mạng này (bộ định tuyến của cả hai bên đều chặt). Hãy thử Wi-Fi thay cho dữ liệu di động, hoặc nhờ chủ phòng bật UPnP.","join_net_no_room":"Lời mời này không còn mở. Hãy xin {host} một liên kết mới.","join_net_full":"Trò chơi của {host} hiện không còn chỗ cho thêm một người bạn. Hãy thử lại sau giây lát.","join_net_no_hub":"Không liên lạc được với dịch vụ lời mời của PS5Upload. Hãy kiểm tra kết nối internet rồi thử lại.","join_net_offer":"Máy tính của {host} không kết nối được với trình duyệt này. Hãy thử trình duyệt khác.","join_net_no_webrtc":"Trình duyệt này không thể tạo kết nối trực tiếp. Hãy thử Chrome, Safari hoặc Firefox bản mới.","join_cancel":"Hủy","join_host_fallback":"bạn của bạn","join_connecting":"Đang kết nối tới {host}…","join_waiting":"Đang chờ {host} cho bạn vào","join_waiting_body":"{host} sẽ thấy tên bạn trên màn hình và chạm Cho phép.","join_retry":"Thử lại","join_again":"Xin vào lại","join_playing_at":"Đang chơi ở chỗ {host}","join_you_are":"Bạn là Người chơi {n}","join_seat_stream":"Bạn đang chơi bằng người dùng PS5 của {host}. Không cần chọn người dùng.","join_plays_as":"Bạn đang chơi bằng {profile}. Không cần chọn.","join_seat_tv_asks":"{host} đã chọn một hồ sơ cho bạn nhưng không dùng được. TV sẽ hỏi bạn là ai.","join_picking":"Bấm PS, rồi chọn Chơi nhanh trên TV","join_hide_controls":"Ẩn","join_sound":"Chạm để bật tiếng","rp_unmute":"Bật âm thanh","rp_mute":"Tắt tiếng","join_no_sound":"Trình duyệt này không phát được âm thanh","join_exit_fullscreen":"Thoát toàn màn hình","pad_fill":"Toàn màn hình","join_leave":"Rời đi","join_show_controls":"Hiện các nút điều khiển","join_hold_hint":"Nhấn giữ hình ảnh để hiện các nút","pad_watch_no_hevc":"Thiết bị này không phát được hình của stream này: máy tính truyền HEVC, còn thiết bị này chỉ phát H.264.","pad_watch_decode":"Không phát được hình ở đây.","join_pad_ready":"Tay cầm của bạn đã sẵn sàng","join_check_unknown_short":"Không có trong danh sách: các nút có thể bị lẫn.","join_full_to_play":"Chạm toàn màn hình để chơi bằng tay cầm trên màn hình.","join_pad_none":"Kết nối tay cầm (USB hoặc Bluetooth) rồi bấm nút bất kỳ.","join_pad_keys":"Hoặc dùng bàn phím: WASD di chuyển, phím mũi tên D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Nhấn Quay lại trên điều khiển từ xa để hiện các nút.","join_block_note":"{host} đã tắt PS và Create với bạn bè.","join_guide_title":"Thêm một bước trên TV","join_guide_body":"Bấm PS một lần trên tay cầm. TV sẽ hỏi \"Ai đang dùng tay cầm này?\". Chọn Chơi nhanh hoặc người dùng của bạn. Chủ phòng không cần làm gì.","join_guide_menus":"Trên màn hình chính PS5 chỉ chủ phòng điều khiển menu; tay cầm của bạn chơi bên trong trò chơi.","join_guide_ok":"Đã hiểu","join_host_away":"Chủ phòng đã dừng chơi — đang chờ họ chơi lại ({time})","join_reconnecting":"Đang kết nối lại…","join_reconnecting_left":"Chỗ của bạn được giữ trong {time}.","pad_turn":"Xoay ngang điện thoại","join_game_label":"Trò chơi của {host}","join_title":"Vào trò chơi của bạn bè","join_title_body":"Chơi trên PS5 của {host} với vai Người chơi 2, 3 hoặc 4.","join_name_label":"Tên của bạn","join_name_hint":"Bạn bè sẽ thấy tên này khi bạn xin vào.","join_button":"Vào chơi"},"zh-CN":{"usb_skipped_not_payload":"{name}:不是 .elf 或 .bin 文件","usb_skipped_unknown":"{id}:已不在 Payload 列表中","browser_unsupported":"这需要桌面应用,无法在浏览器中使用。","video_recovered_notice":"上次 Play 在开始显示画面时崩溃,因此画面现在不使用显卡解码(可在 设置 › 窗口 › 图形 › 硬件视频解码 中更改)。","video_recovered_title":"画面现由软件解码","open_in_title":"在 PS5Upload 应用中打开?","open_in_body":"这台设备装了 PS5Upload 应用?可以在应用中打开,或继续使用浏览器。","open_in_app":"在应用中打开","open_in_browser":"继续使用浏览器","open_in_remember":"在此设备上记住我的选择","open_in_opening":"正在打开 PS5Upload 应用…","open_in_not_opened":"没有反应?这台设备可能没有安装应用。","open_in_again":"重试","pad_8bitdo_no_xinput":"这款 8BitDo 没有 X-input 模式。如果有按键不对,请检查手柄。","pad_8bitdo_how_switch":"把背面的开关拨到 X,然后按 Start","pad_8bitdo_how_startx":"先关机,然后按住 Start + X 开机","pad_8bitdo_how_receiver":"使用它的 2.4G 接收器或 USB 线","pad_8bitdo_how_manual":"方法见其说明书","pad_8bitdo_xinput":"为获得最佳效果,请将 8BitDo 切换到 X-input 模式:{how}。","rp_touch_left_stick":"左摇杆","rp_touch_right_stick":"右摇杆","rp_touch_touchpad":"触摸板","rp_menu":"菜单","rp_pad_step_lx":"将左摇杆推向右","rp_pad_step_ly":"将左摇杆推向下","rp_pad_step_rx":"将右摇杆推向右","rp_pad_step_ry":"将右摇杆推向下","join_check_bottom":"按下方的功能键 (✕)","join_check_right":"按右侧的功能键 (○)","join_check_left":"按左侧的功能键 (□)","join_check_top":"按上方的功能键 (△)","rp_pad_press":"按 {name}","join_check_saved":"已在此设备上为这个手柄保存。可在下方试用。","join_check_title":"检查你的手柄","join_done":"完成","rp_pads_none":"还没有检测到手柄。请连接一个手柄并按任意按钮。","rp_pad_mapped":"使用你的按键映射","join_check_unknown":"这个手柄不在我们的列表中,按键可能会错位。设置只需几秒钟。","rp_pad_standard":"已识别","rp_pad_progress":"{n}/{total}","rp_pad_skip":"跳过","rp_pad_back":"返回","rp_pad_cancel":"取消","join_check_try":"按下按键、推动摇杆:按下的部分会亮起。","join_check_redo":"重新设置","join_check_map":"设置按键","rp_pad_reset":"重置","join_open_lan_body":"连不上互联网?如果你和朋友在同一个 Wi-Fi 上,就在那里打开游戏。","join_open_lan":"在此 Wi-Fi 上打开","join_path_lan":"家庭网络","join_path_internet":"互联网","join_seat_taken":"{host} 需要收回手柄,而 PS5 上没有其他空闲手柄,所以你已退出游戏。请 {host} 再次让你加入。","join_refused_key":"此邀请已过期。请向 {host} 要一个新链接。","join_refused_expired":"你在游戏中的位置已失去。请让 {host} 再次放你进去。","join_refused_full":"游戏已满:已经有四名玩家。","join_refused_denied":"{host} 这次没有让你加入。","join_refused_no_answer":"{host} 没有及时响应。请告诉 {host},然后重试。","join_refused_closed":"{host} 目前没有开启一起畅玩。","join_refused_old_helper":"{host} 的 PS5 需要更新助手才能一起畅玩。","join_refused_not_playing":"{host} 现在没在玩。请让 {host} 先开始畅玩。","join_refused_unreachable":"{host} 的电脑无法连接到其 PS5。请稍后再试。","join_refused_slow_down":"错误的代码太多。请等一分钟后再试。","join_refused_address":"此链接的地址不在你的家庭网络内,因此应用不会使用它。请向 {host} 索取包含其电脑 IP 地址的链接。","join_refused_other":"{host} 没有让你加入。","join_ended_kicked":"{host} 已将你移出游戏。","join_ended_closed":"{host} 已关闭一起畅玩。","join_ended_host_stopped":"房主已停止游戏。","join_ended_replaced":"这场游戏在另一个标签页或另一台设备上打开了,所以这里已停止。","join_ended_pad_lost":"PS5 丢失了你的手柄,所以你已退出游戏。请让 {host} 再次放你进去。","join_ended_gave_up":"与 {host} 的连接未能及时恢复。","join_net_lost":"与 {host} 的连接已断开。请检查你的互联网连接,然后重新请求。","join_ended_lost":"无法连接到 {host}。请检查你们是否在同一网络。","join_ended_left":"你已离开游戏。","join_net_mismatch":"此链接与主机不匹配;请向对方要一个新链接。","join_net_no_direct":"无法从此网络直接连接(双方的路由器都很严格)。请改用 Wi-Fi 而不是移动数据,或请主机打开 UPnP。","join_net_no_room":"此邀请已失效。请向 {host} 要一个新链接。","join_net_full":"{host} 的游戏现在没有位置再加一位朋友。请稍后再试。","join_net_no_hub":"无法连接 PS5Upload 邀请服务。请检查网络连接后重试。","join_net_offer":"{host} 的电脑无法连接到此浏览器。请换一个浏览器试试。","join_net_no_webrtc":"此浏览器无法建立直接连接。请使用较新版本的 Chrome、Safari 或 Firefox。","join_cancel":"取消","join_host_fallback":"你的好友","join_connecting":"正在连接 {host}…","join_waiting":"正在等待 {host} 让你加入","join_waiting_body":"{host} 会在屏幕上看到你的名字并点按“允许”。","join_retry":"重试","join_again":"再次请求加入","join_playing_at":"正在 {host} 那里玩","join_you_are":"你是玩家 {n}","join_seat_stream":"你正在以 {host} 的 PS5 用户身份游玩,无需选择用户。","join_plays_as":"你正在以 {profile} 的身份游玩,无需选择。","join_seat_tv_asks":"{host} 为你选择了个人资料,但无法使用。电视会询问你是谁。","join_picking":"按 PS 键,然后在电视上选择“快速游戏”","join_hide_controls":"隐藏","join_sound":"点按开启声音","rp_unmute":"开启声音","rp_mute":"静音","join_no_sound":"此浏览器无法播放声音","join_exit_fullscreen":"退出全屏","pad_fill":"全屏","join_leave":"离开","join_show_controls":"显示控制按钮","join_hold_hint":"长按画面以显示按钮","pad_watch_no_hevc":"此设备无法播放这个串流的画面:电脑以 HEVC 串流,而此设备只能播放 H.264。","pad_watch_decode":"无法在这里播放画面。","join_pad_ready":"你的手柄已就绪","join_check_unknown_short":"不在我们的列表中:按键可能错位。","join_full_to_play":"点按全屏,即可用屏幕手柄游玩。","join_pad_none":"连接手柄(USB 或 Bluetooth),然后按任意键。","join_pad_keys":"也可以用键盘:WASD 移动,方向键为十字键,Enter ✕,Backspace ○,Q □,E △,Tab Options。","join_tv_back_hint":"按遥控器上的返回键显示按钮。","join_block_note":"{host} 已为好友关闭 PS 和 Create 键。","join_guide_title":"电视上还差一步","join_guide_body":"在手柄上按一次 PS 键。电视会询问“谁在使用这个手柄?”。选择“快速游戏”或你自己的用户。主机玩家无需任何操作。","join_guide_menus":"在 PS5 主屏幕上只有房主能操作菜单;你的手柄在游戏里使用。","join_guide_ok":"知道了","join_host_away":"房主已停止游戏 — 正在等待对方重新开始({time})","join_reconnecting":"正在重新连接…","join_reconnecting_left":"你的位置会保留 {time}。","pad_turn":"请横放手机","join_game_label":"{host} 的游戏","join_title":"加入好友的游戏","join_title_body":"在 {host} 的 PS5 上作为玩家 2、3 或 4 游玩。","join_name_label":"你的名字","join_name_hint":"你请求加入时,好友会看到这个名字。","join_button":"加入"},"zh-TW":{"usb_skipped_not_payload":"{name}:不是 .elf 或 .bin 檔案","usb_skipped_unknown":"{id}:已不在 Payload 清單中","browser_unsupported":"這需要桌面應用程式,無法在瀏覽器中使用。","video_recovered_notice":"上次 Play 在開始顯示畫面時當掉,因此畫面現在不使用顯示卡解碼(可在 設定 › 視窗 › 圖形 › 硬體視訊解碼 中變更)。","video_recovered_title":"畫面現改由軟體解碼","open_in_title":"在 PS5Upload 應用程式中開啟?","open_in_body":"這台裝置有 PS5Upload 應用程式?可以在應用程式中開啟,或繼續使用瀏覽器。","open_in_app":"在應用程式中開啟","open_in_browser":"繼續使用瀏覽器","open_in_remember":"在此裝置上記住我的選擇","open_in_opening":"正在開啟 PS5Upload 應用程式…","open_in_not_opened":"沒有反應?這台裝置可能沒有安裝應用程式。","open_in_again":"重試","pad_8bitdo_no_xinput":"這款 8BitDo 沒有 X-input 模式。如果有按鍵不對,請檢查控制器。","pad_8bitdo_how_switch":"把背面的開關撥到 X,然後按 Start","pad_8bitdo_how_startx":"先關機,然後按住 Start + X 開機","pad_8bitdo_how_receiver":"使用它的 2.4G 接收器或 USB 線","pad_8bitdo_how_manual":"方法請見其說明書","pad_8bitdo_xinput":"為獲得最佳效果,請將 8BitDo 切換到 X-input 模式:{how}。","rp_touch_left_stick":"左類比搖桿","rp_touch_right_stick":"右類比搖桿","rp_touch_touchpad":"觸控板","rp_menu":"選單","rp_pad_step_lx":"將左類比搖桿推向右","rp_pad_step_ly":"將左類比搖桿推向下","rp_pad_step_rx":"將右類比搖桿推向右","rp_pad_step_ry":"將右類比搖桿推向下","join_check_bottom":"按下方的功能鍵 (✕)","join_check_right":"按右側的功能鍵 (○)","join_check_left":"按左側的功能鍵 (□)","join_check_top":"按上方的功能鍵 (△)","rp_pad_press":"按下 {name}","join_check_saved":"已在此裝置上為這個控制器儲存。可在下方試用。","join_check_title":"檢查你的控制器","join_done":"完成","rp_pads_none":"尚未偵測到控制器。請連接一個控制器並按下任一按鈕。","rp_pad_mapped":"使用你的按鍵對應","join_check_unknown":"這個控制器不在我們的清單中,按鍵可能會錯位。設定只需幾秒鐘。","rp_pad_standard":"已辨識","rp_pad_progress":"{n}/{total}","rp_pad_skip":"略過","rp_pad_back":"返回","rp_pad_cancel":"取消","join_check_try":"按下按鍵、推動搖桿:按下的部分會亮起。","join_check_redo":"重新設定","join_check_map":"設定按鍵","rp_pad_reset":"重設","join_open_lan_body":"連不上網際網路?如果你和朋友在同一個 Wi-Fi 上,就在那裡開啟遊戲。","join_open_lan":"在此 Wi-Fi 上開啟","join_path_lan":"家用網路","join_path_internet":"網際網路","join_seat_taken":"{host} 需要收回控制器,而 PS5 上沒有其他空閒的控制器,所以你已離開遊戲。請 {host} 再次讓你加入。","join_refused_key":"此邀請已過期。請向 {host} 要一個新連結。","join_refused_expired":"你在遊戲中的位置已失去。請讓 {host} 再次放你進去。","join_refused_full":"遊戲已滿:已經有四名玩家。","join_refused_denied":"{host} 這次沒有讓你加入。","join_refused_no_answer":"{host} 沒有及時回應。請告訴 {host},然後再試一次。","join_refused_closed":"{host} 目前沒有開啟一起暢玩。","join_refused_old_helper":"{host} 的 PS5 需要更新助手才能一起暢玩。","join_refused_not_playing":"{host} 現在沒在玩。請讓 {host} 先開始暢玩。","join_refused_unreachable":"{host} 的電腦無法連線到其 PS5。請稍後再試。","join_refused_slow_down":"錯誤的代碼太多。請等一分鐘後再試。","join_refused_address":"此連結的位址不在你的家用網路內,因此應用程式不會使用它。請向 {host} 索取包含其電腦 IP 位址的連結。","join_refused_other":"{host} 沒有讓你加入。","join_ended_kicked":"{host} 已將你移出遊戲。","join_ended_closed":"{host} 已關閉一起暢玩。","join_ended_host_stopped":"房主已停止遊戲。","join_ended_replaced":"這場遊戲在另一個分頁或另一台裝置上開啟了,所以這裡已停止。","join_ended_pad_lost":"PS5 遺失了你的控制器,所以你已退出遊戲。請讓 {host} 再次放你進去。","join_ended_gave_up":"與 {host} 的連線未能及時恢復。","join_net_lost":"與 {host} 的連線已中斷。請檢查你的網際網路連線,然後重新要求。","join_ended_lost":"無法連線到 {host}。請確認你們是否在同一個網路。","join_ended_left":"你已離開遊戲。","join_net_mismatch":"這個連結與主機不符;請向對方要一個新連結。","join_net_no_direct":"無法從這個網路直接連線(雙方的路由器都很嚴格)。請改用 Wi-Fi 而非行動數據,或請主機開啟 UPnP。","join_net_no_room":"這個邀請已失效。請向 {host} 要一個新連結。","join_net_full":"{host} 的遊戲目前沒有位置再加一位朋友。請稍後再試。","join_net_no_hub":"無法連線到 PS5Upload 邀請服務。請檢查網路連線後再試一次。","join_net_offer":"{host} 的電腦無法連線到這個瀏覽器。請換個瀏覽器試試。","join_net_no_webrtc":"這個瀏覽器無法建立直接連線。請使用較新版本的 Chrome、Safari 或 Firefox。","join_cancel":"取消","join_host_fallback":"你的好友","join_connecting":"正在連線到 {host}…","join_waiting":"正在等待 {host} 讓你加入","join_waiting_body":"{host} 會在螢幕上看到你的名字並點選「允許」。","join_retry":"重試","join_again":"再次要求加入","join_playing_at":"正在 {host} 那裡玩","join_you_are":"你是玩家 {n}","join_seat_stream":"你正在以 {host} 的 PS5 使用者身分遊玩,不需要選擇使用者。","join_plays_as":"你正以 {profile} 的身分遊玩,無需選擇。","join_seat_tv_asks":"{host} 為你選了一個個人檔案,但無法使用。電視會詢問你是誰。","join_picking":"按下 PS,然後在電視上選擇「快速遊玩」","join_hide_controls":"隱藏","join_sound":"點一下開啟聲音","rp_unmute":"開啟聲音","rp_mute":"靜音","join_no_sound":"此瀏覽器無法播放聲音","join_exit_fullscreen":"離開全螢幕","pad_fill":"全螢幕","join_leave":"離開","join_show_controls":"顯示控制項","join_hold_hint":"長按畫面以顯示按鈕","pad_watch_no_hevc":"此裝置無法播放這個串流的畫面:電腦以 HEVC 串流,而此裝置只能播放 H.264。","pad_watch_decode":"無法在這裡播放畫面。","join_pad_ready":"你的控制器已就緒","join_check_unknown_short":"不在我們的清單中:按鍵可能錯位。","join_full_to_play":"點一下全螢幕,即可用螢幕上的控制器遊玩。","join_pad_none":"連接控制器(USB 或 Bluetooth),然後按任意按鈕。","join_pad_keys":"也可以用鍵盤:WASD 移動,方向鍵為十字鍵,Enter ✕,Backspace ○,Q □,E △,Tab Options。","join_tv_back_hint":"按遙控器上的返回鍵以顯示按鈕。","join_block_note":"{host} 已為好友關閉 PS 和 Create 按鈕。","join_guide_title":"電視上還差一步","join_guide_body":"在控制器上按一次 PS 按鈕。電視會詢問「誰在使用這支控制器?」。選擇「快速遊玩」或你自己的使用者。主持人不需要任何操作。","join_guide_menus":"在 PS5 主畫面上只有房主能操作選單;你的控制器在遊戲裡使用。","join_guide_ok":"知道了","join_host_away":"房主已停止遊戲 — 正在等待對方重新開始({time})","join_reconnecting":"正在重新連線…","join_reconnecting_left":"你的位置會保留 {time}。","pad_turn":"請橫放手機","join_game_label":"{host} 的遊戲","join_title":"加入好友的遊戲","join_title_body":"在 {host} 的 PS5 上以玩家 2、3 或 4 的身分遊玩。","join_name_label":"你的名字","join_name_hint":"你要求加入時,好友會看到這個名字。","join_button":"加入"}}),ke=new Set([`ar`,`fa`]);function Ae(){let e=Object.keys(Oe);try{let t=localStorage.getItem(`ps5upload.lang`);if(t&&e.includes(t))return t}catch{}let t=typeof navigator>`u`?[]:[...navigator.languages??[],navigator.language];for(let n of t){if(!n)continue;if(e.includes(n))return n;let t=n.split(`-`)[0],r=e.find(e=>e===t);if(r)return r;if(t===`zh`)return/TW|HK|MO|Hant/i.test(n)?`zh-TW`:`zh-CN`;let i=e.find(e=>e.split(`-`)[0]===t);if(i)return i}return`en`}var je=Ae();typeof document<`u`&&(document.documentElement.lang=je,document.documentElement.dir=ke.has(je)?`rtl`:`ltr`);var Me=Oe[je]??{},Ne=Oe.en??{},Pe=(e,t)=>t?e.replace(/\{(\w+)\}/g,(e,n)=>n in t?String(t[n]):e):e,Fe=((e,t,n)=>{let r=typeof t==`string`?void 0:t,i=typeof t==`string`?t:n;return Pe(Me[e]??Ne[e]??i??e,r)});function Ie(){return Fe}var Le=4e3;function Re(e,t,n=`lan`){let r=new URLSearchParams(e.replace(/^#/,``)).get(n);if(!r)return null;try{let e=new URL(r),n=e.origin+e.pathname;return/^https?:$/.test(e.protocol)&&r===n&&RegExp(`/${t}/?$`).test(e.pathname)?n:null}catch{return null}}function ze(e,t){return t.key?`${e}#i=${encodeURIComponent(t.key)}`:t.watch?`${e}#w=1`:e}function Be(e,t=Le,n=typeof WebSocket>`u`?void 0:WebSocket){return new Promise(r=>{try{let i=new n(e),a=e=>{clearTimeout(o),i.onopen=i.onclose=i.onerror=null,i.close(),r(e)},o=setTimeout(()=>a(!1),t);i.onopen=()=>a(!0),i.onclose=i.onerror=()=>a(!1)}catch{r(!1)}})}var Ve=[`mismatch`,`no_direct`,`no_room`,`net_full`,`no_hub`,`offer`,`no_webrtc`],He=4100;function Ue(e){if(!e||e.code!==4100||typeof e.reason!=`string`||!e.reason.startsWith(`net:`))return null;let t=e.reason.slice(4);return Ve.includes(t)?t:null}var We=new Set([`key`,`expired`,`full`,`denied`,`no_answer`,`closed`,`old_helper`,`not_playing`,`unreachable`,`slow_down`,`address`,`seat_taken`]),Ge={kicked:`kicked`,host_stopped:`host_stopped`,replaced:`replaced`,lost:`pad_lost`,seat_taken:`seat_taken`},Ke=new Set([`asking`,`picking_user`,`playing`,`reconnecting`,`left`]),qe=e=>Math.max(0,Math.min(255,Math.round(Number(e)||0)));function Je(e){let t;try{let n=JSON.parse(e);if(!n||typeof n!=`object`)return null;t=n}catch{return null}if(typeof t.pong==`number`)return{kind:`pong`,t:t.pong};if(t.stage===`asking`)return{kind:`asking`};if(t.stage===`waiting`)return{kind:`waiting`};if(t.stage===`joined`&&typeof t.player==`number`&&typeof t.token==`string`)return{kind:`joined`,player:t.player,token:t.token,hevc:t.hevc===!0,track:t.track===!0,audio:t.audio===!0};if(t.stage===`refused`){let e=String(t.why??``);return{kind:`refused`,why:We.has(e)?e:`refused`}}if(typeof t.bye==`string`)return{kind:`bye`,why:Object.prototype.hasOwnProperty.call(Ge,t.bye)?Ge[t.bye]:`closed`};if(t.status&&typeof t.status==`object`){let e=t.status,n=typeof e.state==`string`&&Ke.has(e.state)?e.state:null;return{kind:`status`,status:{player:typeof e.player==`number`?e.player:0,state:n,rttMs:typeof e.rtt_ms==`number`?e.rtt_ms:null,host:typeof e.host==`string`&&e.host?e.host:null,blockSystem:e.block_system===!0,streamSeat:e.stream_seat===!0,playsAs:typeof e.plays_as==`string`&&e.plays_as?e.plays_as:null,seatNote:typeof e.seat_note==`string`&&e.seat_note?e.seat_note:null}}}let n=Array.isArray(t.rumble)?[qe(t.rumble[0]),qe(t.rumble[1])]:null,r=Array.isArray(t.light)?[qe(t.light[0]),qe(t.light[1]),qe(t.light[2])]:null;return n||r?{kind:`feedback`,rumble:n,light:r}:null}function Ye(e){return Math.max(-32768,Math.min(32767,Math.round(e)))+32768>>8}function Xe([e,t]){return[Math.max(0,Math.min(1919,Math.round(e))),Math.max(0,Math.min(1079,Math.round(t*1079/941)))]}function Ze(e,t){let n=t.touch?[[0,...Xe(t.touch)]]:[],r=t.motion??null,i=16+n.length*5+(r?25:0),a=new ArrayBuffer(i),o=new DataView(a),s=0;o.setUint8(s++,1),o.setUint32(s,e>>>0,!0),s+=4,o.setUint32(s,t.buttons>>>0,!0),s+=4;for(let e of[t.lx,t.ly,t.rx,t.ry])o.setUint8(s++,Ye(e));o.setUint8(s++,qe(t.l2)),o.setUint8(s++,qe(t.r2)),o.setUint8(s++,n.length);for(let[e,t,r]of n)o.setUint8(s++,e),o.setUint16(s,t,!0),s+=2,o.setUint16(s,r,!0),s+=2;if(r){o.setUint8(s++,2);for(let e of[...r.gyro,...r.accel])o.setFloat32(s,e/1e3,!0),s+=4}return new Uint8Array(a)}function Qe(e){return Math.min(4e3,250*2**Math.max(0,Math.min(e,10)))}var $e=6e4,et=6e4;function tt(e){return e&&/^[0-9A-Fa-f]{2}(:[0-9A-Fa-f]{2}){31}$/.test(e)?e.toUpperCase():null}function nt(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=t.get(`room`)??``,r=t.get(`k`)??``,i=t.get(`fp`)??``,a=t.get(`hub`)??``;return!/^[A-Za-z0-9_-]{22}$/.test(n)||!/^[A-Za-z0-9_-]{8,128}$/.test(r)||!tt(i)||!/^([A-Za-z0-9.-]{1,253}|\[[0-9A-Fa-f:.]{2,45}\])(:\d{1,5})?$/.test(a)?null:{room:n,key:r,fp:i.toUpperCase(),hub:a}}function rt(e){return`ps5upload://join?link=${encodeURIComponent(e)}`}function it(e){return e==null||!Number.isFinite(e)?`none`:e<60?`good`:e<120?`fair`:`slow`}function at(e){switch(e){case 1:return[0,0,255];case 2:return[255,0,0];case 3:return[0,255,0];default:return[255,0,255]}}var ot=(e,t)=>`#version 300 es +`+e.stack}}var Ve=Object.prototype.hasOwnProperty,He=t.unstable_scheduleCallback,Ue=t.unstable_cancelCallback,We=t.unstable_shouldYield,Ge=t.unstable_requestPaint,Ke=t.unstable_now,qe=t.unstable_getCurrentPriorityLevel,Je=t.unstable_ImmediatePriority,Ye=t.unstable_UserBlockingPriority,Xe=t.unstable_NormalPriority,Ze=t.unstable_LowPriority,Qe=t.unstable_IdlePriority,$e=t.log,et=t.unstable_setDisableYieldValue,tt=null,nt=null;function rt(e){if(typeof $e==`function`&&et(e),nt&&typeof nt.setStrictMode==`function`)try{nt.setStrictMode(tt,e)}catch{}}var it=Math.clz32?Math.clz32:st,at=Math.log,ot=Math.LN2;function st(e){return e>>>=0,e===0?32:31-(at(e)/ot|0)|0}var ct=256,lt=262144,ut=4194304;function dt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ft(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=dt(n))):i=dt(o):i=dt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=dt(n))):i=dt(o)):i=dt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function pt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function mt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0n;n++)t.push(e);return t}function vt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function yt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0=vr),xr=` `,Sr=!1;function Cr(e,t){switch(e){case`keyup`:return gr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function wr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Tr=!1;function Er(e,t){switch(e){case`compositionend`:return wr(t);case`keypress`:return t.which===32?(Sr=!0,xr):null;case`textInput`:return e=t.data,e===xr&&Sr?null:e;default:return null}}function Dr(e,t){if(Tr)return e===`compositionend`||!_r&&Cr(e,t)?(e=zn(),Rn=Ln=In=null,Tr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Xr(n)}}function Qr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $r(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Yr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yr(e.document)}return t}function ei(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var ti=Nn&&`documentMode`in document&&11>=document.documentMode,ni=null,ri=null,ii=null,ai=!1;function oi(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ai||ni==null||ni!==Yr(r)||(r=ni,`selectionStart`in r&&ei(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ii&&Jr(ii,r)||(ii=r,r=Jf(ri,`onSelect`),0>=o,i-=o,ea=1<<32-it(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),L&&na(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),L&&na(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return L&&na(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),L&&na(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===ie&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case ne:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===ie){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),uo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&ro(l)===r.type){n(e,r.sibling),c=a(r,o.props),uo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===ie?(c=F(o.props.children,e.mode,c,o.key),uo(c,o),c.return=e,e=c):(c=Vi(o.type,o.key,o.props,null,e.mode,c),uo(c,o),c.return=e,e=c)}return s(e);case re:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Wi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=ro(o),_(e,r,o,c)}if(be(o))return h(e,r,o,c);if(_e(o)){if(l=_e(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,lo(o),c);if(o.$$typeof===se)return _(e,r,ka(e,o),c);fo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Hi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{co=0;var i=_(e,t,n,r);return so=null,i}catch(t){if(t===Za||t===$a)throw t;var a=Li(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var mo=po(!0),ho=po(!1),go=!1;function _o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function yo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function bo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Pi(e),Ni(e,null,n),t}return Ai(e,r,t,n),Pi(e)}function xo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xt(e,n)}}function So(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Co=!1;function wo(){if(Co){var e=Ha;if(e!==null)throw e}}function To(e,t,n,r){Co=!1;var i=e.updateQueue;go=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===Va&&(Co=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=E({},d,f);break a;case 2:go=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),od|=o,e.lanes=o,e.memoizedState=d}}function Eo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Do(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=A.T,s={};s.types=o===null?null:o.types,A.T=s,fc(e,!1,t,n);try{var c=i(),l=A.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?dc(e,t,Ga(c,r),jd(e)):dc(e,t,r,jd(e))}catch(n){dc(e,t,{then:function(){},status:`rejected`,reason:n},jd())}finally{j.p=a,o!==null&&s.types!==null&&(o.types=s.types),A.T=o}}function tc(){}function nc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=rc(e).queue;ec(e,a,t,xe,n===null?tc:function(){return ic(e),n(r)})}function rc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:xe,baseState:xe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:xe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ic(e){var t=rc(e);t.next===null&&(t=e.alternate.memoizedState),dc(e,t.next.queue,{},jd())}function ac(){return Oa(sh)}function oc(){return cs().memoizedState}function sc(){return cs().memoizedState}function cc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=jd();e=yo(n);var r=bo(t,e,n);r!==null&&(Pd(r,t,n),xo(r,t,n)),t={cache:Pa()},e.payload=t;return}t=t.return}}function lc(e,t,n){var r=jd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},pc(e)?mc(t,n):(n=ji(e,t,n,r),n!==null&&(Pd(n,e,r),hc(n,t,r)))}function uc(e,t,n){dc(e,t,n,jd())}function dc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(pc(e))mc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,qr(s,o))return Ai(e,t,i,0),q===null&&ki(),!1}catch{}if(n=ji(e,t,i,r),n!==null)return Pd(n,e,r),hc(n,t,r),!0}return!1}function fc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},pc(e)){if(t)throw Error(i(479))}else t=ji(e,n,r,2),t!==null&&Pd(t,e,2)}function pc(e){var t=e.alternate;return e===B||t!==null&&t===B}function mc(e,t){Ko=Go=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xt(e,n)}}var gc={readContext:Oa,use:ds,useCallback:Qo,useContext:Qo,useEffect:Qo,useImperativeHandle:Qo,useLayoutEffect:Qo,useInsertionEffect:Qo,useMemo:Qo,useReducer:Qo,useRef:Qo,useState:Qo,useDebugValue:Qo,useDeferredValue:Qo,useTransition:Qo,useSyncExternalStore:Qo,useId:Qo,useHostTransitionStatus:Qo,useFormState:Qo,useActionState:Qo,useOptimistic:Qo,useMemoCache:Qo,useCacheRefresh:Qo,useEffectEvent:Qo},_c={readContext:Oa,use:ds,useCallback:function(e,t){return ss().memoizedState=[e,t===void 0?null:t],e},useContext:Oa,useEffect:Vs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),zs(4194308,4,qs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zs(4194308,4,e,t)},useInsertionEffect:function(e,t){zs(4,2,e,t)},useMemo:function(e,t){var n=ss();t=t===void 0?null:t;var r=e();if(qo){rt(!0);try{e()}finally{rt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ss();if(n!==void 0){var i=n(t);if(qo){rt(!0);try{n(t)}finally{rt(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=lc.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=ss();return e={current:e},t.memoizedState=e},useState:function(e){e=Cs(e);var t=e.queue,n=uc.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ys,useDeferredValue:function(e,t){return Qs(ss(),e,t)},useTransition:function(){var e=Cs(!1);return e=ec.bind(null,B,e.queue,!0,!1),ss().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,a=ss();if(L){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),q===null)throw Error(i(349));Y&127||vs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Vs(bs.bind(null,r,o,e),[e]),r.flags|=2048,Ls(9,{destroy:void 0},ys.bind(null,r,o,n,t),null),n},useId:function(){var e=ss(),t=q.identifierPrefix;if(L){var n=ta,r=ea;n=(r&~(1<<32-it(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Jo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Ot]=t,o[kt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(np(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&hl(t)}}return H(t),t.subtreeFlags&=-33554433,gl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&hl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Oe.current,ma(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=sa,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ot]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ep(e.nodeValue,n)),e||da(t,!0)}else e=lp(e).createTextNode(r),e[Ot]=t,t.stateNode=e}return H(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ma(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Ot]=t}else ha(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),e=!1}else n=ga(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(zo(t),t):(zo(t),null);if(t.flags&128)throw Error(i(558))}return H(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ma(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Ot]=t}else ha(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),a=!1}else a=ga(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(zo(t),t):(zo(t),null)}return zo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),vl(t,t.updateQueue),H(t),null);case 4:return je(),e===null&&Wf(t.stateNode.containerInfo),t.flags|=67108864,H(t),null;case 10:return Sa(t.type),H(t),null;case 19:if(Vo(t),r=t.memoizedState,r===null)return H(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)yl(r,!1);else{if(ad!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ho(e),o!==null){for(t.flags|=128,yl(r,!1),e=o.updateQueue,t.updateQueue=e,vl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Bi(n,e),n=n.sibling;return z(t,Bo.current&1|2),L&&na(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ke()>gd&&(t.flags|=128,a=!0,yl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Ho(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,vl(t,e),yl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!L)return H(t),null}else 2*Ke()-r.renderingStartTime>gd&&n!==536870912&&(t.flags|=128,a=!0,yl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ke(),e.sibling=null,o=Bo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||L?z(t,o):(n=o,M(No,t),M(Bo,n),Po===null&&(Po=t)),L&&na(t,r.treeForkCount),e}return H(t),null;case 22:case 23:return zo(t),Mo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(H(t),t.subtreeFlags&6&&(t.flags|=8192)):H(t),n=t.updateQueue,n!==null&&vl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Te(qa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Sa(Na),H(t),null;case 25:return null;case 30:return t.flags|=33554432,H(t),null}throw Error(i(156,t.tag))}function xl(e,t){switch(aa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sa(Na),je(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ne(t),null;case 31:if(t.memoizedState!==null){if(zo(t),t.alternate===null)throw Error(i(340));ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(zo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Vo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return je(),null;case 10:return Sa(t.type),null;case 22:case 23:return zo(t),Mo(),e!==null&&Te(qa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Sa(Na),null;case 25:return null;default:return null}}function Sl(e,t){switch(aa(t),t.tag){case 3:Sa(Na),je();break;case 26:case 27:case 5:Ne(t);break;case 4:je();break;case 31:t.memoizedState!==null&&zo(t);break;case 13:zo(t);break;case 19:Vo(t);break;case 10:Sa(t.type);break;case 22:case 23:zo(t),Mo(),e!==null&&Te(qa);break;case 24:Sa(Na)}}function Cl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function wl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Tl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Do(t,n)}catch(t){Z(e,e.return,t)}}}function El(e,t,n){n.props=wc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Dl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=Si(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);f(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function U(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}}function Ol(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n title`))),np(r,t,n),r[Ot]=e,Ht(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;sg&&(o=g,g=h,h=o);var _=Zr(s,h),v=Zr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,A.T=null,n=wd,wd=null;var o=bd,s=Sd;if(yd=0,xd=bd=null,Sd=0,K&6)throw Error(i(331));var c=K;if(K|=4,Yu(o.current),Vu(o,o.current,s,n),K=c,Df(0,!1),nt&&typeof nt.onPostCommitFiberRoot==`function`)try{nt.onPostCommitFiberRoot(tt,o)}catch{}return!0}finally{j.p=a,A.T=r,uf(e,t)}}function pf(e,t,n){t=Ki(n,t),t=Ac(e.stateNode,t,2),e=bo(e,t,2),e!==null&&(vt(e,2),Ef(e))}function Z(e,t,n){if(e.tag===3)pf(e,e,n);else for(;t!==null;){if(t.tag===3){pf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(vd===null||!vd.has(r))){e=Ki(n,e),n=jc(2),r=bo(t,n,2),r!==null&&(Mc(n,r,t,e),vt(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $u;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(rd=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(ad===4||ad===3&&(Y&62914560)===Y&&300>Ke()-md?K&2?cd|=n:Vd(e,0):cd|=n,ud===Y&&(ud=0)),Ef(e)}function gf(e,t){t===0&&(t=gt()),e=Mi(e,t),e!==null&&(vt(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),gf(e,n)}function yf(e,t){return He(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-it(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=Y,a=ft(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||pt(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&hp()&&(e=Tf);for(var t=Ke(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}yd!==0&&yd!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=ln(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),Ht(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+ln(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+ln(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+ln(n.imageSizes)+`"]`)):i+=`[href="`+ln(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=E({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[It]=!0,o.onload=o.onerror=function(){Ut(o)}),Ht(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+ln(r)+`"][href="`+ln(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=E({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),Ht(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=Vt(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=E({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Ht(c),np(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=Vt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=E({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Ht(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=Vt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=E({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Ht(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var a=(a=Oe.current)?bm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Vt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=Vt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Vt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+ln(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[It]){r.loading=1;return}}else t=e.createElement(`link`),t[It]=!0,t.onload=t.onerror=Ut.bind(null,t),np(t,`link`,n),Ht(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+ln(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+ln(n.href)+`"]`);if(r)return t.instance=r,Ht(r),r;var a=E({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ht(r),np(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,Ht(o),o;r=Im(n),(a=vm.get(a))&&Hm(r,a),o=(e.ownerDocument||e).createElement(`link`),Ht(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,Ht(a),a):(r=n,(a=vm.get(o))&&(r=E({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ht(a),np(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ht(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),Ht(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=b()}))(),S=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function ee(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:S(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var C=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},w=e=>{let t=C(e);return t.charAt(0).toUpperCase()+t.slice(1)},T=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),E={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function te(e){return e!=null}function ne(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??E.width,a=e.size??e.height??E.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?T(...c):T(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??E[`stroke-width`])*Number(e.size??e.width??E.width)/Number(t.size??t.width??E.width):t.strokeWidth??E[`stroke-width`];return[`svg`,{...Object.entries(E).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&te(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&te(t.width)&&{[r(`width`)]:t.width},...`height`in t&&te(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function re(e,t={}){return ne(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var ie=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},D=u(_(),1),ae=(0,D.createContext)({}),oe=()=>(0,D.useContext)(ae),se=(0,D.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=oe()??{},y=!!c||ie(d),[b,x,S=[]]=re(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:T(v,s),hasA11yProp:y,attributes:d});return(0,D.createElement)(b,{ref:f,...x},[...S.map(([e,t])=>(0,D.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function ce(e,t=[],n=[]){let r=typeof e==`string`?ee(e,t,n):e,i=(0,D.forwardRef)(({className:e,...t},n)=>(0,D.createElement)(se,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=w(r.name)),i}var le={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};le.node;var ue=ce(le),de={name:`expand`,size:24,node:[[`path`,{d:`m15 15 6 6`,key:`1s409w`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}],[`path`,{d:`M21 16v5h-5`,key:`1ck2sf`}],[`path`,{d:`M21 8V3h-5`,key:`1qoq8a`}],[`path`,{d:`M3 16v5h5`,key:`1t08am`}],[`path`,{d:`m3 21 6-6`,key:`wwnumi`}],[`path`,{d:`M3 8V3h5`,key:`1ln10m`}],[`path`,{d:`M9 9 3 3`,key:`v551iv`}]]};de.node;var O=ce(de),fe={name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};fe.node;var pe=ce(fe),k={name:`gamepad-2`,size:24,node:[[`line`,{x1:`6`,x2:`10`,y1:`11`,y2:`11`,key:`1gktln`}],[`line`,{x1:`8`,x2:`8`,y1:`9`,y2:`13`,key:`qnk9ow`}],[`line`,{x1:`15`,x2:`15.01`,y1:`12`,y2:`12`,key:`krot7o`}],[`line`,{x1:`18`,x2:`18.01`,y1:`10`,y2:`10`,key:`1lcuu1`}],[`path`,{d:`M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z`,key:`mfqc10`}]]};k.node;var me=ce(k),he={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};he.node;var ge=ce(he),_e={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};_e.node;var ve=ce(_e),ye={name:`minimize`,size:24,node:[[`path`,{d:`M8 3v3a2 2 0 0 1-2 2H3`,key:`hohbtr`}],[`path`,{d:`M21 8h-3a2 2 0 0 1-2-2V3`,key:`5jw1f3`}],[`path`,{d:`M3 16h3a2 2 0 0 1 2 2v3`,key:`198tvr`}],[`path`,{d:`M16 21v-3a2 2 0 0 1 2-2h3`,key:`ph8mxp`}]]};ye.node;var be=ce(ye),A={name:`rotate-cw`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]};A.node;var j=ce(A),xe={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};xe.node;var Se=ce(xe),Ce={name:`volume-2`,size:24,node:[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]};Ce.node;var we=ce(Ce),Te={name:`volume-x`,size:24,node:[[`path`,{d:`M11 4.702a.7.7 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.7.7 0 0 0 11 19.298z`,key:`1p7khw`}],[`path`,{d:`m16.5 14.5 5-5`,key:`cul3yw`}],[`path`,{d:`m16.5 9.5 5 5`,key:`1akey5`}]]};Te.node;var M=ce(Te),Ee={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Ee.node;var De=ce(Ee),Oe=({"ar":{"usb_skipped_not_payload":"{name}: ليس ملف .elf أو .bin","usb_skipped_unknown":"{id}: لم يعد في قائمة الحمولات","browser_unsupported":"يتطلب هذا تطبيق سطح المكتب. لا يعمل في المتصفح.","video_recovered_notice":"تعطّل «العب» في المرة السابقة أثناء بدء الصورة، لذا يُفك ترميز الصورة الآن بدون بطاقة الرسومات (للتغيير: الإعدادات › النافذة › الرسومات › فك ترميز الفيديو بالعتاد).","video_recovered_title":"يُفك ترميز الصورة الآن برمجيًا","open_in_title":"هل تفتحه في تطبيق PS5Upload؟","open_in_body":"هل لديك تطبيق PS5Upload على هذا الجهاز؟ افتح الرابط فيه، أو تابع في المتصفح.","open_in_app":"فتح في التطبيق","open_in_browser":"المتابعة في المتصفح","open_in_remember":"تذكّر اختياري على هذا الجهاز","open_in_opening":"جارٍ فتح تطبيق PS5Upload…","open_in_not_opened":"لم يحدث شيء؟ ربما التطبيق غير مثبّت على هذا الجهاز.","open_in_again":"حاول مجددًا","pad_8bitdo_no_xinput":"لا يحتوي جهاز 8BitDo هذا على وضع X-input. إذا كان أحد الأزرار خاطئًا، فافحص وحدة التحكم.","pad_8bitdo_how_switch":"اضبط المفتاح في الخلف على X ثم اضغط Start","pad_8bitdo_how_startx":"أطفئه، ثم اضغط مطولًا على Start + X لتشغيله","pad_8bitdo_how_receiver":"استخدم جهاز الاستقبال 2.4G أو كابل USB","pad_8bitdo_how_manual":"يشرح دليله الطريقة","pad_8bitdo_xinput":"للحصول على أفضل نتيجة، بدّل وحدة 8BitDo إلى وضع X-input: {how}.","rp_touch_left_stick":"العصا اليسرى","rp_touch_right_stick":"العصا اليمنى","rp_touch_touchpad":"لوحة اللمس","rp_menu":"القائمة","rp_pad_step_lx":"ادفع العصا اليسرى إلى اليمين","rp_pad_step_ly":"ادفع العصا اليسرى إلى الأسفل","rp_pad_step_rx":"ادفع العصا اليمنى إلى اليمين","rp_pad_step_ry":"ادفع العصا اليمنى إلى الأسفل","join_check_bottom":"اضغط زر الوجه السفلي (✕)","join_check_right":"اضغط زر الوجه الأيمن (○)","join_check_left":"اضغط زر الوجه الأيسر (□)","join_check_top":"اضغط زر الوجه العلوي (△)","rp_pad_press":"اضغط {name}","join_check_saved":"تم الحفظ لوحدة التحكم هذه على هذا الجهاز. جرّبها أدناه.","join_check_title":"افحص وحدة التحكم","join_done":"تم","rp_pads_none":"لم تُرصد أي يد تحكم بعد. وصّل واحدة واضغط أي زر فيها.","rp_pad_mapped":"تلعب بتعيين أزرارك","join_check_unknown":"وحدة التحكم هذه ليست في قائمتنا، لذا قد تكون أزرارها مختلطة. يستغرق إعدادها بضع ثوانٍ.","rp_pad_standard":"معروفة","rp_pad_progress":"{n} من {total}","rp_pad_skip":"تخطٍّ","rp_pad_back":"رجوع","rp_pad_cancel":"إلغاء","join_check_try":"اضغط الأزرار وحرّك العصي: ما تضغطه يضيء.","join_check_redo":"إعادة","join_check_map":"إعداد الأزرار","rp_pad_reset":"إعادة ضبط","join_open_lan_body":"لا يمكنك الوصول إلى الإنترنت؟ إذا كنت على شبكة Wi-Fi نفسها مع صديقك، فافتح اللعبة هناك.","join_open_lan":"افتح على شبكة Wi-Fi هذه","join_path_lan":"الشبكة المنزلية","join_path_internet":"الإنترنت","join_seat_taken":"احتاج {host} إلى استعادة يد التحكم ولم تكن هناك يد تحكم أخرى متاحة على PS5، لذا خرجت من اللعبة. اطلب من {host} أن يسمح لك بالدخول مرة أخرى.","join_refused_key":"انتهت صلاحية هذه الدعوة. اطلب من {host} رابطًا جديدًا.","join_refused_expired":"فقدت مكانك في اللعبة. اطلب من {host} إدخالك مجددًا.","join_refused_full":"اللعبة ممتلئة: يوجد أربعة لاعبين بالفعل.","join_refused_denied":"لم يسمح لك {host} بالدخول هذه المرة.","join_refused_no_answer":"لم يُجب {host} في الوقت المناسب. أخبر {host} ثم حاول مرة أخرى.","join_refused_closed":"{host} لا يستضيف العب معًا الآن.","join_refused_old_helper":"يحتاج PS5 الخاص بـ {host} إلى مساعد محدّث لميزة العب معًا.","join_refused_not_playing":"{host} لا يلعب الآن. اطلب من {host} أن يبدأ اللعب أولًا.","join_refused_unreachable":"لم يتمكن حاسوب {host} من الوصول إلى جهاز PS5. حاول مرة أخرى بعد قليل.","join_refused_slow_down":"رموز خاطئة كثيرة جدًا. انتظر دقيقة ثم حاول مرة أخرى.","join_refused_address":"عنوان هذا الرابط خارج شبكتك المنزلية، لذا لن يستخدمه التطبيق. اطلب من {host} رابطًا يحمل عنوان IP لجهازه.","join_refused_other":"لم يسمح لك {host} بالدخول.","join_ended_kicked":"أخرجك {host} من اللعبة.","join_ended_closed":"أغلق {host} العب معًا.","join_ended_host_stopped":"توقف المضيف عن اللعب.","join_ended_replaced":"فُتحت هذه اللعبة في علامة تبويب أخرى أو على جهاز آخر، لذا توقفت هنا.","join_ended_pad_lost":"فقد PS5 يد التحكم الخاصة بك، لذا خرجت من اللعبة. اطلب من {host} إدخالك مجددًا.","join_ended_gave_up":"لم يعد الاتصال بـ {host} في الوقت المناسب.","join_net_lost":"انقطع الاتصال بـ{host}. تحقق من اتصالك بالإنترنت ثم اطلب مرة أخرى.","join_ended_lost":"تعذّر الوصول إلى {host}. تأكد أنكما على الشبكة نفسها.","join_ended_left":"غادرت اللعبة.","join_net_mismatch":"هذا الرابط لا يطابق المضيف؛ اطلب منه رابطًا جديدًا.","join_net_no_direct":"لا يمكن إنشاء اتصال مباشر من هذه الشبكة (الموجّهان لدى الطرفين صارمان). جرّب Wi-Fi بدلًا من بيانات الجوال، أو اطلب من المضيف تشغيل UPnP.","join_net_no_room":"هذه الدعوة لم تعد مفتوحة. اطلب من {host} رابطًا جديدًا.","join_net_full":"لا يتّسع لعب {host} لصديق آخر الآن. حاول مجددًا بعد لحظة.","join_net_no_hub":"تعذّر الوصول إلى خدمة دعوات PS5Upload. تحقّق من اتصالك بالإنترنت ثم حاول مجددًا.","join_net_offer":"تعذّر على كمبيوتر {host} الاتصال بهذا المتصفح. جرّب متصفحًا آخر.","join_net_no_webrtc":"هذا المتصفح لا يستطيع إنشاء اتصالات مباشرة. جرّب إصدارًا حديثًا من Chrome أو Safari أو Firefox.","join_cancel":"إلغاء","join_host_fallback":"صديقك","join_connecting":"جارٍ الاتصال بـ {host}…","join_waiting":"بانتظار أن يسمح لك {host} بالدخول","join_waiting_body":"يرى {host} اسمك على شاشته ويضغط سماح.","join_retry":"حاول مجددًا","join_again":"اطلب الانضمام مجددًا","join_playing_at":"تلعب لدى {host}","join_you_are":"أنت اللاعب {n}","join_seat_stream":"أنت تلعب بمستخدم PS5 الخاص بـ {host}. لا حاجة لاختيار مستخدم.","join_plays_as":"أنت تلعب باسم {profile}. لا حاجة لاختيار مستخدم.","join_seat_tv_asks":"اختار {host} ملفًا شخصيًا لك، لكن تعذّر استخدامه. سيسألك التلفاز عن هويتك.","join_picking":"اضغط PS، ثم اختر اللعب السريع على التلفاز","join_hide_controls":"إخفاء","join_sound":"اضغط لتشغيل الصوت","rp_unmute":"تشغيل الصوت","rp_mute":"كتم","join_no_sound":"لا يوجد صوت في هذا المتصفح","join_exit_fullscreen":"الخروج من ملء الشاشة","pad_fill":"ملء الشاشة","join_leave":"مغادرة","join_show_controls":"إظهار عناصر التحكم","join_hold_hint":"اضغط مطولاً على الصورة لإظهار الأزرار","pad_watch_no_hevc":"لا يستطيع هذا الجهاز تشغيل صورة هذا البث: الحاسوب يبث بـ HEVC وهذا الجهاز يشغّل H.264 فقط.","pad_watch_decode":"تعذّر تشغيل الصورة هنا.","join_pad_ready":"يد التحكم جاهزة","join_check_unknown_short":"ليست في قائمتنا: قد تكون الأزرار مختلطة.","join_full_to_play":"اضغط على ملء الشاشة للعب بيد التحكم التي على الشاشة.","join_pad_none":"وصّل يد تحكم (USB أو Bluetooth) واضغط أي زر.","join_pad_keys":"أو استخدم لوحة المفاتيح: WASD للتحريك، الأسهم للأزرار الاتجاهية، Enter ✕، Backspace ○، Q □، E △، Tab Options.","join_tv_back_hint":"اضغط على زر الرجوع في جهاز التحكم عن بُعد لإظهار الأزرار.","join_block_note":"أوقف {host} زرَّي PS وCreate للأصدقاء.","join_guide_title":"خطوة أخيرة على التلفاز","join_guide_body":"اضغط زر PS مرة واحدة على يد التحكم. يسأل التلفاز «من يستخدم يد التحكم هذه؟». اختر اللعب السريع أو مستخدمك الخاص. لا يحتاج المضيف إلى فعل أي شيء.","join_guide_menus":"في الشاشة الرئيسية لجهاز PS5 يتحكم المضيف وحده بالقوائم؛ يد التحكم الخاصة بك تلعب داخل الألعاب.","join_guide_ok":"فهمت","join_host_away":"توقف المضيف عن اللعب — بانتظار أن يبدأ من جديد ({time})","join_reconnecting":"جارٍ إعادة الاتصال…","join_reconnecting_left":"مكانك محفوظ لمدة {time}.","pad_turn":"أدر الهاتف أفقيًا","join_game_label":"لعبة {host}","join_title":"انضم إلى لعبة صديق","join_title_body":"العب على PS5 الخاص بـ {host} كلاعب 2 أو 3 أو 4.","join_name_label":"اسمك","join_name_hint":"يرى صديقك هذا الاسم عندما تطلب الانضمام.","join_button":"انضمام"},"bn":{"usb_skipped_not_payload":"{name}: .elf বা .bin ফাইল নয়","usb_skipped_unknown":"{id}: আর পেলোড তালিকায় নেই","browser_unsupported":"এর জন্য ডেস্কটপ অ্যাপ দরকার। এটি ব্রাউজারে কাজ করে না।","video_recovered_notice":"গতবার ছবি শুরু করার সময় খেলুন ক্র্যাশ করেছিল, তাই ছবি এখন গ্রাফিক্স কার্ড ছাড়া ডিকোড হয় (বদলাতে সেটিংস › উইন্ডো › গ্রাফিক্স › হার্ডওয়্যার ভিডিও ডিকোডিং)।","video_recovered_title":"ছবি এখন সফটওয়্যারে ডিকোড হয়","open_in_title":"PS5Upload অ্যাপে খুলবেন?","open_in_body":"এই ডিভাইসে PS5Upload অ্যাপ আছে? সেখানে খুলুন, অথবা ব্রাউজারেই চালিয়ে যান।","open_in_app":"অ্যাপে খুলুন","open_in_browser":"ব্রাউজারে চালিয়ে যান","open_in_remember":"এই ডিভাইসে আমার পছন্দ মনে রাখুন","open_in_opening":"PS5Upload অ্যাপ খোলা হচ্ছে…","open_in_not_opened":"কিছু হলো না? হয়তো এই ডিভাইসে অ্যাপটি নেই।","open_in_again":"আবার চেষ্টা করুন","pad_8bitdo_no_xinput":"এই 8BitDo-তে X-input মোড নেই। কোনো বোতাম ভুল হলে কন্ট্রোলারটি পরীক্ষা করুন।","pad_8bitdo_how_switch":"পেছনের সুইচটি X-এ দিন, তারপর Start চাপুন","pad_8bitdo_how_startx":"এটি বন্ধ করুন, তারপর Start + X চেপে ধরে চালু করুন","pad_8bitdo_how_receiver":"এর 2.4G রিসিভার বা একটি USB কেবল ব্যবহার করুন","pad_8bitdo_how_manual":"এর ম্যানুয়ালে উপায় দেওয়া আছে","pad_8bitdo_xinput":"সেরা ফলের জন্য আপনার 8BitDo-কে X-input মোডে নিন: {how}।","rp_touch_left_stick":"বাম স্টিক","rp_touch_right_stick":"ডান স্টিক","rp_touch_touchpad":"টাচপ্যাড","rp_menu":"মেনু","rp_pad_step_lx":"বাম স্টিক ডানে ঠেলুন","rp_pad_step_ly":"বাম স্টিক নিচে ঠেলুন","rp_pad_step_rx":"ডান স্টিক ডানে ঠেলুন","rp_pad_step_ry":"ডান স্টিক নিচে ঠেলুন","join_check_bottom":"নিচের ফেস বোতামটি চাপুন (✕)","join_check_right":"ডান দিকের ফেস বোতামটি চাপুন (○)","join_check_left":"বাঁ দিকের ফেস বোতামটি চাপুন (□)","join_check_top":"উপরের ফেস বোতামটি চাপুন (△)","rp_pad_press":"{name} চাপুন","join_check_saved":"এই ডিভাইসে এই কন্ট্রোলারের জন্য সেভ হয়েছে। নিচে চেষ্টা করে দেখুন।","join_check_title":"আপনার কন্ট্রোলার পরীক্ষা করুন","join_done":"হয়ে গেছে","rp_pads_none":"এখনও কোনো কন্ট্রোলার দেখা যায়নি। একটি সংযুক্ত করে তার যেকোনো বোতাম চাপুন।","rp_pad_mapped":"আপনার ম্যাপিং দিয়ে খেলে","join_check_unknown":"এই কন্ট্রোলারটি আমাদের তালিকায় নেই, তাই এর বোতামগুলো এলোমেলো হতে পারে। সেট আপ করতে কয়েক সেকেন্ড লাগে।","rp_pad_standard":"শনাক্ত হয়েছে","rp_pad_progress":"{total}-এর মধ্যে {n}","rp_pad_skip":"এড়িয়ে যান","rp_pad_back":"পেছনে","rp_pad_cancel":"বাতিল","join_check_try":"বোতাম চাপুন ও স্টিক নাড়ান: যা চাপবেন তা জ্বলে উঠবে।","join_check_redo":"আবার করুন","join_check_map":"বোতাম সেট আপ করুন","rp_pad_reset":"রিসেট","join_open_lan_body":"ইন্টারনেট পাচ্ছেন না? বন্ধুর সাথে একই Wi-Fi-তে থাকলে সেখানেই গেমটি খুলুন।","join_open_lan":"এই Wi-Fi-তে খুলুন","join_path_lan":"হোম নেটওয়ার্ক","join_path_internet":"ইন্টারনেট","join_seat_taken":"{host}-এর নিজের কন্ট্রোলার ফেরত দরকার ছিল এবং PS5-এ আর কোনো কন্ট্রোলার খালি ছিল না, তাই আপনি গেম থেকে বেরিয়ে গেছেন। {host}-কে আবার ঢুকতে দিতে বলুন।","join_refused_key":"এই আমন্ত্রণের মেয়াদ শেষ। {host}-এর কাছে নতুন লিংক চান।","join_refused_expired":"গেমে আপনার জায়গা চলে গেছে। {host}-কে আবার ঢুকতে দিতে বলুন।","join_refused_full":"গেম পূর্ণ: ইতিমধ্যে চারজন খেলছে।","join_refused_denied":"{host} এবার আপনাকে ঢুকতে দেয়নি।","join_refused_no_answer":"{host} সময়মতো উত্তর দেননি। {host}-কে জানান, তারপর আবার চেষ্টা করুন।","join_refused_closed":"{host} এখন \"একসাথে খেলুন\" চালাচ্ছে না।","join_refused_old_helper":"\"একসাথে খেলুন\"-এর জন্য {host}-এর PS5-এ আপডেট করা হেল্পার দরকার।","join_refused_not_playing":"{host} এখন খেলছে না। {host}-কে আগে খেলা শুরু করতে বলুন।","join_refused_unreachable":"{host}-এর কম্পিউটার তাদের PS5-এ পৌঁছাতে পারেনি। একটু পরে আবার চেষ্টা করুন।","join_refused_slow_down":"অনেক বেশি ভুল কোড। এক মিনিট অপেক্ষা করে আবার চেষ্টা করুন।","join_refused_address":"এই লিঙ্কের ঠিকানা আপনার হোম নেটওয়ার্কের বাইরে, তাই অ্যাপ এটি ব্যবহার করবে না। {host}-এর কাছে তাঁর কম্পিউটারের IP ঠিকানা সহ একটি লিঙ্ক চান।","join_refused_other":"{host} আপনাকে ঢুকতে দেয়নি।","join_ended_kicked":"{host} আপনাকে গেম থেকে বের করে দিয়েছে।","join_ended_closed":"{host} \"একসাথে খেলুন\" বন্ধ করেছে।","join_ended_host_stopped":"হোস্ট খেলা বন্ধ করেছে।","join_ended_replaced":"এই গেমটি অন্য ট্যাব বা ডিভাইসে খোলা হয়েছে, তাই এখানে থেমে গেছে।","join_ended_pad_lost":"PS5 আপনার কন্ট্রোলার হারিয়েছে, তাই আপনি গেমের বাইরে। {host}-কে আবার ঢুকতে দিতে বলুন।","join_ended_gave_up":"{host}-এর সাথে সংযোগ সময়মতো ফিরে আসেনি।","join_net_lost":"{host}-এর সাথে সংযোগ কেটে গেছে। আপনার ইন্টারনেট সংযোগ দেখুন, তারপর আবার অনুরোধ করুন।","join_ended_lost":"{host}-এর কাছে পৌঁছানো যায়নি। আপনারা একই নেটওয়ার্কে আছেন কিনা দেখুন।","join_ended_left":"আপনি গেম ছেড়ে গেছেন।","join_net_mismatch":"এই লিংকটি হোস্টের সঙ্গে মেলে না; তাঁর কাছে নতুন লিংক চান।","join_net_no_direct":"এই নেটওয়ার্ক থেকে সরাসরি সংযোগ সম্ভব নয় (দুই দিকের রাউটারই কড়া)। মোবাইল ডেটার বদলে Wi-Fi চেষ্টা করুন, অথবা হোস্টকে UPnP চালু করতে বলুন।","join_net_no_room":"এই আমন্ত্রণটি আর খোলা নেই। {host}-এর কাছে নতুন লিংক চান।","join_net_full":"{host}-এর গেমে এখন আরেকজন বন্ধুর জায়গা নেই। একটু পরে আবার চেষ্টা করুন।","join_net_no_hub":"PS5Upload আমন্ত্রণ পরিষেবায় পৌঁছানো যায়নি। ইন্টারনেট সংযোগ দেখে আবার চেষ্টা করুন।","join_net_offer":"{host}-এর কম্পিউটার এই ব্রাউজারের সঙ্গে সংযোগ করতে পারেনি। অন্য ব্রাউজার চেষ্টা করুন।","join_net_no_webrtc":"এই ব্রাউজার সরাসরি সংযোগ করতে পারে না। Chrome, Safari বা Firefox-এর নতুন সংস্করণ চেষ্টা করুন।","join_cancel":"বাতিল","join_host_fallback":"আপনার বন্ধু","join_connecting":"{host}-এর সাথে সংযোগ হচ্ছে…","join_waiting":"{host} আপনাকে ঢুকতে দেওয়ার অপেক্ষায়","join_waiting_body":"{host} তার স্ক্রিনে আপনার নাম দেখে \"অনুমতি দিন\" চাপবে।","join_retry":"আবার চেষ্টা করুন","join_again":"আবার যোগ দিতে অনুরোধ করুন","join_playing_at":"{host}-এর কাছে খেলছেন","join_you_are":"আপনি প্লেয়ার {n}","join_seat_stream":"আপনি {host}-এর PS5 ইউজার হিসেবে খেলছেন। ইউজার বাছার দরকার নেই।","join_plays_as":"আপনি {profile} হিসেবে খেলছেন। কাউকে বেছে নিতে হবে না।","join_seat_tv_asks":"{host} আপনার জন্য একটি প্রোফাইল বেছে রেখেছিল, কিন্তু সেটা ব্যবহার করা যায়নি। টিভি জিজ্ঞেস করবে আপনি কে।","join_picking":"PS চাপুন, তারপর টিভিতে দ্রুত খেলা বেছে নিন","join_hide_controls":"লুকান","join_sound":"শব্দের জন্য ট্যাপ করুন","rp_unmute":"শব্দ চালু","rp_mute":"নিঃশব্দ","join_no_sound":"এই ব্রাউজারে শব্দ নেই","join_exit_fullscreen":"ফুল স্ক্রিন থেকে বের হন","pad_fill":"পূর্ণ স্ক্রিন","join_leave":"ছেড়ে যান","join_show_controls":"নিয়ন্ত্রণগুলি দেখান","join_hold_hint":"বোতামগুলো দেখাতে ছবিতে চেপে ধরে রাখুন","pad_watch_no_hevc":"এই ডিভাইস এই স্ট্রিমের ছবি চালাতে পারে না: কম্পিউটার HEVC-তে স্ট্রিম করে, আর এই ডিভাইস শুধু H.264 চালায়।","pad_watch_decode":"ছবিটি এখানে চালানো যায়নি।","join_pad_ready":"আপনার কন্ট্রোলার প্রস্তুত","join_check_unknown_short":"আমাদের তালিকায় নেই: বোতামগুলো এলোমেলো হতে পারে।","join_full_to_play":"অন-স্ক্রিন কন্ট্রোলার দিয়ে খেলতে ফুল স্ক্রিনে ট্যাপ করুন।","join_pad_none":"একটি কন্ট্রোলার সংযুক্ত করুন (USB বা Bluetooth) এবং যেকোনো বোতাম চাপুন।","join_pad_keys":"অথবা কিবোর্ড ব্যবহার করুন: WASD নড়াচড়া, তীর চিহ্ন D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options।","join_tv_back_hint":"বোতামগুলো দেখতে রিমোটে Back চাপুন।","join_block_note":"{host} বন্ধুদের জন্য PS ও Create বন্ধ করে রেখেছে।","join_guide_title":"টিভিতে আর একটি ধাপ","join_guide_body":"আপনার কন্ট্রোলারে একবার PS চাপুন। টিভি জিজ্ঞেস করবে \"এই কন্ট্রোলার কে ব্যবহার করছে?\"। দ্রুত খেলা বা নিজের ইউজার বেছে নিন। হোস্টকে কিছু করতে হবে না।","join_guide_menus":"PS5-এর হোম স্ক্রিনে শুধু হোস্ট মেনু চালাতে পারে; আপনার কন্ট্রোলার গেমের ভেতরে খেলে।","join_guide_ok":"বুঝেছি","join_host_away":"হোস্ট খেলা বন্ধ করেছে — আবার শুরু করার অপেক্ষায় ({time})","join_reconnecting":"আবার সংযোগ হচ্ছে…","join_reconnecting_left":"আপনার জায়গা {time} ধরে রাখা থাকবে।","pad_turn":"ফোনটি আড়াআড়ি ঘোরান","join_game_label":"{host}-এর গেম","join_title":"বন্ধুর গেমে যোগ দিন","join_title_body":"{host}-এর PS5-এ প্লেয়ার 2, 3 বা 4 হিসেবে খেলুন।","join_name_label":"আপনার নাম","join_name_hint":"যোগ দিতে অনুরোধ করলে আপনার বন্ধু এটি দেখবে।","join_button":"যোগ দিন"},"de":{"usb_skipped_not_payload":"{name}: keine .elf- oder .bin-Datei","usb_skipped_unknown":"{id}: nicht mehr in der Payload-Liste","browser_unsupported":"Dafür brauchst du die Desktop-App. Im Browser funktioniert das nicht.","video_recovered_notice":"Play ist beim letzten Mal beim Starten des Bildes abgestürzt, daher wird das Bild jetzt ohne Grafikkarte dekodiert (ändern unter Einstellungen › Fenster › Grafik › Hardware-Videodekodierung).","video_recovered_title":"Bild wird jetzt per Software dekodiert","open_in_title":"In der PS5Upload-App öffnen?","open_in_body":"Hast du die PS5Upload-App auf diesem Gerät? Öffne dies dort oder mach im Browser weiter.","open_in_app":"In der App öffnen","open_in_browser":"Im Browser weiter","open_in_remember":"Meine Wahl auf diesem Gerät merken","open_in_opening":"PS5Upload-App wird geöffnet …","open_in_not_opened":"Nichts passiert? Die App ist vielleicht nicht auf diesem Gerät.","open_in_again":"Erneut versuchen","pad_8bitdo_no_xinput":"Dieser 8BitDo hat keinen X-input-Modus. Wenn eine Taste falsch ist, prüfe den Controller.","pad_8bitdo_how_switch":"stell den Schalter auf der Rückseite auf X und drück dann Start","pad_8bitdo_how_startx":"schalte ihn aus und halte dann Start + X gedrückt, um ihn einzuschalten","pad_8bitdo_how_receiver":"nutze seinen 2.4G-Empfänger oder ein USB-Kabel","pad_8bitdo_how_manual":"wie, steht in seiner Anleitung","pad_8bitdo_xinput":"Für das beste Ergebnis schalte deinen 8BitDo in den X-input-Modus: {how}.","rp_touch_left_stick":"Linker Stick","rp_touch_right_stick":"Rechter Stick","rp_menu":"Menü","rp_pad_step_lx":"Drücke den linken Stick nach rechts","rp_pad_step_ly":"Drücke den linken Stick nach unten","rp_pad_step_rx":"Drücke den rechten Stick nach rechts","rp_pad_step_ry":"Drücke den rechten Stick nach unten","join_check_bottom":"Drück die untere Aktionstaste (✕)","join_check_right":"Drück die rechte Aktionstaste (○)","join_check_left":"Drück die linke Aktionstaste (□)","join_check_top":"Drück die obere Aktionstaste (△)","rp_pad_press":"Drücke {name}","join_check_saved":"Für diesen Controller auf diesem Gerät gespeichert. Probier es unten aus.","join_check_title":"Controller prüfen","join_done":"Fertig","rp_pads_none":"Noch kein Controller erkannt. Schließe einen an und drücke eine beliebige Taste darauf.","rp_pad_mapped":"Spielt mit deiner Belegung","join_check_unknown":"Dieser Controller ist nicht auf unserer Liste, die Tasten könnten also vertauscht sein. Das Einrichten dauert nur ein paar Sekunden.","rp_pad_standard":"Erkannt","rp_pad_progress":"{n} von {total}","rp_pad_skip":"Überspringen","rp_pad_back":"Zurück","rp_pad_cancel":"Abbrechen","join_check_try":"Drück Tasten und beweg die Sticks: Was du drückst, leuchtet auf.","join_check_redo":"Neu einrichten","join_check_map":"Tasten einrichten","rp_pad_reset":"Zurücksetzen","join_open_lan_body":"Kein Internet? Wenn du im selben WLAN wie dein Freund bist, öffne das Spiel dort.","join_open_lan":"In diesem WLAN öffnen","join_path_lan":"Heimnetz","join_seat_taken":"{host} brauchte seinen Controller zurück, und auf der PS5 war kein anderer Controller frei, daher bist du aus dem Spiel. Bitte {host}, dich wieder hereinzulassen.","join_refused_key":"Diese Einladung ist abgelaufen. Bitte {host} um einen neuen Link.","join_refused_expired":"Dein Platz im Spiel ist verloren. Bitte {host}, dich wieder hereinzulassen.","join_refused_full":"Das Spiel ist voll: Es sind schon vier Spieler da.","join_refused_denied":"{host} hat dich diesmal nicht reingelassen.","join_refused_no_answer":"{host} hat nicht rechtzeitig geantwortet. Sag {host} Bescheid und versuche es noch einmal.","join_refused_closed":"{host} bietet gerade kein „Zusammen spielen“ an.","join_refused_old_helper":"Die PS5 von {host} braucht einen aktuellen Helfer für „Zusammen spielen“.","join_refused_not_playing":"{host} spielt gerade nicht. Bitte {host}, zuerst Spielen zu starten.","join_refused_unreachable":"Der Computer von {host} hat die PS5 nicht erreicht. Versuch es gleich noch einmal.","join_refused_slow_down":"Zu viele falsche Codes. Warte eine Minute und versuch es dann noch einmal.","join_refused_address":"Die Adresse dieses Links liegt außerhalb deines Heimnetzes, daher verwendet die App sie nicht. Bitte {host} um einen Link mit der IP-Adresse des Computers.","join_refused_other":"{host} hat dich nicht reingelassen.","join_ended_kicked":"{host} hat dich aus dem Spiel genommen.","join_ended_closed":"{host} hat „Zusammen spielen“ beendet.","join_ended_host_stopped":"Der Gastgeber hat aufgehört zu spielen.","join_ended_replaced":"Dieses Spiel wurde in einem anderen Tab oder auf einem anderen Gerät geöffnet, daher wurde es hier beendet.","join_ended_pad_lost":"Die PS5 hat deinen Controller verloren, daher bist du aus dem Spiel. Bitte {host}, dich wieder hereinzulassen.","join_ended_gave_up":"Die Verbindung zu {host} kam nicht rechtzeitig zurück.","join_net_lost":"Die Verbindung zu {host} ist abgebrochen. Prüfe deine Internetverbindung und frage dann erneut.","join_ended_lost":"{host} nicht erreichbar. Prüfe, ob ihr im selben Netzwerk seid.","join_ended_left":"Du hast das Spiel verlassen.","join_net_mismatch":"Dieser Link passt nicht zum Gastgeber. Bitte ihn um einen neuen.","join_net_no_direct":"Von diesem Netzwerk aus ist keine direkte Verbindung möglich (die Router beider Seiten sind streng). Versuche WLAN statt mobiler Daten oder bitte den Gastgeber, UPnP einzuschalten.","join_net_no_room":"Diese Einladung ist nicht mehr offen. Bitte {host} um einen neuen Link.","join_net_full":"Im Spiel von {host} ist gerade kein Platz für einen weiteren Freund. Versuche es gleich noch einmal.","join_net_no_hub":"Der Einladungsdienst von PS5Upload ist nicht erreichbar. Prüfe deine Internetverbindung und versuche es dann erneut.","join_net_offer":"Der Computer von {host} konnte sich nicht mit diesem Browser verbinden. Versuche einen anderen Browser.","join_net_no_webrtc":"Dieser Browser kann keine direkten Verbindungen herstellen. Versuche ein aktuelles Chrome, Safari oder Firefox.","join_cancel":"Abbrechen","join_host_fallback":"dein Freund","join_connecting":"Verbinde mit {host}…","join_waiting":"Warte, bis {host} dich reinlässt","join_waiting_body":"{host} sieht deinen Namen auf dem Bildschirm und tippt auf „Zulassen“.","join_retry":"Erneut versuchen","join_again":"Erneut zum Mitspielen anfragen","join_playing_at":"Du spielst bei {host}","join_you_are":"Du bist Spieler {n}","join_seat_stream":"Du spielst als PS5-Benutzer von {host}. Du musst keinen wählen.","join_plays_as":"Du spielst als {profile}. Du musst keinen wählen.","join_seat_tv_asks":"{host} hat ein Profil für dich gewählt, aber es konnte nicht genutzt werden. Der Fernseher fragt, wer du bist.","join_picking":"PS drücken, dann am Fernseher „Schnellspiel“ wählen","join_hide_controls":"Ausblenden","join_sound":"Für Ton tippen","rp_unmute":"Ton an","rp_mute":"Stumm","join_no_sound":"Kein Ton in diesem Browser","join_exit_fullscreen":"Vollbild verlassen","pad_fill":"Vollbild","join_leave":"Verlassen","join_show_controls":"Steuerelemente einblenden","join_hold_hint":"Bild gedrückt halten, um die Tasten einzublenden","pad_watch_no_hevc":"Dieses Gerät kann das Bild dieses Streams nicht abspielen: Der Computer streamt HEVC, dieses Gerät kann nur H.264.","pad_watch_decode":"Das Bild konnte hier nicht abgespielt werden.","join_pad_ready":"Dein Controller ist bereit","join_check_unknown_short":"Nicht auf unserer Liste: Tasten könnten vertauscht sein.","join_full_to_play":"Tippe auf Vollbild, um mit dem Bildschirm-Controller zu spielen.","join_pad_none":"Schließe einen Controller an (USB oder Bluetooth) und drücke eine beliebige Taste.","join_pad_keys":"Oder nutze die Tastatur: WASD bewegen, Pfeiltasten Steuerkreuz, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Drücke auf der Fernbedienung Zurück, um die Schaltflächen einzublenden.","join_block_note":"{host} hat PS und Create für Freunde ausgeschaltet.","join_guide_title":"Noch ein Schritt am Fernseher","join_guide_body":"Drücke einmal PS auf deinem Controller. Der Fernseher fragt „Wer benutzt diesen Controller?“. Wähle „Schnellspiel“ oder deinen eigenen Benutzer. Der Gastgeber muss nichts tun.","join_guide_menus":"Auf dem Startbildschirm der PS5 steuert nur der Gastgeber die Menüs; dein Controller spielt in den Spielen.","join_guide_ok":"Verstanden","join_host_away":"Der Gastgeber hat aufgehört zu spielen – wir warten, bis er wieder anfängt ({time})","join_reconnecting":"Verbinde neu…","join_reconnecting_left":"Dein Platz wird {time} lang freigehalten.","pad_turn":"Dreh das Handy quer","join_game_label":"Spiel von {host}","join_title":"Bei Freunden mitspielen","join_title_body":"Spiele auf der PS5 von {host} als Spieler 2, 3 oder 4.","join_name_label":"Dein Name","join_name_hint":"Das sieht dein Freund, wenn du zum Mitspielen anfragst.","join_button":"Mitspielen"},"en":{"usb_skipped_not_payload":"{name}: not an .elf or .bin file","usb_skipped_unknown":"{id}: not in the payload list any more","browser_unsupported":"This needs the desktop app. It does not work in the browser.","video_recovered_notice":"Play crashed while starting the picture last time, so the picture is now decoded without the graphics card (Settings › Window › Graphics › Hardware video decoding to change it).","video_recovered_title":"Picture now decoded in software","open_in_title":"Open in the PS5Upload app?","open_in_body":"Have the PS5Upload app on this device? Open this there, or carry on in the browser.","open_in_app":"Open in the app","open_in_browser":"Continue in browser","open_in_remember":"Remember my choice on this device","open_in_opening":"Opening the PS5Upload app…","open_in_not_opened":"Nothing happened? The app may not be on this device.","open_in_again":"Try again","pad_8bitdo_no_xinput":"This 8BitDo has no X-input mode. If a button is wrong, check the controller.","pad_8bitdo_how_switch":"set the switch on the back to X, then press Start","pad_8bitdo_how_startx":"turn it off, then hold Start + X to turn it on","pad_8bitdo_how_receiver":"use its 2.4G receiver or a USB cable","pad_8bitdo_how_manual":"its manual says how","pad_8bitdo_xinput":"For the best result, switch your 8BitDo to X-input mode: {how}.","rp_touch_left_stick":"Left stick","rp_touch_right_stick":"Right stick","rp_touch_touchpad":"Touchpad","rp_menu":"Menu","rp_pad_step_lx":"Push the left stick right","rp_pad_step_ly":"Push the left stick down","rp_pad_step_rx":"Push the right stick right","rp_pad_step_ry":"Push the right stick down","join_check_bottom":"Press the bottom face button (✕)","join_check_right":"Press the right face button (○)","join_check_left":"Press the left face button (□)","join_check_top":"Press the top face button (△)","rp_pad_press":"Press {name}","join_check_saved":"Saved for this controller on this device. Try it below.","join_check_title":"Check your controller","join_done":"Done","rp_pads_none":"No controller seen yet. Connect one and press any button on it.","rp_pad_mapped":"Plays with your mapping","join_check_unknown":"This controller isn't on our list, so its buttons may be mixed up. Setting it up takes a few seconds.","rp_pad_standard":"Recognized","rp_pad_progress":"{n} of {total}","rp_pad_skip":"Skip","rp_pad_back":"Back","rp_pad_cancel":"Cancel","join_check_try":"Press buttons and move the sticks: what you press lights up.","join_check_redo":"Redo","join_check_map":"Set up the buttons","rp_pad_reset":"Reset","join_open_lan_body":"Can't reach the internet? If you're on the same Wi-Fi as your friend, open the game there.","join_open_lan":"Open on this Wi-Fi","join_path_lan":"Home network","join_path_tailscale":"Tailscale","join_path_internet":"Internet","join_seat_taken":"{host} needed their controller back and no other controller was free on the PS5, so you're out of the game. Ask {host} to let you in again.","join_refused_key":"This invite has expired. Ask {host} for a new link.","join_refused_expired":"Your place in the game was lost. Ask {host} to let you in again.","join_refused_full":"The game is full: four players already.","join_refused_denied":"{host} didn't let you in this time.","join_refused_no_answer":"{host} didn't answer in time. Tell {host}, then try again.","join_refused_closed":"{host} isn't hosting Play Together right now.","join_refused_old_helper":"{host}'s PS5 needs an updated helper for Play Together.","join_refused_not_playing":"{host} isn't playing right now. Ask {host} to start Play first.","join_refused_unreachable":"{host}'s computer couldn't reach their PS5. Try again in a moment.","join_refused_slow_down":"Too many wrong codes. Wait a minute, then try again.","join_refused_address":"This link's address is outside your home network, so the app will not use it. Ask {host} for a link with their computer's IP address.","join_refused_other":"{host} didn't let you in.","join_ended_kicked":"{host} took you out of the game.","join_ended_closed":"{host} closed Play Together.","join_ended_host_stopped":"The host stopped playing.","join_ended_replaced":"This game was opened in another tab or on another device, so it stopped here.","join_ended_pad_lost":"The PS5 lost your controller, so you're out of the game. Ask {host} to let you in again.","join_ended_gave_up":"The connection to {host} didn't come back in time.","join_net_lost":"The connection to {host} dropped. Check your internet connection, then ask again.","join_ended_lost":"Couldn't reach {host}. Check that you're on the same network.","join_ended_left":"You left the game.","join_net_mismatch":"This link doesn't match the host; ask them for a new one.","join_net_no_direct":"A direct connection isn't possible from this network (both sides' routers are strict). Try Wi-Fi instead of mobile data, or ask the host to turn on UPnP.","join_net_no_room":"This invite isn't open any more. Ask {host} for a new link.","join_net_full":"{host}'s game has no room for another friend right now. Try again in a moment.","join_net_no_hub":"Couldn't reach the PS5Upload invite service. Check your internet connection, then try again.","join_net_offer":"{host}'s computer couldn't connect to this browser. Try another browser.","join_net_no_webrtc":"This browser can't make direct connections. Try a recent Chrome, Safari or Firefox.","join_cancel":"Cancel","join_host_fallback":"your friend","join_connecting":"Connecting to {host}…","join_waiting":"Waiting for {host} to let you in","join_waiting_body":"{host} sees your name on their screen and taps Allow.","join_retry":"Try again","join_again":"Ask to join again","join_playing_at":"Playing at {host}'s","join_you_are":"You are Player {n}","join_seat_stream":"You're playing as {host}'s PS5 user. No need to pick one.","join_plays_as":"You're playing as {profile}. No need to pick one.","join_seat_tv_asks":"{host} chose a profile for you, but it couldn't be used. The TV will ask who you are.","join_picking":"Press PS, then pick Quick Play on the TV","join_hide_controls":"Hide","join_sound":"Tap for sound","rp_unmute":"Sound on","rp_mute":"Mute","join_no_sound":"No sound in this browser","join_exit_fullscreen":"Leave full screen","pad_fill":"Full screen","join_leave":"Leave","join_show_controls":"Show controls","join_hold_hint":"Press and hold the picture to show the buttons","pad_watch_no_hevc":"This device can't play this stream's picture: the computer streams HEVC, and this device plays only H.264.","pad_watch_decode":"The picture could not be played here.","join_pad_ready":"Your controller is ready","join_check_unknown_short":"Not on our list: buttons may be mixed up.","join_full_to_play":"Tap full screen to play with the on-screen controller.","join_pad_none":"Connect a controller (USB or Bluetooth) and press any button.","join_pad_keys":"Or use the keyboard: WASD move, arrows D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Press Back on the remote for the buttons.","join_block_note":"{host} turned off PS and Create for friends.","join_guide_title":"One more step on the TV","join_guide_body":"On your controller, press PS once. The TV asks \"Who's using this controller?\". Pick Quick Play or your own user. The host doesn't need to do anything.","join_guide_menus":"On the PS5's home screen only the host controls the menus; your controller plays inside games.","join_guide_ok":"Got it","join_host_away":"The host stopped playing — waiting for them to start again ({time})","join_reconnecting":"Reconnecting…","join_reconnecting_left":"Your place is kept for {time}.","pad_turn":"Turn the phone sideways","join_game_label":"{host}'s game","join_title":"Join a friend's game","join_title_body":"Play on {host}'s PS5 as Player 2, 3 or 4.","join_name_label":"Your name","join_name_hint":"Your friend sees this when you ask to join.","join_button":"Join"},"es":{"usb_skipped_not_payload":"{name}: no es un archivo .elf ni .bin","usb_skipped_unknown":"{id}: ya no está en la lista de payloads","browser_unsupported":"Esto necesita la aplicación de escritorio. No funciona en el navegador.","video_recovered_notice":"Play se cerró al iniciar la imagen la última vez, así que ahora la imagen se decodifica sin la tarjeta gráfica (cámbialo en Configuración › Ventana › Gráficos › Decodificación de vídeo por hardware).","video_recovered_title":"La imagen ahora se decodifica por software","open_in_title":"¿Abrir en la app PS5Upload?","open_in_body":"¿Tienes la app PS5Upload en este dispositivo? Ábrelo ahí o sigue en el navegador.","open_in_app":"Abrir en la app","open_in_browser":"Seguir en el navegador","open_in_remember":"Recordar mi elección en este dispositivo","open_in_opening":"Abriendo la app PS5Upload…","open_in_not_opened":"¿No pasó nada? Puede que la app no esté en este dispositivo.","open_in_again":"Reintentar","pad_8bitdo_no_xinput":"Este 8BitDo no tiene modo X-input. Si un botón no va bien, comprueba el mando.","pad_8bitdo_how_switch":"pon el interruptor de atrás en X y pulsa Start","pad_8bitdo_how_startx":"apágalo y luego mantén Start + X para encenderlo","pad_8bitdo_how_receiver":"usa su receptor 2.4G o un cable USB","pad_8bitdo_how_manual":"su manual explica cómo","pad_8bitdo_xinput":"Para el mejor resultado, pon tu 8BitDo en modo X-input: {how}.","rp_touch_left_stick":"Joystick izquierdo","rp_touch_right_stick":"Joystick derecho","rp_touch_touchpad":"Panel táctil","rp_menu":"Menú","rp_pad_step_lx":"Mueve el stick izquierdo a la derecha","rp_pad_step_ly":"Mueve el stick izquierdo hacia abajo","rp_pad_step_rx":"Mueve el stick derecho a la derecha","rp_pad_step_ry":"Mueve el stick derecho hacia abajo","join_check_bottom":"Pulsa el botón de acción de abajo (✕)","join_check_right":"Pulsa el botón de acción de la derecha (○)","join_check_left":"Pulsa el botón de acción de la izquierda (□)","join_check_top":"Pulsa el botón de acción de arriba (△)","rp_pad_press":"Pulsa {name}","join_check_saved":"Guardado para este mando en este dispositivo. Pruébalo abajo.","join_check_title":"Comprueba tu mando","join_done":"Listo","rp_pads_none":"Aún no se ve ningún mando. Conecta uno y pulsa cualquier botón.","rp_pad_mapped":"Juega con tu asignación","join_check_unknown":"Este mando no está en nuestra lista, así que sus botones pueden estar cambiados. Configurarlo lleva unos segundos.","rp_pad_standard":"Reconocido","rp_pad_progress":"{n} de {total}","rp_pad_skip":"Omitir","rp_pad_back":"Atrás","rp_pad_cancel":"Cancelar","join_check_try":"Pulsa botones y mueve los sticks: lo que pulses se ilumina.","join_check_redo":"Rehacer","join_check_map":"Configurar los botones","rp_pad_reset":"Restablecer","join_open_lan_body":"¿Sin internet? Si estás en el mismo Wi-Fi que tu amigo, abre la partida desde ahí.","join_open_lan":"Abrir en este Wi-Fi","join_path_lan":"Red doméstica","join_seat_taken":"{host} necesitaba recuperar su mando y no había otro mando libre en la PS5, así que has salido de la partida. Pide a {host} que te deje entrar otra vez.","join_refused_key":"Esta invitación ha caducado. Pide a {host} un enlace nuevo.","join_refused_expired":"Perdiste tu sitio en la partida. Pide a {host} que te deje entrar de nuevo.","join_refused_full":"La partida está llena: ya hay cuatro jugadores.","join_refused_denied":"{host} no te dejó entrar esta vez.","join_refused_no_answer":"{host} no respondió a tiempo. Avisa a {host} e inténtalo de nuevo.","join_refused_closed":"{host} no está ofreciendo Jugar juntos ahora mismo.","join_refused_old_helper":"La PS5 de {host} necesita un ayudante actualizado para Jugar juntos.","join_refused_not_playing":"{host} no está jugando ahora. Pide a {host} que inicie Jugar primero.","join_refused_unreachable":"El ordenador de {host} no pudo conectar con su PS5. Inténtalo de nuevo en un momento.","join_refused_slow_down":"Demasiados códigos incorrectos. Espera un minuto y vuelve a intentarlo.","join_refused_address":"La dirección de este enlace está fuera de tu red doméstica, así que la aplicación no la usará. Pide a {host} un enlace con la dirección IP de su equipo.","join_refused_other":"{host} no te dejó entrar.","join_ended_kicked":"{host} te sacó de la partida.","join_ended_closed":"{host} cerró Jugar juntos.","join_ended_host_stopped":"El anfitrión dejó de jugar.","join_ended_replaced":"Esta partida se abrió en otra pestaña o en otro dispositivo, así que terminó aquí.","join_ended_pad_lost":"La PS5 perdió tu mando, así que estás fuera de la partida. Pide a {host} que te deje entrar de nuevo.","join_ended_gave_up":"La conexión con {host} no volvió a tiempo.","join_net_lost":"Se cortó la conexión con {host}. Revisa tu conexión a internet y vuelve a pedirlo.","join_ended_lost":"No se pudo contactar con {host}. Comprueba que estéis en la misma red.","join_ended_left":"Saliste de la partida.","join_net_mismatch":"Este enlace no coincide con el anfitrión; pídele uno nuevo.","join_net_no_direct":"No es posible una conexión directa desde esta red (los routers de ambos lados son estrictos). Prueba con Wi-Fi en lugar de datos móviles o pide al anfitrión que active UPnP.","join_net_no_room":"Esta invitación ya no está abierta. Pide a {host} un enlace nuevo.","join_net_full":"La partida de {host} no tiene sitio para otro amigo ahora mismo. Inténtalo de nuevo en un momento.","join_net_no_hub":"No se pudo contactar con el servicio de invitaciones de PS5Upload. Comprueba tu conexión a internet e inténtalo de nuevo.","join_net_offer":"El ordenador de {host} no pudo conectar con este navegador. Prueba con otro navegador.","join_net_no_webrtc":"Este navegador no puede hacer conexiones directas. Prueba una versión reciente de Chrome, Safari o Firefox.","join_cancel":"Cancelar","join_host_fallback":"tu amigo","join_connecting":"Conectando con {host}…","join_waiting":"Esperando a que {host} te deje entrar","join_waiting_body":"{host} ve tu nombre en su pantalla y toca Permitir.","join_retry":"Reintentar","join_again":"Pedir unirme otra vez","join_playing_at":"Jugando en casa de {host}","join_you_are":"Eres el Jugador {n}","join_seat_stream":"Juegas con el usuario de PS5 de {host}. No hace falta elegir uno.","join_plays_as":"Juegas como {profile}. No hace falta elegir uno.","join_seat_tv_asks":"{host} eligió un perfil para ti, pero no se pudo usar. La TV te preguntará quién eres.","join_picking":"Pulsa PS y luego elige Juego rápido en la tele","join_hide_controls":"Ocultar","join_sound":"Activar sonido","rp_unmute":"Activar sonido","rp_mute":"Silenciar","join_no_sound":"Sin sonido en este navegador","join_exit_fullscreen":"Salir de pantalla completa","pad_fill":"Pantalla completa","join_leave":"Salir","join_show_controls":"Mostrar controles","join_hold_hint":"Mantén pulsada la imagen para mostrar los botones","pad_watch_no_hevc":"Este dispositivo no puede reproducir la imagen de este stream: el ordenador emite en HEVC y este dispositivo solo reproduce H.264.","pad_watch_decode":"La imagen no se pudo reproducir aquí.","join_pad_ready":"Tu mando está listo","join_check_unknown_short":"No está en nuestra lista: los botones pueden estar cambiados.","join_full_to_play":"Toca pantalla completa para jugar con el mando en pantalla.","join_pad_none":"Conecta un mando (USB o Bluetooth) y pulsa cualquier botón.","join_pad_keys":"O usa el teclado: WASD para moverte, flechas cruceta, Enter ✕, Retroceso ○, Q □, E △, Tab Options.","join_tv_back_hint":"Pulsa Atrás en el mando a distancia para ver los botones.","join_block_note":"{host} desactivó PS y Create para los amigos.","join_guide_title":"Un paso más en la tele","join_guide_body":"Pulsa PS una vez en tu mando. La tele pregunta «¿Quién usa este mando?». Elige Juego rápido o tu propio usuario. El anfitrión no tiene que hacer nada.","join_guide_menus":"En la pantalla de inicio de la PS5 solo el anfitrión controla los menús; tu mando juega dentro de los juegos.","join_guide_ok":"Entendido","join_host_away":"El anfitrión dejó de jugar: esperando a que vuelva a empezar ({time})","join_reconnecting":"Reconectando…","join_reconnecting_left":"Tu sitio se guarda durante {time}.","pad_turn":"Gira el móvil en horizontal","join_game_label":"Partida de {host}","join_title":"Unirse a la partida de un amigo","join_title_body":"Juega en la PS5 de {host} como Jugador 2, 3 o 4.","join_name_label":"Tu nombre","join_name_hint":"Tu amigo lo verá cuando pidas unirte.","join_button":"Unirme"},"fa":{"usb_skipped_not_payload":"{name}: فایل .elf یا .bin نیست","usb_skipped_unknown":"{id}: دیگر در فهرست پیلودها نیست","browser_unsupported":"این کار به برنامه رومیزی نیاز دارد. در مرورگر کار نمی‌کند.","video_recovered_notice":"دفعهٔ پیش «بازی» هنگام شروع تصویر از کار افتاد، پس تصویر اکنون بدون کارت گرافیک رمزگشایی می‌شود (برای تغییر: تنظیمات › پنجره › گرافیک › رمزگشایی ویدیو با سخت‌افزار).","video_recovered_title":"تصویر اکنون با نرم‌افزار رمزگشایی می‌شود","open_in_title":"در برنامهٔ PS5Upload باز شود؟","open_in_body":"برنامهٔ PS5Upload روی این دستگاه هست؟ این را آنجا باز کنید، یا در مرورگر ادامه دهید.","open_in_app":"باز کردن در برنامه","open_in_browser":"ادامه در مرورگر","open_in_remember":"انتخابم را روی این دستگاه به خاطر بسپار","open_in_opening":"در حال باز کردن برنامهٔ PS5Upload…","open_in_not_opened":"اتفاقی نیفتاد؟ شاید برنامه روی این دستگاه نیست.","open_in_again":"دوباره امتحان کنید","pad_8bitdo_no_xinput":"این 8BitDo حالت X-input ندارد. اگر دکمه‌ای اشتباه است، کنترلر را بررسی کنید.","pad_8bitdo_how_switch":"کلید پشت را روی X بگذارید، سپس Start را بزنید","pad_8bitdo_how_startx":"آن را خاموش کنید، سپس Start + X را نگه دارید تا روشن شود","pad_8bitdo_how_receiver":"از گیرنده 2.4G آن یا کابل USB استفاده کنید","pad_8bitdo_how_manual":"دفترچه راهنمای آن روش را می‌گوید","pad_8bitdo_xinput":"برای بهترین نتیجه، 8BitDo خود را به حالت X-input ببرید: {how}.","rp_touch_left_stick":"استیک چپ","rp_touch_right_stick":"استیک راست","rp_touch_touchpad":"صفحه لمسی","rp_menu":"منو","rp_pad_step_lx":"استیک چپ را به راست فشار دهید","rp_pad_step_ly":"استیک چپ را به پایین فشار دهید","rp_pad_step_rx":"استیک راست را به راست فشار دهید","rp_pad_step_ry":"استیک راست را به پایین فشار دهید","join_check_bottom":"دکمهٔ پایینی را بزنید (✕)","join_check_right":"دکمهٔ سمت راست را بزنید (○)","join_check_left":"دکمهٔ سمت چپ را بزنید (□)","join_check_top":"دکمهٔ بالایی را بزنید (△)","rp_pad_press":"{name} را فشار دهید","join_check_saved":"برای این کنترلر روی این دستگاه ذخیره شد. پایین امتحانش کنید.","join_check_title":"کنترلر خود را بررسی کنید","join_done":"تمام","rp_pads_none":"هنوز دسته‌ای دیده نشده. یکی وصل کنید و یکی از دکمه‌هایش را فشار دهید.","rp_pad_mapped":"با نگاشت شما بازی می‌کند","join_check_unknown":"این کنترلر در فهرست ما نیست، پس ممکن است دکمه‌هایش جابه‌جا باشند. تنظیم آن چند ثانیه طول می‌کشد.","rp_pad_standard":"شناخته شد","rp_pad_progress":"{n} از {total}","rp_pad_skip":"رد کردن","rp_pad_back":"بازگشت","rp_pad_cancel":"لغو","join_check_try":"دکمه‌ها را بزنید و استیک‌ها را حرکت دهید: هر چه بزنید روشن می‌شود.","join_check_redo":"انجام دوباره","join_check_map":"تنظیم دکمه‌ها","rp_pad_reset":"بازنشانی","join_open_lan_body":"به اینترنت دسترسی ندارید؟ اگر با دوستتان روی یک Wi-Fi هستید، بازی را آنجا باز کنید.","join_open_lan":"باز کردن روی همین Wi-Fi","join_path_lan":"شبکهٔ خانگی","join_path_internet":"اینترنت","join_seat_taken":"{host} دستهٔ خودش را لازم داشت و دستهٔ آزاد دیگری روی PS5 نبود، پس از بازی بیرون رفتید. از {host} بخواهید دوباره راهتان بدهد.","join_refused_key":"این دعوت منقضی شده است. از {host} پیوند جدید بخواهید.","join_refused_expired":"جای شما در بازی از دست رفت. از {host} بخواهید دوباره راهتان بدهد.","join_refused_full":"بازی پر است: چهار بازیکن از قبل هستند.","join_refused_denied":"{host} این بار اجازهٔ ورود نداد.","join_refused_no_answer":"{host} به‌موقع پاسخ نداد. به {host} خبر دهید و دوباره امتحان کنید.","join_refused_closed":"{host} الان «بازی با هم» را میزبانی نمی‌کند.","join_refused_old_helper":"PS5 {host} برای «بازی با هم» به دستیار به‌روز نیاز دارد.","join_refused_not_playing":"{host} الان بازی نمی‌کند. از {host} بخواهید اول بازی را شروع کند.","join_refused_unreachable":"رایانهٔ {host} به PS5 دسترسی پیدا نکرد. کمی بعد دوباره امتحان کنید.","join_refused_slow_down":"تعداد کدهای اشتباه زیاد است. یک دقیقه صبر کنید و دوباره امتحان کنید.","join_refused_address":"نشانی این پیوند بیرون از شبکه خانگی شماست، پس برنامه از آن استفاده نمی‌کند. از {host} پیوندی با نشانی IP رایانه‌اش بخواهید.","join_refused_other":"{host} اجازهٔ ورود نداد.","join_ended_kicked":"{host} شما را از بازی بیرون کرد.","join_ended_closed":"{host} «بازی با هم» را بست.","join_ended_host_stopped":"میزبان بازی را متوقف کرد.","join_ended_replaced":"این بازی در زبانه یا دستگاه دیگری باز شد، پس اینجا متوقف شد.","join_ended_pad_lost":"PS5 دستهٔ شما را از دست داد، پس از بازی بیرون رفتید. از {host} بخواهید دوباره راهتان بدهد.","join_ended_gave_up":"اتصال به {host} به‌موقع برنگشت.","join_net_lost":"اتصال به {host} قطع شد. اتصال اینترنت خود را بررسی کنید و دوباره درخواست دهید.","join_ended_lost":"دسترسی به {host} ممکن نشد. بررسی کنید روی یک شبکه باشید.","join_ended_left":"از بازی خارج شدید.","join_net_mismatch":"این پیوند با میزبان جور نیست؛ از او پیوند تازه‌ای بخواهید.","join_net_no_direct":"اتصال مستقیم از این شبکه ممکن نیست (روترهای هر دو طرف سخت‌گیرند). به‌جای داده همراه Wi-Fi را امتحان کنید یا از میزبان بخواهید UPnP را روشن کند.","join_net_no_room":"این دعوت دیگر باز نیست. از {host} پیوند تازه‌ای بخواهید.","join_net_full":"بازی {host} اکنون جای دوست دیگری ندارد. کمی بعد دوباره امتحان کنید.","join_net_no_hub":"دسترسی به سرویس دعوت PS5Upload ممکن نشد. اتصال اینترنت را بررسی کنید و دوباره امتحان کنید.","join_net_offer":"رایانه {host} نتوانست به این مرورگر وصل شود. مرورگر دیگری را امتحان کنید.","join_net_no_webrtc":"این مرورگر نمی‌تواند اتصال مستقیم برقرار کند. نسخه تازه Chrome، Safari یا Firefox را امتحان کنید.","join_cancel":"لغو","join_host_fallback":"دوستتان","join_connecting":"در حال اتصال به {host}…","join_waiting":"منتظر اجازهٔ ورود از {host}","join_waiting_body":"{host} نام شما را روی صفحه‌اش می‌بیند و «اجازه» را می‌زند.","join_retry":"دوباره امتحان کنید","join_again":"دوباره درخواست پیوستن","join_playing_at":"در حال بازی پیش {host}","join_you_are":"شما بازیکن {n} هستید","join_seat_stream":"شما با کاربر PS5 {host} بازی می‌کنید. لازم نیست کاربری انتخاب کنید.","join_plays_as":"شما با {profile} بازی می‌کنید. نیازی به انتخاب نیست.","join_seat_tv_asks":"{host} پروفایلی برای شما انتخاب کرد، اما نشد از آن استفاده کرد. تلویزیون می‌پرسد شما کیستید.","join_picking":"PS را بزنید، سپس روی تلویزیون «بازی سریع» را انتخاب کنید","join_hide_controls":"پنهان کردن","join_sound":"برای صدا ضربه بزنید","rp_unmute":"صدا روشن","rp_mute":"بی‌صدا","join_no_sound":"در این مرورگر صدا پخش نمی‌شود","join_exit_fullscreen":"خروج از تمام‌صفحه","pad_fill":"تمام‌صفحه","join_leave":"خروج","join_show_controls":"نمایش کنترل‌ها","join_hold_hint":"برای نمایش دکمه‌ها، تصویر را لمس کرده و نگه دارید","pad_watch_no_hevc":"این دستگاه نمی‌تواند تصویر این استریم را پخش کند: کامپیوتر HEVC می‌فرستد و این دستگاه فقط H.264 پخش می‌کند.","pad_watch_decode":"تصویر اینجا پخش نشد.","join_pad_ready":"دستهٔ شما آماده است","join_check_unknown_short":"در فهرست ما نیست: ممکن است دکمه‌ها جابه‌جا باشند.","join_full_to_play":"برای بازی با دسته روی صفحه، تمام‌صفحه را بزنید.","join_pad_none":"یک دسته وصل کنید (USB یا Bluetooth) و هر دکمه‌ای را بزنید.","join_pad_keys":"یا از صفحه‌کلید استفاده کنید: WASD حرکت، کلیدهای جهت D-pad، Enter ✕، Backspace ○، Q □، E △، Tab Options.","join_tv_back_hint":"برای دیدن دکمه‌ها، روی کنترل از راه دور دکمهٔ بازگشت را بزنید.","join_block_note":"{host} دکمه‌های PS و Create را برای دوستان خاموش کرده است.","join_guide_title":"یک قدم دیگر روی تلویزیون","join_guide_body":"یک بار PS را روی دسته‌تان بزنید. تلویزیون می‌پرسد «چه کسی از این دسته استفاده می‌کند؟». «بازی سریع» یا کاربر خودتان را انتخاب کنید. میزبان لازم نیست کاری بکند.","join_guide_menus":"در صفحه اصلی PS5 فقط میزبان منوها را کنترل می‌کند؛ دسته شما داخل بازی‌ها بازی می‌کند.","join_guide_ok":"متوجه شدم","join_host_away":"میزبان بازی را متوقف کرد — در انتظار شروع دوباره ({time})","join_reconnecting":"در حال اتصال دوباره…","join_reconnecting_left":"جای شما تا {time} نگه داشته می‌شود.","pad_turn":"گوشی را افقی کنید","join_game_label":"بازی {host}","join_title":"پیوستن به بازی یک دوست","join_title_body":"روی PS5 {host} به‌عنوان بازیکن ۲، ۳ یا ۴ بازی کنید.","join_name_label":"نام شما","join_name_hint":"وقتی درخواست پیوستن بدهید، دوستتان این را می‌بیند.","join_button":"پیوستن"},"fr":{"usb_skipped_not_payload":"{name} : pas un fichier .elf ou .bin","usb_skipped_unknown":"{id} : n'est plus dans la liste des payloads","browser_unsupported":"Il faut l'application de bureau. Cela ne fonctionne pas dans le navigateur.","video_recovered_notice":"Play a planté au démarrage de l'image la dernière fois : l'image est donc maintenant décodée sans la carte graphique (modifiable dans Paramètres › Fenêtre › Graphismes › Décodage vidéo matériel).","video_recovered_title":"Image désormais décodée par logiciel","open_in_title":"Ouvrir dans l’app PS5Upload ?","open_in_body":"Vous avez l’app PS5Upload sur cet appareil ? Ouvrez ceci dedans, ou continuez dans le navigateur.","open_in_app":"Ouvrir dans l’app","open_in_browser":"Continuer dans le navigateur","open_in_remember":"Retenir mon choix sur cet appareil","open_in_opening":"Ouverture de l’app PS5Upload…","open_in_not_opened":"Rien ne s’est passé ? L’app n’est peut-être pas sur cet appareil.","open_in_again":"Réessayer","pad_8bitdo_no_xinput":"Cette manette 8BitDo n'a pas de mode X-input. Si un bouton ne correspond pas, vérifiez la manette.","pad_8bitdo_how_switch":"mettez l'interrupteur à l'arrière sur X, puis appuyez sur Start","pad_8bitdo_how_startx":"éteignez-la, puis maintenez Start + X pour l'allumer","pad_8bitdo_how_receiver":"utilisez son récepteur 2.4G ou un câble USB","pad_8bitdo_how_manual":"son manuel explique comment","pad_8bitdo_xinput":"Pour un meilleur résultat, passez votre 8BitDo en mode X-input : {how}.","rp_touch_left_stick":"Joystick gauche","rp_touch_right_stick":"Joystick droit","rp_touch_touchpad":"Pavé tactile","rp_pad_step_lx":"Poussez le stick gauche vers la droite","rp_pad_step_ly":"Poussez le stick gauche vers le bas","rp_pad_step_rx":"Poussez le stick droit vers la droite","rp_pad_step_ry":"Poussez le stick droit vers le bas","join_check_bottom":"Appuyez sur le bouton du bas (✕)","join_check_right":"Appuyez sur le bouton de droite (○)","join_check_left":"Appuyez sur le bouton de gauche (□)","join_check_top":"Appuyez sur le bouton du haut (△)","rp_pad_press":"Appuyez sur {name}","join_check_saved":"Enregistré pour cette manette sur cet appareil. Essayez-la ci-dessous.","join_check_title":"Vérifier la manette","join_done":"Terminé","rp_pads_none":"Aucune manette détectée. Connectez-en une et appuyez sur n'importe quel bouton.","rp_pad_mapped":"Joue avec votre configuration","join_check_unknown":"Cette manette n'est pas dans notre liste, ses boutons peuvent donc être inversés. La configurer ne prend que quelques secondes.","rp_pad_standard":"Reconnue","rp_pad_progress":"{n} sur {total}","rp_pad_skip":"Passer","rp_pad_back":"Retour","rp_pad_cancel":"Annuler","join_check_try":"Appuyez sur des boutons et bougez les sticks : ce que vous pressez s'allume.","join_check_redo":"Refaire","join_check_map":"Configurer les boutons","rp_pad_reset":"Réinitialiser","join_open_lan_body":"Pas d'accès à Internet ? Si vous êtes sur le même Wi-Fi que votre ami, ouvrez la partie par là.","join_open_lan":"Ouvrir sur ce Wi-Fi","join_path_lan":"Réseau domestique","join_seat_taken":"{host} avait besoin de récupérer sa manette et aucune autre manette n'était libre sur la PS5 : vous avez quitté la partie. Demandez à {host} de vous laisser revenir.","join_refused_key":"Cette invitation a expiré. Demandez un nouveau lien à {host}.","join_refused_expired":"Votre place dans la partie est perdue. Demandez à {host} de vous laisser revenir.","join_refused_full":"La partie est pleine : il y a déjà quatre joueurs.","join_refused_denied":"{host} ne vous a pas laissé entrer cette fois.","join_refused_no_answer":"{host} n'a pas répondu à temps. Prévenez {host}, puis réessayez.","join_refused_closed":"{host} n'organise pas de Jouer ensemble pour le moment.","join_refused_old_helper":"La PS5 de {host} a besoin d'un assistant à jour pour Jouer ensemble.","join_refused_not_playing":"{host} ne joue pas en ce moment. Demandez d'abord à {host} de lancer Jouer.","join_refused_unreachable":"L'ordinateur de {host} n'a pas pu joindre sa PS5. Réessayez dans un instant.","join_refused_slow_down":"Trop de codes erronés. Attendez une minute, puis réessayez.","join_refused_address":"L'adresse de ce lien est hors de ton réseau domestique, l'application ne l'utilisera donc pas. Demande à {host} un lien avec l'adresse IP de son ordinateur.","join_refused_other":"{host} ne vous a pas laissé entrer.","join_ended_kicked":"{host} vous a retiré de la partie.","join_ended_closed":"{host} a fermé Jouer ensemble.","join_ended_host_stopped":"L'hôte a arrêté de jouer.","join_ended_replaced":"Cette partie a été ouverte dans un autre onglet ou sur un autre appareil, elle s'est donc arrêtée ici.","join_ended_pad_lost":"La PS5 a perdu votre manette, vous êtes donc sorti de la partie. Demandez à {host} de vous laisser revenir.","join_ended_gave_up":"La connexion à {host} n'est pas revenue à temps.","join_net_lost":"La connexion à {host} a été coupée. Vérifiez votre connexion Internet, puis redemandez.","join_ended_lost":"Impossible de joindre {host}. Vérifiez que vous êtes sur le même réseau.","join_ended_left":"Vous avez quitté la partie.","join_net_mismatch":"Ce lien ne correspond pas à l'hôte ; demandez-lui-en un nouveau.","join_net_no_direct":"Une connexion directe est impossible depuis ce réseau (les routeurs des deux côtés sont stricts). Essayez le Wi-Fi plutôt que les données mobiles, ou demandez à l'hôte d'activer l'UPnP.","join_net_no_room":"Cette invitation n'est plus ouverte. Demandez un nouveau lien à {host}.","join_net_full":"La partie de {host} n'a pas de place pour un autre ami pour le moment. Réessayez dans un instant.","join_net_no_hub":"Impossible de joindre le service d'invitations de PS5Upload. Vérifiez votre connexion internet, puis réessayez.","join_net_offer":"L'ordinateur de {host} n'a pas pu se connecter à ce navigateur. Essayez un autre navigateur.","join_net_no_webrtc":"Ce navigateur ne peut pas établir de connexions directes. Essayez une version récente de Chrome, Safari ou Firefox.","join_cancel":"Annuler","join_host_fallback":"votre ami","join_connecting":"Connexion à {host}…","join_waiting":"En attente que {host} vous laisse entrer","join_waiting_body":"{host} voit votre nom à l'écran et appuie sur Autoriser.","join_retry":"Réessayer","join_again":"Redemander à rejoindre","join_playing_at":"En jeu chez {host}","join_you_are":"Vous êtes le joueur {n}","join_seat_stream":"Vous jouez avec l'utilisateur PS5 de {host}. Inutile d'en choisir un.","join_plays_as":"Vous jouez en tant que {profile}. Inutile d'en choisir un.","join_seat_tv_asks":"{host} a choisi un profil pour vous, mais il n'a pas pu être utilisé. La TV va vous demander qui vous êtes.","join_picking":"Appuyez sur PS, puis choisissez Jeu rapide sur la télé","join_hide_controls":"Masquer","join_sound":"Touchez pour le son","rp_unmute":"Son activé","rp_mute":"Couper le son","join_no_sound":"Pas de son dans ce navigateur","join_exit_fullscreen":"Quitter le plein écran","pad_fill":"Plein écran","join_leave":"Quitter","join_show_controls":"Afficher les commandes","join_hold_hint":"Maintenez l'image appuyée pour afficher les boutons","pad_watch_no_hevc":"Cet appareil ne peut pas lire l'image de ce stream : l'ordinateur diffuse en HEVC et cet appareil ne lit que le H.264.","pad_watch_decode":"L'image n'a pas pu être lue ici.","join_pad_ready":"Votre manette est prête","join_check_unknown_short":"Pas dans notre liste : les boutons peuvent être inversés.","join_full_to_play":"Touchez plein écran pour jouer avec la manette à l'écran.","join_pad_none":"Branchez une manette (USB ou Bluetooth) et appuyez sur un bouton.","join_pad_keys":"Ou utilisez le clavier : ZQSD/WASD pour bouger, flèches croix directionnelle, Entrée ✕, Retour arrière ○, Q □, E △, Tab Options.","join_tv_back_hint":"Appuyez sur Retour sur la télécommande pour afficher les boutons.","join_block_note":"{host} a désactivé PS et Create pour les amis.","join_guide_title":"Encore une étape sur la télé","join_guide_body":"Appuyez une fois sur PS sur votre manette. La télé demande « Qui utilise cette manette ? ». Choisissez Jeu rapide ou votre propre utilisateur. L'hôte n'a rien à faire.","join_guide_menus":"Sur l'écran d'accueil de la PS5, seul l'hôte contrôle les menus ; votre manette joue dans les jeux.","join_guide_ok":"Compris","join_host_away":"L'hôte a arrêté de jouer — en attente de sa reprise ({time})","join_reconnecting":"Reconnexion…","join_reconnecting_left":"Votre place est gardée pendant {time}.","pad_turn":"Tournez le téléphone à l'horizontale","join_game_label":"Partie de {host}","join_title":"Rejoindre la partie d'un ami","join_title_body":"Jouez sur la PS5 de {host} en tant que joueur 2, 3 ou 4.","join_name_label":"Votre nom","join_name_hint":"Votre ami le verra quand vous demanderez à rejoindre.","join_button":"Rejoindre"},"hi":{"usb_skipped_not_payload":"{name}: .elf या .bin फ़ाइल नहीं है","usb_skipped_unknown":"{id}: अब पेलोड सूची में नहीं है","browser_unsupported":"इसके लिए डेस्कटॉप ऐप चाहिए। यह ब्राउज़र में काम नहीं करता।","video_recovered_notice":"पिछली बार तस्वीर शुरू करते समय खेलें क्रैश हो गया था, इसलिए तस्वीर अब ग्राफ़िक्स कार्ड के बिना डिकोड होती है (बदलने के लिए सेटिंग्स › विंडो › ग्राफ़िक्स › हार्डवेयर वीडियो डिकोडिंग)।","video_recovered_title":"तस्वीर अब सॉफ़्टवेयर से डिकोड होती है","open_in_title":"PS5Upload ऐप में खोलें?","open_in_body":"क्या इस डिवाइस पर PS5Upload ऐप है? इसे वहाँ खोलें, या ब्राउज़र में ही जारी रखें।","open_in_app":"ऐप में खोलें","open_in_browser":"ब्राउज़र में जारी रखें","open_in_remember":"इस डिवाइस पर मेरी पसंद याद रखें","open_in_opening":"PS5Upload ऐप खुल रहा है…","open_in_not_opened":"कुछ नहीं हुआ? शायद इस डिवाइस पर ऐप नहीं है।","open_in_again":"फिर कोशिश करें","pad_8bitdo_no_xinput":"इस 8BitDo में X-input मोड नहीं है। अगर कोई बटन गलत है, तो कंट्रोलर जाँचें।","pad_8bitdo_how_switch":"पीछे का स्विच X पर करें, फिर Start दबाएँ","pad_8bitdo_how_startx":"इसे बंद करें, फिर Start + X दबाकर रखें ताकि यह चालू हो","pad_8bitdo_how_receiver":"इसका 2.4G रिसीवर या USB केबल इस्तेमाल करें","pad_8bitdo_how_manual":"इसकी मैनुअल में तरीका दिया है","pad_8bitdo_xinput":"सबसे अच्छे नतीजे के लिए अपने 8BitDo को X-input मोड में करें: {how}।","rp_touch_left_stick":"बायाँ स्टिक","rp_touch_right_stick":"दायाँ स्टिक","rp_touch_touchpad":"टचपैड","rp_menu":"मेनू","rp_pad_step_lx":"बायाँ स्टिक दाईं ओर धकेलें","rp_pad_step_ly":"बायाँ स्टिक नीचे धकेलें","rp_pad_step_rx":"दायाँ स्टिक दाईं ओर धकेलें","rp_pad_step_ry":"दायाँ स्टिक नीचे धकेलें","join_check_bottom":"नीचे वाला फ़ेस बटन दबाएँ (✕)","join_check_right":"दाईं ओर वाला फ़ेस बटन दबाएँ (○)","join_check_left":"बाईं ओर वाला फ़ेस बटन दबाएँ (□)","join_check_top":"ऊपर वाला फ़ेस बटन दबाएँ (△)","rp_pad_press":"{name} दबाएँ","join_check_saved":"इस डिवाइस पर इस कंट्रोलर के लिए सेव हो गया। नीचे आज़माएँ।","join_check_title":"अपना कंट्रोलर जाँचें","join_done":"हो गया","rp_pads_none":"अभी तक कोई कंट्रोलर नहीं दिखा। एक कनेक्ट करें और उस पर कोई भी बटन दबाएँ।","rp_pad_mapped":"आपकी मैपिंग से खेलता है","join_check_unknown":"यह कंट्रोलर हमारी सूची में नहीं है, इसलिए इसके बटन आपस में बदले हो सकते हैं। सेट अप करने में कुछ सेकंड लगते हैं।","rp_pad_standard":"पहचाना गया","rp_pad_progress":"{total} में से {n}","rp_pad_skip":"छोड़ें","rp_pad_back":"वापस","rp_pad_cancel":"रद्द करें","join_check_try":"बटन दबाएँ और स्टिक हिलाएँ: जो दबाएँगे वह जल उठेगा।","join_check_redo":"फिर से करें","join_check_map":"बटन सेट करें","rp_pad_reset":"रीसेट करें","join_open_lan_body":"इंटरनेट नहीं मिल रहा? अगर आप दोस्त वाले Wi-Fi पर ही हैं, तो गेम वहीं खोलें।","join_open_lan":"इसी Wi-Fi पर खोलें","join_path_lan":"होम नेटवर्क","join_path_internet":"इंटरनेट","join_seat_taken":"{host} को अपना कंट्रोलर वापस चाहिए था और PS5 पर कोई दूसरा कंट्रोलर खाली नहीं था, इसलिए आप गेम से बाहर हो गए। {host} से फिर से अंदर आने देने को कहें।","join_refused_key":"इस न्योते की समय-सीमा खत्म हो गई है। {host} से नया लिंक माँगें।","join_refused_expired":"गेम में आपकी जगह चली गई। {host} से फिर अंदर लेने को कहें।","join_refused_full":"गेम भर गया है: पहले से चार प्लेयर हैं।","join_refused_denied":"{host} ने इस बार आपको अंदर नहीं आने दिया।","join_refused_no_answer":"{host} ने समय पर जवाब नहीं दिया। {host} को बताएँ, फिर कोशिश करें।","join_refused_closed":"{host} अभी 'साथ खेलें' नहीं चला रहे हैं।","join_refused_old_helper":"'साथ खेलें' के लिए {host} के PS5 को अपडेटेड हेल्पर चाहिए।","join_refused_not_playing":"{host} अभी नहीं खेल रहे हैं। {host} से पहले खेलें शुरू करने को कहें।","join_refused_unreachable":"{host} का कंप्यूटर उनके PS5 तक नहीं पहुँच सका। थोड़ी देर में फिर कोशिश करें।","join_refused_slow_down":"बहुत सारे गलत कोड। एक मिनट रुकें, फिर कोशिश करें।","join_refused_address":"इस लिंक का पता आपके होम नेटवर्क से बाहर है, इसलिए ऐप इसका उपयोग नहीं करेगा। {host} से उनके कंप्यूटर के IP पते वाला लिंक माँगें।","join_refused_other":"{host} ने आपको अंदर नहीं आने दिया।","join_ended_kicked":"{host} ने आपको गेम से हटा दिया।","join_ended_closed":"{host} ने 'साथ खेलें' बंद कर दिया।","join_ended_host_stopped":"होस्ट ने खेलना बंद कर दिया।","join_ended_replaced":"यह गेम किसी दूसरे टैब या डिवाइस पर खुल गया, इसलिए यहाँ रुक गया।","join_ended_pad_lost":"PS5 ने आपका कंट्रोलर खो दिया, इसलिए आप गेम से बाहर हैं। {host} से फिर अंदर लेने को कहें।","join_ended_gave_up":"{host} से कनेक्शन समय पर वापस नहीं आया।","join_net_lost":"{host} से कनेक्शन टूट गया। अपना इंटरनेट कनेक्शन जाँचें, फिर दोबारा पूछें।","join_ended_lost":"{host} तक नहीं पहुँच सके। देखें कि आप एक ही नेटवर्क पर हैं।","join_ended_left":"आपने गेम छोड़ दिया।","join_net_mismatch":"यह लिंक होस्ट से मेल नहीं खाता; उनसे नया लिंक माँगें।","join_net_no_direct":"इस नेटवर्क से सीधा कनेक्शन संभव नहीं है (दोनों तरफ़ के राउटर सख़्त हैं)। मोबाइल डेटा की जगह Wi-Fi आज़माएँ, या होस्ट से UPnP चालू करने को कहें।","join_net_no_room":"यह न्योता अब खुला नहीं है। {host} से नया लिंक माँगें।","join_net_full":"{host} के गेम में अभी एक और दोस्त की जगह नहीं है। थोड़ी देर में फिर कोशिश करें।","join_net_no_hub":"PS5Upload न्योता सेवा तक नहीं पहुँच सके। अपना इंटरनेट कनेक्शन जाँचें, फिर कोशिश करें।","join_net_offer":"{host} का कंप्यूटर इस ब्राउज़र से कनेक्ट नहीं हो सका। कोई दूसरा ब्राउज़र आज़माएँ।","join_net_no_webrtc":"यह ब्राउज़र सीधे कनेक्शन नहीं बना सकता। Chrome, Safari या Firefox का नया संस्करण आज़माएँ।","join_cancel":"रद्द करें","join_host_fallback":"आपका दोस्त","join_connecting":"{host} से जुड़ रहे हैं…","join_waiting":"{host} के अंदर आने देने का इंतज़ार","join_waiting_body":"{host} अपनी स्क्रीन पर आपका नाम देखकर 'अनुमति दें' पर टैप करेंगे।","join_retry":"फिर कोशिश करें","join_again":"फिर से जुड़ने के लिए पूछें","join_playing_at":"{host} के यहाँ खेल रहे हैं","join_you_are":"आप प्लेयर {n} हैं","join_seat_stream":"आप {host} के PS5 यूज़र के रूप में खेल रहे हैं। यूज़र चुनने की ज़रूरत नहीं।","join_plays_as":"आप {profile} के रूप में खेल रहे हैं। कुछ चुनने की ज़रूरत नहीं।","join_seat_tv_asks":"{host} ने आपके लिए एक प्रोफ़ाइल चुनी थी, पर वह इस्तेमाल नहीं हो सकी। टीवी पूछेगा कि आप कौन हैं।","join_picking":"PS दबाएँ, फिर TV पर क्विक प्ले चुनें","join_hide_controls":"छिपाएँ","join_sound":"आवाज़ के लिए टैप करें","rp_unmute":"ध्वनि चालू","rp_mute":"म्यूट","join_no_sound":"इस ब्राउज़र में आवाज़ नहीं है","join_exit_fullscreen":"फ़ुल स्क्रीन से बाहर निकलें","pad_fill":"फ़ुल स्क्रीन","join_leave":"छोड़ें","join_show_controls":"कंट्रोल दिखाएं","join_hold_hint":"बटन दिखाने के लिए तस्वीर को दबाकर रखें","pad_watch_no_hevc":"यह डिवाइस इस स्ट्रीम की तस्वीर नहीं चला सकता: कंप्यूटर HEVC में स्ट्रीम करता है और यह डिवाइस सिर्फ़ H.264 चलाता है।","pad_watch_decode":"तस्वीर यहाँ नहीं चल सकी।","join_pad_ready":"आपका कंट्रोलर तैयार है","join_check_unknown_short":"हमारी सूची में नहीं: बटन बदले हुए हो सकते हैं।","join_full_to_play":"ऑन-स्क्रीन कंट्रोलर से खेलने के लिए फ़ुल स्क्रीन पर टैप करें।","join_pad_none":"कंट्रोलर जोड़ें (USB या Bluetooth) और कोई भी बटन दबाएँ।","join_pad_keys":"या कीबोर्ड इस्तेमाल करें: WASD चलना, ऐरो D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options।","join_tv_back_hint":"बटन देखने के लिए रिमोट पर Back दबाएँ।","join_block_note":"{host} ने दोस्तों के लिए PS और Create बंद कर दिए हैं।","join_guide_title":"TV पर एक और कदम","join_guide_body":"अपने कंट्रोलर पर एक बार PS दबाएँ। TV पूछेगा \"यह कंट्रोलर कौन इस्तेमाल कर रहा है?\"। क्विक प्ले या अपना यूज़र चुनें। होस्ट को कुछ नहीं करना है।","join_guide_menus":"PS5 की होम स्क्रीन पर सिर्फ़ होस्ट मेन्यू चलाता है; आपका कंट्रोलर गेम के अंदर खेलता है।","join_guide_ok":"ठीक है","join_host_away":"होस्ट ने खेलना बंद कर दिया — उनके फिर से शुरू करने का इंतज़ार ({time})","join_reconnecting":"फिर से जुड़ रहे हैं…","join_reconnecting_left":"आपकी जगह {time} तक रखी जाएगी।","pad_turn":"फ़ोन को आड़ा घुमाएँ","join_game_label":"{host} का गेम","join_title":"दोस्त के गेम में जुड़ें","join_title_body":"{host} के PS5 पर प्लेयर 2, 3 या 4 बनकर खेलें।","join_name_label":"आपका नाम","join_name_hint":"जुड़ने के लिए पूछने पर आपका दोस्त यह देखेगा।","join_button":"जुड़ें"},"hu":{"usb_skipped_not_payload":"{name}: nem .elf vagy .bin fájl","usb_skipped_unknown":"{id}: már nincs a payloadok listáján","browser_unsupported":"Ehhez az asztali alkalmazás kell. Böngészőben nem működik.","video_recovered_notice":"Legutóbb a Play összeomlott a kép indításakor, ezért a kép mostantól videokártya nélkül dekódolódik (módosítás: Beállítások › Ablak › Grafika › Hardveres videódekódolás).","video_recovered_title":"A kép mostantól szoftveresen dekódolódik","open_in_title":"Megnyitod a PS5Upload appban?","open_in_body":"Megvan a PS5Upload app ezen az eszközön? Nyisd meg ott, vagy folytasd a böngészőben.","open_in_app":"Megnyitás az appban","open_in_browser":"Folytatás a böngészőben","open_in_remember":"Választásom megjegyzése ezen az eszközön","open_in_opening":"A PS5Upload app megnyitása…","open_in_not_opened":"Nem történt semmi? Lehet, hogy az app nincs ezen az eszközön.","open_in_again":"Újra","pad_8bitdo_no_xinput":"Ennek a 8BitDo-nak nincs X-input módja. Ha egy gomb rossz, ellenőrizd a kontrollert.","pad_8bitdo_how_switch":"állítsd a hátsó kapcsolót X-re, majd nyomd meg a Start gombot","pad_8bitdo_how_startx":"kapcsold ki, majd a Start + X nyomva tartásával kapcsold be","pad_8bitdo_how_receiver":"használd a 2.4G vevőjét vagy egy USB-kábelt","pad_8bitdo_how_manual":"a kézikönyve leírja, hogyan","pad_8bitdo_xinput":"A legjobb eredményért kapcsold a 8BitDo-t X-input módba: {how}.","rp_touch_left_stick":"Bal kar","rp_touch_right_stick":"Jobb kar","rp_touch_touchpad":"Érintőpad","rp_menu":"Menü","rp_pad_step_lx":"Told a bal kart jobbra","rp_pad_step_ly":"Told a bal kart lefelé","rp_pad_step_rx":"Told a jobb kart jobbra","rp_pad_step_ry":"Told a jobb kart lefelé","join_check_bottom":"Nyomd meg az alsó előlapi gombot (✕)","join_check_right":"Nyomd meg a jobb oldali előlapi gombot (○)","join_check_left":"Nyomd meg a bal oldali előlapi gombot (□)","join_check_top":"Nyomd meg a felső előlapi gombot (△)","rp_pad_press":"Nyomd meg: {name}","join_check_saved":"Elmentve ehhez a kontrollerhez ezen az eszközön. Próbáld ki lent.","join_check_title":"Kontroller ellenőrzése","join_done":"Kész","rp_pads_none":"Még nem látható kontroller. Csatlakoztass egyet, és nyomd meg bármelyik gombját.","rp_pad_mapped":"A saját kiosztásoddal játszik","join_check_unknown":"Ez a kontroller nincs a listánkon, így a gombjai összekeveredhetnek. A beállítás csak pár másodperc.","rp_pad_standard":"Felismerve","rp_pad_progress":"{n} / {total}","rp_pad_skip":"Kihagyás","rp_pad_back":"Vissza","rp_pad_cancel":"Mégse","join_check_try":"Nyomj gombokat és mozgasd a karokat: amit megnyomsz, az felvillan.","join_check_redo":"Újra","join_check_map":"Gombok beállítása","rp_pad_reset":"Visszaállítás","join_open_lan_body":"Nem éred el az internetet? Ha ugyanazon a Wi-Fin vagy, mint a barátod, ott nyisd meg a játékot.","join_open_lan":"Megnyitás ezen a Wi-Fin","join_path_lan":"Otthoni hálózat","join_seat_taken":"{host} visszakérte a kontrollerét, és a PS5-ön nem volt más szabad kontroller, ezért kikerültél a játékból. Kérd meg {host} játékost, hogy engedjen be újra.","join_refused_key":"Ez a meghívó lejárt. Kérj új linket tőle: {host}.","join_refused_expired":"Elveszett a helyed a játékban. Kérd meg {host} felhasználót, hogy engedjen be újra.","join_refused_full":"A játék megtelt: már négy játékos van bent.","join_refused_denied":"{host} most nem engedett be.","join_refused_no_answer":"{host} nem válaszolt időben. Szólj neki ({host}), majd próbáld újra.","join_refused_closed":"{host} most nem indított Közös játékot.","join_refused_old_helper":"{host} PS5-jének frissített segédprogram kell a Közös játékhoz.","join_refused_not_playing":"{host} most nem játszik. Kérd meg, hogy előbb indítsa el a Játékot ({host}).","join_refused_unreachable":"{host} számítógépe nem érte el a PS5-öt. Próbáld újra egy kicsit később.","join_refused_slow_down":"Túl sok hibás kód. Várj egy percet, aztán próbáld újra.","join_refused_address":"A hivatkozás címe kívül esik az otthoni hálózatodon, ezért az alkalmazás nem használja. Kérj {host} felhasználótól olyan hivatkozást, amely a számítógépe IP-címét tartalmazza.","join_refused_other":"{host} nem engedett be.","join_ended_kicked":"{host} kivett a játékból.","join_ended_closed":"{host} bezárta a Közös játékot.","join_ended_host_stopped":"A házigazda abbahagyta a játékot.","join_ended_replaced":"Ezt a játékot egy másik lapon vagy eszközön nyitották meg, ezért itt leállt.","join_ended_pad_lost":"A PS5 elvesztette a kontrollered, ezért kikerültél a játékból. Kérd meg {host} felhasználót, hogy engedjen be újra.","join_ended_gave_up":"A kapcsolat {host} felé nem állt helyre időben.","join_net_lost":"Megszakadt a kapcsolat ezzel: {host}. Ellenőrizd az internetkapcsolatod, aztán kérd újra.","join_ended_lost":"{host} nem érhető el. Ellenőrizd, hogy ugyanazon a hálózaton vagytok-e.","join_ended_left":"Kiléptél a játékból.","join_net_mismatch":"Ez a link nem egyezik a házigazdával; kérj tőle újat.","join_net_no_direct":"Erről a hálózatról nem lehet közvetlen kapcsolatot létrehozni (mindkét oldal routere szigorú). Próbáld Wi-Fi-vel mobilnet helyett, vagy kérd meg a házigazdát, hogy kapcsolja be az UPnP-t.","join_net_no_room":"Ez a meghívó már nem érvényes. Kérj új linket {host} felhasználótól.","join_net_full":"{host} játékában most nincs hely egy újabb barátnak. Próbáld újra egy kicsit később.","join_net_no_hub":"A PS5Upload meghívószolgáltatása nem érhető el. Ellenőrizd az internetkapcsolatot, majd próbáld újra.","join_net_offer":"{host} számítógépe nem tudott kapcsolódni ehhez a böngészőhöz. Próbálj ki egy másik böngészőt.","join_net_no_webrtc":"Ez a böngésző nem tud közvetlen kapcsolatot létrehozni. Próbáld egy friss Chrome-mal, Safarival vagy Firefoxszal.","join_cancel":"Mégse","join_host_fallback":"a barátod","join_connecting":"Csatlakozás ehhez: {host}…","join_waiting":"Várakozás, amíg {host} beenged","join_waiting_body":"{host} látja a neved a képernyőjén, és az Engedélyezésre koppint.","join_retry":"Újra","join_again":"Csatlakozás kérése újra","join_playing_at":"Játék itt: {host}","join_you_are":"Te vagy a(z) {n}. játékos","join_seat_stream":"{host} PS5-felhasználójaként játszol. Nem kell felhasználót választanod.","join_plays_as":"{profile} néven játszol. Nem kell választanod.","join_seat_tv_asks":"{host} választott neked egy profilt, de nem lehetett használni. A tévé megkérdezi, ki vagy.","join_picking":"Nyomd meg a PS gombot, aztán a tévén válaszd a Gyors játékot","join_hide_controls":"Elrejtés","join_sound":"Koppints a hanghoz","rp_unmute":"Hang be","rp_mute":"Némítás","join_no_sound":"Ebben a böngészőben nincs hang","join_exit_fullscreen":"Kilépés a teljes képernyőből","pad_fill":"Teljes képernyő","join_leave":"Kilépés","join_show_controls":"Vezérlők megjelenítése","join_hold_hint":"A gombok megjelenítéséhez tartsd lenyomva a képet","pad_watch_no_hevc":"Ez az eszköz nem tudja lejátszani ennek a streamnek a képét: a számítógép HEVC-ben streamel, ez az eszköz csak H.264-et játszik le.","pad_watch_decode":"A képet itt nem sikerült lejátszani.","join_pad_ready":"A kontrollered készen áll","join_check_unknown_short":"Nincs a listánkon: a gombok összekeveredhetnek.","join_full_to_play":"Koppints a Teljes képernyő gombra, hogy a képernyős kontrollerrel játssz.","join_pad_none":"Csatlakoztass egy kontrollert (USB vagy Bluetooth), és nyomj meg egy gombot.","join_pad_keys":"Vagy használd a billentyűzetet: WASD mozgás, nyilak D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"A gombokhoz nyomd meg a távirányítón a Vissza gombot.","join_block_note":"{host} kikapcsolta a PS és Create gombot a barátoknak.","join_guide_title":"Még egy lépés a tévén","join_guide_body":"Nyomd meg egyszer a PS gombot a kontrollereden. A tévé megkérdezi: „Ki használja ezt a kontrollert?”. Válaszd a Gyors játékot vagy a saját felhasználódat. A házigazdának semmit sem kell tennie.","join_guide_menus":"A PS5 kezdőképernyőjén csak a házigazda kezeli a menüket; a te kontrollered a játékokban működik.","join_guide_ok":"Értem","join_host_away":"A házigazda abbahagyta a játékot – várjuk, hogy újra elkezdje ({time})","join_reconnecting":"Újracsatlakozás…","join_reconnecting_left":"A helyed még {time} ideig fenntartjuk.","pad_turn":"Fordítsd el a telefont fekvőre","join_game_label":"{host} játéka","join_title":"Csatlakozás egy barát játékához","join_title_body":"Játssz {host} PS5-jén 2., 3. vagy 4. játékosként.","join_name_label":"A neved","join_name_hint":"A barátod ezt látja, amikor csatlakozni szeretnél.","join_button":"Csatlakozás"},"id":{"usb_skipped_not_payload":"{name}: bukan file .elf atau .bin","usb_skipped_unknown":"{id}: tidak ada lagi di daftar payload","browser_unsupported":"Ini memerlukan aplikasi desktop. Tidak berfungsi di browser.","video_recovered_notice":"Terakhir kali Play crash saat memulai gambar, jadi gambar kini didekode tanpa kartu grafis (ubah di Pengaturan › Jendela › Grafis › Dekode video perangkat keras).","video_recovered_title":"Gambar kini didekode oleh perangkat lunak","open_in_title":"Buka di aplikasi PS5Upload?","open_in_body":"Punya aplikasi PS5Upload di perangkat ini? Buka di sana, atau lanjutkan di browser.","open_in_app":"Buka di aplikasi","open_in_browser":"Lanjutkan di browser","open_in_remember":"Ingat pilihan saya di perangkat ini","open_in_opening":"Membuka aplikasi PS5Upload…","open_in_not_opened":"Tidak terjadi apa-apa? Mungkin aplikasinya tidak ada di perangkat ini.","open_in_again":"Coba lagi","pad_8bitdo_no_xinput":"8BitDo ini tidak punya mode X-input. Jika ada tombol yang salah, periksa kontrolernya.","pad_8bitdo_how_switch":"geser sakelar di belakang ke X, lalu tekan Start","pad_8bitdo_how_startx":"matikan, lalu tahan Start + X untuk menyalakannya","pad_8bitdo_how_receiver":"gunakan receiver 2.4G-nya atau kabel USB","pad_8bitdo_how_manual":"caranya ada di buku panduannya","pad_8bitdo_xinput":"Untuk hasil terbaik, ubah 8BitDo kamu ke mode X-input: {how}.","rp_touch_left_stick":"Stik kiri","rp_touch_right_stick":"Stik kanan","rp_pad_step_lx":"Dorong stik kiri ke kanan","rp_pad_step_ly":"Dorong stik kiri ke bawah","rp_pad_step_rx":"Dorong stik kanan ke kanan","rp_pad_step_ry":"Dorong stik kanan ke bawah","join_check_bottom":"Tekan tombol muka bawah (✕)","join_check_right":"Tekan tombol muka kanan (○)","join_check_left":"Tekan tombol muka kiri (□)","join_check_top":"Tekan tombol muka atas (△)","rp_pad_press":"Tekan {name}","join_check_saved":"Disimpan untuk kontroler ini di perangkat ini. Coba di bawah.","join_check_title":"Periksa kontrolermu","join_done":"Selesai","rp_pads_none":"Belum ada kontroler terdeteksi. Sambungkan satu dan tekan tombol apa saja.","rp_pad_mapped":"Bermain dengan pemetaan Anda","join_check_unknown":"Kontroler ini tidak ada di daftar kami, jadi tombolnya bisa tertukar. Mengaturnya hanya butuh beberapa detik.","rp_pad_standard":"Dikenali","rp_pad_progress":"{n} dari {total}","rp_pad_skip":"Lewati","rp_pad_back":"Kembali","rp_pad_cancel":"Batal","join_check_try":"Tekan tombol dan gerakkan stik: yang kamu tekan akan menyala.","join_check_redo":"Ulangi","join_check_map":"Atur tombol","rp_pad_reset":"Atur ulang","join_open_lan_body":"Tidak bisa ke internet? Kalau kamu di Wi-Fi yang sama dengan temanmu, buka game-nya di sana.","join_open_lan":"Buka di Wi-Fi ini","join_path_lan":"Jaringan rumah","join_seat_taken":"{host} membutuhkan kontrolernya kembali dan tidak ada kontroler lain yang kosong di PS5, jadi Anda keluar dari permainan. Minta {host} untuk mengizinkan Anda masuk lagi.","join_refused_key":"Undangan ini sudah kedaluwarsa. Minta tautan baru ke {host}.","join_refused_expired":"Tempat Anda di permainan hilang. Minta {host} untuk memasukkan Anda lagi.","join_refused_full":"Game sudah penuh: sudah ada empat pemain.","join_refused_denied":"{host} tidak mengizinkan Anda masuk kali ini.","join_refused_no_answer":"{host} tidak menjawab tepat waktu. Beri tahu {host}, lalu coba lagi.","join_refused_closed":"{host} sedang tidak membuka Main Bareng.","join_refused_old_helper":"PS5 milik {host} perlu helper terbaru untuk Main Bareng.","join_refused_not_playing":"{host} sedang tidak main. Minta {host} memulai Main dulu.","join_refused_unreachable":"Komputer {host} tidak bisa menjangkau PS5-nya. Coba lagi sebentar lagi.","join_refused_slow_down":"Terlalu banyak kode yang salah. Tunggu satu menit, lalu coba lagi.","join_refused_address":"Alamat tautan ini berada di luar jaringan rumah Anda, jadi aplikasi tidak akan memakainya. Minta {host} tautan dengan alamat IP komputernya.","join_refused_other":"{host} tidak mengizinkan Anda masuk.","join_ended_kicked":"{host} mengeluarkan Anda dari game.","join_ended_closed":"{host} menutup Main Bareng.","join_ended_host_stopped":"Host berhenti main.","join_ended_replaced":"Permainan ini dibuka di tab atau perangkat lain, jadi berhenti di sini.","join_ended_pad_lost":"PS5 kehilangan kontroler Anda, jadi Anda keluar dari permainan. Minta {host} untuk memasukkan Anda lagi.","join_ended_gave_up":"Koneksi ke {host} tidak pulih tepat waktu.","join_net_lost":"Koneksi ke {host} terputus. Periksa koneksi internetmu, lalu minta lagi.","join_ended_lost":"Tidak bisa menjangkau {host}. Pastikan Anda di jaringan yang sama.","join_ended_left":"Anda keluar dari game.","join_net_mismatch":"Tautan ini tidak cocok dengan host; minta tautan baru kepadanya.","join_net_no_direct":"Koneksi langsung tidak mungkin dari jaringan ini (router kedua pihak ketat). Coba Wi-Fi alih-alih data seluler, atau minta host menyalakan UPnP.","join_net_no_room":"Undangan ini sudah tidak terbuka. Minta tautan baru kepada {host}.","join_net_full":"Permainan {host} tidak punya tempat untuk teman lain sekarang. Coba lagi sebentar lagi.","join_net_no_hub":"Tidak bisa menjangkau layanan undangan PS5Upload. Periksa koneksi internet Anda, lalu coba lagi.","join_net_offer":"Komputer {host} tidak bisa terhubung ke browser ini. Coba browser lain.","join_net_no_webrtc":"Browser ini tidak bisa membuat koneksi langsung. Coba Chrome, Safari, atau Firefox versi terbaru.","join_cancel":"Batal","join_host_fallback":"teman Anda","join_connecting":"Menghubungkan ke {host}…","join_waiting":"Menunggu {host} mengizinkan Anda masuk","join_waiting_body":"{host} melihat nama Anda di layarnya lalu mengetuk Izinkan.","join_retry":"Coba lagi","join_again":"Minta bergabung lagi","join_playing_at":"Main di tempat {host}","join_you_are":"Anda Pemain {n}","join_seat_stream":"Anda bermain sebagai pengguna PS5 {host}. Tidak perlu memilih pengguna.","join_plays_as":"Anda bermain sebagai {profile}. Tidak perlu memilih.","join_seat_tv_asks":"{host} memilihkan profil untuk Anda, tetapi tidak bisa dipakai. TV akan menanyakan siapa Anda.","join_picking":"Tekan PS, lalu pilih Main Cepat di TV","join_hide_controls":"Sembunyikan","join_sound":"Ketuk untuk suara","rp_unmute":"Suara aktif","rp_mute":"Bisukan","join_no_sound":"Tidak ada suara di browser ini","join_exit_fullscreen":"Keluar dari layar penuh","pad_fill":"Layar penuh","join_leave":"Keluar","join_show_controls":"Tampilkan kontrol","join_hold_hint":"Tekan dan tahan gambar untuk menampilkan tombol","pad_watch_no_hevc":"Perangkat ini tidak bisa memutar gambar stream ini: komputer mengirim HEVC, dan perangkat ini hanya memutar H.264.","pad_watch_decode":"Gambar tidak dapat diputar di sini.","join_pad_ready":"Kontroler Anda siap","join_check_unknown_short":"Tidak ada di daftar kami: tombol bisa tertukar.","join_full_to_play":"Ketuk Layar penuh untuk main dengan kontroler di layar.","join_pad_none":"Hubungkan kontroler (USB atau Bluetooth) lalu tekan tombol apa saja.","join_pad_keys":"Atau pakai keyboard: WASD gerak, panah D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Tekan Kembali di remote untuk menampilkan tombol.","join_block_note":"{host} mematikan PS dan Create untuk teman.","join_guide_title":"Satu langkah lagi di TV","join_guide_body":"Tekan PS sekali di kontroler Anda. TV bertanya \"Siapa yang memakai kontroler ini?\". Pilih Main Cepat atau pengguna Anda sendiri. Tuan rumah tidak perlu melakukan apa pun.","join_guide_menus":"Di layar beranda PS5 hanya host yang mengendalikan menu; kontroler Anda berfungsi di dalam game.","join_guide_ok":"Mengerti","join_host_away":"Host berhenti main — menunggu mereka mulai lagi ({time})","join_reconnecting":"Menyambung ulang…","join_reconnecting_left":"Tempat Anda disimpan selama {time}.","pad_turn":"Miringkan ponsel ke samping","join_game_label":"Game {host}","join_title":"Gabung ke game teman","join_title_body":"Main di PS5 milik {host} sebagai Pemain 2, 3, atau 4.","join_name_label":"Nama Anda","join_name_hint":"Teman Anda melihat nama ini saat Anda minta bergabung.","join_button":"Gabung"},"it":{"usb_skipped_not_payload":"{name}: non è un file .elf o .bin","usb_skipped_unknown":"{id}: non è più nell'elenco dei payload","browser_unsupported":"Serve l'app desktop. Non funziona nel browser.","video_recovered_notice":"L'ultima volta Play si è chiuso all'avvio dell'immagine, quindi ora l'immagine è decodificata senza la scheda grafica (modificabile in Impostazioni › Finestra › Grafica › Decodifica video hardware).","video_recovered_title":"Immagine ora decodificata via software","open_in_title":"Aprire nell’app PS5Upload?","open_in_body":"Hai l’app PS5Upload su questo dispositivo? Aprilo lì, oppure continua nel browser.","open_in_app":"Apri nell’app","open_in_browser":"Continua nel browser","open_in_remember":"Ricorda la mia scelta su questo dispositivo","open_in_opening":"Apertura dell’app PS5Upload…","open_in_not_opened":"Non è successo niente? Forse l’app non è su questo dispositivo.","open_in_again":"Riprova","pad_8bitdo_no_xinput":"Questo 8BitDo non ha la modalità X-input. Se un tasto è sbagliato, controlla il controller.","pad_8bitdo_how_switch":"porta l'interruttore sul retro su X, poi premi Start","pad_8bitdo_how_startx":"spegnilo, poi tieni premuto Start + X per accenderlo","pad_8bitdo_how_receiver":"usa il suo ricevitore 2.4G o un cavo USB","pad_8bitdo_how_manual":"il suo manuale spiega come","pad_8bitdo_xinput":"Per il risultato migliore, passa il tuo 8BitDo in modalità X-input: {how}.","rp_touch_left_stick":"Levetta sinistra","rp_touch_right_stick":"Levetta destra","rp_pad_step_lx":"Spingi la levetta sinistra a destra","rp_pad_step_ly":"Spingi la levetta sinistra in basso","rp_pad_step_rx":"Spingi la levetta destra a destra","rp_pad_step_ry":"Spingi la levetta destra in basso","join_check_bottom":"Premi il tasto frontale in basso (✕)","join_check_right":"Premi il tasto frontale a destra (○)","join_check_left":"Premi il tasto frontale a sinistra (□)","join_check_top":"Premi il tasto frontale in alto (△)","rp_pad_press":"Premi {name}","join_check_saved":"Salvato per questo controller su questo dispositivo. Provalo qui sotto.","join_check_title":"Controlla il controller","join_done":"Fatto","rp_pads_none":"Nessun controller rilevato. Collegane uno e premi un tasto qualsiasi.","rp_pad_mapped":"Gioca con la tua mappatura","join_check_unknown":"Questo controller non è nel nostro elenco, quindi i tasti potrebbero essere scambiati. Configurarlo richiede pochi secondi.","rp_pad_standard":"Riconosciuto","rp_pad_progress":"{n} di {total}","rp_pad_skip":"Salta","rp_pad_back":"Indietro","rp_pad_cancel":"Annulla","join_check_try":"Premi i tasti e muovi le levette: ciò che premi si illumina.","join_check_redo":"Rifai","join_check_map":"Configura i tasti","rp_pad_reset":"Ripristina","join_open_lan_body":"Niente Internet? Se sei sullo stesso Wi-Fi del tuo amico, apri la partita da lì.","join_open_lan":"Apri su questo Wi-Fi","join_path_lan":"Rete domestica","join_seat_taken":"{host} aveva bisogno di riavere il suo controller e sulla PS5 non c'era un altro controller libero, quindi sei uscito dalla partita. Chiedi a {host} di farti entrare di nuovo.","join_refused_key":"Questo invito è scaduto. Chiedi a {host} un nuovo link.","join_refused_expired":"Il tuo posto nella partita è perso. Chiedi a {host} di farti rientrare.","join_refused_full":"La partita è piena: ci sono già quattro giocatori.","join_refused_denied":"Stavolta {host} non ti ha fatto entrare.","join_refused_no_answer":"{host} non ha risposto in tempo. Avvisa {host}, poi riprova.","join_refused_closed":"Al momento {host} non sta ospitando Gioca insieme.","join_refused_old_helper":"La PS5 di {host} ha bisogno di un helper aggiornato per Gioca insieme.","join_refused_not_playing":"{host} non sta giocando ora. Chiedi prima a {host} di avviare Gioca.","join_refused_unreachable":"Il computer di {host} non è riuscito a raggiungere la PS5. Riprova tra poco.","join_refused_slow_down":"Troppi codici errati. Aspetta un minuto e riprova.","join_refused_address":"L'indirizzo di questo link è fuori dalla tua rete domestica, quindi l'app non lo userà. Chiedi a {host} un link con l'indirizzo IP del suo computer.","join_refused_other":"{host} non ti ha fatto entrare.","join_ended_kicked":"{host} ti ha tolto dalla partita.","join_ended_closed":"{host} ha chiuso Gioca insieme.","join_ended_host_stopped":"L'host ha smesso di giocare.","join_ended_replaced":"Questa partita è stata aperta in un'altra scheda o su un altro dispositivo, quindi qui si è fermata.","join_ended_pad_lost":"La PS5 ha perso il tuo controller, quindi sei fuori dalla partita. Chiedi a {host} di farti rientrare.","join_ended_gave_up":"La connessione con {host} non è tornata in tempo.","join_net_lost":"La connessione con {host} si è interrotta. Controlla la connessione Internet, poi chiedi di nuovo.","join_ended_lost":"Impossibile raggiungere {host}. Controlla di essere sulla stessa rete.","join_ended_left":"Sei uscito dalla partita.","join_net_mismatch":"Questo link non corrisponde all'host; chiedigliene uno nuovo.","join_net_no_direct":"Da questa rete non è possibile una connessione diretta (i router di entrambi i lati sono restrittivi). Prova il Wi-Fi invece dei dati mobili, oppure chiedi all'host di attivare UPnP.","join_net_no_room":"Questo invito non è più aperto. Chiedi a {host} un nuovo link.","join_net_full":"La partita di {host} non ha posto per un altro amico in questo momento. Riprova tra poco.","join_net_no_hub":"Impossibile raggiungere il servizio inviti di PS5Upload. Controlla la connessione a internet, poi riprova.","join_net_offer":"Il computer di {host} non è riuscito a connettersi a questo browser. Prova un altro browser.","join_net_no_webrtc":"Questo browser non può creare connessioni dirette. Prova una versione recente di Chrome, Safari o Firefox.","join_cancel":"Annulla","join_host_fallback":"il tuo amico","join_connecting":"Connessione a {host}…","join_waiting":"In attesa che {host} ti faccia entrare","join_waiting_body":"{host} vede il tuo nome sullo schermo e tocca Consenti.","join_retry":"Riprova","join_again":"Chiedi di nuovo di entrare","join_playing_at":"Giochi da {host}","join_you_are":"Sei il Giocatore {n}","join_seat_stream":"Stai giocando con l'utente PS5 di {host}. Non serve sceglierne uno.","join_plays_as":"Stai giocando come {profile}. Non devi sceglierne uno.","join_seat_tv_asks":"{host} ha scelto un profilo per te, ma non si è potuto usare. La TV ti chiederà chi sei.","join_picking":"Premi PS, poi scegli Gioco rapido sulla TV","join_hide_controls":"Nascondi","join_sound":"Tocca per l'audio","rp_unmute":"Audio attivo","rp_mute":"Muto","join_no_sound":"Nessun suono in questo browser","join_exit_fullscreen":"Esci da schermo intero","pad_fill":"Schermo intero","join_leave":"Esci","join_show_controls":"Mostra i comandi","join_hold_hint":"Tieni premuto sull'immagine per mostrare i pulsanti","pad_watch_no_hevc":"Questo dispositivo non può riprodurre l'immagine di questo stream: il computer trasmette in HEVC e questo dispositivo riproduce solo H.264.","pad_watch_decode":"Non è stato possibile riprodurre l'immagine qui.","join_pad_ready":"Il tuo controller è pronto","join_check_unknown_short":"Non è nel nostro elenco: i tasti potrebbero essere scambiati.","join_full_to_play":"Tocca schermo intero per giocare con il controller a schermo.","join_pad_none":"Collega un controller (USB o Bluetooth) e premi un tasto qualsiasi.","join_pad_keys":"Oppure usa la tastiera: WASD per muoverti, frecce croce direzionale, Invio ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Premi Indietro sul telecomando per vedere i pulsanti.","join_block_note":"{host} ha disattivato PS e Create per gli amici.","join_guide_title":"Ancora un passo sulla TV","join_guide_body":"Premi PS una volta sul controller. La TV chiede \"Chi sta usando questo controller?\". Scegli Gioco rapido o il tuo utente. L'host non deve fare nulla.","join_guide_menus":"Nella schermata iniziale della PS5 solo chi ospita controlla i menu; il tuo controller gioca dentro i giochi.","join_guide_ok":"Ho capito","join_host_away":"L'host ha smesso di giocare: in attesa che ricominci ({time})","join_reconnecting":"Riconnessione…","join_reconnecting_left":"Il tuo posto resta riservato per {time}.","pad_turn":"Ruota il telefono in orizzontale","join_game_label":"Partita di {host}","join_title":"Unisciti alla partita di un amico","join_title_body":"Gioca sulla PS5 di {host} come Giocatore 2, 3 o 4.","join_name_label":"Il tuo nome","join_name_hint":"Il tuo amico lo vede quando chiedi di entrare.","join_button":"Unisciti"},"ja":{"usb_skipped_not_payload":"{name}:.elf または .bin ファイルではありません","usb_skipped_unknown":"{id}: ペイロード一覧にありません","browser_unsupported":"デスクトップアプリが必要です。ブラウザーでは動作しません。","video_recovered_notice":"前回 Play が映像の開始中にクラッシュしたため、映像をグラフィックカードを使わずにデコードするようにしました(設定 › ウィンドウ › グラフィック › ハードウェア映像デコード で変更できます)。","video_recovered_title":"映像はソフトウェアでデコードされます","open_in_title":"PS5Upload アプリで開きますか?","open_in_body":"この端末に PS5Upload アプリがあれば、アプリで開けます。ブラウザーのまま続けることもできます。","open_in_app":"アプリで開く","open_in_browser":"ブラウザーで続ける","open_in_remember":"この端末で選択を記憶する","open_in_opening":"PS5Upload アプリを開いています…","open_in_not_opened":"何も起きませんか?この端末にアプリが入っていないかもしれません。","open_in_again":"再試行","pad_8bitdo_no_xinput":"この 8BitDo には X-input モードがありません。ボタンが違う場合はコントローラーを確認してください。","pad_8bitdo_how_switch":"背面のスイッチを X にして Start を押す","pad_8bitdo_how_startx":"電源を切り、Start + X を押したまま電源を入れる","pad_8bitdo_how_receiver":"付属の 2.4G レシーバーか USB ケーブルを使う","pad_8bitdo_how_manual":"方法は取扱説明書にあります","pad_8bitdo_xinput":"最適に使うには、8BitDo を X-input モードにしてください: {how}。","rp_touch_left_stick":"左スティック","rp_touch_right_stick":"右スティック","rp_touch_touchpad":"タッチパッド","rp_menu":"メニュー","rp_pad_step_lx":"左スティックを右に倒してください","rp_pad_step_ly":"左スティックを下に倒してください","rp_pad_step_rx":"右スティックを右に倒してください","rp_pad_step_ry":"右スティックを下に倒してください","join_check_bottom":"下のボタンを押してください (✕)","join_check_right":"右のボタンを押してください (○)","join_check_left":"左のボタンを押してください (□)","join_check_top":"上のボタンを押してください (△)","rp_pad_press":"{name} を押してください","join_check_saved":"このデバイスでこのコントローラー用に保存しました。下で試してください。","join_check_title":"コントローラーを確認","join_done":"完了","rp_pads_none":"コントローラーがまだ見つかりません。接続して、いずれかのボタンを押してください。","rp_pad_mapped":"あなたの割り当てで操作します","join_check_unknown":"このコントローラーは一覧にないため、ボタンが入れ替わっている可能性があります。設定は数秒で終わります。","rp_pad_standard":"認識済み","rp_pad_progress":"{n} / {total}","rp_pad_skip":"スキップ","rp_pad_back":"戻る","rp_pad_cancel":"キャンセル","join_check_try":"ボタンを押したりスティックを動かしたりしてください。押したものが光ります。","join_check_redo":"やり直す","join_check_map":"ボタンを設定","rp_pad_reset":"リセット","join_open_lan_body":"インターネットにつながりませんか?友だちと同じ Wi-Fi にいるなら、そこでゲームを開いてください。","join_open_lan":"この Wi-Fi で開く","join_path_lan":"ホームネットワーク","join_path_internet":"インターネット","join_seat_taken":"{host}が自分のコントローラーを必要とし、PS5に空いているコントローラーがほかになかったため、ゲームから退出しました。もう一度入れてもらうよう{host}に頼んでください。","join_refused_key":"この招待は期限切れです。{host}さんに新しいリンクをもらってください。","join_refused_expired":"ゲームの席がなくなりました。{host} さんにもう一度入れてもらってください。","join_refused_full":"満員です:すでに4人がプレイしています。","join_refused_denied":"今回は{host}さんに参加を許可されませんでした。","join_refused_no_answer":"{host} さんが時間内に応答しませんでした。{host} さんに伝えてから、もう一度お試しください。","join_refused_closed":"{host}さんは今「いっしょにプレイ」を開いていません。","join_refused_old_helper":"「いっしょにプレイ」を使うには、{host}さんのPS5のヘルパーを更新する必要があります。","join_refused_not_playing":"{host}さんは今プレイしていません。先に{host}さんにプレイを始めてもらってください。","join_refused_unreachable":"{host}さんのコンピューターがPS5に接続できませんでした。少ししてからもう一度お試しください。","join_refused_slow_down":"間違ったコードが多すぎます。1分待ってからもう一度お試しください。","join_refused_address":"このリンクのアドレスはホームネットワークの外にあるため、アプリは使用しません。{host} にコンピューターの IP アドレスのリンクを頼んでください。","join_refused_other":"{host}さんに参加を許可されませんでした。","join_ended_kicked":"{host}さんにゲームから外されました。","join_ended_closed":"{host}さんが「いっしょにプレイ」を終了しました。","join_ended_host_stopped":"ホストがプレイをやめました。","join_ended_replaced":"このゲームが別のタブまたは別のデバイスで開かれたため、ここでは終了しました。","join_ended_pad_lost":"PS5 があなたのコントローラーを見失ったため、ゲームから外れました。{host} さんにもう一度入れてもらってください。","join_ended_gave_up":"{host}さんとの接続が時間内に戻りませんでした。","join_net_lost":"{host} との接続が切れました。インターネット接続を確認してから、もう一度お願いしてください。","join_ended_lost":"{host}さんに接続できませんでした。同じネットワークにいるか確認してください。","join_ended_left":"ゲームから退出しました。","join_net_mismatch":"このリンクはホストと一致しません。ホストに新しいリンクをもらってください。","join_net_no_direct":"このネットワークからは直接接続できません(双方のルーターが厳しい設定です)。モバイルデータではなく Wi-Fi を試すか、ホストに UPnP をオンにしてもらってください。","join_net_no_room":"この招待はもう有効ではありません。{host}さんに新しいリンクをもらってください。","join_net_full":"{host}さんのゲームには今これ以上友だちが入れません。少ししてからもう一度お試しください。","join_net_no_hub":"PS5Upload の招待サービスに接続できませんでした。インターネット接続を確認して、もう一度お試しください。","join_net_offer":"{host}さんのコンピューターがこのブラウザーに接続できませんでした。別のブラウザーをお試しください。","join_net_no_webrtc":"このブラウザーは直接接続ができません。最新の Chrome、Safari、Firefox をお試しください。","join_cancel":"キャンセル","join_host_fallback":"フレンド","join_connecting":"{host}さんに接続中…","join_waiting":"{host}さんの許可を待っています","join_waiting_body":"{host}さんの画面にあなたの名前が表示され、「許可」をタップすると参加できます。","join_retry":"再試行","join_again":"もう一度参加をリクエスト","join_playing_at":"{host}さんのPS5でプレイ中","join_you_are":"あなたはプレイヤー{n}です","join_seat_stream":"{host}のPS5ユーザーとしてプレイしています。ユーザーを選ぶ必要はありません。","join_plays_as":"{profile}としてプレイしています。選ぶ必要はありません。","join_seat_tv_asks":"{host}があなた用のプロフィールを選びましたが、使えませんでした。テレビで誰がプレイするかを聞かれます。","join_picking":"PSボタンを押して、テレビで「クイックプレイ」を選んでください","join_hide_controls":"隠す","join_sound":"タップして音を出す","rp_unmute":"音声オン","rp_mute":"ミュート","join_no_sound":"このブラウザーでは音声を再生できません","join_exit_fullscreen":"全画面を終了","pad_fill":"全画面","join_leave":"退出","join_show_controls":"操作ボタンを表示","join_hold_hint":"画面を長押しするとボタンが表示されます","pad_watch_no_hevc":"この端末ではこの配信の映像を再生できません。PC は HEVC で配信していますが、この端末は H.264 のみ再生できます。","pad_watch_decode":"ここでは映像を再生できませんでした。","join_pad_ready":"コントローラーの準備ができました","join_check_unknown_short":"一覧にありません: ボタンが入れ替わっている可能性があります。","join_full_to_play":"全画面をタップすると、画面上のコントローラーでプレイできます。","join_pad_none":"コントローラーをつないで(USBまたはBluetooth)、いずれかのボタンを押してください。","join_pad_keys":"キーボードでも遊べます:WASDで移動、矢印キーで方向キー、Enter ✕、Backspace ○、Q □、E △、Tab OPTIONS。","join_tv_back_hint":"ボタンを表示するには、リモコンの戻るを押してください。","join_block_note":"{host}さんがフレンドのPSボタンとCreateボタンを無効にしています。","join_guide_title":"テレビであと1ステップ","join_guide_body":"コントローラーのPSボタンを1回押してください。テレビに「このコントローラーを使うのは誰ですか?」と表示されます。クイックプレイか自分のユーザーを選んでください。ホストの操作は不要です。","join_guide_menus":"PS5のホーム画面でメニューを操作できるのはホストだけです。あなたのコントローラーはゲームの中で使えます。","join_guide_ok":"OK","join_host_away":"ホストがプレイをやめました — 再開を待っています({time})","join_reconnecting":"再接続中…","join_reconnecting_left":"あと{time}は枠が確保されています。","pad_turn":"スマホを横向きにしてください","join_game_label":"{host}さんのゲーム","join_title":"フレンドのゲームに参加","join_title_body":"{host}さんのPS5でプレイヤー2・3・4として遊べます。","join_name_label":"あなたの名前","join_name_hint":"参加をリクエストすると、フレンドにこの名前が表示されます。","join_button":"参加"},"ko":{"usb_skipped_not_payload":"{name}: .elf 또는 .bin 파일이 아님","usb_skipped_unknown":"{id}: 더 이상 페이로드 목록에 없습니다","browser_unsupported":"데스크톱 앱이 필요합니다. 브라우저에서는 작동하지 않습니다.","video_recovered_notice":"지난번 화면을 시작하는 중에 Play가 충돌하여, 이제 그래픽 카드 없이 화면을 디코딩합니다(설정 › 창 › 그래픽 › 하드웨어 영상 디코딩에서 변경).","video_recovered_title":"이제 화면을 소프트웨어로 디코딩합니다","open_in_title":"PS5Upload 앱에서 열까요?","open_in_body":"이 기기에 PS5Upload 앱이 있나요? 앱에서 열거나 브라우저에서 계속하세요.","open_in_app":"앱에서 열기","open_in_browser":"브라우저에서 계속","open_in_remember":"이 기기에서 선택 기억하기","open_in_opening":"PS5Upload 앱을 여는 중…","open_in_not_opened":"아무 일도 없나요? 이 기기에 앱이 없을 수 있습니다.","open_in_again":"다시 시도","pad_8bitdo_no_xinput":"이 8BitDo에는 X-input 모드가 없습니다. 버튼이 다르게 동작하면 컨트롤러를 확인하세요.","pad_8bitdo_how_switch":"뒷면 스위치를 X로 놓고 Start를 누르세요","pad_8bitdo_how_startx":"전원을 끈 다음 Start + X를 누른 채로 켜세요","pad_8bitdo_how_receiver":"2.4G 수신기나 USB 케이블을 사용하세요","pad_8bitdo_how_manual":"방법은 설명서에 있습니다","pad_8bitdo_xinput":"가장 잘 동작하도록 8BitDo를 X-input 모드로 바꾸세요: {how}.","rp_touch_left_stick":"왼쪽 스틱","rp_touch_right_stick":"오른쪽 스틱","rp_touch_touchpad":"터치패드","rp_menu":"메뉴","rp_pad_step_lx":"왼쪽 스틱을 오른쪽으로 미세요","rp_pad_step_ly":"왼쪽 스틱을 아래로 미세요","rp_pad_step_rx":"오른쪽 스틱을 오른쪽으로 미세요","rp_pad_step_ry":"오른쪽 스틱을 아래로 미세요","join_check_bottom":"아래쪽 버튼을 누르세요 (✕)","join_check_right":"오른쪽 버튼을 누르세요 (○)","join_check_left":"왼쪽 버튼을 누르세요 (□)","join_check_top":"위쪽 버튼을 누르세요 (△)","rp_pad_press":"{name} 버튼을 누르세요","join_check_saved":"이 기기에서 이 컨트롤러용으로 저장했습니다. 아래에서 시험해 보세요.","join_check_title":"컨트롤러 확인","join_done":"완료","rp_pads_none":"아직 컨트롤러가 보이지 않습니다. 컨트롤러를 연결하고 아무 버튼이나 누르세요.","rp_pad_mapped":"내 버튼 설정으로 플레이","join_check_unknown":"이 컨트롤러는 목록에 없어서 버튼이 뒤바뀌어 있을 수 있습니다. 설정은 몇 초면 됩니다.","rp_pad_standard":"인식됨","rp_pad_progress":"{n} / {total}","rp_pad_skip":"건너뛰기","rp_pad_back":"뒤로","rp_pad_cancel":"취소","join_check_try":"버튼을 누르고 스틱을 움직여 보세요. 누른 것이 켜집니다.","join_check_redo":"다시 하기","join_check_map":"버튼 설정","rp_pad_reset":"초기화","join_open_lan_body":"인터넷에 연결되지 않나요? 친구와 같은 Wi-Fi에 있다면 거기서 게임을 여세요.","join_open_lan":"이 Wi-Fi에서 열기","join_path_lan":"홈 네트워크","join_path_internet":"인터넷","join_seat_taken":"{host} 님이 컨트롤러를 다시 써야 했는데 PS5에 남은 컨트롤러가 없어서 게임에서 나왔어요. {host} 님에게 다시 들여보내 달라고 하세요.","join_refused_key":"초대가 만료됐어요. {host} 님에게 새 링크를 요청하세요.","join_refused_expired":"게임 자리를 잃었습니다. {host} 님에게 다시 들여보내 달라고 하세요.","join_refused_full":"게임이 꽉 찼어요. 이미 4명이 플레이 중이에요.","join_refused_denied":"이번에는 {host} 님이 참여를 허용하지 않았어요.","join_refused_no_answer":"{host} 님이 제시간에 응답하지 않았습니다. {host} 님에게 알린 뒤 다시 시도하세요.","join_refused_closed":"{host} 님은 지금 함께 플레이를 열고 있지 않아요.","join_refused_old_helper":"함께 플레이를 하려면 {host} 님의 PS5 헬퍼를 업데이트해야 해요.","join_refused_not_playing":"{host} 님은 지금 플레이 중이 아니에요. {host} 님에게 먼저 플레이를 시작해 달라고 하세요.","join_refused_unreachable":"{host} 님의 컴퓨터가 PS5에 연결하지 못했어요. 잠시 후 다시 시도하세요.","join_refused_slow_down":"잘못된 코드를 너무 많이 입력했어요. 1분 후에 다시 시도하세요.","join_refused_address":"이 링크의 주소는 홈 네트워크 밖에 있어 앱에서 사용하지 않습니다. {host}에게 컴퓨터의 IP 주소가 있는 링크를 요청하세요.","join_refused_other":"{host} 님이 참여를 허용하지 않았어요.","join_ended_kicked":"{host} 님이 나를 게임에서 내보냈어요.","join_ended_closed":"{host} 님이 함께 플레이를 닫았어요.","join_ended_host_stopped":"호스트가 플레이를 멈췄어요.","join_ended_replaced":"이 게임이 다른 탭이나 다른 기기에서 열려서 여기서는 멈췄습니다.","join_ended_pad_lost":"PS5가 컨트롤러를 잃어서 게임에서 나왔습니다. {host} 님에게 다시 들여보내 달라고 하세요.","join_ended_gave_up":"{host} 님과의 연결이 제때 돌아오지 않았어요.","join_net_lost":"{host}와의 연결이 끊겼어요. 인터넷 연결을 확인한 다음 다시 요청하세요.","join_ended_lost":"{host} 님에게 연결할 수 없어요. 같은 네트워크에 있는지 확인하세요.","join_ended_left":"게임에서 나왔어요.","join_net_mismatch":"이 링크는 호스트와 일치하지 않아요. 새 링크를 요청하세요.","join_net_no_direct":"이 네트워크에서는 직접 연결할 수 없어요(양쪽 공유기가 모두 엄격해요). 모바일 데이터 대신 Wi-Fi를 쓰거나 호스트에게 UPnP를 켜 달라고 하세요.","join_net_no_room":"이 초대는 더 이상 열려 있지 않아요. {host} 님에게 새 링크를 요청하세요.","join_net_full":"{host} 님의 게임에 지금은 친구가 더 들어갈 자리가 없어요. 잠시 후 다시 시도하세요.","join_net_no_hub":"PS5Upload 초대 서비스에 연결할 수 없어요. 인터넷 연결을 확인한 뒤 다시 시도하세요.","join_net_offer":"{host} 님의 컴퓨터가 이 브라우저에 연결하지 못했어요. 다른 브라우저를 써 보세요.","join_net_no_webrtc":"이 브라우저는 직접 연결을 할 수 없어요. 최신 Chrome, Safari 또는 Firefox를 써 보세요.","join_cancel":"취소","join_host_fallback":"친구","join_connecting":"{host} 님에게 연결 중…","join_waiting":"{host} 님이 허용하기를 기다리는 중","join_waiting_body":"{host} 님 화면에 내 이름이 보이고, 허용을 누르면 들어갈 수 있어요.","join_retry":"다시 시도","join_again":"다시 참여 요청","join_playing_at":"{host} 님의 PS5에서 플레이 중","join_you_are":"나는 플레이어 {n}","join_seat_stream":"{host} 님의 PS5 사용자로 플레이하고 있어요. 사용자를 고를 필요가 없어요.","join_plays_as":"{profile}(으)로 플레이하고 있어요. 고를 필요가 없어요.","join_seat_tv_asks":"{host} 님이 프로필을 골라 두었지만 쓸 수 없었어요. TV에서 누구인지 물어볼 거예요.","join_picking":"PS 버튼을 누른 다음 TV에서 빠른 플레이를 선택하세요","join_hide_controls":"숨기기","join_sound":"눌러서 소리 켜기","rp_unmute":"소리 켜기","rp_mute":"음소거","join_no_sound":"이 브라우저에서는 소리가 나오지 않습니다","join_exit_fullscreen":"전체 화면 종료","pad_fill":"전체 화면","join_leave":"나가기","join_show_controls":"컨트롤 표시","join_hold_hint":"화면을 길게 누르면 버튼이 표시됩니다","pad_watch_no_hevc":"이 기기는 이 스트림의 화면을 재생할 수 없습니다. 컴퓨터는 HEVC로 스트리밍하고 이 기기는 H.264만 재생합니다.","pad_watch_decode":"여기서 화면을 재생할 수 없었습니다.","join_pad_ready":"컨트롤러가 준비됐어요","join_check_unknown_short":"목록에 없음: 버튼이 뒤바뀌어 있을 수 있습니다.","join_full_to_play":"전체 화면을 탭하면 화면 컨트롤러로 플레이할 수 있어요.","join_pad_none":"컨트롤러를 연결(USB 또는 Bluetooth)하고 아무 버튼이나 누르세요.","join_pad_keys":"키보드로도 할 수 있어요: WASD 이동, 방향키 D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"버튼을 보려면 리모컨의 뒤로 버튼을 누르세요.","join_block_note":"{host} 님이 친구의 PS 및 Create 버튼을 막아 두었어요.","join_guide_title":"TV에서 한 단계만 더","join_guide_body":"컨트롤러의 PS 버튼을 한 번 누르세요. TV에 \"이 컨트롤러를 누가 사용하나요?\"가 나타나요. 빠른 플레이나 내 사용자를 선택하세요. 호스트는 아무것도 하지 않아도 돼요.","join_guide_menus":"PS5 홈 화면에서는 호스트만 메뉴를 조작할 수 있어요. 내 컨트롤러는 게임 안에서 플레이합니다.","join_guide_ok":"알겠어요","join_host_away":"호스트가 플레이를 멈췄어요 — 다시 시작하기를 기다리는 중 ({time})","join_reconnecting":"다시 연결 중…","join_reconnecting_left":"{time} 동안 자리가 유지돼요.","pad_turn":"휴대폰을 가로로 돌리세요","join_game_label":"{host} 님의 게임","join_title":"친구 게임에 참여","join_title_body":"{host} 님의 PS5에서 플레이어 2, 3, 4로 플레이하세요.","join_name_label":"내 이름","join_name_hint":"참여를 요청하면 친구에게 이 이름이 보여요.","join_button":"참여"},"pl":{"usb_skipped_not_payload":"{name}: to nie jest plik .elf ani .bin","usb_skipped_unknown":"{id}: nie ma już na liście payloadów","browser_unsupported":"To wymaga aplikacji na komputer. W przeglądarce nie działa.","video_recovered_notice":"Ostatnio Play zawiesił się przy uruchamianiu obrazu, więc obraz jest teraz dekodowany bez karty graficznej (zmień w Ustawienia › Okno › Grafika › Sprzętowe dekodowanie wideo).","video_recovered_title":"Obraz jest teraz dekodowany programowo","open_in_title":"Otworzyć w aplikacji PS5Upload?","open_in_body":"Masz aplikację PS5Upload na tym urządzeniu? Otwórz to w niej albo kontynuuj w przeglądarce.","open_in_app":"Otwórz w aplikacji","open_in_browser":"Kontynuuj w przeglądarce","open_in_remember":"Zapamiętaj mój wybór na tym urządzeniu","open_in_opening":"Otwieranie aplikacji PS5Upload…","open_in_not_opened":"Nic się nie stało? Aplikacji może nie być na tym urządzeniu.","open_in_again":"Spróbuj ponownie","pad_8bitdo_no_xinput":"Ten 8BitDo nie ma trybu X-input. Jeśli któryś przycisk działa źle, sprawdź kontroler.","pad_8bitdo_how_switch":"ustaw przełącznik z tyłu na X, a potem naciśnij Start","pad_8bitdo_how_startx":"wyłącz go, a potem przytrzymaj Start + X, aby go włączyć","pad_8bitdo_how_receiver":"użyj jego odbiornika 2.4G lub kabla USB","pad_8bitdo_how_manual":"instrukcja podaje, jak to zrobić","pad_8bitdo_xinput":"Aby działał najlepiej, przełącz 8BitDo w tryb X-input: {how}.","rp_touch_left_stick":"Lewa gałka","rp_touch_right_stick":"Prawa gałka","rp_touch_touchpad":"Panel dotykowy","rp_pad_step_lx":"Wychyl lewą gałkę w prawo","rp_pad_step_ly":"Wychyl lewą gałkę w dół","rp_pad_step_rx":"Wychyl prawą gałkę w prawo","rp_pad_step_ry":"Wychyl prawą gałkę w dół","join_check_bottom":"Naciśnij dolny przycisk (✕)","join_check_right":"Naciśnij prawy przycisk (○)","join_check_left":"Naciśnij lewy przycisk (□)","join_check_top":"Naciśnij górny przycisk (△)","rp_pad_press":"Naciśnij {name}","join_check_saved":"Zapisano dla tego kontrolera na tym urządzeniu. Wypróbuj poniżej.","join_check_title":"Sprawdź kontroler","join_done":"Gotowe","rp_pads_none":"Nie wykryto jeszcze kontrolera. Podłącz go i naciśnij dowolny przycisk.","rp_pad_mapped":"Gra z twoim mapowaniem","join_check_unknown":"Tego kontrolera nie ma na naszej liście, więc przyciski mogą być pomieszane. Konfiguracja zajmuje kilka sekund.","rp_pad_standard":"Rozpoznany","rp_pad_progress":"{n} z {total}","rp_pad_skip":"Pomiń","rp_pad_back":"Wstecz","rp_pad_cancel":"Anuluj","join_check_try":"Naciskaj przyciski i ruszaj gałkami: to, co naciśniesz, się podświetli.","join_check_redo":"Powtórz","join_check_map":"Ustaw przyciski","rp_pad_reset":"Resetuj","join_open_lan_body":"Brak internetu? Jeśli jesteś w tej samej sieci Wi-Fi co znajomy, otwórz grę tam.","join_open_lan":"Otwórz w tej sieci Wi-Fi","join_path_lan":"Sieć domowa","join_seat_taken":"{host} potrzebował z powrotem swojego kontrolera, a na PS5 nie było innego wolnego kontrolera, więc wypadasz z gry. Poproś {host}, żeby wpuścił Cię ponownie.","join_refused_key":"To zaproszenie wygasło. Poproś {host} o nowy link.","join_refused_expired":"Twoje miejsce w grze przepadło. Poproś {host} o ponowne wpuszczenie.","join_refused_full":"Brak miejsc: gra już czterech graczy.","join_refused_denied":"{host} tym razem cię nie wpuścił.","join_refused_no_answer":"{host}: brak odpowiedzi na czas. Daj znać ({host}) i spróbuj ponownie.","join_refused_closed":"{host} nie prowadzi teraz Graj razem.","join_refused_old_helper":"PS5 {host} potrzebuje zaktualizowanego pomocnika do Graj razem.","join_refused_not_playing":"{host} teraz nie gra. Poproś {host}, żeby najpierw uruchomił Graj.","join_refused_unreachable":"Komputer {host} nie mógł połączyć się z PS5. Spróbuj ponownie za chwilę.","join_refused_slow_down":"Zbyt wiele błędnych kodów. Odczekaj minutę i spróbuj ponownie.","join_refused_address":"Adres tego linku jest poza Twoją siecią domową, więc aplikacja go nie użyje. Poproś {host} o link z adresem IP komputera.","join_refused_other":"{host} cię nie wpuścił.","join_ended_kicked":"{host} usunął cię z gry.","join_ended_closed":"{host} zamknął Graj razem.","join_ended_host_stopped":"Gospodarz przestał grać.","join_ended_replaced":"Tę grę otwarto w innej karcie lub na innym urządzeniu, więc tu się zatrzymała.","join_ended_pad_lost":"PS5 straciła Twój kontroler, więc wypadasz z gry. Poproś {host} o ponowne wpuszczenie.","join_ended_gave_up":"Połączenie z {host} nie wróciło na czas.","join_net_lost":"Połączenie z {host} zostało przerwane. Sprawdź połączenie internetowe i poproś ponownie.","join_ended_lost":"Nie można połączyć się z {host}. Sprawdź, czy jesteście w tej samej sieci.","join_ended_left":"Opuściłeś grę.","join_net_mismatch":"Ten link nie pasuje do gospodarza; poproś go o nowy.","join_net_no_direct":"Z tej sieci nie da się nawiązać bezpośredniego połączenia (routery po obu stronach są restrykcyjne). Spróbuj Wi-Fi zamiast danych komórkowych albo poproś gospodarza o włączenie UPnP.","join_net_no_room":"To zaproszenie nie jest już otwarte. Poproś {host} o nowy link.","join_net_full":"W grze {host} nie ma teraz miejsca dla kolejnego znajomego. Spróbuj ponownie za chwilę.","join_net_no_hub":"Nie można połączyć się z usługą zaproszeń PS5Upload. Sprawdź połączenie z internetem i spróbuj ponownie.","join_net_offer":"Komputer {host} nie mógł połączyć się z tą przeglądarką. Spróbuj innej przeglądarki.","join_net_no_webrtc":"Ta przeglądarka nie potrafi nawiązywać bezpośrednich połączeń. Spróbuj aktualnego Chrome, Safari lub Firefoksa.","join_cancel":"Anuluj","join_host_fallback":"twój znajomy","join_connecting":"Łączenie z {host}…","join_waiting":"Czekasz, aż {host} cię wpuści","join_waiting_body":"{host} widzi twoje imię na ekranie i stuka Zezwól.","join_retry":"Spróbuj ponownie","join_again":"Poproś ponownie o dołączenie","join_playing_at":"Grasz u {host}","join_you_are":"Jesteś Graczem {n}","join_seat_stream":"Grasz jako użytkownik PS5 gospodarza {host}. Nie musisz nikogo wybierać.","join_plays_as":"Grasz jako {profile}. Nie musisz niczego wybierać.","join_seat_tv_asks":"{host} wybrał dla ciebie profil, ale nie dało się go użyć. Telewizor zapyta, kim jesteś.","join_picking":"Naciśnij PS, a potem wybierz Szybką grę na telewizorze","join_hide_controls":"Ukryj","join_sound":"Włącz dźwięk","rp_unmute":"Dźwięk wł.","rp_mute":"Wycisz","join_no_sound":"Brak dźwięku w tej przeglądarce","join_exit_fullscreen":"Wyjdź z pełnego ekranu","pad_fill":"Pełny ekran","join_leave":"Wyjdź","join_show_controls":"Pokaż przyciski","join_hold_hint":"Przytrzymaj obraz, aby pokazać przyciski","pad_watch_no_hevc":"To urządzenie nie odtworzy obrazu tego streamu: komputer nadaje w HEVC, a to urządzenie odtwarza tylko H.264.","pad_watch_decode":"Nie udało się tu odtworzyć obrazu.","join_pad_ready":"Twój kontroler jest gotowy","join_check_unknown_short":"Nie ma go na liście: przyciski mogą być pomieszane.","join_full_to_play":"Stuknij Pełny ekran, aby grać kontrolerem ekranowym.","join_pad_none":"Podłącz kontroler (USB lub Bluetooth) i naciśnij dowolny przycisk.","join_pad_keys":"Albo użyj klawiatury: WASD ruch, strzałki krzyżak, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Naciśnij Wstecz na pilocie, aby pokazać przyciski.","join_block_note":"{host} wyłączył PS i Create dla znajomych.","join_guide_title":"Jeszcze jeden krok na telewizorze","join_guide_body":"Naciśnij raz PS na kontrolerze. Telewizor zapyta „Kto używa tego kontrolera?”. Wybierz Szybką grę albo swojego użytkownika. Gospodarz nie musi nic robić.","join_guide_menus":"Na ekranie głównym PS5 menu steruje tylko gospodarz; twój kontroler działa w grach.","join_guide_ok":"Rozumiem","join_host_away":"Gospodarz przestał grać — czekamy, aż zacznie znowu ({time})","join_reconnecting":"Ponowne łączenie…","join_reconnecting_left":"Twoje miejsce czeka jeszcze {time}.","pad_turn":"Obróć telefon poziomo","join_game_label":"Gra {host}","join_title":"Dołącz do gry znajomego","join_title_body":"Graj na PS5 {host} jako Gracz 2, 3 lub 4.","join_name_label":"Twoje imię","join_name_hint":"Znajomy zobaczy je, gdy poprosisz o dołączenie.","join_button":"Dołącz"},"pt-BR":{"usb_skipped_not_payload":"{name}: não é um arquivo .elf ou .bin","usb_skipped_unknown":"{id}: não está mais na lista de payloads","browser_unsupported":"Isso precisa do aplicativo para desktop. Não funciona no navegador.","video_recovered_notice":"O Play travou ao iniciar a imagem da última vez, então a imagem agora é decodificada sem a placa de vídeo (altere em Configurações › Janela › Gráficos › Decodificação de vídeo por hardware).","video_recovered_title":"Imagem agora decodificada por software","open_in_title":"Abrir no app PS5Upload?","open_in_body":"Tem o app PS5Upload neste aparelho? Abra por ele ou continue no navegador.","open_in_app":"Abrir no app","open_in_browser":"Continuar no navegador","open_in_remember":"Lembrar minha escolha neste aparelho","open_in_opening":"Abrindo o app PS5Upload…","open_in_not_opened":"Nada aconteceu? Talvez o app não esteja neste aparelho.","open_in_again":"Tentar de novo","pad_8bitdo_no_xinput":"Este 8BitDo não tem modo X-input. Se algum botão estiver errado, verifique o controle.","pad_8bitdo_how_switch":"coloque a chave de trás em X e aperte Start","pad_8bitdo_how_startx":"desligue e depois segure Start + X para ligar","pad_8bitdo_how_receiver":"use o receptor 2.4G dele ou um cabo USB","pad_8bitdo_how_manual":"o manual dele explica como","pad_8bitdo_xinput":"Para o melhor resultado, coloque seu 8BitDo no modo X-input: {how}.","rp_touch_left_stick":"Analógico esquerdo","rp_touch_right_stick":"Analógico direito","rp_pad_step_lx":"Mova o analógico esquerdo para a direita","rp_pad_step_ly":"Mova o analógico esquerdo para baixo","rp_pad_step_rx":"Mova o analógico direito para a direita","rp_pad_step_ry":"Mova o analógico direito para baixo","join_check_bottom":"Aperte o botão de baixo (✕)","join_check_right":"Aperte o botão da direita (○)","join_check_left":"Aperte o botão da esquerda (□)","join_check_top":"Aperte o botão de cima (△)","rp_pad_press":"Pressione {name}","join_check_saved":"Salvo para este controle neste aparelho. Teste abaixo.","join_check_title":"Verificar seu controle","join_done":"Concluído","rp_pads_none":"Nenhum controle detectado ainda. Conecte um e pressione qualquer botão nele.","rp_pad_mapped":"Joga com o seu mapeamento","join_check_unknown":"Este controle não está na nossa lista, então os botões podem estar trocados. Configurar leva poucos segundos.","rp_pad_standard":"Reconhecido","rp_pad_progress":"{n} de {total}","rp_pad_skip":"Pular","rp_pad_back":"Voltar","rp_pad_cancel":"Cancelar","join_check_try":"Aperte botões e mova os analógicos: o que você apertar acende.","join_check_redo":"Refazer","join_check_map":"Configurar os botões","rp_pad_reset":"Redefinir","join_open_lan_body":"Sem internet? Se você está no mesmo Wi-Fi que seu amigo, abra o jogo por lá.","join_open_lan":"Abrir neste Wi-Fi","join_path_lan":"Rede doméstica","join_seat_taken":"{host} precisou do controle de volta e não havia outro controle livre no PS5, então você saiu do jogo. Peça para {host} deixar você entrar de novo.","join_refused_key":"Este convite expirou. Peça um novo link a {host}.","join_refused_expired":"Seu lugar no jogo foi perdido. Peça a {host} para deixar você entrar de novo.","join_refused_full":"O jogo está cheio: já tem quatro jogadores.","join_refused_denied":"{host} não deixou você entrar desta vez.","join_refused_no_answer":"{host} não respondeu a tempo. Avise {host} e tente de novo.","join_refused_closed":"{host} não está com o Jogar juntos aberto agora.","join_refused_old_helper":"O PS5 de {host} precisa de um auxiliar atualizado para o Jogar juntos.","join_refused_not_playing":"{host} não está jogando agora. Peça para {host} iniciar o Jogar primeiro.","join_refused_unreachable":"O computador de {host} não conseguiu acessar o PS5. Tente de novo daqui a pouco.","join_refused_slow_down":"Muitos códigos errados. Espere um minuto e tente de novo.","join_refused_address":"O endereço deste link está fora da sua rede doméstica, então o aplicativo não vai usá-lo. Peça a {host} um link com o endereço IP do computador.","join_refused_other":"{host} não deixou você entrar.","join_ended_kicked":"{host} tirou você do jogo.","join_ended_closed":"{host} fechou o Jogar juntos.","join_ended_host_stopped":"O anfitrião parou de jogar.","join_ended_replaced":"Este jogo foi aberto em outra aba ou em outro dispositivo, então parou aqui.","join_ended_pad_lost":"O PS5 perdeu seu controle, então você saiu do jogo. Peça a {host} para deixar você entrar de novo.","join_ended_gave_up":"A conexão com {host} não voltou a tempo.","join_net_lost":"A conexão com {host} caiu. Verifique sua conexão de internet e peça de novo.","join_ended_lost":"Não foi possível alcançar {host}. Verifique se vocês estão na mesma rede.","join_ended_left":"Você saiu do jogo.","join_net_mismatch":"Este link não corresponde ao anfitrião; peça um novo a ele.","join_net_no_direct":"Não é possível uma conexão direta a partir desta rede (os roteadores dos dois lados são restritos). Tente o Wi-Fi em vez dos dados móveis ou peça ao anfitrião para ativar o UPnP.","join_net_no_room":"Este convite não está mais aberto. Peça a {host} um novo link.","join_net_full":"O jogo de {host} não tem lugar para mais um amigo agora. Tente de novo daqui a pouco.","join_net_no_hub":"Não foi possível alcançar o serviço de convites do PS5Upload. Verifique sua conexão com a internet e tente de novo.","join_net_offer":"O computador de {host} não conseguiu se conectar a este navegador. Tente outro navegador.","join_net_no_webrtc":"Este navegador não consegue fazer conexões diretas. Tente uma versão recente do Chrome, Safari ou Firefox.","join_cancel":"Cancelar","join_host_fallback":"seu amigo","join_connecting":"Conectando a {host}…","join_waiting":"Esperando {host} deixar você entrar","join_waiting_body":"{host} vê seu nome na tela e toca em Permitir.","join_retry":"Tentar de novo","join_again":"Pedir para entrar de novo","join_playing_at":"Jogando na casa de {host}","join_you_are":"Você é o Jogador {n}","join_seat_stream":"Você está jogando com o usuário do PS5 de {host}. Não precisa escolher um.","join_plays_as":"Você está jogando como {profile}. Não precisa escolher.","join_seat_tv_asks":"{host} escolheu um perfil para você, mas não foi possível usá-lo. A TV vai perguntar quem você é.","join_picking":"Aperte PS e depois escolha Jogo rápido na TV","join_hide_controls":"Ocultar","join_sound":"Ativar som","rp_unmute":"Ativar som","rp_mute":"Silenciar","join_no_sound":"Sem som neste navegador","join_exit_fullscreen":"Sair da tela cheia","pad_fill":"Tela cheia","join_leave":"Sair","join_show_controls":"Mostrar controles","join_hold_hint":"Toque e segure a imagem para mostrar os botões","pad_watch_no_hevc":"Este aparelho não reproduz a imagem deste stream: o computador transmite em HEVC e este aparelho reproduz apenas H.264.","pad_watch_decode":"Não foi possível reproduzir a imagem aqui.","join_pad_ready":"Seu controle está pronto","join_check_unknown_short":"Não está na nossa lista: os botões podem estar trocados.","join_full_to_play":"Toque em tela cheia para jogar com o controle na tela.","join_pad_none":"Conecte um controle (USB ou Bluetooth) e aperte qualquer botão.","join_pad_keys":"Ou use o teclado: WASD move, setas direcional, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Aperte Voltar no controle remoto para ver os botões.","join_block_note":"{host} desativou PS e Create para amigos.","join_guide_title":"Mais um passo na TV","join_guide_body":"Aperte PS uma vez no seu controle. A TV pergunta \"Quem está usando este controle?\". Escolha Jogo rápido ou o seu próprio usuário. O anfitrião não precisa fazer nada.","join_guide_menus":"Na tela inicial do PS5 só o anfitrião controla os menus; seu controle joga dentro dos jogos.","join_guide_ok":"Entendi","join_host_away":"O anfitrião parou de jogar — esperando ele começar de novo ({time})","join_reconnecting":"Reconectando…","join_reconnecting_left":"Seu lugar fica guardado por {time}.","pad_turn":"Vire o celular na horizontal","join_game_label":"Jogo de {host}","join_title":"Entrar no jogo de um amigo","join_title_body":"Jogue no PS5 de {host} como Jogador 2, 3 ou 4.","join_name_label":"Seu nome","join_name_hint":"Seu amigo vê isto quando você pede para entrar.","join_button":"Entrar"},"ru":{"usb_skipped_not_payload":"{name}: не файл .elf или .bin","usb_skipped_unknown":"{id}: больше нет в списке пейлоадов","browser_unsupported":"Для этого нужно настольное приложение. В браузере это не работает.","video_recovered_notice":"В прошлый раз Play упал при запуске картинки, поэтому теперь картинка декодируется без видеокарты (изменить: Настройки › Окно › Графика › Аппаратное декодирование видео).","video_recovered_title":"Картинка теперь декодируется программно","open_in_title":"Открыть в приложении PS5Upload?","open_in_body":"Приложение PS5Upload есть на этом устройстве? Откройте это там или продолжите в браузере.","open_in_app":"Открыть в приложении","open_in_browser":"Продолжить в браузере","open_in_remember":"Запомнить выбор на этом устройстве","open_in_opening":"Открываем приложение PS5Upload…","open_in_not_opened":"Ничего не произошло? Возможно, приложения нет на этом устройстве.","open_in_again":"Повторить","pad_8bitdo_no_xinput":"У этого 8BitDo нет режима X-input. Если кнопка срабатывает не так, проверьте контроллер.","pad_8bitdo_how_switch":"переведите переключатель сзади в положение X, затем нажмите Start","pad_8bitdo_how_startx":"выключите его, затем включите, удерживая Start + X","pad_8bitdo_how_receiver":"используйте его приёмник 2.4G или кабель USB","pad_8bitdo_how_manual":"как это сделать, сказано в его инструкции","pad_8bitdo_xinput":"Для лучшего результата переключите 8BitDo в режим X-input: {how}.","rp_touch_left_stick":"Левый стик","rp_touch_right_stick":"Правый стик","rp_touch_touchpad":"Сенсорная панель","rp_menu":"Меню","rp_pad_step_lx":"Отклоните левый стик вправо","rp_pad_step_ly":"Отклоните левый стик вниз","rp_pad_step_rx":"Отклоните правый стик вправо","rp_pad_step_ry":"Отклоните правый стик вниз","join_check_bottom":"Нажмите нижнюю кнопку (✕)","join_check_right":"Нажмите правую кнопку (○)","join_check_left":"Нажмите левую кнопку (□)","join_check_top":"Нажмите верхнюю кнопку (△)","rp_pad_press":"Нажмите {name}","join_check_saved":"Сохранено для этого контроллера на этом устройстве. Попробуйте ниже.","join_check_title":"Проверить контроллер","join_done":"Готово","rp_pads_none":"Контроллер пока не найден. Подключите его и нажмите любую кнопку.","rp_pad_mapped":"Играет с вашей раскладкой","join_check_unknown":"Этого контроллера нет в нашем списке, поэтому кнопки могут быть перепутаны. Настройка займёт несколько секунд.","rp_pad_standard":"Распознан","rp_pad_progress":"{n} из {total}","rp_pad_skip":"Пропустить","rp_pad_back":"Назад","rp_pad_cancel":"Отмена","join_check_try":"Нажимайте кнопки и двигайте стики: нажатое подсвечивается.","join_check_redo":"Заново","join_check_map":"Настроить кнопки","rp_pad_reset":"Сбросить","join_open_lan_body":"Нет доступа к интернету? Если вы в той же сети Wi-Fi, что и друг, откройте игру там.","join_open_lan":"Открыть в этой сети Wi-Fi","join_path_lan":"Домашняя сеть","join_path_internet":"Интернет","join_seat_taken":"{host} понадобился его контроллер, а других свободных контроллеров на PS5 не было, поэтому вы вышли из игры. Попросите {host} впустить вас снова.","join_refused_key":"Срок приглашения истёк. Попросите у {host} новую ссылку.","join_refused_expired":"Ваше место в игре потеряно. Попросите {host} впустить вас снова.","join_refused_full":"Мест нет: уже играют четверо.","join_refused_denied":"{host} в этот раз вас не впустил.","join_refused_no_answer":"{host} не ответил вовремя. Сообщите {host} и попробуйте ещё раз.","join_refused_closed":"{host} сейчас не проводит «Совместную игру».","join_refused_old_helper":"Для «Совместной игры» на PS5 {host} нужен обновлённый помощник.","join_refused_not_playing":"{host} сейчас не играет. Попросите {host} сначала запустить Игру.","join_refused_unreachable":"Компьютер {host} не смог связаться с PS5. Попробуйте ещё раз чуть позже.","join_refused_slow_down":"Слишком много неверных кодов. Подождите минуту и попробуйте снова.","join_refused_address":"Адрес этой ссылки находится вне вашей домашней сети, поэтому приложение его не использует. Попросите {host} дать ссылку с IP-адресом компьютера.","join_refused_other":"{host} вас не впустил.","join_ended_kicked":"{host} убрал вас из игры.","join_ended_closed":"{host} закрыл «Совместную игру».","join_ended_host_stopped":"Хост перестал играть.","join_ended_replaced":"Эту игру открыли в другой вкладке или на другом устройстве, поэтому здесь она остановилась.","join_ended_pad_lost":"PS5 потеряла ваш контроллер, поэтому вы вышли из игры. Попросите {host} впустить вас снова.","join_ended_gave_up":"Соединение с {host} не восстановилось вовремя.","join_net_lost":"Соединение с {host} прервалось. Проверьте подключение к интернету и попросите ещё раз.","join_ended_lost":"Не удалось связаться с {host}. Проверьте, что вы в одной сети.","join_ended_left":"Вы вышли из игры.","join_net_mismatch":"Эта ссылка не совпадает с хостом; попросите у него новую.","join_net_no_direct":"Из этой сети прямое подключение невозможно (роутеры с обеих сторон строгие). Попробуйте Wi-Fi вместо мобильного интернета или попросите хоста включить UPnP.","join_net_no_room":"Это приглашение больше не действует. Попросите у {host} новую ссылку.","join_net_full":"В игре {host} сейчас нет места для ещё одного друга. Попробуйте чуть позже.","join_net_no_hub":"Не удалось связаться со службой приглашений PS5Upload. Проверьте подключение к интернету и попробуйте снова.","join_net_offer":"Компьютер {host} не смог подключиться к этому браузеру. Попробуйте другой браузер.","join_net_no_webrtc":"Этот браузер не умеет устанавливать прямые подключения. Попробуйте свежую версию Chrome, Safari или Firefox.","join_cancel":"Отмена","join_host_fallback":"ваш друг","join_connecting":"Подключение к {host}…","join_waiting":"Ждём, пока {host} вас впустит","join_waiting_body":"{host} видит ваше имя на экране и нажимает «Разрешить».","join_retry":"Повторить","join_again":"Снова попроситься в игру","join_playing_at":"Игра у {host}","join_you_are":"Вы — Игрок {n}","join_seat_stream":"Вы играете под пользователем PS5 хоста {host}. Выбирать пользователя не нужно.","join_plays_as":"Вы играете как {profile}. Выбирать никого не нужно.","join_seat_tv_asks":"{host} выбрал для вас профиль, но использовать его не удалось. Телевизор спросит, кто вы.","join_picking":"Нажмите PS, затем выберите «Быстрая игра» на телевизоре","join_hide_controls":"Скрыть","join_sound":"Включить звук","rp_unmute":"Включить звук","rp_mute":"Без звука","join_no_sound":"В этом браузере нет звука","join_exit_fullscreen":"Выйти из полноэкранного режима","pad_fill":"Во весь экран","join_leave":"Выйти","join_show_controls":"Показать кнопки","join_hold_hint":"Нажмите и удерживайте изображение, чтобы показать кнопки","pad_watch_no_hevc":"Это устройство не может показать картинку этой трансляции: компьютер передаёт HEVC, а устройство воспроизводит только H.264.","pad_watch_decode":"Картинку не удалось воспроизвести здесь.","join_pad_ready":"Ваш контроллер готов","join_check_unknown_short":"Нет в нашем списке: кнопки могут быть перепутаны.","join_full_to_play":"Нажмите «Во весь экран», чтобы играть с экранным контроллером.","join_pad_none":"Подключите контроллер (USB или Bluetooth) и нажмите любую кнопку.","join_pad_keys":"Или играйте с клавиатуры: WASD — движение, стрелки — крестовина, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Нажмите «Назад» на пульте, чтобы показать кнопки.","join_block_note":"{host} отключил PS и Create для друзей.","join_guide_title":"Ещё один шаг на телевизоре","join_guide_body":"Нажмите PS на контроллере один раз. Телевизор спросит «Кто использует этот контроллер?». Выберите «Быстрая игра» или своего пользователя. Хосту ничего делать не нужно.","join_guide_menus":"На главном экране PS5 меню управляет только хост; ваш контроллер работает внутри игр.","join_guide_ok":"Понятно","join_host_away":"Хост перестал играть — ждём, когда он начнёт снова ({time})","join_reconnecting":"Переподключение…","join_reconnecting_left":"Ваше место сохраняется ещё {time}.","pad_turn":"Поверните телефон горизонтально","join_game_label":"Игра {host}","join_title":"Присоединиться к игре друга","join_title_body":"Играйте на PS5 {host} как Игрок 2, 3 или 4.","join_name_label":"Ваше имя","join_name_hint":"Друг увидит его, когда вы попроситесь в игру.","join_button":"Войти"},"th":{"usb_skipped_not_payload":"{name}: ไม่ใช่ไฟล์ .elf หรือ .bin","usb_skipped_unknown":"{id}: ไม่อยู่ในรายการเพย์โหลดแล้ว","browser_unsupported":"ต้องใช้แอปเดสก์ท็อป ใช้ในเบราว์เซอร์ไม่ได้","video_recovered_notice":"ครั้งก่อนหน้าเล่นล่มขณะเริ่มภาพ ตอนนี้จึงถอดรหัสภาพโดยไม่ใช้การ์ดจอ (เปลี่ยนได้ที่ การตั้งค่า › หน้าต่าง › กราฟิก › ถอดรหัสวิดีโอด้วยฮาร์ดแวร์)","video_recovered_title":"ตอนนี้ถอดรหัสภาพด้วยซอฟต์แวร์","open_in_title":"เปิดในแอป PS5Upload ไหม","open_in_body":"มีแอป PS5Upload ในอุปกรณ์นี้ไหม เปิดในแอป หรือใช้ต่อในเบราว์เซอร์ก็ได้","open_in_app":"เปิดในแอป","open_in_browser":"ใช้ต่อในเบราว์เซอร์","open_in_remember":"จำตัวเลือกของฉันในอุปกรณ์นี้","open_in_opening":"กำลังเปิดแอป PS5Upload…","open_in_not_opened":"ไม่มีอะไรเกิดขึ้นใช่ไหม อุปกรณ์นี้อาจไม่มีแอป","open_in_again":"ลองอีกครั้ง","pad_8bitdo_no_xinput":"8BitDo รุ่นนี้ไม่มีโหมด X-input หากปุ่มใดทำงานผิด ให้ตรวจสอบคอนโทรลเลอร์","pad_8bitdo_how_switch":"เลื่อนสวิตช์ด้านหลังไปที่ X แล้วกด Start","pad_8bitdo_how_startx":"ปิดเครื่อง แล้วกด Start + X ค้างไว้เพื่อเปิด","pad_8bitdo_how_receiver":"ใช้ตัวรับสัญญาณ 2.4G หรือสาย USB","pad_8bitdo_how_manual":"ดูวิธีได้ในคู่มือ","pad_8bitdo_xinput":"เพื่อผลลัพธ์ที่ดีที่สุด ให้เปลี่ยน 8BitDo เป็นโหมด X-input: {how}","rp_touch_left_stick":"สติกซ้าย","rp_touch_right_stick":"สติกขวา","rp_touch_touchpad":"ทัชแพด","rp_menu":"เมนู","rp_pad_step_lx":"ดันอนาล็อกซ้ายไปทางขวา","rp_pad_step_ly":"ดันอนาล็อกซ้ายลง","rp_pad_step_rx":"ดันอนาล็อกขวาไปทางขวา","rp_pad_step_ry":"ดันอนาล็อกขวาลง","join_check_bottom":"กดปุ่มด้านล่าง (✕)","join_check_right":"กดปุ่มด้านขวา (○)","join_check_left":"กดปุ่มด้านซ้าย (□)","join_check_top":"กดปุ่มด้านบน (△)","rp_pad_press":"กด {name}","join_check_saved":"บันทึกสำหรับคอนโทรลเลอร์นี้บนอุปกรณ์นี้แล้ว ลองใช้ด้านล่าง","join_check_title":"ตรวจสอบคอนโทรลเลอร์","join_done":"เสร็จสิ้น","rp_pads_none":"ยังไม่พบคอนโทรลเลอร์ เชื่อมต่อแล้วกดปุ่มใดก็ได้บนคอนโทรลเลอร์","rp_pad_mapped":"เล่นตามการกำหนดปุ่มของคุณ","join_check_unknown":"คอนโทรลเลอร์นี้ไม่อยู่ในรายการของเรา ปุ่มจึงอาจสลับกัน การตั้งค่าใช้เวลาเพียงไม่กี่วินาที","rp_pad_standard":"รู้จักแล้ว","rp_pad_progress":"{n} จาก {total}","rp_pad_skip":"ข้าม","rp_pad_back":"ย้อนกลับ","rp_pad_cancel":"ยกเลิก","join_check_try":"กดปุ่มและขยับสติ๊ก: ปุ่มที่กดจะสว่างขึ้น","join_check_redo":"ทำใหม่","join_check_map":"ตั้งค่าปุ่ม","rp_pad_reset":"รีเซ็ต","join_open_lan_body":"เข้าอินเทอร์เน็ตไม่ได้? ถ้าคุณอยู่บน Wi-Fi เดียวกับเพื่อน ให้เปิดเกมที่นั่น","join_open_lan":"เปิดบน Wi-Fi นี้","join_path_lan":"เครือข่ายในบ้าน","join_path_internet":"อินเทอร์เน็ต","join_seat_taken":"{host} ต้องใช้คอนโทรลเลอร์ของตัวเองคืน และไม่มีคอนโทรลเลอร์อื่นว่างบน PS5 คุณจึงออกจากเกม ขอให้ {host} ให้คุณเข้าอีกครั้ง","join_refused_key":"คำเชิญนี้หมดอายุแล้ว ขอลิงก์ใหม่จาก {host}","join_refused_expired":"ที่ของคุณในเกมหายไปแล้ว ขอให้ {host} ให้เข้าใหม่","join_refused_full":"เกมเต็มแล้ว: มีผู้เล่นครบสี่คน","join_refused_denied":"{host} ไม่ได้ให้คุณเข้าในครั้งนี้","join_refused_no_answer":"{host} ไม่ตอบทันเวลา แจ้ง {host} แล้วลองอีกครั้ง","join_refused_closed":"ตอนนี้ {host} ไม่ได้เปิดเล่นด้วยกัน","join_refused_old_helper":"PS5 ของ {host} ต้องอัปเดตตัวช่วยเพื่อเล่นด้วยกัน","join_refused_not_playing":"ตอนนี้ {host} ไม่ได้เล่นอยู่ ขอให้ {host} เริ่มเล่นก่อน","join_refused_unreachable":"คอมพิวเตอร์ของ {host} เชื่อมต่อกับ PS5 ไม่ได้ ลองใหม่อีกครั้งในอีกสักครู่","join_refused_slow_down":"ใส่รหัสผิดหลายครั้งเกินไป รอหนึ่งนาทีแล้วลองใหม่","join_refused_address":"ที่อยู่ของลิงก์นี้อยู่นอกเครือข่ายภายในบ้าน แอปจึงไม่ใช้ ขอลิงก์ที่มีที่อยู่ IP ของคอมพิวเตอร์จาก {host}","join_refused_other":"{host} ไม่ได้ให้คุณเข้า","join_ended_kicked":"{host} นำคุณออกจากเกม","join_ended_closed":"{host} ปิดเล่นด้วยกันแล้ว","join_ended_host_stopped":"โฮสต์หยุดเล่นแล้ว","join_ended_replaced":"เกมนี้ถูกเปิดในแท็บอื่นหรืออุปกรณ์อื่น จึงหยุดที่นี่","join_ended_pad_lost":"PS5 ทำคอนโทรลเลอร์ของคุณหาย คุณจึงออกจากเกม ขอให้ {host} ให้เข้าใหม่","join_ended_gave_up":"การเชื่อมต่อกับ {host} ไม่กลับมาทันเวลา","join_net_lost":"การเชื่อมต่อกับ {host} หลุด ตรวจสอบการเชื่อมต่ออินเทอร์เน็ต แล้วขอเข้าร่วมอีกครั้ง","join_ended_lost":"ติดต่อ {host} ไม่ได้ ตรวจสอบว่าอยู่ในเครือข่ายเดียวกัน","join_ended_left":"คุณออกจากเกมแล้ว","join_net_mismatch":"ลิงก์นี้ไม่ตรงกับโฮสต์ ขอลิงก์ใหม่จากเขา","join_net_no_direct":"เชื่อมต่อโดยตรงจากเครือข่ายนี้ไม่ได้ (เราเตอร์ทั้งสองฝั่งเข้มงวด) ลองใช้ Wi-Fi แทนเน็ตมือถือ หรือขอให้โฮสต์เปิด UPnP","join_net_no_room":"คำเชิญนี้ปิดไปแล้ว ขอลิงก์ใหม่จาก {host}","join_net_full":"เกมของ {host} ไม่มีที่ว่างสำหรับเพื่อนเพิ่มในตอนนี้ ลองใหม่อีกสักครู่","join_net_no_hub":"ติดต่อบริการคำเชิญของ PS5Upload ไม่ได้ ตรวจสอบการเชื่อมต่ออินเทอร์เน็ตแล้วลองใหม่","join_net_offer":"คอมพิวเตอร์ของ {host} เชื่อมต่อกับเบราว์เซอร์นี้ไม่ได้ ลองเบราว์เซอร์อื่น","join_net_no_webrtc":"เบราว์เซอร์นี้เชื่อมต่อโดยตรงไม่ได้ ลองใช้ Chrome, Safari หรือ Firefox เวอร์ชันล่าสุด","join_cancel":"ยกเลิก","join_host_fallback":"เพื่อนของคุณ","join_connecting":"กำลังเชื่อมต่อกับ {host}…","join_waiting":"กำลังรอ {host} ให้คุณเข้า","join_waiting_body":"{host} จะเห็นชื่อคุณบนหน้าจอและแตะอนุญาต","join_retry":"ลองอีกครั้ง","join_again":"ขอเข้าร่วมอีกครั้ง","join_playing_at":"กำลังเล่นที่บ้าน {host}","join_you_are":"คุณคือผู้เล่น {n}","join_seat_stream":"คุณกำลังเล่นด้วยผู้ใช้ PS5 ของ {host} ไม่ต้องเลือกผู้ใช้","join_plays_as":"คุณกำลังเล่นในนาม {profile} ไม่ต้องเลือกอะไร","join_seat_tv_asks":"{host} เลือกโปรไฟล์ไว้ให้คุณ แต่ใช้ไม่ได้ ทีวีจะถามว่าคุณเป็นใคร","join_picking":"กด PS แล้วเลือกเล่นด่วนบนทีวี","join_hide_controls":"ซ่อน","join_sound":"แตะเพื่อเปิดเสียง","rp_unmute":"เปิดเสียง","rp_mute":"ปิดเสียง","join_no_sound":"เบราว์เซอร์นี้ไม่มีเสียง","join_exit_fullscreen":"ออกจากเต็มจอ","pad_fill":"เต็มจอ","join_leave":"ออก","join_show_controls":"แสดงปุ่มควบคุม","join_hold_hint":"กดค้างที่ภาพเพื่อแสดงปุ่ม","pad_watch_no_hevc":"อุปกรณ์นี้เล่นภาพของสตรีมนี้ไม่ได้: คอมพิวเตอร์สตรีมเป็น HEVC แต่อุปกรณ์นี้เล่นได้แค่ H.264","pad_watch_decode":"เล่นภาพที่นี่ไม่ได้","join_pad_ready":"คอนโทรลเลอร์ของคุณพร้อมแล้ว","join_check_unknown_short":"ไม่อยู่ในรายการ: ปุ่มอาจสลับกัน","join_full_to_play":"แตะเต็มหน้าจอเพื่อเล่นด้วยคอนโทรลเลอร์บนหน้าจอ","join_pad_none":"เชื่อมต่อคอนโทรลเลอร์ (USB หรือ Bluetooth) แล้วกดปุ่มใดก็ได้","join_pad_keys":"หรือใช้คีย์บอร์ด: WASD เคลื่อนที่, ลูกศร D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options","join_tv_back_hint":"กดปุ่มย้อนกลับบนรีโมตเพื่อแสดงปุ่ม","join_block_note":"{host} ปิดปุ่ม PS และ Create สำหรับเพื่อน","join_guide_title":"อีกขั้นตอนเดียวบนทีวี","join_guide_body":"กด PS บนคอนโทรลเลอร์หนึ่งครั้ง ทีวีจะถามว่า \"ใครกำลังใช้คอนโทรลเลอร์นี้?\" เลือกเล่นด่วนหรือผู้ใช้ของคุณเอง เจ้าของเกมไม่ต้องทำอะไร","join_guide_menus":"บนหน้าจอหลักของ PS5 มีแค่โฮสต์ที่ควบคุมเมนูได้ คอนโทรลเลอร์ของคุณใช้เล่นในเกม","join_guide_ok":"เข้าใจแล้ว","join_host_away":"โฮสต์หยุดเล่นแล้ว — กำลังรอให้เริ่มเล่นอีกครั้ง ({time})","join_reconnecting":"กำลังเชื่อมต่อใหม่…","join_reconnecting_left":"ที่ของคุณจะถูกเก็บไว้ {time}","pad_turn":"หมุนมือถือเป็นแนวนอน","join_game_label":"เกมของ {host}","join_title":"เข้าร่วมเกมของเพื่อน","join_title_body":"เล่นบน PS5 ของ {host} เป็นผู้เล่น 2, 3 หรือ 4","join_name_label":"ชื่อของคุณ","join_name_hint":"เพื่อนจะเห็นชื่อนี้เมื่อคุณขอเข้าร่วม","join_button":"เข้าร่วม"},"tr":{"usb_skipped_not_payload":"{name}: .elf veya .bin dosyası değil","usb_skipped_unknown":"{id}: artık payload listesinde değil","browser_unsupported":"Bunun için masaüstü uygulaması gerekir. Tarayıcıda çalışmaz.","video_recovered_notice":"Play geçen sefer görüntüyü başlatırken çöktü, bu yüzden görüntü artık ekran kartı olmadan çözülüyor (değiştirmek için Ayarlar › Pencere › Grafik › Donanımsal video çözme).","video_recovered_title":"Görüntü artık yazılımla çözülüyor","open_in_title":"PS5Upload uygulamasında açılsın mı?","open_in_body":"Bu cihazda PS5Upload uygulaması var mı? Bunu orada aç ya da tarayıcıda devam et.","open_in_app":"Uygulamada aç","open_in_browser":"Tarayıcıda devam et","open_in_remember":"Bu cihazda seçimimi hatırla","open_in_opening":"PS5Upload uygulaması açılıyor…","open_in_not_opened":"Bir şey olmadı mı? Uygulama bu cihazda olmayabilir.","open_in_again":"Tekrar dene","pad_8bitdo_no_xinput":"Bu 8BitDo'nun X-input modu yok. Bir tuş yanlışsa kumandayı kontrol et.","pad_8bitdo_how_switch":"arkadaki düğmeyi X'e getir, sonra Start'a bas","pad_8bitdo_how_startx":"kapat, sonra açmak için Start + X'e basılı tut","pad_8bitdo_how_receiver":"2.4G alıcısını ya da bir USB kablosu kullan","pad_8bitdo_how_manual":"nasıl yapılacağı kılavuzunda yazıyor","pad_8bitdo_xinput":"En iyi sonuç için 8BitDo'nu X-input moduna al: {how}.","rp_touch_left_stick":"Sol çubuk","rp_touch_right_stick":"Sağ çubuk","rp_touch_touchpad":"Dokunmatik yüzey","rp_menu":"Menü","rp_pad_step_lx":"Sol çubuğu sağa itin","rp_pad_step_ly":"Sol çubuğu aşağı itin","rp_pad_step_rx":"Sağ çubuğu sağa itin","rp_pad_step_ry":"Sağ çubuğu aşağı itin","join_check_bottom":"Alttaki yüz tuşuna bas (✕)","join_check_right":"Sağdaki yüz tuşuna bas (○)","join_check_left":"Soldaki yüz tuşuna bas (□)","join_check_top":"Üstteki yüz tuşuna bas (△)","rp_pad_press":"{name} tuşuna basın","join_check_saved":"Bu cihazda bu kumanda için kaydedildi. Aşağıda dene.","join_check_title":"Kumandanı kontrol et","join_done":"Tamam","rp_pads_none":"Henüz kumanda görülmedi. Bir tane bağlayın ve herhangi bir tuşuna basın.","rp_pad_mapped":"Sizin eşlemenizle oynuyor","join_check_unknown":"Bu kumanda listemizde yok, bu yüzden tuşları karışık olabilir. Ayarlamak birkaç saniye sürer.","rp_pad_standard":"Tanındı","rp_pad_progress":"{n} / {total}","rp_pad_skip":"Atla","rp_pad_back":"Geri","rp_pad_cancel":"İptal","join_check_try":"Tuşlara bas ve çubukları oynat: bastığın şey yanar.","join_check_redo":"Yeniden yap","join_check_map":"Tuşları ayarla","rp_pad_reset":"Sıfırla","join_open_lan_body":"İnternete ulaşamıyor musun? Arkadaşınla aynı Wi-Fi'daysan oyunu orada aç.","join_open_lan":"Bu Wi-Fi'da aç","join_path_lan":"Ev ağı","join_path_internet":"İnternet","join_seat_taken":"{host} kumandasını geri istedi ve PS5'te boş başka kumanda yoktu, bu yüzden oyundan çıktın. {host} adlı kişiden seni tekrar almasını iste.","join_refused_key":"Bu davetin süresi doldu. {host} kullanıcısından yeni bir bağlantı iste.","join_refused_expired":"Oyundaki yerin gitti. {host} seni yeniden alsın diye iste.","join_refused_full":"Oyun dolu: zaten dört oyuncu var.","join_refused_denied":"{host} bu sefer seni içeri almadı.","join_refused_no_answer":"{host} zamanında yanıt vermedi. {host} kişisine haber ver, sonra yeniden dene.","join_refused_closed":"{host} şu anda Birlikte Oyna açmıyor.","join_refused_old_helper":"Birlikte Oyna için {host} adlı kişinin PS5'inde yardımcının güncellenmesi gerekiyor.","join_refused_not_playing":"{host} şu anda oynamıyor. Önce Oyna'yı başlatmasını {host} kullanıcısından iste.","join_refused_unreachable":"{host} adlı kişinin bilgisayarı PS5'e ulaşamadı. Biraz sonra tekrar dene.","join_refused_slow_down":"Çok fazla yanlış kod. Bir dakika bekle, sonra tekrar dene.","join_refused_address":"Bu bağlantının adresi ev ağınızın dışında olduğundan uygulama bunu kullanmaz. {host} kullanıcısından bilgisayarının IP adresini içeren bir bağlantı isteyin.","join_refused_other":"{host} seni içeri almadı.","join_ended_kicked":"{host} seni oyundan çıkardı.","join_ended_closed":"{host}, Birlikte Oyna'yı kapattı.","join_ended_host_stopped":"Ev sahibi oynamayı bıraktı.","join_ended_replaced":"Bu oyun başka bir sekmede veya cihazda açıldı, bu yüzden burada durdu.","join_ended_pad_lost":"PS5 kumandanı kaybetti, bu yüzden oyundan çıktın. {host} seni yeniden alsın diye iste.","join_ended_gave_up":"{host} ile bağlantı zamanında geri gelmedi.","join_net_lost":"{host} ile bağlantı koptu. İnternet bağlantını kontrol et, sonra yeniden iste.","join_ended_lost":"{host} kullanıcısına ulaşılamadı. Aynı ağda olduğunuzu kontrol et.","join_ended_left":"Oyundan ayrıldın.","join_net_mismatch":"Bu bağlantı ev sahibiyle eşleşmiyor; ondan yeni bir bağlantı iste.","join_net_no_direct":"Bu ağdan doğrudan bağlantı mümkün değil (iki tarafın yönlendiricisi de katı). Mobil veri yerine Wi-Fi dene ya da ev sahibinden UPnP'yi açmasını iste.","join_net_no_room":"Bu davet artık açık değil. {host} kullanıcısından yeni bir bağlantı iste.","join_net_full":"{host} kullanıcısının oyununda şu an başka bir arkadaşa yer yok. Biraz sonra tekrar dene.","join_net_no_hub":"PS5Upload davet hizmetine ulaşılamadı. İnternet bağlantını kontrol et, sonra tekrar dene.","join_net_offer":"{host} kullanıcısının bilgisayarı bu tarayıcıya bağlanamadı. Başka bir tarayıcı dene.","join_net_no_webrtc":"Bu tarayıcı doğrudan bağlantı kuramıyor. Güncel bir Chrome, Safari veya Firefox dene.","join_cancel":"İptal","join_host_fallback":"arkadaşın","join_connecting":"Bağlanılıyor: {host}…","join_waiting":"{host} seni içeri alsın diye bekleniyor","join_waiting_body":"{host} adını ekranında görür ve İzin ver'e dokunur.","join_retry":"Tekrar dene","join_again":"Tekrar katılmak iste","join_playing_at":"Oynadığın yer: {host}","join_you_are":"Sen {n}. Oyuncusun","join_seat_stream":"{host} adlı kişinin PS5 kullanıcısıyla oynuyorsun. Kullanıcı seçmene gerek yok.","join_plays_as":"{profile} olarak oynuyorsunuz. Seçim yapmanıza gerek yok.","join_seat_tv_asks":"{host} sizin için bir profil seçti ama kullanılamadı. TV kim olduğunuzu soracak.","join_picking":"PS'ye bas, sonra televizyonda Hızlı Oyna'yı seç","join_hide_controls":"Gizle","join_sound":"Ses için dokun","rp_unmute":"Sesi aç","rp_mute":"Sessiz","join_no_sound":"Bu tarayıcıda ses yok","join_exit_fullscreen":"Tam ekrandan çık","pad_fill":"Tam ekran","join_leave":"Ayrıl","join_show_controls":"Kontrolleri göster","join_hold_hint":"Düğmeleri göstermek için görüntüye basılı tut","pad_watch_no_hevc":"Bu cihaz bu yayının görüntüsünü oynatamıyor: bilgisayar HEVC yayınlıyor, bu cihaz yalnızca H.264 oynatıyor.","pad_watch_decode":"Görüntü burada oynatılamadı.","join_pad_ready":"Kumandan hazır","join_check_unknown_short":"Listemizde yok: tuşlar karışık olabilir.","join_full_to_play":"Ekran kumandasıyla oynamak için Tam ekran'a dokun.","join_pad_none":"Bir kumanda bağla (USB veya Bluetooth) ve herhangi bir tuşa bas.","join_pad_keys":"Ya da klavyeyi kullan: WASD hareket, ok tuşları yön tuşları, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Düğmeleri görmek için kumandada Geri'ye bas.","join_block_note":"{host}, arkadaşlar için PS ve Create tuşlarını kapattı.","join_guide_title":"Televizyonda bir adım daha","join_guide_body":"Kumandandaki PS tuşuna bir kez bas. Televizyon \"Bu kumandayı kim kullanıyor?\" diye sorar. Hızlı Oyna'yı ya da kendi kullanıcını seç. Ev sahibinin bir şey yapması gerekmez.","join_guide_menus":"PS5 ana ekranında menüleri yalnızca ev sahibi kontrol eder; senin kumandan oyunların içinde çalışır.","join_guide_ok":"Anladım","join_host_away":"Ev sahibi oynamayı bıraktı — yeniden başlaması bekleniyor ({time})","join_reconnecting":"Yeniden bağlanıyor…","join_reconnecting_left":"Yerin {time} boyunca tutuluyor.","pad_turn":"Telefonu yan çevirin","join_game_label":"{host} adlı kişinin oyunu","join_title":"Bir arkadaşının oyununa katıl","join_title_body":"{host} adlı kişinin PS5'inde 2., 3. veya 4. Oyuncu olarak oyna.","join_name_label":"Adın","join_name_hint":"Katılmak istediğinde arkadaşın bunu görür.","join_button":"Katıl"},"vi":{"usb_skipped_not_payload":"{name}: không phải tệp .elf hoặc .bin","usb_skipped_unknown":"{id}: không còn trong danh sách payload","browser_unsupported":"Việc này cần ứng dụng máy tính. Không hoạt động trong trình duyệt.","video_recovered_notice":"Lần trước Play bị sập khi bắt đầu hình, nên giờ hình được giải mã không dùng card đồ họa (đổi trong Cài đặt › Cửa sổ › Đồ họa › Giải mã video bằng phần cứng).","video_recovered_title":"Hình giờ được giải mã bằng phần mềm","open_in_title":"Mở trong ứng dụng PS5Upload?","open_in_body":"Thiết bị này có ứng dụng PS5Upload? Mở trong ứng dụng, hoặc tiếp tục trên trình duyệt.","open_in_app":"Mở trong ứng dụng","open_in_browser":"Tiếp tục trên trình duyệt","open_in_remember":"Nhớ lựa chọn của tôi trên thiết bị này","open_in_opening":"Đang mở ứng dụng PS5Upload…","open_in_not_opened":"Không có gì xảy ra? Có thể thiết bị này chưa có ứng dụng.","open_in_again":"Thử lại","pad_8bitdo_no_xinput":"8BitDo này không có chế độ X-input. Nếu có nút sai, hãy kiểm tra tay cầm.","pad_8bitdo_how_switch":"gạt công tắc phía sau sang X, rồi nhấn Start","pad_8bitdo_how_startx":"tắt tay cầm, rồi giữ Start + X để bật lại","pad_8bitdo_how_receiver":"dùng bộ thu 2.4G của nó hoặc cáp USB","pad_8bitdo_how_manual":"cách làm có trong sách hướng dẫn","pad_8bitdo_xinput":"Để chơi tốt nhất, hãy chuyển 8BitDo sang chế độ X-input: {how}.","rp_touch_left_stick":"Cần trái","rp_touch_right_stick":"Cần phải","rp_touch_touchpad":"Bàn di cảm ứng","rp_pad_step_lx":"Đẩy cần trái sang phải","rp_pad_step_ly":"Đẩy cần trái xuống dưới","rp_pad_step_rx":"Đẩy cần phải sang phải","rp_pad_step_ry":"Đẩy cần phải xuống dưới","join_check_bottom":"Nhấn nút mặt phía dưới (✕)","join_check_right":"Nhấn nút mặt bên phải (○)","join_check_left":"Nhấn nút mặt bên trái (□)","join_check_top":"Nhấn nút mặt phía trên (△)","rp_pad_press":"Nhấn {name}","join_check_saved":"Đã lưu cho tay cầm này trên thiết bị này. Thử ngay bên dưới.","join_check_title":"Kiểm tra tay cầm","join_done":"Xong","rp_pads_none":"Chưa thấy tay cầm nào. Hãy kết nối một tay cầm và nhấn nút bất kỳ.","rp_pad_mapped":"Chơi theo cách gán nút của bạn","join_check_unknown":"Tay cầm này không có trong danh sách của chúng tôi nên các nút có thể bị lẫn. Thiết lập chỉ mất vài giây.","rp_pad_standard":"Đã nhận diện","rp_pad_progress":"{n}/{total}","rp_pad_skip":"Bỏ qua","rp_pad_back":"Quay lại","rp_pad_cancel":"Hủy","join_check_try":"Nhấn nút và di chuyển cần: nút bạn nhấn sẽ sáng lên.","join_check_redo":"Làm lại","join_check_map":"Thiết lập nút","rp_pad_reset":"Đặt lại","join_open_lan_body":"Không vào được internet? Nếu bạn dùng cùng Wi-Fi với bạn mình, hãy mở trò chơi ở đó.","join_open_lan":"Mở trên Wi-Fi này","join_path_lan":"Mạng nhà","join_seat_taken":"{host} cần lấy lại tay cầm và trên PS5 không còn tay cầm nào trống, nên bạn đã rời trò chơi. Hãy nhờ {host} cho bạn vào lại.","join_refused_key":"Lời mời này đã hết hạn. Hãy xin {host} liên kết mới.","join_refused_expired":"Bạn đã mất chỗ trong trò chơi. Hãy nhờ {host} cho vào lại.","join_refused_full":"Trò chơi đã đủ người: đã có bốn người chơi.","join_refused_denied":"Lần này {host} chưa cho bạn vào.","join_refused_no_answer":"{host} không trả lời kịp. Hãy báo {host}, rồi thử lại.","join_refused_closed":"{host} hiện không mở Chơi cùng nhau.","join_refused_old_helper":"PS5 của {host} cần cập nhật trình trợ giúp để Chơi cùng nhau.","join_refused_not_playing":"{host} hiện không chơi. Hãy nhờ {host} bắt đầu Chơi trước.","join_refused_unreachable":"Máy tính của {host} không kết nối được với PS5. Hãy thử lại sau giây lát.","join_refused_slow_down":"Nhập sai mã quá nhiều lần. Hãy đợi một phút rồi thử lại.","join_refused_address":"Địa chỉ của liên kết này nằm ngoài mạng gia đình nên ứng dụng sẽ không dùng. Hãy nhờ {host} gửi liên kết có địa chỉ IP của máy tính.","join_refused_other":"{host} không cho bạn vào.","join_ended_kicked":"{host} đã mời bạn ra khỏi trò chơi.","join_ended_closed":"{host} đã đóng Chơi cùng nhau.","join_ended_host_stopped":"Chủ phòng đã dừng chơi.","join_ended_replaced":"Trò chơi này đã được mở ở tab khác hoặc thiết bị khác, nên đã dừng ở đây.","join_ended_pad_lost":"PS5 đã mất tay cầm của bạn, nên bạn đã ra khỏi trò chơi. Hãy nhờ {host} cho vào lại.","join_ended_gave_up":"Kết nối tới {host} không trở lại kịp.","join_net_lost":"Kết nối tới {host} đã bị ngắt. Hãy kiểm tra kết nối internet, rồi xin vào lại.","join_ended_lost":"Không liên lạc được với {host}. Hãy kiểm tra hai bên có cùng mạng không.","join_ended_left":"Bạn đã rời trò chơi.","join_net_mismatch":"Liên kết này không khớp với chủ phòng; hãy xin họ một liên kết mới.","join_net_no_direct":"Không thể kết nối trực tiếp từ mạng này (bộ định tuyến của cả hai bên đều chặt). Hãy thử Wi-Fi thay cho dữ liệu di động, hoặc nhờ chủ phòng bật UPnP.","join_net_no_room":"Lời mời này không còn mở. Hãy xin {host} một liên kết mới.","join_net_full":"Trò chơi của {host} hiện không còn chỗ cho thêm một người bạn. Hãy thử lại sau giây lát.","join_net_no_hub":"Không liên lạc được với dịch vụ lời mời của PS5Upload. Hãy kiểm tra kết nối internet rồi thử lại.","join_net_offer":"Máy tính của {host} không kết nối được với trình duyệt này. Hãy thử trình duyệt khác.","join_net_no_webrtc":"Trình duyệt này không thể tạo kết nối trực tiếp. Hãy thử Chrome, Safari hoặc Firefox bản mới.","join_cancel":"Hủy","join_host_fallback":"bạn của bạn","join_connecting":"Đang kết nối tới {host}…","join_waiting":"Đang chờ {host} cho bạn vào","join_waiting_body":"{host} sẽ thấy tên bạn trên màn hình và chạm Cho phép.","join_retry":"Thử lại","join_again":"Xin vào lại","join_playing_at":"Đang chơi ở chỗ {host}","join_you_are":"Bạn là Người chơi {n}","join_seat_stream":"Bạn đang chơi bằng người dùng PS5 của {host}. Không cần chọn người dùng.","join_plays_as":"Bạn đang chơi bằng {profile}. Không cần chọn.","join_seat_tv_asks":"{host} đã chọn một hồ sơ cho bạn nhưng không dùng được. TV sẽ hỏi bạn là ai.","join_picking":"Bấm PS, rồi chọn Chơi nhanh trên TV","join_hide_controls":"Ẩn","join_sound":"Chạm để bật tiếng","rp_unmute":"Bật âm thanh","rp_mute":"Tắt tiếng","join_no_sound":"Trình duyệt này không phát được âm thanh","join_exit_fullscreen":"Thoát toàn màn hình","pad_fill":"Toàn màn hình","join_leave":"Rời đi","join_show_controls":"Hiện các nút điều khiển","join_hold_hint":"Nhấn giữ hình ảnh để hiện các nút","pad_watch_no_hevc":"Thiết bị này không phát được hình của stream này: máy tính truyền HEVC, còn thiết bị này chỉ phát H.264.","pad_watch_decode":"Không phát được hình ở đây.","join_pad_ready":"Tay cầm của bạn đã sẵn sàng","join_check_unknown_short":"Không có trong danh sách: các nút có thể bị lẫn.","join_full_to_play":"Chạm toàn màn hình để chơi bằng tay cầm trên màn hình.","join_pad_none":"Kết nối tay cầm (USB hoặc Bluetooth) rồi bấm nút bất kỳ.","join_pad_keys":"Hoặc dùng bàn phím: WASD di chuyển, phím mũi tên D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Nhấn Quay lại trên điều khiển từ xa để hiện các nút.","join_block_note":"{host} đã tắt PS và Create với bạn bè.","join_guide_title":"Thêm một bước trên TV","join_guide_body":"Bấm PS một lần trên tay cầm. TV sẽ hỏi \"Ai đang dùng tay cầm này?\". Chọn Chơi nhanh hoặc người dùng của bạn. Chủ phòng không cần làm gì.","join_guide_menus":"Trên màn hình chính PS5 chỉ chủ phòng điều khiển menu; tay cầm của bạn chơi bên trong trò chơi.","join_guide_ok":"Đã hiểu","join_host_away":"Chủ phòng đã dừng chơi — đang chờ họ chơi lại ({time})","join_reconnecting":"Đang kết nối lại…","join_reconnecting_left":"Chỗ của bạn được giữ trong {time}.","pad_turn":"Xoay ngang điện thoại","join_game_label":"Trò chơi của {host}","join_title":"Vào trò chơi của bạn bè","join_title_body":"Chơi trên PS5 của {host} với vai Người chơi 2, 3 hoặc 4.","join_name_label":"Tên của bạn","join_name_hint":"Bạn bè sẽ thấy tên này khi bạn xin vào.","join_button":"Vào chơi"},"zh-CN":{"usb_skipped_not_payload":"{name}:不是 .elf 或 .bin 文件","usb_skipped_unknown":"{id}:已不在 Payload 列表中","browser_unsupported":"这需要桌面应用,无法在浏览器中使用。","video_recovered_notice":"上次 Play 在开始显示画面时崩溃,因此画面现在不使用显卡解码(可在 设置 › 窗口 › 图形 › 硬件视频解码 中更改)。","video_recovered_title":"画面现由软件解码","open_in_title":"在 PS5Upload 应用中打开?","open_in_body":"这台设备装了 PS5Upload 应用?可以在应用中打开,或继续使用浏览器。","open_in_app":"在应用中打开","open_in_browser":"继续使用浏览器","open_in_remember":"在此设备上记住我的选择","open_in_opening":"正在打开 PS5Upload 应用…","open_in_not_opened":"没有反应?这台设备可能没有安装应用。","open_in_again":"重试","pad_8bitdo_no_xinput":"这款 8BitDo 没有 X-input 模式。如果有按键不对,请检查手柄。","pad_8bitdo_how_switch":"把背面的开关拨到 X,然后按 Start","pad_8bitdo_how_startx":"先关机,然后按住 Start + X 开机","pad_8bitdo_how_receiver":"使用它的 2.4G 接收器或 USB 线","pad_8bitdo_how_manual":"方法见其说明书","pad_8bitdo_xinput":"为获得最佳效果,请将 8BitDo 切换到 X-input 模式:{how}。","rp_touch_left_stick":"左摇杆","rp_touch_right_stick":"右摇杆","rp_touch_touchpad":"触摸板","rp_menu":"菜单","rp_pad_step_lx":"将左摇杆推向右","rp_pad_step_ly":"将左摇杆推向下","rp_pad_step_rx":"将右摇杆推向右","rp_pad_step_ry":"将右摇杆推向下","join_check_bottom":"按下方的功能键 (✕)","join_check_right":"按右侧的功能键 (○)","join_check_left":"按左侧的功能键 (□)","join_check_top":"按上方的功能键 (△)","rp_pad_press":"按 {name}","join_check_saved":"已在此设备上为这个手柄保存。可在下方试用。","join_check_title":"检查你的手柄","join_done":"完成","rp_pads_none":"还没有检测到手柄。请连接一个手柄并按任意按钮。","rp_pad_mapped":"使用你的按键映射","join_check_unknown":"这个手柄不在我们的列表中,按键可能会错位。设置只需几秒钟。","rp_pad_standard":"已识别","rp_pad_progress":"{n}/{total}","rp_pad_skip":"跳过","rp_pad_back":"返回","rp_pad_cancel":"取消","join_check_try":"按下按键、推动摇杆:按下的部分会亮起。","join_check_redo":"重新设置","join_check_map":"设置按键","rp_pad_reset":"重置","join_open_lan_body":"连不上互联网?如果你和朋友在同一个 Wi-Fi 上,就在那里打开游戏。","join_open_lan":"在此 Wi-Fi 上打开","join_path_lan":"家庭网络","join_path_internet":"互联网","join_seat_taken":"{host} 需要收回手柄,而 PS5 上没有其他空闲手柄,所以你已退出游戏。请 {host} 再次让你加入。","join_refused_key":"此邀请已过期。请向 {host} 要一个新链接。","join_refused_expired":"你在游戏中的位置已失去。请让 {host} 再次放你进去。","join_refused_full":"游戏已满:已经有四名玩家。","join_refused_denied":"{host} 这次没有让你加入。","join_refused_no_answer":"{host} 没有及时响应。请告诉 {host},然后重试。","join_refused_closed":"{host} 目前没有开启一起畅玩。","join_refused_old_helper":"{host} 的 PS5 需要更新助手才能一起畅玩。","join_refused_not_playing":"{host} 现在没在玩。请让 {host} 先开始畅玩。","join_refused_unreachable":"{host} 的电脑无法连接到其 PS5。请稍后再试。","join_refused_slow_down":"错误的代码太多。请等一分钟后再试。","join_refused_address":"此链接的地址不在你的家庭网络内,因此应用不会使用它。请向 {host} 索取包含其电脑 IP 地址的链接。","join_refused_other":"{host} 没有让你加入。","join_ended_kicked":"{host} 已将你移出游戏。","join_ended_closed":"{host} 已关闭一起畅玩。","join_ended_host_stopped":"房主已停止游戏。","join_ended_replaced":"这场游戏在另一个标签页或另一台设备上打开了,所以这里已停止。","join_ended_pad_lost":"PS5 丢失了你的手柄,所以你已退出游戏。请让 {host} 再次放你进去。","join_ended_gave_up":"与 {host} 的连接未能及时恢复。","join_net_lost":"与 {host} 的连接已断开。请检查你的互联网连接,然后重新请求。","join_ended_lost":"无法连接到 {host}。请检查你们是否在同一网络。","join_ended_left":"你已离开游戏。","join_net_mismatch":"此链接与主机不匹配;请向对方要一个新链接。","join_net_no_direct":"无法从此网络直接连接(双方的路由器都很严格)。请改用 Wi-Fi 而不是移动数据,或请主机打开 UPnP。","join_net_no_room":"此邀请已失效。请向 {host} 要一个新链接。","join_net_full":"{host} 的游戏现在没有位置再加一位朋友。请稍后再试。","join_net_no_hub":"无法连接 PS5Upload 邀请服务。请检查网络连接后重试。","join_net_offer":"{host} 的电脑无法连接到此浏览器。请换一个浏览器试试。","join_net_no_webrtc":"此浏览器无法建立直接连接。请使用较新版本的 Chrome、Safari 或 Firefox。","join_cancel":"取消","join_host_fallback":"你的好友","join_connecting":"正在连接 {host}…","join_waiting":"正在等待 {host} 让你加入","join_waiting_body":"{host} 会在屏幕上看到你的名字并点按“允许”。","join_retry":"重试","join_again":"再次请求加入","join_playing_at":"正在 {host} 那里玩","join_you_are":"你是玩家 {n}","join_seat_stream":"你正在以 {host} 的 PS5 用户身份游玩,无需选择用户。","join_plays_as":"你正在以 {profile} 的身份游玩,无需选择。","join_seat_tv_asks":"{host} 为你选择了个人资料,但无法使用。电视会询问你是谁。","join_picking":"按 PS 键,然后在电视上选择“快速游戏”","join_hide_controls":"隐藏","join_sound":"点按开启声音","rp_unmute":"开启声音","rp_mute":"静音","join_no_sound":"此浏览器无法播放声音","join_exit_fullscreen":"退出全屏","pad_fill":"全屏","join_leave":"离开","join_show_controls":"显示控制按钮","join_hold_hint":"长按画面以显示按钮","pad_watch_no_hevc":"此设备无法播放这个串流的画面:电脑以 HEVC 串流,而此设备只能播放 H.264。","pad_watch_decode":"无法在这里播放画面。","join_pad_ready":"你的手柄已就绪","join_check_unknown_short":"不在我们的列表中:按键可能错位。","join_full_to_play":"点按全屏,即可用屏幕手柄游玩。","join_pad_none":"连接手柄(USB 或 Bluetooth),然后按任意键。","join_pad_keys":"也可以用键盘:WASD 移动,方向键为十字键,Enter ✕,Backspace ○,Q □,E △,Tab Options。","join_tv_back_hint":"按遥控器上的返回键显示按钮。","join_block_note":"{host} 已为好友关闭 PS 和 Create 键。","join_guide_title":"电视上还差一步","join_guide_body":"在手柄上按一次 PS 键。电视会询问“谁在使用这个手柄?”。选择“快速游戏”或你自己的用户。主机玩家无需任何操作。","join_guide_menus":"在 PS5 主屏幕上只有房主能操作菜单;你的手柄在游戏里使用。","join_guide_ok":"知道了","join_host_away":"房主已停止游戏 — 正在等待对方重新开始({time})","join_reconnecting":"正在重新连接…","join_reconnecting_left":"你的位置会保留 {time}。","pad_turn":"请横放手机","join_game_label":"{host} 的游戏","join_title":"加入好友的游戏","join_title_body":"在 {host} 的 PS5 上作为玩家 2、3 或 4 游玩。","join_name_label":"你的名字","join_name_hint":"你请求加入时,好友会看到这个名字。","join_button":"加入"},"zh-TW":{"usb_skipped_not_payload":"{name}:不是 .elf 或 .bin 檔案","usb_skipped_unknown":"{id}:已不在 Payload 清單中","browser_unsupported":"這需要桌面應用程式,無法在瀏覽器中使用。","video_recovered_notice":"上次 Play 在開始顯示畫面時當掉,因此畫面現在不使用顯示卡解碼(可在 設定 › 視窗 › 圖形 › 硬體視訊解碼 中變更)。","video_recovered_title":"畫面現改由軟體解碼","open_in_title":"在 PS5Upload 應用程式中開啟?","open_in_body":"這台裝置有 PS5Upload 應用程式?可以在應用程式中開啟,或繼續使用瀏覽器。","open_in_app":"在應用程式中開啟","open_in_browser":"繼續使用瀏覽器","open_in_remember":"在此裝置上記住我的選擇","open_in_opening":"正在開啟 PS5Upload 應用程式…","open_in_not_opened":"沒有反應?這台裝置可能沒有安裝應用程式。","open_in_again":"重試","pad_8bitdo_no_xinput":"這款 8BitDo 沒有 X-input 模式。如果有按鍵不對,請檢查控制器。","pad_8bitdo_how_switch":"把背面的開關撥到 X,然後按 Start","pad_8bitdo_how_startx":"先關機,然後按住 Start + X 開機","pad_8bitdo_how_receiver":"使用它的 2.4G 接收器或 USB 線","pad_8bitdo_how_manual":"方法請見其說明書","pad_8bitdo_xinput":"為獲得最佳效果,請將 8BitDo 切換到 X-input 模式:{how}。","rp_touch_left_stick":"左類比搖桿","rp_touch_right_stick":"右類比搖桿","rp_touch_touchpad":"觸控板","rp_menu":"選單","rp_pad_step_lx":"將左類比搖桿推向右","rp_pad_step_ly":"將左類比搖桿推向下","rp_pad_step_rx":"將右類比搖桿推向右","rp_pad_step_ry":"將右類比搖桿推向下","join_check_bottom":"按下方的功能鍵 (✕)","join_check_right":"按右側的功能鍵 (○)","join_check_left":"按左側的功能鍵 (□)","join_check_top":"按上方的功能鍵 (△)","rp_pad_press":"按下 {name}","join_check_saved":"已在此裝置上為這個控制器儲存。可在下方試用。","join_check_title":"檢查你的控制器","join_done":"完成","rp_pads_none":"尚未偵測到控制器。請連接一個控制器並按下任一按鈕。","rp_pad_mapped":"使用你的按鍵對應","join_check_unknown":"這個控制器不在我們的清單中,按鍵可能會錯位。設定只需幾秒鐘。","rp_pad_standard":"已辨識","rp_pad_progress":"{n}/{total}","rp_pad_skip":"略過","rp_pad_back":"返回","rp_pad_cancel":"取消","join_check_try":"按下按鍵、推動搖桿:按下的部分會亮起。","join_check_redo":"重新設定","join_check_map":"設定按鍵","rp_pad_reset":"重設","join_open_lan_body":"連不上網際網路?如果你和朋友在同一個 Wi-Fi 上,就在那裡開啟遊戲。","join_open_lan":"在此 Wi-Fi 上開啟","join_path_lan":"家用網路","join_path_internet":"網際網路","join_seat_taken":"{host} 需要收回控制器,而 PS5 上沒有其他空閒的控制器,所以你已離開遊戲。請 {host} 再次讓你加入。","join_refused_key":"此邀請已過期。請向 {host} 要一個新連結。","join_refused_expired":"你在遊戲中的位置已失去。請讓 {host} 再次放你進去。","join_refused_full":"遊戲已滿:已經有四名玩家。","join_refused_denied":"{host} 這次沒有讓你加入。","join_refused_no_answer":"{host} 沒有及時回應。請告訴 {host},然後再試一次。","join_refused_closed":"{host} 目前沒有開啟一起暢玩。","join_refused_old_helper":"{host} 的 PS5 需要更新助手才能一起暢玩。","join_refused_not_playing":"{host} 現在沒在玩。請讓 {host} 先開始暢玩。","join_refused_unreachable":"{host} 的電腦無法連線到其 PS5。請稍後再試。","join_refused_slow_down":"錯誤的代碼太多。請等一分鐘後再試。","join_refused_address":"此連結的位址不在你的家用網路內,因此應用程式不會使用它。請向 {host} 索取包含其電腦 IP 位址的連結。","join_refused_other":"{host} 沒有讓你加入。","join_ended_kicked":"{host} 已將你移出遊戲。","join_ended_closed":"{host} 已關閉一起暢玩。","join_ended_host_stopped":"房主已停止遊戲。","join_ended_replaced":"這場遊戲在另一個分頁或另一台裝置上開啟了,所以這裡已停止。","join_ended_pad_lost":"PS5 遺失了你的控制器,所以你已退出遊戲。請讓 {host} 再次放你進去。","join_ended_gave_up":"與 {host} 的連線未能及時恢復。","join_net_lost":"與 {host} 的連線已中斷。請檢查你的網際網路連線,然後重新要求。","join_ended_lost":"無法連線到 {host}。請確認你們是否在同一個網路。","join_ended_left":"你已離開遊戲。","join_net_mismatch":"這個連結與主機不符;請向對方要一個新連結。","join_net_no_direct":"無法從這個網路直接連線(雙方的路由器都很嚴格)。請改用 Wi-Fi 而非行動數據,或請主機開啟 UPnP。","join_net_no_room":"這個邀請已失效。請向 {host} 要一個新連結。","join_net_full":"{host} 的遊戲目前沒有位置再加一位朋友。請稍後再試。","join_net_no_hub":"無法連線到 PS5Upload 邀請服務。請檢查網路連線後再試一次。","join_net_offer":"{host} 的電腦無法連線到這個瀏覽器。請換個瀏覽器試試。","join_net_no_webrtc":"這個瀏覽器無法建立直接連線。請使用較新版本的 Chrome、Safari 或 Firefox。","join_cancel":"取消","join_host_fallback":"你的好友","join_connecting":"正在連線到 {host}…","join_waiting":"正在等待 {host} 讓你加入","join_waiting_body":"{host} 會在螢幕上看到你的名字並點選「允許」。","join_retry":"重試","join_again":"再次要求加入","join_playing_at":"正在 {host} 那裡玩","join_you_are":"你是玩家 {n}","join_seat_stream":"你正在以 {host} 的 PS5 使用者身分遊玩,不需要選擇使用者。","join_plays_as":"你正以 {profile} 的身分遊玩,無需選擇。","join_seat_tv_asks":"{host} 為你選了一個個人檔案,但無法使用。電視會詢問你是誰。","join_picking":"按下 PS,然後在電視上選擇「快速遊玩」","join_hide_controls":"隱藏","join_sound":"點一下開啟聲音","rp_unmute":"開啟聲音","rp_mute":"靜音","join_no_sound":"此瀏覽器無法播放聲音","join_exit_fullscreen":"離開全螢幕","pad_fill":"全螢幕","join_leave":"離開","join_show_controls":"顯示控制項","join_hold_hint":"長按畫面以顯示按鈕","pad_watch_no_hevc":"此裝置無法播放這個串流的畫面:電腦以 HEVC 串流,而此裝置只能播放 H.264。","pad_watch_decode":"無法在這裡播放畫面。","join_pad_ready":"你的控制器已就緒","join_check_unknown_short":"不在我們的清單中:按鍵可能錯位。","join_full_to_play":"點一下全螢幕,即可用螢幕上的控制器遊玩。","join_pad_none":"連接控制器(USB 或 Bluetooth),然後按任意按鈕。","join_pad_keys":"也可以用鍵盤:WASD 移動,方向鍵為十字鍵,Enter ✕,Backspace ○,Q □,E △,Tab Options。","join_tv_back_hint":"按遙控器上的返回鍵以顯示按鈕。","join_block_note":"{host} 已為好友關閉 PS 和 Create 按鈕。","join_guide_title":"電視上還差一步","join_guide_body":"在控制器上按一次 PS 按鈕。電視會詢問「誰在使用這支控制器?」。選擇「快速遊玩」或你自己的使用者。主持人不需要任何操作。","join_guide_menus":"在 PS5 主畫面上只有房主能操作選單;你的控制器在遊戲裡使用。","join_guide_ok":"知道了","join_host_away":"房主已停止遊戲 — 正在等待對方重新開始({time})","join_reconnecting":"正在重新連線…","join_reconnecting_left":"你的位置會保留 {time}。","pad_turn":"請橫放手機","join_game_label":"{host} 的遊戲","join_title":"加入好友的遊戲","join_title_body":"在 {host} 的 PS5 上以玩家 2、3 或 4 的身分遊玩。","join_name_label":"你的名字","join_name_hint":"你要求加入時,好友會看到這個名字。","join_button":"加入"}}),ke=new Set([`ar`,`fa`]);function Ae(){let e=Object.keys(Oe);try{let t=localStorage.getItem(`ps5upload.lang`);if(t&&e.includes(t))return t}catch{}let t=typeof navigator>`u`?[]:[...navigator.languages??[],navigator.language];for(let n of t){if(!n)continue;if(e.includes(n))return n;let t=n.split(`-`)[0],r=e.find(e=>e===t);if(r)return r;if(t===`zh`)return/TW|HK|MO|Hant/i.test(n)?`zh-TW`:`zh-CN`;let i=e.find(e=>e.split(`-`)[0]===t);if(i)return i}return`en`}var je=Ae();typeof document<`u`&&(document.documentElement.lang=je,document.documentElement.dir=ke.has(je)?`rtl`:`ltr`);var Me=Oe[je]??{},Ne=Oe.en??{},Pe=(e,t)=>t?e.replace(/\{(\w+)\}/g,(e,n)=>n in t?String(t[n]):e):e,Fe=((e,t,n)=>{let r=typeof t==`string`?void 0:t,i=typeof t==`string`?t:n;return Pe(Me[e]??Ne[e]??i??e,r)});function Ie(){return Fe}var Le=4e3;function Re(e,t,n=`lan`){let r=new URLSearchParams(e.replace(/^#/,``)).get(n);if(!r)return null;try{let e=new URL(r),n=e.origin+e.pathname;return/^https?:$/.test(e.protocol)&&r===n&&RegExp(`/${t}/?$`).test(e.pathname)?n:null}catch{return null}}function ze(e,t){return t.key?`${e}#i=${encodeURIComponent(t.key)}`:t.watch?`${e}#w=1`:e}function Be(e,t=Le,n=typeof WebSocket>`u`?void 0:WebSocket){return new Promise(r=>{try{let i=new n(e),a=e=>{clearTimeout(o),i.onopen=i.onclose=i.onerror=null,i.close(),r(e)},o=setTimeout(()=>a(!1),t);i.onopen=()=>a(!0),i.onclose=i.onerror=()=>a(!1)}catch{r(!1)}})}var Ve=[`mismatch`,`no_direct`,`no_room`,`net_full`,`no_hub`,`offer`,`no_webrtc`],He=4100;function Ue(e){if(!e||e.code!==4100||typeof e.reason!=`string`||!e.reason.startsWith(`net:`))return null;let t=e.reason.slice(4);return Ve.includes(t)?t:null}var We=new Set([`key`,`expired`,`full`,`denied`,`no_answer`,`closed`,`old_helper`,`not_playing`,`unreachable`,`slow_down`,`address`,`seat_taken`]),Ge={kicked:`kicked`,host_stopped:`host_stopped`,replaced:`replaced`,lost:`pad_lost`,seat_taken:`seat_taken`},Ke=new Set([`asking`,`picking_user`,`playing`,`reconnecting`,`left`]),qe=e=>Math.max(0,Math.min(255,Math.round(Number(e)||0)));function Je(e){let t;try{let n=JSON.parse(e);if(!n||typeof n!=`object`)return null;t=n}catch{return null}if(typeof t.pong==`number`)return{kind:`pong`,t:t.pong};if(t.stage===`asking`)return{kind:`asking`};if(t.stage===`waiting`)return{kind:`waiting`};if(t.stage===`joined`&&typeof t.player==`number`&&typeof t.token==`string`)return{kind:`joined`,player:t.player,token:t.token,hevc:t.hevc===!0,track:t.track===!0,audio:t.audio===!0};if(t.stage===`refused`){let e=String(t.why??``);return{kind:`refused`,why:We.has(e)?e:`refused`}}if(typeof t.bye==`string`)return{kind:`bye`,why:Object.prototype.hasOwnProperty.call(Ge,t.bye)?Ge[t.bye]:`closed`};if(t.status&&typeof t.status==`object`){let e=t.status,n=typeof e.state==`string`&&Ke.has(e.state)?e.state:null;return{kind:`status`,status:{player:typeof e.player==`number`?e.player:0,state:n,rttMs:typeof e.rtt_ms==`number`?e.rtt_ms:null,host:typeof e.host==`string`&&e.host?e.host:null,blockSystem:e.block_system===!0,streamSeat:e.stream_seat===!0,playsAs:typeof e.plays_as==`string`&&e.plays_as?e.plays_as:null,seatNote:typeof e.seat_note==`string`&&e.seat_note?e.seat_note:null}}}let n=Array.isArray(t.rumble)?[qe(t.rumble[0]),qe(t.rumble[1])]:null,r=Array.isArray(t.light)?[qe(t.light[0]),qe(t.light[1]),qe(t.light[2])]:null;return n||r?{kind:`feedback`,rumble:n,light:r}:null}function Ye(e){return Math.max(-32768,Math.min(32767,Math.round(e)))+32768>>8}function Xe([e,t]){return[Math.max(0,Math.min(1919,Math.round(e))),Math.max(0,Math.min(1079,Math.round(t*1079/941)))]}function Ze(e,t){let n=t.touch?[[0,...Xe(t.touch)]]:[],r=t.motion??null,i=16+n.length*5+(r?25:0),a=new ArrayBuffer(i),o=new DataView(a),s=0;o.setUint8(s++,1),o.setUint32(s,e>>>0,!0),s+=4,o.setUint32(s,t.buttons>>>0,!0),s+=4;for(let e of[t.lx,t.ly,t.rx,t.ry])o.setUint8(s++,Ye(e));o.setUint8(s++,qe(t.l2)),o.setUint8(s++,qe(t.r2)),o.setUint8(s++,n.length);for(let[e,t,r]of n)o.setUint8(s++,e),o.setUint16(s,t,!0),s+=2,o.setUint16(s,r,!0),s+=2;if(r){o.setUint8(s++,2);for(let e of[...r.gyro,...r.accel])o.setFloat32(s,e/1e3,!0),s+=4}return new Uint8Array(a)}function Qe(e){return Math.min(4e3,250*2**Math.max(0,Math.min(e,10)))}var $e=6e4,et=6e4;function tt(e){return e&&/^[0-9A-Fa-f]{2}(:[0-9A-Fa-f]{2}){31}$/.test(e)?e.toUpperCase():null}function nt(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=t.get(`room`)??``,r=t.get(`k`)??``,i=t.get(`fp`)??``,a=t.get(`hub`)??``;return!/^[A-Za-z0-9_-]{22}$/.test(n)||!/^[A-Za-z0-9_-]{8,128}$/.test(r)||!tt(i)||!/^([A-Za-z0-9.-]{1,253}|\[[0-9A-Fa-f:.]{2,45}\])(:\d{1,5})?$/.test(a)?null:{room:n,key:r,fp:i.toUpperCase(),hub:a}}function rt(e){return`ps5upload://join?link=${encodeURIComponent(e)}`}function it(e){return e==null||!Number.isFinite(e)?`none`:e<60?`good`:e<120?`fair`:`slow`}function at(e){switch(e){case 1:return[0,0,255];case 2:return[255,0,0];case 3:return[0,255,0];default:return[255,0,255]}}var ot=(e,t)=>`#version 300 es precision mediump float; in vec2 uv; out vec4 o; @@ -268,7 +268,7 @@ ã/¸Äyf"Ÿ5TàyÊ0îEê²Þ—€m6ëÞè6ðÏâ§9ž¬„k=}¼àt<ž‚¦Mdžç6"p_î3, oO3p"pw÷´/(1ñøs.íA/&ÏUÃ_X™ÍpÕ1hÌ80E’Qö„ ow÷!x.™AÜ"¢j+惡¦¶®ä“R–ow÷!xꔊpn…â#ðù z AÍp\Ž0N˜HJê´ªØ^U -I€wu¸öôú!3å6³‹âVq£³¹´RN£%y10º:pŠ#\:J:b9Hµ7h_Ž:¢I9 _¼™µV,þ <`});var E={a:v};this.setModule=t=>{e.setModule(bi,t)},this.getModule=()=>e.getModule(bi),this.instantiate=()=>(this.getModule().then(e=>WebAssembly.instantiate(e,E)).then(e=>{let t=e.exports;y(t),a=t.g,o(),T(t),n()}),this.ready=new Promise(e=>{n=e}).then(()=>{this.HEAP=a.buffer,this.malloc=x,this.free=C,this.opus_frame_decoder_create=b,this.opus_frame_decode_float_deinterleaved=S,this.opus_frame_decoder_destroy=ee}),this)}var xi=o((()=>{}));function Si(e={}){Si.errors||Object.defineProperties(Si,{errors:{value:new Map([[-1,`OPUS_BAD_ARG: One or more invalid/out of range arguments`],[-2,`OPUS_BUFFER_TOO_SMALL: Not enough bytes allocated in the buffer`],[-3,`OPUS_INTERNAL_ERROR: An internal error was detected`],[-4,`OPUS_INVALID_PACKET: The compressed data passed is corrupted`],[-5,`OPUS_UNIMPLEMENTED: Invalid/unsupported request number`],[-6,`OPUS_INVALID_STATE: An encoder or decoder structure is invalid or already freed`],[-7,`OPUS_ALLOC_FAIL: Memory allocation has failed`]])}}),this._init=()=>new this._WASMAudioDecoderCommon(this).instantiate(this._EmscriptenWASM,this._module).then(e=>{this._common=e,this._inputBytes=0,this._outputSamples=0,this._frameNumber=0,this._input=this._common.allocateTypedArray(this._inputSize,Uint8Array),this._output=this._common.allocateTypedArray(this._outputChannels*this._outputChannelSize,Float32Array);let t=this._common.allocateTypedArray(this._channels,Uint8Array);t.buf.set(this._channelMappingTable),this._decoder=this._common.wasm.opus_frame_decoder_create(this._sampleRate,this._channels,this._streamCount,this._coupledStreamCount,t.ptr,this._preSkip,this._forceStereo)}),Object.defineProperty(this,"ready",{enumerable:!0,get:()=>this._ready}),this.reset=()=>(this.free(),this._init()),this.free=()=>{this._common.free(),this._common.wasm.opus_frame_decoder_destroy(this._decoder),this._common.wasm.free(this._decoder)},this._decode=e=>{if(!(e instanceof Uint8Array))throw Error(`Data to decode must be Uint8Array. Instead got `+typeof e);this._input.buf.set(e);let t=this._common.wasm.opus_frame_decode_float_deinterleaved(this._decoder,this._input.ptr,e.length,this._output.ptr),n;return t<0&&(n=`libopus `+t+` `+(Si.errors.get(t)||`Unknown Error`),console.error(n),t=0),{outputBuffer:this._common.getOutputChannels(this._output.buf,this._outputChannels,t),samplesDecoded:t,error:n}},this.decodeFrame=e=>{let t=[],n=this._decode(e);return n.error&&this._common.addError(t,n.error,e.length,this._frameNumber,this._inputBytes,this._outputSamples),this._frameNumber++,this._inputBytes+=e.length,this._outputSamples+=n.samplesDecoded,this._WASMAudioDecoderCommon.getDecodedAudioMultiChannel(t,[n.outputBuffer],this._outputChannels,n.samplesDecoded,this._sampleRate)},this.decodeFrames=e=>{let t=[],n=[],r=0,i=0;for(;itypeof e==`number`,n=e.sampleRate,r=e.channels,i=e.streamCount,a=e.coupledStreamCount,o=e.channelMappingTable,s=e.preSkip,c=+!!e.forceStereo;if(r>2&&(!t(i)||!t(a)||!Array.isArray(o)))throw Error(`Invalid Opus Decoder Options for multichannel decoding.`);return this._sampleRate=[8e3,12e3,16e3,24e3,48e3].includes(n)?n:48e3,this._channels=t(r)?r:2,this._streamCount=t(i)?i:1,this._coupledStreamCount=t(a)?a:this._channels-1,this._channelMappingTable=o||(this._channels===2?[0,1]:[0]),this._preSkip=s||0,this._forceStereo=r<=8&&r!=2?c:0,this._inputSize=3840*this._channels,this._outputChannelSize=5760,this._outputChannels=this._forceStereo?2:this._channels,this._ready=this._init(),this}var Ci=o((()=>{yi(),xi()})),wi,Ti=o((()=>{yi(),xi(),Ci(),wi=class extends hi{constructor(e){super(e,`opus-decoder`,Si,bi)}async decodeFrame(e){return this.postToDecoder(`decodeFrame`,e)}async decodeFrames(e){return this.postToDecoder(`decodeFrames`,e)}}})),Ei=c({OpusDecoder:()=>Si,OpusDecoderWebWorker:()=>wi}),Di=o((()=>{Ci(),Ti(),yi(),_i(Si,`OpusDecoder`),_i(wi,`OpusDecoderWebWorker`)})),Oi=[8e3,12e3,16e3,24e3,48e3],ki=null;function Ai(){return ki??=Xn(()=>Promise.resolve().then(()=>(Di(),Ei)),__VITE_PRELOAD__,import.meta.url).catch(e=>{throw ki=null,e}),ki}function ji(){return typeof WebAssembly==`object`&&typeof WebAssembly.instantiate==`function`}function Mi(e,t,n,r){return{numberOfFrames:t,numberOfChannels:e.length,sampleRate:n,timestamp:r,format:`f32-planar`,duration:Math.round(t/n*1e6),copyTo(n,r){n.set(e[r.planeIndex].subarray(0,t))},close(){}}}var Ni=class{constructor(e,t=Ai){this.init=e,this.load=t,this.state=`unconfigured`,this.dec=null,this.pending=[]}configure(e){if(this.state===`closed`)throw Error(`the decoder is closed`);if(!ji())throw Error(`no WebAssembly here`);let t=e.sampleRate;if(!Oi.includes(t))throw Error(`Opus does not decode at ${t} Hz`);let n=e.numberOfChannels;if(n<1||n>2)throw Error(`${n} channels: only mono and stereo are decoded`);this.state=`configured`,this.load().then(async e=>{if(this.state===`closed`)return;let r=new e.OpusDecoder({channels:n,sampleRate:t});if(await r.ready,this.state!==`configured`){r.free();return}this.dec=r;let i=this.pending;this.pending=[];for(let e of i)this.state===`configured`&&this.run(e)}).catch(e=>this.fail(e))}decode(e){if(this.state!==`configured`)return;let t=e;if(this.dec)return this.run(t);this.pending.push({timestamp:t.timestamp,data:t.data.slice()}),this.pending.length>50&&this.pending.shift()}run(e){let t=this.dec;if(!t)return;let n;try{n=t.decodeFrame(e.data)}catch(e){return this.fail(e)}n.samplesDecoded&&n.channelData.length&&this.init.output(Mi(n.channelData,n.samplesDecoded,n.sampleRate,e.timestamp))}fail(e){if(this.state===`closed`)return;this.close();let t=e instanceof Error?e:Error(String(e));queueMicrotask(()=>this.init.error(t))}close(){this.state=`closed`,this.pending=[];let e=this.dec;this.dec=null;try{e?.free()}catch{}}},Pi={makeDecoder:e=>new Ni(e),makeChunk:e=>({type:e.type,timestamp:e.timestamp,data:e.data instanceof Uint8Array?e.data:new Uint8Array(e.data)})};function Fi(e,t){for(let n=0;n+3>1&63;if(t>=16&&t<=21)return!0;if(t<16)return!1}else{let t=e[n+3]&31;if(t===5)return!0;if(t===1)return!1}}return!1}function Ii(e){for(let t=0;t+6e.toString(16).padStart(2,`0`);return`avc1.${n(e[t+4])}${n(e[t+5])}${n(e[t+6])}`}return`avc1.4d4028`}var Li=[`hev1.1.6.L153.B0`,`hvc1.1.6.L153.B0`,`hev1.2.4.L153.B0`,`hvc1.2.4.L153.B0`,`hev1.1.6.L150.90`];async function Ri(e,t){if(typeof VideoDecoder>`u`)return null;for(let n of Li)try{if((await VideoDecoder.isConfigSupported({codec:n,codedWidth:e,codedHeight:t})).supported)return n}catch{}return null}function zi(e){let t=[];for(let n=0;n+2{let i=r+1n&&e[i-1]===0;)i--;return e.subarray(n,i)}).filter(e=>e.length>0)}var Bi=(e,t)=>t?e[0]>>1&63:e[0]&31;function Vi(e,...t){let n=8+t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(n);new DataView(r.buffer).setUint32(0,n);for(let t=0;t<4;t++)r[4+t]=e.charCodeAt(t);let i=8;for(let e of t)r.set(e,i),i+=e.length;return r}function F(...e){let t=new Uint8Array(e.reduce((e,[,t])=>e+t,0)),n=0;for(let[r,i]of e){for(let e=i-1;e>=0;e--)t[n+i-1-e]=Math.floor(r/2**(8*e))&255;n+=i}return t}var Hi=(e,t,n,...r)=>Vi(e,F([t,1],[n,3]),...r),Ui=F([65536,4],[0,4],[0,4],[0,4],[65536,4],[0,4],[0,4],[0,4],[1073741824,4]);function Wi(e){let t=e.handler===`vide`,n=Vi(`ftyp`,new TextEncoder().encode(`isom`),F([1,4]),new TextEncoder().encode(`isomiso6mp41`)),r=Vi(`moov`,Hi(`mvhd`,0,0,F([0,4],[0,4],[e.timescale,4],[0,4],[65536,4],[256,2],[0,2],[0,4],[0,4]),Ui,new Uint8Array(24),F([2,4])),Vi(`trak`,Hi(`tkhd`,0,3,F([0,4],[0,4],[1,4],[0,4],[0,4],[0,4],[0,4],[0,2],[0,2],[t?0:256,2],[0,2]),Ui,F([(e.width??0)*65536,4],[(e.height??0)*65536,4])),Vi(`mdia`,Hi(`mdhd`,0,0,F([0,4],[0,4],[e.timescale,4],[0,4],[21956,2],[0,2])),Hi(`hdlr`,0,0,F([0,4]),new TextEncoder().encode(e.handler),new Uint8Array(12),F([0,1])),Vi(`minf`,t?Hi(`vmhd`,0,1,new Uint8Array(8)):Hi(`smhd`,0,0,F([0,4])),Vi(`dinf`,Hi(`dref`,0,0,F([1,4]),Hi(`url `,0,1))),Vi(`stbl`,Hi(`stsd`,0,0,F([1,4]),e.sampleEntry),Hi(`stts`,0,0,F([0,4])),Hi(`stsc`,0,0,F([0,4])),Hi(`stsz`,0,0,F([0,4],[0,4])),Hi(`stco`,0,0,F([0,4])))))),Vi(`mvex`,Hi(`trex`,0,0,F([1,4],[1,4],[0,4],[0,4],[0,4])))),i=new Uint8Array(n.length+r.length);return i.set(n,0),i.set(r,n.length),i}function Gi(e,t,n,r,i){let a=i?33554432:16842752,o=e=>Hi(`trun`,0,1793,F([1,4],[e,4],[n,4],[r.length,4],[a,4])),s=e=>Vi(`traf`,Hi(`tfhd`,0,131072,F([1,4])),Hi(`tfdt`,1,0,F([t,8])),o(e)),c=Hi(`mfhd`,0,0,F([e,4])),l=Vi(`moof`,c,s(0)).length,u=Vi(`moof`,c,s(l+8)),d=Vi(`mdat`,r),f=new Uint8Array(u.length+d.length);return f.set(u,0),f.set(d,u.length),f}function Ki(e,t,n=!1){let r=t?[35,...n?[32,33,34]:[]]:[9,...n?[7,8]:[]],i=zi(e).filter(e=>!r.includes(Bi(e,t))),a=new Uint8Array(i.reduce((e,t)=>e+4+t.length,0)),o=new DataView(a.buffer),s=0;for(let e of i)o.setUint32(s,e.length),a.set(e,s+4),s+=4+e.length;return a}var qi=e=>e.toString(16).padStart(2,`0`),Ji=e=>{let t=new Uint8Array(2+e.length);return t[0]=e.length>>8,t[1]=e.length&255,t.set(e,2),t},Yi=e=>{let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t};function Xi(e){let t=zi(e),n=t.filter(e=>Bi(e,!1)===7),r=t.filter(e=>Bi(e,!1)===8);return!n.length||!r.length||n[0].length<4?null:Yi([F([1,1],[n[0][1],1],[n[0][2],1],[n[0][3],1],[255,1],[224|n.length,1]),...n.map(Ji),F([r.length,1]),...r.map(Ji)])}function Zi(e,t,n){let r=zi(e),i=e=>r.filter(n=>Bi(n,t)===e),a=(e,t)=>Vi(e,new Uint8Array(6),F([1,2],[0,16],[n.w,2],[n.h,2],[4718592,4],[4718592,4],[0,4],[1,2]),new Uint8Array(32),F([24,2],[65535,2]),t);if(!t){let t=i(7),r=Xi(e);return r?{init:Wi({handler:`vide`,timescale:9e4,sampleEntry:a(`avc1`,Vi(`avcC`,r)),width:n.w,height:n.h}),mime:`video/mp4; codecs="avc1.${qi(t[0][1])}${qi(t[0][2])}${qi(t[0][3])}"`}:null}let o=i(32),s=i(33),c=i(34);if(!o.length||!s.length||!c.length)return null;let l=Xr(s[0]);if(l.length<15)return null;let u=l.subarray(3,15),d=u[0]&31,f=d===2?2:0,p=(e,t)=>Yi([F([128|e,1],[t.length,2]),...t.map(Ji)]),m=Vi(`hvcC`,F([1,1]),u,F([61440,2],[252,1],[253,1],[248|f,1],[248|f,1],[0,2],[15,1],[3,1]),p(32,o),p(33,s),p(34,c)),h=[``,`A`,`B`,`C`][u[0]>>6],g=0,_=(u[1]<<24|u[2]<<16|u[3]<<8|u[4])>>>0;for(let e=0;e<32;e++)_&1<>>0).toString(16),`${u[0]&32?`H`:`L`}${u[11]}`,...v.map(e=>e.toString(16))].join(`.`);return{init:Wi({handler:`vide`,timescale:9e4,sampleEntry:a(`hvc1`,m),width:n.w,height:n.h}),mime:`video/mp4; codecs="${y}"`}}function Qi(e,t,n,r,i,a){return Gi(e,t,n,Ki(r,i),a)}function $i(e,t){let n=Vi(`dOps`,F([0,1],[e,1],[312,2],[t,4],[0,2],[0,1]));return Wi({handler:`soun`,timescale:48e3,sampleEntry:Vi(`Opus`,new Uint8Array(6),F([1,2],[0,8],[e,2],[16,2],[0,4],[3145728e3,4]),n)})}function ea(e){if(!e.length)return 960;let t=e[0]>>3,n=t<12?[480,960,1920,2880][t%4]:t<16?[480,960][t%2]:[120,240,480,960][t%4],r=e[0]&3,i=r===0?1:r===3?(e[1]??1)&63:2;return n*Math.max(1,i)}function ta(e,t,n){return Gi(e,t,ea(n),n,!0)}var na={watch:30,player:4},ra={watch:{seek:.5,speed:1/0,target:.05},player:{seek:.15,speed:.06,target:.02}},ia={seek:.8,speed:.25,target:.12};function aa(e,t,n){let r=typeof n==`string`?ra[n]:n;return e>r.seek?{seekTo:t-r.target,rate:1}:e>r.speed?{seekTo:null,rate:1.1}:{seekTo:null,rate:1}}function oa(e,t=`watch`,n){return typeof VideoDecoder<`u`?new ha(e,t,n):new ka(e,t,n)}var sa=class{constructor(e,t=()=>performance.now()){this.ask=e,this.now=t,this.last=-1/0}waiting(){if(!this.ask)return;let e=this.now();e-this.last<1e3||(this.last=e,this.ask())}};function I(e){return e.length<3?null:{index:e[0]<<8|e[1],packet:e.subarray(2)}}var L=class{constructor(){this.last=-1}take(e){if(this.last>=0){let t=e-this.last&65535;if(t===0||t>=32768)return!1}return this.last=e,!0}reset(){this.last=-1}};function ca(e){if(e.length>=10)return e;let t=new Uint8Array(10);t.set(e.subarray(0,6));let n=new DataView(t.buffer);return n.setUint32(6,Math.round(n.getUint32(2)/100)||480),t}function la(e,t){return{snd:e,snd_decoded:t.decoded,snd_concealed:t.concealed,snd_underruns:t.underruns,snd_dropped:t.dropped}}var ua=class{constructor(e,t=.2){this.min=e,this.max=t,this.next=0,this.calmSince=0,this.minLead=1/0,this.windowAt=0,this.underruns=0,this.dropped=0,this.cushion=e}at(e,t){this.next0&&(this.underruns++,this.cushion=Math.min(this.max,this.cushion+.02)),this.calmSince=e,this.next=e+this.cushion,this.minLead=1/0,this.windowAt=e):e-this.calmSince>10&&this.cushion>this.min&&(this.cushion=Math.max(this.min,this.cushion-.01),this.calmSince=e);let n=this.next-e;if(n>this.cushion+.15)return this.dropped++,null;if(this.minLead=Math.min(this.minLead,n),e-this.windowAt>=.25){let t=this.minLead>this.cushion+da;if(this.minLead=1/0,this.windowAt=e,t)return this.dropped++,null}let r=this.next;return this.next+=t,r}reset(){this.next=0}},da=.02;async function fa(e,t){try{return typeof AudioDecoder>`u`?!1:!!(await AudioDecoder.isConfigSupported({codec:`opus`,sampleRate:e,numberOfChannels:t})).supported}catch{return!1}}var pa=class{constructor(e,t=()=>performance.now()){this.decoder=e,this.now=t,this.n={frames:0,dropped:0,late:0,stalls:0,stall_ms:0,worst_stall_ms:0,key_waits:0},this.a=0,this.d=0,this.w=!1,this.q=[],this.sum=0,this.cnt=0,this.codec=``}get frames(){return this.n.frames}arrived(){let e=this.now();this.a&&e-this.a>50&&this.n.late++,this.a=e}drop(){this.n.dropped++,this.w||this.n.key_waits++,this.w=!0}decoding(){this.w=!1,this.q.push(this.now())>64&&this.q.shift()}drawn(e=!1){let t=this.now(),n=e?this.q.shift():void 0;n!==void 0&&(this.sum+=t-n,this.cnt++);let r=this.d?t-this.d:0;r>100&&this.stall(r),this.d=t,this.n.frames++}stall(e){this.n.stalls++,this.n.stall_ms+=e,this.n.worst_stall_ms=Math.max(this.n.worst_stall_ms,e)}snapshot(){let e=this.d?this.now()-this.d:0,t={...this.n,decoder:this.decoder};this.codec&&(t.codec=this.codec),e>100&&(t.stalls=this.n.stalls+1,t.stall_ms=this.n.stall_ms+e,t.worst_stall_ms=Math.max(this.n.worst_stall_ms,e));for(let e of[`stall_ms`,`worst_stall_ms`])t[e]=Math.round(t[e]);return t.decode_ms=this.cnt?Math.round(this.sum/this.cnt*10)/10:0,this.sum=this.cnt=0,t}},ma=[`pointerup`,`touchend`,`click`,`keydown`],ha=class{get element(){if(!this.wrap){let e=document.createElement(`div`);e.className=`h-full w-full`,e.append(this.canvas),this.mse&&e.append(this.mse.element),this.wrap=e}return this.wrap}get stats(){return this.mse?.stats??this.ownStats}soundReport(){return this.soundOn?this.mseSound?this.mseSound.report():la(this.soundWasm?`wasm`:`webcodecs`,this.soundStats):null}constructor(e,t=`watch`,n){this.onProblem=e,this.latency=t,this.onNeedKey=n,this.canvas=document.createElement(`canvas`),this.wrap=null,this.mse=null,this.failsNoPicture=0,this.ctx=this.canvas.getContext(`2d`,{alpha:!1}),this.hevc=!1,this.header=null,this.spsRect=null,this.software=!1,this.video=null,this.opening=!1,this.stopped=!1,this.sawKey=!1,this.ownStats=new pa(`webcodecs`),this.problemShown=!1,this.ts=0,this.pipe=null,this.audioGen=0,this.actx=null,this.soundOn=!1,this.unarm=null,this.mseSound=null,this.audioHeader=null,this.soundWasm=!1,this.onSoundFail=null,this.muted=!1,this.keyAsk=new sa(n),this.clock=new ua(t===`player`?.05:.08),typeof AudioDecoder>`u`&&va()&&(this.mseSound=new ya(t,()=>this.mseSoundFailed())),this.canvas.className=`block h-full w-full object-contain`,this.canvas.dataset.testid=`watch-canvas`}setHevc(e){this.hevc=e,this.header&&(this.spsRect=ni(this.header,e)),this.mse?.setHevc(e)}get onMse(){return!!this.mse}decodeFailed(){if(this.mse||this.ownStats.frames>0||++this.failsNoPicture<3||!xa())return!1;let e=new ka(this.onProblem,this.latency,this.onNeedKey);e.setHevc(this.hevc),e.markProblemShown(),this.mse=e;let t=this.video;this.video=null;try{t?.close()}catch{}return this.canvas.style&&(this.canvas.style.display=`none`),this.wrap?.append(e.element),this.header&&e.onMessage(new Uint8Array([0,...this.header]).buffer),this.onNeedKey?.(),!0}startSound(){this.soundOn=!0,ga(),this.mseSound?this.mseSound.start():this.openContext()}openContext(){try{if(!this.actx){let e=new AudioContext({latencyHint:`interactive`});this.actx=e,e.onstatechange=()=>{this.actx===e&&e.state!==`running`&&e.state!==`closed`&&this.armResume()}}this.actx.resume().catch(()=>{})}catch{this.onSoundFail?.()}}get sound(){return this.soundOn}setMuted(e){this.muted=e,this.mseSound?.setMuted(e)}resumeSound(){if(!this.soundOn)return;if(this.mseSound)return this.mseSound.resume();let e=this.actx;e&&e.state!==`running`&&e.state!==`closed`&&(this.clock.reset(),e.resume().catch(()=>{}),this.armResume())}get soundStats(){return{decoded:this.pipe?.decoded??0,concealed:this.pipe?.concealed??0,underruns:this.clock.underruns,dropped:this.clock.dropped,cushionMs:Math.round(this.clock.cushion*1e3)}}armResume(){if(this.unarm||typeof window>`u`||!window.addEventListener)return;let e=()=>{let e=this.actx;if(!e||e.state===`closed`)return this.unarm?.();this.clock.reset(),e.resume().then(()=>{e.state===`running`&&this.unarm?.()}).catch(()=>{})};for(let t of ma)window.addEventListener(t,e,!0);this.unarm=()=>{for(let t of ma)window.removeEventListener(t,e,!0);this.unarm=null}}onMessage(e){let t=new Uint8Array(e);if(t.length<1||this.stopped)return;let n=t[0],r=t.subarray(1);if(this.mse&&(n===0||n===1))return n===0&&(this.header=r.slice()),this.mse.onMessage(e);n===0?this.openVideo(r.slice()):n===1?this.onVideo(r):n===3?this.openAudio(r.slice()):n===4&&this.onAudio(r)}async openVideo(e){if(this.header=e,this.spsRect=ni(e,this.hevc),!this.opening){this.opening=!0;try{let t=this.hevc?await Aa(e):Ii(e);if(this.mse||this.stopped)return;if(!t){this.problemShown=!0,this.onProblem(`no_hevc`);return}this.ownStats.codec=t;let n=this.hevc?void 0:Xi(e)??void 0;try{this.video?.close()}catch{}let r=new VideoDecoder({output:e=>{let t=this.realVisible(e),n=this.canvas;(n.width!==t.displayWidth||n.height!==t.displayHeight)&&(n.width=t.displayWidth,n.height=t.displayHeight),this.ctx?.drawImage(t,0,0,n.width,n.height),this.ownStats.drawn(!0),t.close(),this.problemShown&&(this.problemShown=!1,this.onProblem(null))},error:()=>{this.video===r&&(this.problemShown=!0,this.onProblem(`decode`),this.decodeFailed()||this.rebuild())}}),i={codec:t,optimizeForLatency:!0};n&&(i.description=n),this.software&&(i.hardwareAcceleration=`prefer-software`),r.configure(i),this.video=r,this.sawKey=!1}catch{this.problemShown=!0,this.onProblem(`decode`),this.decodeFailed()}finally{this.opening=!1}}}realVisible(e){let t=this.spsRect,n=ri(e,t);if(n)try{let t=new VideoFrame(e,{visibleRect:{x:n.x,y:n.y,width:n.w,height:n.h},displayWidth:n.w,displayHeight:n.h});return e.close(),t}catch{return e}let r=e.visibleRect;if(t&&r&&!this.software&&(r.width{if(this.video===e){try{e?.close()}catch{}this.rebuild(),this.onNeedKey?.()}})}return e}rebuild(){this.mse||this.stopped||(this.video=null,this.sawKey=!1,this.header&&this.openVideo(this.header).then(()=>this.keyAsk.waiting()))}onVideo(e){let t=this.video;if(t?.state===`closed`){this.opening||this.rebuild();return}if(!t||t.state!==`configured`)return;let n=Fi(e,this.hevc);if(this.ownStats.arrived(),!this.sawKey&&!n)return this.ownStats.drop(),this.keyAsk.waiting();if(!n&&t.decodeQueueSize>na[this.latency])return this.sawKey=!1,this.ownStats.drop(),this.keyAsk.waiting();this.sawKey=!0;let r=e;this.hevc?n&&this.header&&(r=new Uint8Array(this.header.length+e.length),r.set(this.header,0),r.set(e,this.header.length)):r=Ki(e,!1,!0),this.ts+=16667,this.ownStats.decoding(),t.decode(new EncodedVideoChunk({type:n?`key`:`delta`,timestamp:this.ts,data:r}))}openAudio(e){if(e.length<6)return;let t=++this.audioGen;if(this.pipe?.reset(),this.pipe=null,this.clock.reset(),this.audioHeader=e,this.mseSound)return this.mseSound.setHeader(e);let n=e[0];fa(new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(2),n).then(n=>{if(t!==this.audioGen)return;if(!n)return va()?this.soundThroughMse(e):this.soundThroughWasm(e);let r=new si((e,t)=>this.play(e,t,r.sampleRate));try{r.header(ca(e)),this.pipe=r}catch{this.soundThroughMse(e)}})}soundThroughMse(e){this.pipe=null,this.mseSound||(this.mseSound=new ya(this.latency,()=>this.mseSoundFailed()),this.soundOn&&this.mseSound.start()),this.mseSound.setHeader(e)}soundThroughWasm(e){this.pipe?.reset(),this.soundWasm=!0;let t=new si((e,n)=>this.play(e,n,t.sampleRate),Pi,()=>{this.pipe===t&&(this.pipe=null),this.onSoundFail?.()});this.pipe=t,t.header(ca(e))}mseSoundFailed(){let e=this.mseSound;e&&(this.mseSound=null,e.stop(),this.soundOn&&(this.openContext(),this.actx&&this.actx.state!==`running`&&this.armResume()),this.audioHeader&&this.soundThroughWasm(this.audioHeader))}onAudio(e){if(this.mseSound)return this.mseSound.frame(e);this.soundOn&&this.pipe&&this.pipe.packet(e)}play(e,t,n){let r=this.actx;if(!r||r.state!==`running`||!e.length)return;let i=e[0].length,a=this.clock.at(r.currentTime,i/n);if(a===null)return;let o=r.createBuffer(e.length,i,n),s=this.muted?0:t;e.forEach((e,t)=>o.copyToChannel(s===1?e:e.map(e=>e*s),t));let c=r.createBufferSource();c.buffer=o,c.connect(r.destination),c.start(a)}stop(){this.stopped=!0;try{this.video?.close()}catch{}this.mse?.stop(),this.audioGen++,this.pipe?.reset(),this.pipe=null,this.unarm?.(),this.actx?.close().catch(()=>{}),this.mseSound?.stop()}};function ga(){try{let e=navigator.audioSession;e&&e.type!==`playback`&&(e.type=`playback`)}catch{}}function _a(e,t){try{return e.isTypeSupported(t)}catch{return!1}}function va(){let e=typeof window>`u`?null:xa();return!!e&&(_a(e,`audio/mp4; codecs="Opus"`)||_a(e,`audio/mp4; codecs="opus"`))}var ya=class{constructor(e,t,n=document.createElement(`audio`)){this.onFail=t,this.header=null,this.time=0,this.on=!1,this.failed=!1,this.order=new L,this.el=n,this.track=new Ta(n,()=>this.fail(),e===`player`?ia:e)}get playing(){return this.on&&!this.failed}report(){return{snd:`mse`,snd_jumps:this.track.seeks}}setHeader(e){this.header=e,this.on&&this.open()}start(){if(!this.on&&(this.on=!0,this.header&&this.open(),!this.failed))try{this.el.play()?.catch?.(()=>{})}catch{}}frame(e){if(!this.on||this.failed||!this.track.ready&&!this.track.backlog)return;let t=I(e);if(!t||!this.order.take(t.index))return;let n=ta(this.track.nextSeq(),this.time,t.packet);this.time+=ea(t.packet),this.track.push(n)}setMuted(e){this.el.muted=e}resume(){if(this.playing&&this.el.paused)try{this.el.play()?.catch?.(()=>{})}catch{}}stop(){this.on=!1,this.track.close()}open(){let e=this.header;if(!e||e.length<6||this.failed)return;let t=e[0],n=$i(t,new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(2));this.track.open(`audio/mp4; codecs="Opus"`,n)||this.track.open(`audio/mp4; codecs="opus"`,n)?(this.time=0,this.order.reset()):this.fail()}fail(){this.failed||(this.failed=!0,this.onFail())}},ba=class{constructor(e,t,n=Pi){this.onFail=t,this.codecs=n,this.actx=null,this.pipe=null,this.header=null,this.on=!1,this.failed=!1,this.muted=!1,this.unarm=null,this.played=!1,this.clock=new ua(e===`player`?.05:.08)}get playing(){return this.on&&!this.failed}get stats(){return{decoded:this.pipe?.decoded??0,concealed:this.pipe?.concealed??0,underruns:this.clock.underruns,dropped:this.clock.dropped}}start(){if(!this.failed){this.on=!0,ga();try{if(!this.actx){let e=new AudioContext({latencyHint:`interactive`});this.actx=e,e.onstatechange=()=>{this.actx===e&&e.state!==`running`&&e.state!==`closed`&&this.armResume()}}this.actx.resume().catch(()=>{}),this.actx.state!==`running`&&this.armResume()}catch{return this.fail()}this.header&&!this.pipe&&this.open()}}setHeader(e){e.length<6||(this.header=e,this.pipe?.reset(),this.pipe=null,this.clock.reset(),this.on&&this.open())}frame(e){this.on&&!this.failed&&this.pipe?.packet(e)}setMuted(e){this.muted=e}resume(){let e=this.actx;this.playing&&e&&e.state!==`running`&&e.state!==`closed`&&(this.clock.reset(),e.resume().catch(()=>{}),this.armResume())}stop(){this.on=!1,this.pipe?.reset(),this.pipe=null,this.unarm?.(),this.actx?.close().catch(()=>{}),this.actx=null}open(){let e=this.header;if(!e||this.failed)return;let t=new si((e,n)=>this.play(e,n,t.sampleRate),this.codecs,()=>{this.pipe===t&&this.fail()});this.pipe=t,t.header(ca(e))}play(e,t,n){let r=this.actx;if(!r||r.state!==`running`||!e.length)return;let i=e[0].length,a=this.clock.at(r.currentTime,i/n);if(a===null)return;let o=r.createBuffer(e.length,i,n),s=this.muted?0:t;e.forEach((e,t)=>o.copyToChannel(s===1?e:e.map(e=>e*s),t));let c=r.createBufferSource();c.buffer=o,c.connect(r.destination),c.start(a),this.played=!0}armResume(){if(this.unarm||typeof window>`u`||!window.addEventListener)return;let e=()=>{let e=this.actx;if(!e||e.state===`closed`)return this.unarm?.();this.clock.reset(),e.resume().then(()=>{e.state===`running`&&this.unarm?.()}).catch(()=>{})};for(let t of ma)window.addEventListener(t,e,!0);this.unarm=()=>{for(let t of ma)window.removeEventListener(t,e,!0);this.unarm=null}}fail(){this.failed||(this.failed=!0,this.stop(),this.onFail())}};function xa(){let e=window;return e.ManagedMediaSource??e.MediaSource??null}var Sa=10,Ca=3;function wa(e,t,n,r=Ca){let i=null;for(let a of e)a>t&&a<=n-r&&(i=a);return i}var Ta=class{constructor(e,t,n=`watch`,r,i=()=>performance.now()){this.el=e,this.onError=t,this.latency=n,this.onNeedKey=r,this.now=i,this.ms=null,this.sb=null,this.queue=[],this.mime=``,this.seq=1,this.ready=!1,this.dropped=!1,this.keys=null,this.seeks=0,this.maxLagS=0,this.fromZero=0,this.trims=0,this.lastJump=null,this.trimAt=-1,this.trimFrom=-1,this.keyAt=-1,this.attached=null,r&&(this.keys=[])}setEdge(e){this.latency=e}markKey(e){this.keys?.push(e),this.keyAt=this.now()}open(e,t){let n=xa();if(!n||!_a(n,e))return!1;this.close();let r=new n;return this.ms=r,this.mime=e,this.queue=[t],this.seq=1,this.ready=!1,this.keys&&=[],r.addEventListener(`sourceopen`,()=>{if(this.ms===r)try{let e=r.addSourceBuffer(this.mime);e.mode=`segments`,e.addEventListener(`updateend`,()=>this.pump()),e.addEventListener(`error`,()=>this.onError()),this.sb=e,this.ready=!0,this.pump()}catch{this.onError()}}),`ManagedMediaSource`in window&&n===window.ManagedMediaSource&&(this.el.disableRemotePlayback=!0),this.attached=Ea(this.el,r),!0}nextSeq(){return this.seq++}get backlog(){return this.queue.length}push(e){this.queue.push(e),this.pump()}pump(){let e=this.sb;if(!e||e.updating||!this.ready)return;let t=this.el;if(e.buffered.length){let n=e.buffered.end(e.buffered.length-1),r=e.buffered.start(0),i=n-t.currentTime,a=aa(i,n,this.latency);if(a.seekTo!==null){this.seeks++,this.maxLagS=Math.max(this.maxLagS,i);let o=this.now(),s=e=>e<0?-1:Math.round(o-e);t.currentTime<.05&&r>1&&this.fromZero++,this.lastJump={at:t.currentTime,start:r,end:n,ranges:e.buffered.length,readyState:t.readyState,paused:t.paused,seeking:t.seeking,sinceTrimMs:s(this.trimAt),trimFrom:this.trimFrom,sinceKeyMs:s(this.keyAt)},t.currentTime=Math.max(r,a.seekTo)}if(t.playbackRate!==a.rate&&(t.playbackRate=a.rate),t.currentTime-r>Sa&&this.trim(e,r))return}let n=this.queue.shift();if(n){try{e.appendBuffer(n)}catch{this.dropped=!0}t.paused&&t.play().catch(()=>{})}}trim(e,t){let n=this.el.currentTime,r=n-Ca;if(this.keys){if(r=wa(this.keys,t,n),r===null)return(this.keys[this.keys.length-1]??-1/0)<=n-Ca&&this.onNeedKey?.(),!1;let e=r;this.keys=this.keys.filter(t=>t>=e),r-=.001}try{return e.remove(t,r),this.trims++,this.trimAt=this.now(),this.trimFrom=n,!0}catch{return!1}}close(){this.ready=!1,this.sb=null,this.queue=[];let e=this.ms;if(this.ms=null,e&&e.readyState===`open`)try{e.endOfStream()}catch{}if(this.attached===`object`)try{this.el.srcObject=null}catch{}this.attached=null,this.el.src?.startsWith(`blob:`)&&URL.revokeObjectURL(this.el.src),this.el.removeAttribute(`src`)}};function Ea(e,t){if(`srcObject`in e)try{return e.srcObject=t,`object`}catch{}return e.src=URL.createObjectURL(t),`url`}var Da=1e4,Oa=class{constructor(e=3,t=Da,n=()=>performance.now()){this.max=e,this.windowMs=t,this.now=n,this.at=[]}fail(){let e=this.now();return this.at=this.at.filter(t=>e-t=this.max}clear(){this.at=[]}},ka=class{constructor(e,t=`watch`,n,r){this.onProblem=e,this.latency=t,this.wasm=null,this.audioHeader=null,this.muted=!1,this.gaveUp=!1,this.reopening=!1,this.failedWhileOpening=!1,this.wrap=document.createElement(`div`),this.hevc=!1,this.header=null,this.sawKey=!1,this.stats=new pa(`mse`),this.problemShown=!1,this.vTime=0,this.vLast=0,this.soundOn=!1,this.onSoundFail=null,this.onGiveUp=null,this.keyAsk=new sa(n),this.fails=new Oa(3,Da,r);let i=document.createElement(`video`);i.muted=!0,i.autoplay=!0,i.playsInline=!0,i.className=`block h-full w-full object-contain`,i.dataset.testid=`watch-video`,this.audio=new ya(t,()=>this.soundThroughWasm()),this.wrap.className=`h-full w-full`,this.wrap.append(i,this.audio.el),this.video=new Ta(i,()=>this.showProblem(),t,()=>this.keyAsk.waiting()),i.addEventListener(`error`,()=>this.restartVideo()),i.addEventListener(`playing`,()=>{this.fails.clear(),this.problemShown&&(this.problemShown=!1,this.onProblem(null))})}markProblemShown(){this.problemShown=!0}showProblem(){this.problemShown||(this.problemShown=!0,this.onProblem(`decode`))}restartVideo(){if(this.gaveUp)return;if(this.reopening){this.failedWhileOpening=!0;return}if(this.showProblem(),this.fails.fail()){this.gaveUp=!0,this.video.close(),this.onGiveUp?.();return}let e=this.header;if(e){this.header=null,this.reopening=!0,this.failedWhileOpening=!1;try{this.openVideo(e)}finally{this.reopening=!1}this.sawKey=!1,this.keyAsk.waiting(),this.failedWhileOpening&&(this.failedWhileOpening=!1,this.restartVideo())}}get failed(){return this.gaveUp}setVideoEdge(e){this.video.setEdge(e)}get videoSeeks(){return{seeks:this.video.seeks,maxLagMs:Math.round(this.video.maxLagS*1e3),fromZero:this.video.fromZero,trims:this.video.trims,lastJump:this.video.lastJump}}get element(){return this.wrap}resume(){let e=this.video.el;e.paused&&e.play()?.catch?.(()=>{})}setHevc(e){this.hevc=e}startSound(){if(this.soundOn=!0,this.wasm)return this.wasm.start();if(!va())return this.soundThroughWasm();this.audio.start()}soundThroughWasm(){if(this.wasm)return;this.audio.stop();let e=new ba(this.latency,()=>this.onSoundFail?.());this.wasm=e,e.setMuted(this.muted),this.audioHeader&&e.setHeader(this.audioHeader),this.soundOn&&e.start()}resumeSound(){this.soundOn&&(this.wasm?this.wasm.resume():this.audio.resume())}setMuted(e){this.muted=e,this.audio.setMuted(e),this.wasm?.setMuted(e)}soundReport(){return this.soundOn?this.wasm?la(`wasm`,this.wasm.stats):this.audio.report():null}get soundPlaying(){return this.wasm?this.wasm.played:this.audio.playing}get sound(){return this.soundOn}onMessage(e){let t=new Uint8Array(e);if(t.length<1)return;let n=t[0],r=t.subarray(1);n===0?this.openVideo(r.slice()):n===1?this.onVideo(r):n===3?(this.audioHeader=r.slice(),(this.wasm??this.audio).setHeader(this.audioHeader)):n===4&&(this.wasm??this.audio).frame(r)}openVideo(e){let t=!!this.header&&this.header.length===e.length&&this.header.every((t,n)=>t===e[n]);if(t&&this.video.ready)return;if(this.gaveUp){if(t)return;this.gaveUp=!1,this.fails.clear()}this.header=e;let n=ni(e,this.hevc)??{w:1920,h:1080},r=Zi(e,this.hevc,n);r&&(this.stats.codec=/codecs="([^"]+)"/.exec(r.mime)?.[1]??``,this.video.open(r.mime,r.init)?(this.sawKey=!1,this.vTime=0,this.vLast=0):(this.problemShown=!0,this.onProblem(this.hevc?`no_hevc`:`decode`)))}onVideo(e){if(!this.video.ready&&!this.video.backlog)return;let t=Fi(e,this.hevc);if(this.video.dropped&&(this.video.dropped=!1,this.sawKey=!1),this.stats.arrived(),!this.sawKey&&!t)return this.stats.drop(),this.keyAsk.waiting();if(!t&&this.video.backlog>na[this.latency])return this.sawKey=!1,this.stats.drop(),this.keyAsk.waiting();this.sawKey=!0,this.stats.drawn();let n=performance.now(),r=this.vLast?Math.min(9e3,Math.max(750,Math.round((n-this.vLast)*90))):1500;this.vLast=n,t&&this.video.markKey(this.vTime/9e4),this.video.push(Qi(this.video.nextSeq(),this.vTime,r,e,this.hevc,t)),this.vTime+=r}stop(){this.video.close(),this.audio.stop(),this.wasm?.stop()}};async function Aa(e){let t=ii(e);if(t&&typeof VideoDecoder<`u`)try{if((await VideoDecoder.isConfigSupported({codec:t,codedWidth:1920,codedHeight:1080})).supported)return t}catch{}return Ri(1920,1080)}var R={CROSS:1,CIRCLE:2,SQUARE:4,TRIANGLE:8,LEFT:16,RIGHT:32,UP:64,DOWN:128,L1:256,R1:512,L3:1024,R3:2048,OPTIONS:4096,SHARE:8192,TOUCHPAD:16384,PS:32768},ja={buttons:0,l2:0,r2:0,lx:0,ly:0,rx:0,ry:0};function Ma(e,t){let n=e=>Math.max(0,Math.min(1,e));return[Math.round(n(e)*1919),Math.round(n(t)*941)]}var Na={ArrowUp:{button:R.UP},ArrowDown:{button:R.DOWN},ArrowLeft:{button:R.LEFT},ArrowRight:{button:R.RIGHT},Enter:{button:R.CROSS},Space:{button:R.CROSS},Backspace:{button:R.CIRCLE},Escape:{button:R.CIRCLE},KeyQ:{button:R.SQUARE},KeyE:{button:R.TRIANGLE},KeyZ:{button:R.L1},KeyC:{button:R.R1},Digit1:{trigger:`l2`},Digit3:{trigger:`r2`},KeyF:{button:R.L3},KeyG:{button:R.R3},Tab:{button:R.OPTIONS},Backquote:{button:R.SHARE},KeyH:{button:R.PS},KeyT:{button:R.TOUCHPAD},KeyW:{stick:`ly`,dir:-1},KeyS:{stick:`ly`,dir:1},KeyA:{stick:`lx`,dir:-1},KeyD:{stick:`lx`,dir:1},KeyI:{stick:`ry`,dir:-1},KeyK:{stick:`ry`,dir:1},KeyJ:{stick:`rx`,dir:-1},KeyL:{stick:`rx`,dir:1}};R.UP,R.DOWN,R.LEFT,R.RIGHT,R.CROSS,R.CIRCLE,R.SQUARE,R.TRIANGLE,R.L1,R.R1,R.L3,R.R3,R.OPTIONS,R.SHARE,R.PS,R.TOUCHPAD;var Pa=e=>Math.max(-32768,Math.min(32767,Math.round(e)));function Fa(e,t=Na){let n={...ja};for(let r of e){let e=t[r];e&&(`button`in e?n.buttons|=e.button:`stick`in e?n[e.stick]=Pa(n[e.stick]+e.dir*32767):n[e.trigger]=255)}return n}var Ia=[R.CROSS,R.CIRCLE,R.SQUARE,R.TRIANGLE,R.L1,R.R1,0,0,R.SHARE,R.OPTIONS,R.L3,R.R3,R.UP,R.DOWN,R.LEFT,R.RIGHT,R.PS,R.TOUCHPAD];function La(e){return Math.abs(e)<=1.01?Math.round((e+1)*3.5)%8:null}var Ra=[0,1,1,1,0,-1,-1,-1],za=[-1,-1,0,1,1,1,0,-1];function Ba(e,t){let n=e.axes[t.a]??0;if(t.hat){let e=La(n);return e===null?0:(t.hat===`x`?Ra:za)[e]}return t.inv?-n:n}var Va={buttons:Ia.flatMap((e,t)=>e?[[e,{b:t}]]:[]),l2:{b:6},r2:{b:7},lx:{a:0},ly:{a:1},rx:{a:2},ry:{a:3}};function Ha(e,t,n=!1){if(`b`in t){let r=e.buttons[t.b];return r?n&&r.value>0?Math.min(1,r.value):Math.max(+!!r.pressed,r.value):0}if(`h`in t){let n=La(e.axes[t.h]??9);if(n===null)return 0;let r=(n-t.at+8)%8;return+(r===0||r===1||r===7)}let r=e.axes[t.a];if(r===void 0)return 0;let i=t.rest??0;return Math.min(1,Math.max(0,(r-i)/(t.d-i)))}function Ua(e){if(e.mapping===`standard`)return Va;let t=Wa.get(e.id);if(t)return t;let n=e.axes.findIndex(e=>Math.abs(e)>1.05);if(n<0)return Va;let r={...Va,buttons:[...Va.buttons,[R.UP,{h:n,at:0}],[R.RIGHT,{h:n,at:2}],[R.DOWN,{h:n,at:4}],[R.LEFT,{h:n,at:6}]]};return Wa.set(e.id,r),r}var Wa=new Map;function Ga(e,t=Ua){let n={...ja},r=e=>Math.abs(e)<.08?0:Pa(e*32767),i=(e,t)=>Math.abs(t)>Math.abs(e)?t:e,a=(e,t)=>t?r(Ba(e,t)):0;for(let r of e){if(!r||!r.connected)continue;let e=t(r);for(let[t,i]of e.buttons)Ha(r,i)>.5&&(n.buttons|=t);e.l2&&(n.l2=Math.max(n.l2,Math.round(Ha(r,e.l2,!0)*255))),e.r2&&(n.r2=Math.max(n.r2,Math.round(Ha(r,e.r2,!0)*255))),n.lx=i(n.lx,a(r,e.lx)),n.ly=i(n.ly,a(r,e.ly)),n.rx=i(n.rx,a(r,e.rx)),n.ry=i(n.ry,a(r,e.ry))}return n}function Ka(e,t){return{buttons:e.buttons|t.buttons,l2:Math.max(e.l2,t.l2),r2:Math.max(e.r2,t.r2),lx:Pa(e.lx+t.lx),ly:Pa(e.ly+t.ly),rx:Pa(e.rx+t.rx),ry:Pa(e.ry+t.ry),touch:e.touch??t.touch??null,motion:e.motion??t.motion??null}}function qa(e,t,n,r=()=>globalThis.navigator?.getGamepads?.()??[]){let i=e=>e?.vibrationActuator;for(let a of e.some(i)?e:r()){let e=i(a);e&&(t===0&&n===0?e.reset?.():e.playEffect?.(`dual-rumble`,{duration:1e3,strongMagnitude:t/255,weakMagnitude:n/255}))}}var Ja=new Map;function Ya(e,t){return{id:`${e.id} (app)`,index:3+e.slot,connected:!0,mapping:`standard`,timestamp:0,axes:e.axes,buttons:e.buttons.map(e=>({pressed:e>.5,touched:e>0,value:e})),vibrationActuator:t?.vibrationActuator??null,hapticActuators:t?.hapticActuators??[]}}function Xa(e){let t=e?.getGamepads?.()??[];return Ja.size===0||t.some(e=>!!e?.connected)?[...t]:[...Ja.values()].sort((e,t)=>e.slot-t.slot).map(e=>Ya(e))}var Za=`b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b1,b2,b0,b3,b6,b4,b7,b5,b8,b9,,,-a1,+a1,-a0,+a0(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,,,,,,,a0,a1(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b2,b1,b3,b0,b4,b5,,,b8,b9,,,-a1,+a1,-a0,+a0(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b2,b3,b0,b1,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b11,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a5(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1(b1,b0,b2,b3,,b7,a3,a4,,b9,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a5,a2(b1,b0,b2,b3,,b7,a3,a4,,b9,,,b12,b14,b15,b13,,,a0,a1,a5,a2(b1,b0,b2,b3,,b7,b4,b5,,b9,,,b12,b14,b15,b13,,,a0,a1,a5~,a2~(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,b8,,a0,a1,a3,a4(b1,b2,,,b7,b5,b4,,,b9,,,b12,b14,b15,b13,,,a0,a1,a5,a2(b0,b1,b3,b4,b6,b5,b7,b2,b8,,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b7,b9,b10,b2,b8,,,h0.1,h0.4,h0.8,h0.2,b5,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,-a1,+a1,-a0,+a0(b0,b1,b3,b4,b6,b5,b7,b2,,b8,,,-a1,+a1,-a0,+a0(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b12,b13,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a5,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b14,,a0,a1,a2,a3(b14,b13,b15,b12,b10,b11,b8,b9,b0,b3,b1,b2,b4,b6,b7,b5,b16,,a0,a1,a2,a3(b0,b1,b3,b2,b4,b5,a2,a5,b8,b9,b11,b12,h0.1,h0.4,h0.8,h0.2,b10,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13,a0,a1,a2,a5(b2,b1,b3,b0,b6,b7,b4,b5,b8,b9,,,-a1,+a1,-a0,+a0(b1,b2,b0,b3,b4,b5,,,b8,b9,,,b12,b13,b15,b14,,,a0,a1,a3,a4(b0,b1,b3,b2,b4,b5,b6,b7,b8,b9,b11,b12,b13,b14,b15,b16,b10,,a0,a1,a2,a3(b0,b1,b3,b2,,b6,a2,a5,,b7,,,b8,b9,b10,b11,,,a0,a1,a3,a4(b0,b1,b3,b2,b4,b5,,,b8,b9,,,b10,b11,b12,b13,,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,,,b13,b8,b10,,,,,,,,hx,hy(b0,b1,b2,b3,b4,b5,,,b12,b9,b11,,,,,,,,hx,hy(b0,b1,b3,b2,b5,b6,b7,b8,b9,b10,b12,b13,b14,b15,b16,b17,b11,,a0,a1,a2,a3(b0,b1,b3,b2,b5,b6,b7,b8,b9,b10,b12,b13,h0.1,h0.4,h0.8,h0.2,b11,,a0,a1,a2,a3(b0,b1,b3,b2,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b0,b1,,,,b2,,b4,,b5,,,h0.1,h0.4,h0.8,h0.2,b6(b0,b1,b2,b3,b12,b4,b13,b5,b14,b6,b15,b7,b11,b8,b10,b9,b16,,a0,a1~,a2,a3~(b1,b3,b0,b2,b13,b5,b12,b4,,b6,,,b11,b8,b10,b9,b16,,a0,a1~,a2,a3~(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b33,,a0,a1,a2,a3(b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b16,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b15,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,,,,,b8,,a0,a1,a3,a4(b1,b0,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12,b13(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,,h0.1,h0.4,h0.8,h0.2,b12,b13(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b11,b12,h0.1,h0.4,h0.8,h0.2,b10,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,b12,b13,b14,b15,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,b14,b13,b14,b13,,,a0,a1,a3,a4(b1,b0,b2,b3,,,,,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b2,b3,b1,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b10(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12,b13,a0,a1,a2,a5(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,+a2,+a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,b8,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b13,,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b0,b3,b2,b4,b5,a2,a5,b6,b7,,,h0.1,h0.4,h0.8,h0.2,b8(b1,b2,,,,,,,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b21,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a5,a4,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,b8,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b13,b13,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,a5,a4,,b6,b7,b8,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a2,a5,b7,b6,b9,b10,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,b7,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a5,a4,b9,b6,b7,b8,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b22,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a2,a3,b6,b7,b9,,b12,b14,b15,b13,b8,,a0,a1(b3,b4,b5,b6,b7,b8,a9,a8,b11,b12,b14,b15,b16,b17,b18,b19,b13,,a0,a1,a2,a3(b0,b1,b3,b4,b8,b6,b9,b7,,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b7,b9,b6,b8,b10,b11,,,h0.1,h0.4,h0.8,h0.2(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b1,b0,b4,b3,b6,b7,,,b10,b11,,,-a1,+a1,-a0,+a0(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,,,b6,b7,b8,b9,,b11,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b3,b1,b4,,b10,a5,a4,,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,,,b6,b7,b8,b9,b10,b11,b13,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,,,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b0,b1,b3,b4,,b6,,b7,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,,,,,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a8,b9,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b8,b6,b9,b7,,b10,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a4,a5,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,,,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b2,b0,b3,b6,b4,b7,b5,b8,b9,,,-a4,+a4,-a3,+a3(b4,b8,b0,b12,b16,b20,b24,b28,b32,b36,b40,b44,h0.1,h0.4,h0.8,h0.2,,,a0,a4,a8,a12(b8,b12,b0,b4,b16,b20,b24,b28,b32,b36,,,h0.1,h0.4,h0.8,h0.2,b44,,a0,a4,a8,a12(b4,b0,b8,b12,,b28,a12,a16,,b36,,,h0.1,h0.4,h0.8,h0.2,,,a0,a4,a20,a8(b1,b2,b0,b3,,b7,a3,a4,,b9,,,b12,b14,b15,b13,,,a0,a1,a5,a2(b4,b0,b8,b12,,b28,a12,a16,,b36,,,b48,b56,b60,b52,,,a0,a4,a20,a8(b1,b2,,,b7,b5,a3,,,b9,,,b12,b14,b15,b13,,,a0,a1,a5,a2(b0,b1,b2,b3,b4,b5,a2,a5,b9,b8,b6,b7,b11,b12,b13,b14,b10,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b7,,,b5,b8,,,-a1,+a1,-a0,+a0,b2(b0,b1,b2,b3,b4,b5,b6,b15,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b13,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a5(b0,b1,b3,b4,b6,b7,a5,a4,b12,b13,b15,b16,h0.1,h0.4,h0.8,h0.2,b14,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,,,-a1,+a1,-a0,+a0,b2(b0,b1,b3,b4,b6,b7,,,b10,b11,,,-a1,+a1,-a0,+a0(b0,b1,b3,b4,b6,b7,b8,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a31(b0,b1,b3,b4,b8,b6,b9,b7,,b11,,,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a3,a4(b1,b0,b4,b3,b6,b7,a4,a5,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,,,b10,b11,,,,,,,,,hx,hy(b0,b1,b2,b3,b4,b5,b6,b7,b16,b15,b8,b9,b10,b11,b13,b12,b17,,a0,a1~,a2,a3~(b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a4(b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b2,b3,b33,b5,,,b6,b7,,,h0.1,h0.4,h0.8,h0.2(b0,b1,b3,b4,b6,b2,,,,b9,,,h0.1,h0.4,h0.8,h0.2(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a3,a4(b1,b2,,,b6,,b9,b7,,b8,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a2(b2,b1,b3,b0,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b3,b4,,b6,,b2,b7,b9,,,b2,b14,b15,b13(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b5,b7,b2,b10,b8,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b6,b7,a5~,a2~,b2,b8,b8,b5,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b4,,b9,b10,b6,b7,b8,,b5,b2,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,,,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b5,b4,b10,b11,b7,b6,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b3,b2,b6,b7,b4,b5,b8,b9,b11,b12,b13,b14,b15,b16,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b16,b19,b17,b18,b6,b7,b8,b9,b10,b11,b13,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a3,a4(b2,b1,b3,b0,b6,b7,b4,b5,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a5,a2(b0,b1,b2,b3,b4,b5,a2,a2,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a2,,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,b8,b9,b6,b7,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,b10,b11,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,b10,b11,b7,b6,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b1,b2,b0,b3,b10,b5,b11,b7,b8,b9,b4,b6,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b2,b0,b3,b5,b7,b4,b6,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,a3,a4,b8,b13,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13,a0,a1,a2,a5(b0,b4,b2,b1,b3,b6,,,b11,b9,,,h0.1,h0.4,h0.8,h0.2(b1,b2,b0,b3,b4,b5,a2,a5,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b9,b10,a4,a5,b4,b6,b7,b8,b11,b12,b13,b14,,,a0,a1,a2,a3(b1,b0,b3,b2,b4,b5,,,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b2,b3,b4,b5,+a2,-a2,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b1,b0,b3,b2,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,,,,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,+a2,-a2,b6,b7,b8,b9,b11,b14,b12,b13,b10,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,,a2,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b7,a4,a3,,,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,,,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b6,b7,b9,b10,b12,b13,b14,b15,b16,b17,b19,b20,h0.1,h0.4,h0.8,h0.2,b18,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,+a2,-a2,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,,,,,,,b7,b6,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b6,b7,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b6,b7,,,b10,b11,,,,,,,,,a0,a1(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a5(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a3,a4(b1,b0,b4,b3,,b6,,b7,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a5`.split(`(`),Qa={l00790006:0,l00790011:1,l00790016:2,l00790122:3,l00790126:4,l00791800:5,l00791803:6,l0079181a:7,l0079181b:8,l0079181c:9,l00791830:10,l00791843:11,l00791844:12,l00791845:11,l00791846:13,l007918d2:7,l007918d4:14,l0079954e:15,l046dc20a:16,l046dc211:17,l046dc216:5,l046dc218:5,l046dc219:5,l046dc21a:18,l046dc21d:14,l046dc21e:14,l046dc21f:14,l046dcad1:5,l046dcad2:5,l04b4010a:19,l04b42411:20,l04b42412:21,l054c0268:22,l054c05c4:23,l054c09cc:24,l054c0ba0:24,l054c0cda:25,l054c0ce6:24,l054c0df2:24,l054c0e5f:24,l054c1337:26,l057e0330:27,l057e0337:28,l057e1337:29,l057e2006:30,l057e2007:31,l057e2008:32,l057e2009:33,l057e2017:34,l057e201e:35,l057e2069:36,l057e2073:37,l05ac022d:38,l05ac055b:39,l05ac057a:40,l05ac061a:41,l0e6f0109:42,l0e6f011e:7,l0e6f011f:14,l0e6f0128:5,l0e6f012f:7,l0e6f0130:7,l0e6f0131:14,l0e6f0139:14,l0e6f0146:43,l0e6f0164:14,l0e6f0180:7,l0e6f0181:7,l0e6f0184:7,l0e6f0185:44,l0e6f0187:7,l0e6f0188:7,l0e6f0203:45,l0e6f0207:46,l0e6f0213:14,l0e6f0214:7,l0e6f02a7:14,l0e6f02a8:47,l0e6f02b2:48,l0e6f02b8:14,l0e6f02c8:14,l0e6f02d7:49,l0e6f02d8:14,l0e6f02da:14,l0e6f02ef:14,l0e6f02f1:14,l0e6f0301:14,l0e6f0315:14,l0e6f0401:14,l0e6f0413:14,l0e6f1112:50,l0e6f1113:51,l0e6ff501:14,l0f0d0009:7,l0f0d0010:42,l0f0d0011:7,l0f0d0016:52,l0f0d0022:42,l0f0d004d:7,l0f0d005e:53,l0f0d005f:54,l0f0d0066:24,l0f0d0067:14,l0f0d006a:8,l0f0d006b:7,l0f0d006d:55,l0f0d006e:7,l0f0d0084:8,l0f0d0085:7,l0f0d0086:47,l0f0d0087:56,l0f0d0088:57,l0f0d0092:58,l0f0d00aa:39,l0f0d00c1:7,l0f0d00ee:59,l0f0d00f6:60,l0f0d00fb:39,l0f0d0137:61,l0f0d0138:62,l0f0d0150:14,l0f0d0185:14,l0f0d0196:63,l0f0d01ab:63,l15320401:24,l15320402:7,l15320705:64,l15320900:65,l15320a03:14,l15320a14:14,l15320a29:14,l15321000:8,l15321008:66,l1532100a:59,l1532100b:24,l15321100:24,l18d19400:65,l20d60dad:67,l20d62002:68,l20d62005:14,l20d6200b:14,l20d6200f:69,l20d62065:14,l20d62802:14,l20d64001:70,l20d64002:70,l20d64005:14,l20d66271:71,l20d6792a:24,l20d689e5:71,l20d6a710:5,l20d6a711:7,l20d6a712:7,l20d6a713:7,l20d6a714:7,l20d6ca6d:7,l24c65300:14,l24c6531a:14,l24c6541a:14,l24c6543a:14,l24c6581a:14,l24c65b02:14,l24c65d04:14,l24c6891a:63,l24c6891b:63,l24c6892a:72,l24c6892b:63,l24c6fafe:14,l27f80bbf:63,l28de1102:73,l28de1105:73,l28de1106:73,l28de1142:73,l28de11fc:43,l28de11ff:14,l28de1201:73,l28de1202:73,l28de1205:74,l2dc80651:75,l2dc81003:76,l2dc81080:76,l2dc82000:14,l2dc82003:14,l2dc8200a:77,l2dc82019:14,l2dc82025:14,l2dc82101:63,l2dc82830:78,l2dc82862:79,l2dc82865:79,l2dc82869:80,l2dc8286a:81,l2dc83010:82,l2dc83011:63,l2dc83012:63,l2dc83013:63,l2dc83015:63,l2dc83016:63,l2dc83017:63,l2dc83019:83,l2dc8301b:63,l2dc8301d:63,l2dc83100:84,l2dc83101:85,l2dc83102:85,l2dc83103:85,l2dc83104:85,l2dc83106:14,l2dc8310a:14,l2dc8310b:14,l2dc83230:86,l2dc83810:79,l2dc83820:87,l2dc85006:88,l2dc85101:89,l2dc85103:86,l2dc85104:90,l2dc85107:91,l2dc85108:91,l2dc85109:90,l2dc85111:92,l2dc85112:82,l2dc86000:92,l2dc86001:93,l2dc86002:92,l2dc86006:82,l2dc86007:94,l2dc86009:82,l2dc86012:63,l2dc86100:87,l2dc86101:93,l2dc86102:92,l2dc86728:95,l2dc89000:96,l2dc89001:96,l2dc89012:93,l2dc89015:79,l2dc89018:78,l2dc89020:97,l2dc89025:98,l2dc8ab21:78,l35371004:14,l35371007:63,l3537100b:14,l35371046:63,l35371058:63,l35371094:63,l35371097:63,l358a0102:63,l358a0202:63,l358a0203:63,l358a0204:63,m00790006:99,m00790011:100,m00791800:101,m00791803:102,m0079181c:41,m00791843:103,m00791844:104,m00791846:105,m007918d2:39,m0079954e:106,m046dc216:5,m046dc218:5,m046dc219:5,m046dc21a:18,m046dc21f:107,m04b4010a:108,m04b42411:20,m04b42412:20,m054c0268:22,m054c05c4:24,m054c09cc:24,m054c0ba0:24,m054c0cda:25,m054c0ce6:24,m054c0df2:24,m054c0e5f:24,m054c1337:26,m057e2006:30,m057e2007:31,m057e2009:60,m057e2017:109,m057e2069:36,m057e2073:37,m05ac061a:41,m0e6f0109:42,m0e6f0184:110,m0e6f0187:5,m0e6f0201:107,m0e6f0203:45,m0e6f0207:46,m0e6f0401:107,m0f0d002d:54,m0f0d004d:7,m0f0d005e:111,m0f0d005f:7,m0f0d0066:24,m0f0d006e:7,m0f0d0084:8,m0f0d0085:7,m0f0d0087:112,m0f0d0088:57,m0f0d0092:58,m0f0d00aa:39,m0f0d00c1:7,m0f0d00ee:113,m0f0d00f6:3,m0f0d0138:62,m0f0d0200:7,m15320401:24,m15320402:7,m15320705:64,m15320900:65,m15320a03:107,m15321000:8,m15321100:24,m18d19400:65,m20d66271:71,m20d6792a:24,m20d6a710:7,m20d6a711:44,m20d6ca6d:7,m24c6543a:107,m24c65d04:107,m24c6891a:114,m24c6891b:63,m24c6892a:64,m24c6892b:63,m24c6fafe:107,m2dc80651:115,m2dc82820:116,m2dc82830:78,m2dc82840:78,m2dc82865:87,m2dc82869:80,m2dc8286a:81,m2dc83011:63,m2dc83012:63,m2dc83013:63,m2dc83015:117,m2dc83016:63,m2dc83017:118,m2dc83019:83,m2dc8301b:63,m2dc8301d:63,m2dc83100:9,m2dc83101:85,m2dc83102:85,m2dc83103:85,m2dc83104:85,m2dc83105:84,m2dc83230:119,m2dc83810:94,m2dc85006:120,m2dc85101:89,m2dc85103:86,m2dc85104:90,m2dc85107:121,m2dc85108:122,m2dc85109:90,m2dc85111:82,m2dc85112:82,m2dc86001:79,m2dc86002:85,m2dc86006:82,m2dc86009:123,m2dc86101:85,m2dc86102:85,m2dc86728:95,m2dc89000:96,m2dc89001:79,m2dc89012:78,m2dc89015:124,m2dc89018:78,m2dc89020:125,m2dc89025:126,m2dc89026:127,m2dc8ab12:116,m35371022:63,m35371041:63,m35371046:63,m35371104:63,m358a0102:63,m358a0201:128,m358a0202:128,m358a0203:128,m358a0204:63,w00790002:129,w00790007:129,w0079000a:129,w00790016:18,w00790122:99,w00790126:130,w00791804:131,w0079181a:7,w0079181b:113,w00791824:132,w00791830:133,w00791845:11,w00791847:12,w0079184f:134,w00791879:135,w0079188f:136,w007918ae:137,w007918d4:138,w046dc209:139,w046dc20a:16,w046dc20b:140,w046dc211:141,w046dc21d:138,w046dc21e:142,w046dc242:142,w046dca84:143,w046dca88:143,w046dcad1:5,w046dcad2:7,w04b42410:144,w04b4c681:130,w054c05c5:145,w057e0330:146,w05ac022d:144,w05ac033d:147,w05ac044d:147,w05ac055b:39,w05ac057a:148,w0e6f0003:149,w0e6f0111:7,w0e6f0114:7,w0e6f0119:7,w0e6f011a:7,w0e6f011e:7,w0e6f011f:150,w0e6f0124:42,w0e6f0128:7,w0e6f012f:7,w0e6f0130:7,w0e6f0132:7,w0e6f0146:138,w0e6f0164:151,w0e6f0180:7,w0e6f0181:7,w0e6f0185:44,w0e6f0188:7,w0e6f0189:7,w0e6f0214:7,w0e6f0301:138,w0e6f1113:51,w0e6f6302:7,w0f0d0009:7,w0f0d000a:152,w0f0d000c:153,w0f0d000d:154,w0f0d0010:155,w0f0d0011:57,w0f0d0013:155,w0f0d001b:152,w0f0d0021:155,w0f0d0022:54,w0f0d0025:42,w0f0d0026:155,w0f0d0027:42,w0f0d0032:155,w0f0d003d:156,w0f0d0040:157,w0f0d0042:155,w0f0d0049:7,w0f0d004b:155,w0f0d0051:155,w0f0d0054:7,w0f0d0055:8,w0f0d005b:113,w0f0d005c:7,w0f0d0064:155,w0f0d0067:70,w0f0d006a:8,w0f0d006b:7,w0f0d006f:158,w0f0d0070:57,w0f0d007b:155,w0f0d008a:8,w0f0d008b:7,w0f0d008c:138,w0f0d009c:8,w0f0d00a0:159,w0f0d00a5:160,w0f0d00a6:111,w0f0d00ad:161,w0f0d00ae:142,w0f0d00af:162,w0f0d00c0:138,w0f0d00c9:5,w0f0d00d8:163,w0f0d00dc:138,w0f0d0101:5,w0f0d0104:142,w0f0d0123:144,w0f0d0137:164,w0f0d0162:165,w0f0d0164:166,w0f0d0196:134,w0f0d0202:167,w0f0d1011:168,w153202a6:169,w15320300:170,w15320707:147,w15320a14:138,w15321004:145,w15321007:145,w15321009:145,w1532100a:5,w18d12c40:171,w20d60060:7,w20d60dad:142,w20d6319f:7,w20d64026:134,w20d64033:134,w20d6571d:7,w20d6576d:7,w20d65795:7,w20d657c7:7,w20d657e5:7,w20d689e5:172,w20d6a712:7,w20d6a713:7,w20d6a714:7,w20d6a720:7,w24c6531a:153,w24c65b02:138,w27f80bbf:173,w28de11fc:70,w28de11ff:174,w2dc802e0:175,w2dc81003:176,w2dc81080:176,w2dc82100:144,w2dc82810:177,w2dc82862:78,w2dc83000:78,w2dc83001:178,w2dc8301c:134,w2dc8310a:134,w2dc83820:179,w2dc85001:180,w2dc86000:79,w2dc86003:123,w2dc86012:134,w2dc86100:85,w2dc86103:123,w2dc8ab11:179,w2dc8ab20:178,w2dc8ab21:78,w35371004:138,w35371007:134,w35371094:134,w35371116:134},$a=e=>e.toLowerCase().padStart(4,`0`);function eo(e){let t=/^(.*?)\s*\((?:[^()]*?\s)?Vendor:\s*([0-9a-f]{1,4})\s+Product:\s*([0-9a-f]{1,4})\s*\)\s*$/i.exec(e);if(t)return{vendor:$a(t[2]),product:$a(t[3]),name:t[1].trim()};let n=/^([0-9a-f]{1,4})-([0-9a-f]{1,4})-(.*)$/i.exec(e.trim());return n?{vendor:$a(n[1]),product:$a(n[2]),name:n[3].trim()}:null}function to(e){return(eo(e)?.name??e.replace(/\s*\((?:XInput\s*)?STANDARD GAMEPAD\)\s*$/i,``)).trim()||e}function no(e=globalThis.navigator){let t=e?.userAgent??``;return/Android|iPhone|iPad|iPod/i.test(t)?null:/Macintosh|Mac OS X/i.test(t)?(e?.maxTouchPoints??0)>1?null:`m`:/Windows/i.test(t)?`w`:/Linux|CrOS|X11/i.test(t)?`l`:null}function ro(e,t){if(!t)return null;let n=t===`l`?[`l`]:[`m`,`w`];for(let t of n){let n=Qa[`${t}${e.vendor}${e.product}`];if(n!==void 0)return Za[n]??null}return null}function io(e){return e.mapping!==`standard`&&eo(e.id)?.vendor===`2dc8`}var ao={6003:`switch`,6006:`switch`,6103:`switch`,3010:`switch`,6001:`startx`,6002:`startx`,6101:`startx`,6102:`startx`,3011:`receiver`,3012:`receiver`,3013:`receiver`,3015:`receiver`,3016:`receiver`,3017:`receiver`,"301b":`receiver`,"301c":`receiver`,"301d":`receiver`,6012:`receiver`,5112:`none`,9020:`none`};function oo(e){let t=eo(e);return t&&ao[t.product]||`manual`}var so={1:0,2:2,4:4,8:6};function co(e){let t=0,n=!1;for(let r of e){let e=/a(\d+)/.exec(r);e&&(t=Math.max(t,Number(e[1])+1)),r.startsWith(`h`)&&(n=!0)}return{n:t,hat:n}}function lo(e,t,n){let{n:r,hat:i}=co(t),a=Ia.length,o=e.axes.findIndex(e=>Math.abs(e)>1.05),s=e=>e;if(i&&o<0)return n===`l`&&e.axes.length>=r+2?{hat:-1,hatXY:r,axis:s}:null;if(!(i?o>r:n!==`l`&&e.axes.length>=r+2))return{hat:o,hatXY:-1,axis:s};if(r<=4)return{hat:o,hatXY:-1,axis:e=>[0,1,2,5][e]??e};let c=t[a+2]?.replace(`~`,``)===`a2`&&t[a+3]?.replace(`~`,``)===`a3`,l=[t[6],t[7]].every(e=>/^a[45]~?$/.test(e??``));return r===6&&c&&l?{hat:o,hatXY:-1,axis:e=>[0,1,2,5,3,4][e]??e}:{hat:o,hatXY:-1,axis:s}}function uo(e,t){let n=/^b(\d+)$/.exec(e);if(n)return{b:Number(n[1])};if(n=/^([+-]?)a(\d+)(~?)$/.exec(e),n){let e=t.axis(Number(n[2]));return n[1]===`+`?{a:e,d:1}:n[1]===`-`?{a:e,d:-1}:n[3]?{a:e,d:-1,rest:1}:{a:e,d:1,rest:-1}}if(n=/^h0\.(\d)$/.exec(e),n){let e=so[n[1]];if(e===void 0)return null;if(t.hat>=0)return{h:t.hat,at:e};if(t.hatXY>=0)return e===0?{a:t.hatXY+1,d:-1}:e===4?{a:t.hatXY+1,d:1}:e===6?{a:t.hatXY,d:-1}:{a:t.hatXY,d:1}}return null}function fo(e,t){let n=/^a(\d+)(~?)$/.exec(e);if(n)return n[2]?{a:t.axis(Number(n[1])),inv:!0}:{a:t.axis(Number(n[1]))};if(e===`hx`||e===`hy`){if(t.hat>=0)return{a:t.hat,hat:e===`hx`?`x`:`y`};if(t.hatXY>=0)return{a:t.hatXY+ +(e===`hy`)}}return null}function po(e,t,n){let r=e.split(`,`),i=lo(t,r,n);if(!i)return null;let a={buttons:[],l2:null,r2:null,lx:null,ly:null,rx:null,ry:null};for(let e=0;eArray.isArray(e)&&e.length===2&&typeof e[0]==`number`&&_o(e[1]))&&[t.l2,t.r2,t.lx,t.ly,t.rx,t.ry].every(_o)}function yo(){try{let e=Lt(go),t=e?JSON.parse(e):null;return!t||typeof t!=`object`||Array.isArray(t)?{}:Object.fromEntries(Object.entries(t).filter(e=>vo(e[1])))}catch{return{}}}function bo(e,t){let n=yo();return t?n[e]=t:delete n[e],It(go,JSON.stringify(n)),xo=n,n}var xo=null;function So(e){return xo??=yo(),xo[e.id]??To(xo,e.id)??ho(e)??Ua(e)}function Co(e){return xo??=yo(),xo[e.id]?`saved`:e.mapping===`standard`?`standard`:ho(e)?`known`:`guess`}function wo(e){return ho(e)??Ua(e)}function To(e,t){if(!t.endsWith(` (app)`))return null;let n=t.slice(0,-6).trim().toLowerCase();if(!n)return null;let r=Object.keys(e).filter(e=>{let t=e.trim().toLowerCase();return t===n||t.includes(n)}),i=r.find(e=>e.trim().toLowerCase()===n)??(r.length===1?r[0]:null);return i?(xo=bo(t,e[i]),e[i]):null}function Eo(e){return{buttons:e.buttons.map(e=>Math.max(+!!e.pressed,e.value)),axes:[...e.axes]}}function Do(e,t){let n=null;if(t.buttons.forEach((t,r)=>{let i=t-(e.buttons[r]??0);t>.5&&i>.5&&(!n||i>n.amount)&&(n={src:{b:r},amount:i})}),n)return n.src;for(let n=0;n1.05?La(t.axes[n]):null;if(r!==null)return{h:n,at:r}}return t.axes.forEach((t,r)=>{let i=e.axes[r]??0,a=t-i;if(!(Math.abs(a)<.6)&&(!n||Math.abs(a)>n.amount)){let e=a>0?1:-1;n={src:Math.abs(i)>.5?{a:r,d:e,rest:i}:{a:r,d:e},amount:Math.abs(a)}}}),n?n.src:null}function Oo(e,t){let n=null;if(t.axes.forEach((t,r)=>{let i=t-(e.axes[r]??0);Math.abs(i)>=.6&&(!n||Math.abs(i)>Math.abs(n.moved))&&(n={a:r,moved:i})}),!n)return null;let r=n;return r.moved>0?{a:r.a}:{a:r.a,inv:!0}}var ko=[{kind:`button`,bit:R.CROSS,name:`✕`},{kind:`button`,bit:R.CIRCLE,name:`○`},{kind:`button`,bit:R.SQUARE,name:`□`},{kind:`button`,bit:R.TRIANGLE,name:`△`},{kind:`button`,bit:R.UP,name:`↑`},{kind:`button`,bit:R.DOWN,name:`↓`},{kind:`button`,bit:R.LEFT,name:`←`},{kind:`button`,bit:R.RIGHT,name:`→`},{kind:`button`,bit:R.L1,name:`L1`},{kind:`button`,bit:R.R1,name:`R1`},{kind:`trigger`,which:`l2`,name:`L2`},{kind:`trigger`,which:`r2`,name:`R2`},{kind:`button`,bit:R.L3,name:`L3`},{kind:`button`,bit:R.R3,name:`R3`},{kind:`button`,bit:R.OPTIONS,name:`Options`},{kind:`button`,bit:R.SHARE,name:`Create`},{kind:`button`,bit:R.PS,name:`PS`},{kind:`button`,bit:R.TOUCHPAD,name:`Touchpad`},{kind:`axis`,which:`lx`,name:`L →`},{kind:`axis`,which:`ly`,name:`L ↓`},{kind:`axis`,which:`rx`,name:`R →`},{kind:`axis`,which:`ry`,name:`R ↓`}];function Ao(){return{buttons:[],l2:null,r2:null,lx:null,ly:null,rx:null,ry:null}}function jo(e,t,n){return t.kind===`button`?{...e,buttons:[...e.buttons.filter(([e])=>e!==t.bit),[t.bit,n]]}:(t.kind,{...e,[t.which]:n})}function Mo(e,t=Va){let n=new Set(e.buttons.map(([e])=>e)),r=e=>`b`in e?`b${e.b}`:`h`in e?`h${e.h}.${e.at}`:`a${e.a}${e.d}`,i=new Set([...e.buttons.map(([,e])=>r(e)),...[e.l2,e.r2].filter(e=>!!e).map(r)]);return{buttons:[...e.buttons,...t.buttons.filter(([e,t])=>!n.has(e)&&!i.has(r(t)))],l2:e.l2??t.l2,r2:e.r2??t.r2,lx:e.lx??t.lx,ly:e.ly??t.ly,rx:e.rx??t.rx,ry:e.ry??t.ry}}var No=ko.filter(e=>e.kind!==`button`||![R.L3,R.R3,R.OPTIONS,R.SHARE,R.PS,R.TOUCHPAD].includes(e.bit));function Po(e,t){return t.buttons.every((t,n)=>Math.abs(t-(e.buttons[n]??0))<.3)&&t.axes.every((t,n)=>Math.abs(t-(e.axes[n]??0))<.3)}var Fo=class{constructor(e=ko){this.steps=e,this.step=0,this.prof=Ao(),this.rest=null,this.waiting=!0}get done(){return this.step>=this.steps.length}get current(){return this.steps[this.step]??null}feed(e){if(this.done)return!1;if(!this.rest)return this.rest=e,this.waiting=!1,!1;if(this.waiting)return Po(this.rest,e)&&(this.waiting=!1),!1;let t=this.steps[this.step],n=t.kind===`axis`?Oo(this.rest,e):Do(this.rest,e);return n?(this.prof=jo(this.prof,t,n),this.go(this.step+1),!0):!1}skip(){this.go(this.step+1)}back(){this.step>0&&this.go(this.step-1)}go(e){this.waiting=!0,this.step=Math.min(e,this.steps.length)}profile(e=Va){return Mo(this.prof,e)}};function Io(e,t){return e.buttons===t.buttons&&e.l2===t.l2&&e.r2===t.r2&&e.lx===t.lx&&e.ly===t.ly&&e.rx===t.rx&&e.ry===t.ry&&(e.touch?.[0]??-1)===(t.touch?.[0]??-1)&&(e.touch?.[1]??-1)===(t.touch?.[1]??-1)&&(e.motion?.t??-1)===(t.motion?.t??-1)}function Lo(){try{return typeof sessionStorage<`u`?sessionStorage:null}catch{return null}}var Ro=e=>`ps5upload.join.token.${e??`app`}`,zo=class{constructor(e){this.o=e,this.ws=null,this.stage={kind:`connecting`},this.token=null,this.player=0,this.last={...ja},this.lastSent=0,this.neutral=!1,this.stopped=!1,this.attempt=0,this.deadline=0,this.raf=0,this.keepalive=null,this.pinger=null,this.retry=null,this.lastHeard=0,this.hostAway=!1,this.pings=0,this.now=e.now??(()=>Date.now()),this.storage=e.storage===void 0?Lo():e.storage,this.WS=e.WebSocketImpl??WebSocket,this.seq=this.now()>>>0;try{this.token=this.storage?.getItem(this.key)??null}catch{this.token=null}}get key(){return Ro(this.o.invite??this.o.code??null)}get current(){return this.stage}get socket(){return this.ws}get resumeToken(){return this.token}setStage(e){this.stage=e,this.o.onStage(e)}start(){if(this.stopped=!1,this.setStage({kind:`connecting`}),this.connect(),this.stopped)return;let e=()=>{this.sendPad(!1),this.raf=(this.o.raf??(e=>window.requestAnimationFrame(e)))(e)};this.raf=(this.o.raf??(e=>window.requestAnimationFrame(e)))(e),this.keepalive=setInterval(()=>this.sendPad(!1),100),this.pinger=setInterval(()=>this.ping(),1e3)}connect(){let e;try{e=new this.WS(this.o.url)}catch{this.dropped();return}this.ws=e,e.binaryType=`arraybuffer`,e.onopen=()=>{if(this.ws!==e)return;this.lastHeard=this.now();let t={name:this.o.name};this.o.invite&&(t.invite=this.o.invite),this.o.code&&(t.code=this.o.code),this.token&&(t.resume=this.token),e.send(JSON.stringify({hello:t}))},e.onmessage=t=>{this.ws===e&&(this.lastHeard=this.now(),typeof t.data==`string`?this.onText(t.data):t.data instanceof ArrayBuffer&&this.stage.kind===`joined`&&this.o.onFrame?.(t.data))},e.onclose=t=>{if(this.ws!==e)return;this.ws=null;let n=Ue(t);n===`mismatch`?(this.forgetToken(),this.finish({kind:`ended`,why:n})):n&&this.stage.kind!==`joined`&&this.stage.kind!==`reconnecting`?this.finish({kind:`ended`,why:n}):this.dropped()},e.onerror=()=>{}}onText(e){let t=Je(e);if(t)switch(t.kind){case`pong`:{let e=this.now()-t.t;e>=0&&e<6e4&&this.o.onRtt?.(e);return}case`asking`:this.stage.kind!==`reconnecting`&&this.setStage({kind:`asking`});return;case`waiting`:this.hostAway||(this.hostAway=!0,this.deadline=this.now()+et),this.attempt=0,this.setStage(this.reconnectingStage());return;case`joined`:this.token=t.token,this.player=t.player,this.attempt=0,this.hostAway=!1;try{this.storage?.setItem(this.key,t.token)}catch{}{let e=t.track&&this.ws?.media||null;this.o.onCodec?.(t.hevc,e,!!e&&t.audio&&!!e.audio)}this.setStage({kind:`joined`,player:t.player,hevc:t.hevc}),this.sendPad(!0);return;case`refused`:this.forgetToken(),this.hostAway&&t.why!==`seat_taken`?this.finish({kind:`ended`,why:`host_stopped`}):this.finish({kind:`refused`,why:t.why});return;case`bye`:if(t.why===`host_stopped`&&this.token){this.hostWait();return}this.forgetToken(),this.finish({kind:`ended`,why:t.why});return;case`status`:this.stage.kind===`joined`&&t.status.player>0&&t.status.player!==this.stage.player&&(this.player=t.status.player,this.setStage({...this.stage,player:t.status.player})),this.o.onStatus?.(t.status);return;case`feedback`:t.rumble&&this.o.onRumble?.(t.rumble[0],t.rumble[1]),t.light&&this.o.onLight?.(t.light);return}}hostWait(){this.hostAway=!0,this.deadline=this.now()+et,this.attempt=0;let e=this.ws;this.ws=null;try{e?.close()}catch{}this.scheduleRetry()}reconnectingStage(){return{kind:`reconnecting`,player:this.player,attempt:this.attempt,deadline:this.deadline,...this.hostAway?{hostStopped:!0}:{}}}giveUp(){this.forgetToken(),this.finish({kind:`ended`,why:this.hostAway?`host_stopped`:`gave_up`})}dropped(){if(this.stopped)return;let e=this.stage;e.kind===`joined`||e.kind===`reconnecting`&&this.token?(e.kind===`joined`&&(this.deadline=this.now()+$e),this.scheduleRetry()):this.finish({kind:`ended`,why:`lost`})}scheduleRetry(){if(this.stopped)return;if(this.now()>=this.deadline){this.giveUp();return}let e=Qe(this.attempt);this.setStage(this.reconnectingStage()),this.attempt+=1,this.retry&&clearTimeout(this.retry),this.retry=setTimeout(()=>{this.retry=null,this.stopped||(this.now()>=this.deadline?this.giveUp():this.connect())},e)}forgetToken(){this.token=null;try{this.storage?.removeItem(this.key)}catch{}}ping(){if(this.hostAway&&!this.stopped&&this.now()>=this.deadline+5e3||!this.stopped&&this.stage.kind===`reconnecting`&&this.now()>=this.deadline+5e3){this.giveUp();return}let e=this.ws;if(e&&e.readyState===this.WS.OPEN){if(this.stage.kind===`joined`&&this.now()-this.lastHeard>3500){this.ws=null;try{e.close()}catch{}this.dropped()}else if(e.send(JSON.stringify({ping:this.now()})),this.stage.kind===`joined`&&this.o.readStats&&++this.pings%2==0){let t=this.o.readStats();t&&e.send(JSON.stringify({stats:t}))}}}setNeutral(e){this.neutral!==e&&(this.neutral=e,this.sendPad(!0))}sendPad(e){let t=this.ws;if(!t||t.readyState!==this.WS.OPEN||this.stage.kind!==`joined`)return;let n=this.neutral?{...ja,touch:null,motion:null}:this.o.readPad(),r=this.now();!e&&Io(n,this.last)&&r-this.lastSent<100||(this.last=n,this.lastSent=r,this.seq=this.seq+1>>>0,t.send(Ze(this.seq,n)))}clearTimers(){(this.o.cancelRaf??(e=>window.cancelAnimationFrame(e)))(this.raf),this.keepalive&&clearInterval(this.keepalive),this.pinger&&clearInterval(this.pinger),this.retry&&clearTimeout(this.retry),this.keepalive=this.pinger=this.retry=null}finish(e){this.stopped=!0,this.clearTimers();let t=this.ws;this.ws=null;try{t?.close()}catch{}this.setStage(e)}askKeyframe(){let e=this.ws;e&&e.readyState===this.WS.OPEN&&this.stage.kind===`joined`&&e.send(JSON.stringify({keyframe:!0}))}leave(){let e=this.ws;e&&e.readyState===this.WS.OPEN&&(this.stage.kind===`joined`&&(this.seq=this.seq+1>>>0,e.send(Ze(this.seq,ja))),e.send(JSON.stringify({leave:1}))),this.forgetToken(),this.finish({kind:`ended`,why:`left`})}stop(){let e=this.ws;e&&e.readyState===this.WS.OPEN&&this.stage.kind===`joined`&&(this.seq=this.seq+1>>>0,e.send(Ze(this.seq,ja))),this.stopped=!0,this.clearTimers(),this.ws=null;try{e?.close()}catch{}}},Bo=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),z=s(((e,t)=>{t.exports=Bo()}))(),Vo=`ps5upload.openIn`,Ho=`ps5upload.openIn.tab`;function Uo(){try{return sessionStorage.getItem(Ho)===`browser`}catch{return!1}}function B(){try{sessionStorage.setItem(Ho,`browser`)}catch{}}function V(e){return e===`browser`?`browser`:e===`app`?`opening`:`ask`}function Wo({appLink:e,children:t}){let n=Ie(),[r,i]=(0,D.useState)(()=>Uo()?`browser`:V(Lt(Vo))),[a,o]=(0,D.useState)(!1);if((0,D.useEffect)(()=>{r===`opening`&&Lt(`ps5upload.openIn`)===`app`&&(location.href=e)},[]),r===`browser`)return(0,z.jsx)(z.Fragment,{children:t});let s=()=>{a&&It(Vo,`app`),i(`opening`),location.href=e},c=()=>{r===`ask`&&a?It(Vo,`browser`):r===`opening`&&Lt(`ps5upload.openIn`)===`app`&&Rt(Vo),B(),i(`browser`)};return(0,z.jsx)(`div`,{className:`flex min-h-[100dvh] items-center justify-center bg-black px-6 text-white`,"data-testid":`open-in-gate`,"data-join-ui":``,children:(0,z.jsx)(`div`,{className:`w-full max-w-sm space-y-4 rounded-2xl border border-white/10 bg-neutral-900 p-6`,children:r===`ask`?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsx)(`h1`,{className:`text-lg font-semibold`,children:n(`open_in_title`,void 0,`Open in the PS5Upload app?`)}),(0,z.jsx)(`p`,{className:`text-sm text-white/60`,children:n(`open_in_body`,void 0,`Have the PS5Upload app on this device? Open this there, or carry on in the browser.`)})]}),(0,z.jsx)(`button`,{type:`button`,onClick:s,autoFocus:!0,className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black`,"data-testid":`open-in-app`,children:n(`open_in_app`,void 0,`Open in the app`)}),(0,z.jsx)(`button`,{type:`button`,onClick:c,className:`w-full rounded-full border border-white/20 py-2.5 text-sm font-semibold text-white hover:bg-white/10`,"data-testid":`open-in-browser`,children:n(`open_in_browser`,void 0,`Continue in browser`)}),(0,z.jsxs)(`label`,{className:`flex items-center justify-center gap-2 text-xs text-white/60`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:a,onChange:e=>o(e.target.checked),"data-testid":`open-in-remember`}),n(`open_in_remember`,void 0,`Remember my choice on this device`)]})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsx)(`h1`,{className:`text-lg font-semibold`,children:n(`open_in_opening`,void 0,`Opening the PS5Upload app…`)}),(0,z.jsx)(`p`,{className:`text-sm text-white/60`,children:n(`open_in_not_opened`,void 0,`Nothing happened? The app may not be on this device.`)})]}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>location.href=e,autoFocus:!0,className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black`,"data-testid":`open-in-again`,children:n(`open_in_again`,void 0,`Try again`)}),(0,z.jsx)(`button`,{type:`button`,onClick:c,className:`w-full rounded-full border border-white/20 py-2.5 text-sm font-semibold text-white hover:bg-white/10`,"data-testid":`open-in-browser`,children:n(`open_in_browser`,void 0,`Continue in browser`)})]})})})}var Go=[`a[href]`,`button:not([disabled])`,`input:not([disabled]):not([type='hidden'])`,`select:not([disabled])`,`textarea:not([disabled])`,`summary`,`[contenteditable='true']`,`[tabindex]`].map(e=>`${e}:not([tabindex='-1'])`).join(`, `),Ko=new Set,qo=[];function Jo(){for(let e of Ko)e()}function Yo(){return qo.length}function Xo(e){return qo.push(e),Jo(),()=>{let t=qo.lastIndexOf(e);t!==-1&&qo.splice(t,1),Jo()}}function Zo(e,t,n){switch(n){case`down`:return t.top-e.bottom;case`up`:return e.top-t.bottom;case`right`:return t.left-e.right;case`left`:return e.left-t.right}}function H(e,t,n){let r=(e.left+e.right)/2,i=(e.top+e.bottom)/2,a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;switch(n){case`down`:return o>i&&t.top>=e.top+1;case`up`:return or&&t.left>=e.left+1;case`left`:return a0?{gap:0,overlap:c}:{gap:-c,overlap:0}}function $o(e,t,n){let r=null,i=1/0,a=!1;for(let o of t){if(!H(e,o.rect,n))continue;let t=Math.max(0,Zo(e,o.rect,n)),s=Qo(e,o.rect,n),c=s.overlap>0;if(a&&!c)continue;let l=c?t-s.overlap/1e6:Math.hypot(t,2*s.gap);(c&&!a||l`u`?void 0:window){try{return!!e?.PS5UploadTv?.isTv()}catch{return!1}}function rs(e=typeof document>`u`?void 0:document){return e?.documentElement.dataset.tv===`1`}function is(e,t){if(!e)return!1;if(e.closest(`[data-own-arrows]`))return!0;let n=e.tagName;if(n===`TEXTAREA`||e.isContentEditable)return!0;let r=t===`left`||t===`right`;if(n===`INPUT`){let t=(e.type||`text`).toLowerCase();if(t===`range`||ts.test(t))return r}return!1}var as=`[aria-modal="true"], [role="dialog"], [role="alertdialog"]`;function os(e){let t=e.activeElement?.closest(as);if(t)return t;if(Yo()>0){let t=e.querySelectorAll(as);if(t.length)return t[t.length-1]}return e}function ss(e){let t=[];return e.querySelectorAll(Go).forEach(e=>{if(e.closest(`[inert], [aria-hidden='true']`)||e.disabled)return;let n=e.getBoundingClientRect();n.width<=0||n.height<=0||t.push({el:e,rect:n})}),t}function cs(e){return(e.find(e=>e.el.getAttribute(`aria-current`)===`page`)??e[0])?.el??null}function ls(e,t=document){let n=es[e.key];if(!n||e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return!1;let r=t.activeElement;if(is(r,n))return!1;let i=ss(os(t));if(!i.length)return!1;let a=i.find(e=>e.el===r),o=a?$o(a.rect,i.filter(e=>e!==a),n):cs(i);return o?(e.preventDefault(),o.focus(),typeof o.scrollIntoView==`function`&&o.scrollIntoView({block:`nearest`,inline:`nearest`}),!0):!1}var us=!1;function ds(e){us||(us=!0,e.addEventListener(`keydown`,t=>void ls(t,e.document)))}function fs(e=typeof window>`u`?void 0:window){e&&(ns(e)&&(e.document.documentElement.dataset.tv=`1`),ds(e))}function ps({id:e,className:t}){let n=Ie(),r=oo(e);if(r===`none`)return(0,z.jsx)(`span`,{className:t,"data-testid":`pad-8bitdo-hint`,"data-how":r,children:n(`pad_8bitdo_no_xinput`,void 0,`This 8BitDo has no X-input mode. If a button is wrong, check the controller.`)});let i=r===`switch`?n(`pad_8bitdo_how_switch`,void 0,`set the switch on the back to X, then press Start`):r===`startx`?n(`pad_8bitdo_how_startx`,void 0,`turn it off, then hold Start + X to turn it on`):r===`receiver`?n(`pad_8bitdo_how_receiver`,void 0,`use its 2.4G receiver or a USB cable`):n(`pad_8bitdo_how_manual`,void 0,`its manual says how`);return(0,z.jsx)(`span`,{className:t,"data-testid":`pad-8bitdo-hint`,"data-how":r,children:n(`pad_8bitdo_xinput`,{how:i},`For the best result, switch your 8BitDo to X-input mode: ${i}.`)})}var ms=new Set,hs={held:new Set,touch:null,touchPad:ja,mapping:!1,get paused(){return ms.size>0},motion:null},gs={s:.85,m:1,l:1.15},_s=.25;function vs(e){return typeof e!=`number`||!Number.isFinite(e)?1:Math.min(1,Math.max(_s,e))}var ys={overlay:{width:844,height:390},deck:{width:390,height:480}},bs=.7,xs=1.4;function Ss(e,t,n,r){let i=gs[e]??1;if(!(t>0)||!(n>0))return i;let a=r?ys.deck:ys.overlay,o=Math.min(xs,Math.max(bs,Math.min(t/a.width,n/a.height)));return Math.round(o*i*1e3)/1e3}var Cs=34;function ws(e,t){return t>0&&8+Math.max(112*e,90)+156*e+124*e+Math.max(56*e,44)+Cs>t}function Ts(e,t,n){let r=e/32767,i=t/32767,a=Math.hypot(r,i),o=a>1?1/a:1;return{dx:r*o*n,dy:i*o*n}}var Es=`calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2)`,Ds=32767,Os=12;function ks({stream:e,layout:t=`overlay`,opacity:n=1,size:r=`m`,deckTop:i=`0px`,onMenu:a}){let o=Ie(),s=(0,D.useRef)(new Map),c=(0,D.useRef)({...ja}),[l,u]=(0,D.useState)({...ja}),[d,f]=(0,D.useState)({l:!1,r:!1,touchpad:!1}),p=(0,D.useRef)(null),[m,h]=(0,D.useState)({width:0,height:0});(0,D.useEffect)(()=>{let e=p.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect();h(e=>e.width===t.width&&e.height===t.height?e:{width:t.width,height:t.height})};if(t(),typeof ResizeObserver>`u`)return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t);let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]),(0,D.useEffect)(()=>()=>{hs.touchPad={...ja}},[]);let g=()=>{let t={...ja,touch:null},n={l:!1,r:!1,touchpad:!1};for(let e of s.current.values())e.kind===`stick`&&(n[e.which]=!0),e.kind===`touchpad`&&(n.touchpad=!0),e.kind===`button`&&(t.buttons|=e.bit),e.kind===`trigger`&&(t[e.which]=255),e.kind===`touchpad`&&e.pressed&&(t.buttons|=R.TOUCHPAD);t.lx=c.current.lx,t.ly=c.current.ly,t.rx=c.current.rx,t.ry=c.current.ry,t.touch=c.current.touch??null,hs.touchPad=t,e?.sendPad(),u(t),f(e=>e.l===n.l&&e.r===n.r&&e.touchpad===n.touchpad?e:n)},_=(e,t,n)=>{let r=Math.max(-1,Math.min(1,(t-e.cx)/e.radius)),i=Math.max(-1,Math.min(1,(n-e.cy)/e.radius));c.current[e.which===`l`?`lx`:`rx`]=Math.round(r*Ds),c.current[e.which===`l`?`ly`:`ry`]=Math.round(i*Ds)},v=(e,t)=>{e.preventDefault(),e.stopPropagation();let n=e.currentTarget;try{n.setPointerCapture(e.pointerId)}catch{}let r=t(n);s.current.set(e.pointerId,r),r.kind===`stick`&&_(r,e.clientX,e.clientY),r.kind===`touchpad`&&(c.current.touch=Ma((e.clientX-r.rect.left)/r.rect.width,(e.clientY-r.rect.top)/r.rect.height)),navigator.vibrate?.(8),g()},y=e=>{let t=s.current.get(e.pointerId);if(t){if(e.stopPropagation(),t.kind===`stick`)_(t,e.clientX,e.clientY);else if(t.kind===`touchpad`)c.current.touch=Ma((e.clientX-t.rect.left)/t.rect.width,(e.clientY-t.rect.top)/t.rect.height),t.pressed&&Math.hypot(e.clientX-t.x0,e.clientY-t.y0)>Os&&(t.pressed=!1);else return;g()}},b=e=>{let t=s.current.get(e.pointerId);t&&(e.stopPropagation(),s.current.delete(e.pointerId),t.kind===`stick`&&(c.current[t.which===`l`?`lx`:`rx`]=0,c.current[t.which===`l`?`ly`:`ry`]=0),t.kind===`touchpad`&&(c.current.touch=null),g())},x=e=>e.stopPropagation(),S={onPointerMove:y,onPointerUp:b,onPointerCancel:b,onClick:x,onDoubleClick:x},ee=e=>(l.buttons&e)!==0,C=e=>`border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.35)] transition-colors duration-75 ${e?`border-white bg-white/50`:`border-white/70 bg-white/10`}`,w=`text-white [text-shadow:0_1px_2px_rgba(0,0,0,0.6)]`,T={filter:`drop-shadow(0 0 1.5px rgba(0,0,0,0.5))`},E=e=>({stroke:e?`#fff`:`rgba(255,255,255,0.75)`,fill:e?`rgba(255,255,255,0.5)`:`rgba(255,255,255,0.1)`}),te=`pointer-events-auto flex touch-none select-none items-center justify-center bg-transparent p-0`,ne={minHeight:`calc(44px / var(--k))`,minWidth:`calc(44px / var(--k))`},re=(e,t,n,r)=>(0,z.jsx)(`button`,{type:`button`,"aria-label":e,onPointerDown:e=>v(e,()=>({kind:`button`,bit:t})),...S,className:`${te} ${n}`,style:ne,children:r}),ie=(e,t,n,r)=>(0,z.jsx)(`span`,{className:`flex h-[32px] w-[76px] items-center justify-center text-[13px] font-semibold tracking-wide ${w} ${C(t)}`,style:{borderRadius:r?n===`l`?`16px 9px 9px 9px`:`9px 16px 9px 9px`:`9px`},children:e}),ae=(e,t,n,r)=>re(e,t,`h-[44px] w-[84px]`,ie(e,ee(t),n,r)),oe=(e,t,n)=>(0,z.jsx)(`button`,{type:`button`,"aria-label":e,onPointerDown:e=>v(e,()=>({kind:`trigger`,which:t})),...S,className:`${te} h-[44px] w-[84px]`,style:ne,children:ie(e,l[t]>0,n,!0)}),se=(e,t,n)=>re(e,t,`h-[52px] w-[52px]`,(0,z.jsx)(`svg`,{viewBox:`0 0 52 52`,width:`52`,height:`52`,"aria-hidden":!0,style:T,children:(0,z.jsxs)(`g`,{transform:`rotate(${n} 26 26)`,strokeWidth:`1.5`,strokeLinejoin:`round`,...E(ee(t)),children:[(0,z.jsx)(`path`,{d:`M10 9 Q10 3 16 3 L36 3 Q42 3 42 9 L42 30 Q42 34.5 38.5 38 L29.5 47 Q26 50.5 22.5 47 L13.5 38 Q10 34.5 10 30 Z`}),(0,z.jsx)(`path`,{d:`M20.5 23 L26 17 L31.5 23`,fill:`none`,stroke:`#fff`,strokeLinecap:`round`,strokeWidth:`1.8`})]})})),ce=(e,t,n)=>re(e,t,`h-[52px] w-[52px]`,(0,z.jsxs)(`svg`,{viewBox:`0 0 52 52`,width:`52`,height:`52`,"aria-hidden":!0,style:T,children:[(0,z.jsx)(`circle`,{cx:`26`,cy:`26`,r:`22.5`,strokeWidth:`1.5`,...E(ee(t))}),(0,z.jsx)(`g`,{fill:`none`,stroke:`#fff`,strokeWidth:`1.8`,strokeLinejoin:`round`,strokeLinecap:`round`,children:n})]})),le=(e,t)=>re(e,t,`h-[44px] min-w-[64px] px-[4px]`,(0,z.jsx)(`span`,{className:`flex h-[24px] items-center rounded-full px-[10px] text-[10px] font-semibold uppercase tracking-wider ${w} ${C(ee(t))}`,children:e})),ue=(e,t)=>re(e,t,`h-[44px] w-[44px]`,(0,z.jsx)(`span`,{className:`flex h-[36px] w-[36px] items-center justify-center rounded-full text-[11px] font-bold ${w} ${C(ee(t))}`,children:e})),de=e=>{let{dx:t,dy:n}=Ts(e===`l`?l.lx:l.rx,e===`l`?l.ly:l.ry,34),r=d[e];return(0,z.jsx)(`div`,{"aria-label":e===`l`?o(`rp_touch_left_stick`,void 0,`Left stick`):o(`rp_touch_right_stick`,void 0,`Right stick`),onPointerDown:t=>v(t,t=>{let n=t.getBoundingClientRect();return{kind:`stick`,which:e,cx:n.left+n.width/2,cy:n.top+n.height/2,radius:n.width/2}}),...S,className:`pointer-events-auto relative h-[124px] w-[124px] touch-none rounded-full border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.3)] transition-colors duration-75 ${r?`border-white/80 bg-white/[0.12]`:`border-white/45 bg-white/[0.05]`}`,children:(0,z.jsx)(`div`,{className:`absolute left-1/2 top-1/2 h-[54px] w-[54px] rounded-full ${C(r)}`,style:{transform:`translate(calc(-50% + ${t}px), calc(-50% + ${n}px))`}})})},O=t===`deck`,fe=Ss(r,m.width,m.height,O),pe=e=>`${e}px * var(--k)`,k=`max(12px, env(safe-area-inset-left))`,me=`max(12px, env(safe-area-inset-right))`,he=`max(12px, env(safe-area-inset-bottom))`,ge=O?`8px`:t===`overlay-bar`?`3.5rem`:`max(10px, env(safe-area-inset-top))`,_e=(e,t,n=0)=>t?n?`calc(${e} + max(${pe(t)}, ${n}px))`:`calc(${e} + ${pe(t)})`:e,ye=(e,t)=>({position:`absolute`,...t,transform:`scale(var(--k))`,transformOrigin:e}),be=O&&ws(fe,m.height),A=O?void 0:`58%`,j=e=>O?{top:_e(ge,be?96:112,be?72:90),[e]:e===`left`?k:me}:{top:A,translate:`0 -50%`,[e]:e===`left`?k:me},xe=e=>({bottom:be?he:_e(he,O?56:0,44),[e]:be?`calc(${e===`left`?k:me} + 8px + max(${pe(80)}, 44px))`:_e(e===`left`?k:me,O?40:168)}),Se=!!a&&!O;return(0,z.jsxs)(`div`,{ref:p,className:`pointer-events-none absolute z-10 select-none [-webkit-touch-callout:none] ${O?`inset-x-0 bottom-0`:`inset-0`}`,style:{top:O?i:void 0,"--k":fe},"data-testid":`rp-touch`,"data-layout":t,"data-scale":fe,onContextMenu:e=>e.preventDefault(),children:[(0,z.jsxs)(`div`,{className:`absolute inset-0`,style:{opacity:vs(n)},children:[(0,z.jsx)(`div`,{style:ye(`top left`,{top:ge,left:k}),children:(0,z.jsxs)(`div`,{className:`ms-[8px] flex flex-col`,style:{rotate:O?void 0:`6deg`,transformOrigin:`top left`},children:[oe(`L2`,`l2`,`l`),ae(`L1`,R.L1,`l`,!1)]})}),(0,z.jsx)(`div`,{style:ye(`top right`,{top:ge,right:me}),children:(0,z.jsxs)(`div`,{className:`me-[8px] flex flex-col items-end`,style:{rotate:O?void 0:`-6deg`,transformOrigin:`top right`},children:[oe(`R2`,`r2`,`r`),ae(`R1`,R.R1,`r`,!1)]})}),(0,z.jsx)(`div`,{"aria-label":o(`rp_touch_touchpad`,void 0,`Touchpad`),onPointerDown:e=>v(e,t=>({kind:`touchpad`,rect:t.getBoundingClientRect(),x0:e.clientX,y0:e.clientY,pressed:!0})),...S,className:`pointer-events-auto absolute touch-none rounded-2xl border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.3)] transition-colors duration-75 ${d.touchpad?`border-white/80 bg-white/25`:`border-white/40 bg-white/[0.05]`}`,style:O?{top:_e(ge,6),left:_e(k,104),right:_e(me,104),height:`max(44px, calc(${pe(64)}))`}:{top:ge,left:`50%`,translate:`-50% 0`,width:`min(calc(${pe(250)}), 34vw)`,height:`max(44px, calc(${pe(56)}))`}}),(0,z.jsxs)(`div`,{className:`grid grid-cols-3 grid-rows-3`,style:ye(O?`top left`:`left center`,j(`left`)),children:[(0,z.jsx)(`span`,{}),se(`↑`,R.UP,0),(0,z.jsx)(`span`,{}),se(`←`,R.LEFT,-90),(0,z.jsx)(`span`,{}),se(`→`,R.RIGHT,90),(0,z.jsx)(`span`,{}),se(`↓`,R.DOWN,180),(0,z.jsx)(`span`,{})]}),(0,z.jsxs)(`div`,{className:`grid grid-cols-3 grid-rows-3`,style:ye(O?`top right`:`right center`,j(`right`)),children:[(0,z.jsx)(`span`,{}),ce(`△`,R.TRIANGLE,(0,z.jsx)(`path`,{d:`M26 16.5 L35 32 L17 32 Z`})),(0,z.jsx)(`span`,{}),ce(`□`,R.SQUARE,(0,z.jsx)(`rect`,{x:`18`,y:`18`,width:`16`,height:`16`,rx:`1`})),(0,z.jsx)(`span`,{}),ce(`○`,R.CIRCLE,(0,z.jsx)(`circle`,{cx:`26`,cy:`26`,r:`8.5`})),(0,z.jsx)(`span`,{}),ce(`✕`,R.CROSS,(0,z.jsx)(`path`,{d:`M19 19 L33 33 M33 19 L19 33`})),(0,z.jsx)(`span`,{})]}),(0,z.jsx)(`div`,{style:ye(`bottom left`,xe(`left`)),children:de(`l`)}),(0,z.jsx)(`div`,{style:ye(`bottom right`,xe(`right`)),children:de(`r`)}),(0,z.jsx)(`div`,{style:ye(`bottom left`,{bottom:he,left:k}),children:le(`Create`,R.SHARE)}),(0,z.jsx)(`div`,{style:ye(`bottom right`,{bottom:he,right:me}),children:le(`Options`,R.OPTIONS)}),(0,z.jsx)(`div`,{style:ye(`bottom center`,{bottom:be?_e(he,124,88):_e(he,Se?48:0,48),left:Es,translate:`-50% 0`}),children:ue(`PS`,R.PS)})]}),Se&&(0,z.jsx)(`div`,{style:{...ye(`bottom center`,{bottom:he,left:`calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2)`,translate:`-50% 0`}),opacity:Math.max(.7,vs(n))},children:(0,z.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),a?.()},onDoubleClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),"aria-label":o(`rp_menu`,void 0,`Menu`),"aria-haspopup":`dialog`,className:`${te} h-[44px] w-[56px]`,style:ne,"data-testid":`rp-menu-handle`,children:(0,z.jsx)(`span`,{className:`flex h-[26px] w-[44px] items-center justify-center rounded-full ${w} ${C(!1)}`,children:(0,z.jsx)(ve,{size:15,strokeWidth:2,"aria-hidden":!0})})})})]})}var As=`data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAYZbW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAfQAAAfQAAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAmt0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAfQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAABAAAAAQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAH0AAAAAAAABAAAAAAHjbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAABAAAABAABVxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAABjm1pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAU5zdGJsAAAAunN0c2QAAAAAAAAAAQAAAKphdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABAAEABIAAAASAAAAAAAAAABFExhdmM2My4xLjEwMiBsaWJ4MjY0AAAAAAAAAAAAAAAAGP//AAAAMGF2Y0MBQsAK/+EAF2dCwAqmEXsBEAAAAwAQAAADACDxImEYAQAGaMhCAZSyAAAAEHBhc3AAAAABAAAAAQAAABRidHJ0AAAAAAAABUAAAAAAAAAAGHN0dHMAAAAAAAAAAQAAAAQAAEAAAAAAFHN0c3MAAAAAAAAAAQAAAAEAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAJHN0c3oAAAAAAAAAAAAAAAQAAAKCAAAACgAAAAoAAAAKAAAAIHN0Y28AAAAAAAAABAAABlwAAAj+AAAJKAAACVIAAALZdHJhawAAAFx0a2hkAAAAAwAAAAAAAAAAAAAAAgAAAAAAAH0AAAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAB9AAAABAAAAQAAAAACUW1kaWEAAAAgbWRoZAAAAAAAAAAAAAAAAAAAH0AAAIEAVcQAAAAAAC1oZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU291bmRIYW5kbGVyAAAAAfxtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAcBzdGJsAAAAfnN0c2QAAAAAAAAAAQAAAG5tcDRhAAAAAAAAAAEAAAAAAAAAAAABABAAAAAAH0AAAAAAADZlc2RzAAAAAAOAgIAlAAIABICAgBdAFQAAAAAAH0AAAAEcBYCAgAUViFblAAaAgIABAgAAABRidHJ0AAAAAAAAH0AAAAEcAAAAIHN0dHMAAAAAAAAAAgAAACAAAAQAAAAAAQAAAQAAAAAoc3RzYwAAAAAAAAACAAAAAQAAAAEAAAABAAAAAgAAAAgAAAABAAAAmHN0c3oAAAAAAAAAAAAAACEAAAATAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAkc3RjbwAAAAAAAAAFAAAGSQAACN4AAAkIAAAJMgAACVwAAAAac2dwZAEAAAByb2xsAAAAAgAAAAH//wAAABxzYmdwAAAAAHJvbGwAAAABAAAAIQAAAAEAAABhdWR0YQAAAFltZXRhAAAAAAAAACFoZGxyAAAAAAAAAABtZGlyYXBwbAAAAAAAAAAAAAAAACxpbHN0AAAAJKl0b28AAAAcZGF0YQAAAAEAAAAATGF2ZjYzLjEuMTAyAAAACGZyZWUAAAM7bWRhdNwATGF2YzYzLjEuMTAyAAIwQA4AAAJvBgX//2vcRem95tlIt5Ys2CDZI+7veDI2NCAtIGNvcmUgMTY1IHIzMjIyIGIzNTYwNWEgLSBILjI2NC9NUEVHLTQgQVZDIGNvZGVjIC0gQ29weWxlZnQgMjAwMy0yMDI1IC0gaHR0cDovL3d3dy52aWRlb2xhbi5vcmcveDI2NC5odG1sIC0gb3B0aW9uczogY2FiYWM9MCByZWY9MTYgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDEzMSBtZT11bWggc3VibWU9MTAgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0yNCBjaHJvbWFfbWU9MSB0cmVsbGlzPTIgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz0xIGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTQga2V5aW50X21pbj0xIHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NCByYz1jcmYgbWJ0cmVlPTEgY3JmPTUxLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IGlwX3JhdGlvPTEuNDAgYXE9MToxLjAwAIAAAAALZYiCAv5MUAAQv8ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmhwF/UABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmioBb1ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmjsBX1ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBw==`,js=null,Ms=null;function Ns(e){e.play().catch(()=>{if(Ms||js!==e)return;let t=()=>{Ps(),js===e&&e.play().catch(()=>{})};window.addEventListener(`pointerdown`,t,{capture:!0}),Ms=()=>window.removeEventListener(`pointerdown`,t,{capture:!0})})}function Ps(){Ms?.(),Ms=null}function Fs(){if(typeof document<`u`){if(!js){let e=document.createElement(`video`);e.muted=!0,e.loop=!0,e.playsInline=!0,e.setAttribute(`playsinline`,``),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`data-testid`,`keep-screen-video`),e.style.cssText=`position:fixed;left:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none`,e.src=As,document.body.appendChild(e),js=e}Ns(js)}}function Is(){Ps(),js&&=(js.pause(),js.removeAttribute(`src`),js.remove(),null)}function Ls(){return typeof navigator>`u`?null:navigator.wakeLock??null}function Rs(){return dt()||!Pn()}var zs=new Set,Bs=null,Vs=Promise.resolve(),Hs=!1;async function Us(){if(zs.size===0||Bs&&!Bs.released)return;let e=Ls();if(!e)dt()&&Fs();else try{let t=await e.request(`screen`);t.addEventListener(`release`,()=>{Bs===t&&(Bs=null)}),Bs=t}catch{}}async function Ws(){Is();let e=Bs;if(Bs=null,e&&!e.released)try{await e.release()}catch{}}function Gs(){Hs||typeof document>`u`||(Hs=!0,document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&zs.size>0&&(Vs=Vs.then(Us))}))}function Ks(e,t){if(!Rs())return;Gs();let n=zs.size>0;t?zs.add(e):zs.delete(e);let r=zs.size>0;n!==r&&(Vs=Vs.then(r?Us:Ws))}var qs=new Set;function Js(){if(typeof window<`u`)return window.PS5UploadPad}function Ys(e,t){let n=qs.size>0;t?qs.add(e):qs.delete(e);let r=qs.size>0;if(n!==r)try{Js()?.setActive(r)}catch{}}var Xs=class e{constructor(e){this.receiver=e,this.last=null,this.was={}}get frames(){return Number(this.last?.frames??0)}static report(e,t){let n=t=>e[t]??0,r=e=>n(e)-(t[e]??0),i=(e,t)=>r(t)>0?Math.round(r(e)/r(t)*1e4)/10:0;return{frames:n(`framesDecoded`),dropped:n(`framesDropped`),stalls:n(`freezeCount`),stall_ms:Math.round(n(`totalFreezesDuration`)*1e3),decode_ms:i(`totalDecodeTime`,`framesDecoded`),jitter_ms:i(`jitterBufferDelay`,`jitterBufferEmittedCount`),nacks:n(`nackCount`),plis:n(`pliCount`),decoder:`track`}}snapshot(){return this.receiver.getStats().then(t=>{t.forEach(t=>{t.type===`inbound-rtp`&&t.kind===`video`&&(this.last=e.report(t,this.was),this.was={...t})})}).catch(()=>{}),this.last}},Zs=class{constructor(e){this.inner=e,this.video=document.createElement(`video`),this.wrap=document.createElement(`div`),this.media=null,this.trackStats=null,this.audio=!1,this.soundOn=!1,this.muted=!1;let t=this.video;t.muted=t.autoplay=t.playsInline=!0,t.className=`block h-full w-full object-contain`,t.dataset.testid=`track-video`,this.wrap.className=`h-full w-full`,this.wrap.append(t,e.element),this.setTrack(null)}get element(){return this.wrap}get stats(){return this.trackStats??this.inner.stats}setTrack(e,t=!1){this.media=e,this.audio=!!e&&t,this.applySound(),this.trackStats=e?new Xs(e.receiver):null,this.video.style.display=e?``:`none`,this.inner.element.style.display=e?`none`:``,this.video.srcObject!==(e?.stream??null)&&(this.video.srcObject=e?.stream??null),e&&this.play()}play(){try{this.video.play()?.catch?.(()=>{})}catch{}}onMessage(e){let t=new Uint8Array(e)[0];this.media&&t<=1||(!this.audio||t!==3&&t!==4)&&this.inner.onMessage(e)}applySound(){this.video.muted=!(this.audio&&this.soundOn&&!this.muted)}setHevc(e){this.inner.setHevc(e)}set onSoundFail(e){this.inner.onSoundFail=e}soundReport(){return this.inner.soundReport()}startSound(){this.inner.startSound(),this.soundOn=!0,this.applySound(),this.media&&this.play()}setMuted(e){this.inner.setMuted(e),this.muted=e,this.applySound()}resumeSound(){this.inner.resumeSound(),this.media&&this.video.paused&&this.play()}stop(){this.inner.stop(),this.video.srcObject=null}},Qs=`ps5upload.join.muted`,$s=5e3,ec=Object.fromEntries(Object.entries(Na).filter(([e])=>e!==`Escape`)),tc=new Set;function nc(e){if(!(e.code in ec)||e.ctrlKey||e.metaKey||e.altKey)return!1;let t=e.target;if(e.code===`Tab`&&(e.shiftKey||rc(t)))return!1;let n=t?.tagName;return!(n===`INPUT`||n===`TEXTAREA`||n===`SELECT`||t?.isContentEditable||rc(t))}function rc(e){let t=e?.tagName;if(t===`BUTTON`||t===`A`)return!0;let n=e?.getAttribute?.(`role`);return n===`button`||n===`link`||n===`menuitem`||n===`tab`||n===`switch`}var ic=!1;function ac(e){ic=e}function oc(e,t,n=null){if(!e||e.frames===0&&!t)return null;let r=e.snapshot();return r&&{...r,...t?{problem:t}:{},...n??{}}}function sc(){if(ic)return{...ja};let e=Ga(Xa(typeof navigator>`u`?void 0:navigator),So),t=hs.touchPad;return{...Ka(Ka(e,Fa(tc,ec)),t),touch:t.touch??null,motion:hs.motion??null}}var cc=class{constructor(e){this.opts=e,this.player=null,this.listeners=new Set,this.cleanups=[],this.subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e)),this.snap={stage:{kind:`connecting`},status:null,rttMs:null,light:null,problem:null,sound:!1,noSound:!1,host:e.host,muted:uc(),path:null},this.client=new zo({url:e.url,invite:e.invite,code:e.code??null,name:e.name,WebSocketImpl:e.transport,readPad:sc,onStage:e=>{this.set({stage:e}),e.kind===`joined`&&this.readPath(),(e.kind===`refused`||e.kind===`ended`)&&this.teardown()},onStatus:e=>this.set({status:e,host:e.host??this.snap.host}),onRtt:e=>this.set({rttMs:e}),onFrame:e=>this.picture().onMessage(e),readStats:()=>oc(this.player?.stats??null,this.snap.problem,this.player?.soundReport()??null),onCodec:(e,t,n)=>{let r=this.picture();r.setHevc(e),r instanceof Zs&&(r.setTrack(t,!!n),t&&this.snap.problem&&this.set({problem:null}))},onRumble:(e,t)=>{let n=Xa(typeof navigator>`u`?void 0:navigator);qa(n,e,t),n.some(e=>e?.connected)||navigator.vibrate?.(e||t?200:0)},onLight:e=>this.set({light:e})})}picture(){if(!this.player){let e=oa(e=>this.set({problem:e}),`player`,()=>this.client.askKeyframe());this.player=this.opts.transport?new Zs(e):e,this.player.onSoundFail=()=>this.set({noSound:!0}),this.player.setMuted(this.snap.muted)}return this.player}async readPath(){let e=this.client.socket,t=this.opts.path??null;if(e?.netPath)try{t=await e.netPath()??this.opts.path??null}catch{t=null}t!==this.snap.path&&this.set({path:t})}get element(){return this.picture().element}start(){let e=()=>{document.visibilityState===`hidden`?tc.clear():this.player?.resumeSound(),this.client.setNeutral(document.visibilityState===`hidden`)},t=()=>{tc.clear(),this.client.setNeutral(!0)},n=e=>{this.client.current.kind===`joined`&&nc(e)&&(!this.opts.keysLive||this.opts.keysLive())&&(e.preventDefault(),tc.add(e.code))},r=e=>{tc.delete(e.code)&&nc(e)&&e.preventDefault()};window.addEventListener(`keydown`,n),window.addEventListener(`keyup`,r);let i=()=>{this.client.setNeutral(document.visibilityState===`hidden`),document.visibilityState!==`hidden`&&this.player?.resumeSound()};document.addEventListener(`visibilitychange`,e),window.addEventListener(`blur`,t),window.addEventListener(`focus`,i);let a=setInterval(()=>{this.client.current.kind===`joined`&&this.readPath()},$s);this.cleanups.push(()=>{clearInterval(a),document.removeEventListener(`visibilitychange`,e),window.removeEventListener(`blur`,t),window.removeEventListener(`focus`,i),window.removeEventListener(`keydown`,n),window.removeEventListener(`keyup`,r),tc.clear()}),this.client.start()}setMuted(e){this.player?.setMuted(e);try{localStorage.setItem(Qs,e?`1`:`0`)}catch{}this.set({muted:e})}startSound(){this.snap.sound||(this.picture().startSound(),this.set({sound:!0}))}leave(){this.client.leave(),this.teardown()}stop(){this.client.stop(),this.teardown()}teardown(){for(let e of this.cleanups.splice(0))e();hs.touchPad={buttons:0,l2:0,r2:0,lx:0,ly:0,rx:0,ry:0};let e=this.player;this.player=null,e&&(e.stop(),e.element.remove())}sendPad(){this.client.sendPad(!1)}get snapshot(){return this.snap}set(e){this.snap={...this.snap,...e};for(let e of this.listeners)e()}};function lc(e){return(0,D.useSyncExternalStore)(e.subscribe,()=>e.snapshot)}function uc(){try{return typeof localStorage<`u`&&localStorage.getItem(Qs)===`1`}catch{return!1}}function dc(e){let t=()=>{let t=e.snapshot.stage.kind,n=t!==`refused`&&t!==`ended`;Ks(`play-together`,n),Ys(`play-together`,n)};t();let n=e.subscribe(t);return()=>{n(),Ks(`play-together`,!1),Ys(`play-together`,!1)}}var fc=3e3,pc=class{constructor(e,t=fc){this.onChange=e,this.delay=t,this.enabled=!1,this.pinned=!1,this.sticky=!1,this.shown=!0,this.timer=null}get visible(){return!this.enabled||this.pinned||this.shown}set(e,t,n=!1){let r=this.enabled&&!this.pinned,i=this.enabled,a=this.sticky;this.enabled=e,this.pinned=t,this.sticky=n,!e||t?(this.stop(),this.show(!0)):n?(this.stop(),!i||!a?this.show(!1):r||this.show(!0)):(!r||a)&&(this.show(!0),this.arm())}poke(){this.show(!0),this.enabled&&!this.pinned&&!this.sticky&&this.arm()}toggle(){this.visible?this.hide():this.poke()}hide(){this.enabled&&!this.pinned&&(this.stop(),this.show(!1))}dispose(){this.stop()}arm(){this.stop(),this.timer=setTimeout(()=>{this.timer=null,this.show(!1)},this.delay)}stop(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}show(e){this.shown!==e&&(this.shown=e,this.onChange(e))}};function mc(e,t,n=!1){let[r,i]=(0,D.useState)(!0),a=(0,D.useRef)(null);(0,D.useEffect)(()=>{let e=new pc(i);return a.current=e,()=>{e.dispose(),a.current=null}},[]),(0,D.useEffect)(()=>{a.current?.set(e,t,n)},[e,t,n]);let o=(0,D.useCallback)(()=>a.current?.poke(),[]),s=(0,D.useCallback)(()=>a.current?.hide(),[]),c=(0,D.useCallback)(()=>a.current?.toggle(),[]);return{shown:!e||t||r,poke:o,hide:s,toggle:c}}var hc=3e4,gc=class{constructor(e,t=hc){this.onChange=e,this.ms=t,this.picking=!1,this.over=!1,this.timer=null}get shown(){return this.picking&&!this.over}set(e){e!==this.picking&&(this.picking=e,this.over=!1,this.stop(),e&&(this.timer=setTimeout(()=>{this.timer=null,this.over=!0,this.onChange()},this.ms)))}stop(){this.timer&&clearTimeout(this.timer),this.timer=null}reset(){this.stop(),this.picking=!1,this.over=!1}};function _c(e){let[,t]=(0,D.useState)(0),[n]=(0,D.useState)(()=>new gc(()=>t(e=>e+1)));return(0,D.useEffect)(()=>{n.set(e),t(e=>e+1)},[n,e]),(0,D.useEffect)(()=>()=>n.reset(),[n]),n.shown}var vc=()=>Xa(typeof navigator>`u`?void 0:navigator).filter(e=>!!e?.connected);function yc(e,t){if(t.kind===`axis`)return t.which===`lx`?e(`rp_pad_step_lx`,void 0,`Push the left stick right`):t.which===`ly`?e(`rp_pad_step_ly`,void 0,`Push the left stick down`):t.which===`rx`?e(`rp_pad_step_rx`,void 0,`Push the right stick right`):e(`rp_pad_step_ry`,void 0,`Push the right stick down`);if(t.kind===`button`){if(t.bit===R.CROSS)return e(`join_check_bottom`,void 0,`Press the bottom face button (✕)`);if(t.bit===R.CIRCLE)return e(`join_check_right`,void 0,`Press the right face button (○)`);if(t.bit===R.SQUARE)return e(`join_check_left`,void 0,`Press the left face button (□)`);if(t.bit===R.TRIANGLE)return e(`join_check_top`,void 0,`Press the top face button (△)`)}return e(`rp_pad_press`,{name:t.name},`Press ${t.name}`)}function bc(e,t){let n=(0,D.useRef)(t);(0,D.useEffect)(()=>{n.current=t}),(0,D.useEffect)(()=>{if(e===null)return;let t=0,r=()=>{n.current(vc().find(t=>t.index===e)??null),t=window.requestAnimationFrame(r)};return t=window.requestAnimationFrame(r),()=>window.cancelAnimationFrame(t)},[e])}var xc=[[R.CROSS,`✕`],[R.CIRCLE,`○`],[R.SQUARE,`□`],[R.TRIANGLE,`△`],[R.UP,`↑`],[R.DOWN,`↓`],[R.LEFT,`←`],[R.RIGHT,`→`],[R.L1,`L1`],[R.R1,`R1`],[R.L3,`L3`],[R.R3,`R3`],[R.SHARE,`Create`],[R.OPTIONS,`Options`],[R.PS,`PS`],[R.TOUCHPAD,`Touchpad`]];function Sc({pad:e}){let t=e=>`flex h-8 min-w-8 items-center justify-center rounded-md px-1.5 text-xs font-medium ${e?`bg-white text-black`:`bg-white/10 text-white/70`}`,n=(e,t,n)=>(0,z.jsxs)(`span`,{className:`relative flex h-12 w-12 items-center justify-center rounded-full bg-white/10 text-[10px] text-white/50`,children:[n,(0,z.jsx)(`span`,{className:`absolute h-3 w-3 rounded-full bg-white`,style:{left:`calc(50% + ${e/32767*18}px - 6px)`,top:`calc(50% + ${t/32767*18}px - 6px)`}})]});return(0,z.jsxs)(`div`,{className:`space-y-2`,"data-testid":`join-pad-test`,"data-buttons":e.buttons,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[xc.map(([n,r])=>(0,z.jsx)(`span`,{className:t((e.buttons&n)!==0),"data-on":(e.buttons&n)===0?`0`:`1`,children:r},n)),(0,z.jsx)(`span`,{className:t(e.l2>30),children:`L2`}),(0,z.jsx)(`span`,{className:t(e.r2>30),children:`R2`})]}),(0,z.jsxs)(`div`,{className:`flex gap-3`,children:[n(e.lx,e.ly,`L`),n(e.rx,e.ry,`R`)]})]})}function Cc({onClose:e}){let t=Ie(),[n,r]=(0,D.useState)(()=>vc().map(e=>({index:e.index,id:e.id}))),[i,a]=(0,D.useState)(()=>vc()[0]?.index??null),[o,s]=(0,D.useState)(ja),[c,l]=(0,D.useState)(null),[u,d]=(0,D.useState)(0),[f,p]=(0,D.useState)(yo),[m,h]=(0,D.useState)(null),[g,_]=(0,D.useState)(null),v=(0,D.useRef)(null);(0,D.useEffect)(()=>(ac(!0),()=>ac(!1)),[]),(0,D.useEffect)(()=>{(v.current?.querySelector(`[data-testid="join-pad-learn-start"]`)??v.current?.querySelector(`[data-testid="join-pad-check-close"]`))?.focus({preventScroll:!0})},[]),(0,D.useEffect)(()=>{let e=document.activeElement;e&&e!==document.body||v.current?.querySelector(`button:not([disabled])`)?.focus({preventScroll:!0})},[c,u]),(0,D.useEffect)(()=>{let e=()=>{let e=vc();r(t=>t.length===e.length&&t.every((t,n)=>t.id===e[n].id&&t.index===e[n].index)?t:e.map(e=>({index:e.index,id:e.id}))),a(t=>t!==null&&e.some(e=>e.index===t)?t:e[0]?.index??null)},t=window.setInterval(e,500);return window.addEventListener(`gamepadconnected`,e),window.addEventListener(`gamepaddisconnected`,e),()=>{window.clearInterval(t),window.removeEventListener(`gamepadconnected`,e),window.removeEventListener(`gamepaddisconnected`,e)}},[]),bc(i,e=>{if(_(t=>t?.id===e?.id?t:e),!e)return;if(c){c.feed(Eo(e))&&y(c,e);return}let t=Ga([e],So);s(e=>e.buttons===t.buttons&&e.l2===t.l2&&e.r2===t.r2&&e.lx===t.lx&&e.ly===t.ly&&e.rx===t.rx&&e.ry===t.ry?e:t)});let y=(e,n)=>{if(!e.done)return d(e.step);let r=n?.id??g?.id;l(null),r&&(p(bo(r,e.profile(n?wo(n):void 0))),h(t(`join_check_saved`,void 0,`Saved for this controller on this device. Try it below.`)))},b=()=>{h(null),d(0),l(new Fo(No))},x=g,S=x?Co(x):null,ee=!!(x&&f[x.id]);return(0,z.jsx)(`div`,{ref:v,role:`dialog`,"aria-modal":`true`,"aria-label":t(`join_check_title`,void 0,`Check your controller`),className:`absolute inset-0 z-40 flex items-center justify-center bg-black/70 p-4 backdrop-blur-sm`,"data-testid":`join-pad-check`,onPointerDown:e=>e.stopPropagation(),children:(0,z.jsxs)(`div`,{className:`w-[min(26rem,100%)] space-y-3 rounded-2xl border border-white/10 bg-neutral-900/95 p-4 text-sm text-white shadow-2xl`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(me,{size:16,className:`text-white/70`}),(0,z.jsx)(`p`,{className:`flex-1 font-semibold`,children:t(`join_check_title`,void 0,`Check your controller`)}),(0,z.jsx)(`button`,{type:`button`,onClick:e,"aria-label":t(`join_done`,void 0,`Done`),className:`flex h-8 w-8 items-center justify-center rounded-full bg-white/10 hover:bg-white/20`,"data-testid":`join-pad-check-close`,children:(0,z.jsx)(De,{size:15})})]}),x?(0,z.jsxs)(z.Fragment,{children:[n.length>1&&(0,z.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:n.map(e=>(0,z.jsx)(`button`,{type:`button`,disabled:!!c,onClick:()=>a(e.index),className:`rounded-full px-2.5 py-1 text-xs ${e.index===i?`bg-white text-black`:`bg-white/10`}`,children:to(e.id)},`${e.index}-${e.id}`))}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`truncate font-medium`,"data-testid":`join-pad-check-name`,children:to(x.id)}),(0,z.jsx)(`p`,{className:`text-xs text-white/60`,"data-testid":`join-pad-check-kind`,"data-kind":S??``,children:S===`saved`?t(`rp_pad_mapped`,void 0,`Plays with your mapping`):S===`guess`?t(`join_check_unknown`,void 0,`This controller isn't on our list, so its buttons may be mixed up. Setting it up takes a few seconds.`):t(`rp_pad_standard`,void 0,`Recognized`)}),io(x)&&(0,z.jsx)(ps,{id:x.id,className:`mt-1 block text-xs text-amber-200/90`})]}),c?(0,z.jsxs)(`div`,{className:`space-y-3`,"data-testid":`join-pad-learn`,children:[(0,z.jsx)(`p`,{className:`text-xs text-white/60`,children:t(`rp_pad_progress`,{n:u+1,total:c.steps.length},`${u+1} of ${c.steps.length}`)}),(0,z.jsx)(`p`,{className:`text-lg font-semibold`,"data-testid":`join-pad-learn-step`,children:c.current?yc(t,c.current):``}),(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:()=>{c.skip(),y(c,x)},className:`rounded-full bg-white/15 px-3 py-1.5 text-xs hover:bg-white/25`,"data-testid":`join-pad-learn-skip`,children:t(`rp_pad_skip`,void 0,`Skip`)}),u>0&&(0,z.jsx)(`button`,{type:`button`,onClick:()=>{c.back(),d(c.step)},className:`rounded-full bg-white/15 px-3 py-1.5 text-xs hover:bg-white/25`,children:t(`rp_pad_back`,void 0,`Back`)}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>l(null),className:`rounded-full px-3 py-1.5 text-xs text-white/70 hover:bg-white/10`,children:t(`rp_pad_cancel`,void 0,`Cancel`)})]})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`text-xs text-white/60`,children:t(`join_check_try`,void 0,`Press buttons and move the sticks: what you press lights up.`)}),(0,z.jsx)(Sc,{pad:o}),m&&(0,z.jsx)(`p`,{className:`text-xs text-emerald-300`,role:`status`,children:m}),(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:b,className:`rounded-full bg-white px-3 py-1.5 text-xs font-medium text-black`,"data-testid":`join-pad-learn-start`,children:ee?t(`join_check_redo`,void 0,`Redo`):t(`join_check_map`,void 0,`Set up the buttons`)}),ee&&(0,z.jsx)(`button`,{type:`button`,onClick:()=>{p(bo(x.id,null)),h(null)},className:`rounded-full bg-white/15 px-3 py-1.5 text-xs hover:bg-white/25`,"data-testid":`join-pad-reset`,children:t(`rp_pad_reset`,void 0,`Reset`)}),(0,z.jsx)(`button`,{type:`button`,onClick:e,className:`rounded-full bg-white/15 px-3 py-1.5 text-xs hover:bg-white/25`,"data-testid":`join-pad-check-done`,children:t(`join_done`,void 0,`Done`)})]})]})]}):(0,z.jsx)(`p`,{className:`text-white/70`,children:t(`rp_pads_none`,void 0,`No controller seen yet. Connect one and press any button on it.`)})]})})}function wc(e,t){let[n,r]=(0,D.useState)(!1);return(0,D.useEffect)(()=>{if(!e||!t)return;let n=!0;return Be(e,Le).then(e=>{n&&!e&&r(!0)}),()=>{n=!1}},[e,t]),n}function Tc({href:e}){let t=Ie();return(0,z.jsxs)(`div`,{className:`flex flex-col items-center gap-3 text-center`,"data-testid":`open-on-wifi`,children:[(0,z.jsx)(`p`,{className:`max-w-sm text-sm text-white/60`,children:t(`join_open_lan_body`,void 0,`Can't reach the internet? If you're on the same Wi-Fi as your friend, open the game there.`)}),(0,z.jsx)(`a`,{href:e,rel:`noreferrer`,className:`rounded-full bg-white px-4 py-2 text-sm font-medium text-black`,"data-testid":`open-on-wifi-link`,children:t(`join_open_lan`,void 0,`Open on this Wi-Fi`)})]})}function Ec(e){let t=Math.max(0,Math.ceil(e));return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`}var Dc=`ps5upload.join.guided`,Oc=1;function kc(e){return e.player!==Oc&&(!e.guided||e.movedOff)&&!e.reconnecting}function Ac(e,t){switch(t){case`lan`:return e(`join_path_lan`,void 0,`Home network`);case`tailscale`:return e(`join_path_tailscale`,void 0,`Tailscale`);default:return e(`join_path_internet`,void 0,`Internet`)}}function jc(e,t){return e(`join_seat_taken`,{host:t},`${t} needed their controller back and no other controller was free on the PS5, so you're out of the game. Ask ${t} to let you in again.`)}function Mc(e,t,n,r=!1){if(t.kind===`refused`)switch(t.why){case`key`:return e(`join_refused_key`,{host:n},`This invite has expired. Ask ${n} for a new link.`);case`expired`:return e(`join_refused_expired`,{host:n},`Your place in the game was lost. Ask ${n} to let you in again.`);case`full`:return e(`join_refused_full`,void 0,`The game is full: four players already.`);case`denied`:return e(`join_refused_denied`,{host:n},`${n} didn't let you in this time.`);case`no_answer`:return e(`join_refused_no_answer`,{host:n},`${n} didn't answer in time. Tell ${n}, then try again.`);case`closed`:return e(`join_refused_closed`,{host:n},`${n} isn't hosting Play Together right now.`);case`old_helper`:return e(`join_refused_old_helper`,{host:n},`${n}'s PS5 needs an updated helper for Play Together.`);case`not_playing`:return e(`join_refused_not_playing`,{host:n},`${n} isn't playing right now. Ask ${n} to start Play first.`);case`unreachable`:return e(`join_refused_unreachable`,{host:n},`${n}'s computer couldn't reach their PS5. Try again in a moment.`);case`slow_down`:return e(`join_refused_slow_down`,void 0,`Too many wrong codes. Wait a minute, then try again.`);case`address`:return e(`join_refused_address`,{host:n},`This link's address is outside your home network, so the app will not use it. Ask ${n} for a link with their computer's IP address.`);case`seat_taken`:return jc(e,n);default:return e(`join_refused_other`,{host:n},`${n} didn't let you in.`)}if(t.kind===`ended`)switch(t.why){case`kicked`:return e(`join_ended_kicked`,{host:n},`${n} took you out of the game.`);case`closed`:return e(`join_ended_closed`,{host:n},`${n} closed Play Together.`);case`host_stopped`:return e(`join_ended_host_stopped`,void 0,`The host stopped playing.`);case`replaced`:return e(`join_ended_replaced`,void 0,`This game was opened in another tab or on another device, so it stopped here.`);case`pad_lost`:return e(`join_ended_pad_lost`,{host:n},`The PS5 lost your controller, so you're out of the game. Ask ${n} to let you in again.`);case`gave_up`:return e(`join_ended_gave_up`,{host:n},`The connection to ${n} didn't come back in time.`);case`lost`:return r?e(`join_net_lost`,{host:n},`The connection to ${n} dropped. Check your internet connection, then ask again.`):e(`join_ended_lost`,{host:n},`Couldn't reach ${n}. Check that you're on the same network.`);case`left`:return e(`join_ended_left`,void 0,`You left the game.`);case`seat_taken`:return jc(e,n);case`mismatch`:return e(`join_net_mismatch`,void 0,`This link doesn't match the host; ask them for a new one.`);case`no_direct`:return e(`join_net_no_direct`,void 0,`A direct connection isn't possible from this network (both sides' routers are strict). Try Wi-Fi instead of mobile data, or ask the host to turn on UPnP.`);case`no_room`:return e(`join_net_no_room`,{host:n},`This invite isn't open any more. Ask ${n} for a new link.`);case`net_full`:return e(`join_net_full`,{host:n},`${n}'s game has no room for another friend right now. Try again in a moment.`);case`no_hub`:return e(`join_net_no_hub`,void 0,`Couldn't reach the PS5Upload invite service. Check your internet connection, then try again.`);case`offer`:return e(`join_net_offer`,{host:n},`${n}'s computer couldn't connect to this browser. Try another browser.`);case`no_webrtc`:return e(`join_net_no_webrtc`,void 0,`This browser can't make direct connections. Try a recent Chrome, Safari or Firefox.`)}return``}function Nc(e){let[t,n]=(0,D.useState)(()=>Date.now());return(0,D.useEffect)(()=>{if(!e)return;n(Date.now());let t=window.setInterval(()=>n(Date.now()),500);return()=>window.clearInterval(t)},[e]),t}function Pc(){let[e,t]=(0,D.useState)({ready:!1,pressed:!1,id:null,kind:null,weak8BitDo:!1});return(0,D.useEffect)(()=>{let e=()=>{let e=Xa(typeof navigator>`u`?void 0:navigator).find(e=>!!e?.connected),n=!!e,r=n?sc():null,i=!!r&&(r.buttons!==0||r.l2>30||r.r2>30),a=e?.id??null,o=e?Co(e):null,s=!!e&&io(e);t(e=>e.ready===n&&e.pressed===i&&e.id===a&&e.kind===o&&e.weak8BitDo===s?e:{ready:n,pressed:i,id:a,kind:o,weak8BitDo:s})};e();let n=window.setInterval(e,120);return window.addEventListener(`gamepadconnected`,e),window.addEventListener(`gamepaddisconnected`,e),()=>{window.clearInterval(n),window.removeEventListener(`gamepadconnected`,e),window.removeEventListener(`gamepaddisconnected`,e)}},[]),e}function Fc(e){return!!e?.closest?.(`[data-testid="rp-touch"]`)}var Ic=14,Lc=()=>typeof window<`u`&&!rs()&&!!window.matchMedia?.(`(pointer: coarse)`).matches;function Rc(e,t,n){return!e||e===t||e.closest?.(`[data-join-game]`)?`game`:n?.contains(e)?`controls`:`page`}function zc(e){return e.checking?`close-check`:e.guide?`close-guide`:e.where===`game`?`show-controls`:e.full?`leave-full`:null}var Bc={good:`var(--color-good,#32d074)`,fair:`var(--color-warn,#ffb340)`,slow:`var(--color-bad,#ff6961)`,none:`rgba(255,255,255,.5)`};function Vc({text:e,body:t,onCancel:n}){let r=Ie();return(0,z.jsxs)(`div`,{className:`flex flex-col items-center gap-5 px-6 py-10 text-center`,"data-testid":`join-waiting`,children:[(0,z.jsxs)(`div`,{className:`relative flex h-24 w-24 items-center justify-center`,"aria-hidden":!0,children:[(0,z.jsx)(`span`,{className:`absolute inset-0 animate-ping rounded-full bg-white/10 [animation-duration:2.4s]`}),(0,z.jsx)(`span`,{className:`absolute inset-3 animate-pulse rounded-full bg-white/10 [animation-duration:2.4s]`}),(0,z.jsx)(`span`,{className:`relative flex h-14 w-14 items-center justify-center rounded-full bg-white/15`,children:(0,z.jsx)(Se,{size:26})})]}),(0,z.jsx)(`p`,{className:`max-w-sm text-base font-medium`,"data-testid":`join-stage`,children:e}),t&&(0,z.jsx)(`p`,{className:`max-w-sm text-sm text-white/60`,children:t}),(0,z.jsx)(`button`,{type:`button`,onClick:n,autoFocus:!0,className:`rounded-full bg-white/15 px-4 py-2 text-sm hover:bg-white/25`,"data-testid":`join-cancel`,children:r(`join_cancel`,void 0,`Cancel`)})]})}function Hc({session:e,inApp:t=!1,onLeave:n,onAgain:r,onFullscreen:i,lanUrl:a=null,hubDown:o=!1}){let s=Ie(),c=lc(e),{stage:l,status:u}=c,d=c.host??s(`join_host_fallback`,void 0,`your friend`),f=(0,D.useRef)(null),p=(0,D.useRef)(null),m=(0,D.useRef)(null),[h,g]=(0,D.useState)(!1),[_,v]=(0,D.useState)(()=>Lt(Dc)===`1`),[y,b]=(0,D.useState)(()=>typeof window<`u`&&window.innerHeight>window.innerWidth),x=Pc(),[S,ee]=(0,D.useState)(!1),C=l.kind===`reconnecting`,w=Nc(C),T=l.kind===`joined`||C,E=u?.state===`picking_user`,te=l.kind===`joined`||l.kind===`reconnecting`?l.player:0,[ne,re]=(0,D.useState)(!1),ie=(0,D.useRef)(te);(0,D.useEffect)(()=>{ie.current===Oc&&te>Oc&&re(!0),te&&(ie.current=te)},[te]);let[ae,oe]=(0,D.useState)(!1),[se,ce]=(0,D.useState)(!1),le=T&&(h||!t),de=Lc(),fe=_c(E),k=mc(le,C||fe&&!de||ae||se,de),{poke:he}=k,_e=(0,D.useRef)(null),ve=()=>{_e.current&&clearTimeout(_e.current.timer),_e.current=null};(0,D.useEffect)(()=>ve,[]);let[ye,A]=(0,D.useState)(!1),xe=(0,D.useRef)(!1);(0,D.useEffect)(()=>{if(!le||!de||k.shown||!_||xe.current)return;xe.current=!0,A(!0);let e=setTimeout(()=>A(!1),6e3);return()=>clearTimeout(e)},[le,de,k.shown,_]),(0,D.useEffect)(()=>{if(!T)return;let t=e.element;return f.current?.appendChild(t),()=>t.remove()},[T,e]),(0,D.useEffect)(()=>{if(!T||c.sound)return;let t=()=>e.startSound(),n=[`pointerup`,`touchend`,`click`,`keydown`];for(let e of n)window.addEventListener(e,t,!0);return()=>{for(let e of n)window.removeEventListener(e,t,!0)}},[T,c.sound,e]),(0,D.useEffect)(()=>{let e=()=>b(window.innerHeight>window.innerWidth);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,D.useEffect)(()=>{if(h)return()=>void i?.(!1)},[h,i]);let Ce=(0,D.useRef)(h);(0,D.useEffect)(()=>{Ce.current=h},[h]),(0,D.useEffect)(()=>{if(!t||!T||!Lc()||typeof window>`u`||!window.matchMedia)return;let e=window.matchMedia(`(orientation: landscape)`),n=()=>{e.matches&&!Ce.current&&(g(!0),i?.(!0))};return n(),e.addEventListener?.(`change`,n),()=>e.removeEventListener?.(`change`,n)},[t,T,i]),(0,D.useEffect)(()=>{t&&T&&rs()&&!Ce.current&&(g(!0),i?.(!0))},[t,T,i]),(0,D.useEffect)(()=>{if(!T)return;let e=e=>{if(e.key!==`Escape`)return;if(S)return void Le.current();if(he(),h)return g(!1);let t=Rc(document.activeElement,document.body,p.current);t===`game`?Le.current():t===`controls`&&m.current?.focus({preventScroll:!0})};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[T,h,he,S]),(0,D.useEffect)(()=>{if(!h||!Lc())return;window.history.pushState(window.history.state,``);let e=window.location.href,t=!1,n=()=>{t=!0,g(!1)};return window.addEventListener(`popstate`,n),()=>{window.removeEventListener(`popstate`,n),!t&&window.location.href===e&&window.history.back()}},[h]),(0,D.useEffect)(()=>{if(!h||typeof document>`u`)return;let e=()=>{document.fullscreenElement||Lc()||g(!1)};return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[h]);let Te=rs(),Ee=T&&kc({player:te,guided:_,movedOff:ne,reconnecting:C})&&!u?.playsAs,De=async e=>{g(e),await i?.(e)},Oe=()=>m.current?.focus({preventScroll:!0}),ke=()=>{It(Dc,`1`),v(!0),re(!1)},Ae=()=>{he();let e=C?`[data-testid="join-reconnecting-leave"]`:`[data-testid="join-bar"] button`;p.current?.querySelector(e)?.focus({preventScroll:!0})},je=()=>{let e=p.current?.querySelector(`[data-testid="join-check-open"]`);e?e.focus({preventScroll:!0}):Oe(),ee(!1)},Me=()=>Rc(document.activeElement,document.body,p.current),[Ne,Pe]=(0,D.useState)(`game`);(0,D.useEffect)(()=>{if(!T)return;let e=()=>Pe(Me()),t=()=>window.setTimeout(e,0);return e(),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t)}},[T]);let Fe=()=>{switch(T?zc({checking:S,guide:Ee,where:Me(),full:h}):null){case`close-check`:return je(),!0;case`close-guide`:return ke(),Oe(),!0;case`show-controls`:return Ae(),!0;case`leave-full`:return De(!1),!0;default:return!1}},Le=(0,D.useRef)(Fe);(0,D.useEffect)(()=>{Le.current=Fe});let Re=t&&!de&&T&&zc({checking:S,guide:Ee,where:Ne,full:h})!==null;(0,D.useEffect)(()=>{if(Re)return Xo(()=>void Le.current())},[Re]);let ze=!t&&T&&!de;(0,D.useEffect)(()=>{if(!ze)return;let e=window.location.href;window.history.pushState(window.history.state,``);let t=!0,n=()=>{if(t=!1,!Le.current())return window.history.back();window.history.pushState(window.history.state,``),t=!0};return window.addEventListener(`popstate`,n),()=>{window.removeEventListener(`popstate`,n),t&&window.location.href===e&&window.history.back()}},[ze]);let Be=l.kind===`joined`;(0,D.useEffect)(()=>{if(!Be)return;let e=document.activeElement;if(e&&e!==document.body)return;let t=Te&&Ee?p.current?.querySelector(`[data-testid="join-guide-ok"]`):null;t?t.focus({preventScroll:!0}):Oe()},[Be]),(0,D.useEffect)(()=>{x.pressed&&T&&!S&&Me()===`controls`&&Oe()},[x.pressed]);let Ve=()=>{e.leave(),n()};if(l.kind===`connecting`||l.kind===`asking`)return(0,z.jsxs)(`div`,{className:t?`rounded-[var(--radius-card)] bg-neutral-900 text-white`:`flex min-h-[100dvh] flex-col items-center justify-center gap-4 bg-black text-white`,"data-join-ui":``,children:[l.kind===`connecting`&&o&&a&&(0,z.jsx)(Tc,{href:a}),(0,z.jsx)(Vc,{text:l.kind===`connecting`?s(`join_connecting`,{host:d},`Connecting to ${d}…`):s(`join_waiting`,{host:d},`Waiting for ${d} to let you in`),body:l.kind===`asking`?s(`join_waiting_body`,{host:d},`${d} sees your name on their screen and taps Allow.`):void 0,onCancel:Ve})]});if(l.kind===`refused`||l.kind===`ended`){let i=l.kind===`refused`||l.why!==`left`&&l.why!==`mismatch`;return(0,z.jsxs)(`div`,{className:t?`flex flex-col items-center gap-4 rounded-[var(--radius-card)] bg-neutral-900 px-6 py-10 text-center text-white`:`flex min-h-[100dvh] flex-col items-center justify-center gap-4 bg-black px-6 text-center text-white`,"data-testid":`join-ended`,"data-why":l.why,"data-join-ui":``,children:[(0,z.jsx)(Se,{size:28,className:`text-white/60`}),(0,z.jsx)(`p`,{className:`max-w-sm text-base`,"data-testid":`join-ended-text`,children:Mc(s,l,d,e.opts.internet??!!e.opts.transport)}),a&&l.why===`no_hub`&&(0,z.jsx)(Tc,{href:a}),(0,z.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[i&&(0,z.jsx)(`button`,{type:`button`,onClick:r,autoFocus:!0,className:`rounded-full bg-white px-4 py-2 text-sm font-medium text-black`,"data-testid":`join-again`,children:l.kind===`refused`&&l.why===`not_playing`?s(`join_retry`,void 0,`Try again`):s(`join_again`,void 0,`Ask to join again`)}),(0,z.jsx)(`button`,{type:`button`,onClick:n,autoFocus:!i,className:`rounded-full bg-white/15 px-4 py-2 text-sm`,"data-testid":`join-done`,children:s(`join_done`,void 0,`Done`)})]})]})}let He=l.player,Ue=c.light??at(He),We=c.rttMs??u?.rttMs??null,Ge=it(We),Ke=Lc(),qe=T&&!C&&!x.ready&&Ke&&(!t||h),Je=kc({player:He,guided:_,movedOff:ne,reconnecting:C}),Ye=He===Oc,Xe=u?.playsAs??null,Ze=C?(l.deadline-w)/1e3:0,Qe=()=>De(!h),$e=t&&!h&&Ke&&T,et=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`span`,{className:`flex items-center gap-1.5 rounded-full bg-black/60 px-2.5 py-1 font-medium`,"data-testid":`join-player`,children:[(0,z.jsx)(`span`,{className:`inline-block h-2.5 w-2.5 rounded-full`,style:{background:`rgb(${Ue[0]},${Ue[1]},${Ue[2]})`}}),t&&(0,z.jsxs)(`span`,{className:`text-white/80`,children:[s(`join_playing_at`,{host:d},`Playing at ${d}'s`),` · `]}),s(`join_you_are`,{n:He},`You are Player ${He}`)]}),We!=null&&(0,z.jsxs)(`span`,{className:`rounded-full bg-black/60 px-2 py-1 tabular-nums`,style:{color:Bc[Ge]},"data-testid":`join-delay`,"data-tone":Ge,"data-path":c.path??void 0,children:[c.path&&(0,z.jsxs)(`span`,{className:`text-white/80`,children:[Ac(s,c.path),` · `]}),Math.round(We),` ms`]}),Ye&&(0,z.jsx)(`span`,{className:`rounded-full bg-black/60 px-2.5 py-1 text-white/85`,"data-testid":`join-seat-stream`,children:s(`join_seat_stream`,{host:d},`You're playing as ${d}'s PS5 user. No need to pick one.`)}),Xe&&!Ye&&(0,z.jsx)(`span`,{className:`rounded-full bg-black/60 px-2.5 py-1 text-white/85`,"data-testid":`join-plays-as`,children:s(`join_plays_as`,{profile:Xe},`You're playing as ${Xe}. No need to pick one.`)}),E&&!Ye&&u?.seatNote&&(0,z.jsx)(`span`,{className:`rounded-full bg-black/60 px-2.5 py-1 text-white/85`,"data-testid":`join-seat-note`,children:s(`join_seat_tv_asks`,{host:d},`${d} chose a profile for you, but it couldn't be used. The TV will ask who you are.`)}),E&&!Ye&&(0,z.jsx)(`span`,{className:`rounded-full bg-white/90 px-2.5 py-1 font-medium text-black`,"data-testid":`join-picking`,children:s(`join_picking`,void 0,`Press PS, then pick Quick Play on the TV`)})]}),tt=(0,z.jsxs)(z.Fragment,{children:[le&&de&&k.shown&&!C&&(0,z.jsxs)(`button`,{type:`button`,onClick:k.hide,className:`flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 font-medium`,"data-testid":`join-hide-controls`,children:[(0,z.jsx)(pe,{size:13}),s(`join_hide_controls`,void 0,`Hide`)]}),!c.sound&&(0,z.jsxs)(`button`,{type:`button`,onClick:()=>e.startSound(),className:`flex items-center gap-1 rounded-full bg-white/90 px-2.5 py-1 font-medium text-black`,"data-testid":`join-sound`,children:[(0,z.jsx)(we,{size:13}),s(`join_sound`,void 0,`Tap for sound`)]}),c.sound&&!c.noSound&&(0,z.jsxs)(`button`,{type:`button`,onClick:()=>e.setMuted(!c.muted),"aria-pressed":c.muted,className:`flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 hover:bg-white/25`,"data-testid":`join-mute`,children:[c.muted?(0,z.jsx)(M,{size:13}):(0,z.jsx)(we,{size:13}),c.muted?s(`rp_unmute`,void 0,`Sound on`):s(`rp_mute`,void 0,`Mute`)]}),c.noSound&&(0,z.jsxs)(`span`,{className:`flex items-center gap-1 rounded-full bg-black/60 px-2.5 py-1 text-white/80`,"data-testid":`join-no-sound`,children:[(0,z.jsx)(M,{size:13}),s(`join_no_sound`,void 0,`No sound in this browser`)]}),(t||typeof document<`u`&&!!document.documentElement.requestFullscreen)&&(0,z.jsx)(`button`,{type:`button`,onClick:()=>void Qe(),"aria-label":h?s(`join_exit_fullscreen`,void 0,`Leave full screen`):s(`pad_fill`,void 0,`Full screen`),className:`flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 hover:bg-white/25`,"data-testid":`join-full`,children:h?(0,z.jsx)(be,{size:13}):(0,z.jsx)(O,{size:13})}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>ee(!0),"aria-label":s(`join_check_title`,void 0,`Check your controller`),title:s(`join_check_title`,void 0,`Check your controller`),className:`flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 hover:bg-white/25`,"data-testid":`join-check-open`,children:(0,z.jsx)(me,{size:13})}),(0,z.jsxs)(`button`,{type:`button`,onClick:Ve,className:`flex items-center gap-1 rounded-full bg-[var(--color-danger,#dc2626)] px-3 py-1 font-medium`,"data-testid":`join-leave`,children:[(0,z.jsx)(ge,{size:13}),s(`join_leave`,void 0,`Leave`)]})]}),nt=k.shown?`opacity-100`:`pointer-events-none opacity-0`,rt={"data-testid":`join-bar`,"data-shown":k.shown?`1`:`0`,onFocus:e=>{(Te||e.target.matches?.(`:focus-visible`))&&ce(!0)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||ce(!1)},onPointerEnter:e=>{e.pointerType===`mouse`&&oe(!0)},onPointerLeave:()=>oe(!1)},ot=h||!t?`fixed inset-0 z-[200] bg-black`:`relative mx-auto aspect-video w-full max-w-[max(20rem,calc((100dvh_-_22rem)*16/9))] overflow-hidden rounded-[var(--radius-card)] bg-black shadow-[var(--shadow-2)]`,st=t&&h;return(0,z.jsxs)(`div`,{className:`space-y-2`,ref:p,"data-join-ui":``,children:[(0,z.jsxs)(`div`,{className:`${ot} select-none text-white [-webkit-touch-callout:none]`,style:{touchAction:`none`},role:st?`dialog`:void 0,"aria-modal":st?!0:void 0,"aria-label":st?s(`pad_fill`,void 0,`Full screen`):void 0,onPointerMove:e=>{if(e.pointerType===`mouse`)return he();let t=_e.current;t&&t.id===e.pointerId&&Math.hypot(e.clientX-t.x,e.clientY-t.y)>Ic&&ve()},onPointerDown:e=>{if(Fc(e.target))return;if(e.pointerType===`mouse`||!de)return he();if(e.target.closest?.(`[data-testid="join-bar"], button, a, input, [role="button"]`))return;ve();let{pointerId:t,clientX:n,clientY:r}=e;_e.current={id:t,x:n,y:r,timer:setTimeout(()=>{_e.current=null,navigator.vibrate?.(15),k.toggle()},450)}},onPointerUp:ve,onPointerCancel:ve,onPointerLeave:ve,"data-testid":`join-stage-view`,children:[(0,z.jsx)(`div`,{ref:f,className:`pointer-events-none absolute inset-0 z-0 flex items-center justify-center`,"aria-hidden":!0}),le&&!k.shown&&!C&&We!=null&&(0,z.jsxs)(`span`,{className:`pointer-events-none absolute z-10 rounded-full bg-black/40 px-1.5 py-0.5 text-[10px] leading-none tabular-nums`,style:{color:Bc[Ge],top:`max(0.5rem, env(safe-area-inset-top))`,right:`max(0.5rem, env(safe-area-inset-right))`},"data-testid":`join-delay-corner`,children:[Math.round(We),` ms`]}),qe?(0,z.jsxs)(`div`,{className:`absolute left-1/2 top-1/2 z-20 flex w-max max-w-[min(24rem,calc(100%-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col items-center gap-2 rounded-2xl bg-black/70 p-3 text-xs backdrop-blur-sm transition-opacity duration-300 ${nt}`,...rt,children:[(0,z.jsx)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:et}),(0,z.jsx)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:tt})]}):$e?null:(0,z.jsxs)(`div`,{className:`absolute inset-x-0 top-0 z-20 flex flex-wrap items-center gap-2 bg-gradient-to-b from-black/70 to-transparent px-3 pb-5 pt-[max(8px,env(safe-area-inset-top))] text-xs transition-opacity duration-300 ${nt}`,...rt,children:[et,(0,z.jsx)(`span`,{className:`flex-1`}),tt]}),!k.shown&&!qe&&(0,z.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),he()},"aria-label":s(`join_show_controls`,void 0,`Show controls`),className:`absolute left-1/2 top-[max(6px,env(safe-area-inset-top))] z-20 flex h-7 w-11 -translate-x-1/2 items-center justify-center rounded-full bg-black/40 text-white/70 opacity-60 hover:opacity-100 focus-visible:opacity-100`,"data-testid":`join-show-controls`,children:(0,z.jsx)(ue,{size:16,"aria-hidden":!0})}),ye&&!k.shown&&(0,z.jsx)(`p`,{className:`pointer-events-none absolute left-1/2 top-[max(10px,env(safe-area-inset-top))] z-20 -translate-x-1/2 rounded-full bg-black/60 px-3 py-1 text-xs text-white/85`,"data-testid":`join-hold-hint`,children:s(`join_hold_hint`,void 0,`Press and hold the picture to show the buttons`)}),c.problem&&(0,z.jsx)(`p`,{className:`absolute inset-x-4 top-1/2 z-10 -translate-y-1/2 text-center text-sm text-white/85`,"data-testid":`join-problem`,children:c.problem===`no_hevc`?s(`pad_watch_no_hevc`,void 0,`This device can't play this stream's picture: the computer streams HEVC, and this device plays only H.264.`):s(`pad_watch_decode`,void 0,`The picture could not be played here.`)}),S&&(0,z.jsx)(Cc,{onClose:je}),qe&&(0,z.jsx)(ks,{stream:e,layout:`overlay`,onMenu:()=>k.shown?k.hide():he()}),!qe&&!C&&(0,z.jsxs)(`div`,{className:`absolute bottom-3 left-3 z-20 flex items-center gap-2 rounded-2xl bg-black/70 px-3 py-1.5 text-xs transition-opacity duration-300 ${nt}`,"data-testid":`join-pad`,children:[(0,z.jsx)(me,{size:14,style:{color:x.pressed?`rgb(${Ue[0]},${Ue[1]},${Ue[2]})`:void 0}}),x.ready?(0,z.jsxs)(`span`,{className:`flex flex-col items-start gap-1`,children:[(0,z.jsx)(`span`,{children:s(`join_pad_ready`,void 0,`Your controller is ready`)}),x.weak8BitDo&&x.id&&(0,z.jsx)(ps,{id:x.id,className:`text-amber-200/90`}),x.kind===`guess`&&no()&&(0,z.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2 text-white/75`,"data-testid":`join-pad-unknown`,children:[s(`join_check_unknown_short`,void 0,`Not on our list: buttons may be mixed up.`),(0,z.jsx)(`button`,{type:`button`,onClick:()=>ee(!0),className:`rounded-full bg-white px-2.5 py-0.5 font-medium text-black`,"data-testid":`join-pad-unknown-check`,children:s(`join_check_title`,void 0,`Check your controller`)})]})]}):Ke&&t&&!h?s(`join_full_to_play`,void 0,`Tap full screen to play with the on-screen controller.`):(0,z.jsxs)(`span`,{className:`flex flex-col`,children:[(0,z.jsx)(`span`,{children:s(`join_pad_none`,void 0,`Connect a controller (USB or Bluetooth) and press any button.`)}),(0,z.jsx)(`span`,{className:`text-white/60`,"data-testid":`join-pad-keys`,children:s(`join_pad_keys`,void 0,`Or use the keyboard: WASD move, arrows D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.`)})]}),Te&&(0,z.jsx)(`span`,{className:`max-w-[14rem] border-l border-white/20 pl-2 text-white/70`,"data-testid":`join-tv-back`,children:s(`join_tv_back_hint`,void 0,`Press Back on the remote for the buttons.`)})]}),u?.blockSystem&&u.state===`playing`&&!qe&&(0,z.jsx)(`p`,{className:`absolute bottom-3 right-3 z-20 rounded-full bg-black/60 px-3 py-1 text-[11px] text-white/70 transition-opacity duration-300 ${nt}`,"data-testid":`join-blocked`,children:s(`join_block_note`,{host:d},`${d} turned off PS and Create for friends.`)}),fe&&!Ye&&de&&!k.shown&&!C&&(0,z.jsx)(`p`,{className:`pointer-events-none absolute left-1/2 top-2 z-20 -translate-x-1/2 whitespace-nowrap rounded-full bg-white/90 px-2.5 py-1 text-xs font-medium text-black`,"data-testid":`join-picking-note`,children:s(`join_picking`,void 0,`Press PS, then pick Quick Play on the TV`)}),Je&&!Xe&&(0,z.jsxs)(`div`,{className:`absolute bottom-14 left-1/2 z-30 w-[min(22rem,calc(100%-2rem))] -translate-x-1/2 rounded-2xl border border-white/10 bg-neutral-900/90 p-4 text-sm shadow-2xl backdrop-blur-md`,"data-testid":`join-guide`,children:[(0,z.jsx)(`p`,{className:`font-semibold`,children:s(`join_guide_title`,void 0,`One more step on the TV`)}),(0,z.jsx)(`p`,{className:`mt-1 text-white/75`,children:s(`join_guide_body`,void 0,`On your controller, press PS once. The TV asks "Who's using this controller?". Pick Quick Play or your own user. The host doesn't need to do anything.`)}),(0,z.jsx)(`p`,{className:`mt-1 text-white/60`,children:s(`join_guide_menus`,void 0,`On the PS5's home screen only the host controls the menus; your controller plays inside games.`)}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>{ke(),Oe()},className:`mt-3 rounded-full bg-white px-3 py-1 text-xs font-medium text-black`,"data-testid":`join-guide-ok`,children:s(`join_guide_ok`,void 0,`Got it`)})]}),C&&(0,z.jsxs)(`div`,{className:`absolute inset-0 z-30 flex flex-col items-center justify-center gap-3 bg-black/70 px-6 text-center`,"data-testid":`join-reconnecting`,children:[(0,z.jsxs)(`button`,{type:`button`,onClick:Ve,className:`absolute right-3 top-[max(10px,env(safe-area-inset-top))] flex items-center gap-1 rounded-full bg-white/15 px-3 py-1.5 text-sm font-medium hover:bg-white/25`,"data-testid":`join-reconnecting-leave`,children:[(0,z.jsx)(ge,{size:14}),s(`join_leave`,void 0,`Leave`)]}),(0,z.jsx)(`span`,{className:`h-7 w-7 animate-spin rounded-full border-2 border-white/30 border-t-white`,"aria-hidden":!0}),l.hostStopped?(0,z.jsx)(`p`,{className:`max-w-sm text-base font-medium`,"data-testid":`join-host-away`,children:s(`join_host_away`,{time:Ec(Ze)},`The host stopped playing — waiting for them to start again (${Ec(Ze)})`)}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`text-base font-medium`,children:s(`join_reconnecting`,void 0,`Reconnecting…`)}),(0,z.jsx)(`p`,{className:`text-sm text-white/70`,"data-testid":`join-reconnecting-left`,children:s(`join_reconnecting_left`,{time:Ec(Ze)},`Your place is kept for ${Ec(Ze)}.`)})]})]}),!t&&T&&y&&Ke&&(0,z.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-16 z-20 flex justify-center`,children:(0,z.jsxs)(`span`,{className:`flex items-center gap-2 rounded-full bg-black/70 px-3 py-1.5 text-xs text-white/85`,children:[(0,z.jsx)(j,{size:14}),s(`pad_turn`,void 0,`Turn the phone sideways`)]})}),(0,z.jsx)(`div`,{ref:m,tabIndex:0,"data-own-arrows":``,"data-join-game":``,"aria-label":s(`join_game_label`,{host:d},`${d}'s game`),className:`pointer-events-none absolute inset-0 outline-none`,"data-testid":`join-game`})]}),$e&&(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 rounded-[var(--radius-card)] bg-neutral-900 px-3 py-2 text-xs text-white`,"data-testid":`join-bar`,"data-shown":`1`,"data-below":`1`,children:[(0,z.jsx)(`div`,{className:`flex w-full min-w-0 flex-wrap items-center gap-2`,children:et}),(0,z.jsxs)(`button`,{type:`button`,onClick:()=>void Qe(),className:`flex h-11 min-w-0 flex-1 items-center justify-center gap-1.5 rounded-full bg-white/15 px-3 text-sm font-medium hover:bg-white/25`,"data-testid":`join-fullscreen-below`,children:[(0,z.jsx)(O,{size:15}),s(`pad_fill`,void 0,`Full screen`)]}),c.sound&&!c.noSound?(0,z.jsx)(`button`,{type:`button`,onClick:()=>e.setMuted(!c.muted),"aria-pressed":c.muted,"aria-label":c.muted?s(`rp_unmute`,void 0,`Sound on`):s(`rp_mute`,void 0,`Mute`),className:`flex h-11 w-11 items-center justify-center rounded-full bg-white/15 hover:bg-white/25`,children:c.muted?(0,z.jsx)(M,{size:16}):(0,z.jsx)(we,{size:16})}):c.sound?null:(0,z.jsxs)(`button`,{type:`button`,onClick:()=>e.startSound(),className:`flex h-11 items-center justify-center gap-1.5 rounded-full bg-white px-3 text-sm font-medium text-black`,children:[(0,z.jsx)(we,{size:15}),s(`join_sound`,void 0,`Tap for sound`)]}),(0,z.jsxs)(`button`,{type:`button`,onClick:Ve,className:`flex h-11 items-center justify-center gap-1.5 rounded-full bg-[var(--color-danger,#dc2626)] px-4 text-sm font-medium`,"data-testid":`join-leave-below`,children:[(0,z.jsx)(ge,{size:15}),s(`join_leave`,void 0,`Leave`)]})]})]})}var Uc=`ps5upload.join.name`;function Wc(e){return/iPhone/.test(e)?`iPhone`:/iPad/.test(e)?`iPad`:/Android/.test(e)?`Android`:``}function Gc(e){return e.trim().slice(0,32)}function Kc(e=``){return Gc(Lt(`ps5upload.join.name`)??``)||e}function qc(e){let t=Gc(e);return t&&It(Uc,t),t}function Jc(e){try{return!!sessionStorage.getItem(Ro(e))}catch{return!1}}async function Yc(e){try{e?(await document.documentElement.requestFullscreen?.({navigationUI:`hide`}),await screen.orientation.lock?.(`landscape`)):document.fullscreenElement&&await document.exitFullscreen()}catch{}}function Xc({url:e,invite:t,host:n,transport:r,lanUrl:i=null,path:a=null,internet:o}){let s=Ie(),c=wc(r&&o!==!1?e:null,i),[l,u]=(0,D.useState)(()=>Kc(Wc(typeof navigator>`u`?``:navigator.userAgent))),[d,f]=(0,D.useState)(null),[p,m]=(0,D.useState)(0),h=(0,D.useCallback)(e=>{if(!e)return;let t=typeof window<`u`&&!!window.matchMedia?.(`(pointer: coarse)`).matches,n=e.querySelector(`[data-testid="join-name"]`)?.value.trim()?`join-go`:t?null:`join-name`;n&&e.querySelector(`[data-testid="${n}"]`)?.focus({preventScroll:!0})},[]),g=i=>{let s=qc(i);if(!s)return;let c=new cc({url:e,invite:t,name:s,host:n,transport:r,path:a,...o===void 0?{}:{internet:o}});f(c),m(e=>e+1),c.start()};if((0,D.useEffect)(()=>{!d&&Jc(t)&&l.trim()&&g(l)},[]),(0,D.useEffect)(()=>d?dc(d):void 0,[d]),(0,D.useEffect)(()=>{if(!d)return;let e=()=>d.stop();return window.addEventListener(`pagehide`,e),()=>window.removeEventListener(`pagehide`,e)},[d]),d)return(0,z.jsx)(Hc,{session:d,lanUrl:i,hubDown:c,onLeave:()=>f(null),onAgain:()=>{d.stop(),g(l)},onFullscreen:Yc},p);let _=n??s(`join_host_fallback`,void 0,`your friend`),v=(0,z.jsx)(`div`,{className:`flex min-h-[100dvh] items-center justify-center bg-black px-6 text-white`,"data-testid":`join-name-step`,"data-join-ui":``,children:(0,z.jsxs)(`form`,{ref:h,className:`w-full max-w-sm space-y-4 rounded-2xl border border-white/10 bg-neutral-900 p-6`,onSubmit:e=>{e.preventDefault(),g(l)},children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(`span`,{className:`flex h-10 w-10 items-center justify-center rounded-full bg-white/10`,children:(0,z.jsx)(Se,{size:20})}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h1`,{className:`text-lg font-semibold`,children:s(`join_title`,void 0,`Join a friend's game`)}),(0,z.jsx)(`p`,{className:`text-sm text-white/60`,children:s(`join_title_body`,{host:_},`Play on ${_}'s PS5 as Player 2, 3 or 4.`)})]})]}),(0,z.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,z.jsx)(`span`,{className:`text-sm font-medium`,children:s(`join_name_label`,void 0,`Your name`)}),(0,z.jsx)(`input`,{value:l,onChange:e=>u(e.target.value),maxLength:32,autoComplete:`nickname`,className:`block w-full rounded-lg border border-white/15 bg-black px-3 py-2 text-base outline-none focus:border-white/50`,"data-testid":`join-name`}),(0,z.jsx)(`span`,{className:`block text-xs text-white/50`,children:s(`join_name_hint`,void 0,`Your friend sees this when you ask to join.`)})]}),(0,z.jsx)(`button`,{type:`submit`,disabled:!l.trim(),className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black disabled:opacity-40`,"data-testid":`join-go`,children:s(`join_button`,void 0,`Join`)}),c&&i&&(0,z.jsx)(Tc,{href:i})]})});return t?(0,z.jsx)(Wo,{appLink:rt(location.href),children:v}):v}function Zc(e){let t=(e??``).trim().replace(/^\[|\]$/g,``).toLowerCase(),n=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(t);if(n){let e=n.slice(1).map(Number);if(e.some(e=>e>255))return null;let[t,r]=e;return t===10||t===172&&r>=16&&r<32||t===192&&r===168||t===169&&r===254||t===127?0:t===100&&r>=64&&r<128?1:2}if(!t.includes(`:`)||!/^[0-9a-f:.]+$/.test(t))return null;if(t.startsWith(`fd7a:115c:a1e0:`))return 1;let r=parseInt(t.split(`:`)[0]||`0`,16);return(r&65024)==64512||(r&65472)==65152||t===`::1`?0:2}function Qc(e,t){let n=Zc(e),r=Zc(t);return n===1||r===1?`tailscale`:r===0?`lan`:r===2?`internet`:null}function $c(e){let t=(e??``).toLowerCase();if(t.endsWith(`.local`))return`lan`;if(t.endsWith(`.ts.net`))return`tailscale`;let n=Zc(t);return n===0?`lan`:n===1?`tailscale`:null}function el(e){let t=[];if(typeof e.forEach==`function`)e.forEach(e=>t.push(e));else for(let n of e)t.push(n);let n=new Map(t.map(e=>[String(e.id),e])),r=t.filter(e=>e.type===`candidate-pair`),i=t.filter(e=>e.type===`transport`&&typeof e.selectedCandidatePairId==`string`).map(e=>n.get(String(e.selectedCandidatePairId))).find(Boolean)??r.find(e=>e.selected===!0)??r.find(e=>e.nominated===!0&&e.state===`succeeded`);if(!i)return null;let a=e=>{let t=n.get(String(e));if(!t)return null;let r=t.address??t.ip;return typeof r==`string`?r:null};return Qc(a(i.localCandidateId),a(i.remoteCandidateId))}function tl(e){let t=e.replace(/:\d+$/,``).replace(/^\[|\]$/g,``);return`${t===`localhost`||t===`127.0.0.1`||t===`::1`?`ws`:`wss`}://${e}/ws`}function nl(e){let t=new Set;for(let n of e.matchAll(/^a=fingerprint:sha-256[ \t]+([0-9A-Fa-f:]+)[ \t]*\r?$/gim))t.add(n[1].toUpperCase());return/^a=fingerprint:(?!sha-256[ \t])/im.test(e)?null:t.size===1?[...t][0]:null}function rl(e,t){let n=nl(e);return n!==null&&n===t.toUpperCase()}var il=16777216;function al(e){let t=16383,n=Math.max(1,Math.ceil(e.length/t)),r=[];for(let i=0;ithis.max)return this.parts=[],this.size=0,{kind:`error`,why:`too_big`};if(this.parts.push(r.slice()),this.size+=r.length,n===1)return{kind:`partial`};let i=new Uint8Array(this.size),a=0;for(let e of this.parts)i.set(e,a),a+=e.length;return this.parts=[],this.size=0,{kind:`message`,data:i.buffer}}};function sl(e){let t=new Uint8Array(9);return t[0]=3,t.set(e.subarray(0,8),1),t}var cl=[`stun:stun.cloudflare.com:3478`,`stun:stun.l.google.com:19302`],ll=1500,ul=2e4;function dl(e){let t=e?.codecs??[],n=e=>t.filter(t=>t.mimeType.toLowerCase()===e);return[...n(`video/h264`),...n(`video/h265`),...n(`video/rtx`)]}var fl=null;function pl(e){e.onopen=e.onmessage=e.onclose=e.onerror=null;try{e.readyState===1&&e.send(JSON.stringify({t:`leave`})),e.close(1e3)}catch{}}function ml(e,t={}){let n=t.WebSocketImpl??(typeof WebSocket>`u`?void 0:WebSocket);if(!n||fl)return;let r=tl(e.hub),i;try{i=new n(r)}catch{return}let a={url:r,room:e.room,ws:i,msgs:[],timer:null};fl=a;let o=()=>{fl===a&&(fl=null,a.timer&&clearTimeout(a.timer),pl(i))};i.onopen=()=>i.send(JSON.stringify({v:1,t:`join`,room:e.room})),i.onmessage=e=>{if(typeof e.data==`string`)try{a.msgs.push(JSON.parse(e.data))}catch{}},i.onclose=o,i.onerror=()=>{},a.timer=setTimeout(o,t.keepMs??6e4)}function hl(e,t){let n=fl;return n?(fl=null,n.timer&&clearTimeout(n.timer),n.url!==e||n.room!==t||n.ws.readyState>1||n.msgs.some(e=>e.t===`error`||e.t===`closed`)?(pl(n.ws),null):{ws:n.ws,msgs:n.msgs}):null}function gl(e,t={}){var n;let r=t.WebSocketImpl??(typeof WebSocket>`u`?void 0:WebSocket),i=t.PeerConnection??(typeof RTCPeerConnection>`u`?void 0:RTCPeerConnection),a=t.iceTimeoutMs??15e3,o=t.log??(()=>{});class s{constructor(e){this.CONNECTING=0,this.OPEN=1,this.CLOSING=2,this.CLOSED=3,this.readyState=0,this.binaryType=`arraybuffer`,this.onopen=null,this.onmessage=null,this.onclose=null,this.onerror=null,this.hub=null,this.pc=null,this.dc=null,this.timer=null,this.rx=new ol,this.answered=!1,this.early=[],this.hubBackUntil=0,this.offerSdp=null,this.offerSent=!1,this.ownEarly=[],this.media=null,setTimeout(()=>this.begin(),0)}begin(){if(this.readyState!==0)return;if(!i||!r){this.fail(`no_webrtc`);return}let n=t.signalUrl??tl(e.hub),a=t.signalUrl||t.lan?null:hl(n,e.room),s;if(a)s=a.ws,o(`hub: joined early`);else try{s=new r(n)}catch{this.fail(`no_hub`);return}if(this.hub=s,this.prepare(),this.readyState===0){s.onopen=()=>s.send(JSON.stringify(t.lan?{v:1,t:`join`,lan:!0}:{v:1,t:`join`,room:e.room})),s.onmessage=e=>{if(typeof e.data!=`string`)return;let t;try{t=JSON.parse(e.data)}catch{return}this.onHub(t)},s.onclose=e=>{this.hub===s&&(this.hub=null,this.readyState===0&&(this.answered||e?.code===1001&&this.hubRestarting()||this.fail(`no_hub`)))},s.onerror=()=>{};for(let e of a?.msgs??[])this.onHub(e)}}signal(e){let t=this.hub;t&&t.readyState===1&&t.send(JSON.stringify({t:`signal`,to:`host`,data:e}))}onHub(e){if(this.readyState===0)switch(e.t){case`joined`:o(`hub: joined room as ${e.gid??`?`}`),this.sendOffer();return;case`signal`:e.from===`host`&&e.data&&typeof e.data==`object`&&this.onSignal(e.data);return;case`closed`:this.fail(`no_room`);return;case`error`:if(o(`hub: error ${e.why??`?`}`),e.why===`no_room`&&this.hubBackUntil&&this.hubRestarting())return;this.fail(e.why===`no_room`?`no_room`:e.why===`room_full`?`net_full`:`no_hub`);return}}prepare(){if(!i)return;this.offerSent=!1,this.ownEarly=[];let e;try{e=new i({iceServers:[{urls:cl}]})}catch{this.fail(`no_webrtc`);return}this.pc=e;let n=e.createDataChannel(t.label??`join`,{ordered:!0});if(n.binaryType=`arraybuffer`,this.dc=n,n.onopen=()=>this.opened(n),n.onmessage=e=>this.fromChannel(e.data),n.onclose=()=>{this.dc===n&&this.dropped()},t.video&&e.addTransceiver){try{let t=e.addTransceiver(`video`,{direction:`recvonly`}),n=dl(globalThis.RTCRtpReceiver?.getCapabilities?.(`video`));n.length&&t.setCodecPreferences&&t.setCodecPreferences(n)}catch{}try{e.addTransceiver(`audio`,{direction:`recvonly`})}catch{}e.ontrack=t=>{if(this.pc!==e)return;let n=this.media?.stream??t.streams[0]??new MediaStream;n.getTracks().includes(t.track)||n.addTrack(t.track),this.media=t.track.kind===`audio`?{stream:n,receiver:this.media?.receiver??t.receiver,audio:t.receiver}:{stream:n,receiver:t.receiver,...this.media?.audio?{audio:this.media.audio}:{}}}}e.onicecandidate=t=>{if(this.pc!==e)return;let n=t.candidate;if(!n||!n.candidate)return;let r={type:`candidate`,candidate:n.candidate,sdpMid:n.sdpMid??`0`};this.offerSent?this.signal(r):this.ownEarly.push(r)},e.oniceconnectionstatechange=()=>{if(this.pc!==e)return;let t=e.iceConnectionState;o(`ice: ${t}`),t===`failed`&&(this.readyState===0?this.fail(`no_direct`):this.dropped())},this.offerSdp=(async()=>{let t=await e.createOffer();return await e.setLocalDescription(t),e.localDescription?.sdp??t.sdp??``})().catch(()=>(this.pc===e&&this.fail(`no_webrtc`),null))}async sendOffer(){let e=this.pc,t=this.offerSdp;if(!e||!t||this.offerSent)return;this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,this.readyState===0&&this.fail(`no_direct`)},a);let n=await t;if(this.pc===e&&n!==null&&this.readyState===0){this.signal({type:`offer`,sdp:n}),this.offerSent=!0;for(let e of this.ownEarly.splice(0))this.signal(e)}}async onSignal(t){let n=this.pc;if(t.type===`bye`)this.fail(t.why===`full`?`net_full`:`offer`);else if(n){if(t.type===`answer`){if(this.answered||typeof t.sdp!=`string`)return;if(e.fp?!rl(t.sdp,e.fp):nl(t.sdp)===null){o(`answer: fingerprint does not match the link`),this.fail(`mismatch`);return}this.answered=!0;try{await n.setRemoteDescription({type:`answer`,sdp:t.sdp});for(let e of this.early.splice(0))await n.addIceCandidate(e).catch(()=>{})}catch{this.fail(`offer`)}}else if(t.type===`candidate`&&typeof t.candidate==`string`&&t.candidate){let e={candidate:t.candidate,sdpMid:typeof t.sdpMid==`string`?t.sdpMid:`0`,sdpMLineIndex:typeof t.sdpMLineIndex==`number`?t.sdpMLineIndex:0};this.answered?await n.addIceCandidate(e).catch(()=>{}):this.early.push(e)}}}opened(e){this.dc===e&&this.readyState===0&&(this.clearTimer(),this.readyState=1,o(`channel open`),this.leaveHub(),this.onopen?.(new Event(`open`)))}fromChannel(e){if(this.readyState!==1)return;if(typeof e==`string`){this.onmessage?.(new MessageEvent(`message`,{data:e}));return}if(!(e instanceof ArrayBuffer))return;let t=this.rx.push(e);switch(t.kind){case`ping`:try{this.dc?.send(sl(t.data))}catch{}return;case`message`:this.onmessage?.(new MessageEvent(`message`,{data:t.data}));return;case`error`:o(`channel: bad binary message (${t.why})`),this.dropped();return;default:return}}async netPath(){let e=this.pc;if(!e||this.readyState!==1||typeof e.getStats!=`function`)return null;try{return el(await e.getStats())}catch{return null}}send(e){let t=this.dc;if(this.readyState!==1||!t||t.readyState!==`open`)throw Error(`not open`);if(typeof e==`string`){t.send(e);return}let n=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);for(let e of al(n))t.send(e)}close(){this.readyState!==3&&(this.teardown(),this.emitClose(1e3,``,!0))}clearTimer(){this.timer&&clearTimeout(this.timer),this.timer=null}leaveHub(){let e=this.hub;if(this.hub=null,e)try{e.readyState===1&&e.send(JSON.stringify({t:`leave`})),e.close(1e3)}catch{}}hubRestarting(){let e=Date.now();return this.hubBackUntil||=e+ul,e>=this.hubBackUntil?!1:(o(`hub: restarting, trying again`),this.clearTimer(),this.leaveHub(),this.closePeer(),this.answered=!1,this.early=[],this.timer=setTimeout(()=>{this.timer=null,this.begin()},ll),!0)}teardown(){this.readyState=3,this.clearTimer(),this.leaveHub(),this.closePeer()}closePeer(){let e=this.pc,t=this.dc;this.pc=null,this.dc=null,this.media=null,this.offerSdp=null,this.offerSent=!1,this.ownEarly=[];try{t?.close()}catch{}try{e?.close()}catch{}}dropped(){this.readyState!==3&&(this.teardown(),this.emitClose(1006,``,!1))}fail(e){this.readyState!==3&&(o(`failed: ${e}`),this.teardown(),this.emitClose(He,`net:${e}`,!1))}emitClose(e,t,n){let r=this.onclose;if(!r)return;let i=typeof CloseEvent>`u`?{type:`close`,code:e,reason:t,wasClean:n}:new CloseEvent(`close`,{code:e,reason:t,wasClean:n});setTimeout(()=>r(i),0)}}return n=s,n.CONNECTING=0,n.OPEN=1,n.CLOSING=2,n.CLOSED=3,s}var _l=3e3;function vl(e,t){return/^https?:\/\/[^/?#]+(\/[^?#]*)?\/join\/?$/.test(e)?e.replace(/^http/,`ws`).replace(/\/join\/?$/,`/${t}`):null}var U=e=>vl(e,`api/join/signal`);function yl(e){let t=[];if(e.rtc){let n=e.net??{room:``,key:``,fp:e.fp??``,hub:``};for(let[r,i]of[[`lan`,e.lan],[`tailscale`,e.ts]]){let a=i?U(i):null;if(!a)continue;let o=e.rtcMake(n,{signalUrl:e.reach(a),...e.net?{}:{lan:!0}});t.push({via:r,make:()=>new o(``),pinned:!!n.fp})}if(e.net){let n=e.rtcMake(e.net,{});t.push({via:`hub`,make:()=>new n(``),pinned:!0})}}let n=e.lan?vl(e.lan,`api/join/ws`):null;if(n){let r=e.reach(n);t.push({via:`socket`,make:()=>e.socket(r)})}return t}var bl=new Map;function xl(e,t,n=300,r=_l){let i=e.some(e=>e===`lan`||e===`tailscale`),a=e.some(e=>e!==`socket`);return e.map(e=>e===t?0:e===`hub`&&i?n:e===`socket`&&a?r:0)}function Sl(e){let t=e.find(e=>e.via===`hub`),n=e.find(e=>(e.via===`lan`||e.via===`tailscale`)&&[`no_direct`,`net_full`,`offer`].includes(Ue(e.e)??``));return t&&(Ue(t.e)!==`no_hub`||!n)?t.e:n?n.e:t?.e??e[e.length-1]?.e??null}function Cl(e,t){var n;let r=t.log??(()=>{}),i=t.headStartMs??300,a=t.socketAfterMs??3e3;class o{constructor(e){this.CONNECTING=0,this.OPEN=1,this.CLOSING=2,this.CLOSED=3,this.readyState=0,this.binaryType=`arraybuffer`,this.onopen=null,this.onmessage=null,this.onclose=null,this.onerror=null,this.live=[],this.waiting=[],this.pinned=new Set,this.t0=0,this.closes=[],this.winner=null,setTimeout(()=>this.begin(),0)}get via(){return this.winner?.via??null}get media(){return this.winner?.s?.media??null}async netPath(){let e=this.winner?.s;return e?.netPath?e.netPath():null}begin(){if(this.readyState!==0)return;let n=e();if(!n.length){this.end({type:`close`,code:1006,reason:``,wasClean:!1});return}this.t0=Date.now();for(let e of n)e.pinned&&this.pinned.add(e.via);let r=xl(n.map(e=>e.via),bl.get(t.room)??null,i,a);n.forEach((e,t)=>{r[t]===0?this.launch(e.via,e.make):this.waiting.push({via:e.via,make:e.make,timer:setTimeout(()=>this.startWaiting(e.via),r[t])})})}startWaiting(e){let t=this.waiting.findIndex(t=>t.via===e);if(t<0)return;let[n]=this.waiting.splice(t,1);clearTimeout(n.timer),this.launch(n.via,n.make)}launch(e,t){if(this.readyState!==0)return;let n;try{n=t()}catch{this.tryClosed(e,{type:`close`,code:1006,reason:``,wasClean:!1});return}r(`path: trying ${e}`);let i={via:e,s:n};this.live.push(i),n.binaryType=this.binaryType,n.onopen=e=>this.won(i,e),n.onclose=t=>{this.live=this.live.filter(e=>e!==i),this.tryClosed(e,t)},n.onerror=()=>{},n.onmessage=null}tryClosed(e,t){if(this.readyState===0){if(r(`path: ${e} failed after ${Date.now()-this.t0} ms${t?.reason?` (${t.reason})`:``}`),this.closes.push({via:e,e:t}),this.pinned.has(e)&&Ue(t)===`mismatch`){for(let e of this.waiting.filter(e=>e.via===`socket`))clearTimeout(e.timer);this.waiting=this.waiting.filter(e=>e.via!==`socket`)}!this.live.length&&this.waiting.length?this.startWaiting(this.waiting[0].via):!this.live.length&&!this.waiting.length&&this.end(Sl(this.closes))}}won(e,n){if(this.readyState!==0)return;this.winner=e,bl.set(t.room,e.via),r(`path: playing by ${e.via} after ${Date.now()-this.t0} ms`);for(let e of this.waiting.splice(0))clearTimeout(e.timer);for(let t of this.live.splice(0))if(t!==e){t.s.onopen=t.s.onclose=t.s.onmessage=t.s.onerror=null;try{t.s.close()}catch{}}let i=e.s;i.onmessage=e=>this.onmessage?.(e),i.onerror=e=>this.onerror?.(e),i.onclose=e=>{this.readyState!==3&&(this.readyState=3,this.onclose?.(e))},this.readyState=1,t.onWin?.(e.via),this.onopen?.(n)}send(e){if(this.readyState!==1||!this.winner)throw Error(`not open`);this.winner.s.send(e)}close(e,t){if(this.readyState===3)return;let n=this.readyState===1;this.readyState=3;for(let e of this.waiting.splice(0))clearTimeout(e.timer);let r=this.winner?[this.winner,...this.live]:this.live.splice(0);for(let n of r){n.s.onopen=n.s.onclose=n.s.onmessage=n.s.onerror=null;try{n.s.close(e,t)}catch{}}let i=this.onclose;if(i){let r={type:`close`,code:e??1e3,reason:t??``,wasClean:n};setTimeout(()=>i(r),0)}}end(e){if(this.readyState===3)return;this.readyState=3;let t=this.onclose,n=e??{type:`close`,code:1006,reason:``,wasClean:!1};t&&setTimeout(()=>t(n),0)}}return n=o,n.CONNECTING=0,n.OPEN=1,n.CLOSING=2,n.CLOSED=3,o}fs();var wl=new URLSearchParams(location.hash.slice(1)),Tl=wl.get(`n`)?.trim()||null,El=nt(location.hash);El&&ml(El);var Dl=(0,x.createRoot)(document.getElementById(`root`));if(El){let e=gl(El,{video:!0,log:e=>console.info(`[join] ${e}`)}),t=Re(location.hash,`join`);Dl.render((0,z.jsx)(Xc,{url:tl(El.hub),invite:El.key,host:Tl,transport:e,lanUrl:t?ze(t,{key:El.key}):null}))}else{let e=wl.get(`i`)||null,t=location.pathname.replace(/\/join\/?$/,``),n=`${location.protocol===`https:`?`wss`:`ws`}://${location.host}${t}/api/join/ws`,r=e=>console.info(`[join] ${e}`),i=`${location.origin}${t}/join`,a=typeof RTCPeerConnection>`u`?void 0:Cl(()=>yl({net:null,lan:i,ts:null,fp:tt(wl.get(`fp`)),rtc:!0,reach:e=>e,rtcMake:(e,t)=>gl(e,{video:!0,log:r,...t}),socket:e=>new WebSocket(e)}),{room:i,log:r});Dl.render((0,z.jsx)(Xc,{url:n,invite:e,host:Tl,path:$c(location.hostname),transport:a,internet:!1}))} +I€wu¸öôú!3å6³‹âVq£³¹´RN£%y10º:pŠ#\:J:b9Hµ7h_Ž:¢I9 _¼™µV,þ <`});var E={a:v};this.setModule=t=>{e.setModule(bi,t)},this.getModule=()=>e.getModule(bi),this.instantiate=()=>(this.getModule().then(e=>WebAssembly.instantiate(e,E)).then(e=>{let t=e.exports;y(t),a=t.g,o(),T(t),n()}),this.ready=new Promise(e=>{n=e}).then(()=>{this.HEAP=a.buffer,this.malloc=x,this.free=C,this.opus_frame_decoder_create=b,this.opus_frame_decode_float_deinterleaved=S,this.opus_frame_decoder_destroy=ee}),this)}var xi=o((()=>{}));function Si(e={}){Si.errors||Object.defineProperties(Si,{errors:{value:new Map([[-1,`OPUS_BAD_ARG: One or more invalid/out of range arguments`],[-2,`OPUS_BUFFER_TOO_SMALL: Not enough bytes allocated in the buffer`],[-3,`OPUS_INTERNAL_ERROR: An internal error was detected`],[-4,`OPUS_INVALID_PACKET: The compressed data passed is corrupted`],[-5,`OPUS_UNIMPLEMENTED: Invalid/unsupported request number`],[-6,`OPUS_INVALID_STATE: An encoder or decoder structure is invalid or already freed`],[-7,`OPUS_ALLOC_FAIL: Memory allocation has failed`]])}}),this._init=()=>new this._WASMAudioDecoderCommon(this).instantiate(this._EmscriptenWASM,this._module).then(e=>{this._common=e,this._inputBytes=0,this._outputSamples=0,this._frameNumber=0,this._input=this._common.allocateTypedArray(this._inputSize,Uint8Array),this._output=this._common.allocateTypedArray(this._outputChannels*this._outputChannelSize,Float32Array);let t=this._common.allocateTypedArray(this._channels,Uint8Array);t.buf.set(this._channelMappingTable),this._decoder=this._common.wasm.opus_frame_decoder_create(this._sampleRate,this._channels,this._streamCount,this._coupledStreamCount,t.ptr,this._preSkip,this._forceStereo)}),Object.defineProperty(this,"ready",{enumerable:!0,get:()=>this._ready}),this.reset=()=>(this.free(),this._init()),this.free=()=>{this._common.free(),this._common.wasm.opus_frame_decoder_destroy(this._decoder),this._common.wasm.free(this._decoder)},this._decode=e=>{if(!(e instanceof Uint8Array))throw Error(`Data to decode must be Uint8Array. Instead got `+typeof e);this._input.buf.set(e);let t=this._common.wasm.opus_frame_decode_float_deinterleaved(this._decoder,this._input.ptr,e.length,this._output.ptr),n;return t<0&&(n=`libopus `+t+` `+(Si.errors.get(t)||`Unknown Error`),console.error(n),t=0),{outputBuffer:this._common.getOutputChannels(this._output.buf,this._outputChannels,t),samplesDecoded:t,error:n}},this.decodeFrame=e=>{let t=[],n=this._decode(e);return n.error&&this._common.addError(t,n.error,e.length,this._frameNumber,this._inputBytes,this._outputSamples),this._frameNumber++,this._inputBytes+=e.length,this._outputSamples+=n.samplesDecoded,this._WASMAudioDecoderCommon.getDecodedAudioMultiChannel(t,[n.outputBuffer],this._outputChannels,n.samplesDecoded,this._sampleRate)},this.decodeFrames=e=>{let t=[],n=[],r=0,i=0;for(;itypeof e==`number`,n=e.sampleRate,r=e.channels,i=e.streamCount,a=e.coupledStreamCount,o=e.channelMappingTable,s=e.preSkip,c=+!!e.forceStereo;if(r>2&&(!t(i)||!t(a)||!Array.isArray(o)))throw Error(`Invalid Opus Decoder Options for multichannel decoding.`);return this._sampleRate=[8e3,12e3,16e3,24e3,48e3].includes(n)?n:48e3,this._channels=t(r)?r:2,this._streamCount=t(i)?i:1,this._coupledStreamCount=t(a)?a:this._channels-1,this._channelMappingTable=o||(this._channels===2?[0,1]:[0]),this._preSkip=s||0,this._forceStereo=r<=8&&r!=2?c:0,this._inputSize=3840*this._channels,this._outputChannelSize=5760,this._outputChannels=this._forceStereo?2:this._channels,this._ready=this._init(),this}var Ci=o((()=>{yi(),xi()})),wi,Ti=o((()=>{yi(),xi(),Ci(),wi=class extends hi{constructor(e){super(e,`opus-decoder`,Si,bi)}async decodeFrame(e){return this.postToDecoder(`decodeFrame`,e)}async decodeFrames(e){return this.postToDecoder(`decodeFrames`,e)}}})),Ei=c({OpusDecoder:()=>Si,OpusDecoderWebWorker:()=>wi}),Di=o((()=>{Ci(),Ti(),yi(),_i(Si,`OpusDecoder`),_i(wi,`OpusDecoderWebWorker`)})),Oi=[8e3,12e3,16e3,24e3,48e3],ki=null;function Ai(){return ki??=Xn(()=>Promise.resolve().then(()=>(Di(),Ei)),__VITE_PRELOAD__,import.meta.url).catch(e=>{throw ki=null,e}),ki}function ji(){return typeof WebAssembly==`object`&&typeof WebAssembly.instantiate==`function`}function Mi(e,t,n,r){return{numberOfFrames:t,numberOfChannels:e.length,sampleRate:n,timestamp:r,format:`f32-planar`,duration:Math.round(t/n*1e6),copyTo(n,r){n.set(e[r.planeIndex].subarray(0,t))},close(){}}}var Ni=class{constructor(e,t=Ai){this.init=e,this.load=t,this.state=`unconfigured`,this.dec=null,this.pending=[]}configure(e){if(this.state===`closed`)throw Error(`the decoder is closed`);if(!ji())throw Error(`no WebAssembly here`);let t=e.sampleRate;if(!Oi.includes(t))throw Error(`Opus does not decode at ${t} Hz`);let n=e.numberOfChannels;if(n<1||n>2)throw Error(`${n} channels: only mono and stereo are decoded`);this.state=`configured`,this.load().then(async e=>{if(this.state===`closed`)return;let r=new e.OpusDecoder({channels:n,sampleRate:t});if(await r.ready,this.state!==`configured`){r.free();return}this.dec=r;let i=this.pending;this.pending=[];for(let e of i)this.state===`configured`&&this.run(e)}).catch(e=>this.fail(e))}decode(e){if(this.state!==`configured`)return;let t=e;if(this.dec)return this.run(t);this.pending.push({timestamp:t.timestamp,data:t.data.slice()}),this.pending.length>50&&this.pending.shift()}run(e){let t=this.dec;if(!t)return;let n;try{n=t.decodeFrame(e.data)}catch(e){return this.fail(e)}n.samplesDecoded&&n.channelData.length&&this.init.output(Mi(n.channelData,n.samplesDecoded,n.sampleRate,e.timestamp))}fail(e){if(this.state===`closed`)return;this.close();let t=e instanceof Error?e:Error(String(e));queueMicrotask(()=>this.init.error(t))}close(){this.state=`closed`,this.pending=[];let e=this.dec;this.dec=null;try{e?.free()}catch{}}},Pi={makeDecoder:e=>new Ni(e),makeChunk:e=>({type:e.type,timestamp:e.timestamp,data:e.data instanceof Uint8Array?e.data:new Uint8Array(e.data)})};function Fi(e,t){for(let n=0;n+3>1&63;if(t>=16&&t<=21)return!0;if(t<16)return!1}else{let t=e[n+3]&31;if(t===5)return!0;if(t===1)return!1}}return!1}function Ii(e){for(let t=0;t+6e.toString(16).padStart(2,`0`);return`avc1.${n(e[t+4])}${n(e[t+5])}${n(e[t+6])}`}return`avc1.4d4028`}var Li=[`hev1.1.6.L153.B0`,`hvc1.1.6.L153.B0`,`hev1.2.4.L153.B0`,`hvc1.2.4.L153.B0`,`hev1.1.6.L150.90`];async function Ri(e,t){if(typeof VideoDecoder>`u`)return null;for(let n of Li)try{if((await VideoDecoder.isConfigSupported({codec:n,codedWidth:e,codedHeight:t})).supported)return n}catch{}return null}function zi(e){let t=[];for(let n=0;n+2{let i=r+1n&&e[i-1]===0;)i--;return e.subarray(n,i)}).filter(e=>e.length>0)}var Bi=(e,t)=>t?e[0]>>1&63:e[0]&31;function Vi(e,...t){let n=8+t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(n);new DataView(r.buffer).setUint32(0,n);for(let t=0;t<4;t++)r[4+t]=e.charCodeAt(t);let i=8;for(let e of t)r.set(e,i),i+=e.length;return r}function F(...e){let t=new Uint8Array(e.reduce((e,[,t])=>e+t,0)),n=0;for(let[r,i]of e){for(let e=i-1;e>=0;e--)t[n+i-1-e]=Math.floor(r/2**(8*e))&255;n+=i}return t}var Hi=(e,t,n,...r)=>Vi(e,F([t,1],[n,3]),...r),Ui=F([65536,4],[0,4],[0,4],[0,4],[65536,4],[0,4],[0,4],[0,4],[1073741824,4]);function Wi(e){let t=e.handler===`vide`,n=Vi(`ftyp`,new TextEncoder().encode(`isom`),F([1,4]),new TextEncoder().encode(`isomiso6mp41`)),r=Vi(`moov`,Hi(`mvhd`,0,0,F([0,4],[0,4],[e.timescale,4],[0,4],[65536,4],[256,2],[0,2],[0,4],[0,4]),Ui,new Uint8Array(24),F([2,4])),Vi(`trak`,Hi(`tkhd`,0,3,F([0,4],[0,4],[1,4],[0,4],[0,4],[0,4],[0,4],[0,2],[0,2],[t?0:256,2],[0,2]),Ui,F([(e.width??0)*65536,4],[(e.height??0)*65536,4])),Vi(`mdia`,Hi(`mdhd`,0,0,F([0,4],[0,4],[e.timescale,4],[0,4],[21956,2],[0,2])),Hi(`hdlr`,0,0,F([0,4]),new TextEncoder().encode(e.handler),new Uint8Array(12),F([0,1])),Vi(`minf`,t?Hi(`vmhd`,0,1,new Uint8Array(8)):Hi(`smhd`,0,0,F([0,4])),Vi(`dinf`,Hi(`dref`,0,0,F([1,4]),Hi(`url `,0,1))),Vi(`stbl`,Hi(`stsd`,0,0,F([1,4]),e.sampleEntry),Hi(`stts`,0,0,F([0,4])),Hi(`stsc`,0,0,F([0,4])),Hi(`stsz`,0,0,F([0,4],[0,4])),Hi(`stco`,0,0,F([0,4])))))),Vi(`mvex`,Hi(`trex`,0,0,F([1,4],[1,4],[0,4],[0,4],[0,4])))),i=new Uint8Array(n.length+r.length);return i.set(n,0),i.set(r,n.length),i}function Gi(e,t,n,r,i){let a=i?33554432:16842752,o=e=>Hi(`trun`,0,1793,F([1,4],[e,4],[n,4],[r.length,4],[a,4])),s=e=>Vi(`traf`,Hi(`tfhd`,0,131072,F([1,4])),Hi(`tfdt`,1,0,F([t,8])),o(e)),c=Hi(`mfhd`,0,0,F([e,4])),l=Vi(`moof`,c,s(0)).length,u=Vi(`moof`,c,s(l+8)),d=Vi(`mdat`,r),f=new Uint8Array(u.length+d.length);return f.set(u,0),f.set(d,u.length),f}function Ki(e,t,n=!1){let r=t?[35,...n?[32,33,34]:[]]:[9,...n?[7,8]:[]],i=zi(e).filter(e=>!r.includes(Bi(e,t))),a=new Uint8Array(i.reduce((e,t)=>e+4+t.length,0)),o=new DataView(a.buffer),s=0;for(let e of i)o.setUint32(s,e.length),a.set(e,s+4),s+=4+e.length;return a}var qi=e=>e.toString(16).padStart(2,`0`),Ji=e=>{let t=new Uint8Array(2+e.length);return t[0]=e.length>>8,t[1]=e.length&255,t.set(e,2),t},Yi=e=>{let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t};function Xi(e){let t=zi(e),n=t.filter(e=>Bi(e,!1)===7),r=t.filter(e=>Bi(e,!1)===8);return!n.length||!r.length||n[0].length<4?null:Yi([F([1,1],[n[0][1],1],[n[0][2],1],[n[0][3],1],[255,1],[224|n.length,1]),...n.map(Ji),F([r.length,1]),...r.map(Ji)])}function Zi(e,t,n){let r=zi(e),i=e=>r.filter(n=>Bi(n,t)===e),a=(e,t)=>Vi(e,new Uint8Array(6),F([1,2],[0,16],[n.w,2],[n.h,2],[4718592,4],[4718592,4],[0,4],[1,2]),new Uint8Array(32),F([24,2],[65535,2]),t);if(!t){let t=i(7),r=Xi(e);return r?{init:Wi({handler:`vide`,timescale:9e4,sampleEntry:a(`avc1`,Vi(`avcC`,r)),width:n.w,height:n.h}),mime:`video/mp4; codecs="avc1.${qi(t[0][1])}${qi(t[0][2])}${qi(t[0][3])}"`}:null}let o=i(32),s=i(33),c=i(34);if(!o.length||!s.length||!c.length)return null;let l=Xr(s[0]);if(l.length<15)return null;let u=l.subarray(3,15),d=u[0]&31,f=d===2?2:0,p=(e,t)=>Yi([F([128|e,1],[t.length,2]),...t.map(Ji)]),m=Vi(`hvcC`,F([1,1]),u,F([61440,2],[252,1],[253,1],[248|f,1],[248|f,1],[0,2],[15,1],[3,1]),p(32,o),p(33,s),p(34,c)),h=[``,`A`,`B`,`C`][u[0]>>6],g=0,_=(u[1]<<24|u[2]<<16|u[3]<<8|u[4])>>>0;for(let e=0;e<32;e++)_&1<>>0).toString(16),`${u[0]&32?`H`:`L`}${u[11]}`,...v.map(e=>e.toString(16))].join(`.`);return{init:Wi({handler:`vide`,timescale:9e4,sampleEntry:a(`hvc1`,m),width:n.w,height:n.h}),mime:`video/mp4; codecs="${y}"`}}function Qi(e,t,n,r,i,a){return Gi(e,t,n,Ki(r,i),a)}function $i(e,t){let n=Vi(`dOps`,F([0,1],[e,1],[312,2],[t,4],[0,2],[0,1]));return Wi({handler:`soun`,timescale:48e3,sampleEntry:Vi(`Opus`,new Uint8Array(6),F([1,2],[0,8],[e,2],[16,2],[0,4],[3145728e3,4]),n)})}function ea(e){if(!e.length)return 960;let t=e[0]>>3,n=t<12?[480,960,1920,2880][t%4]:t<16?[480,960][t%2]:[120,240,480,960][t%4],r=e[0]&3,i=r===0?1:r===3?(e[1]??1)&63:2;return n*Math.max(1,i)}function ta(e,t,n){return Gi(e,t,ea(n),n,!0)}var na={watch:30,player:4},ra={watch:{seek:.5,speed:1/0,target:.05},player:{seek:.15,speed:.06,target:.02}},ia={seek:.8,speed:.25,target:.12};function aa(e,t,n){let r=typeof n==`string`?ra[n]:n;return e>r.seek?{seekTo:t-r.target,rate:1}:e>r.speed?{seekTo:null,rate:1.1}:{seekTo:null,rate:1}}function oa(e,t=`watch`,n){return typeof VideoDecoder<`u`?new ha(e,t,n):new ka(e,t,n)}var sa=class{constructor(e,t=()=>performance.now()){this.ask=e,this.now=t,this.last=-1/0}waiting(){if(!this.ask)return;let e=this.now();e-this.last<1e3||(this.last=e,this.ask())}};function I(e){return e.length<3?null:{index:e[0]<<8|e[1],packet:e.subarray(2)}}var L=class{constructor(){this.last=-1}take(e){if(this.last>=0){let t=e-this.last&65535;if(t===0||t>=32768)return!1}return this.last=e,!0}reset(){this.last=-1}};function ca(e){if(e.length>=10)return e;let t=new Uint8Array(10);t.set(e.subarray(0,6));let n=new DataView(t.buffer);return n.setUint32(6,Math.round(n.getUint32(2)/100)||480),t}function la(e,t){return{snd:e,snd_decoded:t.decoded,snd_concealed:t.concealed,snd_underruns:t.underruns,snd_dropped:t.dropped}}var ua=class{constructor(e,t=.2){this.min=e,this.max=t,this.next=0,this.calmSince=0,this.minLead=1/0,this.windowAt=0,this.underruns=0,this.dropped=0,this.cushion=e}at(e,t){this.next0&&(this.underruns++,this.cushion=Math.min(this.max,this.cushion+.02)),this.calmSince=e,this.next=e+this.cushion,this.minLead=1/0,this.windowAt=e):e-this.calmSince>10&&this.cushion>this.min&&(this.cushion=Math.max(this.min,this.cushion-.01),this.calmSince=e);let n=this.next-e;if(n>this.cushion+.15)return this.dropped++,null;if(this.minLead=Math.min(this.minLead,n),e-this.windowAt>=.25){let t=this.minLead>this.cushion+da;if(this.minLead=1/0,this.windowAt=e,t)return this.dropped++,null}let r=this.next;return this.next+=t,r}reset(){this.next=0}},da=.02;async function fa(e,t){try{return typeof AudioDecoder>`u`?!1:!!(await AudioDecoder.isConfigSupported({codec:`opus`,sampleRate:e,numberOfChannels:t})).supported}catch{return!1}}var pa=class{constructor(e,t=()=>performance.now()){this.decoder=e,this.now=t,this.n={frames:0,dropped:0,late:0,stalls:0,stall_ms:0,worst_stall_ms:0,key_waits:0},this.a=0,this.d=0,this.w=!1,this.q=[],this.sum=0,this.cnt=0,this.codec=``}get frames(){return this.n.frames}arrived(){let e=this.now();this.a&&e-this.a>50&&this.n.late++,this.a=e}drop(){this.n.dropped++,this.w||this.n.key_waits++,this.w=!0}decoding(){this.w=!1,this.q.push(this.now())>64&&this.q.shift()}drawn(e=!1){let t=this.now(),n=e?this.q.shift():void 0;n!==void 0&&(this.sum+=t-n,this.cnt++);let r=this.d?t-this.d:0;r>100&&this.stall(r),this.d=t,this.n.frames++}stall(e){this.n.stalls++,this.n.stall_ms+=e,this.n.worst_stall_ms=Math.max(this.n.worst_stall_ms,e)}snapshot(){let e=this.d?this.now()-this.d:0,t={...this.n,decoder:this.decoder};this.codec&&(t.codec=this.codec),e>100&&(t.stalls=this.n.stalls+1,t.stall_ms=this.n.stall_ms+e,t.worst_stall_ms=Math.max(this.n.worst_stall_ms,e));for(let e of[`stall_ms`,`worst_stall_ms`])t[e]=Math.round(t[e]);return t.decode_ms=this.cnt?Math.round(this.sum/this.cnt*10)/10:0,this.sum=this.cnt=0,t}},ma=[`pointerup`,`touchend`,`click`,`keydown`],ha=class{get element(){if(!this.wrap){let e=document.createElement(`div`);e.className=`h-full w-full`,e.append(this.canvas),this.mse&&e.append(this.mse.element),this.wrap=e}return this.wrap}get stats(){return this.mse?.stats??this.ownStats}soundReport(){return this.soundOn?this.mseSound?this.mseSound.report():la(this.soundWasm?`wasm`:`webcodecs`,this.soundStats):null}constructor(e,t=`watch`,n){this.onProblem=e,this.latency=t,this.onNeedKey=n,this.canvas=document.createElement(`canvas`),this.wrap=null,this.mse=null,this.failsNoPicture=0,this.ctx=this.canvas.getContext(`2d`,{alpha:!1}),this.hevc=!1,this.header=null,this.spsRect=null,this.software=!1,this.video=null,this.opening=!1,this.stopped=!1,this.sawKey=!1,this.ownStats=new pa(`webcodecs`),this.problemShown=!1,this.ts=0,this.pipe=null,this.audioGen=0,this.actx=null,this.soundOn=!1,this.unarm=null,this.mseSound=null,this.audioHeader=null,this.soundWasm=!1,this.onSoundFail=null,this.muted=!1,this.keyAsk=new sa(n),this.clock=new ua(t===`player`?.05:.08),typeof AudioDecoder>`u`&&va()&&(this.mseSound=new ya(t,()=>this.mseSoundFailed())),this.canvas.className=`block h-full w-full object-contain`,this.canvas.dataset.testid=`watch-canvas`}setHevc(e){this.hevc=e,this.header&&(this.spsRect=ni(this.header,e)),this.mse?.setHevc(e)}get onMse(){return!!this.mse}decodeFailed(){if(this.mse||this.ownStats.frames>0||++this.failsNoPicture<3||!xa())return!1;let e=new ka(this.onProblem,this.latency,this.onNeedKey);e.setHevc(this.hevc),e.markProblemShown(),this.mse=e;let t=this.video;this.video=null;try{t?.close()}catch{}return this.canvas.style&&(this.canvas.style.display=`none`),this.wrap?.append(e.element),this.header&&e.onMessage(new Uint8Array([0,...this.header]).buffer),this.onNeedKey?.(),!0}startSound(){this.soundOn=!0,ga(),this.mseSound?this.mseSound.start():this.openContext()}openContext(){try{if(!this.actx){let e=new AudioContext({latencyHint:`interactive`});this.actx=e,e.onstatechange=()=>{this.actx===e&&e.state!==`running`&&e.state!==`closed`&&this.armResume()}}this.actx.resume().catch(()=>{})}catch{this.onSoundFail?.()}}get sound(){return this.soundOn}setMuted(e){this.muted=e,this.mseSound?.setMuted(e)}resumeSound(){if(!this.soundOn)return;if(this.mseSound)return this.mseSound.resume();let e=this.actx;e&&e.state!==`running`&&e.state!==`closed`&&(this.clock.reset(),e.resume().catch(()=>{}),this.armResume())}get soundStats(){return{decoded:this.pipe?.decoded??0,concealed:this.pipe?.concealed??0,underruns:this.clock.underruns,dropped:this.clock.dropped,cushionMs:Math.round(this.clock.cushion*1e3)}}armResume(){if(this.unarm||typeof window>`u`||!window.addEventListener)return;let e=()=>{let e=this.actx;if(!e||e.state===`closed`)return this.unarm?.();this.clock.reset(),e.resume().then(()=>{e.state===`running`&&this.unarm?.()}).catch(()=>{})};for(let t of ma)window.addEventListener(t,e,!0);this.unarm=()=>{for(let t of ma)window.removeEventListener(t,e,!0);this.unarm=null}}onMessage(e){let t=new Uint8Array(e);if(t.length<1||this.stopped)return;let n=t[0],r=t.subarray(1);if(this.mse&&(n===0||n===1))return n===0&&(this.header=r.slice()),this.mse.onMessage(e);n===0?this.openVideo(r.slice()):n===1?this.onVideo(r):n===3?this.openAudio(r.slice()):n===4&&this.onAudio(r)}async openVideo(e){if(this.header=e,this.spsRect=ni(e,this.hevc),!this.opening){this.opening=!0;try{let t=this.hevc?await Aa(e):Ii(e);if(this.mse||this.stopped)return;if(!t){this.problemShown=!0,this.onProblem(`no_hevc`);return}this.ownStats.codec=t;let n=this.hevc?void 0:Xi(e)??void 0;try{this.video?.close()}catch{}let r=new VideoDecoder({output:e=>{let t=this.realVisible(e),n=this.canvas;(n.width!==t.displayWidth||n.height!==t.displayHeight)&&(n.width=t.displayWidth,n.height=t.displayHeight),this.ctx?.drawImage(t,0,0,n.width,n.height),this.ownStats.drawn(!0),t.close(),this.problemShown&&(this.problemShown=!1,this.onProblem(null))},error:()=>{this.video===r&&(this.problemShown=!0,this.onProblem(`decode`),this.decodeFailed()||this.rebuild())}}),i={codec:t,optimizeForLatency:!0};n&&(i.description=n),this.software&&(i.hardwareAcceleration=`prefer-software`),r.configure(i),this.video=r,this.sawKey=!1}catch{this.problemShown=!0,this.onProblem(`decode`),this.decodeFailed()}finally{this.opening=!1}}}realVisible(e){let t=this.spsRect,n=ri(e,t);if(n)try{let t=new VideoFrame(e,{visibleRect:{x:n.x,y:n.y,width:n.w,height:n.h},displayWidth:n.w,displayHeight:n.h});return e.close(),t}catch{return e}let r=e.visibleRect;if(t&&r&&!this.software&&(r.width{if(this.video===e){try{e?.close()}catch{}this.rebuild(),this.onNeedKey?.()}})}return e}rebuild(){this.mse||this.stopped||(this.video=null,this.sawKey=!1,this.header&&this.openVideo(this.header).then(()=>this.keyAsk.waiting()))}onVideo(e){let t=this.video;if(t?.state===`closed`){this.opening||this.rebuild();return}if(!t||t.state!==`configured`)return;let n=Fi(e,this.hevc);if(this.ownStats.arrived(),!this.sawKey&&!n)return this.ownStats.drop(),this.keyAsk.waiting();if(!n&&t.decodeQueueSize>na[this.latency])return this.sawKey=!1,this.ownStats.drop(),this.keyAsk.waiting();this.sawKey=!0;let r=e;this.hevc?n&&this.header&&(r=new Uint8Array(this.header.length+e.length),r.set(this.header,0),r.set(e,this.header.length)):r=Ki(e,!1,!0),this.ts+=16667,this.ownStats.decoding(),t.decode(new EncodedVideoChunk({type:n?`key`:`delta`,timestamp:this.ts,data:r}))}openAudio(e){if(e.length<6)return;let t=++this.audioGen;if(this.pipe?.reset(),this.pipe=null,this.clock.reset(),this.audioHeader=e,this.mseSound)return this.mseSound.setHeader(e);let n=e[0];fa(new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(2),n).then(n=>{if(t!==this.audioGen)return;if(!n)return va()?this.soundThroughMse(e):this.soundThroughWasm(e);let r=new si((e,t)=>this.play(e,t,r.sampleRate));try{r.header(ca(e)),this.pipe=r}catch{this.soundThroughMse(e)}})}soundThroughMse(e){this.pipe=null,this.mseSound||(this.mseSound=new ya(this.latency,()=>this.mseSoundFailed()),this.soundOn&&this.mseSound.start()),this.mseSound.setHeader(e)}soundThroughWasm(e){this.pipe?.reset(),this.soundWasm=!0;let t=new si((e,n)=>this.play(e,n,t.sampleRate),Pi,()=>{this.pipe===t&&(this.pipe=null),this.onSoundFail?.()});this.pipe=t,t.header(ca(e))}mseSoundFailed(){let e=this.mseSound;e&&(this.mseSound=null,e.stop(),this.soundOn&&(this.openContext(),this.actx&&this.actx.state!==`running`&&this.armResume()),this.audioHeader&&this.soundThroughWasm(this.audioHeader))}onAudio(e){if(this.mseSound)return this.mseSound.frame(e);this.soundOn&&this.pipe&&this.pipe.packet(e)}play(e,t,n){let r=this.actx;if(!r||r.state!==`running`||!e.length)return;let i=e[0].length,a=this.clock.at(r.currentTime,i/n);if(a===null)return;let o=r.createBuffer(e.length,i,n),s=this.muted?0:t;e.forEach((e,t)=>o.copyToChannel(s===1?e:e.map(e=>e*s),t));let c=r.createBufferSource();c.buffer=o,c.connect(r.destination),c.start(a)}stop(){this.stopped=!0;try{this.video?.close()}catch{}this.mse?.stop(),this.audioGen++,this.pipe?.reset(),this.pipe=null,this.unarm?.(),this.actx?.close().catch(()=>{}),this.mseSound?.stop()}};function ga(){try{let e=navigator.audioSession;e&&e.type!==`playback`&&(e.type=`playback`)}catch{}}function _a(e,t){try{return e.isTypeSupported(t)}catch{return!1}}function va(){let e=typeof window>`u`?null:xa();return!!e&&(_a(e,`audio/mp4; codecs="Opus"`)||_a(e,`audio/mp4; codecs="opus"`))}var ya=class{constructor(e,t,n=document.createElement(`audio`)){this.onFail=t,this.header=null,this.time=0,this.on=!1,this.failed=!1,this.order=new L,this.el=n,this.track=new Ta(n,()=>this.fail(),e===`player`?ia:e)}get playing(){return this.on&&!this.failed}report(){return{snd:`mse`,snd_jumps:this.track.seeks}}setHeader(e){this.header=e,this.on&&this.open()}start(){if(!this.on&&(this.on=!0,this.header&&this.open(),!this.failed))try{this.el.play()?.catch?.(()=>{})}catch{}}frame(e){if(!this.on||this.failed||!this.track.ready&&!this.track.backlog)return;let t=I(e);if(!t||!this.order.take(t.index))return;let n=ta(this.track.nextSeq(),this.time,t.packet);this.time+=ea(t.packet),this.track.push(n)}setMuted(e){this.el.muted=e}resume(){if(this.playing&&this.el.paused)try{this.el.play()?.catch?.(()=>{})}catch{}}stop(){this.on=!1,this.track.close()}open(){let e=this.header;if(!e||e.length<6||this.failed)return;let t=e[0],n=$i(t,new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(2));this.track.open(`audio/mp4; codecs="Opus"`,n)||this.track.open(`audio/mp4; codecs="opus"`,n)?(this.time=0,this.order.reset()):this.fail()}fail(){this.failed||(this.failed=!0,this.onFail())}},ba=class{constructor(e,t,n=Pi){this.onFail=t,this.codecs=n,this.actx=null,this.pipe=null,this.header=null,this.on=!1,this.failed=!1,this.muted=!1,this.unarm=null,this.played=!1,this.clock=new ua(e===`player`?.05:.08)}get playing(){return this.on&&!this.failed}get stats(){return{decoded:this.pipe?.decoded??0,concealed:this.pipe?.concealed??0,underruns:this.clock.underruns,dropped:this.clock.dropped}}start(){if(!this.failed){this.on=!0,ga();try{if(!this.actx){let e=new AudioContext({latencyHint:`interactive`});this.actx=e,e.onstatechange=()=>{this.actx===e&&e.state!==`running`&&e.state!==`closed`&&this.armResume()}}this.actx.resume().catch(()=>{}),this.actx.state!==`running`&&this.armResume()}catch{return this.fail()}this.header&&!this.pipe&&this.open()}}setHeader(e){e.length<6||(this.header=e,this.pipe?.reset(),this.pipe=null,this.clock.reset(),this.on&&this.open())}frame(e){this.on&&!this.failed&&this.pipe?.packet(e)}setMuted(e){this.muted=e}resume(){let e=this.actx;this.playing&&e&&e.state!==`running`&&e.state!==`closed`&&(this.clock.reset(),e.resume().catch(()=>{}),this.armResume())}stop(){this.on=!1,this.pipe?.reset(),this.pipe=null,this.unarm?.(),this.actx?.close().catch(()=>{}),this.actx=null}open(){let e=this.header;if(!e||this.failed)return;let t=new si((e,n)=>this.play(e,n,t.sampleRate),this.codecs,()=>{this.pipe===t&&this.fail()});this.pipe=t,t.header(ca(e))}play(e,t,n){let r=this.actx;if(!r||r.state!==`running`||!e.length)return;let i=e[0].length,a=this.clock.at(r.currentTime,i/n);if(a===null)return;let o=r.createBuffer(e.length,i,n),s=this.muted?0:t;e.forEach((e,t)=>o.copyToChannel(s===1?e:e.map(e=>e*s),t));let c=r.createBufferSource();c.buffer=o,c.connect(r.destination),c.start(a),this.played=!0}armResume(){if(this.unarm||typeof window>`u`||!window.addEventListener)return;let e=()=>{let e=this.actx;if(!e||e.state===`closed`)return this.unarm?.();this.clock.reset(),e.resume().then(()=>{e.state===`running`&&this.unarm?.()}).catch(()=>{})};for(let t of ma)window.addEventListener(t,e,!0);this.unarm=()=>{for(let t of ma)window.removeEventListener(t,e,!0);this.unarm=null}}fail(){this.failed||(this.failed=!0,this.stop(),this.onFail())}};function xa(){let e=window;return e.ManagedMediaSource??e.MediaSource??null}var Sa=10,Ca=3;function wa(e,t,n,r=Ca){let i=null;for(let a of e)a>t&&a<=n-r&&(i=a);return i}var Ta=class{constructor(e,t,n=`watch`,r,i=()=>performance.now()){this.el=e,this.onError=t,this.latency=n,this.onNeedKey=r,this.now=i,this.ms=null,this.sb=null,this.queue=[],this.mime=``,this.seq=1,this.ready=!1,this.dropped=!1,this.keys=null,this.seeks=0,this.maxLagS=0,this.fromZero=0,this.trims=0,this.lastJump=null,this.trimAt=-1,this.trimFrom=-1,this.keyAt=-1,this.attached=null,r&&(this.keys=[])}setEdge(e){this.latency=e}markKey(e){this.keys?.push(e),this.keyAt=this.now()}open(e,t){let n=xa();if(!n||!_a(n,e))return!1;this.close();let r=new n;return this.ms=r,this.mime=e,this.queue=[t],this.seq=1,this.ready=!1,this.keys&&=[],r.addEventListener(`sourceopen`,()=>{if(this.ms===r)try{let e=r.addSourceBuffer(this.mime);e.mode=`segments`,e.addEventListener(`updateend`,()=>this.pump()),e.addEventListener(`error`,()=>this.onError()),this.sb=e,this.ready=!0,this.pump()}catch{this.onError()}}),`ManagedMediaSource`in window&&n===window.ManagedMediaSource&&(this.el.disableRemotePlayback=!0),this.attached=Ea(this.el,r),!0}nextSeq(){return this.seq++}get backlog(){return this.queue.length}push(e){this.queue.push(e),this.pump()}pump(){let e=this.sb;if(!e||e.updating||!this.ready)return;let t=this.el;if(e.buffered.length){let n=e.buffered.end(e.buffered.length-1),r=e.buffered.start(0),i=n-t.currentTime,a=aa(i,n,this.latency);if(a.seekTo!==null){this.seeks++,this.maxLagS=Math.max(this.maxLagS,i);let o=this.now(),s=e=>e<0?-1:Math.round(o-e);t.currentTime<.05&&r>1&&this.fromZero++,this.lastJump={at:t.currentTime,start:r,end:n,ranges:e.buffered.length,readyState:t.readyState,paused:t.paused,seeking:t.seeking,sinceTrimMs:s(this.trimAt),trimFrom:this.trimFrom,sinceKeyMs:s(this.keyAt)},t.currentTime=Math.max(r,a.seekTo)}if(t.playbackRate!==a.rate&&(t.playbackRate=a.rate),t.currentTime-r>Sa&&this.trim(e,r))return}let n=this.queue.shift();if(n){try{e.appendBuffer(n)}catch{this.dropped=!0}t.paused&&t.play().catch(()=>{})}}trim(e,t){let n=this.el.currentTime,r=n-Ca;if(this.keys){if(r=wa(this.keys,t,n),r===null)return(this.keys[this.keys.length-1]??-1/0)<=n-Ca&&this.onNeedKey?.(),!1;let e=r;this.keys=this.keys.filter(t=>t>=e),r-=.001}try{return e.remove(t,r),this.trims++,this.trimAt=this.now(),this.trimFrom=n,!0}catch{return!1}}close(){this.ready=!1,this.sb=null,this.queue=[];let e=this.ms;if(this.ms=null,e&&e.readyState===`open`)try{e.endOfStream()}catch{}if(this.attached===`object`)try{this.el.srcObject=null}catch{}this.attached=null,this.el.src?.startsWith(`blob:`)&&URL.revokeObjectURL(this.el.src),this.el.removeAttribute(`src`)}};function Ea(e,t){if(`srcObject`in e)try{return e.srcObject=t,`object`}catch{}return e.src=URL.createObjectURL(t),`url`}var Da=1e4,Oa=class{constructor(e=3,t=Da,n=()=>performance.now()){this.max=e,this.windowMs=t,this.now=n,this.at=[]}fail(){let e=this.now();return this.at=this.at.filter(t=>e-t=this.max}clear(){this.at=[]}},ka=class{constructor(e,t=`watch`,n,r){this.onProblem=e,this.latency=t,this.wasm=null,this.audioHeader=null,this.muted=!1,this.gaveUp=!1,this.reopening=!1,this.failedWhileOpening=!1,this.wrap=document.createElement(`div`),this.hevc=!1,this.header=null,this.sawKey=!1,this.stats=new pa(`mse`),this.problemShown=!1,this.vTime=0,this.vLast=0,this.soundOn=!1,this.onSoundFail=null,this.onGiveUp=null,this.keyAsk=new sa(n),this.fails=new Oa(3,Da,r);let i=document.createElement(`video`);i.muted=!0,i.autoplay=!0,i.playsInline=!0,i.className=`block h-full w-full object-contain`,i.dataset.testid=`watch-video`,this.audio=new ya(t,()=>this.soundThroughWasm()),this.wrap.className=`h-full w-full`,this.wrap.append(i,this.audio.el),this.video=new Ta(i,()=>this.showProblem(),t,()=>this.keyAsk.waiting()),i.addEventListener(`error`,()=>this.restartVideo()),i.addEventListener(`playing`,()=>{this.fails.clear(),this.problemShown&&(this.problemShown=!1,this.onProblem(null))})}markProblemShown(){this.problemShown=!0}showProblem(){this.problemShown||(this.problemShown=!0,this.onProblem(`decode`))}restartVideo(){if(this.gaveUp)return;if(this.reopening){this.failedWhileOpening=!0;return}if(this.showProblem(),this.fails.fail()){this.gaveUp=!0,this.video.close(),this.onGiveUp?.();return}let e=this.header;if(e){this.header=null,this.reopening=!0,this.failedWhileOpening=!1;try{this.openVideo(e)}finally{this.reopening=!1}this.sawKey=!1,this.keyAsk.waiting(),this.failedWhileOpening&&(this.failedWhileOpening=!1,this.restartVideo())}}get failed(){return this.gaveUp}setVideoEdge(e){this.video.setEdge(e)}get videoSeeks(){return{seeks:this.video.seeks,maxLagMs:Math.round(this.video.maxLagS*1e3),fromZero:this.video.fromZero,trims:this.video.trims,lastJump:this.video.lastJump}}get element(){return this.wrap}resume(){let e=this.video.el;e.paused&&e.play()?.catch?.(()=>{})}setHevc(e){this.hevc=e}startSound(){if(this.soundOn=!0,this.wasm)return this.wasm.start();if(!va())return this.soundThroughWasm();this.audio.start()}soundThroughWasm(){if(this.wasm)return;this.audio.stop();let e=new ba(this.latency,()=>this.onSoundFail?.());this.wasm=e,e.setMuted(this.muted),this.audioHeader&&e.setHeader(this.audioHeader),this.soundOn&&e.start()}resumeSound(){this.soundOn&&(this.wasm?this.wasm.resume():this.audio.resume())}setMuted(e){this.muted=e,this.audio.setMuted(e),this.wasm?.setMuted(e)}soundReport(){return this.soundOn?this.wasm?la(`wasm`,this.wasm.stats):this.audio.report():null}get soundPlaying(){return this.wasm?this.wasm.played:this.audio.playing}get sound(){return this.soundOn}onMessage(e){let t=new Uint8Array(e);if(t.length<1)return;let n=t[0],r=t.subarray(1);n===0?this.openVideo(r.slice()):n===1?this.onVideo(r):n===3?(this.audioHeader=r.slice(),(this.wasm??this.audio).setHeader(this.audioHeader)):n===4&&(this.wasm??this.audio).frame(r)}openVideo(e){let t=!!this.header&&this.header.length===e.length&&this.header.every((t,n)=>t===e[n]);if(t&&this.video.ready)return;if(this.gaveUp){if(t)return;this.gaveUp=!1,this.fails.clear()}this.header=e;let n=ni(e,this.hevc)??{w:1920,h:1080},r=Zi(e,this.hevc,n);r&&(this.stats.codec=/codecs="([^"]+)"/.exec(r.mime)?.[1]??``,this.video.open(r.mime,r.init)?(this.sawKey=!1,this.vTime=0,this.vLast=0):(this.problemShown=!0,this.onProblem(this.hevc?`no_hevc`:`decode`)))}onVideo(e){if(!this.video.ready&&!this.video.backlog)return;let t=Fi(e,this.hevc);if(this.video.dropped&&(this.video.dropped=!1,this.sawKey=!1),this.stats.arrived(),!this.sawKey&&!t)return this.stats.drop(),this.keyAsk.waiting();if(!t&&this.video.backlog>na[this.latency])return this.sawKey=!1,this.stats.drop(),this.keyAsk.waiting();this.sawKey=!0,this.stats.drawn();let n=performance.now(),r=this.vLast?Math.min(9e3,Math.max(750,Math.round((n-this.vLast)*90))):1500;this.vLast=n,t&&this.video.markKey(this.vTime/9e4),this.video.push(Qi(this.video.nextSeq(),this.vTime,r,e,this.hevc,t)),this.vTime+=r}stop(){this.video.close(),this.audio.stop(),this.wasm?.stop()}};async function Aa(e){let t=ii(e);if(t&&typeof VideoDecoder<`u`)try{if((await VideoDecoder.isConfigSupported({codec:t,codedWidth:1920,codedHeight:1080})).supported)return t}catch{}return Ri(1920,1080)}var R={CROSS:1,CIRCLE:2,SQUARE:4,TRIANGLE:8,LEFT:16,RIGHT:32,UP:64,DOWN:128,L1:256,R1:512,L3:1024,R3:2048,OPTIONS:4096,SHARE:8192,TOUCHPAD:16384,PS:32768},ja={buttons:0,l2:0,r2:0,lx:0,ly:0,rx:0,ry:0};function Ma(e,t){let n=e=>Math.max(0,Math.min(1,e));return[Math.round(n(e)*1919),Math.round(n(t)*941)]}var Na={ArrowUp:{button:R.UP},ArrowDown:{button:R.DOWN},ArrowLeft:{button:R.LEFT},ArrowRight:{button:R.RIGHT},Enter:{button:R.CROSS},Space:{button:R.CROSS},Backspace:{button:R.CIRCLE},Escape:{button:R.CIRCLE},KeyQ:{button:R.SQUARE},KeyE:{button:R.TRIANGLE},KeyZ:{button:R.L1},KeyC:{button:R.R1},Digit1:{trigger:`l2`},Digit3:{trigger:`r2`},KeyF:{button:R.L3},KeyG:{button:R.R3},Tab:{button:R.OPTIONS},Backquote:{button:R.SHARE},KeyH:{button:R.PS},KeyT:{button:R.TOUCHPAD},KeyW:{stick:`ly`,dir:-1},KeyS:{stick:`ly`,dir:1},KeyA:{stick:`lx`,dir:-1},KeyD:{stick:`lx`,dir:1},KeyI:{stick:`ry`,dir:-1},KeyK:{stick:`ry`,dir:1},KeyJ:{stick:`rx`,dir:-1},KeyL:{stick:`rx`,dir:1}};R.UP,R.DOWN,R.LEFT,R.RIGHT,R.CROSS,R.CIRCLE,R.SQUARE,R.TRIANGLE,R.L1,R.R1,R.L3,R.R3,R.OPTIONS,R.SHARE,R.PS,R.TOUCHPAD;var Pa=e=>Math.max(-32768,Math.min(32767,Math.round(e)));function Fa(e,t=Na){let n={...ja};for(let r of e){let e=t[r];e&&(`button`in e?n.buttons|=e.button:`stick`in e?n[e.stick]=Pa(n[e.stick]+e.dir*32767):n[e.trigger]=255)}return n}var Ia=[R.CROSS,R.CIRCLE,R.SQUARE,R.TRIANGLE,R.L1,R.R1,0,0,R.SHARE,R.OPTIONS,R.L3,R.R3,R.UP,R.DOWN,R.LEFT,R.RIGHT,R.PS,R.TOUCHPAD];function La(e){return Math.abs(e)<=1.01?Math.round((e+1)*3.5)%8:null}var Ra=[0,1,1,1,0,-1,-1,-1],za=[-1,-1,0,1,1,1,0,-1];function Ba(e,t){let n=e.axes[t.a]??0;if(t.hat){let e=La(n);return e===null?0:(t.hat===`x`?Ra:za)[e]}return t.inv?-n:n}var Va={buttons:Ia.flatMap((e,t)=>e?[[e,{b:t}]]:[]),l2:{b:6},r2:{b:7},lx:{a:0},ly:{a:1},rx:{a:2},ry:{a:3}};function Ha(e,t,n=!1){if(`b`in t){let r=e.buttons[t.b];return r?n&&r.value>0?Math.min(1,r.value):Math.max(+!!r.pressed,r.value):0}if(`h`in t){let n=La(e.axes[t.h]??9);if(n===null)return 0;let r=(n-t.at+8)%8;return+(r===0||r===1||r===7)}let r=e.axes[t.a];if(r===void 0)return 0;let i=t.rest??0;return Math.min(1,Math.max(0,(r-i)/(t.d-i)))}function Ua(e){if(e.mapping===`standard`)return Va;let t=Wa.get(e.id);if(t)return t;let n=e.axes.findIndex(e=>Math.abs(e)>1.05);if(n<0)return Va;let r={...Va,buttons:[...Va.buttons,[R.UP,{h:n,at:0}],[R.RIGHT,{h:n,at:2}],[R.DOWN,{h:n,at:4}],[R.LEFT,{h:n,at:6}]]};return Wa.set(e.id,r),r}var Wa=new Map;function Ga(e,t=Ua){let n={...ja},r=e=>Math.abs(e)<.08?0:Pa(e*32767),i=(e,t)=>Math.abs(t)>Math.abs(e)?t:e,a=(e,t)=>t?r(Ba(e,t)):0;for(let r of e){if(!r||!r.connected)continue;let e=t(r);for(let[t,i]of e.buttons)Ha(r,i)>.5&&(n.buttons|=t);e.l2&&(n.l2=Math.max(n.l2,Math.round(Ha(r,e.l2,!0)*255))),e.r2&&(n.r2=Math.max(n.r2,Math.round(Ha(r,e.r2,!0)*255))),n.lx=i(n.lx,a(r,e.lx)),n.ly=i(n.ly,a(r,e.ly)),n.rx=i(n.rx,a(r,e.rx)),n.ry=i(n.ry,a(r,e.ry))}return n}function Ka(e,t){return{buttons:e.buttons|t.buttons,l2:Math.max(e.l2,t.l2),r2:Math.max(e.r2,t.r2),lx:Pa(e.lx+t.lx),ly:Pa(e.ly+t.ly),rx:Pa(e.rx+t.rx),ry:Pa(e.ry+t.ry),touch:e.touch??t.touch??null,motion:e.motion??t.motion??null}}function qa(e,t,n,r=()=>globalThis.navigator?.getGamepads?.()??[]){let i=e=>e?.vibrationActuator;for(let a of e.some(i)?e:r()){let e=i(a);e&&(t===0&&n===0?e.reset?.():e.playEffect?.(`dual-rumble`,{duration:1e3,strongMagnitude:t/255,weakMagnitude:n/255}))}}var Ja=new Map;function Ya(e,t){return{id:`${e.id} (app)`,index:3+e.slot,connected:!0,mapping:`standard`,timestamp:0,axes:e.axes,buttons:e.buttons.map(e=>({pressed:e>.5,touched:e>0,value:e})),vibrationActuator:t?.vibrationActuator??null,hapticActuators:t?.hapticActuators??[]}}function Xa(e){let t=e?.getGamepads?.()??[];return Ja.size===0||t.some(e=>!!e?.connected)?[...t]:[...Ja.values()].sort((e,t)=>e.slot-t.slot).map(e=>Ya(e))}var Za=`b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b1,b2,b0,b3,b6,b4,b7,b5,b8,b9,,,-a1,+a1,-a0,+a0(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,,,,,,,a0,a1(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b2,b1,b3,b0,b4,b5,,,b8,b9,,,-a1,+a1,-a0,+a0(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b2,b3,b0,b1,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b11,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a5(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1(b1,b0,b2,b3,,b7,a3,a4,,b9,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a5,a2(b1,b0,b2,b3,,b7,a3,a4,,b9,,,b12,b14,b15,b13,,,a0,a1,a5,a2(b1,b0,b2,b3,,b7,b4,b5,,b9,,,b12,b14,b15,b13,,,a0,a1,a5~,a2~(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,b8,,a0,a1,a3,a4(b1,b2,,,b7,b5,b4,,,b9,,,b12,b14,b15,b13,,,a0,a1,a5,a2(b0,b1,b3,b4,b6,b5,b7,b2,b8,,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b7,b9,b10,b2,b8,,,h0.1,h0.4,h0.8,h0.2,b5,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,-a1,+a1,-a0,+a0(b0,b1,b3,b4,b6,b5,b7,b2,,b8,,,-a1,+a1,-a0,+a0(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b12,b13,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a5,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b14,,a0,a1,a2,a3(b14,b13,b15,b12,b10,b11,b8,b9,b0,b3,b1,b2,b4,b6,b7,b5,b16,,a0,a1,a2,a3(b0,b1,b3,b2,b4,b5,a2,a5,b8,b9,b11,b12,h0.1,h0.4,h0.8,h0.2,b10,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13,a0,a1,a2,a5(b2,b1,b3,b0,b6,b7,b4,b5,b8,b9,,,-a1,+a1,-a0,+a0(b1,b2,b0,b3,b4,b5,,,b8,b9,,,b12,b13,b15,b14,,,a0,a1,a3,a4(b0,b1,b3,b2,b4,b5,b6,b7,b8,b9,b11,b12,b13,b14,b15,b16,b10,,a0,a1,a2,a3(b0,b1,b3,b2,,b6,a2,a5,,b7,,,b8,b9,b10,b11,,,a0,a1,a3,a4(b0,b1,b3,b2,b4,b5,,,b8,b9,,,b10,b11,b12,b13,,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,,,b13,b8,b10,,,,,,,,hx,hy(b0,b1,b2,b3,b4,b5,,,b12,b9,b11,,,,,,,,hx,hy(b0,b1,b3,b2,b5,b6,b7,b8,b9,b10,b12,b13,b14,b15,b16,b17,b11,,a0,a1,a2,a3(b0,b1,b3,b2,b5,b6,b7,b8,b9,b10,b12,b13,h0.1,h0.4,h0.8,h0.2,b11,,a0,a1,a2,a3(b0,b1,b3,b2,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b0,b1,,,,b2,,b4,,b5,,,h0.1,h0.4,h0.8,h0.2,b6(b0,b1,b2,b3,b12,b4,b13,b5,b14,b6,b15,b7,b11,b8,b10,b9,b16,,a0,a1~,a2,a3~(b1,b3,b0,b2,b13,b5,b12,b4,,b6,,,b11,b8,b10,b9,b16,,a0,a1~,a2,a3~(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b33,,a0,a1,a2,a3(b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b16,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b15,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,,,,,b8,,a0,a1,a3,a4(b1,b0,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12,b13(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,,h0.1,h0.4,h0.8,h0.2,b12,b13(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b11,b12,h0.1,h0.4,h0.8,h0.2,b10,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,b12,b13,b14,b15,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,b14,b13,b14,b13,,,a0,a1,a3,a4(b1,b0,b2,b3,,,,,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b2,b3,b1,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b10(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12,b13,a0,a1,a2,a5(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,+a2,+a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,b8,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b13,,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b0,b3,b2,b4,b5,a2,a5,b6,b7,,,h0.1,h0.4,h0.8,h0.2,b8(b1,b2,,,,,,,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b21,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a5,a4,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,b8,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b13,b13,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,a5,a4,,b6,b7,b8,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a2,a5,b7,b6,b9,b10,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,b7,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a5,a4,b9,b6,b7,b8,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b22,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a2,a3,b6,b7,b9,,b12,b14,b15,b13,b8,,a0,a1(b3,b4,b5,b6,b7,b8,a9,a8,b11,b12,b14,b15,b16,b17,b18,b19,b13,,a0,a1,a2,a3(b0,b1,b3,b4,b8,b6,b9,b7,,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b7,b9,b6,b8,b10,b11,,,h0.1,h0.4,h0.8,h0.2(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b1,b0,b4,b3,b6,b7,,,b10,b11,,,-a1,+a1,-a0,+a0(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,,,b6,b7,b8,b9,,b11,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b3,b1,b4,,b10,a5,a4,,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,,,b6,b7,b8,b9,b10,b11,b13,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,,,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b0,b1,b3,b4,,b6,,b7,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,,,,,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a8,b9,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b8,b6,b9,b7,,b10,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a4,a5,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,,,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b2,b0,b3,b6,b4,b7,b5,b8,b9,,,-a4,+a4,-a3,+a3(b4,b8,b0,b12,b16,b20,b24,b28,b32,b36,b40,b44,h0.1,h0.4,h0.8,h0.2,,,a0,a4,a8,a12(b8,b12,b0,b4,b16,b20,b24,b28,b32,b36,,,h0.1,h0.4,h0.8,h0.2,b44,,a0,a4,a8,a12(b4,b0,b8,b12,,b28,a12,a16,,b36,,,h0.1,h0.4,h0.8,h0.2,,,a0,a4,a20,a8(b1,b2,b0,b3,,b7,a3,a4,,b9,,,b12,b14,b15,b13,,,a0,a1,a5,a2(b4,b0,b8,b12,,b28,a12,a16,,b36,,,b48,b56,b60,b52,,,a0,a4,a20,a8(b1,b2,,,b7,b5,a3,,,b9,,,b12,b14,b15,b13,,,a0,a1,a5,a2(b0,b1,b2,b3,b4,b5,a2,a5,b9,b8,b6,b7,b11,b12,b13,b14,b10,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b7,,,b5,b8,,,-a1,+a1,-a0,+a0,b2(b0,b1,b2,b3,b4,b5,b6,b15,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b13,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a5(b0,b1,b3,b4,b6,b7,a5,a4,b12,b13,b15,b16,h0.1,h0.4,h0.8,h0.2,b14,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,,,-a1,+a1,-a0,+a0,b2(b0,b1,b3,b4,b6,b7,,,b10,b11,,,-a1,+a1,-a0,+a0(b0,b1,b3,b4,b6,b7,b8,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a31(b0,b1,b3,b4,b8,b6,b9,b7,,b11,,,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a3,a4(b1,b0,b4,b3,b6,b7,a4,a5,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,,,b10,b11,,,,,,,,,hx,hy(b0,b1,b2,b3,b4,b5,b6,b7,b16,b15,b8,b9,b10,b11,b13,b12,b17,,a0,a1~,a2,a3~(b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a4(b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b2,b3,b33,b5,,,b6,b7,,,h0.1,h0.4,h0.8,h0.2(b0,b1,b3,b4,b6,b2,,,,b9,,,h0.1,h0.4,h0.8,h0.2(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a3,a4(b1,b2,,,b6,,b9,b7,,b8,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a2(b2,b1,b3,b0,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b3,b4,,b6,,b2,b7,b9,,,b2,b14,b15,b13(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b5,b7,b2,b10,b8,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b6,b7,a5~,a2~,b2,b8,b8,b5,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b4,,b9,b10,b6,b7,b8,,b5,b2,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,,,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b5,b4,b10,b11,b7,b6,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b3,b2,b6,b7,b4,b5,b8,b9,b11,b12,b13,b14,b15,b16,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b16,b19,b17,b18,b6,b7,b8,b9,b10,b11,b13,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a3,a4(b2,b1,b3,b0,b6,b7,b4,b5,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a5,a2(b0,b1,b2,b3,b4,b5,a2,a2,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a2,,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,b8,b9,b6,b7,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,b10,b11,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,b10,b11,b7,b6,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b1,b2,b0,b3,b10,b5,b11,b7,b8,b9,b4,b6,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b2,b0,b3,b5,b7,b4,b6,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,a3,a4,b8,b13,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13,a0,a1,a2,a5(b0,b4,b2,b1,b3,b6,,,b11,b9,,,h0.1,h0.4,h0.8,h0.2(b1,b2,b0,b3,b4,b5,a2,a5,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b9,b10,a4,a5,b4,b6,b7,b8,b11,b12,b13,b14,,,a0,a1,a2,a3(b1,b0,b3,b2,b4,b5,,,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b2,b3,b4,b5,+a2,-a2,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b1,b0,b3,b2,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,,,,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,+a2,-a2,b6,b7,b8,b9,b11,b14,b12,b13,b10,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,,a2,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b7,a4,a3,,,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,,,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b6,b7,b9,b10,b12,b13,b14,b15,b16,b17,b19,b20,h0.1,h0.4,h0.8,h0.2,b18,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,+a2,-a2,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,,,,,,,b7,b6,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b6,b7,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b6,b7,,,b10,b11,,,,,,,,,a0,a1(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a5(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a3,a4(b1,b0,b4,b3,,b6,,b7,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a5`.split(`(`),Qa={l00790006:0,l00790011:1,l00790016:2,l00790122:3,l00790126:4,l00791800:5,l00791803:6,l0079181a:7,l0079181b:8,l0079181c:9,l00791830:10,l00791843:11,l00791844:12,l00791845:11,l00791846:13,l007918d2:7,l007918d4:14,l0079954e:15,l046dc20a:16,l046dc211:17,l046dc216:5,l046dc218:5,l046dc219:5,l046dc21a:18,l046dc21d:14,l046dc21e:14,l046dc21f:14,l046dcad1:5,l046dcad2:5,l04b4010a:19,l04b42411:20,l04b42412:21,l054c0268:22,l054c05c4:23,l054c09cc:24,l054c0ba0:24,l054c0cda:25,l054c0ce6:24,l054c0df2:24,l054c0e5f:24,l054c1337:26,l057e0330:27,l057e0337:28,l057e1337:29,l057e2006:30,l057e2007:31,l057e2008:32,l057e2009:33,l057e2017:34,l057e201e:35,l057e2069:36,l057e2073:37,l05ac022d:38,l05ac055b:39,l05ac057a:40,l05ac061a:41,l0e6f0109:42,l0e6f011e:7,l0e6f011f:14,l0e6f0128:5,l0e6f012f:7,l0e6f0130:7,l0e6f0131:14,l0e6f0139:14,l0e6f0146:43,l0e6f0164:14,l0e6f0180:7,l0e6f0181:7,l0e6f0184:7,l0e6f0185:44,l0e6f0187:7,l0e6f0188:7,l0e6f0203:45,l0e6f0207:46,l0e6f0213:14,l0e6f0214:7,l0e6f02a7:14,l0e6f02a8:47,l0e6f02b2:48,l0e6f02b8:14,l0e6f02c8:14,l0e6f02d7:49,l0e6f02d8:14,l0e6f02da:14,l0e6f02ef:14,l0e6f02f1:14,l0e6f0301:14,l0e6f0315:14,l0e6f0401:14,l0e6f0413:14,l0e6f1112:50,l0e6f1113:51,l0e6ff501:14,l0f0d0009:7,l0f0d0010:42,l0f0d0011:7,l0f0d0016:52,l0f0d0022:42,l0f0d004d:7,l0f0d005e:53,l0f0d005f:54,l0f0d0066:24,l0f0d0067:14,l0f0d006a:8,l0f0d006b:7,l0f0d006d:55,l0f0d006e:7,l0f0d0084:8,l0f0d0085:7,l0f0d0086:47,l0f0d0087:56,l0f0d0088:57,l0f0d0092:58,l0f0d00aa:39,l0f0d00c1:7,l0f0d00ee:59,l0f0d00f6:60,l0f0d00fb:39,l0f0d0137:61,l0f0d0138:62,l0f0d0150:14,l0f0d0185:14,l0f0d0196:63,l0f0d01ab:63,l15320401:24,l15320402:7,l15320705:64,l15320900:65,l15320a03:14,l15320a14:14,l15320a29:14,l15321000:8,l15321008:66,l1532100a:59,l1532100b:24,l15321100:24,l18d19400:65,l20d60dad:67,l20d62002:68,l20d62005:14,l20d6200b:14,l20d6200f:69,l20d62065:14,l20d62802:14,l20d64001:70,l20d64002:70,l20d64005:14,l20d66271:71,l20d6792a:24,l20d689e5:71,l20d6a710:5,l20d6a711:7,l20d6a712:7,l20d6a713:7,l20d6a714:7,l20d6ca6d:7,l24c65300:14,l24c6531a:14,l24c6541a:14,l24c6543a:14,l24c6581a:14,l24c65b02:14,l24c65d04:14,l24c6891a:63,l24c6891b:63,l24c6892a:72,l24c6892b:63,l24c6fafe:14,l27f80bbf:63,l28de1102:73,l28de1105:73,l28de1106:73,l28de1142:73,l28de11fc:43,l28de11ff:14,l28de1201:73,l28de1202:73,l28de1205:74,l2dc80651:75,l2dc81003:76,l2dc81080:76,l2dc82000:14,l2dc82003:14,l2dc8200a:77,l2dc82019:14,l2dc82025:14,l2dc82101:63,l2dc82830:78,l2dc82862:79,l2dc82865:79,l2dc82869:80,l2dc8286a:81,l2dc83010:82,l2dc83011:63,l2dc83012:63,l2dc83013:63,l2dc83015:63,l2dc83016:63,l2dc83017:63,l2dc83019:83,l2dc8301b:63,l2dc8301d:63,l2dc83100:84,l2dc83101:85,l2dc83102:85,l2dc83103:85,l2dc83104:85,l2dc83106:14,l2dc8310a:14,l2dc8310b:14,l2dc83230:86,l2dc83810:79,l2dc83820:87,l2dc85006:88,l2dc85101:89,l2dc85103:86,l2dc85104:90,l2dc85107:91,l2dc85108:91,l2dc85109:90,l2dc85111:92,l2dc85112:82,l2dc86000:92,l2dc86001:93,l2dc86002:92,l2dc86006:82,l2dc86007:94,l2dc86009:82,l2dc86012:63,l2dc86100:87,l2dc86101:93,l2dc86102:92,l2dc86728:95,l2dc89000:96,l2dc89001:96,l2dc89012:93,l2dc89015:79,l2dc89018:78,l2dc89020:97,l2dc89025:98,l2dc8ab21:78,l35371004:14,l35371007:63,l3537100b:14,l35371046:63,l35371058:63,l35371094:63,l35371097:63,l358a0102:63,l358a0202:63,l358a0203:63,l358a0204:63,m00790006:99,m00790011:100,m00791800:101,m00791803:102,m0079181c:41,m00791843:103,m00791844:104,m00791846:105,m007918d2:39,m0079954e:106,m046dc216:5,m046dc218:5,m046dc219:5,m046dc21a:18,m046dc21f:107,m04b4010a:108,m04b42411:20,m04b42412:20,m054c0268:22,m054c05c4:24,m054c09cc:24,m054c0ba0:24,m054c0cda:25,m054c0ce6:24,m054c0df2:24,m054c0e5f:24,m054c1337:26,m057e2006:30,m057e2007:31,m057e2009:60,m057e2017:109,m057e2069:36,m057e2073:37,m05ac061a:41,m0e6f0109:42,m0e6f0184:110,m0e6f0187:5,m0e6f0201:107,m0e6f0203:45,m0e6f0207:46,m0e6f0401:107,m0f0d002d:54,m0f0d004d:7,m0f0d005e:111,m0f0d005f:7,m0f0d0066:24,m0f0d006e:7,m0f0d0084:8,m0f0d0085:7,m0f0d0087:112,m0f0d0088:57,m0f0d0092:58,m0f0d00aa:39,m0f0d00c1:7,m0f0d00ee:113,m0f0d00f6:3,m0f0d0138:62,m0f0d0200:7,m15320401:24,m15320402:7,m15320705:64,m15320900:65,m15320a03:107,m15321000:8,m15321100:24,m18d19400:65,m20d66271:71,m20d6792a:24,m20d6a710:7,m20d6a711:44,m20d6ca6d:7,m24c6543a:107,m24c65d04:107,m24c6891a:114,m24c6891b:63,m24c6892a:64,m24c6892b:63,m24c6fafe:107,m2dc80651:115,m2dc82820:116,m2dc82830:78,m2dc82840:78,m2dc82865:87,m2dc82869:80,m2dc8286a:81,m2dc83011:63,m2dc83012:63,m2dc83013:63,m2dc83015:117,m2dc83016:63,m2dc83017:118,m2dc83019:83,m2dc8301b:63,m2dc8301d:63,m2dc83100:9,m2dc83101:85,m2dc83102:85,m2dc83103:85,m2dc83104:85,m2dc83105:84,m2dc83230:119,m2dc83810:94,m2dc85006:120,m2dc85101:89,m2dc85103:86,m2dc85104:90,m2dc85107:121,m2dc85108:122,m2dc85109:90,m2dc85111:82,m2dc85112:82,m2dc86001:79,m2dc86002:85,m2dc86006:82,m2dc86009:123,m2dc86101:85,m2dc86102:85,m2dc86728:95,m2dc89000:96,m2dc89001:79,m2dc89012:78,m2dc89015:124,m2dc89018:78,m2dc89020:125,m2dc89025:126,m2dc89026:127,m2dc8ab12:116,m35371022:63,m35371041:63,m35371046:63,m35371104:63,m358a0102:63,m358a0201:128,m358a0202:128,m358a0203:128,m358a0204:63,w00790002:129,w00790007:129,w0079000a:129,w00790016:18,w00790122:99,w00790126:130,w00791804:131,w0079181a:7,w0079181b:113,w00791824:132,w00791830:133,w00791845:11,w00791847:12,w0079184f:134,w00791879:135,w0079188f:136,w007918ae:137,w007918d4:138,w046dc209:139,w046dc20a:16,w046dc20b:140,w046dc211:141,w046dc21d:138,w046dc21e:142,w046dc242:142,w046dca84:143,w046dca88:143,w046dcad1:5,w046dcad2:7,w04b42410:144,w04b4c681:130,w054c05c5:145,w057e0330:146,w05ac022d:144,w05ac033d:147,w05ac044d:147,w05ac055b:39,w05ac057a:148,w0e6f0003:149,w0e6f0111:7,w0e6f0114:7,w0e6f0119:7,w0e6f011a:7,w0e6f011e:7,w0e6f011f:150,w0e6f0124:42,w0e6f0128:7,w0e6f012f:7,w0e6f0130:7,w0e6f0132:7,w0e6f0146:138,w0e6f0164:151,w0e6f0180:7,w0e6f0181:7,w0e6f0185:44,w0e6f0188:7,w0e6f0189:7,w0e6f0214:7,w0e6f0301:138,w0e6f1113:51,w0e6f6302:7,w0f0d0009:7,w0f0d000a:152,w0f0d000c:153,w0f0d000d:154,w0f0d0010:155,w0f0d0011:57,w0f0d0013:155,w0f0d001b:152,w0f0d0021:155,w0f0d0022:54,w0f0d0025:42,w0f0d0026:155,w0f0d0027:42,w0f0d0032:155,w0f0d003d:156,w0f0d0040:157,w0f0d0042:155,w0f0d0049:7,w0f0d004b:155,w0f0d0051:155,w0f0d0054:7,w0f0d0055:8,w0f0d005b:113,w0f0d005c:7,w0f0d0064:155,w0f0d0067:70,w0f0d006a:8,w0f0d006b:7,w0f0d006f:158,w0f0d0070:57,w0f0d007b:155,w0f0d008a:8,w0f0d008b:7,w0f0d008c:138,w0f0d009c:8,w0f0d00a0:159,w0f0d00a5:160,w0f0d00a6:111,w0f0d00ad:161,w0f0d00ae:142,w0f0d00af:162,w0f0d00c0:138,w0f0d00c9:5,w0f0d00d8:163,w0f0d00dc:138,w0f0d0101:5,w0f0d0104:142,w0f0d0123:144,w0f0d0137:164,w0f0d0162:165,w0f0d0164:166,w0f0d0196:134,w0f0d0202:167,w0f0d1011:168,w153202a6:169,w15320300:170,w15320707:147,w15320a14:138,w15321004:145,w15321007:145,w15321009:145,w1532100a:5,w18d12c40:171,w20d60060:7,w20d60dad:142,w20d6319f:7,w20d64026:134,w20d64033:134,w20d6571d:7,w20d6576d:7,w20d65795:7,w20d657c7:7,w20d657e5:7,w20d689e5:172,w20d6a712:7,w20d6a713:7,w20d6a714:7,w20d6a720:7,w24c6531a:153,w24c65b02:138,w27f80bbf:173,w28de11fc:70,w28de11ff:174,w2dc802e0:175,w2dc81003:176,w2dc81080:176,w2dc82100:144,w2dc82810:177,w2dc82862:78,w2dc83000:78,w2dc83001:178,w2dc8301c:134,w2dc8310a:134,w2dc83820:179,w2dc85001:180,w2dc86000:79,w2dc86003:123,w2dc86012:134,w2dc86100:85,w2dc86103:123,w2dc8ab11:179,w2dc8ab20:178,w2dc8ab21:78,w35371004:138,w35371007:134,w35371094:134,w35371116:134},$a=e=>e.toLowerCase().padStart(4,`0`);function eo(e){let t=/^(.*?)\s*\((?:[^()]*?\s)?Vendor:\s*([0-9a-f]{1,4})\s+Product:\s*([0-9a-f]{1,4})\s*\)\s*$/i.exec(e);if(t)return{vendor:$a(t[2]),product:$a(t[3]),name:t[1].trim()};let n=/^([0-9a-f]{1,4})-([0-9a-f]{1,4})-(.*)$/i.exec(e.trim());return n?{vendor:$a(n[1]),product:$a(n[2]),name:n[3].trim()}:null}function to(e){return(eo(e)?.name??e.replace(/\s*\((?:XInput\s*)?STANDARD GAMEPAD\)\s*$/i,``)).trim()||e}function no(e=globalThis.navigator){let t=e?.userAgent??``;return/Android|iPhone|iPad|iPod/i.test(t)?null:/Macintosh|Mac OS X/i.test(t)?(e?.maxTouchPoints??0)>1?null:`m`:/Windows/i.test(t)?`w`:/Linux|CrOS|X11/i.test(t)?`l`:null}function ro(e,t){if(!t)return null;let n=t===`l`?[`l`]:[`m`,`w`];for(let t of n){let n=Qa[`${t}${e.vendor}${e.product}`];if(n!==void 0)return Za[n]??null}return null}function io(e){return e.mapping!==`standard`&&eo(e.id)?.vendor===`2dc8`}var ao={6003:`switch`,6006:`switch`,6103:`switch`,3010:`switch`,6001:`startx`,6002:`startx`,6101:`startx`,6102:`startx`,3011:`receiver`,3012:`receiver`,3013:`receiver`,3015:`receiver`,3016:`receiver`,3017:`receiver`,"301b":`receiver`,"301c":`receiver`,"301d":`receiver`,6012:`receiver`,5112:`none`,9020:`none`};function oo(e){let t=eo(e);return t&&ao[t.product]||`manual`}var so={1:0,2:2,4:4,8:6};function co(e){let t=0,n=!1;for(let r of e){let e=/a(\d+)/.exec(r);e&&(t=Math.max(t,Number(e[1])+1)),r.startsWith(`h`)&&(n=!0)}return{n:t,hat:n}}function lo(e,t,n){let{n:r,hat:i}=co(t),a=Ia.length,o=e.axes.findIndex(e=>Math.abs(e)>1.05),s=e=>e;if(i&&o<0)return n===`l`&&e.axes.length>=r+2?{hat:-1,hatXY:r,axis:s}:null;if(!(i?o>r:n!==`l`&&e.axes.length>=r+2))return{hat:o,hatXY:-1,axis:s};if(r<=4)return{hat:o,hatXY:-1,axis:e=>[0,1,2,5][e]??e};let c=t[a+2]?.replace(`~`,``)===`a2`&&t[a+3]?.replace(`~`,``)===`a3`,l=[t[6],t[7]].every(e=>/^a[45]~?$/.test(e??``));return r===6&&c&&l?{hat:o,hatXY:-1,axis:e=>[0,1,2,5,3,4][e]??e}:{hat:o,hatXY:-1,axis:s}}function uo(e,t){let n=/^b(\d+)$/.exec(e);if(n)return{b:Number(n[1])};if(n=/^([+-]?)a(\d+)(~?)$/.exec(e),n){let e=t.axis(Number(n[2]));return n[1]===`+`?{a:e,d:1}:n[1]===`-`?{a:e,d:-1}:n[3]?{a:e,d:-1,rest:1}:{a:e,d:1,rest:-1}}if(n=/^h0\.(\d)$/.exec(e),n){let e=so[n[1]];if(e===void 0)return null;if(t.hat>=0)return{h:t.hat,at:e};if(t.hatXY>=0)return e===0?{a:t.hatXY+1,d:-1}:e===4?{a:t.hatXY+1,d:1}:e===6?{a:t.hatXY,d:-1}:{a:t.hatXY,d:1}}return null}function fo(e,t){let n=/^a(\d+)(~?)$/.exec(e);if(n)return n[2]?{a:t.axis(Number(n[1])),inv:!0}:{a:t.axis(Number(n[1]))};if(e===`hx`||e===`hy`){if(t.hat>=0)return{a:t.hat,hat:e===`hx`?`x`:`y`};if(t.hatXY>=0)return{a:t.hatXY+ +(e===`hy`)}}return null}function po(e,t,n){let r=e.split(`,`),i=lo(t,r,n);if(!i)return null;let a={buttons:[],l2:null,r2:null,lx:null,ly:null,rx:null,ry:null};for(let e=0;eArray.isArray(e)&&e.length===2&&typeof e[0]==`number`&&_o(e[1]))&&[t.l2,t.r2,t.lx,t.ly,t.rx,t.ry].every(_o)}function yo(){try{let e=Lt(go),t=e?JSON.parse(e):null;return!t||typeof t!=`object`||Array.isArray(t)?{}:Object.fromEntries(Object.entries(t).filter(e=>vo(e[1])))}catch{return{}}}function bo(e,t){let n=yo();return t?n[e]=t:delete n[e],It(go,JSON.stringify(n)),xo=n,n}var xo=null;function So(e){return xo??=yo(),xo[e.id]??To(xo,e.id)??ho(e)??Ua(e)}function Co(e){return xo??=yo(),xo[e.id]?`saved`:e.mapping===`standard`?`standard`:ho(e)?`known`:`guess`}function wo(e){return ho(e)??Ua(e)}function To(e,t){if(!t.endsWith(` (app)`))return null;let n=t.slice(0,-6).trim().toLowerCase();if(!n)return null;let r=Object.keys(e).filter(e=>{let t=e.trim().toLowerCase();return t===n||t.includes(n)}),i=r.find(e=>e.trim().toLowerCase()===n)??(r.length===1?r[0]:null);return i?(xo=bo(t,e[i]),e[i]):null}function Eo(e){return{buttons:e.buttons.map(e=>Math.max(+!!e.pressed,e.value)),axes:[...e.axes]}}function Do(e,t){let n=null;if(t.buttons.forEach((t,r)=>{let i=t-(e.buttons[r]??0);t>.5&&i>.5&&(!n||i>n.amount)&&(n={src:{b:r},amount:i})}),n)return n.src;for(let n=0;n1.05?La(t.axes[n]):null;if(r!==null)return{h:n,at:r}}return t.axes.forEach((t,r)=>{let i=e.axes[r]??0,a=t-i;if(!(Math.abs(a)<.6)&&(!n||Math.abs(a)>n.amount)){let e=a>0?1:-1;n={src:Math.abs(i)>.5?{a:r,d:e,rest:i}:{a:r,d:e},amount:Math.abs(a)}}}),n?n.src:null}function Oo(e,t){let n=null;if(t.axes.forEach((t,r)=>{let i=t-(e.axes[r]??0);Math.abs(i)>=.6&&(!n||Math.abs(i)>Math.abs(n.moved))&&(n={a:r,moved:i})}),!n)return null;let r=n;return r.moved>0?{a:r.a}:{a:r.a,inv:!0}}var ko=[{kind:`button`,bit:R.CROSS,name:`✕`},{kind:`button`,bit:R.CIRCLE,name:`○`},{kind:`button`,bit:R.SQUARE,name:`□`},{kind:`button`,bit:R.TRIANGLE,name:`△`},{kind:`button`,bit:R.UP,name:`↑`},{kind:`button`,bit:R.DOWN,name:`↓`},{kind:`button`,bit:R.LEFT,name:`←`},{kind:`button`,bit:R.RIGHT,name:`→`},{kind:`button`,bit:R.L1,name:`L1`},{kind:`button`,bit:R.R1,name:`R1`},{kind:`trigger`,which:`l2`,name:`L2`},{kind:`trigger`,which:`r2`,name:`R2`},{kind:`button`,bit:R.L3,name:`L3`},{kind:`button`,bit:R.R3,name:`R3`},{kind:`button`,bit:R.OPTIONS,name:`Options`},{kind:`button`,bit:R.SHARE,name:`Create`},{kind:`button`,bit:R.PS,name:`PS`},{kind:`button`,bit:R.TOUCHPAD,name:`Touchpad`},{kind:`axis`,which:`lx`,name:`L →`},{kind:`axis`,which:`ly`,name:`L ↓`},{kind:`axis`,which:`rx`,name:`R →`},{kind:`axis`,which:`ry`,name:`R ↓`}];function Ao(){return{buttons:[],l2:null,r2:null,lx:null,ly:null,rx:null,ry:null}}function jo(e,t,n){return t.kind===`button`?{...e,buttons:[...e.buttons.filter(([e])=>e!==t.bit),[t.bit,n]]}:(t.kind,{...e,[t.which]:n})}function Mo(e,t=Va){let n=new Set(e.buttons.map(([e])=>e)),r=e=>`b`in e?`b${e.b}`:`h`in e?`h${e.h}.${e.at}`:`a${e.a}${e.d}`,i=new Set([...e.buttons.map(([,e])=>r(e)),...[e.l2,e.r2].filter(e=>!!e).map(r)]);return{buttons:[...e.buttons,...t.buttons.filter(([e,t])=>!n.has(e)&&!i.has(r(t)))],l2:e.l2??t.l2,r2:e.r2??t.r2,lx:e.lx??t.lx,ly:e.ly??t.ly,rx:e.rx??t.rx,ry:e.ry??t.ry}}var No=ko.filter(e=>e.kind!==`button`||![R.L3,R.R3,R.OPTIONS,R.SHARE,R.PS,R.TOUCHPAD].includes(e.bit));function Po(e,t){return t.buttons.every((t,n)=>Math.abs(t-(e.buttons[n]??0))<.3)&&t.axes.every((t,n)=>Math.abs(t-(e.axes[n]??0))<.3)}var Fo=class{constructor(e=ko){this.steps=e,this.step=0,this.prof=Ao(),this.rest=null,this.waiting=!0}get done(){return this.step>=this.steps.length}get current(){return this.steps[this.step]??null}feed(e){if(this.done)return!1;if(!this.rest)return this.rest=e,this.waiting=!1,!1;if(this.waiting)return Po(this.rest,e)&&(this.waiting=!1),!1;let t=this.steps[this.step],n=t.kind===`axis`?Oo(this.rest,e):Do(this.rest,e);return n?(this.prof=jo(this.prof,t,n),this.go(this.step+1),!0):!1}skip(){this.go(this.step+1)}back(){this.step>0&&this.go(this.step-1)}go(e){this.waiting=!0,this.step=Math.min(e,this.steps.length)}profile(e=Va){return Mo(this.prof,e)}};function Io(e,t){return e.buttons===t.buttons&&e.l2===t.l2&&e.r2===t.r2&&e.lx===t.lx&&e.ly===t.ly&&e.rx===t.rx&&e.ry===t.ry&&(e.touch?.[0]??-1)===(t.touch?.[0]??-1)&&(e.touch?.[1]??-1)===(t.touch?.[1]??-1)&&(e.motion?.t??-1)===(t.motion?.t??-1)}function Lo(){try{return typeof sessionStorage<`u`?sessionStorage:null}catch{return null}}var Ro=e=>`ps5upload.join.token.${e??`app`}`,zo=class{constructor(e){this.o=e,this.ws=null,this.stage={kind:`connecting`},this.token=null,this.player=0,this.last={...ja},this.lastSent=0,this.neutral=!1,this.stopped=!1,this.attempt=0,this.deadline=0,this.raf=0,this.keepalive=null,this.pinger=null,this.retry=null,this.lastHeard=0,this.hostAway=!1,this.pings=0,this.now=e.now??(()=>Date.now()),this.storage=e.storage===void 0?Lo():e.storage,this.WS=e.WebSocketImpl??WebSocket,this.seq=this.now()>>>0;try{this.token=this.storage?.getItem(this.key)??null}catch{this.token=null}}get key(){return Ro(this.o.invite??this.o.code??null)}get current(){return this.stage}get socket(){return this.ws}get resumeToken(){return this.token}setStage(e){this.stage=e,this.o.onStage(e)}start(){if(this.stopped=!1,this.setStage({kind:`connecting`}),this.connect(),this.stopped)return;let e=()=>{this.sendPad(!1),this.raf=(this.o.raf??(e=>window.requestAnimationFrame(e)))(e)};this.raf=(this.o.raf??(e=>window.requestAnimationFrame(e)))(e),this.keepalive=setInterval(()=>this.sendPad(!1),100),this.pinger=setInterval(()=>this.ping(),1e3)}connect(){let e;try{e=new this.WS(this.o.url)}catch{this.dropped();return}this.ws=e,e.binaryType=`arraybuffer`,e.onopen=()=>{if(this.ws!==e)return;this.lastHeard=this.now();let t={name:this.o.name};this.o.invite&&(t.invite=this.o.invite),this.o.code&&(t.code=this.o.code),this.token&&(t.resume=this.token),e.send(JSON.stringify({hello:t}))},e.onmessage=t=>{this.ws===e&&(this.lastHeard=this.now(),typeof t.data==`string`?this.onText(t.data):t.data instanceof ArrayBuffer&&this.stage.kind===`joined`&&this.o.onFrame?.(t.data))},e.onclose=t=>{if(this.ws!==e)return;this.ws=null;let n=Ue(t);n===`mismatch`?(this.forgetToken(),this.finish({kind:`ended`,why:n})):n&&this.stage.kind!==`joined`&&this.stage.kind!==`reconnecting`?this.finish({kind:`ended`,why:n}):this.dropped()},e.onerror=()=>{}}onText(e){let t=Je(e);if(t)switch(t.kind){case`pong`:{let e=this.now()-t.t;e>=0&&e<6e4&&this.o.onRtt?.(e);return}case`asking`:this.stage.kind!==`reconnecting`&&this.setStage({kind:`asking`});return;case`waiting`:this.hostAway||(this.hostAway=!0,this.deadline=this.now()+et),this.attempt=0,this.setStage(this.reconnectingStage());return;case`joined`:this.token=t.token,this.player=t.player,this.attempt=0,this.hostAway=!1;try{this.storage?.setItem(this.key,t.token)}catch{}{let e=t.track&&this.ws?.media||null;this.o.onCodec?.(t.hevc,e,!!e&&t.audio&&!!e.audio)}this.setStage({kind:`joined`,player:t.player,hevc:t.hevc}),this.sendPad(!0);return;case`refused`:this.forgetToken(),this.hostAway&&t.why!==`seat_taken`?this.finish({kind:`ended`,why:`host_stopped`}):this.finish({kind:`refused`,why:t.why});return;case`bye`:if(t.why===`host_stopped`&&this.token){this.hostWait();return}this.forgetToken(),this.finish({kind:`ended`,why:t.why});return;case`status`:this.stage.kind===`joined`&&t.status.player>0&&t.status.player!==this.stage.player&&(this.player=t.status.player,this.setStage({...this.stage,player:t.status.player})),this.o.onStatus?.(t.status);return;case`feedback`:t.rumble&&this.o.onRumble?.(t.rumble[0],t.rumble[1]),t.light&&this.o.onLight?.(t.light);return}}hostWait(){this.hostAway=!0,this.deadline=this.now()+et,this.attempt=0;let e=this.ws;this.ws=null;try{e?.close()}catch{}this.scheduleRetry()}reconnectingStage(){return{kind:`reconnecting`,player:this.player,attempt:this.attempt,deadline:this.deadline,...this.hostAway?{hostStopped:!0}:{}}}giveUp(){this.forgetToken(),this.finish({kind:`ended`,why:this.hostAway?`host_stopped`:`gave_up`})}dropped(){if(this.stopped)return;let e=this.stage;e.kind===`joined`||e.kind===`reconnecting`&&this.token?(e.kind===`joined`&&(this.deadline=this.now()+$e),this.scheduleRetry()):this.finish({kind:`ended`,why:`lost`})}scheduleRetry(){if(this.stopped)return;if(this.now()>=this.deadline){this.giveUp();return}let e=Qe(this.attempt);this.setStage(this.reconnectingStage()),this.attempt+=1,this.retry&&clearTimeout(this.retry),this.retry=setTimeout(()=>{this.retry=null,this.stopped||(this.now()>=this.deadline?this.giveUp():this.connect())},e)}forgetToken(){this.token=null;try{this.storage?.removeItem(this.key)}catch{}}ping(){if(this.hostAway&&!this.stopped&&this.now()>=this.deadline+5e3||!this.stopped&&this.stage.kind===`reconnecting`&&this.now()>=this.deadline+5e3){this.giveUp();return}let e=this.ws;if(e&&e.readyState===this.WS.OPEN){if(this.stage.kind===`joined`&&this.now()-this.lastHeard>3500){this.ws=null;try{e.close()}catch{}this.dropped()}else if(e.send(JSON.stringify({ping:this.now()})),this.stage.kind===`joined`&&this.o.readStats&&++this.pings%2==0){let t=this.o.readStats();t&&e.send(JSON.stringify({stats:t}))}}}setNeutral(e){this.neutral!==e&&(this.neutral=e,this.sendPad(!0))}sendPad(e){let t=this.ws;if(!t||t.readyState!==this.WS.OPEN||this.stage.kind!==`joined`)return;let n=this.neutral?{...ja,touch:null,motion:null}:this.o.readPad(),r=this.now();!e&&Io(n,this.last)&&r-this.lastSent<100||(this.last=n,this.lastSent=r,this.seq=this.seq+1>>>0,t.send(Ze(this.seq,n)))}clearTimers(){(this.o.cancelRaf??(e=>window.cancelAnimationFrame(e)))(this.raf),this.keepalive&&clearInterval(this.keepalive),this.pinger&&clearInterval(this.pinger),this.retry&&clearTimeout(this.retry),this.keepalive=this.pinger=this.retry=null}finish(e){this.stopped=!0,this.clearTimers();let t=this.ws;this.ws=null;try{t?.close()}catch{}this.setStage(e)}askKeyframe(){let e=this.ws;e&&e.readyState===this.WS.OPEN&&this.stage.kind===`joined`&&e.send(JSON.stringify({keyframe:!0}))}leave(){let e=this.ws;e&&e.readyState===this.WS.OPEN&&(this.stage.kind===`joined`&&(this.seq=this.seq+1>>>0,e.send(Ze(this.seq,ja))),e.send(JSON.stringify({leave:1}))),this.forgetToken(),this.finish({kind:`ended`,why:`left`})}stop(){let e=this.ws;e&&e.readyState===this.WS.OPEN&&this.stage.kind===`joined`&&(this.seq=this.seq+1>>>0,e.send(Ze(this.seq,ja))),this.stopped=!0,this.clearTimers(),this.ws=null;try{e?.close()}catch{}}},Bo=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),z=s(((e,t)=>{t.exports=Bo()}))(),Vo=`ps5upload.openIn`,Ho=`ps5upload.openIn.tab`;function Uo(){try{return sessionStorage.getItem(Ho)===`browser`}catch{return!1}}function B(){try{sessionStorage.setItem(Ho,`browser`)}catch{}}function V(e){return e===`browser`?`browser`:e===`app`?`opening`:`ask`}function Wo({appLink:e,children:t}){let n=Ie(),[r,i]=(0,D.useState)(()=>Uo()?`browser`:V(Lt(Vo))),[a,o]=(0,D.useState)(!1);if((0,D.useEffect)(()=>{r===`opening`&&Lt(`ps5upload.openIn`)===`app`&&(location.href=e)},[]),r===`browser`)return(0,z.jsx)(z.Fragment,{children:t});let s=()=>{a&&It(Vo,`app`),i(`opening`),location.href=e},c=()=>{r===`ask`&&a?It(Vo,`browser`):r===`opening`&&Lt(`ps5upload.openIn`)===`app`&&Rt(Vo),B(),i(`browser`)};return(0,z.jsx)(`div`,{className:`flex min-h-[100dvh] items-center justify-center bg-black px-6 text-white`,"data-testid":`open-in-gate`,"data-join-ui":``,children:(0,z.jsx)(`div`,{className:`w-full max-w-sm space-y-4 rounded-2xl border border-white/10 bg-neutral-900 p-6`,children:r===`ask`?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsx)(`h1`,{className:`text-lg font-semibold`,children:n(`open_in_title`,void 0,`Open in the PS5Upload app?`)}),(0,z.jsx)(`p`,{className:`text-sm text-white/60`,children:n(`open_in_body`,void 0,`Have the PS5Upload app on this device? Open this there, or carry on in the browser.`)})]}),(0,z.jsx)(`button`,{type:`button`,onClick:s,autoFocus:!0,className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black`,"data-testid":`open-in-app`,children:n(`open_in_app`,void 0,`Open in the app`)}),(0,z.jsx)(`button`,{type:`button`,onClick:c,className:`w-full rounded-full border border-white/20 py-2.5 text-sm font-semibold text-white hover:bg-white/10`,"data-testid":`open-in-browser`,children:n(`open_in_browser`,void 0,`Continue in browser`)}),(0,z.jsxs)(`label`,{className:`flex items-center justify-center gap-2 text-xs text-white/60`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:a,onChange:e=>o(e.target.checked),"data-testid":`open-in-remember`}),n(`open_in_remember`,void 0,`Remember my choice on this device`)]})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsx)(`h1`,{className:`text-lg font-semibold`,children:n(`open_in_opening`,void 0,`Opening the PS5Upload app…`)}),(0,z.jsx)(`p`,{className:`text-sm text-white/60`,children:n(`open_in_not_opened`,void 0,`Nothing happened? The app may not be on this device.`)})]}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>location.href=e,autoFocus:!0,className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black`,"data-testid":`open-in-again`,children:n(`open_in_again`,void 0,`Try again`)}),(0,z.jsx)(`button`,{type:`button`,onClick:c,className:`w-full rounded-full border border-white/20 py-2.5 text-sm font-semibold text-white hover:bg-white/10`,"data-testid":`open-in-browser`,children:n(`open_in_browser`,void 0,`Continue in browser`)})]})})})}var Go=[`a[href]`,`button:not([disabled])`,`input:not([disabled]):not([type='hidden'])`,`select:not([disabled])`,`textarea:not([disabled])`,`summary`,`[contenteditable='true']`,`[tabindex]`].map(e=>`${e}:not([tabindex='-1'])`).join(`, `),Ko=new Set,qo=[];function Jo(){for(let e of Ko)e()}function Yo(){return qo.length}function Xo(e){return qo.push(e),Jo(),()=>{let t=qo.lastIndexOf(e);t!==-1&&qo.splice(t,1),Jo()}}function Zo(e,t,n){switch(n){case`down`:return t.top-e.bottom;case`up`:return e.top-t.bottom;case`right`:return t.left-e.right;case`left`:return e.left-t.right}}function Qo(e,t,n){let r=(e.left+e.right)/2,i=(e.top+e.bottom)/2,a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;switch(n){case`down`:return o>i&&t.top>=e.top+1;case`up`:return or&&t.left>=e.left+1;case`left`:return a0?{gap:0,overlap:c}:{gap:-c,overlap:0}}function es(e,t,n){let r=null,i=1/0,a=!1;for(let o of t){if(!Qo(e,o.rect,n))continue;let t=Math.max(0,Zo(e,o.rect,n)),s=$o(e,o.rect,n),c=s.overlap>0;if(a&&!c)continue;let l=c?t-s.overlap/1e6:Math.hypot(t,2*s.gap);(c&&!a||l`u`?void 0:window){try{return!!e?.PS5UploadTv?.isTv()}catch{return!1}}function is(e=typeof document>`u`?void 0:document){return e?.documentElement.dataset.tv===`1`}function as(e,t){if(!e)return!1;if(e.closest(`[data-own-arrows]`))return!0;let n=e.tagName;if(n===`TEXTAREA`||e.isContentEditable)return!0;let r=t===`left`||t===`right`;if(n===`INPUT`){let t=(e.type||`text`).toLowerCase();if(t===`range`||ns.test(t))return r}return!1}var os=`[aria-modal="true"], [role="dialog"], [role="alertdialog"]`;function ss(e){let t=e.activeElement?.closest(os);if(t)return t;if(Yo()>0){let t=e.querySelectorAll(os);if(t.length)return t[t.length-1]}return e}function cs(e){let t=[];return e.querySelectorAll(Go).forEach(e=>{if(e.closest(`[inert], [aria-hidden='true']`)||e.disabled)return;let n=e.getBoundingClientRect();n.width<=0||n.height<=0||t.push({el:e,rect:n})}),t}function ls(e){return(e.find(e=>e.el.getAttribute(`aria-current`)===`page`)??e[0])?.el??null}function us(e,t=document){let n=ts[e.key];if(!n||e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return!1;let r=t.activeElement;if(as(r,n))return!1;let i=cs(ss(t));if(!i.length)return!1;let a=i.find(e=>e.el===r),o=a?es(a.rect,i.filter(e=>e!==a),n):ls(i);return o?(e.preventDefault(),o.focus(),typeof o.scrollIntoView==`function`&&o.scrollIntoView({block:`nearest`,inline:`nearest`}),!0):!1}var ds=!1;function fs(e){ds||(ds=!0,e.addEventListener(`keydown`,t=>void us(t,e.document)))}function ps(e=typeof window>`u`?void 0:window){e&&(rs(e)&&(e.document.documentElement.dataset.tv=`1`),fs(e))}function ms({id:e,className:t}){let n=Ie(),r=oo(e);if(r===`none`)return(0,z.jsx)(`span`,{className:t,"data-testid":`pad-8bitdo-hint`,"data-how":r,children:n(`pad_8bitdo_no_xinput`,void 0,`This 8BitDo has no X-input mode. If a button is wrong, check the controller.`)});let i=r===`switch`?n(`pad_8bitdo_how_switch`,void 0,`set the switch on the back to X, then press Start`):r===`startx`?n(`pad_8bitdo_how_startx`,void 0,`turn it off, then hold Start + X to turn it on`):r===`receiver`?n(`pad_8bitdo_how_receiver`,void 0,`use its 2.4G receiver or a USB cable`):n(`pad_8bitdo_how_manual`,void 0,`its manual says how`);return(0,z.jsx)(`span`,{className:t,"data-testid":`pad-8bitdo-hint`,"data-how":r,children:n(`pad_8bitdo_xinput`,{how:i},`For the best result, switch your 8BitDo to X-input mode: ${i}.`)})}var hs=new Set,gs={held:new Set,touch:null,touchPad:ja,mapping:!1,get paused(){return hs.size>0},motion:null},_s={s:.85,m:1,l:1.15},vs=.25;function ys(e){return typeof e!=`number`||!Number.isFinite(e)?1:Math.min(1,Math.max(vs,e))}var bs={overlay:{width:844,height:390},deck:{width:390,height:480}},xs=.7,Ss=1.4;function Cs(e,t,n,r){let i=_s[e]??1;if(!(t>0)||!(n>0))return i;let a=r?bs.deck:bs.overlay,o=Math.min(Ss,Math.max(xs,Math.min(t/a.width,n/a.height)));return Math.round(o*i*1e3)/1e3}var ws=34;function Ts(e,t){return t>0&&8+Math.max(112*e,90)+156*e+124*e+Math.max(56*e,44)+ws>t}function Es(e,t,n){let r=e/32767,i=t/32767,a=Math.hypot(r,i),o=a>1?1/a:1;return{dx:r*o*n,dy:i*o*n}}var Ds=`calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2)`,Os=32767,ks=12;function As({stream:e,layout:t=`overlay`,opacity:n=1,size:r=`m`,deckTop:i=`0px`,onMenu:a}){let o=Ie(),s=(0,D.useRef)(new Map),c=(0,D.useRef)({...ja}),[l,u]=(0,D.useState)({...ja}),[d,f]=(0,D.useState)({l:!1,r:!1,touchpad:!1}),p=(0,D.useRef)(null),[m,h]=(0,D.useState)({width:0,height:0});(0,D.useEffect)(()=>{let e=p.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect();h(e=>e.width===t.width&&e.height===t.height?e:{width:t.width,height:t.height})};if(t(),typeof ResizeObserver>`u`)return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t);let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]),(0,D.useEffect)(()=>()=>{gs.touchPad={...ja}},[]);let g=()=>{let t={...ja,touch:null},n={l:!1,r:!1,touchpad:!1};for(let e of s.current.values())e.kind===`stick`&&(n[e.which]=!0),e.kind===`touchpad`&&(n.touchpad=!0),e.kind===`button`&&(t.buttons|=e.bit),e.kind===`trigger`&&(t[e.which]=255),e.kind===`touchpad`&&e.pressed&&(t.buttons|=R.TOUCHPAD);t.lx=c.current.lx,t.ly=c.current.ly,t.rx=c.current.rx,t.ry=c.current.ry,t.touch=c.current.touch??null,gs.touchPad=t,e?.sendPad(),u(t),f(e=>e.l===n.l&&e.r===n.r&&e.touchpad===n.touchpad?e:n)},_=(e,t,n)=>{let r=Math.max(-1,Math.min(1,(t-e.cx)/e.radius)),i=Math.max(-1,Math.min(1,(n-e.cy)/e.radius));c.current[e.which===`l`?`lx`:`rx`]=Math.round(r*Os),c.current[e.which===`l`?`ly`:`ry`]=Math.round(i*Os)},v=(e,t)=>{e.preventDefault(),e.stopPropagation();let n=e.currentTarget;try{n.setPointerCapture(e.pointerId)}catch{}let r=t(n);s.current.set(e.pointerId,r),r.kind===`stick`&&_(r,e.clientX,e.clientY),r.kind===`touchpad`&&(c.current.touch=Ma((e.clientX-r.rect.left)/r.rect.width,(e.clientY-r.rect.top)/r.rect.height)),navigator.vibrate?.(8),g()},y=e=>{let t=s.current.get(e.pointerId);if(t){if(e.stopPropagation(),t.kind===`stick`)_(t,e.clientX,e.clientY);else if(t.kind===`touchpad`)c.current.touch=Ma((e.clientX-t.rect.left)/t.rect.width,(e.clientY-t.rect.top)/t.rect.height),t.pressed&&Math.hypot(e.clientX-t.x0,e.clientY-t.y0)>ks&&(t.pressed=!1);else return;g()}},b=e=>{let t=s.current.get(e.pointerId);t&&(e.stopPropagation(),s.current.delete(e.pointerId),t.kind===`stick`&&(c.current[t.which===`l`?`lx`:`rx`]=0,c.current[t.which===`l`?`ly`:`ry`]=0),t.kind===`touchpad`&&(c.current.touch=null),g())},x=e=>e.stopPropagation(),S={onPointerMove:y,onPointerUp:b,onPointerCancel:b,onClick:x,onDoubleClick:x},ee=e=>(l.buttons&e)!==0,C=e=>`border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.35)] transition-colors duration-75 ${e?`border-white bg-white/50`:`border-white/70 bg-white/10`}`,w=`text-white [text-shadow:0_1px_2px_rgba(0,0,0,0.6)]`,T={filter:`drop-shadow(0 0 1.5px rgba(0,0,0,0.5))`},E=e=>({stroke:e?`#fff`:`rgba(255,255,255,0.75)`,fill:e?`rgba(255,255,255,0.5)`:`rgba(255,255,255,0.1)`}),te=`pointer-events-auto flex touch-none select-none items-center justify-center bg-transparent p-0`,ne={minHeight:`calc(44px / var(--k))`,minWidth:`calc(44px / var(--k))`},re=(e,t,n,r)=>(0,z.jsx)(`button`,{type:`button`,"aria-label":e,onPointerDown:e=>v(e,()=>({kind:`button`,bit:t})),...S,className:`${te} ${n}`,style:ne,children:r}),ie=(e,t,n,r)=>(0,z.jsx)(`span`,{className:`flex h-[32px] w-[76px] items-center justify-center text-[13px] font-semibold tracking-wide ${w} ${C(t)}`,style:{borderRadius:r?n===`l`?`16px 9px 9px 9px`:`9px 16px 9px 9px`:`9px`},children:e}),ae=(e,t,n,r)=>re(e,t,`h-[44px] w-[84px]`,ie(e,ee(t),n,r)),oe=(e,t,n)=>(0,z.jsx)(`button`,{type:`button`,"aria-label":e,onPointerDown:e=>v(e,()=>({kind:`trigger`,which:t})),...S,className:`${te} h-[44px] w-[84px]`,style:ne,children:ie(e,l[t]>0,n,!0)}),se=(e,t,n)=>re(e,t,`h-[52px] w-[52px]`,(0,z.jsx)(`svg`,{viewBox:`0 0 52 52`,width:`52`,height:`52`,"aria-hidden":!0,style:T,children:(0,z.jsxs)(`g`,{transform:`rotate(${n} 26 26)`,strokeWidth:`1.5`,strokeLinejoin:`round`,...E(ee(t)),children:[(0,z.jsx)(`path`,{d:`M10 9 Q10 3 16 3 L36 3 Q42 3 42 9 L42 30 Q42 34.5 38.5 38 L29.5 47 Q26 50.5 22.5 47 L13.5 38 Q10 34.5 10 30 Z`}),(0,z.jsx)(`path`,{d:`M20.5 23 L26 17 L31.5 23`,fill:`none`,stroke:`#fff`,strokeLinecap:`round`,strokeWidth:`1.8`})]})})),ce=(e,t,n)=>re(e,t,`h-[52px] w-[52px]`,(0,z.jsxs)(`svg`,{viewBox:`0 0 52 52`,width:`52`,height:`52`,"aria-hidden":!0,style:T,children:[(0,z.jsx)(`circle`,{cx:`26`,cy:`26`,r:`22.5`,strokeWidth:`1.5`,...E(ee(t))}),(0,z.jsx)(`g`,{fill:`none`,stroke:`#fff`,strokeWidth:`1.8`,strokeLinejoin:`round`,strokeLinecap:`round`,children:n})]})),le=(e,t)=>re(e,t,`h-[44px] min-w-[64px] px-[4px]`,(0,z.jsx)(`span`,{className:`flex h-[24px] items-center rounded-full px-[10px] text-[10px] font-semibold uppercase tracking-wider ${w} ${C(ee(t))}`,children:e})),ue=(e,t)=>re(e,t,`h-[44px] w-[44px]`,(0,z.jsx)(`span`,{className:`flex h-[36px] w-[36px] items-center justify-center rounded-full text-[11px] font-bold ${w} ${C(ee(t))}`,children:e})),de=e=>{let{dx:t,dy:n}=Es(e===`l`?l.lx:l.rx,e===`l`?l.ly:l.ry,34),r=d[e];return(0,z.jsx)(`div`,{"aria-label":e===`l`?o(`rp_touch_left_stick`,void 0,`Left stick`):o(`rp_touch_right_stick`,void 0,`Right stick`),onPointerDown:t=>v(t,t=>{let n=t.getBoundingClientRect();return{kind:`stick`,which:e,cx:n.left+n.width/2,cy:n.top+n.height/2,radius:n.width/2}}),...S,className:`pointer-events-auto relative h-[124px] w-[124px] touch-none rounded-full border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.3)] transition-colors duration-75 ${r?`border-white/80 bg-white/[0.12]`:`border-white/45 bg-white/[0.05]`}`,children:(0,z.jsx)(`div`,{className:`absolute left-1/2 top-1/2 h-[54px] w-[54px] rounded-full ${C(r)}`,style:{transform:`translate(calc(-50% + ${t}px), calc(-50% + ${n}px))`}})})},O=t===`deck`,fe=Cs(r,m.width,m.height,O),pe=e=>`${e}px * var(--k)`,k=`max(12px, env(safe-area-inset-left))`,me=`max(12px, env(safe-area-inset-right))`,he=`max(12px, env(safe-area-inset-bottom))`,ge=O?`8px`:t===`overlay-bar`?`3.5rem`:`max(10px, env(safe-area-inset-top))`,_e=(e,t,n=0)=>t?n?`calc(${e} + max(${pe(t)}, ${n}px))`:`calc(${e} + ${pe(t)})`:e,ye=(e,t)=>({position:`absolute`,...t,transform:`scale(var(--k))`,transformOrigin:e}),be=O&&Ts(fe,m.height),A=O?void 0:`58%`,j=e=>O?{top:_e(ge,be?96:112,be?72:90),[e]:e===`left`?k:me}:{top:A,translate:`0 -50%`,[e]:e===`left`?k:me},xe=e=>({bottom:be?he:_e(he,O?56:0,44),[e]:be?`calc(${e===`left`?k:me} + 8px + max(${pe(80)}, 44px))`:_e(e===`left`?k:me,O?40:168)}),Se=!!a&&!O;return(0,z.jsxs)(`div`,{ref:p,className:`pointer-events-none absolute z-10 select-none [-webkit-touch-callout:none] ${O?`inset-x-0 bottom-0`:`inset-0`}`,style:{top:O?i:void 0,"--k":fe},"data-testid":`rp-touch`,"data-layout":t,"data-scale":fe,onContextMenu:e=>e.preventDefault(),children:[(0,z.jsxs)(`div`,{className:`absolute inset-0`,style:{opacity:ys(n)},children:[(0,z.jsx)(`div`,{style:ye(`top left`,{top:ge,left:k}),children:(0,z.jsxs)(`div`,{className:`ms-[8px] flex flex-col`,style:{rotate:O?void 0:`6deg`,transformOrigin:`top left`},children:[oe(`L2`,`l2`,`l`),ae(`L1`,R.L1,`l`,!1)]})}),(0,z.jsx)(`div`,{style:ye(`top right`,{top:ge,right:me}),children:(0,z.jsxs)(`div`,{className:`me-[8px] flex flex-col items-end`,style:{rotate:O?void 0:`-6deg`,transformOrigin:`top right`},children:[oe(`R2`,`r2`,`r`),ae(`R1`,R.R1,`r`,!1)]})}),(0,z.jsx)(`div`,{"aria-label":o(`rp_touch_touchpad`,void 0,`Touchpad`),onPointerDown:e=>v(e,t=>({kind:`touchpad`,rect:t.getBoundingClientRect(),x0:e.clientX,y0:e.clientY,pressed:!0})),...S,className:`pointer-events-auto absolute touch-none rounded-2xl border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.3)] transition-colors duration-75 ${d.touchpad?`border-white/80 bg-white/25`:`border-white/40 bg-white/[0.05]`}`,style:O?{top:_e(ge,6),left:_e(k,104),right:_e(me,104),height:`max(44px, calc(${pe(64)}))`}:{top:ge,left:`50%`,translate:`-50% 0`,width:`min(calc(${pe(250)}), 34vw)`,height:`max(44px, calc(${pe(56)}))`}}),(0,z.jsxs)(`div`,{className:`grid grid-cols-3 grid-rows-3`,style:ye(O?`top left`:`left center`,j(`left`)),children:[(0,z.jsx)(`span`,{}),se(`↑`,R.UP,0),(0,z.jsx)(`span`,{}),se(`←`,R.LEFT,-90),(0,z.jsx)(`span`,{}),se(`→`,R.RIGHT,90),(0,z.jsx)(`span`,{}),se(`↓`,R.DOWN,180),(0,z.jsx)(`span`,{})]}),(0,z.jsxs)(`div`,{className:`grid grid-cols-3 grid-rows-3`,style:ye(O?`top right`:`right center`,j(`right`)),children:[(0,z.jsx)(`span`,{}),ce(`△`,R.TRIANGLE,(0,z.jsx)(`path`,{d:`M26 16.5 L35 32 L17 32 Z`})),(0,z.jsx)(`span`,{}),ce(`□`,R.SQUARE,(0,z.jsx)(`rect`,{x:`18`,y:`18`,width:`16`,height:`16`,rx:`1`})),(0,z.jsx)(`span`,{}),ce(`○`,R.CIRCLE,(0,z.jsx)(`circle`,{cx:`26`,cy:`26`,r:`8.5`})),(0,z.jsx)(`span`,{}),ce(`✕`,R.CROSS,(0,z.jsx)(`path`,{d:`M19 19 L33 33 M33 19 L19 33`})),(0,z.jsx)(`span`,{})]}),(0,z.jsx)(`div`,{style:ye(`bottom left`,xe(`left`)),children:de(`l`)}),(0,z.jsx)(`div`,{style:ye(`bottom right`,xe(`right`)),children:de(`r`)}),(0,z.jsx)(`div`,{style:ye(`bottom left`,{bottom:he,left:k}),children:le(`Create`,R.SHARE)}),(0,z.jsx)(`div`,{style:ye(`bottom right`,{bottom:he,right:me}),children:le(`Options`,R.OPTIONS)}),(0,z.jsx)(`div`,{style:ye(`bottom center`,{bottom:be?_e(he,124,88):_e(he,Se?48:0,48),left:Ds,translate:`-50% 0`}),children:ue(`PS`,R.PS)})]}),Se&&(0,z.jsx)(`div`,{style:{...ye(`bottom center`,{bottom:he,left:`calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2)`,translate:`-50% 0`}),opacity:Math.max(.7,ys(n))},children:(0,z.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),a?.()},onDoubleClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),"aria-label":o(`rp_menu`,void 0,`Menu`),"aria-haspopup":`dialog`,className:`${te} h-[44px] w-[56px]`,style:ne,"data-testid":`rp-menu-handle`,children:(0,z.jsx)(`span`,{className:`flex h-[26px] w-[44px] items-center justify-center rounded-full ${w} ${C(!1)}`,children:(0,z.jsx)(ve,{size:15,strokeWidth:2,"aria-hidden":!0})})})})]})}var js=`data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAYZbW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAfQAAAfQAAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAmt0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAfQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAABAAAAAQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAH0AAAAAAAABAAAAAAHjbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAABAAAABAABVxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAABjm1pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAU5zdGJsAAAAunN0c2QAAAAAAAAAAQAAAKphdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABAAEABIAAAASAAAAAAAAAABFExhdmM2My4xLjEwMiBsaWJ4MjY0AAAAAAAAAAAAAAAAGP//AAAAMGF2Y0MBQsAK/+EAF2dCwAqmEXsBEAAAAwAQAAADACDxImEYAQAGaMhCAZSyAAAAEHBhc3AAAAABAAAAAQAAABRidHJ0AAAAAAAABUAAAAAAAAAAGHN0dHMAAAAAAAAAAQAAAAQAAEAAAAAAFHN0c3MAAAAAAAAAAQAAAAEAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAJHN0c3oAAAAAAAAAAAAAAAQAAAKCAAAACgAAAAoAAAAKAAAAIHN0Y28AAAAAAAAABAAABlwAAAj+AAAJKAAACVIAAALZdHJhawAAAFx0a2hkAAAAAwAAAAAAAAAAAAAAAgAAAAAAAH0AAAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAB9AAAABAAAAQAAAAACUW1kaWEAAAAgbWRoZAAAAAAAAAAAAAAAAAAAH0AAAIEAVcQAAAAAAC1oZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU291bmRIYW5kbGVyAAAAAfxtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAcBzdGJsAAAAfnN0c2QAAAAAAAAAAQAAAG5tcDRhAAAAAAAAAAEAAAAAAAAAAAABABAAAAAAH0AAAAAAADZlc2RzAAAAAAOAgIAlAAIABICAgBdAFQAAAAAAH0AAAAEcBYCAgAUViFblAAaAgIABAgAAABRidHJ0AAAAAAAAH0AAAAEcAAAAIHN0dHMAAAAAAAAAAgAAACAAAAQAAAAAAQAAAQAAAAAoc3RzYwAAAAAAAAACAAAAAQAAAAEAAAABAAAAAgAAAAgAAAABAAAAmHN0c3oAAAAAAAAAAAAAACEAAAATAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAkc3RjbwAAAAAAAAAFAAAGSQAACN4AAAkIAAAJMgAACVwAAAAac2dwZAEAAAByb2xsAAAAAgAAAAH//wAAABxzYmdwAAAAAHJvbGwAAAABAAAAIQAAAAEAAABhdWR0YQAAAFltZXRhAAAAAAAAACFoZGxyAAAAAAAAAABtZGlyYXBwbAAAAAAAAAAAAAAAACxpbHN0AAAAJKl0b28AAAAcZGF0YQAAAAEAAAAATGF2ZjYzLjEuMTAyAAAACGZyZWUAAAM7bWRhdNwATGF2YzYzLjEuMTAyAAIwQA4AAAJvBgX//2vcRem95tlIt5Ys2CDZI+7veDI2NCAtIGNvcmUgMTY1IHIzMjIyIGIzNTYwNWEgLSBILjI2NC9NUEVHLTQgQVZDIGNvZGVjIC0gQ29weWxlZnQgMjAwMy0yMDI1IC0gaHR0cDovL3d3dy52aWRlb2xhbi5vcmcveDI2NC5odG1sIC0gb3B0aW9uczogY2FiYWM9MCByZWY9MTYgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDEzMSBtZT11bWggc3VibWU9MTAgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0yNCBjaHJvbWFfbWU9MSB0cmVsbGlzPTIgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz0xIGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTQga2V5aW50X21pbj0xIHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NCByYz1jcmYgbWJ0cmVlPTEgY3JmPTUxLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IGlwX3JhdGlvPTEuNDAgYXE9MToxLjAwAIAAAAALZYiCAv5MUAAQv8ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmhwF/UABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmioBb1ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmjsBX1ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBw==`,Ms=null,Ns=null;function Ps(e){e.play().catch(()=>{if(Ns||Ms!==e)return;let t=()=>{Fs(),Ms===e&&e.play().catch(()=>{})};window.addEventListener(`pointerdown`,t,{capture:!0}),Ns=()=>window.removeEventListener(`pointerdown`,t,{capture:!0})})}function Fs(){Ns?.(),Ns=null}function Is(){if(typeof document<`u`){if(!Ms){let e=document.createElement(`video`);e.muted=!0,e.loop=!0,e.playsInline=!0,e.setAttribute(`playsinline`,``),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`data-testid`,`keep-screen-video`),e.style.cssText=`position:fixed;left:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none`,e.src=js,document.body.appendChild(e),Ms=e}Ps(Ms)}}function Ls(){Fs(),Ms&&=(Ms.pause(),Ms.removeAttribute(`src`),Ms.remove(),null)}function Rs(){return typeof navigator>`u`?null:navigator.wakeLock??null}function zs(){return dt()||!Pn()}var Bs=new Set,Vs=null,Hs=Promise.resolve(),Us=!1;async function Ws(){if(Bs.size===0||Vs&&!Vs.released)return;let e=Rs();if(!e)dt()&&Is();else try{let t=await e.request(`screen`);t.addEventListener(`release`,()=>{Vs===t&&(Vs=null)}),Vs=t}catch{}}async function Gs(){Ls();let e=Vs;if(Vs=null,e&&!e.released)try{await e.release()}catch{}}function Ks(){Us||typeof document>`u`||(Us=!0,document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&Bs.size>0&&(Hs=Hs.then(Ws))}))}function qs(e,t){if(!zs())return;Ks();let n=Bs.size>0;t?Bs.add(e):Bs.delete(e);let r=Bs.size>0;n!==r&&(Hs=Hs.then(r?Ws:Gs))}var Js=new Set;function Ys(){if(typeof window<`u`)return window.PS5UploadPad}function Xs(e,t){let n=Js.size>0;t?Js.add(e):Js.delete(e);let r=Js.size>0;if(n!==r)try{Ys()?.setActive(r)}catch{}}var Zs=class e{constructor(e){this.receiver=e,this.last=null,this.was={}}get frames(){return Number(this.last?.frames??0)}static report(e,t){let n=t=>e[t]??0,r=e=>n(e)-(t[e]??0),i=(e,t)=>r(t)>0?Math.round(r(e)/r(t)*1e4)/10:0;return{frames:n(`framesDecoded`),dropped:n(`framesDropped`),stalls:n(`freezeCount`),stall_ms:Math.round(n(`totalFreezesDuration`)*1e3),decode_ms:i(`totalDecodeTime`,`framesDecoded`),jitter_ms:i(`jitterBufferDelay`,`jitterBufferEmittedCount`),nacks:n(`nackCount`),plis:n(`pliCount`),decoder:`track`}}snapshot(){return this.receiver.getStats().then(t=>{t.forEach(t=>{t.type===`inbound-rtp`&&t.kind===`video`&&(this.last=e.report(t,this.was),this.was={...t})})}).catch(()=>{}),this.last}},Qs=class{constructor(e){this.inner=e,this.video=document.createElement(`video`),this.wrap=document.createElement(`div`),this.media=null,this.trackStats=null,this.audio=!1,this.soundOn=!1,this.muted=!1;let t=this.video;t.muted=t.autoplay=t.playsInline=!0,t.className=`block h-full w-full object-contain`,t.dataset.testid=`track-video`,this.wrap.className=`h-full w-full`,this.wrap.append(t,e.element),this.setTrack(null)}get element(){return this.wrap}get stats(){return this.trackStats??this.inner.stats}setTrack(e,t=!1){this.media=e,this.audio=!!e&&t,this.applySound(),this.trackStats=e?new Zs(e.receiver):null,this.video.style.display=e?``:`none`,this.inner.element.style.display=e?`none`:``,this.video.srcObject!==(e?.stream??null)&&(this.video.srcObject=e?.stream??null),e&&this.play()}play(){try{this.video.play()?.catch?.(()=>{})}catch{}}onMessage(e){let t=new Uint8Array(e)[0];this.media&&t<=1||(!this.audio||t!==3&&t!==4)&&this.inner.onMessage(e)}applySound(){this.video.muted=!(this.audio&&this.soundOn&&!this.muted)}setHevc(e){this.inner.setHevc(e)}set onSoundFail(e){this.inner.onSoundFail=e}soundReport(){return this.inner.soundReport()}startSound(){this.inner.startSound(),this.soundOn=!0,this.applySound(),this.media&&this.play()}setMuted(e){this.inner.setMuted(e),this.muted=e,this.applySound()}resumeSound(){this.inner.resumeSound(),this.media&&this.video.paused&&this.play()}stop(){this.inner.stop(),this.video.srcObject=null}},$s=`ps5upload.join.muted`,ec=5e3,tc=Object.fromEntries(Object.entries(Na).filter(([e])=>e!==`Escape`)),nc=new Set;function rc(e){if(!(e.code in tc)||e.ctrlKey||e.metaKey||e.altKey)return!1;let t=e.target;if(e.code===`Tab`&&(e.shiftKey||ic(t)))return!1;let n=t?.tagName;return!(n===`INPUT`||n===`TEXTAREA`||n===`SELECT`||t?.isContentEditable||ic(t))}function ic(e){let t=e?.tagName;if(t===`BUTTON`||t===`A`)return!0;let n=e?.getAttribute?.(`role`);return n===`button`||n===`link`||n===`menuitem`||n===`tab`||n===`switch`}var ac=!1;function oc(e){ac=e}function sc(e,t,n=null){if(!e||e.frames===0&&!t)return null;let r=e.snapshot();return r&&{...r,...t?{problem:t}:{},...n??{}}}function cc(){if(ac)return{...ja};let e=Ga(Xa(typeof navigator>`u`?void 0:navigator),So),t=gs.touchPad;return{...Ka(Ka(e,Fa(nc,tc)),t),touch:t.touch??null,motion:gs.motion??null}}var lc=class{constructor(e){this.opts=e,this.player=null,this.listeners=new Set,this.cleanups=[],this.subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e)),this.snap={stage:{kind:`connecting`},status:null,rttMs:null,light:null,problem:null,sound:!1,noSound:!1,host:e.host,muted:dc(),path:null},this.client=new zo({url:e.url,invite:e.invite,code:e.code??null,name:e.name,WebSocketImpl:e.transport,readPad:cc,onStage:e=>{this.set({stage:e}),e.kind===`joined`&&this.readPath(),(e.kind===`refused`||e.kind===`ended`)&&this.teardown()},onStatus:e=>this.set({status:e,host:e.host??this.snap.host}),onRtt:e=>this.set({rttMs:e}),onFrame:e=>this.picture().onMessage(e),readStats:()=>sc(this.player?.stats??null,this.snap.problem,this.player?.soundReport()??null),onCodec:(e,t,n)=>{let r=this.picture();r.setHevc(e),r instanceof Qs&&(r.setTrack(t,!!n),t&&this.snap.problem&&this.set({problem:null}))},onRumble:(e,t)=>{let n=Xa(typeof navigator>`u`?void 0:navigator);qa(n,e,t),n.some(e=>e?.connected)||navigator.vibrate?.(e||t?200:0)},onLight:e=>this.set({light:e})})}picture(){if(!this.player){let e=oa(e=>this.set({problem:e}),`player`,()=>this.client.askKeyframe());this.player=this.opts.transport?new Qs(e):e,this.player.onSoundFail=()=>this.set({noSound:!0}),this.player.setMuted(this.snap.muted)}return this.player}async readPath(){let e=this.client.socket,t=this.opts.path??null;if(e?.netPath)try{t=await e.netPath()??this.opts.path??null}catch{t=null}t!==this.snap.path&&this.set({path:t})}get element(){return this.picture().element}start(){let e=()=>{document.visibilityState===`hidden`?nc.clear():this.player?.resumeSound(),this.client.setNeutral(document.visibilityState===`hidden`)},t=()=>{nc.clear(),this.client.setNeutral(!0)},n=e=>{this.client.current.kind===`joined`&&rc(e)&&(!this.opts.keysLive||this.opts.keysLive())&&(e.preventDefault(),nc.add(e.code))},r=e=>{nc.delete(e.code)&&rc(e)&&e.preventDefault()};window.addEventListener(`keydown`,n),window.addEventListener(`keyup`,r);let i=()=>{this.client.setNeutral(document.visibilityState===`hidden`),document.visibilityState!==`hidden`&&this.player?.resumeSound()};document.addEventListener(`visibilitychange`,e),window.addEventListener(`blur`,t),window.addEventListener(`focus`,i);let a=setInterval(()=>{this.client.current.kind===`joined`&&this.readPath()},ec);this.cleanups.push(()=>{clearInterval(a),document.removeEventListener(`visibilitychange`,e),window.removeEventListener(`blur`,t),window.removeEventListener(`focus`,i),window.removeEventListener(`keydown`,n),window.removeEventListener(`keyup`,r),nc.clear()}),this.client.start()}setMuted(e){this.player?.setMuted(e);try{localStorage.setItem($s,e?`1`:`0`)}catch{}this.set({muted:e})}startSound(){this.snap.sound||(this.picture().startSound(),this.set({sound:!0}))}leave(){this.client.leave(),this.teardown()}stop(){this.client.stop(),this.teardown()}teardown(){for(let e of this.cleanups.splice(0))e();gs.touchPad={buttons:0,l2:0,r2:0,lx:0,ly:0,rx:0,ry:0};let e=this.player;this.player=null,e&&(e.stop(),e.element.remove())}sendPad(){this.client.sendPad(!1)}get snapshot(){return this.snap}set(e){this.snap={...this.snap,...e};for(let e of this.listeners)e()}};function uc(e){return(0,D.useSyncExternalStore)(e.subscribe,()=>e.snapshot)}function dc(){try{return typeof localStorage<`u`&&localStorage.getItem($s)===`1`}catch{return!1}}function fc(e){let t=()=>{let t=e.snapshot.stage.kind,n=t!==`refused`&&t!==`ended`;qs(`play-together`,n),Xs(`play-together`,n)};t();let n=e.subscribe(t);return()=>{n(),qs(`play-together`,!1),Xs(`play-together`,!1)}}var pc=3e3,mc=class{constructor(e,t=pc){this.onChange=e,this.delay=t,this.enabled=!1,this.pinned=!1,this.sticky=!1,this.shown=!0,this.timer=null}get visible(){return!this.enabled||this.pinned||this.shown}set(e,t,n=!1){let r=this.enabled&&!this.pinned,i=this.enabled,a=this.sticky;this.enabled=e,this.pinned=t,this.sticky=n,!e||t?(this.stop(),this.show(!0)):n?(this.stop(),!i||!a?this.show(!1):r||this.show(!0)):(!r||a)&&(this.show(!0),this.arm())}poke(){this.show(!0),this.enabled&&!this.pinned&&!this.sticky&&this.arm()}toggle(){this.visible?this.hide():this.poke()}hide(){this.enabled&&!this.pinned&&(this.stop(),this.show(!1))}dispose(){this.stop()}arm(){this.stop(),this.timer=setTimeout(()=>{this.timer=null,this.show(!1)},this.delay)}stop(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}show(e){this.shown!==e&&(this.shown=e,this.onChange(e))}};function hc(e,t,n=!1){let[r,i]=(0,D.useState)(!0),a=(0,D.useRef)(null);(0,D.useEffect)(()=>{let e=new mc(i);return a.current=e,()=>{e.dispose(),a.current=null}},[]),(0,D.useEffect)(()=>{a.current?.set(e,t,n)},[e,t,n]);let o=(0,D.useCallback)(()=>a.current?.poke(),[]),s=(0,D.useCallback)(()=>a.current?.hide(),[]),c=(0,D.useCallback)(()=>a.current?.toggle(),[]);return{shown:!e||t||r,poke:o,hide:s,toggle:c}}var gc=3e4,_c=class{constructor(e,t=gc){this.onChange=e,this.ms=t,this.picking=!1,this.over=!1,this.timer=null}get shown(){return this.picking&&!this.over}set(e){e!==this.picking&&(this.picking=e,this.over=!1,this.stop(),e&&(this.timer=setTimeout(()=>{this.timer=null,this.over=!0,this.onChange()},this.ms)))}stop(){this.timer&&clearTimeout(this.timer),this.timer=null}reset(){this.stop(),this.picking=!1,this.over=!1}};function vc(e){let[,t]=(0,D.useState)(0),[n]=(0,D.useState)(()=>new _c(()=>t(e=>e+1)));return(0,D.useEffect)(()=>{n.set(e),t(e=>e+1)},[n,e]),(0,D.useEffect)(()=>()=>n.reset(),[n]),n.shown}var yc=()=>Xa(typeof navigator>`u`?void 0:navigator).filter(e=>!!e?.connected);function bc(e,t){if(t.kind===`axis`)return t.which===`lx`?e(`rp_pad_step_lx`,void 0,`Push the left stick right`):t.which===`ly`?e(`rp_pad_step_ly`,void 0,`Push the left stick down`):t.which===`rx`?e(`rp_pad_step_rx`,void 0,`Push the right stick right`):e(`rp_pad_step_ry`,void 0,`Push the right stick down`);if(t.kind===`button`){if(t.bit===R.CROSS)return e(`join_check_bottom`,void 0,`Press the bottom face button (✕)`);if(t.bit===R.CIRCLE)return e(`join_check_right`,void 0,`Press the right face button (○)`);if(t.bit===R.SQUARE)return e(`join_check_left`,void 0,`Press the left face button (□)`);if(t.bit===R.TRIANGLE)return e(`join_check_top`,void 0,`Press the top face button (△)`)}return e(`rp_pad_press`,{name:t.name},`Press ${t.name}`)}function xc(e,t){let n=(0,D.useRef)(t);(0,D.useEffect)(()=>{n.current=t}),(0,D.useEffect)(()=>{if(e===null)return;let t=0,r=()=>{n.current(yc().find(t=>t.index===e)??null),t=window.requestAnimationFrame(r)};return t=window.requestAnimationFrame(r),()=>window.cancelAnimationFrame(t)},[e])}var Sc=[[R.CROSS,`✕`],[R.CIRCLE,`○`],[R.SQUARE,`□`],[R.TRIANGLE,`△`],[R.UP,`↑`],[R.DOWN,`↓`],[R.LEFT,`←`],[R.RIGHT,`→`],[R.L1,`L1`],[R.R1,`R1`],[R.L3,`L3`],[R.R3,`R3`],[R.SHARE,`Create`],[R.OPTIONS,`Options`],[R.PS,`PS`],[R.TOUCHPAD,`Touchpad`]];function Cc({pad:e}){let t=e=>`flex h-8 min-w-8 items-center justify-center rounded-md px-1.5 text-xs font-medium ${e?`bg-white text-black`:`bg-white/10 text-white/70`}`,n=(e,t,n)=>(0,z.jsxs)(`span`,{className:`relative flex h-12 w-12 items-center justify-center rounded-full bg-white/10 text-[10px] text-white/50`,children:[n,(0,z.jsx)(`span`,{className:`absolute h-3 w-3 rounded-full bg-white`,style:{left:`calc(50% + ${e/32767*18}px - 6px)`,top:`calc(50% + ${t/32767*18}px - 6px)`}})]});return(0,z.jsxs)(`div`,{className:`space-y-2`,"data-testid":`join-pad-test`,"data-buttons":e.buttons,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[Sc.map(([n,r])=>(0,z.jsx)(`span`,{className:t((e.buttons&n)!==0),"data-on":(e.buttons&n)===0?`0`:`1`,children:r},n)),(0,z.jsx)(`span`,{className:t(e.l2>30),children:`L2`}),(0,z.jsx)(`span`,{className:t(e.r2>30),children:`R2`})]}),(0,z.jsxs)(`div`,{className:`flex gap-3`,children:[n(e.lx,e.ly,`L`),n(e.rx,e.ry,`R`)]})]})}function wc({onClose:e}){let t=Ie(),[n,r]=(0,D.useState)(()=>yc().map(e=>({index:e.index,id:e.id}))),[i,a]=(0,D.useState)(()=>yc()[0]?.index??null),[o,s]=(0,D.useState)(ja),[c,l]=(0,D.useState)(null),[u,d]=(0,D.useState)(0),[f,p]=(0,D.useState)(yo),[m,h]=(0,D.useState)(null),[g,_]=(0,D.useState)(null),v=(0,D.useRef)(null);(0,D.useEffect)(()=>(oc(!0),()=>oc(!1)),[]),(0,D.useEffect)(()=>{(v.current?.querySelector(`[data-testid="join-pad-learn-start"]`)??v.current?.querySelector(`[data-testid="join-pad-check-close"]`))?.focus({preventScroll:!0})},[]),(0,D.useEffect)(()=>{let e=document.activeElement;e&&e!==document.body||v.current?.querySelector(`button:not([disabled])`)?.focus({preventScroll:!0})},[c,u]),(0,D.useEffect)(()=>{let e=()=>{let e=yc();r(t=>t.length===e.length&&t.every((t,n)=>t.id===e[n].id&&t.index===e[n].index)?t:e.map(e=>({index:e.index,id:e.id}))),a(t=>t!==null&&e.some(e=>e.index===t)?t:e[0]?.index??null)},t=window.setInterval(e,500);return window.addEventListener(`gamepadconnected`,e),window.addEventListener(`gamepaddisconnected`,e),()=>{window.clearInterval(t),window.removeEventListener(`gamepadconnected`,e),window.removeEventListener(`gamepaddisconnected`,e)}},[]),xc(i,e=>{if(_(t=>t?.id===e?.id?t:e),!e)return;if(c){c.feed(Eo(e))&&y(c,e);return}let t=Ga([e],So);s(e=>e.buttons===t.buttons&&e.l2===t.l2&&e.r2===t.r2&&e.lx===t.lx&&e.ly===t.ly&&e.rx===t.rx&&e.ry===t.ry?e:t)});let y=(e,n)=>{if(!e.done)return d(e.step);let r=n?.id??g?.id;l(null),r&&(p(bo(r,e.profile(n?wo(n):void 0))),h(t(`join_check_saved`,void 0,`Saved for this controller on this device. Try it below.`)))},b=()=>{h(null),d(0),l(new Fo(No))},x=g,S=x?Co(x):null,ee=!!(x&&f[x.id]);return(0,z.jsx)(`div`,{ref:v,role:`dialog`,"aria-modal":`true`,"aria-label":t(`join_check_title`,void 0,`Check your controller`),className:`absolute inset-0 z-40 flex items-center justify-center bg-black/70 p-4 backdrop-blur-sm`,"data-testid":`join-pad-check`,onPointerDown:e=>e.stopPropagation(),children:(0,z.jsxs)(`div`,{className:`w-[min(26rem,100%)] space-y-3 rounded-2xl border border-white/10 bg-neutral-900/95 p-4 text-sm text-white shadow-2xl`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(me,{size:16,className:`text-white/70`}),(0,z.jsx)(`p`,{className:`flex-1 font-semibold`,children:t(`join_check_title`,void 0,`Check your controller`)}),(0,z.jsx)(`button`,{type:`button`,onClick:e,"aria-label":t(`join_done`,void 0,`Done`),className:`flex h-8 w-8 items-center justify-center rounded-full bg-white/10 hover:bg-white/20`,"data-testid":`join-pad-check-close`,children:(0,z.jsx)(De,{size:15})})]}),x?(0,z.jsxs)(z.Fragment,{children:[n.length>1&&(0,z.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:n.map(e=>(0,z.jsx)(`button`,{type:`button`,disabled:!!c,onClick:()=>a(e.index),className:`rounded-full px-2.5 py-1 text-xs ${e.index===i?`bg-white text-black`:`bg-white/10`}`,children:to(e.id)},`${e.index}-${e.id}`))}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`truncate font-medium`,"data-testid":`join-pad-check-name`,children:to(x.id)}),(0,z.jsx)(`p`,{className:`text-xs text-white/60`,"data-testid":`join-pad-check-kind`,"data-kind":S??``,children:S===`saved`?t(`rp_pad_mapped`,void 0,`Plays with your mapping`):S===`guess`?t(`join_check_unknown`,void 0,`This controller isn't on our list, so its buttons may be mixed up. Setting it up takes a few seconds.`):t(`rp_pad_standard`,void 0,`Recognized`)}),io(x)&&(0,z.jsx)(ms,{id:x.id,className:`mt-1 block text-xs text-amber-200/90`})]}),c?(0,z.jsxs)(`div`,{className:`space-y-3`,"data-testid":`join-pad-learn`,children:[(0,z.jsx)(`p`,{className:`text-xs text-white/60`,children:t(`rp_pad_progress`,{n:u+1,total:c.steps.length},`${u+1} of ${c.steps.length}`)}),(0,z.jsx)(`p`,{className:`text-lg font-semibold`,"data-testid":`join-pad-learn-step`,children:c.current?bc(t,c.current):``}),(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:()=>{c.skip(),y(c,x)},className:`rounded-full bg-white/15 px-3 py-1.5 text-xs hover:bg-white/25`,"data-testid":`join-pad-learn-skip`,children:t(`rp_pad_skip`,void 0,`Skip`)}),u>0&&(0,z.jsx)(`button`,{type:`button`,onClick:()=>{c.back(),d(c.step)},className:`rounded-full bg-white/15 px-3 py-1.5 text-xs hover:bg-white/25`,children:t(`rp_pad_back`,void 0,`Back`)}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>l(null),className:`rounded-full px-3 py-1.5 text-xs text-white/70 hover:bg-white/10`,children:t(`rp_pad_cancel`,void 0,`Cancel`)})]})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`text-xs text-white/60`,children:t(`join_check_try`,void 0,`Press buttons and move the sticks: what you press lights up.`)}),(0,z.jsx)(Cc,{pad:o}),m&&(0,z.jsx)(`p`,{className:`text-xs text-emerald-300`,role:`status`,children:m}),(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:b,className:`rounded-full bg-white px-3 py-1.5 text-xs font-medium text-black`,"data-testid":`join-pad-learn-start`,children:ee?t(`join_check_redo`,void 0,`Redo`):t(`join_check_map`,void 0,`Set up the buttons`)}),ee&&(0,z.jsx)(`button`,{type:`button`,onClick:()=>{p(bo(x.id,null)),h(null)},className:`rounded-full bg-white/15 px-3 py-1.5 text-xs hover:bg-white/25`,"data-testid":`join-pad-reset`,children:t(`rp_pad_reset`,void 0,`Reset`)}),(0,z.jsx)(`button`,{type:`button`,onClick:e,className:`rounded-full bg-white/15 px-3 py-1.5 text-xs hover:bg-white/25`,"data-testid":`join-pad-check-done`,children:t(`join_done`,void 0,`Done`)})]})]})]}):(0,z.jsx)(`p`,{className:`text-white/70`,children:t(`rp_pads_none`,void 0,`No controller seen yet. Connect one and press any button on it.`)})]})})}function Tc(e,t){let[n,r]=(0,D.useState)(!1);return(0,D.useEffect)(()=>{if(!e||!t)return;let n=!0;return Be(e,Le).then(e=>{n&&!e&&r(!0)}),()=>{n=!1}},[e,t]),n}function Ec({href:e}){let t=Ie();return(0,z.jsxs)(`div`,{className:`flex flex-col items-center gap-3 text-center`,"data-testid":`open-on-wifi`,children:[(0,z.jsx)(`p`,{className:`max-w-sm text-sm text-white/60`,children:t(`join_open_lan_body`,void 0,`Can't reach the internet? If you're on the same Wi-Fi as your friend, open the game there.`)}),(0,z.jsx)(`a`,{href:e,rel:`noreferrer`,className:`rounded-full bg-white px-4 py-2 text-sm font-medium text-black`,"data-testid":`open-on-wifi-link`,children:t(`join_open_lan`,void 0,`Open on this Wi-Fi`)})]})}function Dc(e){let t=Math.max(0,Math.ceil(e));return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`}var Oc=`ps5upload.join.guided`,kc=1;function Ac(e){return e.player!==kc&&(!e.guided||e.movedOff)&&!e.reconnecting}function jc(e,t){switch(t){case`lan`:return e(`join_path_lan`,void 0,`Home network`);case`tailscale`:return e(`join_path_tailscale`,void 0,`Tailscale`);default:return e(`join_path_internet`,void 0,`Internet`)}}function Mc(e,t){return e(`join_seat_taken`,{host:t},`${t} needed their controller back and no other controller was free on the PS5, so you're out of the game. Ask ${t} to let you in again.`)}function Nc(e,t,n,r=!1){if(t.kind===`refused`)switch(t.why){case`key`:return e(`join_refused_key`,{host:n},`This invite has expired. Ask ${n} for a new link.`);case`expired`:return e(`join_refused_expired`,{host:n},`Your place in the game was lost. Ask ${n} to let you in again.`);case`full`:return e(`join_refused_full`,void 0,`The game is full: four players already.`);case`denied`:return e(`join_refused_denied`,{host:n},`${n} didn't let you in this time.`);case`no_answer`:return e(`join_refused_no_answer`,{host:n},`${n} didn't answer in time. Tell ${n}, then try again.`);case`closed`:return e(`join_refused_closed`,{host:n},`${n} isn't hosting Play Together right now.`);case`old_helper`:return e(`join_refused_old_helper`,{host:n},`${n}'s PS5 needs an updated helper for Play Together.`);case`not_playing`:return e(`join_refused_not_playing`,{host:n},`${n} isn't playing right now. Ask ${n} to start Play first.`);case`unreachable`:return e(`join_refused_unreachable`,{host:n},`${n}'s computer couldn't reach their PS5. Try again in a moment.`);case`slow_down`:return e(`join_refused_slow_down`,void 0,`Too many wrong codes. Wait a minute, then try again.`);case`address`:return e(`join_refused_address`,{host:n},`This link's address is outside your home network, so the app will not use it. Ask ${n} for a link with their computer's IP address.`);case`seat_taken`:return Mc(e,n);default:return e(`join_refused_other`,{host:n},`${n} didn't let you in.`)}if(t.kind===`ended`)switch(t.why){case`kicked`:return e(`join_ended_kicked`,{host:n},`${n} took you out of the game.`);case`closed`:return e(`join_ended_closed`,{host:n},`${n} closed Play Together.`);case`host_stopped`:return e(`join_ended_host_stopped`,void 0,`The host stopped playing.`);case`replaced`:return e(`join_ended_replaced`,void 0,`This game was opened in another tab or on another device, so it stopped here.`);case`pad_lost`:return e(`join_ended_pad_lost`,{host:n},`The PS5 lost your controller, so you're out of the game. Ask ${n} to let you in again.`);case`gave_up`:return e(`join_ended_gave_up`,{host:n},`The connection to ${n} didn't come back in time.`);case`lost`:return r?e(`join_net_lost`,{host:n},`The connection to ${n} dropped. Check your internet connection, then ask again.`):e(`join_ended_lost`,{host:n},`Couldn't reach ${n}. Check that you're on the same network.`);case`left`:return e(`join_ended_left`,void 0,`You left the game.`);case`seat_taken`:return Mc(e,n);case`mismatch`:return e(`join_net_mismatch`,void 0,`This link doesn't match the host; ask them for a new one.`);case`no_direct`:return e(`join_net_no_direct`,void 0,`A direct connection isn't possible from this network (both sides' routers are strict). Try Wi-Fi instead of mobile data, or ask the host to turn on UPnP.`);case`no_room`:return e(`join_net_no_room`,{host:n},`This invite isn't open any more. Ask ${n} for a new link.`);case`net_full`:return e(`join_net_full`,{host:n},`${n}'s game has no room for another friend right now. Try again in a moment.`);case`no_hub`:return e(`join_net_no_hub`,void 0,`Couldn't reach the PS5Upload invite service. Check your internet connection, then try again.`);case`offer`:return e(`join_net_offer`,{host:n},`${n}'s computer couldn't connect to this browser. Try another browser.`);case`no_webrtc`:return e(`join_net_no_webrtc`,void 0,`This browser can't make direct connections. Try a recent Chrome, Safari or Firefox.`)}return``}function Pc(e){let[t,n]=(0,D.useState)(()=>Date.now());return(0,D.useEffect)(()=>{if(!e)return;n(Date.now());let t=window.setInterval(()=>n(Date.now()),500);return()=>window.clearInterval(t)},[e]),t}function Fc(){let[e,t]=(0,D.useState)({ready:!1,pressed:!1,id:null,kind:null,weak8BitDo:!1});return(0,D.useEffect)(()=>{let e=()=>{let e=Xa(typeof navigator>`u`?void 0:navigator).find(e=>!!e?.connected),n=!!e,r=n?cc():null,i=!!r&&(r.buttons!==0||r.l2>30||r.r2>30),a=e?.id??null,o=e?Co(e):null,s=!!e&&io(e);t(e=>e.ready===n&&e.pressed===i&&e.id===a&&e.kind===o&&e.weak8BitDo===s?e:{ready:n,pressed:i,id:a,kind:o,weak8BitDo:s})};e();let n=window.setInterval(e,120);return window.addEventListener(`gamepadconnected`,e),window.addEventListener(`gamepaddisconnected`,e),()=>{window.clearInterval(n),window.removeEventListener(`gamepadconnected`,e),window.removeEventListener(`gamepaddisconnected`,e)}},[]),e}function Ic(e){return!!e?.closest?.(`[data-testid="rp-touch"]`)}var Lc=14,Rc=()=>typeof window<`u`&&!is()&&!!window.matchMedia?.(`(pointer: coarse)`).matches;function zc(e,t,n){return!e||e===t||e.closest?.(`[data-join-game]`)?`game`:n?.contains(e)?`controls`:`page`}function Bc(e){return e.checking?`close-check`:e.guide?`close-guide`:e.where===`game`?`show-controls`:e.full?`leave-full`:null}var Vc={good:`var(--color-good,#32d074)`,fair:`var(--color-warn,#ffb340)`,slow:`var(--color-bad,#ff6961)`,none:`rgba(255,255,255,.5)`};function Hc({text:e,body:t,onCancel:n}){let r=Ie();return(0,z.jsxs)(`div`,{className:`flex flex-col items-center gap-5 px-6 py-10 text-center`,"data-testid":`join-waiting`,children:[(0,z.jsxs)(`div`,{className:`relative flex h-24 w-24 items-center justify-center`,"aria-hidden":!0,children:[(0,z.jsx)(`span`,{className:`absolute inset-0 animate-ping rounded-full bg-white/10 [animation-duration:2.4s]`}),(0,z.jsx)(`span`,{className:`absolute inset-3 animate-pulse rounded-full bg-white/10 [animation-duration:2.4s]`}),(0,z.jsx)(`span`,{className:`relative flex h-14 w-14 items-center justify-center rounded-full bg-white/15`,children:(0,z.jsx)(Se,{size:26})})]}),(0,z.jsx)(`p`,{className:`max-w-sm text-base font-medium`,"data-testid":`join-stage`,children:e}),t&&(0,z.jsx)(`p`,{className:`max-w-sm text-sm text-white/60`,children:t}),(0,z.jsx)(`button`,{type:`button`,onClick:n,autoFocus:!0,className:`rounded-full bg-white/15 px-4 py-2 text-sm hover:bg-white/25`,"data-testid":`join-cancel`,children:r(`join_cancel`,void 0,`Cancel`)})]})}function Uc({session:e,inApp:t=!1,onLeave:n,onAgain:r,onFullscreen:i,lanUrl:a=null,hubDown:o=!1}){let s=Ie(),c=uc(e),{stage:l,status:u}=c,d=c.host??s(`join_host_fallback`,void 0,`your friend`),f=(0,D.useRef)(null),p=(0,D.useRef)(null),m=(0,D.useRef)(null),[h,g]=(0,D.useState)(!1),[_,v]=(0,D.useState)(()=>Lt(Oc)===`1`),[y,b]=(0,D.useState)(()=>typeof window<`u`&&window.innerHeight>window.innerWidth),x=Fc(),[S,ee]=(0,D.useState)(!1),C=l.kind===`reconnecting`,w=Pc(C),T=l.kind===`joined`||C,E=u?.state===`picking_user`,te=l.kind===`joined`||l.kind===`reconnecting`?l.player:0,[ne,re]=(0,D.useState)(!1),ie=(0,D.useRef)(te);(0,D.useEffect)(()=>{ie.current===kc&&te>kc&&re(!0),te&&(ie.current=te)},[te]);let[ae,oe]=(0,D.useState)(!1),[se,ce]=(0,D.useState)(!1),le=T&&(h||!t),de=Rc(),fe=vc(E),k=hc(le,C||fe&&!de||ae||se,de),{poke:he}=k,_e=(0,D.useRef)(null),ve=()=>{_e.current&&clearTimeout(_e.current.timer),_e.current=null};(0,D.useEffect)(()=>ve,[]);let[ye,A]=(0,D.useState)(!1),xe=(0,D.useRef)(!1);(0,D.useEffect)(()=>{if(!le||!de||k.shown||!_||xe.current)return;xe.current=!0,A(!0);let e=setTimeout(()=>A(!1),6e3);return()=>clearTimeout(e)},[le,de,k.shown,_]),(0,D.useEffect)(()=>{if(!T)return;let t=e.element;return f.current?.appendChild(t),()=>t.remove()},[T,e]),(0,D.useEffect)(()=>{if(!T||c.sound)return;let t=()=>e.startSound(),n=[`pointerup`,`touchend`,`click`,`keydown`];for(let e of n)window.addEventListener(e,t,!0);return()=>{for(let e of n)window.removeEventListener(e,t,!0)}},[T,c.sound,e]),(0,D.useEffect)(()=>{let e=()=>b(window.innerHeight>window.innerWidth);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,D.useEffect)(()=>{if(h)return()=>void i?.(!1)},[h,i]);let Ce=(0,D.useRef)(h);(0,D.useEffect)(()=>{Ce.current=h},[h]),(0,D.useEffect)(()=>{if(!t||!T||!Rc()||typeof window>`u`||!window.matchMedia)return;let e=window.matchMedia(`(orientation: landscape)`),n=()=>{e.matches&&!Ce.current&&(g(!0),i?.(!0))};return n(),e.addEventListener?.(`change`,n),()=>e.removeEventListener?.(`change`,n)},[t,T,i]),(0,D.useEffect)(()=>{t&&T&&is()&&!Ce.current&&(g(!0),i?.(!0))},[t,T,i]),(0,D.useEffect)(()=>{if(!T)return;let e=e=>{if(e.key!==`Escape`)return;if(S)return void Le.current();if(he(),h)return g(!1);let t=zc(document.activeElement,document.body,p.current);t===`game`?Le.current():t===`controls`&&m.current?.focus({preventScroll:!0})};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[T,h,he,S]),(0,D.useEffect)(()=>{if(!h||!Rc())return;window.history.pushState(window.history.state,``);let e=window.location.href,t=!1,n=()=>{t=!0,g(!1)};return window.addEventListener(`popstate`,n),()=>{window.removeEventListener(`popstate`,n),!t&&window.location.href===e&&window.history.back()}},[h]),(0,D.useEffect)(()=>{if(!h||typeof document>`u`)return;let e=()=>{document.fullscreenElement||Rc()||g(!1)};return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[h]);let Te=is(),Ee=T&&Ac({player:te,guided:_,movedOff:ne,reconnecting:C})&&!u?.playsAs,De=async e=>{g(e),await i?.(e)},Oe=()=>m.current?.focus({preventScroll:!0}),ke=()=>{It(Oc,`1`),v(!0),re(!1)},Ae=()=>{he();let e=C?`[data-testid="join-reconnecting-leave"]`:`[data-testid="join-bar"] button`;p.current?.querySelector(e)?.focus({preventScroll:!0})},je=()=>{let e=p.current?.querySelector(`[data-testid="join-check-open"]`);e?e.focus({preventScroll:!0}):Oe(),ee(!1)},Me=()=>zc(document.activeElement,document.body,p.current),[Ne,Pe]=(0,D.useState)(`game`);(0,D.useEffect)(()=>{if(!T)return;let e=()=>Pe(Me()),t=()=>window.setTimeout(e,0);return e(),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t)}},[T]);let Fe=()=>{switch(T?Bc({checking:S,guide:Ee,where:Me(),full:h}):null){case`close-check`:return je(),!0;case`close-guide`:return ke(),Oe(),!0;case`show-controls`:return Ae(),!0;case`leave-full`:return De(!1),!0;default:return!1}},Le=(0,D.useRef)(Fe);(0,D.useEffect)(()=>{Le.current=Fe});let Re=t&&!de&&T&&Bc({checking:S,guide:Ee,where:Ne,full:h})!==null;(0,D.useEffect)(()=>{if(Re)return Xo(()=>void Le.current())},[Re]);let ze=!t&&T&&!de;(0,D.useEffect)(()=>{if(!ze)return;let e=window.location.href;window.history.pushState(window.history.state,``);let t=!0,n=()=>{if(t=!1,!Le.current())return window.history.back();window.history.pushState(window.history.state,``),t=!0};return window.addEventListener(`popstate`,n),()=>{window.removeEventListener(`popstate`,n),t&&window.location.href===e&&window.history.back()}},[ze]);let Be=l.kind===`joined`;(0,D.useEffect)(()=>{if(!Be)return;let e=document.activeElement;if(e&&e!==document.body)return;let t=Te&&Ee?p.current?.querySelector(`[data-testid="join-guide-ok"]`):null;t?t.focus({preventScroll:!0}):Oe()},[Be]),(0,D.useEffect)(()=>{x.pressed&&T&&!S&&Me()===`controls`&&Oe()},[x.pressed]);let Ve=()=>{e.leave(),n()};if(l.kind===`connecting`||l.kind===`asking`)return(0,z.jsxs)(`div`,{className:t?`rounded-[var(--radius-card)] bg-neutral-900 text-white`:`flex min-h-[100dvh] flex-col items-center justify-center gap-4 bg-black text-white`,"data-join-ui":``,children:[l.kind===`connecting`&&o&&a&&(0,z.jsx)(Ec,{href:a}),(0,z.jsx)(Hc,{text:l.kind===`connecting`?s(`join_connecting`,{host:d},`Connecting to ${d}…`):s(`join_waiting`,{host:d},`Waiting for ${d} to let you in`),body:l.kind===`asking`?s(`join_waiting_body`,{host:d},`${d} sees your name on their screen and taps Allow.`):void 0,onCancel:Ve})]});if(l.kind===`refused`||l.kind===`ended`){let i=l.kind===`refused`||l.why!==`left`&&l.why!==`mismatch`;return(0,z.jsxs)(`div`,{className:t?`flex flex-col items-center gap-4 rounded-[var(--radius-card)] bg-neutral-900 px-6 py-10 text-center text-white`:`flex min-h-[100dvh] flex-col items-center justify-center gap-4 bg-black px-6 text-center text-white`,"data-testid":`join-ended`,"data-why":l.why,"data-join-ui":``,children:[(0,z.jsx)(Se,{size:28,className:`text-white/60`}),(0,z.jsx)(`p`,{className:`max-w-sm text-base`,"data-testid":`join-ended-text`,children:Nc(s,l,d,e.opts.internet??!!e.opts.transport)}),a&&l.why===`no_hub`&&(0,z.jsx)(Ec,{href:a}),(0,z.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[i&&(0,z.jsx)(`button`,{type:`button`,onClick:r,autoFocus:!0,className:`rounded-full bg-white px-4 py-2 text-sm font-medium text-black`,"data-testid":`join-again`,children:l.kind===`refused`&&l.why===`not_playing`?s(`join_retry`,void 0,`Try again`):s(`join_again`,void 0,`Ask to join again`)}),(0,z.jsx)(`button`,{type:`button`,onClick:n,autoFocus:!i,className:`rounded-full bg-white/15 px-4 py-2 text-sm`,"data-testid":`join-done`,children:s(`join_done`,void 0,`Done`)})]})]})}let He=l.player,Ue=c.light??at(He),We=c.rttMs??u?.rttMs??null,Ge=it(We),Ke=Rc(),qe=T&&!C&&!x.ready&&Ke&&(!t||h),Je=Ac({player:He,guided:_,movedOff:ne,reconnecting:C}),Ye=He===kc,Xe=u?.playsAs??null,Ze=C?(l.deadline-w)/1e3:0,Qe=()=>De(!h),$e=t&&!h&&Ke&&T,et=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`span`,{className:`flex items-center gap-1.5 rounded-full bg-black/60 px-2.5 py-1 font-medium`,"data-testid":`join-player`,children:[(0,z.jsx)(`span`,{className:`inline-block h-2.5 w-2.5 rounded-full`,style:{background:`rgb(${Ue[0]},${Ue[1]},${Ue[2]})`}}),t&&(0,z.jsxs)(`span`,{className:`text-white/80`,children:[s(`join_playing_at`,{host:d},`Playing at ${d}'s`),` · `]}),s(`join_you_are`,{n:He},`You are Player ${He}`)]}),We!=null&&(0,z.jsxs)(`span`,{className:`rounded-full bg-black/60 px-2 py-1 tabular-nums`,style:{color:Vc[Ge]},"data-testid":`join-delay`,"data-tone":Ge,"data-path":c.path??void 0,children:[c.path&&(0,z.jsxs)(`span`,{className:`text-white/80`,children:[jc(s,c.path),` · `]}),Math.round(We),` ms`]}),Ye&&(0,z.jsx)(`span`,{className:`rounded-full bg-black/60 px-2.5 py-1 text-white/85`,"data-testid":`join-seat-stream`,children:s(`join_seat_stream`,{host:d},`You're playing as ${d}'s PS5 user. No need to pick one.`)}),Xe&&!Ye&&(0,z.jsx)(`span`,{className:`rounded-full bg-black/60 px-2.5 py-1 text-white/85`,"data-testid":`join-plays-as`,children:s(`join_plays_as`,{profile:Xe},`You're playing as ${Xe}. No need to pick one.`)}),E&&!Ye&&u?.seatNote&&(0,z.jsx)(`span`,{className:`rounded-full bg-black/60 px-2.5 py-1 text-white/85`,"data-testid":`join-seat-note`,children:s(`join_seat_tv_asks`,{host:d},`${d} chose a profile for you, but it couldn't be used. The TV will ask who you are.`)}),E&&!Ye&&(0,z.jsx)(`span`,{className:`rounded-full bg-white/90 px-2.5 py-1 font-medium text-black`,"data-testid":`join-picking`,children:s(`join_picking`,void 0,`Press PS, then pick Quick Play on the TV`)})]}),tt=(0,z.jsxs)(z.Fragment,{children:[le&&de&&k.shown&&!C&&(0,z.jsxs)(`button`,{type:`button`,onClick:k.hide,className:`flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 font-medium`,"data-testid":`join-hide-controls`,children:[(0,z.jsx)(pe,{size:13}),s(`join_hide_controls`,void 0,`Hide`)]}),!c.sound&&(0,z.jsxs)(`button`,{type:`button`,onClick:()=>e.startSound(),className:`flex items-center gap-1 rounded-full bg-white/90 px-2.5 py-1 font-medium text-black`,"data-testid":`join-sound`,children:[(0,z.jsx)(we,{size:13}),s(`join_sound`,void 0,`Tap for sound`)]}),c.sound&&!c.noSound&&(0,z.jsxs)(`button`,{type:`button`,onClick:()=>e.setMuted(!c.muted),"aria-pressed":c.muted,className:`flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 hover:bg-white/25`,"data-testid":`join-mute`,children:[c.muted?(0,z.jsx)(M,{size:13}):(0,z.jsx)(we,{size:13}),c.muted?s(`rp_unmute`,void 0,`Sound on`):s(`rp_mute`,void 0,`Mute`)]}),c.noSound&&(0,z.jsxs)(`span`,{className:`flex items-center gap-1 rounded-full bg-black/60 px-2.5 py-1 text-white/80`,"data-testid":`join-no-sound`,children:[(0,z.jsx)(M,{size:13}),s(`join_no_sound`,void 0,`No sound in this browser`)]}),(t||typeof document<`u`&&!!document.documentElement.requestFullscreen)&&(0,z.jsx)(`button`,{type:`button`,onClick:()=>void Qe(),"aria-label":h?s(`join_exit_fullscreen`,void 0,`Leave full screen`):s(`pad_fill`,void 0,`Full screen`),className:`flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 hover:bg-white/25`,"data-testid":`join-full`,children:h?(0,z.jsx)(be,{size:13}):(0,z.jsx)(O,{size:13})}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>ee(!0),"aria-label":s(`join_check_title`,void 0,`Check your controller`),title:s(`join_check_title`,void 0,`Check your controller`),className:`flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 hover:bg-white/25`,"data-testid":`join-check-open`,children:(0,z.jsx)(me,{size:13})}),(0,z.jsxs)(`button`,{type:`button`,onClick:Ve,className:`flex items-center gap-1 rounded-full bg-[var(--color-danger,#dc2626)] px-3 py-1 font-medium`,"data-testid":`join-leave`,children:[(0,z.jsx)(ge,{size:13}),s(`join_leave`,void 0,`Leave`)]})]}),nt=k.shown?`opacity-100`:`pointer-events-none opacity-0`,rt={"data-testid":`join-bar`,"data-shown":k.shown?`1`:`0`,onFocus:e=>{(Te||e.target.matches?.(`:focus-visible`))&&ce(!0)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||ce(!1)},onPointerEnter:e=>{e.pointerType===`mouse`&&oe(!0)},onPointerLeave:()=>oe(!1)},ot=h||!t?`fixed inset-0 z-[200] bg-black`:`relative mx-auto aspect-video w-full max-w-[max(20rem,calc((100dvh_-_22rem)*16/9))] overflow-hidden rounded-[var(--radius-card)] bg-black shadow-[var(--shadow-2)]`,st=t&&h;return(0,z.jsxs)(`div`,{className:`space-y-2`,ref:p,"data-join-ui":``,children:[(0,z.jsxs)(`div`,{className:`${ot} select-none text-white [-webkit-touch-callout:none]`,style:{touchAction:`none`},role:st?`dialog`:void 0,"aria-modal":st?!0:void 0,"aria-label":st?s(`pad_fill`,void 0,`Full screen`):void 0,onPointerMove:e=>{if(e.pointerType===`mouse`)return he();let t=_e.current;t&&t.id===e.pointerId&&Math.hypot(e.clientX-t.x,e.clientY-t.y)>Lc&&ve()},onPointerDown:e=>{if(Ic(e.target))return;if(e.pointerType===`mouse`||!de)return he();if(e.target.closest?.(`[data-testid="join-bar"], button, a, input, [role="button"]`))return;ve();let{pointerId:t,clientX:n,clientY:r}=e;_e.current={id:t,x:n,y:r,timer:setTimeout(()=>{_e.current=null,navigator.vibrate?.(15),k.toggle()},450)}},onPointerUp:ve,onPointerCancel:ve,onPointerLeave:ve,"data-testid":`join-stage-view`,children:[(0,z.jsx)(`div`,{ref:f,className:`pointer-events-none absolute inset-0 z-0 flex items-center justify-center`,"aria-hidden":!0}),le&&!k.shown&&!C&&We!=null&&(0,z.jsxs)(`span`,{className:`pointer-events-none absolute z-10 rounded-full bg-black/40 px-1.5 py-0.5 text-[10px] leading-none tabular-nums`,style:{color:Vc[Ge],top:`max(0.5rem, env(safe-area-inset-top))`,right:`max(0.5rem, env(safe-area-inset-right))`},"data-testid":`join-delay-corner`,children:[Math.round(We),` ms`]}),qe?(0,z.jsxs)(`div`,{className:`absolute left-1/2 top-1/2 z-20 flex w-max max-w-[min(24rem,calc(100%-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col items-center gap-2 rounded-2xl bg-black/70 p-3 text-xs backdrop-blur-sm transition-opacity duration-300 ${nt}`,...rt,children:[(0,z.jsx)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:et}),(0,z.jsx)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:tt})]}):$e?null:(0,z.jsxs)(`div`,{className:`absolute inset-x-0 top-0 z-20 flex flex-wrap items-center gap-2 bg-gradient-to-b from-black/70 to-transparent px-3 pb-5 pt-[max(8px,env(safe-area-inset-top))] text-xs transition-opacity duration-300 ${nt}`,...rt,children:[et,(0,z.jsx)(`span`,{className:`flex-1`}),tt]}),!k.shown&&!qe&&(0,z.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),he()},"aria-label":s(`join_show_controls`,void 0,`Show controls`),className:`absolute left-1/2 top-[max(6px,env(safe-area-inset-top))] z-20 flex h-7 w-11 -translate-x-1/2 items-center justify-center rounded-full bg-black/40 text-white/70 opacity-60 hover:opacity-100 focus-visible:opacity-100`,"data-testid":`join-show-controls`,children:(0,z.jsx)(ue,{size:16,"aria-hidden":!0})}),ye&&!k.shown&&(0,z.jsx)(`p`,{className:`pointer-events-none absolute left-1/2 top-[max(10px,env(safe-area-inset-top))] z-20 -translate-x-1/2 rounded-full bg-black/60 px-3 py-1 text-xs text-white/85`,"data-testid":`join-hold-hint`,children:s(`join_hold_hint`,void 0,`Press and hold the picture to show the buttons`)}),c.problem&&(0,z.jsx)(`p`,{className:`absolute inset-x-4 top-1/2 z-10 -translate-y-1/2 text-center text-sm text-white/85`,"data-testid":`join-problem`,children:c.problem===`no_hevc`?s(`pad_watch_no_hevc`,void 0,`This device can't play this stream's picture: the computer streams HEVC, and this device plays only H.264.`):s(`pad_watch_decode`,void 0,`The picture could not be played here.`)}),S&&(0,z.jsx)(wc,{onClose:je}),qe&&(0,z.jsx)(As,{stream:e,layout:`overlay`,onMenu:()=>k.shown?k.hide():he()}),!qe&&!C&&(0,z.jsxs)(`div`,{className:`absolute bottom-3 left-3 z-20 flex items-center gap-2 rounded-2xl bg-black/70 px-3 py-1.5 text-xs transition-opacity duration-300 ${nt}`,"data-testid":`join-pad`,children:[(0,z.jsx)(me,{size:14,style:{color:x.pressed?`rgb(${Ue[0]},${Ue[1]},${Ue[2]})`:void 0}}),x.ready?(0,z.jsxs)(`span`,{className:`flex flex-col items-start gap-1`,children:[(0,z.jsx)(`span`,{children:s(`join_pad_ready`,void 0,`Your controller is ready`)}),x.weak8BitDo&&x.id&&(0,z.jsx)(ms,{id:x.id,className:`text-amber-200/90`}),x.kind===`guess`&&no()&&(0,z.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2 text-white/75`,"data-testid":`join-pad-unknown`,children:[s(`join_check_unknown_short`,void 0,`Not on our list: buttons may be mixed up.`),(0,z.jsx)(`button`,{type:`button`,onClick:()=>ee(!0),className:`rounded-full bg-white px-2.5 py-0.5 font-medium text-black`,"data-testid":`join-pad-unknown-check`,children:s(`join_check_title`,void 0,`Check your controller`)})]})]}):Ke&&t&&!h?s(`join_full_to_play`,void 0,`Tap full screen to play with the on-screen controller.`):(0,z.jsxs)(`span`,{className:`flex flex-col`,children:[(0,z.jsx)(`span`,{children:s(`join_pad_none`,void 0,`Connect a controller (USB or Bluetooth) and press any button.`)}),(0,z.jsx)(`span`,{className:`text-white/60`,"data-testid":`join-pad-keys`,children:s(`join_pad_keys`,void 0,`Or use the keyboard: WASD move, arrows D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.`)})]}),Te&&(0,z.jsx)(`span`,{className:`max-w-[14rem] border-l border-white/20 pl-2 text-white/70`,"data-testid":`join-tv-back`,children:s(`join_tv_back_hint`,void 0,`Press Back on the remote for the buttons.`)})]}),u?.blockSystem&&u.state===`playing`&&!qe&&(0,z.jsx)(`p`,{className:`absolute bottom-3 right-3 z-20 rounded-full bg-black/60 px-3 py-1 text-[11px] text-white/70 transition-opacity duration-300 ${nt}`,"data-testid":`join-blocked`,children:s(`join_block_note`,{host:d},`${d} turned off PS and Create for friends.`)}),fe&&!Ye&&de&&!k.shown&&!C&&(0,z.jsx)(`p`,{className:`pointer-events-none absolute left-1/2 top-2 z-20 -translate-x-1/2 whitespace-nowrap rounded-full bg-white/90 px-2.5 py-1 text-xs font-medium text-black`,"data-testid":`join-picking-note`,children:s(`join_picking`,void 0,`Press PS, then pick Quick Play on the TV`)}),Je&&!Xe&&(0,z.jsxs)(`div`,{className:`absolute bottom-14 left-1/2 z-30 w-[min(22rem,calc(100%-2rem))] -translate-x-1/2 rounded-2xl border border-white/10 bg-neutral-900/90 p-4 text-sm shadow-2xl backdrop-blur-md`,"data-testid":`join-guide`,children:[(0,z.jsx)(`p`,{className:`font-semibold`,children:s(`join_guide_title`,void 0,`One more step on the TV`)}),(0,z.jsx)(`p`,{className:`mt-1 text-white/75`,children:s(`join_guide_body`,void 0,`On your controller, press PS once. The TV asks "Who's using this controller?". Pick Quick Play or your own user. The host doesn't need to do anything.`)}),(0,z.jsx)(`p`,{className:`mt-1 text-white/60`,children:s(`join_guide_menus`,void 0,`On the PS5's home screen only the host controls the menus; your controller plays inside games.`)}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>{ke(),Oe()},className:`mt-3 rounded-full bg-white px-3 py-1 text-xs font-medium text-black`,"data-testid":`join-guide-ok`,children:s(`join_guide_ok`,void 0,`Got it`)})]}),C&&(0,z.jsxs)(`div`,{className:`absolute inset-0 z-30 flex flex-col items-center justify-center gap-3 bg-black/70 px-6 text-center`,"data-testid":`join-reconnecting`,children:[(0,z.jsxs)(`button`,{type:`button`,onClick:Ve,className:`absolute right-3 top-[max(10px,env(safe-area-inset-top))] flex items-center gap-1 rounded-full bg-white/15 px-3 py-1.5 text-sm font-medium hover:bg-white/25`,"data-testid":`join-reconnecting-leave`,children:[(0,z.jsx)(ge,{size:14}),s(`join_leave`,void 0,`Leave`)]}),(0,z.jsx)(`span`,{className:`h-7 w-7 animate-spin rounded-full border-2 border-white/30 border-t-white`,"aria-hidden":!0}),l.hostStopped?(0,z.jsx)(`p`,{className:`max-w-sm text-base font-medium`,"data-testid":`join-host-away`,children:s(`join_host_away`,{time:Dc(Ze)},`The host stopped playing — waiting for them to start again (${Dc(Ze)})`)}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`text-base font-medium`,children:s(`join_reconnecting`,void 0,`Reconnecting…`)}),(0,z.jsx)(`p`,{className:`text-sm text-white/70`,"data-testid":`join-reconnecting-left`,children:s(`join_reconnecting_left`,{time:Dc(Ze)},`Your place is kept for ${Dc(Ze)}.`)})]})]}),!t&&T&&y&&Ke&&(0,z.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-16 z-20 flex justify-center`,children:(0,z.jsxs)(`span`,{className:`flex items-center gap-2 rounded-full bg-black/70 px-3 py-1.5 text-xs text-white/85`,children:[(0,z.jsx)(j,{size:14}),s(`pad_turn`,void 0,`Turn the phone sideways`)]})}),(0,z.jsx)(`div`,{ref:m,tabIndex:0,"data-own-arrows":``,"data-join-game":``,"aria-label":s(`join_game_label`,{host:d},`${d}'s game`),className:`pointer-events-none absolute inset-0 outline-none`,"data-testid":`join-game`})]}),$e&&(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 rounded-[var(--radius-card)] bg-neutral-900 px-3 py-2 text-xs text-white`,"data-testid":`join-bar`,"data-shown":`1`,"data-below":`1`,children:[(0,z.jsx)(`div`,{className:`flex w-full min-w-0 flex-wrap items-center gap-2`,children:et}),(0,z.jsxs)(`button`,{type:`button`,onClick:()=>void Qe(),className:`flex h-11 min-w-0 flex-1 items-center justify-center gap-1.5 rounded-full bg-white/15 px-3 text-sm font-medium hover:bg-white/25`,"data-testid":`join-fullscreen-below`,children:[(0,z.jsx)(O,{size:15}),s(`pad_fill`,void 0,`Full screen`)]}),c.sound&&!c.noSound?(0,z.jsx)(`button`,{type:`button`,onClick:()=>e.setMuted(!c.muted),"aria-pressed":c.muted,"aria-label":c.muted?s(`rp_unmute`,void 0,`Sound on`):s(`rp_mute`,void 0,`Mute`),className:`flex h-11 w-11 items-center justify-center rounded-full bg-white/15 hover:bg-white/25`,children:c.muted?(0,z.jsx)(M,{size:16}):(0,z.jsx)(we,{size:16})}):c.sound?null:(0,z.jsxs)(`button`,{type:`button`,onClick:()=>e.startSound(),className:`flex h-11 items-center justify-center gap-1.5 rounded-full bg-white px-3 text-sm font-medium text-black`,children:[(0,z.jsx)(we,{size:15}),s(`join_sound`,void 0,`Tap for sound`)]}),(0,z.jsxs)(`button`,{type:`button`,onClick:Ve,className:`flex h-11 items-center justify-center gap-1.5 rounded-full bg-[var(--color-danger,#dc2626)] px-4 text-sm font-medium`,"data-testid":`join-leave-below`,children:[(0,z.jsx)(ge,{size:15}),s(`join_leave`,void 0,`Leave`)]})]})]})}var Wc=`ps5upload.join.name`;function Gc(e){return/iPhone/.test(e)?`iPhone`:/iPad/.test(e)?`iPad`:/Android/.test(e)?`Android`:``}function Kc(e){return e.trim().slice(0,32)}function qc(e=``){return Kc(Lt(`ps5upload.join.name`)??``)||e}function Jc(e){let t=Kc(e);return t&&It(Wc,t),t}function Yc(e){try{return!!sessionStorage.getItem(Ro(e))}catch{return!1}}async function Xc(e){try{e?(await document.documentElement.requestFullscreen?.({navigationUI:`hide`}),await screen.orientation.lock?.(`landscape`)):document.fullscreenElement&&await document.exitFullscreen()}catch{}}function Zc({url:e,invite:t,host:n,transport:r,lanUrl:i=null,path:a=null,internet:o}){let s=Ie(),c=Tc(r&&o!==!1?e:null,i),[l,u]=(0,D.useState)(()=>qc(Gc(typeof navigator>`u`?``:navigator.userAgent))),[d,f]=(0,D.useState)(null),[p,m]=(0,D.useState)(0),h=(0,D.useCallback)(e=>{if(!e)return;let t=typeof window<`u`&&!!window.matchMedia?.(`(pointer: coarse)`).matches,n=e.querySelector(`[data-testid="join-name"]`)?.value.trim()?`join-go`:t?null:`join-name`;n&&e.querySelector(`[data-testid="${n}"]`)?.focus({preventScroll:!0})},[]),g=i=>{let s=Jc(i);if(!s)return;let c=new lc({url:e,invite:t,name:s,host:n,transport:r,path:a,...o===void 0?{}:{internet:o}});f(c),m(e=>e+1),c.start()};if((0,D.useEffect)(()=>{!d&&Yc(t)&&l.trim()&&g(l)},[]),(0,D.useEffect)(()=>d?fc(d):void 0,[d]),(0,D.useEffect)(()=>{if(!d)return;let e=()=>d.stop();return window.addEventListener(`pagehide`,e),()=>window.removeEventListener(`pagehide`,e)},[d]),d)return(0,z.jsx)(Uc,{session:d,lanUrl:i,hubDown:c,onLeave:()=>f(null),onAgain:()=>{d.stop(),g(l)},onFullscreen:Xc},p);let _=n??s(`join_host_fallback`,void 0,`your friend`),v=(0,z.jsx)(`div`,{className:`flex min-h-[100dvh] items-center justify-center bg-black px-6 text-white`,"data-testid":`join-name-step`,"data-join-ui":``,children:(0,z.jsxs)(`form`,{ref:h,className:`w-full max-w-sm space-y-4 rounded-2xl border border-white/10 bg-neutral-900 p-6`,onSubmit:e=>{e.preventDefault(),g(l)},children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(`span`,{className:`flex h-10 w-10 items-center justify-center rounded-full bg-white/10`,children:(0,z.jsx)(Se,{size:20})}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h1`,{className:`text-lg font-semibold`,children:s(`join_title`,void 0,`Join a friend's game`)}),(0,z.jsx)(`p`,{className:`text-sm text-white/60`,children:s(`join_title_body`,{host:_},`Play on ${_}'s PS5 as Player 2, 3 or 4.`)})]})]}),(0,z.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,z.jsx)(`span`,{className:`text-sm font-medium`,children:s(`join_name_label`,void 0,`Your name`)}),(0,z.jsx)(`input`,{value:l,onChange:e=>u(e.target.value),maxLength:32,autoComplete:`nickname`,className:`block w-full rounded-lg border border-white/15 bg-black px-3 py-2 text-base outline-none focus:border-white/50`,"data-testid":`join-name`}),(0,z.jsx)(`span`,{className:`block text-xs text-white/50`,children:s(`join_name_hint`,void 0,`Your friend sees this when you ask to join.`)})]}),(0,z.jsx)(`button`,{type:`submit`,disabled:!l.trim(),className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black disabled:opacity-40`,"data-testid":`join-go`,children:s(`join_button`,void 0,`Join`)}),c&&i&&(0,z.jsx)(Ec,{href:i})]})});return t?(0,z.jsx)(Wo,{appLink:rt(location.href),children:v}):v}function Qc(e){let t=(e??``).trim().replace(/^\[|\]$/g,``).toLowerCase(),n=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(t);if(n){let e=n.slice(1).map(Number);if(e.some(e=>e>255))return null;let[t,r]=e;return t===10||t===172&&r>=16&&r<32||t===192&&r===168||t===169&&r===254||t===127?0:t===100&&r>=64&&r<128?1:2}if(!t.includes(`:`)||!/^[0-9a-f:.]+$/.test(t))return null;if(t.startsWith(`fd7a:115c:a1e0:`))return 1;let r=parseInt(t.split(`:`)[0]||`0`,16);return(r&65024)==64512||(r&65472)==65152||t===`::1`?0:2}function $c(e,t){let n=Qc(e),r=Qc(t);return n===1||r===1?`tailscale`:r===0?`lan`:r===2?`internet`:null}function el(e){let t=(e??``).toLowerCase();if(t.endsWith(`.local`))return`lan`;if(t.endsWith(`.ts.net`))return`tailscale`;let n=Qc(t);return n===0?`lan`:n===1?`tailscale`:null}function tl(e){let t=[];if(typeof e.forEach==`function`)e.forEach(e=>t.push(e));else for(let n of e)t.push(n);let n=new Map(t.map(e=>[String(e.id),e])),r=t.filter(e=>e.type===`candidate-pair`),i=t.filter(e=>e.type===`transport`&&typeof e.selectedCandidatePairId==`string`).map(e=>n.get(String(e.selectedCandidatePairId))).find(Boolean)??r.find(e=>e.selected===!0)??r.find(e=>e.nominated===!0&&e.state===`succeeded`);if(!i)return null;let a=e=>{let t=n.get(String(e));if(!t)return null;let r=t.address??t.ip;return typeof r==`string`?r:null};return $c(a(i.localCandidateId),a(i.remoteCandidateId))}function nl(e){let t=e.replace(/:\d+$/,``).replace(/^\[|\]$/g,``);return`${t===`localhost`||t===`127.0.0.1`||t===`::1`?`ws`:`wss`}://${e}/ws`}function rl(e){let t=new Set;for(let n of e.matchAll(/^a=fingerprint:sha-256[ \t]+([0-9A-Fa-f:]+)[ \t]*\r?$/gim))t.add(n[1].toUpperCase());return/^a=fingerprint:(?!sha-256[ \t])/im.test(e)?null:t.size===1?[...t][0]:null}function il(e,t){let n=rl(e);return n!==null&&n===t.toUpperCase()}var al=16777216;function ol(e){let t=16383,n=Math.max(1,Math.ceil(e.length/t)),r=[];for(let i=0;ithis.max)return this.parts=[],this.size=0,{kind:`error`,why:`too_big`};if(this.parts.push(r.slice()),this.size+=r.length,n===1)return{kind:`partial`};let i=new Uint8Array(this.size),a=0;for(let e of this.parts)i.set(e,a),a+=e.length;return this.parts=[],this.size=0,{kind:`message`,data:i.buffer}}};function cl(e){let t=new Uint8Array(9);return t[0]=3,t.set(e.subarray(0,8),1),t}var ll=[`stun:stun.cloudflare.com:3478`,`stun:stun.l.google.com:19302`];function ul(e){let t=e.trim().replace(/^a=/,``).split(/\s+/);return t.length<8||t[6]!==`typ`||t[2].toLowerCase()===`udp`&&!t[4].toLowerCase().endsWith(`.local`)}var dl=1500,fl=2e4;function pl(e){let t=e?.codecs??[],n=e=>t.filter(t=>t.mimeType.toLowerCase()===e);return[...n(`video/h264`),...n(`video/h265`),...n(`video/rtx`)]}var ml=null;function hl(e){e.onopen=e.onmessage=e.onclose=e.onerror=null;try{e.readyState===1&&e.send(JSON.stringify({t:`leave`})),e.close(1e3)}catch{}}function gl(e,t={}){let n=t.WebSocketImpl??(typeof WebSocket>`u`?void 0:WebSocket);if(!n||ml)return;let r=nl(e.hub),i;try{i=new n(r)}catch{return}let a={url:r,room:e.room,ws:i,msgs:[],timer:null};ml=a;let o=()=>{ml===a&&(ml=null,a.timer&&clearTimeout(a.timer),hl(i))};i.onopen=()=>i.send(JSON.stringify({v:1,t:`join`,room:e.room})),i.onmessage=e=>{if(typeof e.data==`string`)try{a.msgs.push(JSON.parse(e.data))}catch{}},i.onclose=o,i.onerror=()=>{},a.timer=setTimeout(o,t.keepMs??6e4)}function _l(e,t){let n=ml;return n?(ml=null,n.timer&&clearTimeout(n.timer),n.url!==e||n.room!==t||n.ws.readyState>1||n.msgs.some(e=>e.t===`error`||e.t===`closed`)?(hl(n.ws),null):{ws:n.ws,msgs:n.msgs}):null}function vl(e,t={}){var n;let r=t.WebSocketImpl??(typeof WebSocket>`u`?void 0:WebSocket),i=t.PeerConnection??(typeof RTCPeerConnection>`u`?void 0:RTCPeerConnection),a=t.iceTimeoutMs??15e3,o=t.log??(()=>{});class s{constructor(e){this.CONNECTING=0,this.OPEN=1,this.CLOSING=2,this.CLOSED=3,this.readyState=0,this.binaryType=`arraybuffer`,this.onopen=null,this.onmessage=null,this.onclose=null,this.onerror=null,this.hub=null,this.pc=null,this.dc=null,this.timer=null,this.rx=new sl,this.answered=!1,this.early=[],this.hubBackUntil=0,this.offerSdp=null,this.offerSent=!1,this.ownEarly=[],this.media=null,setTimeout(()=>this.begin(),0)}begin(){if(this.readyState!==0)return;if(!i||!r){this.fail(`no_webrtc`);return}let n=t.signalUrl??nl(e.hub),a=t.signalUrl||t.lan?null:_l(n,e.room),s;if(a)s=a.ws,o(`hub: joined early`);else try{s=new r(n)}catch{this.fail(`no_hub`);return}if(this.hub=s,this.prepare(),this.readyState===0){s.onopen=()=>s.send(JSON.stringify(t.lan?{v:1,t:`join`,lan:!0}:{v:1,t:`join`,room:e.room})),s.onmessage=e=>{if(typeof e.data!=`string`)return;let t;try{t=JSON.parse(e.data)}catch{return}this.onHub(t)},s.onclose=e=>{this.hub===s&&(this.hub=null,this.readyState===0&&(this.answered||e?.code===1001&&this.hubRestarting()||this.fail(`no_hub`)))},s.onerror=()=>{};for(let e of a?.msgs??[])this.onHub(e)}}signal(e){let t=this.hub;t&&t.readyState===1&&t.send(JSON.stringify({t:`signal`,to:`host`,data:e}))}onHub(e){if(this.readyState===0)switch(e.t){case`joined`:o(`hub: joined room as ${e.gid??`?`}`),this.sendOffer();return;case`signal`:e.from===`host`&&e.data&&typeof e.data==`object`&&this.onSignal(e.data);return;case`closed`:this.fail(`no_room`);return;case`error`:if(o(`hub: error ${e.why??`?`}`),e.why===`no_room`&&this.hubBackUntil&&this.hubRestarting())return;this.fail(e.why===`no_room`?`no_room`:e.why===`room_full`?`net_full`:`no_hub`);return}}prepare(){if(!i)return;this.offerSent=!1,this.ownEarly=[];let e;try{e=new i({iceServers:[{urls:ll}]})}catch{this.fail(`no_webrtc`);return}this.pc=e;let n=e.createDataChannel(t.label??`join`,{ordered:!0});if(n.binaryType=`arraybuffer`,this.dc=n,n.onopen=()=>this.opened(n),n.onmessage=e=>this.fromChannel(e.data),n.onclose=()=>{this.dc===n&&this.dropped()},t.video&&e.addTransceiver){try{let t=e.addTransceiver(`video`,{direction:`recvonly`}),n=pl(globalThis.RTCRtpReceiver?.getCapabilities?.(`video`));n.length&&t.setCodecPreferences&&t.setCodecPreferences(n)}catch{}try{e.addTransceiver(`audio`,{direction:`recvonly`})}catch{}e.ontrack=t=>{if(this.pc!==e)return;let n=this.media?.stream??t.streams[0]??new MediaStream;n.getTracks().includes(t.track)||n.addTrack(t.track),this.media=t.track.kind===`audio`?{stream:n,receiver:this.media?.receiver??t.receiver,audio:t.receiver}:{stream:n,receiver:t.receiver,...this.media?.audio?{audio:this.media.audio}:{}}}}e.onicecandidate=t=>{if(this.pc!==e)return;let n=t.candidate;if(!n||!n.candidate||!ul(n.candidate))return;let r={type:`candidate`,candidate:n.candidate,sdpMid:n.sdpMid??`0`};this.offerSent?this.signal(r):this.ownEarly.push(r)},e.oniceconnectionstatechange=()=>{if(this.pc!==e)return;let t=e.iceConnectionState;o(`ice: ${t}`),t===`failed`&&(this.readyState===0?this.fail(`no_direct`):this.dropped())},this.offerSdp=(async()=>{let t=await e.createOffer();return await e.setLocalDescription(t),e.localDescription?.sdp??t.sdp??``})().catch(()=>(this.pc===e&&this.fail(`no_webrtc`),null))}async sendOffer(){let e=this.pc,t=this.offerSdp;if(!e||!t||this.offerSent)return;this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,this.readyState===0&&this.fail(`no_direct`)},a);let n=await t;if(this.pc===e&&n!==null&&this.readyState===0){this.signal({type:`offer`,sdp:n}),this.offerSent=!0;for(let e of this.ownEarly.splice(0))this.signal(e)}}async onSignal(t){let n=this.pc;if(t.type===`bye`)this.fail(t.why===`full`?`net_full`:`offer`);else if(n){if(t.type===`answer`){if(this.answered||typeof t.sdp!=`string`)return;if(e.fp?!il(t.sdp,e.fp):rl(t.sdp)===null){o(`answer: fingerprint does not match the link`),this.fail(`mismatch`);return}this.answered=!0;try{await n.setRemoteDescription({type:`answer`,sdp:t.sdp});for(let e of this.early.splice(0))await n.addIceCandidate(e).catch(()=>{})}catch{this.fail(`offer`)}}else if(t.type===`candidate`&&typeof t.candidate==`string`&&t.candidate){let e={candidate:t.candidate,sdpMid:typeof t.sdpMid==`string`?t.sdpMid:`0`,sdpMLineIndex:typeof t.sdpMLineIndex==`number`?t.sdpMLineIndex:0};this.answered?await n.addIceCandidate(e).catch(()=>{}):this.early.push(e)}}}opened(e){this.dc===e&&this.readyState===0&&(this.clearTimer(),this.readyState=1,o(`channel open`),this.leaveHub(),this.onopen?.(new Event(`open`)))}fromChannel(e){if(this.readyState!==1)return;if(typeof e==`string`){this.onmessage?.(new MessageEvent(`message`,{data:e}));return}if(!(e instanceof ArrayBuffer))return;let t=this.rx.push(e);switch(t.kind){case`ping`:try{this.dc?.send(cl(t.data))}catch{}return;case`message`:this.onmessage?.(new MessageEvent(`message`,{data:t.data}));return;case`error`:o(`channel: bad binary message (${t.why})`),this.dropped();return;default:return}}async netPath(){let e=this.pc;if(!e||this.readyState!==1||typeof e.getStats!=`function`)return null;try{return tl(await e.getStats())}catch{return null}}send(e){let t=this.dc;if(this.readyState!==1||!t||t.readyState!==`open`)throw Error(`not open`);if(typeof e==`string`){t.send(e);return}let n=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);for(let e of ol(n))t.send(e)}close(){this.readyState!==3&&(this.teardown(),this.emitClose(1e3,``,!0))}clearTimer(){this.timer&&clearTimeout(this.timer),this.timer=null}leaveHub(){let e=this.hub;if(this.hub=null,e)try{e.readyState===1&&e.send(JSON.stringify({t:`leave`})),e.close(1e3)}catch{}}hubRestarting(){let e=Date.now();return this.hubBackUntil||=e+fl,e>=this.hubBackUntil?!1:(o(`hub: restarting, trying again`),this.clearTimer(),this.leaveHub(),this.closePeer(),this.answered=!1,this.early=[],this.timer=setTimeout(()=>{this.timer=null,this.begin()},dl),!0)}teardown(){this.readyState=3,this.clearTimer(),this.leaveHub(),this.closePeer()}closePeer(){let e=this.pc,t=this.dc;this.pc=null,this.dc=null,this.media=null,this.offerSdp=null,this.offerSent=!1,this.ownEarly=[];try{t?.close()}catch{}try{e?.close()}catch{}}dropped(){this.readyState!==3&&(this.teardown(),this.emitClose(1006,``,!1))}fail(e){this.readyState!==3&&(o(`failed: ${e}`),this.teardown(),this.emitClose(He,`net:${e}`,!1))}emitClose(e,t,n){let r=this.onclose;if(!r)return;let i=typeof CloseEvent>`u`?{type:`close`,code:e,reason:t,wasClean:n}:new CloseEvent(`close`,{code:e,reason:t,wasClean:n});setTimeout(()=>r(i),0)}}return n=s,n.CONNECTING=0,n.OPEN=1,n.CLOSING=2,n.CLOSED=3,s}var yl=3e3;function H(e,t){return/^https?:\/\/[^/?#]+(\/[^?#]*)?\/join\/?$/.test(e)?e.replace(/^http/,`ws`).replace(/\/join\/?$/,`/${t}`):null}var bl=e=>H(e,`api/join/signal`);function xl(e){let t=[];if(e.rtc){let n=e.net??{room:``,key:``,fp:e.fp??``,hub:``};for(let[r,i]of[[`lan`,e.lan],[`tailscale`,e.ts]]){let a=i?bl(i):null;if(!a)continue;let o=e.rtcMake(n,{signalUrl:e.reach(a),...e.net?{}:{lan:!0}});t.push({via:r,make:()=>new o(``),pinned:!!n.fp})}if(e.net){let n=e.rtcMake(e.net,{});t.push({via:`hub`,make:()=>new n(``),pinned:!0})}}let n=e.lan?H(e.lan,`api/join/ws`):null;if(n){let r=e.reach(n);t.push({via:`socket`,make:()=>e.socket(r)})}return t}var Sl=new Map;function Cl(e,t,n=300,r=yl){let i=e.some(e=>e===`lan`||e===`tailscale`),a=e.some(e=>e!==`socket`);return e.map(e=>e===t?0:e===`hub`&&i?n:e===`socket`&&a?r:0)}function wl(e){let t=e.find(e=>e.via===`hub`),n=e.find(e=>(e.via===`lan`||e.via===`tailscale`)&&[`no_direct`,`net_full`,`offer`].includes(Ue(e.e)??``));return t&&(Ue(t.e)!==`no_hub`||!n)?t.e:n?n.e:t?.e??e[e.length-1]?.e??null}function Tl(e,t){var n;let r=t.log??(()=>{}),i=t.headStartMs??300,a=t.socketAfterMs??3e3;class o{constructor(e){this.CONNECTING=0,this.OPEN=1,this.CLOSING=2,this.CLOSED=3,this.readyState=0,this.binaryType=`arraybuffer`,this.onopen=null,this.onmessage=null,this.onclose=null,this.onerror=null,this.live=[],this.waiting=[],this.pinned=new Set,this.t0=0,this.closes=[],this.winner=null,setTimeout(()=>this.begin(),0)}get via(){return this.winner?.via??null}get media(){return this.winner?.s?.media??null}async netPath(){let e=this.winner?.s;return e?.netPath?e.netPath():null}begin(){if(this.readyState!==0)return;let n=e();if(!n.length){this.end({type:`close`,code:1006,reason:``,wasClean:!1});return}this.t0=Date.now();for(let e of n)e.pinned&&this.pinned.add(e.via);let r=Cl(n.map(e=>e.via),Sl.get(t.room)??null,i,a);n.forEach((e,t)=>{r[t]===0?this.launch(e.via,e.make):this.waiting.push({via:e.via,make:e.make,timer:setTimeout(()=>this.startWaiting(e.via),r[t])})})}startWaiting(e){let t=this.waiting.findIndex(t=>t.via===e);if(t<0)return;let[n]=this.waiting.splice(t,1);clearTimeout(n.timer),this.launch(n.via,n.make)}launch(e,t){if(this.readyState!==0)return;let n;try{n=t()}catch{this.tryClosed(e,{type:`close`,code:1006,reason:``,wasClean:!1});return}r(`path: trying ${e}`);let i={via:e,s:n};this.live.push(i),n.binaryType=this.binaryType,n.onopen=e=>this.won(i,e),n.onclose=t=>{this.live=this.live.filter(e=>e!==i),this.tryClosed(e,t)},n.onerror=()=>{},n.onmessage=null}tryClosed(e,t){if(this.readyState===0){if(r(`path: ${e} failed after ${Date.now()-this.t0} ms${t?.reason?` (${t.reason})`:``}`),this.closes.push({via:e,e:t}),this.pinned.has(e)&&Ue(t)===`mismatch`){for(let e of this.waiting.filter(e=>e.via===`socket`))clearTimeout(e.timer);this.waiting=this.waiting.filter(e=>e.via!==`socket`)}!this.live.length&&this.waiting.length?this.startWaiting(this.waiting[0].via):!this.live.length&&!this.waiting.length&&this.end(wl(this.closes))}}won(e,n){if(this.readyState!==0)return;this.winner=e,Sl.set(t.room,e.via),r(`path: playing by ${e.via} after ${Date.now()-this.t0} ms`);for(let e of this.waiting.splice(0))clearTimeout(e.timer);for(let t of this.live.splice(0))if(t!==e){t.s.onopen=t.s.onclose=t.s.onmessage=t.s.onerror=null;try{t.s.close()}catch{}}let i=e.s;i.onmessage=e=>this.onmessage?.(e),i.onerror=e=>this.onerror?.(e),i.onclose=e=>{this.readyState!==3&&(this.readyState=3,this.onclose?.(e))},this.readyState=1,t.onWin?.(e.via),this.onopen?.(n)}send(e){if(this.readyState!==1||!this.winner)throw Error(`not open`);this.winner.s.send(e)}close(e,t){if(this.readyState===3)return;let n=this.readyState===1;this.readyState=3;for(let e of this.waiting.splice(0))clearTimeout(e.timer);let r=this.winner?[this.winner,...this.live]:this.live.splice(0);for(let n of r){n.s.onopen=n.s.onclose=n.s.onmessage=n.s.onerror=null;try{n.s.close(e,t)}catch{}}let i=this.onclose;if(i){let r={type:`close`,code:e??1e3,reason:t??``,wasClean:n};setTimeout(()=>i(r),0)}}end(e){if(this.readyState===3)return;this.readyState=3;let t=this.onclose,n=e??{type:`close`,code:1006,reason:``,wasClean:!1};t&&setTimeout(()=>t(n),0)}}return n=o,n.CONNECTING=0,n.OPEN=1,n.CLOSING=2,n.CLOSED=3,o}ps();var El=new URLSearchParams(location.hash.slice(1)),Dl=El.get(`n`)?.trim()||null,U=nt(location.hash);U&&gl(U);var Ol=(0,x.createRoot)(document.getElementById(`root`));if(U){let e=vl(U,{video:!0,log:e=>console.info(`[join] ${e}`)}),t=Re(location.hash,`join`);Ol.render((0,z.jsx)(Zc,{url:nl(U.hub),invite:U.key,host:Dl,transport:e,lanUrl:t?ze(t,{key:U.key}):null}))}else{let e=El.get(`i`)||null,t=location.pathname.replace(/\/join\/?$/,``),n=`${location.protocol===`https:`?`wss`:`ws`}://${location.host}${t}/api/join/ws`,r=e=>console.info(`[join] ${e}`),i=`${location.origin}${t}/join`,a=typeof RTCPeerConnection>`u`?void 0:Tl(()=>xl({net:null,lan:i,ts:null,fp:tt(El.get(`fp`)),rtc:!0,reach:e=>e,rtcMake:(e,t)=>vl(e,{video:!0,log:r,...t}),socket:e=>new WebSocket(e)}),{room:i,log:r});Ol.render((0,z.jsx)(Zc,{url:n,invite:e,host:Dl,path:el(location.hostname),transport:a,internet:!1}))} diff --git a/engine/crates/ps5upload-engine/src/pad_page.html b/engine/crates/ps5upload-engine/src/pad_page.html index 5b9222869..a59aa0aa3 100644 --- a/engine/crates/ps5upload-engine/src/pad_page.html +++ b/engine/crates/ps5upload-engine/src/pad_page.html @@ -268,7 +268,7 @@ ã/¸Äyf"Ÿ5TàyÊ0îEê²Þ—€m6ëÞè6ðÏâ§9ž¬„k=}¼àt<ž‚¦Mdžç6"p_î3, oO3p"pw÷´/(1ñøs.íA/&ÏUÃ_X™ÍpÕ1hÌ80E’Qö„ ow÷!x.™AÜ"¢j+惡¦¶®ä“R–ow÷!xꔊpn…â#ðù z AÍp\Ž0N˜HJê´ªØ^U -I€wu¸öôú!3å6³‹âVq£³¹´RN£%y10º:pŠ#\:J:b9Hµ7h_Ž:¢I9 _¼™µV,þ <`});var w={a:v};this.setModule=t=>{e.setModule(fi,t)},this.getModule=()=>e.getModule(fi),this.instantiate=()=>(this.getModule().then(e=>WebAssembly.instantiate(e,w)).then(e=>{let t=e.exports;y(t),a=t.g,o(),ne(t),n()}),this.ready=new Promise(e=>{n=e}).then(()=>{this.HEAP=a.buffer,this.malloc=x,this.free=te,this.opus_frame_decoder_create=b,this.opus_frame_decode_float_deinterleaved=S,this.opus_frame_decoder_destroy=ee}),this)}var pi=o((()=>{}));function mi(e={}){mi.errors||Object.defineProperties(mi,{errors:{value:new Map([[-1,`OPUS_BAD_ARG: One or more invalid/out of range arguments`],[-2,`OPUS_BUFFER_TOO_SMALL: Not enough bytes allocated in the buffer`],[-3,`OPUS_INTERNAL_ERROR: An internal error was detected`],[-4,`OPUS_INVALID_PACKET: The compressed data passed is corrupted`],[-5,`OPUS_UNIMPLEMENTED: Invalid/unsupported request number`],[-6,`OPUS_INVALID_STATE: An encoder or decoder structure is invalid or already freed`],[-7,`OPUS_ALLOC_FAIL: Memory allocation has failed`]])}}),this._init=()=>new this._WASMAudioDecoderCommon(this).instantiate(this._EmscriptenWASM,this._module).then(e=>{this._common=e,this._inputBytes=0,this._outputSamples=0,this._frameNumber=0,this._input=this._common.allocateTypedArray(this._inputSize,Uint8Array),this._output=this._common.allocateTypedArray(this._outputChannels*this._outputChannelSize,Float32Array);let t=this._common.allocateTypedArray(this._channels,Uint8Array);t.buf.set(this._channelMappingTable),this._decoder=this._common.wasm.opus_frame_decoder_create(this._sampleRate,this._channels,this._streamCount,this._coupledStreamCount,t.ptr,this._preSkip,this._forceStereo)}),Object.defineProperty(this,"ready",{enumerable:!0,get:()=>this._ready}),this.reset=()=>(this.free(),this._init()),this.free=()=>{this._common.free(),this._common.wasm.opus_frame_decoder_destroy(this._decoder),this._common.wasm.free(this._decoder)},this._decode=e=>{if(!(e instanceof Uint8Array))throw Error(`Data to decode must be Uint8Array. Instead got `+typeof e);this._input.buf.set(e);let t=this._common.wasm.opus_frame_decode_float_deinterleaved(this._decoder,this._input.ptr,e.length,this._output.ptr),n;return t<0&&(n=`libopus `+t+` `+(mi.errors.get(t)||`Unknown Error`),console.error(n),t=0),{outputBuffer:this._common.getOutputChannels(this._output.buf,this._outputChannels,t),samplesDecoded:t,error:n}},this.decodeFrame=e=>{let t=[],n=this._decode(e);return n.error&&this._common.addError(t,n.error,e.length,this._frameNumber,this._inputBytes,this._outputSamples),this._frameNumber++,this._inputBytes+=e.length,this._outputSamples+=n.samplesDecoded,this._WASMAudioDecoderCommon.getDecodedAudioMultiChannel(t,[n.outputBuffer],this._outputChannels,n.samplesDecoded,this._sampleRate)},this.decodeFrames=e=>{let t=[],n=[],r=0,i=0;for(;itypeof e==`number`,n=e.sampleRate,r=e.channels,i=e.streamCount,a=e.coupledStreamCount,o=e.channelMappingTable,s=e.preSkip,c=+!!e.forceStereo;if(r>2&&(!t(i)||!t(a)||!Array.isArray(o)))throw Error(`Invalid Opus Decoder Options for multichannel decoding.`);return this._sampleRate=[8e3,12e3,16e3,24e3,48e3].includes(n)?n:48e3,this._channels=t(r)?r:2,this._streamCount=t(i)?i:1,this._coupledStreamCount=t(a)?a:this._channels-1,this._channelMappingTable=o||(this._channels===2?[0,1]:[0]),this._preSkip=s||0,this._forceStereo=r<=8&&r!=2?c:0,this._inputSize=3840*this._channels,this._outputChannelSize=5760,this._outputChannels=this._forceStereo?2:this._channels,this._ready=this._init(),this}var hi=o((()=>{di(),pi()})),gi,_i=o((()=>{di(),pi(),hi(),gi=class extends si{constructor(e){super(e,`opus-decoder`,mi,fi)}async decodeFrame(e){return this.postToDecoder(`decodeFrame`,e)}async decodeFrames(e){return this.postToDecoder(`decodeFrames`,e)}}})),vi=c({OpusDecoder:()=>mi,OpusDecoderWebWorker:()=>gi}),yi=o((()=>{hi(),_i(),di(),li(mi,`OpusDecoder`),li(gi,`OpusDecoderWebWorker`)})),bi=[8e3,12e3,16e3,24e3,48e3],xi=null;function Si(){return xi??=Vn(()=>Promise.resolve().then(()=>(yi(),vi)),__VITE_PRELOAD__,import.meta.url).catch(e=>{throw xi=null,e}),xi}function Ci(){return typeof WebAssembly==`object`&&typeof WebAssembly.instantiate==`function`}function wi(e,t,n,r){return{numberOfFrames:t,numberOfChannels:e.length,sampleRate:n,timestamp:r,format:`f32-planar`,duration:Math.round(t/n*1e6),copyTo(n,r){n.set(e[r.planeIndex].subarray(0,t))},close(){}}}var Ti=class{constructor(e,t=Si){this.init=e,this.load=t,this.state=`unconfigured`,this.dec=null,this.pending=[]}configure(e){if(this.state===`closed`)throw Error(`the decoder is closed`);if(!Ci())throw Error(`no WebAssembly here`);let t=e.sampleRate;if(!bi.includes(t))throw Error(`Opus does not decode at ${t} Hz`);let n=e.numberOfChannels;if(n<1||n>2)throw Error(`${n} channels: only mono and stereo are decoded`);this.state=`configured`,this.load().then(async e=>{if(this.state===`closed`)return;let r=new e.OpusDecoder({channels:n,sampleRate:t});if(await r.ready,this.state!==`configured`){r.free();return}this.dec=r;let i=this.pending;this.pending=[];for(let e of i)this.state===`configured`&&this.run(e)}).catch(e=>this.fail(e))}decode(e){if(this.state!==`configured`)return;let t=e;if(this.dec)return this.run(t);this.pending.push({timestamp:t.timestamp,data:t.data.slice()}),this.pending.length>50&&this.pending.shift()}run(e){let t=this.dec;if(!t)return;let n;try{n=t.decodeFrame(e.data)}catch(e){return this.fail(e)}n.samplesDecoded&&n.channelData.length&&this.init.output(wi(n.channelData,n.samplesDecoded,n.sampleRate,e.timestamp))}fail(e){if(this.state===`closed`)return;this.close();let t=e instanceof Error?e:Error(String(e));queueMicrotask(()=>this.init.error(t))}close(){this.state=`closed`,this.pending=[];let e=this.dec;this.dec=null;try{e?.free()}catch{}}},Ei={makeDecoder:e=>new Ti(e),makeChunk:e=>({type:e.type,timestamp:e.timestamp,data:e.data instanceof Uint8Array?e.data:new Uint8Array(e.data)})};function Di(e,t){for(let n=0;n+3>1&63;if(t>=16&&t<=21)return!0;if(t<16)return!1}else{let t=e[n+3]&31;if(t===5)return!0;if(t===1)return!1}}return!1}function Oi(e){for(let t=0;t+6e.toString(16).padStart(2,`0`);return`avc1.${n(e[t+4])}${n(e[t+5])}${n(e[t+6])}`}return`avc1.4d4028`}var ki=[`hev1.1.6.L153.B0`,`hvc1.1.6.L153.B0`,`hev1.2.4.L153.B0`,`hvc1.2.4.L153.B0`,`hev1.1.6.L150.90`];async function Ai(e,t){if(typeof VideoDecoder>`u`)return null;for(let n of ki)try{if((await VideoDecoder.isConfigSupported({codec:n,codedWidth:e,codedHeight:t})).supported)return n}catch{}return null}function ji(e){let t=[];for(let n=0;n+2{let i=r+1n&&e[i-1]===0;)i--;return e.subarray(n,i)}).filter(e=>e.length>0)}var Mi=(e,t)=>t?e[0]>>1&63:e[0]&31;function j(e,...t){let n=8+t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(n);new DataView(r.buffer).setUint32(0,n);for(let t=0;t<4;t++)r[4+t]=e.charCodeAt(t);let i=8;for(let e of t)r.set(e,i),i+=e.length;return r}function M(...e){let t=new Uint8Array(e.reduce((e,[,t])=>e+t,0)),n=0;for(let[r,i]of e){for(let e=i-1;e>=0;e--)t[n+i-1-e]=Math.floor(r/2**(8*e))&255;n+=i}return t}var Ni=(e,t,n,...r)=>j(e,M([t,1],[n,3]),...r),Pi=M([65536,4],[0,4],[0,4],[0,4],[65536,4],[0,4],[0,4],[0,4],[1073741824,4]);function Fi(e){let t=e.handler===`vide`,n=j(`ftyp`,new TextEncoder().encode(`isom`),M([1,4]),new TextEncoder().encode(`isomiso6mp41`)),r=j(`moov`,Ni(`mvhd`,0,0,M([0,4],[0,4],[e.timescale,4],[0,4],[65536,4],[256,2],[0,2],[0,4],[0,4]),Pi,new Uint8Array(24),M([2,4])),j(`trak`,Ni(`tkhd`,0,3,M([0,4],[0,4],[1,4],[0,4],[0,4],[0,4],[0,4],[0,2],[0,2],[t?0:256,2],[0,2]),Pi,M([(e.width??0)*65536,4],[(e.height??0)*65536,4])),j(`mdia`,Ni(`mdhd`,0,0,M([0,4],[0,4],[e.timescale,4],[0,4],[21956,2],[0,2])),Ni(`hdlr`,0,0,M([0,4]),new TextEncoder().encode(e.handler),new Uint8Array(12),M([0,1])),j(`minf`,t?Ni(`vmhd`,0,1,new Uint8Array(8)):Ni(`smhd`,0,0,M([0,4])),j(`dinf`,Ni(`dref`,0,0,M([1,4]),Ni(`url `,0,1))),j(`stbl`,Ni(`stsd`,0,0,M([1,4]),e.sampleEntry),Ni(`stts`,0,0,M([0,4])),Ni(`stsc`,0,0,M([0,4])),Ni(`stsz`,0,0,M([0,4],[0,4])),Ni(`stco`,0,0,M([0,4])))))),j(`mvex`,Ni(`trex`,0,0,M([1,4],[1,4],[0,4],[0,4],[0,4])))),i=new Uint8Array(n.length+r.length);return i.set(n,0),i.set(r,n.length),i}function Ii(e,t,n,r,i){let a=i?33554432:16842752,o=e=>Ni(`trun`,0,1793,M([1,4],[e,4],[n,4],[r.length,4],[a,4])),s=e=>j(`traf`,Ni(`tfhd`,0,131072,M([1,4])),Ni(`tfdt`,1,0,M([t,8])),o(e)),c=Ni(`mfhd`,0,0,M([e,4])),l=j(`moof`,c,s(0)).length,u=j(`moof`,c,s(l+8)),d=j(`mdat`,r),f=new Uint8Array(u.length+d.length);return f.set(u,0),f.set(d,u.length),f}function Li(e,t,n=!1){let r=t?[35,...n?[32,33,34]:[]]:[9,...n?[7,8]:[]],i=ji(e).filter(e=>!r.includes(Mi(e,t))),a=new Uint8Array(i.reduce((e,t)=>e+4+t.length,0)),o=new DataView(a.buffer),s=0;for(let e of i)o.setUint32(s,e.length),a.set(e,s+4),s+=4+e.length;return a}var Ri=e=>e.toString(16).padStart(2,`0`),zi=e=>{let t=new Uint8Array(2+e.length);return t[0]=e.length>>8,t[1]=e.length&255,t.set(e,2),t},Bi=e=>{let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t};function Vi(e){let t=ji(e),n=t.filter(e=>Mi(e,!1)===7),r=t.filter(e=>Mi(e,!1)===8);return!n.length||!r.length||n[0].length<4?null:Bi([M([1,1],[n[0][1],1],[n[0][2],1],[n[0][3],1],[255,1],[224|n.length,1]),...n.map(zi),M([r.length,1]),...r.map(zi)])}function Hi(e,t,n){let r=ji(e),i=e=>r.filter(n=>Mi(n,t)===e),a=(e,t)=>j(e,new Uint8Array(6),M([1,2],[0,16],[n.w,2],[n.h,2],[4718592,4],[4718592,4],[0,4],[1,2]),new Uint8Array(32),M([24,2],[65535,2]),t);if(!t){let t=i(7),r=Vi(e);return r?{init:Fi({handler:`vide`,timescale:9e4,sampleEntry:a(`avc1`,j(`avcC`,r)),width:n.w,height:n.h}),mime:`video/mp4; codecs="avc1.${Ri(t[0][1])}${Ri(t[0][2])}${Ri(t[0][3])}"`}:null}let o=i(32),s=i(33),c=i(34);if(!o.length||!s.length||!c.length)return null;let l=Vr(s[0]);if(l.length<15)return null;let u=l.subarray(3,15),d=u[0]&31,f=d===2?2:0,p=(e,t)=>Bi([M([128|e,1],[t.length,2]),...t.map(zi)]),m=j(`hvcC`,M([1,1]),u,M([61440,2],[252,1],[253,1],[248|f,1],[248|f,1],[0,2],[15,1],[3,1]),p(32,o),p(33,s),p(34,c)),h=[``,`A`,`B`,`C`][u[0]>>6],g=0,_=(u[1]<<24|u[2]<<16|u[3]<<8|u[4])>>>0;for(let e=0;e<32;e++)_&1<>>0).toString(16),`${u[0]&32?`H`:`L`}${u[11]}`,...v.map(e=>e.toString(16))].join(`.`);return{init:Fi({handler:`vide`,timescale:9e4,sampleEntry:a(`hvc1`,m),width:n.w,height:n.h}),mime:`video/mp4; codecs="${y}"`}}function Ui(e,t,n,r,i,a){return Ii(e,t,n,Li(r,i),a)}function Wi(e,t){let n=j(`dOps`,M([0,1],[e,1],[312,2],[t,4],[0,2],[0,1]));return Fi({handler:`soun`,timescale:48e3,sampleEntry:j(`Opus`,new Uint8Array(6),M([1,2],[0,8],[e,2],[16,2],[0,4],[3145728e3,4]),n)})}function Gi(e){if(!e.length)return 960;let t=e[0]>>3,n=t<12?[480,960,1920,2880][t%4]:t<16?[480,960][t%2]:[120,240,480,960][t%4],r=e[0]&3,i=r===0?1:r===3?(e[1]??1)&63:2;return n*Math.max(1,i)}function Ki(e,t,n){return Ii(e,t,Gi(n),n,!0)}var qi={watch:30,player:4},Ji={watch:{seek:.5,speed:1/0,target:.05},player:{seek:.15,speed:.06,target:.02}},Yi={seek:.8,speed:.25,target:.12};function Xi(e,t,n){let r=typeof n==`string`?Ji[n]:n;return e>r.seek?{seekTo:t-r.target,rate:1}:e>r.speed?{seekTo:null,rate:1.1}:{seekTo:null,rate:1}}function Zi(e,t=`watch`,n){return typeof VideoDecoder<`u`?new ca(e,t,n):new ba(e,t,n)}var Qi=class{constructor(e,t=()=>performance.now()){this.ask=e,this.now=t,this.last=-1/0}waiting(){if(!this.ask)return;let e=this.now();e-this.last<1e3||(this.last=e,this.ask())}};function $i(e){return e.length<3?null:{index:e[0]<<8|e[1],packet:e.subarray(2)}}var ea=class{constructor(){this.last=-1}take(e){if(this.last>=0){let t=e-this.last&65535;if(t===0||t>=32768)return!1}return this.last=e,!0}reset(){this.last=-1}};function ta(e){if(e.length>=10)return e;let t=new Uint8Array(10);t.set(e.subarray(0,6));let n=new DataView(t.buffer);return n.setUint32(6,Math.round(n.getUint32(2)/100)||480),t}function na(e,t){return{snd:e,snd_decoded:t.decoded,snd_concealed:t.concealed,snd_underruns:t.underruns,snd_dropped:t.dropped}}var ra=class{constructor(e,t=.2){this.min=e,this.max=t,this.next=0,this.calmSince=0,this.minLead=1/0,this.windowAt=0,this.underruns=0,this.dropped=0,this.cushion=e}at(e,t){this.next0&&(this.underruns++,this.cushion=Math.min(this.max,this.cushion+.02)),this.calmSince=e,this.next=e+this.cushion,this.minLead=1/0,this.windowAt=e):e-this.calmSince>10&&this.cushion>this.min&&(this.cushion=Math.max(this.min,this.cushion-.01),this.calmSince=e);let n=this.next-e;if(n>this.cushion+.15)return this.dropped++,null;if(this.minLead=Math.min(this.minLead,n),e-this.windowAt>=.25){let t=this.minLead>this.cushion+ia;if(this.minLead=1/0,this.windowAt=e,t)return this.dropped++,null}let r=this.next;return this.next+=t,r}reset(){this.next=0}},ia=.02;async function aa(e,t){try{return typeof AudioDecoder>`u`?!1:!!(await AudioDecoder.isConfigSupported({codec:`opus`,sampleRate:e,numberOfChannels:t})).supported}catch{return!1}}var oa=class{constructor(e,t=()=>performance.now()){this.decoder=e,this.now=t,this.n={frames:0,dropped:0,late:0,stalls:0,stall_ms:0,worst_stall_ms:0,key_waits:0},this.a=0,this.d=0,this.w=!1,this.q=[],this.sum=0,this.cnt=0,this.codec=``}get frames(){return this.n.frames}arrived(){let e=this.now();this.a&&e-this.a>50&&this.n.late++,this.a=e}drop(){this.n.dropped++,this.w||this.n.key_waits++,this.w=!0}decoding(){this.w=!1,this.q.push(this.now())>64&&this.q.shift()}drawn(e=!1){let t=this.now(),n=e?this.q.shift():void 0;n!==void 0&&(this.sum+=t-n,this.cnt++);let r=this.d?t-this.d:0;r>100&&this.stall(r),this.d=t,this.n.frames++}stall(e){this.n.stalls++,this.n.stall_ms+=e,this.n.worst_stall_ms=Math.max(this.n.worst_stall_ms,e)}snapshot(){let e=this.d?this.now()-this.d:0,t={...this.n,decoder:this.decoder};this.codec&&(t.codec=this.codec),e>100&&(t.stalls=this.n.stalls+1,t.stall_ms=this.n.stall_ms+e,t.worst_stall_ms=Math.max(this.n.worst_stall_ms,e));for(let e of[`stall_ms`,`worst_stall_ms`])t[e]=Math.round(t[e]);return t.decode_ms=this.cnt?Math.round(this.sum/this.cnt*10)/10:0,this.sum=this.cnt=0,t}},sa=[`pointerup`,`touchend`,`click`,`keydown`],ca=class{get element(){if(!this.wrap){let e=document.createElement(`div`);e.className=`h-full w-full`,e.append(this.canvas),this.mse&&e.append(this.mse.element),this.wrap=e}return this.wrap}get stats(){return this.mse?.stats??this.ownStats}soundReport(){return this.soundOn?this.mseSound?this.mseSound.report():na(this.soundWasm?`wasm`:`webcodecs`,this.soundStats):null}constructor(e,t=`watch`,n){this.onProblem=e,this.latency=t,this.onNeedKey=n,this.canvas=document.createElement(`canvas`),this.wrap=null,this.mse=null,this.failsNoPicture=0,this.ctx=this.canvas.getContext(`2d`,{alpha:!1}),this.hevc=!1,this.header=null,this.spsRect=null,this.software=!1,this.video=null,this.opening=!1,this.stopped=!1,this.sawKey=!1,this.ownStats=new oa(`webcodecs`),this.problemShown=!1,this.ts=0,this.pipe=null,this.audioGen=0,this.actx=null,this.soundOn=!1,this.unarm=null,this.mseSound=null,this.audioHeader=null,this.soundWasm=!1,this.onSoundFail=null,this.muted=!1,this.keyAsk=new Qi(n),this.clock=new ra(t===`player`?.05:.08),typeof AudioDecoder>`u`&&N()&&(this.mseSound=new P(t,()=>this.mseSoundFailed())),this.canvas.className=`block h-full w-full object-contain`,this.canvas.dataset.testid=`watch-canvas`}setHevc(e){this.hevc=e,this.header&&(this.spsRect=qr(this.header,e)),this.mse?.setHevc(e)}get onMse(){return!!this.mse}decodeFailed(){if(this.mse||this.ownStats.frames>0||++this.failsNoPicture<3||!fa())return!1;let e=new ba(this.onProblem,this.latency,this.onNeedKey);e.setHevc(this.hevc),e.markProblemShown(),this.mse=e;let t=this.video;this.video=null;try{t?.close()}catch{}return this.canvas.style&&(this.canvas.style.display=`none`),this.wrap?.append(e.element),this.header&&e.onMessage(new Uint8Array([0,...this.header]).buffer),this.onNeedKey?.(),!0}startSound(){this.soundOn=!0,la(),this.mseSound?this.mseSound.start():this.openContext()}openContext(){try{if(!this.actx){let e=new AudioContext({latencyHint:`interactive`});this.actx=e,e.onstatechange=()=>{this.actx===e&&e.state!==`running`&&e.state!==`closed`&&this.armResume()}}this.actx.resume().catch(()=>{})}catch{this.onSoundFail?.()}}get sound(){return this.soundOn}setMuted(e){this.muted=e,this.mseSound?.setMuted(e)}resumeSound(){if(!this.soundOn)return;if(this.mseSound)return this.mseSound.resume();let e=this.actx;e&&e.state!==`running`&&e.state!==`closed`&&(this.clock.reset(),e.resume().catch(()=>{}),this.armResume())}get soundStats(){return{decoded:this.pipe?.decoded??0,concealed:this.pipe?.concealed??0,underruns:this.clock.underruns,dropped:this.clock.dropped,cushionMs:Math.round(this.clock.cushion*1e3)}}armResume(){if(this.unarm||typeof window>`u`||!window.addEventListener)return;let e=()=>{let e=this.actx;if(!e||e.state===`closed`)return this.unarm?.();this.clock.reset(),e.resume().then(()=>{e.state===`running`&&this.unarm?.()}).catch(()=>{})};for(let t of sa)window.addEventListener(t,e,!0);this.unarm=()=>{for(let t of sa)window.removeEventListener(t,e,!0);this.unarm=null}}onMessage(e){let t=new Uint8Array(e);if(t.length<1||this.stopped)return;let n=t[0],r=t.subarray(1);if(this.mse&&(n===0||n===1))return n===0&&(this.header=r.slice()),this.mse.onMessage(e);n===0?this.openVideo(r.slice()):n===1?this.onVideo(r):n===3?this.openAudio(r.slice()):n===4&&this.onAudio(r)}async openVideo(e){if(this.header=e,this.spsRect=qr(e,this.hevc),!this.opening){this.opening=!0;try{let t=this.hevc?await xa(e):Oi(e);if(this.mse||this.stopped)return;if(!t){this.problemShown=!0,this.onProblem(`no_hevc`);return}this.ownStats.codec=t;let n=this.hevc?void 0:Vi(e)??void 0;try{this.video?.close()}catch{}let r=new VideoDecoder({output:e=>{let t=this.realVisible(e),n=this.canvas;(n.width!==t.displayWidth||n.height!==t.displayHeight)&&(n.width=t.displayWidth,n.height=t.displayHeight),this.ctx?.drawImage(t,0,0,n.width,n.height),this.ownStats.drawn(!0),t.close(),this.problemShown&&(this.problemShown=!1,this.onProblem(null))},error:()=>{this.video===r&&(this.problemShown=!0,this.onProblem(`decode`),this.decodeFailed()||this.rebuild())}}),i={codec:t,optimizeForLatency:!0};n&&(i.description=n),this.software&&(i.hardwareAcceleration=`prefer-software`),r.configure(i),this.video=r,this.sawKey=!1}catch{this.problemShown=!0,this.onProblem(`decode`),this.decodeFailed()}finally{this.opening=!1}}}realVisible(e){let t=this.spsRect,n=Jr(e,t);if(n)try{let t=new VideoFrame(e,{visibleRect:{x:n.x,y:n.y,width:n.w,height:n.h},displayWidth:n.w,displayHeight:n.h});return e.close(),t}catch{return e}let r=e.visibleRect;if(t&&r&&!this.software&&(r.width{if(this.video===e){try{e?.close()}catch{}this.rebuild(),this.onNeedKey?.()}})}return e}rebuild(){this.mse||this.stopped||(this.video=null,this.sawKey=!1,this.header&&this.openVideo(this.header).then(()=>this.keyAsk.waiting()))}onVideo(e){let t=this.video;if(t?.state===`closed`){this.opening||this.rebuild();return}if(!t||t.state!==`configured`)return;let n=Di(e,this.hevc);if(this.ownStats.arrived(),!this.sawKey&&!n)return this.ownStats.drop(),this.keyAsk.waiting();if(!n&&t.decodeQueueSize>qi[this.latency])return this.sawKey=!1,this.ownStats.drop(),this.keyAsk.waiting();this.sawKey=!0;let r=e;this.hevc?n&&this.header&&(r=new Uint8Array(this.header.length+e.length),r.set(this.header,0),r.set(e,this.header.length)):r=Li(e,!1,!0),this.ts+=16667,this.ownStats.decoding(),t.decode(new EncodedVideoChunk({type:n?`key`:`delta`,timestamp:this.ts,data:r}))}openAudio(e){if(e.length<6)return;let t=++this.audioGen;if(this.pipe?.reset(),this.pipe=null,this.clock.reset(),this.audioHeader=e,this.mseSound)return this.mseSound.setHeader(e);let n=e[0];aa(new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(2),n).then(n=>{if(t!==this.audioGen)return;if(!n)return N()?this.soundThroughMse(e):this.soundThroughWasm(e);let r=new Qr((e,t)=>this.play(e,t,r.sampleRate));try{r.header(ta(e)),this.pipe=r}catch{this.soundThroughMse(e)}})}soundThroughMse(e){this.pipe=null,this.mseSound||(this.mseSound=new P(this.latency,()=>this.mseSoundFailed()),this.soundOn&&this.mseSound.start()),this.mseSound.setHeader(e)}soundThroughWasm(e){this.pipe?.reset(),this.soundWasm=!0;let t=new Qr((e,n)=>this.play(e,n,t.sampleRate),Ei,()=>{this.pipe===t&&(this.pipe=null),this.onSoundFail?.()});this.pipe=t,t.header(ta(e))}mseSoundFailed(){let e=this.mseSound;e&&(this.mseSound=null,e.stop(),this.soundOn&&(this.openContext(),this.actx&&this.actx.state!==`running`&&this.armResume()),this.audioHeader&&this.soundThroughWasm(this.audioHeader))}onAudio(e){if(this.mseSound)return this.mseSound.frame(e);this.soundOn&&this.pipe&&this.pipe.packet(e)}play(e,t,n){let r=this.actx;if(!r||r.state!==`running`||!e.length)return;let i=e[0].length,a=this.clock.at(r.currentTime,i/n);if(a===null)return;let o=r.createBuffer(e.length,i,n),s=this.muted?0:t;e.forEach((e,t)=>o.copyToChannel(s===1?e:e.map(e=>e*s),t));let c=r.createBufferSource();c.buffer=o,c.connect(r.destination),c.start(a)}stop(){this.stopped=!0;try{this.video?.close()}catch{}this.mse?.stop(),this.audioGen++,this.pipe?.reset(),this.pipe=null,this.unarm?.(),this.actx?.close().catch(()=>{}),this.mseSound?.stop()}};function la(){try{let e=navigator.audioSession;e&&e.type!==`playback`&&(e.type=`playback`)}catch{}}function ua(e,t){try{return e.isTypeSupported(t)}catch{return!1}}function N(){let e=typeof window>`u`?null:fa();return!!e&&(ua(e,`audio/mp4; codecs="Opus"`)||ua(e,`audio/mp4; codecs="opus"`))}var P=class{constructor(e,t,n=document.createElement(`audio`)){this.onFail=t,this.header=null,this.time=0,this.on=!1,this.failed=!1,this.order=new ea,this.el=n,this.track=new ga(n,()=>this.fail(),e===`player`?Yi:e)}get playing(){return this.on&&!this.failed}report(){return{snd:`mse`,snd_jumps:this.track.seeks}}setHeader(e){this.header=e,this.on&&this.open()}start(){if(!this.on&&(this.on=!0,this.header&&this.open(),!this.failed))try{this.el.play()?.catch?.(()=>{})}catch{}}frame(e){if(!this.on||this.failed||!this.track.ready&&!this.track.backlog)return;let t=$i(e);if(!t||!this.order.take(t.index))return;let n=Ki(this.track.nextSeq(),this.time,t.packet);this.time+=Gi(t.packet),this.track.push(n)}setMuted(e){this.el.muted=e}resume(){if(this.playing&&this.el.paused)try{this.el.play()?.catch?.(()=>{})}catch{}}stop(){this.on=!1,this.track.close()}open(){let e=this.header;if(!e||e.length<6||this.failed)return;let t=e[0],n=Wi(t,new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(2));this.track.open(`audio/mp4; codecs="Opus"`,n)||this.track.open(`audio/mp4; codecs="opus"`,n)?(this.time=0,this.order.reset()):this.fail()}fail(){this.failed||(this.failed=!0,this.onFail())}},da=class{constructor(e,t,n=Ei){this.onFail=t,this.codecs=n,this.actx=null,this.pipe=null,this.header=null,this.on=!1,this.failed=!1,this.muted=!1,this.unarm=null,this.played=!1,this.clock=new ra(e===`player`?.05:.08)}get playing(){return this.on&&!this.failed}get stats(){return{decoded:this.pipe?.decoded??0,concealed:this.pipe?.concealed??0,underruns:this.clock.underruns,dropped:this.clock.dropped}}start(){if(!this.failed){this.on=!0,la();try{if(!this.actx){let e=new AudioContext({latencyHint:`interactive`});this.actx=e,e.onstatechange=()=>{this.actx===e&&e.state!==`running`&&e.state!==`closed`&&this.armResume()}}this.actx.resume().catch(()=>{}),this.actx.state!==`running`&&this.armResume()}catch{return this.fail()}this.header&&!this.pipe&&this.open()}}setHeader(e){e.length<6||(this.header=e,this.pipe?.reset(),this.pipe=null,this.clock.reset(),this.on&&this.open())}frame(e){this.on&&!this.failed&&this.pipe?.packet(e)}setMuted(e){this.muted=e}resume(){let e=this.actx;this.playing&&e&&e.state!==`running`&&e.state!==`closed`&&(this.clock.reset(),e.resume().catch(()=>{}),this.armResume())}stop(){this.on=!1,this.pipe?.reset(),this.pipe=null,this.unarm?.(),this.actx?.close().catch(()=>{}),this.actx=null}open(){let e=this.header;if(!e||this.failed)return;let t=new Qr((e,n)=>this.play(e,n,t.sampleRate),this.codecs,()=>{this.pipe===t&&this.fail()});this.pipe=t,t.header(ta(e))}play(e,t,n){let r=this.actx;if(!r||r.state!==`running`||!e.length)return;let i=e[0].length,a=this.clock.at(r.currentTime,i/n);if(a===null)return;let o=r.createBuffer(e.length,i,n),s=this.muted?0:t;e.forEach((e,t)=>o.copyToChannel(s===1?e:e.map(e=>e*s),t));let c=r.createBufferSource();c.buffer=o,c.connect(r.destination),c.start(a),this.played=!0}armResume(){if(this.unarm||typeof window>`u`||!window.addEventListener)return;let e=()=>{let e=this.actx;if(!e||e.state===`closed`)return this.unarm?.();this.clock.reset(),e.resume().then(()=>{e.state===`running`&&this.unarm?.()}).catch(()=>{})};for(let t of sa)window.addEventListener(t,e,!0);this.unarm=()=>{for(let t of sa)window.removeEventListener(t,e,!0);this.unarm=null}}fail(){this.failed||(this.failed=!0,this.stop(),this.onFail())}};function fa(){let e=window;return e.ManagedMediaSource??e.MediaSource??null}var pa=10,ma=3;function ha(e,t,n,r=ma){let i=null;for(let a of e)a>t&&a<=n-r&&(i=a);return i}var ga=class{constructor(e,t,n=`watch`,r,i=()=>performance.now()){this.el=e,this.onError=t,this.latency=n,this.onNeedKey=r,this.now=i,this.ms=null,this.sb=null,this.queue=[],this.mime=``,this.seq=1,this.ready=!1,this.dropped=!1,this.keys=null,this.seeks=0,this.maxLagS=0,this.fromZero=0,this.trims=0,this.lastJump=null,this.trimAt=-1,this.trimFrom=-1,this.keyAt=-1,this.attached=null,r&&(this.keys=[])}setEdge(e){this.latency=e}markKey(e){this.keys?.push(e),this.keyAt=this.now()}open(e,t){let n=fa();if(!n||!ua(n,e))return!1;this.close();let r=new n;return this.ms=r,this.mime=e,this.queue=[t],this.seq=1,this.ready=!1,this.keys&&=[],r.addEventListener(`sourceopen`,()=>{if(this.ms===r)try{let e=r.addSourceBuffer(this.mime);e.mode=`segments`,e.addEventListener(`updateend`,()=>this.pump()),e.addEventListener(`error`,()=>this.onError()),this.sb=e,this.ready=!0,this.pump()}catch{this.onError()}}),`ManagedMediaSource`in window&&n===window.ManagedMediaSource&&(this.el.disableRemotePlayback=!0),this.attached=_a(this.el,r),!0}nextSeq(){return this.seq++}get backlog(){return this.queue.length}push(e){this.queue.push(e),this.pump()}pump(){let e=this.sb;if(!e||e.updating||!this.ready)return;let t=this.el;if(e.buffered.length){let n=e.buffered.end(e.buffered.length-1),r=e.buffered.start(0),i=n-t.currentTime,a=Xi(i,n,this.latency);if(a.seekTo!==null){this.seeks++,this.maxLagS=Math.max(this.maxLagS,i);let o=this.now(),s=e=>e<0?-1:Math.round(o-e);t.currentTime<.05&&r>1&&this.fromZero++,this.lastJump={at:t.currentTime,start:r,end:n,ranges:e.buffered.length,readyState:t.readyState,paused:t.paused,seeking:t.seeking,sinceTrimMs:s(this.trimAt),trimFrom:this.trimFrom,sinceKeyMs:s(this.keyAt)},t.currentTime=Math.max(r,a.seekTo)}if(t.playbackRate!==a.rate&&(t.playbackRate=a.rate),t.currentTime-r>pa&&this.trim(e,r))return}let n=this.queue.shift();if(n){try{e.appendBuffer(n)}catch{this.dropped=!0}t.paused&&t.play().catch(()=>{})}}trim(e,t){let n=this.el.currentTime,r=n-ma;if(this.keys){if(r=ha(this.keys,t,n),r===null)return(this.keys[this.keys.length-1]??-1/0)<=n-ma&&this.onNeedKey?.(),!1;let e=r;this.keys=this.keys.filter(t=>t>=e),r-=.001}try{return e.remove(t,r),this.trims++,this.trimAt=this.now(),this.trimFrom=n,!0}catch{return!1}}close(){this.ready=!1,this.sb=null,this.queue=[];let e=this.ms;if(this.ms=null,e&&e.readyState===`open`)try{e.endOfStream()}catch{}if(this.attached===`object`)try{this.el.srcObject=null}catch{}this.attached=null,this.el.src?.startsWith(`blob:`)&&URL.revokeObjectURL(this.el.src),this.el.removeAttribute(`src`)}};function _a(e,t){if(`srcObject`in e)try{return e.srcObject=t,`object`}catch{}return e.src=URL.createObjectURL(t),`url`}var va=1e4,ya=class{constructor(e=3,t=va,n=()=>performance.now()){this.max=e,this.windowMs=t,this.now=n,this.at=[]}fail(){let e=this.now();return this.at=this.at.filter(t=>e-t=this.max}clear(){this.at=[]}},ba=class{constructor(e,t=`watch`,n,r){this.onProblem=e,this.latency=t,this.wasm=null,this.audioHeader=null,this.muted=!1,this.gaveUp=!1,this.reopening=!1,this.failedWhileOpening=!1,this.wrap=document.createElement(`div`),this.hevc=!1,this.header=null,this.sawKey=!1,this.stats=new oa(`mse`),this.problemShown=!1,this.vTime=0,this.vLast=0,this.soundOn=!1,this.onSoundFail=null,this.onGiveUp=null,this.keyAsk=new Qi(n),this.fails=new ya(3,va,r);let i=document.createElement(`video`);i.muted=!0,i.autoplay=!0,i.playsInline=!0,i.className=`block h-full w-full object-contain`,i.dataset.testid=`watch-video`,this.audio=new P(t,()=>this.soundThroughWasm()),this.wrap.className=`h-full w-full`,this.wrap.append(i,this.audio.el),this.video=new ga(i,()=>this.showProblem(),t,()=>this.keyAsk.waiting()),i.addEventListener(`error`,()=>this.restartVideo()),i.addEventListener(`playing`,()=>{this.fails.clear(),this.problemShown&&(this.problemShown=!1,this.onProblem(null))})}markProblemShown(){this.problemShown=!0}showProblem(){this.problemShown||(this.problemShown=!0,this.onProblem(`decode`))}restartVideo(){if(this.gaveUp)return;if(this.reopening){this.failedWhileOpening=!0;return}if(this.showProblem(),this.fails.fail()){this.gaveUp=!0,this.video.close(),this.onGiveUp?.();return}let e=this.header;if(e){this.header=null,this.reopening=!0,this.failedWhileOpening=!1;try{this.openVideo(e)}finally{this.reopening=!1}this.sawKey=!1,this.keyAsk.waiting(),this.failedWhileOpening&&(this.failedWhileOpening=!1,this.restartVideo())}}get failed(){return this.gaveUp}setVideoEdge(e){this.video.setEdge(e)}get videoSeeks(){return{seeks:this.video.seeks,maxLagMs:Math.round(this.video.maxLagS*1e3),fromZero:this.video.fromZero,trims:this.video.trims,lastJump:this.video.lastJump}}get element(){return this.wrap}resume(){let e=this.video.el;e.paused&&e.play()?.catch?.(()=>{})}setHevc(e){this.hevc=e}startSound(){if(this.soundOn=!0,this.wasm)return this.wasm.start();if(!N())return this.soundThroughWasm();this.audio.start()}soundThroughWasm(){if(this.wasm)return;this.audio.stop();let e=new da(this.latency,()=>this.onSoundFail?.());this.wasm=e,e.setMuted(this.muted),this.audioHeader&&e.setHeader(this.audioHeader),this.soundOn&&e.start()}resumeSound(){this.soundOn&&(this.wasm?this.wasm.resume():this.audio.resume())}setMuted(e){this.muted=e,this.audio.setMuted(e),this.wasm?.setMuted(e)}soundReport(){return this.soundOn?this.wasm?na(`wasm`,this.wasm.stats):this.audio.report():null}get soundPlaying(){return this.wasm?this.wasm.played:this.audio.playing}get sound(){return this.soundOn}onMessage(e){let t=new Uint8Array(e);if(t.length<1)return;let n=t[0],r=t.subarray(1);n===0?this.openVideo(r.slice()):n===1?this.onVideo(r):n===3?(this.audioHeader=r.slice(),(this.wasm??this.audio).setHeader(this.audioHeader)):n===4&&(this.wasm??this.audio).frame(r)}openVideo(e){let t=!!this.header&&this.header.length===e.length&&this.header.every((t,n)=>t===e[n]);if(t&&this.video.ready)return;if(this.gaveUp){if(t)return;this.gaveUp=!1,this.fails.clear()}this.header=e;let n=qr(e,this.hevc)??{w:1920,h:1080},r=Hi(e,this.hevc,n);r&&(this.stats.codec=/codecs="([^"]+)"/.exec(r.mime)?.[1]??``,this.video.open(r.mime,r.init)?(this.sawKey=!1,this.vTime=0,this.vLast=0):(this.problemShown=!0,this.onProblem(this.hevc?`no_hevc`:`decode`)))}onVideo(e){if(!this.video.ready&&!this.video.backlog)return;let t=Di(e,this.hevc);if(this.video.dropped&&(this.video.dropped=!1,this.sawKey=!1),this.stats.arrived(),!this.sawKey&&!t)return this.stats.drop(),this.keyAsk.waiting();if(!t&&this.video.backlog>qi[this.latency])return this.sawKey=!1,this.stats.drop(),this.keyAsk.waiting();this.sawKey=!0,this.stats.drawn();let n=performance.now(),r=this.vLast?Math.min(9e3,Math.max(750,Math.round((n-this.vLast)*90))):1500;this.vLast=n,t&&this.video.markKey(this.vTime/9e4),this.video.push(Ui(this.video.nextSeq(),this.vTime,r,e,this.hevc,t)),this.vTime+=r}stop(){this.video.close(),this.audio.stop(),this.wasm?.stop()}};async function xa(e){let t=Yr(e);if(t&&typeof VideoDecoder<`u`)try{if((await VideoDecoder.isConfigSupported({codec:t,codedWidth:1920,codedHeight:1080})).supported)return t}catch{}return Ai(1920,1080)}var F={CROSS:1,CIRCLE:2,SQUARE:4,TRIANGLE:8,LEFT:16,RIGHT:32,UP:64,DOWN:128,L1:256,R1:512,L3:1024,R3:2048,OPTIONS:4096,SHARE:8192,TOUCHPAD:16384,PS:32768},Sa={buttons:0,l2:0,r2:0,lx:0,ly:0,rx:0,ry:0};function Ca(e,t){let n=e=>Math.max(0,Math.min(1,e));return[Math.round(n(e)*1919),Math.round(n(t)*941)]}F.UP,F.DOWN,F.LEFT,F.RIGHT,F.CROSS,F.CROSS,F.CIRCLE,F.CIRCLE,F.SQUARE,F.TRIANGLE,F.L1,F.R1,F.L3,F.R3,F.OPTIONS,F.SHARE,F.PS,F.TOUCHPAD,F.UP,F.DOWN,F.LEFT,F.RIGHT,F.CROSS,F.CIRCLE,F.SQUARE,F.TRIANGLE,F.L1,F.R1,F.L3,F.R3,F.OPTIONS,F.SHARE,F.PS,F.TOUCHPAD;var wa=e=>Math.max(-32768,Math.min(32767,Math.round(e))),Ta=[F.CROSS,F.CIRCLE,F.SQUARE,F.TRIANGLE,F.L1,F.R1,0,0,F.SHARE,F.OPTIONS,F.L3,F.R3,F.UP,F.DOWN,F.LEFT,F.RIGHT,F.PS,F.TOUCHPAD];function Ea(e){return Math.abs(e)<=1.01?Math.round((e+1)*3.5)%8:null}var Da=[0,1,1,1,0,-1,-1,-1],Oa=[-1,-1,0,1,1,1,0,-1];function ka(e,t){let n=e.axes[t.a]??0;if(t.hat){let e=Ea(n);return e===null?0:(t.hat===`x`?Da:Oa)[e]}return t.inv?-n:n}var Aa={buttons:Ta.flatMap((e,t)=>e?[[e,{b:t}]]:[]),l2:{b:6},r2:{b:7},lx:{a:0},ly:{a:1},rx:{a:2},ry:{a:3}};function ja(e,t,n=!1){if(`b`in t){let r=e.buttons[t.b];return r?n&&r.value>0?Math.min(1,r.value):Math.max(+!!r.pressed,r.value):0}if(`h`in t){let n=Ea(e.axes[t.h]??9);if(n===null)return 0;let r=(n-t.at+8)%8;return+(r===0||r===1||r===7)}let r=e.axes[t.a];if(r===void 0)return 0;let i=t.rest??0;return Math.min(1,Math.max(0,(r-i)/(t.d-i)))}function Ma(e){if(e.mapping===`standard`)return Aa;let t=Na.get(e.id);if(t)return t;let n=e.axes.findIndex(e=>Math.abs(e)>1.05);if(n<0)return Aa;let r={...Aa,buttons:[...Aa.buttons,[F.UP,{h:n,at:0}],[F.RIGHT,{h:n,at:2}],[F.DOWN,{h:n,at:4}],[F.LEFT,{h:n,at:6}]]};return Na.set(e.id,r),r}var Na=new Map;function Pa(e,t=Ma){let n={...Sa},r=e=>Math.abs(e)<.08?0:wa(e*32767),i=(e,t)=>Math.abs(t)>Math.abs(e)?t:e,a=(e,t)=>t?r(ka(e,t)):0;for(let r of e){if(!r||!r.connected)continue;let e=t(r);for(let[t,i]of e.buttons)ja(r,i)>.5&&(n.buttons|=t);e.l2&&(n.l2=Math.max(n.l2,Math.round(ja(r,e.l2,!0)*255))),e.r2&&(n.r2=Math.max(n.r2,Math.round(ja(r,e.r2,!0)*255))),n.lx=i(n.lx,a(r,e.lx)),n.ly=i(n.ly,a(r,e.ly)),n.rx=i(n.rx,a(r,e.rx)),n.ry=i(n.ry,a(r,e.ry))}return n}function Fa(e,t){return{buttons:e.buttons|t.buttons,l2:Math.max(e.l2,t.l2),r2:Math.max(e.r2,t.r2),lx:wa(e.lx+t.lx),ly:wa(e.ly+t.ly),rx:wa(e.rx+t.rx),ry:wa(e.ry+t.ry),touch:e.touch??t.touch??null,motion:e.motion??t.motion??null}}var I=e=>e.toLowerCase().padStart(4,`0`);function Ia(e){let t=/^(.*?)\s*\((?:[^()]*?\s)?Vendor:\s*([0-9a-f]{1,4})\s+Product:\s*([0-9a-f]{1,4})\s*\)\s*$/i.exec(e);if(t)return{vendor:I(t[2]),product:I(t[3]),name:t[1].trim()};let n=/^([0-9a-f]{1,4})-([0-9a-f]{1,4})-(.*)$/i.exec(e.trim());return n?{vendor:I(n[1]),product:I(n[2]),name:n[3].trim()}:null}function La(e=globalThis.navigator){let t=e?.userAgent??``;return/Android|iPhone|iPad|iPod/i.test(t)?null:/Macintosh|Mac OS X/i.test(t)?(e?.maxTouchPoints??0)>1?null:`m`:/Windows/i.test(t)?`w`:/Linux|CrOS|X11/i.test(t)?`l`:null}function Ra(e,t){if(!t)return null;let n=t===`l`?[`l`]:[`m`,`w`];for(let t of n){let n=Ge[`${t}${e.vendor}${e.product}`];if(n!==void 0)return We[n]??null}return null}var za={1:0,2:2,4:4,8:6};function Ba(e){let t=0,n=!1;for(let r of e){let e=/a(\d+)/.exec(r);e&&(t=Math.max(t,Number(e[1])+1)),r.startsWith(`h`)&&(n=!0)}return{n:t,hat:n}}function Va(e,t,n){let{n:r,hat:i}=Ba(t),a=Ta.length,o=e.axes.findIndex(e=>Math.abs(e)>1.05),s=e=>e;if(i&&o<0)return n===`l`&&e.axes.length>=r+2?{hat:-1,hatXY:r,axis:s}:null;if(!(i?o>r:n!==`l`&&e.axes.length>=r+2))return{hat:o,hatXY:-1,axis:s};if(r<=4)return{hat:o,hatXY:-1,axis:e=>[0,1,2,5][e]??e};let c=t[a+2]?.replace(`~`,``)===`a2`&&t[a+3]?.replace(`~`,``)===`a3`,l=[t[6],t[7]].every(e=>/^a[45]~?$/.test(e??``));return r===6&&c&&l?{hat:o,hatXY:-1,axis:e=>[0,1,2,5,3,4][e]??e}:{hat:o,hatXY:-1,axis:s}}function Ha(e,t){let n=/^b(\d+)$/.exec(e);if(n)return{b:Number(n[1])};if(n=/^([+-]?)a(\d+)(~?)$/.exec(e),n){let e=t.axis(Number(n[2]));return n[1]===`+`?{a:e,d:1}:n[1]===`-`?{a:e,d:-1}:n[3]?{a:e,d:-1,rest:1}:{a:e,d:1,rest:-1}}if(n=/^h0\.(\d)$/.exec(e),n){let e=za[n[1]];if(e===void 0)return null;if(t.hat>=0)return{h:t.hat,at:e};if(t.hatXY>=0)return e===0?{a:t.hatXY+1,d:-1}:e===4?{a:t.hatXY+1,d:1}:e===6?{a:t.hatXY,d:-1}:{a:t.hatXY,d:1}}return null}function Ua(e,t){let n=/^a(\d+)(~?)$/.exec(e);if(n)return n[2]?{a:t.axis(Number(n[1])),inv:!0}:{a:t.axis(Number(n[1]))};if(e===`hx`||e===`hy`){if(t.hat>=0)return{a:t.hat,hat:e===`hx`?`x`:`y`};if(t.hatXY>=0)return{a:t.hatXY+ +(e===`hy`)}}return null}function Wa(e,t,n){let r=e.split(`,`),i=Va(t,r,n);if(!i)return null;let a={buttons:[],l2:null,r2:null,lx:null,ly:null,rx:null,ry:null};for(let e=0;eArray.isArray(e)&&e.length===2&&typeof e[0]==`number`&&Ja(e[1]))&&[t.l2,t.r2,t.lx,t.ly,t.rx,t.ry].every(Ja)}function Xa(){try{let e=yt(qa),t=e?JSON.parse(e):null;return!t||typeof t!=`object`||Array.isArray(t)?{}:Object.fromEntries(Object.entries(t).filter(e=>Ya(e[1])))}catch{return{}}}function Za(e,t){let n=Xa();return t?n[e]=t:delete n[e],vt(qa,JSON.stringify(n)),Qa=n,n}var Qa=null;function $a(e){return Qa??=Xa(),Qa[e.id]??eo(Qa,e.id)??Ka(e)??Ma(e)}function eo(e,t){if(!t.endsWith(` (app)`))return null;let n=t.slice(0,-6).trim().toLowerCase();if(!n)return null;let r=Object.keys(e).filter(e=>{let t=e.trim().toLowerCase();return t===n||t.includes(n)}),i=r.find(e=>e.trim().toLowerCase()===n)??(r.length===1?r[0]:null);return i?(Qa=Za(t,e[i]),e[i]):null}[{kind:`button`,bit:F.CROSS,name:`✕`},{kind:`button`,bit:F.CIRCLE,name:`○`},{kind:`button`,bit:F.SQUARE,name:`□`},{kind:`button`,bit:F.TRIANGLE,name:`△`},{kind:`button`,bit:F.UP,name:`↑`},{kind:`button`,bit:F.DOWN,name:`↓`},{kind:`button`,bit:F.LEFT,name:`←`},{kind:`button`,bit:F.RIGHT,name:`→`},{kind:`button`,bit:F.L1,name:`L1`},{kind:`button`,bit:F.R1,name:`R1`},{kind:`trigger`,which:`l2`,name:`L2`},{kind:`trigger`,which:`r2`,name:`R2`},{kind:`button`,bit:F.L3,name:`L3`},{kind:`button`,bit:F.R3,name:`R3`},{kind:`button`,bit:F.OPTIONS,name:`Options`},{kind:`button`,bit:F.SHARE,name:`Create`},{kind:`button`,bit:F.PS,name:`PS`},{kind:`button`,bit:F.TOUCHPAD,name:`Touchpad`},{kind:`axis`,which:`lx`,name:`L →`},{kind:`axis`,which:`ly`,name:`L ↓`},{kind:`axis`,which:`rx`,name:`R →`},{kind:`axis`,which:`ry`,name:`R ↓`}].filter(e=>e.kind!==`button`||![F.L3,F.R3,F.OPTIONS,F.SHARE,F.PS,F.TOUCHPAD].includes(e.bit));var to=12e4;function no(e){let t;try{t=JSON.parse(e)}catch{return null}return Array.isArray(t.rumble)?{rumble:[Number(t.rumble[0])||0,Number(t.rumble[1])||0]}:Array.isArray(t.light)?{light:t.light}:t.stage===`asking`?{kind:`asking`}:t.stage===`refused`?{kind:`refused`,why:String(t.why??``)}:t.stage===`joined`?{kind:`joined`,host:t.session?.host??null,playing:!!t.session?.playing,passcode:!!t.session?.passcode}:null}function ro(e,t){return e.buttons===t.buttons&&e.l2===t.l2&&e.r2===t.r2&&e.lx===t.lx&&e.ly===t.ly&&e.rx===t.rx&&e.ry===t.ry&&(e.touch?.[0]??-1)===(t.touch?.[0]??-1)&&(e.touch?.[1]??-1)===(t.touch?.[1]??-1)&&(e.motion?.t??-1)===(t.motion?.t??-1)}var io=class{constructor(e){this.o=e,this.ws=null,this.last={...Sa},this.lastSent=0,this.raf=0,this.keepalive=null,this.watchdog=null,this.retry=null,this.done=!1,this.stage={kind:`connecting`},this.wasIn=!1,this.attempt=0,this.deadline=0,this.lastHeard=0,this.control=!1,this.neutral=!1,this.now=e.now??(()=>Date.now()),this.WS=e.WebSocketImpl??WebSocket}get currentStage(){return this.stage}setStage(e){this.stage=e,this.o.onStage(e)}start(){if(this.done=!1,this.setStage({kind:`connecting`}),this.connect(),this.done)return;let e=this.o.raf??(e=>window.requestAnimationFrame(e)),t=()=>{this.send(!1),this.raf=e(t)};this.raf=e(t),this.keepalive=setInterval(()=>this.send(!1),250),this.watchdog=setInterval(()=>this.checkSilence(),1e3)}connect(){let e;this.lastHeard=this.now();try{e=new this.WS(this.o.url)}catch{this.dropped();return}this.ws=e,e.binaryType=`arraybuffer`,this.control=!this.o.watch,this.o.watch&&this.o.watch.onControl(!1),e.onmessage=t=>{this.ws===e&&(this.lastHeard=this.now(),this.onMessage(t.data))},e.onclose=t=>{if(this.ws!==e)return;this.ws=null;let n=Le(t);n&&!this.wasIn?this.finish({kind:`refused`,why:`net:${n}`}):this.dropped()},e.onopen=()=>{this.ws===e&&(this.lastHeard=this.now(),this.o.hello&&e.send(JSON.stringify({hello:this.o.hello})),this.send(!0))}}onMessage(e){if(typeof e!=`string`){e instanceof ArrayBuffer&&this.o.watch?.onFrame(e);return}if(this.o.hello&&e.startsWith(`{"rt":`))try{let t=JSON.parse(e);if(typeof t.rt==`string`&&/^[0-9a-f]{32}$/.test(t.rt)){this.o.hello.rt=t.rt,this.o.onReconnectToken?.(t.rt);return}}catch{}if(e.includes(`"kbm_caps"`))try{let t=JSON.parse(e);if(t.kbm_caps){let e=t.kbm_caps;this.o.onKbmCaps?.({mouse:e.mouse===!0,keyboard:e.keyboard===!0,reason:typeof e.reason==`string`?e.reason:null});return}}catch{}if(this.o.watch)try{let t=JSON.parse(e);if(t.watch&&this.o.watch.onCodec(!!t.watch.hevc),typeof t.control==`boolean`){this.control=t.control,this.o.watch.onControl(t.control),t.control&&this.send(!0);return}}catch{}let t=no(e);if(t){if(`rumble`in t){let[e,n]=t.rumble;navigator.vibrate?.(e||n?250:0)}else if(`light`in t)this.o.onLight?.(t.light);else if(t.kind===`refused`)this.finish(t);else{if(t.kind===`joined`){let e=this.stage.kind!==`joined`;this.wasIn=!0,this.attempt=0,this.setStage(t),e&&this.send(!0);return}this.setStage(t)}}}dropped(){if(this.done)return;if(!this.wasIn||(this.stage.kind!==`reconnecting`&&(this.deadline=this.now()+to),this.now()>=this.deadline)){this.finish({kind:`lost`});return}let e=Re(this.attempt);this.setStage({kind:`reconnecting`,attempt:this.attempt}),this.attempt+=1,this.retry&&clearTimeout(this.retry),this.retry=setTimeout(()=>{this.retry=null,this.done||this.connect()},e)}checkSilence(){let e=this.ws;if(e&&!this.done&&(this.stage.kind===`joined`||this.stage.kind===`reconnecting`)&&!(this.now()-this.lastHeard<=3500)){this.ws=null;try{e.close()}catch{}this.dropped()}}wake(){this.stage.kind===`lost`&&this.wasIn?(this.attempt=0,this.start()):this.stage.kind===`reconnecting`&&(this.deadline=this.now()+to,this.attempt=0,this.retry&&(clearTimeout(this.retry),this.retry=null,this.connect()))}setNeutral(e){this.neutral!==e&&(this.neutral=e,this.send(!0))}current(){let e=Pa(Ue(typeof navigator>`u`?void 0:navigator),$a),t=this.o.touchPad();return{...Fa(e,t),touch:t.touch??null,motion:this.o.motion?.()??null}}send(e){let t=this.ws;if(!t||t.readyState!==this.WS.OPEN||!this.control)return;let n=this.neutral?{...Sa,touch:null,motion:null}:this.current(),r=this.now();!e&&ro(n,this.last)&&r-this.lastSent<250||(this.last=n,this.lastSent=r,t.send(JSON.stringify({pad:{...n,touch:n.touch??null,motion:n.motion??null},ka:1})))}askKeyframe(){let e=this.ws;e&&e.readyState===this.WS.OPEN&&e.send(JSON.stringify({keyframe:!0}))}sendKbm(e){let t=this.ws;return!t||t.readyState!==this.WS.OPEN||!this.control?!1:(t.send(e instanceof Uint8Array?e:JSON.stringify(e)),!0)}sendPad(){this.send(!1)}clearTimers(){(this.o.cancelRaf??(e=>window.cancelAnimationFrame(e)))(this.raf),this.keepalive&&clearInterval(this.keepalive),this.watchdog&&clearInterval(this.watchdog),this.retry&&clearTimeout(this.retry),this.keepalive=this.watchdog=this.retry=null}finish(e){this.done=!0,this.clearTimers();let t=this.ws;this.ws=null;try{t?.close()}catch{}this.setStage(e)}stop(){this.done=!0,this.clearTimers();let e=this.ws;this.ws=null,e&&e.readyState===this.WS.OPEN&&e.send(JSON.stringify({pad:{...Sa,touch:null}})),e?.close()}},ao=`ps5upload.pad.device`;function oo(e,t=e=>crypto.getRandomValues(e)){let n=e.get(ao);if(n&&/^[0-9a-f]{32}$/.test(n))return n;let r=new Uint8Array(16);t(r);let i=Array.from(r,e=>e.toString(16).padStart(2,`0`)).join(``);return e.set(ao,i),i}var so=new Set,co={held:new Set,touch:null,touchPad:Sa,mapping:!1,get paused(){return so.size>0},motion:null},lo={s:.85,m:1,l:1.15},uo=.25;function fo(e){return typeof e!=`number`||!Number.isFinite(e)?1:Math.min(1,Math.max(uo,e))}var po={overlay:{width:844,height:390},deck:{width:390,height:480}},mo=.7,ho=1.4;function go(e,t,n,r){let i=lo[e]??1;if(!(t>0)||!(n>0))return i;let a=r?po.deck:po.overlay,o=Math.min(ho,Math.max(mo,Math.min(t/a.width,n/a.height)));return Math.round(o*i*1e3)/1e3}var _o=34;function vo(e,t){return t>0&&8+Math.max(112*e,90)+156*e+124*e+Math.max(56*e,44)+_o>t}function yo(e,t,n){let r=e/32767,i=t/32767,a=Math.hypot(r,i),o=a>1?1/a:1;return{dx:r*o*n,dy:i*o*n}}var bo=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),L=s(((e,t)=>{t.exports=bo()}))(),xo=`calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2)`,So=32767,Co=12;function wo({stream:e,layout:t=`overlay`,opacity:n=1,size:r=`m`,deckTop:i=`0px`,onMenu:a}){let o=Tn(),s=(0,T.useRef)(new Map),c=(0,T.useRef)({...Sa}),[l,u]=(0,T.useState)({...Sa}),[d,f]=(0,T.useState)({l:!1,r:!1,touchpad:!1}),p=(0,T.useRef)(null),[m,h]=(0,T.useState)({width:0,height:0});(0,T.useEffect)(()=>{let e=p.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect();h(e=>e.width===t.width&&e.height===t.height?e:{width:t.width,height:t.height})};if(t(),typeof ResizeObserver>`u`)return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t);let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]),(0,T.useEffect)(()=>()=>{co.touchPad={...Sa}},[]);let g=()=>{let t={...Sa,touch:null},n={l:!1,r:!1,touchpad:!1};for(let e of s.current.values())e.kind===`stick`&&(n[e.which]=!0),e.kind===`touchpad`&&(n.touchpad=!0),e.kind===`button`&&(t.buttons|=e.bit),e.kind===`trigger`&&(t[e.which]=255),e.kind===`touchpad`&&e.pressed&&(t.buttons|=F.TOUCHPAD);t.lx=c.current.lx,t.ly=c.current.ly,t.rx=c.current.rx,t.ry=c.current.ry,t.touch=c.current.touch??null,co.touchPad=t,e?.sendPad(),u(t),f(e=>e.l===n.l&&e.r===n.r&&e.touchpad===n.touchpad?e:n)},_=(e,t,n)=>{let r=Math.max(-1,Math.min(1,(t-e.cx)/e.radius)),i=Math.max(-1,Math.min(1,(n-e.cy)/e.radius));c.current[e.which===`l`?`lx`:`rx`]=Math.round(r*So),c.current[e.which===`l`?`ly`:`ry`]=Math.round(i*So)},v=(e,t)=>{e.preventDefault(),e.stopPropagation();let n=e.currentTarget;try{n.setPointerCapture(e.pointerId)}catch{}let r=t(n);s.current.set(e.pointerId,r),r.kind===`stick`&&_(r,e.clientX,e.clientY),r.kind===`touchpad`&&(c.current.touch=Ca((e.clientX-r.rect.left)/r.rect.width,(e.clientY-r.rect.top)/r.rect.height)),navigator.vibrate?.(8),g()},y=e=>{let t=s.current.get(e.pointerId);if(t){if(e.stopPropagation(),t.kind===`stick`)_(t,e.clientX,e.clientY);else if(t.kind===`touchpad`)c.current.touch=Ca((e.clientX-t.rect.left)/t.rect.width,(e.clientY-t.rect.top)/t.rect.height),t.pressed&&Math.hypot(e.clientX-t.x0,e.clientY-t.y0)>Co&&(t.pressed=!1);else return;g()}},b=e=>{let t=s.current.get(e.pointerId);t&&(e.stopPropagation(),s.current.delete(e.pointerId),t.kind===`stick`&&(c.current[t.which===`l`?`lx`:`rx`]=0,c.current[t.which===`l`?`ly`:`ry`]=0),t.kind===`touchpad`&&(c.current.touch=null),g())},x=e=>e.stopPropagation(),S={onPointerMove:y,onPointerUp:b,onPointerCancel:b,onClick:x,onDoubleClick:x},ee=e=>(l.buttons&e)!==0,te=e=>`border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.35)] transition-colors duration-75 ${e?`border-white bg-white/50`:`border-white/70 bg-white/10`}`,C=`text-white [text-shadow:0_1px_2px_rgba(0,0,0,0.6)]`,ne={filter:`drop-shadow(0 0 1.5px rgba(0,0,0,0.5))`},w=e=>({stroke:e?`#fff`:`rgba(255,255,255,0.75)`,fill:e?`rgba(255,255,255,0.5)`:`rgba(255,255,255,0.1)`}),re=`pointer-events-auto flex touch-none select-none items-center justify-center bg-transparent p-0`,ie={minHeight:`calc(44px / var(--k))`,minWidth:`calc(44px / var(--k))`},ae=(e,t,n,r)=>(0,L.jsx)(`button`,{type:`button`,"aria-label":e,onPointerDown:e=>v(e,()=>({kind:`button`,bit:t})),...S,className:`${re} ${n}`,style:ie,children:r}),oe=(e,t,n,r)=>(0,L.jsx)(`span`,{className:`flex h-[32px] w-[76px] items-center justify-center text-[13px] font-semibold tracking-wide ${C} ${te(t)}`,style:{borderRadius:r?n===`l`?`16px 9px 9px 9px`:`9px 16px 9px 9px`:`9px`},children:e}),se=(e,t,n,r)=>ae(e,t,`h-[44px] w-[84px]`,oe(e,ee(t),n,r)),ce=(e,t,n)=>(0,L.jsx)(`button`,{type:`button`,"aria-label":e,onPointerDown:e=>v(e,()=>({kind:`trigger`,which:t})),...S,className:`${re} h-[44px] w-[84px]`,style:ie,children:oe(e,l[t]>0,n,!0)}),le=(e,t,n)=>ae(e,t,`h-[52px] w-[52px]`,(0,L.jsx)(`svg`,{viewBox:`0 0 52 52`,width:`52`,height:`52`,"aria-hidden":!0,style:ne,children:(0,L.jsxs)(`g`,{transform:`rotate(${n} 26 26)`,strokeWidth:`1.5`,strokeLinejoin:`round`,...w(ee(t)),children:[(0,L.jsx)(`path`,{d:`M10 9 Q10 3 16 3 L36 3 Q42 3 42 9 L42 30 Q42 34.5 38.5 38 L29.5 47 Q26 50.5 22.5 47 L13.5 38 Q10 34.5 10 30 Z`}),(0,L.jsx)(`path`,{d:`M20.5 23 L26 17 L31.5 23`,fill:`none`,stroke:`#fff`,strokeLinecap:`round`,strokeWidth:`1.8`})]})})),ue=(e,t,n)=>ae(e,t,`h-[52px] w-[52px]`,(0,L.jsxs)(`svg`,{viewBox:`0 0 52 52`,width:`52`,height:`52`,"aria-hidden":!0,style:ne,children:[(0,L.jsx)(`circle`,{cx:`26`,cy:`26`,r:`22.5`,strokeWidth:`1.5`,...w(ee(t))}),(0,L.jsx)(`g`,{fill:`none`,stroke:`#fff`,strokeWidth:`1.8`,strokeLinejoin:`round`,strokeLinecap:`round`,children:n})]})),de=(e,t)=>ae(e,t,`h-[44px] min-w-[64px] px-[4px]`,(0,L.jsx)(`span`,{className:`flex h-[24px] items-center rounded-full px-[10px] text-[10px] font-semibold uppercase tracking-wider ${C} ${te(ee(t))}`,children:e})),fe=(e,t)=>ae(e,t,`h-[44px] w-[44px]`,(0,L.jsx)(`span`,{className:`flex h-[36px] w-[36px] items-center justify-center rounded-full text-[11px] font-bold ${C} ${te(ee(t))}`,children:e})),pe=e=>{let{dx:t,dy:n}=yo(e===`l`?l.lx:l.rx,e===`l`?l.ly:l.ry,34),r=d[e];return(0,L.jsx)(`div`,{"aria-label":e===`l`?o(`rp_touch_left_stick`,void 0,`Left stick`):o(`rp_touch_right_stick`,void 0,`Right stick`),onPointerDown:t=>v(t,t=>{let n=t.getBoundingClientRect();return{kind:`stick`,which:e,cx:n.left+n.width/2,cy:n.top+n.height/2,radius:n.width/2}}),...S,className:`pointer-events-auto relative h-[124px] w-[124px] touch-none rounded-full border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.3)] transition-colors duration-75 ${r?`border-white/80 bg-white/[0.12]`:`border-white/45 bg-white/[0.05]`}`,children:(0,L.jsx)(`div`,{className:`absolute left-1/2 top-1/2 h-[54px] w-[54px] rounded-full ${te(r)}`,style:{transform:`translate(calc(-50% + ${t}px), calc(-50% + ${n}px))`}})})},E=t===`deck`,me=go(r,m.width,m.height,E),he=e=>`${e}px * var(--k)`,ge=`max(12px, env(safe-area-inset-left))`,ve=`max(12px, env(safe-area-inset-right))`,ye=`max(12px, env(safe-area-inset-bottom))`,be=E?`8px`:t===`overlay-bar`?`3.5rem`:`max(10px, env(safe-area-inset-top))`,xe=(e,t,n=0)=>t?n?`calc(${e} + max(${he(t)}, ${n}px))`:`calc(${e} + ${he(t)})`:e,Se=(e,t)=>({position:`absolute`,...t,transform:`scale(var(--k))`,transformOrigin:e}),Ce=E&&vo(me,m.height),D=E?void 0:`58%`,O=e=>E?{top:xe(be,Ce?96:112,Ce?72:90),[e]:e===`left`?ge:ve}:{top:D,translate:`0 -50%`,[e]:e===`left`?ge:ve},we=e=>({bottom:Ce?ye:xe(ye,E?56:0,44),[e]:Ce?`calc(${e===`left`?ge:ve} + 8px + max(${he(80)}, 44px))`:xe(e===`left`?ge:ve,E?40:168)}),Te=!!a&&!E;return(0,L.jsxs)(`div`,{ref:p,className:`pointer-events-none absolute z-10 select-none [-webkit-touch-callout:none] ${E?`inset-x-0 bottom-0`:`inset-0`}`,style:{top:E?i:void 0,"--k":me},"data-testid":`rp-touch`,"data-layout":t,"data-scale":me,onContextMenu:e=>e.preventDefault(),children:[(0,L.jsxs)(`div`,{className:`absolute inset-0`,style:{opacity:fo(n)},children:[(0,L.jsx)(`div`,{style:Se(`top left`,{top:be,left:ge}),children:(0,L.jsxs)(`div`,{className:`ms-[8px] flex flex-col`,style:{rotate:E?void 0:`6deg`,transformOrigin:`top left`},children:[ce(`L2`,`l2`,`l`),se(`L1`,F.L1,`l`,!1)]})}),(0,L.jsx)(`div`,{style:Se(`top right`,{top:be,right:ve}),children:(0,L.jsxs)(`div`,{className:`me-[8px] flex flex-col items-end`,style:{rotate:E?void 0:`-6deg`,transformOrigin:`top right`},children:[ce(`R2`,`r2`,`r`),se(`R1`,F.R1,`r`,!1)]})}),(0,L.jsx)(`div`,{"aria-label":o(`rp_touch_touchpad`,void 0,`Touchpad`),onPointerDown:e=>v(e,t=>({kind:`touchpad`,rect:t.getBoundingClientRect(),x0:e.clientX,y0:e.clientY,pressed:!0})),...S,className:`pointer-events-auto absolute touch-none rounded-2xl border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.3)] transition-colors duration-75 ${d.touchpad?`border-white/80 bg-white/25`:`border-white/40 bg-white/[0.05]`}`,style:E?{top:xe(be,6),left:xe(ge,104),right:xe(ve,104),height:`max(44px, calc(${he(64)}))`}:{top:be,left:`50%`,translate:`-50% 0`,width:`min(calc(${he(250)}), 34vw)`,height:`max(44px, calc(${he(56)}))`}}),(0,L.jsxs)(`div`,{className:`grid grid-cols-3 grid-rows-3`,style:Se(E?`top left`:`left center`,O(`left`)),children:[(0,L.jsx)(`span`,{}),le(`↑`,F.UP,0),(0,L.jsx)(`span`,{}),le(`←`,F.LEFT,-90),(0,L.jsx)(`span`,{}),le(`→`,F.RIGHT,90),(0,L.jsx)(`span`,{}),le(`↓`,F.DOWN,180),(0,L.jsx)(`span`,{})]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-3 grid-rows-3`,style:Se(E?`top right`:`right center`,O(`right`)),children:[(0,L.jsx)(`span`,{}),ue(`△`,F.TRIANGLE,(0,L.jsx)(`path`,{d:`M26 16.5 L35 32 L17 32 Z`})),(0,L.jsx)(`span`,{}),ue(`□`,F.SQUARE,(0,L.jsx)(`rect`,{x:`18`,y:`18`,width:`16`,height:`16`,rx:`1`})),(0,L.jsx)(`span`,{}),ue(`○`,F.CIRCLE,(0,L.jsx)(`circle`,{cx:`26`,cy:`26`,r:`8.5`})),(0,L.jsx)(`span`,{}),ue(`✕`,F.CROSS,(0,L.jsx)(`path`,{d:`M19 19 L33 33 M33 19 L19 33`})),(0,L.jsx)(`span`,{})]}),(0,L.jsx)(`div`,{style:Se(`bottom left`,we(`left`)),children:pe(`l`)}),(0,L.jsx)(`div`,{style:Se(`bottom right`,we(`right`)),children:pe(`r`)}),(0,L.jsx)(`div`,{style:Se(`bottom left`,{bottom:ye,left:ge}),children:de(`Create`,F.SHARE)}),(0,L.jsx)(`div`,{style:Se(`bottom right`,{bottom:ye,right:ve}),children:de(`Options`,F.OPTIONS)}),(0,L.jsx)(`div`,{style:Se(`bottom center`,{bottom:Ce?xe(ye,124,88):xe(ye,Te?48:0,48),left:xo,translate:`-50% 0`}),children:fe(`PS`,F.PS)})]}),Te&&(0,L.jsx)(`div`,{style:{...Se(`bottom center`,{bottom:ye,left:`calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2)`,translate:`-50% 0`}),opacity:Math.max(.7,fo(n))},children:(0,L.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),a?.()},onDoubleClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),"aria-label":o(`rp_menu`,void 0,`Menu`),"aria-haspopup":`dialog`,className:`${re} h-[44px] w-[56px]`,style:ie,"data-testid":`rp-menu-handle`,children:(0,L.jsx)(`span`,{className:`flex h-[26px] w-[44px] items-center justify-center rounded-full ${C} ${te(!1)}`,children:(0,L.jsx)(_e,{size:15,strokeWidth:2,"aria-hidden":!0})})})})]})}var To=class{constructor(e,t=()=>1){this.sink=e,this.speed=t,this.fingers=new Map,this.most=0,this.moved=!1,this.gestureT0=0,this.lastTap=null,this.dragging=!1}down(e,t,n,r){if(!this.fingers.size){this.most=0,this.moved=!1,this.gestureT0=r;let e=this.lastTap;e&&r-e.t<=300&&Math.hypot(t-e.x,n-e.y)<=40&&(this.dragging=!0,this.sink.button(0,!0)),this.lastTap=null}this.fingers.set(e,{x:t,y:n,x0:t,y0:n,t0:r}),this.most=Math.max(this.most,this.fingers.size)}move(e,t,n){let r=this.fingers.get(e);if(!r)return;let i=t-r.x,a=n-r.y;if(r.x=t,r.y=n,!this.moved&&Math.hypot(t-r.x0,n-r.y0)>10&&(this.moved=!0),!this.moved)return;if(this.fingers.size>=2){if(this.dragging)return;let e=this.fingers.size;this.sink.scroll(-a/e,-i/e);return}if(this.most>=2)return;let o=this.speed();this.sink.move(i*o,a*o)}up(e,t){let n=this.fingers.get(e);if(!n||(this.fingers.delete(e),this.fingers.size))return;if(this.dragging){this.dragging=!1,this.sink.button(0,!1);return}let r=t-this.gestureT0<=250+(this.most>=2?150:0);if(this.moved||!r)return;let i=this.most>=2?2:0;this.sink.button(i,!0),this.sink.button(i,!1),i===0&&(this.lastTap={t,x:n.x,y:n.y})}cancel(){this.fingers.clear(),this.lastTap=null,this.dragging&&(this.dragging=!1,this.sink.button(0,!1))}},Eo={" ":`Space`,"-":`Minus`,"=":`Equal`,"[":`BracketLeft`,"]":`BracketRight`,"\\":`Backslash`,";":`Semicolon`,"'":`Quote`,"`":`Backquote`,",":`Comma`,".":`Period`,"/":`Slash`,"\n":`Enter`,"\r":`Enter`," ":`Tab`},Do={"!":`Digit1`,"@":`Digit2`,"#":`Digit3`,$:`Digit4`,"%":`Digit5`,"^":`Digit6`,"&":`Digit7`,"*":`Digit8`,"(":`Digit9`,")":`Digit0`,_:`Minus`,"+":`Equal`,"{":`BracketLeft`,"}":`BracketRight`,"|":`Backslash`,":":`Semicolon`,'"':`Quote`,"~":`Backquote`,"<":`Comma`,">":`Period`,"?":`Slash`};function Oo(e){return e.length===1?e>=`a`&&e<=`z`?{code:`Key${e.toUpperCase()}`,shift:!1}:e>=`A`&&e<=`Z`?{code:`Key${e}`,shift:!0}:e>=`0`&&e<=`9`?{code:`Digit${e}`,shift:!1}:Eo[e]?{code:Eo[e],shift:!1}:Do[e]?{code:Do[e],shift:!0}:null:null}var ko={Backspace:`Backspace`,Enter:`Enter`,Tab:`Tab`,Escape:`Escape`,Delete:`Delete`,ArrowUp:`ArrowUp`,ArrowDown:`ArrowDown`,ArrowLeft:`ArrowLeft`,ArrowRight:`ArrowRight`,Home:`Home`,End:`End`,PageUp:`PageUp`,PageDown:`PageDown`};function Ao(e){return ko[e]??null}function jo(e,t){let n=``;for(let r of t){let t=Oo(r);t?Mo(e,t.code,t.shift):n+=r}return n}function Mo(e,t,n=!1){let r=n&&!e.shiftHeld?.();r&&e.key(`ShiftLeft`,!0),e.key(t,!0),e.key(t,!1),r&&e.key(`ShiftLeft`,!1)}function No(e,t){let n=[...e],r=[...t],i=0;for(;i{o.current=e,s.current=t});let c=(0,T.useRef)(null),l=()=>c.current??=new To({move:(e,t)=>o.current?.move(e,t),button:(e,t)=>o.current?.button(e,t),scroll:(e,t)=>o.current?.scroll(e,t)},()=>s.current);(0,T.useEffect)(()=>()=>c.current?.cancel(),[]);let u=e=>e.stopPropagation();return(0,L.jsx)(`div`,{className:`touch-none select-none [-webkit-touch-callout:none] ${n}`,style:r,"data-testid":a,onPointerDown:e=>{u(e);try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}l().down(e.pointerId,e.clientX,e.clientY,e.timeStamp)},onPointerMove:e=>{u(e),l().move(e.pointerId,e.clientX,e.clientY)},onPointerUp:e=>{u(e),l().up(e.pointerId,e.timeStamp)},onPointerCancel:e=>{u(e),l().cancel()},onClick:u,onDoubleClick:u,onContextMenu:e=>{e.preventDefault(),u(e)},children:i})}var R=` `,Fo=40;function Io({sink:e,onUntypeable:t,className:n=``}){let r=Tn(),i=(0,T.useRef)(null),a=(0,T.useRef)(R),o=(0,T.useRef)(!1),[s,c]=(0,T.useState)(!1),[l,u]=(0,T.useState)(!1);(0,T.useEffect)(()=>{if(!l)return;let e=window.setTimeout(()=>u(!1),3e3);return()=>window.clearTimeout(e)},[l]);let d=()=>{let e=i.current;e&&!o.current&&(!e.value.startsWith(R)||e.value.length>Fo)&&(e.value=R,a.current=R)},f=()=>{let n=i.current;if(!n||!e)return;let{deleted:r,inserted:o}=No(a.current,n.value);a.current=n.value;for(let t=0;te.stopPropagation(),onClick:e=>{e.stopPropagation();let t=i.current;t&&(s?t.blur():(t.value=R,a.current=R,t.focus({preventScroll:!0}),t.setSelectionRange(t.value.length,t.value.length)))},className:`flex h-11 w-11 items-center justify-center rounded-full border border-white/25 bg-black/45 text-white backdrop-blur-sm disabled:opacity-40 ${s?`bg-white/30`:``} ${n}`,"data-testid":`rp-tp-keyboard`,children:(0,L.jsx)(he,{size:18,"aria-hidden":!0})}),(0,L.jsx)(`input`,{ref:i,type:`text`,defaultValue:R,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:!1,enterKeyHint:`send`,"aria-label":r(`rp_tp_keyboard`,void 0,`Keyboard`),className:`pointer-events-none fixed bottom-0 left-1/2 h-px w-px opacity-0`,"data-testid":`rp-tp-keyboard-input`,"data-rp-typing":``,onFocus:()=>c(!0),onBlur:()=>c(!1),onPointerDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),onKeyDown:t=>{if(t.stopPropagation(),!e||t.nativeEvent.isComposing)return;let n=Ao(t.key);n&&(t.preventDefault(),Mo(e,n))},onKeyUp:e=>e.stopPropagation(),onCompositionStart:()=>{o.current=!0},onCompositionEnd:()=>{o.current=!1,f()},onInput:f}),l&&(0,L.jsx)(`div`,{className:`pointer-events-none fixed bottom-20 left-1/2 z-[300] w-max max-w-[min(22rem,calc(100%-2rem))] -translate-x-1/2 rounded-full bg-black/80 px-3 py-1.5 text-center text-xs text-white`,"data-testid":`rp-tp-untypeable`,children:r(`rp_tp_untypeable`,void 0,`Only English letters, numbers and symbols can be typed here. Use a text field on the PS5 for others.`)})]})}function Lo({mode:e,onChange:t,blocked:n,style:r,touchpadLabel:i,tight:a=!1,hidden:o=!1}){let s=Tn(),c=(r,i,o)=>{let s=r===`touchpad`&&!!n;return(0,L.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":e===r,"aria-disabled":s||void 0,"aria-label":a&&e!==r?o:void 0,title:s?n:o,onClick:e=>{e.stopPropagation(),s||t(r)},onPointerDown:e=>e.stopPropagation(),onDoubleClick:e=>e.stopPropagation(),className:`flex h-8 items-center gap-1 rounded-full px-2.5 text-xs ${e===r?`bg-white text-black`:`text-white`} ${s?`opacity-40`:``}`,"data-testid":`rp-touch-mode-${r}`,children:[i,(!a||e===r)&&(0,L.jsx)(`span`,{children:o})]})};return(0,L.jsxs)(`div`,{role:`radiogroup`,"aria-label":s(`rp_tp_mode`,void 0,`Touch controls`),"aria-hidden":o||void 0,className:`absolute left-1/2 z-30 flex -translate-x-1/2 gap-0.5 rounded-full border border-white/20 bg-black/50 p-0.5 backdrop-blur-sm transition-opacity duration-200 ${o?`pointer-events-none opacity-0`:`pointer-events-auto opacity-100`}`,style:r,"data-testid":`rp-touch-mode`,children:[c(`controller`,(0,L.jsx)(E,{size:14,"aria-hidden":!0}),s(`rp_kbm_controller`,void 0,`Controller`)),c(`touchpad`,(0,L.jsx)(ye,{size:14,"aria-hidden":!0}),i??s(`rp_tp_touchpad`,void 0,`Touchpad`))]})}var Ro={0:1,2:2,1:4,3:8,4:16},zo={ControlLeft:1,ShiftLeft:2,AltLeft:4,MetaLeft:8,OSLeft:8,ControlRight:16,ShiftRight:32,AltRight:64,MetaRight:128,OSRight:128};function Bo(){let e={};for(let t=0;t<26;t++)e[`Key${String.fromCharCode(65+t)}`]=4+t;for(let t=1;t<=9;t++)e[`Digit${t}`]=30+t-1;e.Digit0=39,Object.assign(e,{Enter:40,Escape:41,Backspace:42,Tab:43,Space:44,Minus:45,Equal:46,BracketLeft:47,BracketRight:48,Backslash:49,IntlHash:50,Semicolon:51,Quote:52,Backquote:53,Comma:54,Period:55,Slash:56,CapsLock:57,PrintScreen:70,ScrollLock:71,Pause:72,Insert:73,Home:74,PageUp:75,Delete:76,End:77,PageDown:78,ArrowRight:79,ArrowLeft:80,ArrowDown:81,ArrowUp:82,NumLock:83,NumpadDivide:84,NumpadMultiply:85,NumpadSubtract:86,NumpadAdd:87,NumpadEnter:88,NumpadDecimal:99,IntlBackslash:100,ContextMenu:101,NumpadEqual:103,IntlRo:135,KanaMode:136,IntlYen:137,Convert:138,NonConvert:139,Lang1:144,Lang2:145});for(let t=1;t<=9;t++)e[`Numpad${t}`]=89+t-1;e.Numpad0=98;for(let t=1;t<=12;t++)e[`F${t}`]=58+t-1;for(let t=13;t<=24;t++)e[`F${t}`]=104+t-13;return e}var Vo=Bo(),Ho=(e,t,n)=>Math.max(t,Math.min(n,Math.trunc(e)));function Uo(e,t=0,n=0,r=0,i=0){let a=new Uint8Array(17),o=new DataView(a.buffer);return a[0]=8,a[1]=e.buttons&255,a[2]=e.mods&255,o.setInt16(3,Ho(t,-32768,32767),!0),o.setInt16(5,Ho(n,-32768,32767),!0),o.setInt8(7,Ho(r,-128,127)),o.setInt8(8,Ho(i,-128,127)),e.keys.slice(0,8).forEach((e,t)=>a[9+t]=e&255),a}function Wo(e){let t={buttons:0,mods:0,keys:[]};for(let n of e){t.buttons|=n.buttons,t.mods|=n.mods;for(let e of n.keys)!t.keys.includes(e)&&t.keys.length<8&&t.keys.push(e)}return t}function z(e,t,n){let r=e+t/(n===1?3:n===2?1:100),i=Math.trunc(r);return{notches:-i,carry:r-i}}var B=class{constructor(e){this.st={buttons:0,mods:0,keys:[]},this.dx=0,this.dy=0,this.wheel=0,this.hwheel=0,this.wheelCarry=0,this.hwheelCarry=0,this.moveTimer=null,this.hb=null,this.want={mouse:!1,keyboard:!1},this.guests=new Map,this.d={setTimer:(e,t)=>window.setTimeout(e,t),clearTimer:e=>window.clearTimeout(e),setRepeat:(e,t)=>window.setInterval(e,t),clearRepeat:e=>window.clearInterval(e),...e}}get state(){return this.st}shiftHeld(){return(this.st.mods&(zo.ShiftLeft|zo.ShiftRight))!==0}get holding(){return this.st.buttons!==0||this.st.mods!==0||this.st.keys.length>0}setWant(e){let t=e.mouse||e.keyboard,n=e.mouse!==this.want.mouse||e.keyboard!==this.want.keyboard;this.want={...e},n&&(this.hb!==null&&this.d.clearRepeat(this.hb),this.hb=null,this.beat(),t&&(this.hb=this.d.setRepeat(()=>this.beat(),500)))}get wanted(){return this.want}beat(){let e=this.want.mouse||this.want.keyboard;this.d.send({kbm:e?{on:!0,mouse:this.want.mouse,keyboard:this.want.keyboard}:{on:!1}})}key(e,t){let n=zo[e];if(n){let e=t?this.st.mods|n:this.st.mods&~n;return e!==this.st.mods&&(this.st={...this.st,mods:e},this.flush()),!0}let r=Vo[e];if(!r)return!1;let i=this.st.keys.includes(r);return t&&!i&&this.st.keys.length<8?(this.st={...this.st,keys:[...this.st.keys,r]},this.flush()):!t&&i&&(this.st={...this.st,keys:this.st.keys.filter(e=>e!==r)},this.flush()),!0}button(e,t){let n=Ro[e];if(!n)return;let r=t?this.st.buttons|n:this.st.buttons&~n;r!==this.st.buttons&&(this.st={...this.st,buttons:r},this.flush())}guest(e,t){if(t)this.guests.set(e,{buttons:t.buttons,mods:t.mods,keys:t.keys.slice(0,8)});else if(!this.guests.delete(e))return;this.flush()}guestMotion(e,t,n,r){this.dx+=e,this.dy+=t,this.wheel+=n,this.hwheel+=r,(e||t||n||r)&&this.later()}get guestIds(){return[...this.guests.keys()]}move(e,t){this.dx+=e,this.dy+=t,this.later()}scroll(e,t,n){let r=z(this.wheelCarry,e,n),i=z(this.hwheelCarry,t,n);this.wheelCarry=r.carry,this.hwheelCarry=i.carry,this.wheel+=r.notches,this.hwheel-=i.notches,(this.wheel||this.hwheel)&&this.later()}later(){this.moveTimer===null&&(this.moveTimer=this.d.setTimer(()=>this.flush(),4))}flush(){this.moveTimer!==null&&this.d.clearTimer(this.moveTimer),this.moveTimer=null;let e=this.guests.size?Wo([this.st,...this.guests.values()]):this.st;do{let t=Ho(this.dx,-32768,32767),n=Ho(this.dy,-32768,32767),r=Ho(this.wheel,-128,127),i=Ho(this.hwheel,-128,127);this.dx-=t,this.dy-=n,this.wheel-=r,this.hwheel-=i,this.d.send(Uo(e,t,n,r,i))}while(Math.abs(this.dx)>=1||Math.abs(this.dy)>=1||this.wheel||this.hwheel)}releaseAll(){this.dx=this.dy=this.wheel=this.hwheel=0,this.wheelCarry=this.hwheelCarry=0;let e=this.holding;this.st={buttons:0,mods:0,keys:[]},this.moveTimer!==null&&this.d.clearTimer(this.moveTimer),this.moveTimer=null,e&&this.d.send(Uo(this.guests.size?Wo(this.guests.values()):this.st))}dispose(){this.guests.clear(),this.releaseAll(),this.setWant({mouse:!1,keyboard:!1})}},Go=`data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAYZbW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAfQAAAfQAAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAmt0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAfQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAABAAAAAQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAH0AAAAAAAABAAAAAAHjbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAABAAAABAABVxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAABjm1pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAU5zdGJsAAAAunN0c2QAAAAAAAAAAQAAAKphdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABAAEABIAAAASAAAAAAAAAABFExhdmM2My4xLjEwMiBsaWJ4MjY0AAAAAAAAAAAAAAAAGP//AAAAMGF2Y0MBQsAK/+EAF2dCwAqmEXsBEAAAAwAQAAADACDxImEYAQAGaMhCAZSyAAAAEHBhc3AAAAABAAAAAQAAABRidHJ0AAAAAAAABUAAAAAAAAAAGHN0dHMAAAAAAAAAAQAAAAQAAEAAAAAAFHN0c3MAAAAAAAAAAQAAAAEAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAJHN0c3oAAAAAAAAAAAAAAAQAAAKCAAAACgAAAAoAAAAKAAAAIHN0Y28AAAAAAAAABAAABlwAAAj+AAAJKAAACVIAAALZdHJhawAAAFx0a2hkAAAAAwAAAAAAAAAAAAAAAgAAAAAAAH0AAAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAB9AAAABAAAAQAAAAACUW1kaWEAAAAgbWRoZAAAAAAAAAAAAAAAAAAAH0AAAIEAVcQAAAAAAC1oZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU291bmRIYW5kbGVyAAAAAfxtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAcBzdGJsAAAAfnN0c2QAAAAAAAAAAQAAAG5tcDRhAAAAAAAAAAEAAAAAAAAAAAABABAAAAAAH0AAAAAAADZlc2RzAAAAAAOAgIAlAAIABICAgBdAFQAAAAAAH0AAAAEcBYCAgAUViFblAAaAgIABAgAAABRidHJ0AAAAAAAAH0AAAAEcAAAAIHN0dHMAAAAAAAAAAgAAACAAAAQAAAAAAQAAAQAAAAAoc3RzYwAAAAAAAAACAAAAAQAAAAEAAAABAAAAAgAAAAgAAAABAAAAmHN0c3oAAAAAAAAAAAAAACEAAAATAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAkc3RjbwAAAAAAAAAFAAAGSQAACN4AAAkIAAAJMgAACVwAAAAac2dwZAEAAAByb2xsAAAAAgAAAAH//wAAABxzYmdwAAAAAHJvbGwAAAABAAAAIQAAAAEAAABhdWR0YQAAAFltZXRhAAAAAAAAACFoZGxyAAAAAAAAAABtZGlyYXBwbAAAAAAAAAAAAAAAACxpbHN0AAAAJKl0b28AAAAcZGF0YQAAAAEAAAAATGF2ZjYzLjEuMTAyAAAACGZyZWUAAAM7bWRhdNwATGF2YzYzLjEuMTAyAAIwQA4AAAJvBgX//2vcRem95tlIt5Ys2CDZI+7veDI2NCAtIGNvcmUgMTY1IHIzMjIyIGIzNTYwNWEgLSBILjI2NC9NUEVHLTQgQVZDIGNvZGVjIC0gQ29weWxlZnQgMjAwMy0yMDI1IC0gaHR0cDovL3d3dy52aWRlb2xhbi5vcmcveDI2NC5odG1sIC0gb3B0aW9uczogY2FiYWM9MCByZWY9MTYgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDEzMSBtZT11bWggc3VibWU9MTAgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0yNCBjaHJvbWFfbWU9MSB0cmVsbGlzPTIgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz0xIGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTQga2V5aW50X21pbj0xIHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NCByYz1jcmYgbWJ0cmVlPTEgY3JmPTUxLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IGlwX3JhdGlvPTEuNDAgYXE9MToxLjAwAIAAAAALZYiCAv5MUAAQv8ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmhwF/UABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmioBb1ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmjsBX1ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBw==`,Ko=null,qo=null;function Jo(e){e.play().catch(()=>{if(qo||Ko!==e)return;let t=()=>{Yo(),Ko===e&&e.play().catch(()=>{})};window.addEventListener(`pointerdown`,t,{capture:!0}),qo=()=>window.removeEventListener(`pointerdown`,t,{capture:!0})})}function Yo(){qo?.(),qo=null}function Xo(){if(typeof document<`u`){if(!Ko){let e=document.createElement(`video`);e.muted=!0,e.loop=!0,e.playsInline=!0,e.setAttribute(`playsinline`,``),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`data-testid`,`keep-screen-video`),e.style.cssText=`position:fixed;left:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none`,e.src=Go,document.body.appendChild(e),Ko=e}Jo(Ko)}}function Zo(){Yo(),Ko&&=(Ko.pause(),Ko.removeAttribute(`src`),Ko.remove(),null)}function Qo(){return typeof navigator>`u`?null:navigator.wakeLock??null}function V(){return Te()||!gn()}var $o=new Set,es=null,ts=Promise.resolve(),ns=!1;async function rs(){if($o.size===0||es&&!es.released)return;let e=Qo();if(!e)Te()&&Xo();else try{let t=await e.request(`screen`);t.addEventListener(`release`,()=>{es===t&&(es=null)}),es=t}catch{}}async function is(){Zo();let e=es;if(es=null,e&&!e.released)try{await e.release()}catch{}}function as(){ns||typeof document>`u`||(ns=!0,document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&$o.size>0&&(ts=ts.then(rs))}))}function os(e,t){if(!V())return;as();let n=$o.size>0;t?$o.add(e):$o.delete(e);let r=$o.size>0;n!==r&&(ts=ts.then(r?rs:is))}var ss=new Set;function cs(){if(typeof window<`u`)return window.PS5UploadPad}function ls(e,t){let n=ss.size>0;t?ss.add(e):ss.delete(e);let r=ss.size>0;if(n!==r)try{cs()?.setActive(r)}catch{}}function us(e,t){let[n,r]=(0,T.useState)(!1);return(0,T.useEffect)(()=>{if(!e||!t)return;let n=!0;return Pe(e,je).then(e=>{n&&!e&&r(!0)}),()=>{n=!1}},[e,t]),n}function ds({href:e}){let t=Tn();return(0,L.jsxs)(`div`,{className:`flex flex-col items-center gap-3 text-center`,"data-testid":`open-on-wifi`,children:[(0,L.jsx)(`p`,{className:`max-w-sm text-sm text-white/60`,children:t(`join_open_lan_body`,void 0,`Can't reach the internet? If you're on the same Wi-Fi as your friend, open the game there.`)}),(0,L.jsx)(`a`,{href:e,rel:`noreferrer`,className:`rounded-full bg-white px-4 py-2 text-sm font-medium text-black`,"data-testid":`open-on-wifi-link`,children:t(`join_open_lan`,void 0,`Open on this Wi-Fi`)})]})}function fs(e,t,n){switch(t.kind){case`connecting`:return e(`pad_connecting`,void 0,`Connecting…`);case`asking`:return e(`pad_asking`,{name:n},`Waiting for ${n} to allow this phone…`);case`joined`:return t.host?t.passcode&&!t.playing?e(`pad_wait_passcode`,{name:n},`Waiting for the passcode on ${n}`):t.playing?e(`pad_playing`,{host:t.host},`Controller for ${t.host}`):e(`pad_starting`,void 0,`Connected. The stream is starting…`):e(`pad_no_session`,void 0,`Connected. Waiting for Remote Play to start on the computer.`);case`refused`:return t.why===`denied`?e(`pad_denied`,void 0,`The computer said no.`):t.why===`no_answer`?e(`pad_no_answer`,void 0,`The computer didn't answer in time. Try again.`):t.why===`kicked`?e(`pad_kicked`,void 0,`The computer took this phone out of the game.`):t.why===`closed`?e(`pad_link_closed`,void 0,`The computer closed the link. Scan the new code to play again.`):t.why===`key`?e(`pad_old_code`,void 0,`This code has expired. Scan the new one on the computer.`):t.why===`full`?e(`pad_full`,void 0,`Four phones are playing already.`):t.why===`no_stream`?e(`pad_watch_no_stream`,void 0,`Nothing is streaming on the computer right now.`):t.why.startsWith(`net:`)?ps(e,t.why.slice(4)):e(`pad_refused`,void 0,`The computer did not let this phone in.`);case`reconnecting`:return e(`pad_reconnecting`,void 0,`Connection lost. Reconnecting…`);case`lost`:return e(`pad_lost`,void 0,`Lost the connection to the computer.`)}}function ps(e,t){switch(t){case`mismatch`:return e(`join_net_mismatch`,void 0,`This link doesn't match the host; ask them for a new one.`);case`no_direct`:return e(`join_net_no_direct`,void 0,`A direct connection isn't possible from this network (both sides' routers are strict). Try Wi-Fi instead of mobile data, or ask the host to turn on UPnP.`);case`no_room`:return e(`pad_old_code`,void 0,`This code has expired. Scan the new one on the computer.`);case`net_full`:return e(`pad_full`,void 0,`Four phones are playing already.`);case`no_hub`:return e(`join_net_no_hub`,void 0,`Couldn't reach the PS5Upload invite service. Check your internet connection, then try again.`);case`offer`:case`no_webrtc`:return e(`join_net_no_webrtc`,void 0,`This browser can't make direct connections. Try a recent Chrome, Safari or Firefox.`);default:return e(`pad_lost`,void 0,`Lost the connection to the computer.`)}}function ms(e){return e.kind!==`refused`||e.why!==`kicked`&&e.why!==`closed`}async function hs(){try{await document.documentElement.requestFullscreen?.({navigationUI:`hide`}),await screen.orientation.lock?.(`landscape`)}catch{}}function gs(e,t){return t?.mouse?null:t?.reason===`vinput_helper_old`||t?.reason===`helper_old`?e(`rp_kbm_helper_old`,void 0,`Update the PS5 helper to use a keyboard and mouse.`):t?.reason===`vinput_needs_loader`?e(`rp_kbm_needs_loader`,void 0,`Needs a payload loader on port 9021`):e(`rp_kbm_unavailable`,void 0,`Native keyboard & mouse isn't available on this console yet.`)}function _s({client:e,caps:t}){let n=Tn(),r=(0,T.useMemo)(()=>new B({send:t=>e.sendKbm(t)}),[e]);(0,T.useEffect)(()=>{r.setWant({mouse:!0,keyboard:t.keyboard})},[r,t.keyboard]),(0,T.useEffect)(()=>()=>r.dispose(),[r]);let i=(0,T.useMemo)(()=>({move:(e,t)=>r.move(e,t),button:(e,t)=>r.button(e,t),scroll:(e,t)=>r.scroll(e,t,0),key:(e,t)=>r.key(e,t),shiftHeld:()=>r.shiftHeld()}),[r]);return(0,L.jsxs)(Po,{sink:i,speed:1.5,className:`absolute inset-0 z-10`,testId:`pad-touchpad`,children:[(0,L.jsx)(`p`,{className:`pointer-events-none absolute inset-x-6 top-1/2 -translate-y-1/2 text-center text-xs leading-5 text-white/50`,children:n(`rp_tp_tips`,void 0,`Drag to move. Tap to click. Two fingers: tap to right-click, drag to scroll. Tap, then touch and drag to select.`)}),(0,L.jsx)(`div`,{className:`absolute`,style:{right:`max(12px, env(safe-area-inset-right))`,bottom:`max(12px, env(safe-area-inset-bottom))`},children:(0,L.jsx)(Io,{sink:t.keyboard?i:null})})]})}function vs({url:e,computer:t,onLeave:n,watch:r=!1,transport:i,hello:a,onReconnectToken:o,lanUrl:s=null}){let c=Tn(),l=us(i?e:null,s),u=t??c(`pad_net_computer`,void 0,`the computer`),[d,f]=(0,T.useState)({kind:`connecting`}),[p,m]=(0,T.useState)(0),[h,g]=(0,T.useState)(()=>typeof window<`u`&&window.innerHeight>window.innerWidth),[_,v]=(0,T.useState)(null),[y,b]=(0,T.useState)(null),[x,S]=(0,T.useState)(!1),ee=(0,T.useRef)(null),te=(0,T.useRef)(null),[C,ne]=(0,T.useState)(!r),[w,re]=(0,T.useState)(null),[ie,ae]=(0,T.useState)(!1),[oe,se]=(0,T.useState)(null),[ce,le]=(0,T.useState)(`controller`);(0,T.useEffect)(()=>(os(`pad-remote`,!0),ls(`pad-remote`,!0),()=>{os(`pad-remote`,!1),ls(`pad-remote`,!1)}),[]),(0,T.useEffect)(()=>{if(!x)return;let e=Ae(e=>{co.motion=e});return()=>{e(),co.motion=null}},[x]),(0,T.useEffect)(()=>{let t=r?Zi(re,`watch`,()=>n.askKeyframe()):null;ee.current=t,t&&te.current?.appendChild(t.element),ne(!r),ae(!1);let n=new io({url:e,WebSocketImpl:i,hello:a,onReconnectToken:o,onStage:f,touchPad:()=>co.touchPad,onLight:v,onKbmCaps:se,motion:()=>co.motion,watch:t?{onFrame:e=>t.onMessage(e),onCodec:e=>t.setHevc(e),onControl:ne}:void 0});b(n),n.start();let s=()=>{let e=document.visibilityState===`hidden`;n.setNeutral(e),e||n.wake()},c=()=>n.setNeutral(!0);return document.addEventListener(`visibilitychange`,s),window.addEventListener(`blur`,c),window.addEventListener(`focus`,s),()=>{document.removeEventListener(`visibilitychange`,s),window.removeEventListener(`blur`,c),window.removeEventListener(`focus`,s),n.stop(),t?.stop(),t?.element.remove()}},[e,p,r]),(0,T.useEffect)(()=>{let e=()=>g(window.innerHeight>window.innerWidth);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let ue=d.kind===`refused`||d.kind===`lost`,de=d.kind===`joined`||d.kind===`reconnecting`,pe=!!s&&!de&&(l||d.kind===`refused`&&d.why===`net:no_hub`);return(0,L.jsxs)(`div`,{className:`fixed inset-0 select-none overflow-hidden bg-black text-white [-webkit-touch-callout:none]`,style:{touchAction:`none`},"data-testid":`pad-app`,children:[(0,L.jsxs)(`div`,{className:`absolute inset-x-0 top-0 z-20 flex items-center justify-center gap-2 px-3 pt-[max(6px,env(safe-area-inset-top))] text-xs text-white/80`,children:[(0,L.jsx)(`span`,{className:`inline-block h-2 w-2 shrink-0 rounded-full`,style:{background:d.kind===`joined`?_?`rgb(${_[0]},${_[1]},${_[2]})`:`var(--color-success,#22c55e)`:ue?`var(--color-bad,#ef4444)`:`#eab308`}}),(0,L.jsx)(`span`,{className:`truncate`,"data-testid":`pad-stage`,children:r&&d.kind===`joined`&&d.host&&(!d.passcode||d.playing)?C?c(`pad_watch_control`,void 0,`Watching, and you have the controller`):c(`pad_watch_watching`,{host:d.host},`Watching ${d.host}`):fs(c,d,u)}),de&&typeof document<`u`&&!!document.documentElement.requestFullscreen&&!document.fullscreenElement&&(0,L.jsxs)(`button`,{type:`button`,onClick:()=>void hs(),className:`flex items-center gap-1 rounded-full bg-white/15 px-2 py-1`,"data-testid":`pad-full`,children:[(0,L.jsx)(fe,{size:12}),c(`pad_fill`,void 0,`Full screen`)]}),de&&k()&&(0,L.jsx)(`button`,{type:`button`,onClick:()=>{x?S(!1):ke().then(S)},"aria-pressed":x,className:`rounded-full px-2 py-1 ${x?`bg-white text-black`:`bg-white/15`}`,"data-testid":`pad-motion`,children:c(`pad_motion`,void 0,`Motion`)}),n&&(0,L.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-full bg-white/15 px-2 py-1`,"data-testid":`pad-leave`,children:c(`pad_leave`,void 0,`Stop being a controller`)})]}),(0,L.jsx)(`div`,{ref:te,className:`absolute inset-0 z-0 flex items-center justify-center`,"aria-hidden":!0}),r&&de&&!ie&&(0,L.jsxs)(`button`,{type:`button`,onClick:()=>{ee.current?.startSound(),ae(!0)},className:`absolute bottom-4 left-1/2 z-20 flex -translate-x-1/2 items-center gap-1.5 rounded-full bg-white/90 px-3 py-1.5 text-xs font-medium text-black`,"data-testid":`watch-sound`,children:[(0,L.jsx)(Ce,{size:14}),c(`pad_watch_sound`,void 0,`Sound`)]}),r&&w&&(0,L.jsx)(`p`,{className:`absolute inset-x-4 top-1/2 z-10 -translate-y-1/2 text-center text-sm text-white/85`,"data-testid":`watch-problem`,children:w===`no_hevc`?c(`pad_watch_no_hevc`,void 0,`This device can't play this stream's picture: the computer streams HEVC, and this device plays only H.264.`):c(`pad_watch_decode`,void 0,`The picture could not be played here.`)}),de&&C&&(ce===`touchpad`&&oe?.mouse&&y?(0,L.jsx)(_s,{client:y,caps:oe}):(0,L.jsx)(wo,{stream:y,layout:`overlay`})),de&&C&&(0,L.jsx)(Lo,{mode:ce===`touchpad`&&oe?.mouse?`touchpad`:`controller`,onChange:le,blocked:gs(c,oe),touchpadLabel:c(`pad_touchpad_tab`,void 0,`Touchpad & keyboard`),style:{top:`calc(max(6px, env(safe-area-inset-top)) + 2rem)`}}),de&&h&&(0,L.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-6 z-20 flex justify-center`,children:(0,L.jsxs)(`span`,{className:`flex items-center gap-2 rounded-full bg-black/70 px-3 py-1.5 text-xs text-white/85`,children:[(0,L.jsx)(xe,{size:14}),c(`pad_turn`,void 0,`Turn the phone sideways`)]})}),pe&&!ue&&s&&(0,L.jsx)(`div`,{className:`absolute inset-x-0 bottom-8 z-10 flex justify-center px-6`,children:(0,L.jsx)(ds,{href:s})}),ue&&(0,L.jsxs)(`div`,{className:`absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 px-6 text-center text-sm`,children:[(0,L.jsx)(`p`,{className:`max-w-sm text-white/85`,children:fs(c,d,u)}),pe&&s&&(0,L.jsx)(ds,{href:s}),ms(d)&&(0,L.jsx)(`button`,{type:`button`,onClick:()=>m(e=>e+1),className:`rounded-full bg-white px-4 py-2 text-sm font-medium text-black`,"data-testid":`pad-retry`,children:c(`pad_retry`,void 0,`Try again`)})]})]})}var ys=`ps5upload.openIn`,bs=`ps5upload.openIn.tab`;function xs(){try{return sessionStorage.getItem(bs)===`browser`}catch{return!1}}function Ss(){try{sessionStorage.setItem(bs,`browser`)}catch{}}function Cs(e){return e===`browser`?`browser`:e===`app`?`opening`:`ask`}function ws({appLink:e,children:t}){let n=Tn(),[r,i]=(0,T.useState)(()=>xs()?`browser`:Cs(yt(ys))),[a,o]=(0,T.useState)(!1);if((0,T.useEffect)(()=>{r===`opening`&&yt(`ps5upload.openIn`)===`app`&&(location.href=e)},[]),r===`browser`)return(0,L.jsx)(L.Fragment,{children:t});let s=()=>{a&&vt(ys,`app`),i(`opening`),location.href=e},c=()=>{r===`ask`&&a?vt(ys,`browser`):r===`opening`&&yt(`ps5upload.openIn`)===`app`&&bt(ys),Ss(),i(`browser`)};return(0,L.jsx)(`div`,{className:`flex min-h-[100dvh] items-center justify-center bg-black px-6 text-white`,"data-testid":`open-in-gate`,"data-join-ui":``,children:(0,L.jsx)(`div`,{className:`w-full max-w-sm space-y-4 rounded-2xl border border-white/10 bg-neutral-900 p-6`,children:r===`ask`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsx)(`h1`,{className:`text-lg font-semibold`,children:n(`open_in_title`,void 0,`Open in the PS5Upload app?`)}),(0,L.jsx)(`p`,{className:`text-sm text-white/60`,children:n(`open_in_body`,void 0,`Have the PS5Upload app on this device? Open this there, or carry on in the browser.`)})]}),(0,L.jsx)(`button`,{type:`button`,onClick:s,autoFocus:!0,className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black`,"data-testid":`open-in-app`,children:n(`open_in_app`,void 0,`Open in the app`)}),(0,L.jsx)(`button`,{type:`button`,onClick:c,className:`w-full rounded-full border border-white/20 py-2.5 text-sm font-semibold text-white hover:bg-white/10`,"data-testid":`open-in-browser`,children:n(`open_in_browser`,void 0,`Continue in browser`)}),(0,L.jsxs)(`label`,{className:`flex items-center justify-center gap-2 text-xs text-white/60`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:a,onChange:e=>o(e.target.checked),"data-testid":`open-in-remember`}),n(`open_in_remember`,void 0,`Remember my choice on this device`)]})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsx)(`h1`,{className:`text-lg font-semibold`,children:n(`open_in_opening`,void 0,`Opening the PS5Upload app…`)}),(0,L.jsx)(`p`,{className:`text-sm text-white/60`,children:n(`open_in_not_opened`,void 0,`Nothing happened? The app may not be on this device.`)})]}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>location.href=e,autoFocus:!0,className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black`,"data-testid":`open-in-again`,children:n(`open_in_again`,void 0,`Try again`)}),(0,L.jsx)(`button`,{type:`button`,onClick:c,className:`w-full rounded-full border border-white/20 py-2.5 text-sm font-semibold text-white hover:bg-white/10`,"data-testid":`open-in-browser`,children:n(`open_in_browser`,void 0,`Continue in browser`)})]})})})}function Ts(e){return`ps5upload://pad?link=${encodeURIComponent(e)}`}function Es(e){let t=(e??``).trim().replace(/^\[|\]$/g,``).toLowerCase(),n=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(t);if(n){let e=n.slice(1).map(Number);if(e.some(e=>e>255))return null;let[t,r]=e;return t===10||t===172&&r>=16&&r<32||t===192&&r===168||t===169&&r===254||t===127?0:t===100&&r>=64&&r<128?1:2}if(!t.includes(`:`)||!/^[0-9a-f:.]+$/.test(t))return null;if(t.startsWith(`fd7a:115c:a1e0:`))return 1;let r=parseInt(t.split(`:`)[0]||`0`,16);return(r&65024)==64512||(r&65472)==65152||t===`::1`?0:2}function Ds(e,t){let n=Es(e),r=Es(t);return n===1||r===1?`tailscale`:r===0?`lan`:r===2?`internet`:null}function Os(e){let t=[];if(typeof e.forEach==`function`)e.forEach(e=>t.push(e));else for(let n of e)t.push(n);let n=new Map(t.map(e=>[String(e.id),e])),r=t.filter(e=>e.type===`candidate-pair`),i=t.filter(e=>e.type===`transport`&&typeof e.selectedCandidatePairId==`string`).map(e=>n.get(String(e.selectedCandidatePairId))).find(Boolean)??r.find(e=>e.selected===!0)??r.find(e=>e.nominated===!0&&e.state===`succeeded`);if(!i)return null;let a=e=>{let t=n.get(String(e));if(!t)return null;let r=t.address??t.ip;return typeof r==`string`?r:null};return Ds(a(i.localCandidateId),a(i.remoteCandidateId))}function ks(e){let t=e.replace(/:\d+$/,``).replace(/^\[|\]$/g,``);return`${t===`localhost`||t===`127.0.0.1`||t===`::1`?`ws`:`wss`}://${e}/ws`}function As(e){let t=new Set;for(let n of e.matchAll(/^a=fingerprint:sha-256[ \t]+([0-9A-Fa-f:]+)[ \t]*\r?$/gim))t.add(n[1].toUpperCase());return/^a=fingerprint:(?!sha-256[ \t])/im.test(e)?null:t.size===1?[...t][0]:null}function js(e,t){let n=As(e);return n!==null&&n===t.toUpperCase()}var Ms=16777216;function Ns(e){let t=16383,n=Math.max(1,Math.ceil(e.length/t)),r=[];for(let i=0;ithis.max)return this.parts=[],this.size=0,{kind:`error`,why:`too_big`};if(this.parts.push(r.slice()),this.size+=r.length,n===1)return{kind:`partial`};let i=new Uint8Array(this.size),a=0;for(let e of this.parts)i.set(e,a),a+=e.length;return this.parts=[],this.size=0,{kind:`message`,data:i.buffer}}};function Fs(e){let t=new Uint8Array(9);return t[0]=3,t.set(e.subarray(0,8),1),t}var Is=[`stun:stun.cloudflare.com:3478`,`stun:stun.l.google.com:19302`],Ls=1500,Rs=2e4;function zs(e){let t=e?.codecs??[],n=e=>t.filter(t=>t.mimeType.toLowerCase()===e);return[...n(`video/h264`),...n(`video/h265`),...n(`video/rtx`)]}var Bs=null;function Vs(e){e.onopen=e.onmessage=e.onclose=e.onerror=null;try{e.readyState===1&&e.send(JSON.stringify({t:`leave`})),e.close(1e3)}catch{}}function Hs(e,t){let n=Bs;return n?(Bs=null,n.timer&&clearTimeout(n.timer),n.url!==e||n.room!==t||n.ws.readyState>1||n.msgs.some(e=>e.t===`error`||e.t===`closed`)?(Vs(n.ws),null):{ws:n.ws,msgs:n.msgs}):null}function Us(e,t={}){var n;let r=t.WebSocketImpl??(typeof WebSocket>`u`?void 0:WebSocket),i=t.PeerConnection??(typeof RTCPeerConnection>`u`?void 0:RTCPeerConnection),a=t.iceTimeoutMs??15e3,o=t.log??(()=>{});class s{constructor(e){this.CONNECTING=0,this.OPEN=1,this.CLOSING=2,this.CLOSED=3,this.readyState=0,this.binaryType=`arraybuffer`,this.onopen=null,this.onmessage=null,this.onclose=null,this.onerror=null,this.hub=null,this.pc=null,this.dc=null,this.timer=null,this.rx=new Ps,this.answered=!1,this.early=[],this.hubBackUntil=0,this.offerSdp=null,this.offerSent=!1,this.ownEarly=[],this.media=null,setTimeout(()=>this.begin(),0)}begin(){if(this.readyState!==0)return;if(!i||!r){this.fail(`no_webrtc`);return}let n=t.signalUrl??ks(e.hub),a=t.signalUrl||t.lan?null:Hs(n,e.room),s;if(a)s=a.ws,o(`hub: joined early`);else try{s=new r(n)}catch{this.fail(`no_hub`);return}if(this.hub=s,this.prepare(),this.readyState===0){s.onopen=()=>s.send(JSON.stringify(t.lan?{v:1,t:`join`,lan:!0}:{v:1,t:`join`,room:e.room})),s.onmessage=e=>{if(typeof e.data!=`string`)return;let t;try{t=JSON.parse(e.data)}catch{return}this.onHub(t)},s.onclose=e=>{this.hub===s&&(this.hub=null,this.readyState===0&&(this.answered||e?.code===1001&&this.hubRestarting()||this.fail(`no_hub`)))},s.onerror=()=>{};for(let e of a?.msgs??[])this.onHub(e)}}signal(e){let t=this.hub;t&&t.readyState===1&&t.send(JSON.stringify({t:`signal`,to:`host`,data:e}))}onHub(e){if(this.readyState===0)switch(e.t){case`joined`:o(`hub: joined room as ${e.gid??`?`}`),this.sendOffer();return;case`signal`:e.from===`host`&&e.data&&typeof e.data==`object`&&this.onSignal(e.data);return;case`closed`:this.fail(`no_room`);return;case`error`:if(o(`hub: error ${e.why??`?`}`),e.why===`no_room`&&this.hubBackUntil&&this.hubRestarting())return;this.fail(e.why===`no_room`?`no_room`:e.why===`room_full`?`net_full`:`no_hub`);return}}prepare(){if(!i)return;this.offerSent=!1,this.ownEarly=[];let e;try{e=new i({iceServers:[{urls:Is}]})}catch{this.fail(`no_webrtc`);return}this.pc=e;let n=e.createDataChannel(t.label??`join`,{ordered:!0});if(n.binaryType=`arraybuffer`,this.dc=n,n.onopen=()=>this.opened(n),n.onmessage=e=>this.fromChannel(e.data),n.onclose=()=>{this.dc===n&&this.dropped()},t.video&&e.addTransceiver){try{let t=e.addTransceiver(`video`,{direction:`recvonly`}),n=zs(globalThis.RTCRtpReceiver?.getCapabilities?.(`video`));n.length&&t.setCodecPreferences&&t.setCodecPreferences(n)}catch{}try{e.addTransceiver(`audio`,{direction:`recvonly`})}catch{}e.ontrack=t=>{if(this.pc!==e)return;let n=this.media?.stream??t.streams[0]??new MediaStream;n.getTracks().includes(t.track)||n.addTrack(t.track),this.media=t.track.kind===`audio`?{stream:n,receiver:this.media?.receiver??t.receiver,audio:t.receiver}:{stream:n,receiver:t.receiver,...this.media?.audio?{audio:this.media.audio}:{}}}}e.onicecandidate=t=>{if(this.pc!==e)return;let n=t.candidate;if(!n||!n.candidate)return;let r={type:`candidate`,candidate:n.candidate,sdpMid:n.sdpMid??`0`};this.offerSent?this.signal(r):this.ownEarly.push(r)},e.oniceconnectionstatechange=()=>{if(this.pc!==e)return;let t=e.iceConnectionState;o(`ice: ${t}`),t===`failed`&&(this.readyState===0?this.fail(`no_direct`):this.dropped())},this.offerSdp=(async()=>{let t=await e.createOffer();return await e.setLocalDescription(t),e.localDescription?.sdp??t.sdp??``})().catch(()=>(this.pc===e&&this.fail(`no_webrtc`),null))}async sendOffer(){let e=this.pc,t=this.offerSdp;if(!e||!t||this.offerSent)return;this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,this.readyState===0&&this.fail(`no_direct`)},a);let n=await t;if(this.pc===e&&n!==null&&this.readyState===0){this.signal({type:`offer`,sdp:n}),this.offerSent=!0;for(let e of this.ownEarly.splice(0))this.signal(e)}}async onSignal(t){let n=this.pc;if(t.type===`bye`)this.fail(t.why===`full`?`net_full`:`offer`);else if(n){if(t.type===`answer`){if(this.answered||typeof t.sdp!=`string`)return;if(e.fp?!js(t.sdp,e.fp):As(t.sdp)===null){o(`answer: fingerprint does not match the link`),this.fail(`mismatch`);return}this.answered=!0;try{await n.setRemoteDescription({type:`answer`,sdp:t.sdp});for(let e of this.early.splice(0))await n.addIceCandidate(e).catch(()=>{})}catch{this.fail(`offer`)}}else if(t.type===`candidate`&&typeof t.candidate==`string`&&t.candidate){let e={candidate:t.candidate,sdpMid:typeof t.sdpMid==`string`?t.sdpMid:`0`,sdpMLineIndex:typeof t.sdpMLineIndex==`number`?t.sdpMLineIndex:0};this.answered?await n.addIceCandidate(e).catch(()=>{}):this.early.push(e)}}}opened(e){this.dc===e&&this.readyState===0&&(this.clearTimer(),this.readyState=1,o(`channel open`),this.leaveHub(),this.onopen?.(new Event(`open`)))}fromChannel(e){if(this.readyState!==1)return;if(typeof e==`string`){this.onmessage?.(new MessageEvent(`message`,{data:e}));return}if(!(e instanceof ArrayBuffer))return;let t=this.rx.push(e);switch(t.kind){case`ping`:try{this.dc?.send(Fs(t.data))}catch{}return;case`message`:this.onmessage?.(new MessageEvent(`message`,{data:t.data}));return;case`error`:o(`channel: bad binary message (${t.why})`),this.dropped();return;default:return}}async netPath(){let e=this.pc;if(!e||this.readyState!==1||typeof e.getStats!=`function`)return null;try{return Os(await e.getStats())}catch{return null}}send(e){let t=this.dc;if(this.readyState!==1||!t||t.readyState!==`open`)throw Error(`not open`);if(typeof e==`string`){t.send(e);return}let n=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);for(let e of Ns(n))t.send(e)}close(){this.readyState!==3&&(this.teardown(),this.emitClose(1e3,``,!0))}clearTimer(){this.timer&&clearTimeout(this.timer),this.timer=null}leaveHub(){let e=this.hub;if(this.hub=null,e)try{e.readyState===1&&e.send(JSON.stringify({t:`leave`})),e.close(1e3)}catch{}}hubRestarting(){let e=Date.now();return this.hubBackUntil||=e+Rs,e>=this.hubBackUntil?!1:(o(`hub: restarting, trying again`),this.clearTimer(),this.leaveHub(),this.closePeer(),this.answered=!1,this.early=[],this.timer=setTimeout(()=>{this.timer=null,this.begin()},Ls),!0)}teardown(){this.readyState=3,this.clearTimer(),this.leaveHub(),this.closePeer()}closePeer(){let e=this.pc,t=this.dc;this.pc=null,this.dc=null,this.media=null,this.offerSdp=null,this.offerSent=!1,this.ownEarly=[];try{t?.close()}catch{}try{e?.close()}catch{}}dropped(){this.readyState!==3&&(this.teardown(),this.emitClose(1006,``,!1))}fail(e){this.readyState!==3&&(o(`failed: ${e}`),this.teardown(),this.emitClose(Ie,`net:${e}`,!1))}emitClose(e,t,n){let r=this.onclose;if(!r)return;let i=typeof CloseEvent>`u`?{type:`close`,code:e,reason:t,wasClean:n}:new CloseEvent(`close`,{code:e,reason:t,wasClean:n});setTimeout(()=>r(i),0)}}return n=s,n.CONNECTING=0,n.OPEN=1,n.CLOSING=2,n.CLOSED=3,s}function Ws(e,t=0){return/iPad/.test(e)||/Macintosh/.test(e)&&t>1?`ipad`:/iPhone|iPod/.test(e)?`iphone`:/Android/.test(e)?`android`:`phone`}var Gs=new URLSearchParams(location.hash.slice(1)),Ks=Gs.get(`t`)??``,qs=Gs.get(`w`)===`1`,Js=Ws(navigator.userAgent,navigator.maxTouchPoints),Ys=oo({get:yt,set:vt}),Xs=Be(location.hash),Zs=(0,x.createRoot)(document.getElementById(`root`));if(Xs){let e=Us(Xs,{label:`pad`,log:e=>console.info(`[pad] ${e}`)}),t=`ps5upload.pad.rt.${Xs.room}`,n=yt(t),r={t:Xs.key,name:Js,d:Ys,...qs?{w:1}:{},...n?{rt:n}:{}},i=Me(location.hash,`pad`);Zs.render((0,L.jsx)(vs,{url:ks(Xs.hub),computer:null,watch:qs,transport:e,hello:r,onReconnectToken:e=>vt(t,e),lanUrl:i?Ne(i,{watch:qs}):null}))}else{let e=location.pathname.replace(/\/pad\/?$/,``),t=`${location.protocol===`https:`?`wss`:`ws`}://${location.host}${e}/api/pad/ws?t=${encodeURIComponent(Ks)}&name=${Js}&d=${Ys}${qs?`&w=1`:``}`;Zs.render((0,L.jsx)(ws,{appLink:Ts(location.href),children:(0,L.jsx)(vs,{url:t,computer:location.hostname,watch:qs})}))} +I€wu¸öôú!3å6³‹âVq£³¹´RN£%y10º:pŠ#\:J:b9Hµ7h_Ž:¢I9 _¼™µV,þ <`});var w={a:v};this.setModule=t=>{e.setModule(fi,t)},this.getModule=()=>e.getModule(fi),this.instantiate=()=>(this.getModule().then(e=>WebAssembly.instantiate(e,w)).then(e=>{let t=e.exports;y(t),a=t.g,o(),ne(t),n()}),this.ready=new Promise(e=>{n=e}).then(()=>{this.HEAP=a.buffer,this.malloc=x,this.free=te,this.opus_frame_decoder_create=b,this.opus_frame_decode_float_deinterleaved=S,this.opus_frame_decoder_destroy=ee}),this)}var pi=o((()=>{}));function mi(e={}){mi.errors||Object.defineProperties(mi,{errors:{value:new Map([[-1,`OPUS_BAD_ARG: One or more invalid/out of range arguments`],[-2,`OPUS_BUFFER_TOO_SMALL: Not enough bytes allocated in the buffer`],[-3,`OPUS_INTERNAL_ERROR: An internal error was detected`],[-4,`OPUS_INVALID_PACKET: The compressed data passed is corrupted`],[-5,`OPUS_UNIMPLEMENTED: Invalid/unsupported request number`],[-6,`OPUS_INVALID_STATE: An encoder or decoder structure is invalid or already freed`],[-7,`OPUS_ALLOC_FAIL: Memory allocation has failed`]])}}),this._init=()=>new this._WASMAudioDecoderCommon(this).instantiate(this._EmscriptenWASM,this._module).then(e=>{this._common=e,this._inputBytes=0,this._outputSamples=0,this._frameNumber=0,this._input=this._common.allocateTypedArray(this._inputSize,Uint8Array),this._output=this._common.allocateTypedArray(this._outputChannels*this._outputChannelSize,Float32Array);let t=this._common.allocateTypedArray(this._channels,Uint8Array);t.buf.set(this._channelMappingTable),this._decoder=this._common.wasm.opus_frame_decoder_create(this._sampleRate,this._channels,this._streamCount,this._coupledStreamCount,t.ptr,this._preSkip,this._forceStereo)}),Object.defineProperty(this,"ready",{enumerable:!0,get:()=>this._ready}),this.reset=()=>(this.free(),this._init()),this.free=()=>{this._common.free(),this._common.wasm.opus_frame_decoder_destroy(this._decoder),this._common.wasm.free(this._decoder)},this._decode=e=>{if(!(e instanceof Uint8Array))throw Error(`Data to decode must be Uint8Array. Instead got `+typeof e);this._input.buf.set(e);let t=this._common.wasm.opus_frame_decode_float_deinterleaved(this._decoder,this._input.ptr,e.length,this._output.ptr),n;return t<0&&(n=`libopus `+t+` `+(mi.errors.get(t)||`Unknown Error`),console.error(n),t=0),{outputBuffer:this._common.getOutputChannels(this._output.buf,this._outputChannels,t),samplesDecoded:t,error:n}},this.decodeFrame=e=>{let t=[],n=this._decode(e);return n.error&&this._common.addError(t,n.error,e.length,this._frameNumber,this._inputBytes,this._outputSamples),this._frameNumber++,this._inputBytes+=e.length,this._outputSamples+=n.samplesDecoded,this._WASMAudioDecoderCommon.getDecodedAudioMultiChannel(t,[n.outputBuffer],this._outputChannels,n.samplesDecoded,this._sampleRate)},this.decodeFrames=e=>{let t=[],n=[],r=0,i=0;for(;itypeof e==`number`,n=e.sampleRate,r=e.channels,i=e.streamCount,a=e.coupledStreamCount,o=e.channelMappingTable,s=e.preSkip,c=+!!e.forceStereo;if(r>2&&(!t(i)||!t(a)||!Array.isArray(o)))throw Error(`Invalid Opus Decoder Options for multichannel decoding.`);return this._sampleRate=[8e3,12e3,16e3,24e3,48e3].includes(n)?n:48e3,this._channels=t(r)?r:2,this._streamCount=t(i)?i:1,this._coupledStreamCount=t(a)?a:this._channels-1,this._channelMappingTable=o||(this._channels===2?[0,1]:[0]),this._preSkip=s||0,this._forceStereo=r<=8&&r!=2?c:0,this._inputSize=3840*this._channels,this._outputChannelSize=5760,this._outputChannels=this._forceStereo?2:this._channels,this._ready=this._init(),this}var hi=o((()=>{di(),pi()})),gi,_i=o((()=>{di(),pi(),hi(),gi=class extends si{constructor(e){super(e,`opus-decoder`,mi,fi)}async decodeFrame(e){return this.postToDecoder(`decodeFrame`,e)}async decodeFrames(e){return this.postToDecoder(`decodeFrames`,e)}}})),vi=c({OpusDecoder:()=>mi,OpusDecoderWebWorker:()=>gi}),yi=o((()=>{hi(),_i(),di(),li(mi,`OpusDecoder`),li(gi,`OpusDecoderWebWorker`)})),bi=[8e3,12e3,16e3,24e3,48e3],xi=null;function Si(){return xi??=Vn(()=>Promise.resolve().then(()=>(yi(),vi)),__VITE_PRELOAD__,import.meta.url).catch(e=>{throw xi=null,e}),xi}function Ci(){return typeof WebAssembly==`object`&&typeof WebAssembly.instantiate==`function`}function wi(e,t,n,r){return{numberOfFrames:t,numberOfChannels:e.length,sampleRate:n,timestamp:r,format:`f32-planar`,duration:Math.round(t/n*1e6),copyTo(n,r){n.set(e[r.planeIndex].subarray(0,t))},close(){}}}var Ti=class{constructor(e,t=Si){this.init=e,this.load=t,this.state=`unconfigured`,this.dec=null,this.pending=[]}configure(e){if(this.state===`closed`)throw Error(`the decoder is closed`);if(!Ci())throw Error(`no WebAssembly here`);let t=e.sampleRate;if(!bi.includes(t))throw Error(`Opus does not decode at ${t} Hz`);let n=e.numberOfChannels;if(n<1||n>2)throw Error(`${n} channels: only mono and stereo are decoded`);this.state=`configured`,this.load().then(async e=>{if(this.state===`closed`)return;let r=new e.OpusDecoder({channels:n,sampleRate:t});if(await r.ready,this.state!==`configured`){r.free();return}this.dec=r;let i=this.pending;this.pending=[];for(let e of i)this.state===`configured`&&this.run(e)}).catch(e=>this.fail(e))}decode(e){if(this.state!==`configured`)return;let t=e;if(this.dec)return this.run(t);this.pending.push({timestamp:t.timestamp,data:t.data.slice()}),this.pending.length>50&&this.pending.shift()}run(e){let t=this.dec;if(!t)return;let n;try{n=t.decodeFrame(e.data)}catch(e){return this.fail(e)}n.samplesDecoded&&n.channelData.length&&this.init.output(wi(n.channelData,n.samplesDecoded,n.sampleRate,e.timestamp))}fail(e){if(this.state===`closed`)return;this.close();let t=e instanceof Error?e:Error(String(e));queueMicrotask(()=>this.init.error(t))}close(){this.state=`closed`,this.pending=[];let e=this.dec;this.dec=null;try{e?.free()}catch{}}},Ei={makeDecoder:e=>new Ti(e),makeChunk:e=>({type:e.type,timestamp:e.timestamp,data:e.data instanceof Uint8Array?e.data:new Uint8Array(e.data)})};function Di(e,t){for(let n=0;n+3>1&63;if(t>=16&&t<=21)return!0;if(t<16)return!1}else{let t=e[n+3]&31;if(t===5)return!0;if(t===1)return!1}}return!1}function Oi(e){for(let t=0;t+6e.toString(16).padStart(2,`0`);return`avc1.${n(e[t+4])}${n(e[t+5])}${n(e[t+6])}`}return`avc1.4d4028`}var ki=[`hev1.1.6.L153.B0`,`hvc1.1.6.L153.B0`,`hev1.2.4.L153.B0`,`hvc1.2.4.L153.B0`,`hev1.1.6.L150.90`];async function Ai(e,t){if(typeof VideoDecoder>`u`)return null;for(let n of ki)try{if((await VideoDecoder.isConfigSupported({codec:n,codedWidth:e,codedHeight:t})).supported)return n}catch{}return null}function ji(e){let t=[];for(let n=0;n+2{let i=r+1n&&e[i-1]===0;)i--;return e.subarray(n,i)}).filter(e=>e.length>0)}var Mi=(e,t)=>t?e[0]>>1&63:e[0]&31;function j(e,...t){let n=8+t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(n);new DataView(r.buffer).setUint32(0,n);for(let t=0;t<4;t++)r[4+t]=e.charCodeAt(t);let i=8;for(let e of t)r.set(e,i),i+=e.length;return r}function M(...e){let t=new Uint8Array(e.reduce((e,[,t])=>e+t,0)),n=0;for(let[r,i]of e){for(let e=i-1;e>=0;e--)t[n+i-1-e]=Math.floor(r/2**(8*e))&255;n+=i}return t}var Ni=(e,t,n,...r)=>j(e,M([t,1],[n,3]),...r),Pi=M([65536,4],[0,4],[0,4],[0,4],[65536,4],[0,4],[0,4],[0,4],[1073741824,4]);function Fi(e){let t=e.handler===`vide`,n=j(`ftyp`,new TextEncoder().encode(`isom`),M([1,4]),new TextEncoder().encode(`isomiso6mp41`)),r=j(`moov`,Ni(`mvhd`,0,0,M([0,4],[0,4],[e.timescale,4],[0,4],[65536,4],[256,2],[0,2],[0,4],[0,4]),Pi,new Uint8Array(24),M([2,4])),j(`trak`,Ni(`tkhd`,0,3,M([0,4],[0,4],[1,4],[0,4],[0,4],[0,4],[0,4],[0,2],[0,2],[t?0:256,2],[0,2]),Pi,M([(e.width??0)*65536,4],[(e.height??0)*65536,4])),j(`mdia`,Ni(`mdhd`,0,0,M([0,4],[0,4],[e.timescale,4],[0,4],[21956,2],[0,2])),Ni(`hdlr`,0,0,M([0,4]),new TextEncoder().encode(e.handler),new Uint8Array(12),M([0,1])),j(`minf`,t?Ni(`vmhd`,0,1,new Uint8Array(8)):Ni(`smhd`,0,0,M([0,4])),j(`dinf`,Ni(`dref`,0,0,M([1,4]),Ni(`url `,0,1))),j(`stbl`,Ni(`stsd`,0,0,M([1,4]),e.sampleEntry),Ni(`stts`,0,0,M([0,4])),Ni(`stsc`,0,0,M([0,4])),Ni(`stsz`,0,0,M([0,4],[0,4])),Ni(`stco`,0,0,M([0,4])))))),j(`mvex`,Ni(`trex`,0,0,M([1,4],[1,4],[0,4],[0,4],[0,4])))),i=new Uint8Array(n.length+r.length);return i.set(n,0),i.set(r,n.length),i}function Ii(e,t,n,r,i){let a=i?33554432:16842752,o=e=>Ni(`trun`,0,1793,M([1,4],[e,4],[n,4],[r.length,4],[a,4])),s=e=>j(`traf`,Ni(`tfhd`,0,131072,M([1,4])),Ni(`tfdt`,1,0,M([t,8])),o(e)),c=Ni(`mfhd`,0,0,M([e,4])),l=j(`moof`,c,s(0)).length,u=j(`moof`,c,s(l+8)),d=j(`mdat`,r),f=new Uint8Array(u.length+d.length);return f.set(u,0),f.set(d,u.length),f}function Li(e,t,n=!1){let r=t?[35,...n?[32,33,34]:[]]:[9,...n?[7,8]:[]],i=ji(e).filter(e=>!r.includes(Mi(e,t))),a=new Uint8Array(i.reduce((e,t)=>e+4+t.length,0)),o=new DataView(a.buffer),s=0;for(let e of i)o.setUint32(s,e.length),a.set(e,s+4),s+=4+e.length;return a}var Ri=e=>e.toString(16).padStart(2,`0`),zi=e=>{let t=new Uint8Array(2+e.length);return t[0]=e.length>>8,t[1]=e.length&255,t.set(e,2),t},Bi=e=>{let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t};function Vi(e){let t=ji(e),n=t.filter(e=>Mi(e,!1)===7),r=t.filter(e=>Mi(e,!1)===8);return!n.length||!r.length||n[0].length<4?null:Bi([M([1,1],[n[0][1],1],[n[0][2],1],[n[0][3],1],[255,1],[224|n.length,1]),...n.map(zi),M([r.length,1]),...r.map(zi)])}function Hi(e,t,n){let r=ji(e),i=e=>r.filter(n=>Mi(n,t)===e),a=(e,t)=>j(e,new Uint8Array(6),M([1,2],[0,16],[n.w,2],[n.h,2],[4718592,4],[4718592,4],[0,4],[1,2]),new Uint8Array(32),M([24,2],[65535,2]),t);if(!t){let t=i(7),r=Vi(e);return r?{init:Fi({handler:`vide`,timescale:9e4,sampleEntry:a(`avc1`,j(`avcC`,r)),width:n.w,height:n.h}),mime:`video/mp4; codecs="avc1.${Ri(t[0][1])}${Ri(t[0][2])}${Ri(t[0][3])}"`}:null}let o=i(32),s=i(33),c=i(34);if(!o.length||!s.length||!c.length)return null;let l=Vr(s[0]);if(l.length<15)return null;let u=l.subarray(3,15),d=u[0]&31,f=d===2?2:0,p=(e,t)=>Bi([M([128|e,1],[t.length,2]),...t.map(zi)]),m=j(`hvcC`,M([1,1]),u,M([61440,2],[252,1],[253,1],[248|f,1],[248|f,1],[0,2],[15,1],[3,1]),p(32,o),p(33,s),p(34,c)),h=[``,`A`,`B`,`C`][u[0]>>6],g=0,_=(u[1]<<24|u[2]<<16|u[3]<<8|u[4])>>>0;for(let e=0;e<32;e++)_&1<>>0).toString(16),`${u[0]&32?`H`:`L`}${u[11]}`,...v.map(e=>e.toString(16))].join(`.`);return{init:Fi({handler:`vide`,timescale:9e4,sampleEntry:a(`hvc1`,m),width:n.w,height:n.h}),mime:`video/mp4; codecs="${y}"`}}function Ui(e,t,n,r,i,a){return Ii(e,t,n,Li(r,i),a)}function Wi(e,t){let n=j(`dOps`,M([0,1],[e,1],[312,2],[t,4],[0,2],[0,1]));return Fi({handler:`soun`,timescale:48e3,sampleEntry:j(`Opus`,new Uint8Array(6),M([1,2],[0,8],[e,2],[16,2],[0,4],[3145728e3,4]),n)})}function Gi(e){if(!e.length)return 960;let t=e[0]>>3,n=t<12?[480,960,1920,2880][t%4]:t<16?[480,960][t%2]:[120,240,480,960][t%4],r=e[0]&3,i=r===0?1:r===3?(e[1]??1)&63:2;return n*Math.max(1,i)}function Ki(e,t,n){return Ii(e,t,Gi(n),n,!0)}var qi={watch:30,player:4},Ji={watch:{seek:.5,speed:1/0,target:.05},player:{seek:.15,speed:.06,target:.02}},Yi={seek:.8,speed:.25,target:.12};function Xi(e,t,n){let r=typeof n==`string`?Ji[n]:n;return e>r.seek?{seekTo:t-r.target,rate:1}:e>r.speed?{seekTo:null,rate:1.1}:{seekTo:null,rate:1}}function Zi(e,t=`watch`,n){return typeof VideoDecoder<`u`?new ca(e,t,n):new ba(e,t,n)}var Qi=class{constructor(e,t=()=>performance.now()){this.ask=e,this.now=t,this.last=-1/0}waiting(){if(!this.ask)return;let e=this.now();e-this.last<1e3||(this.last=e,this.ask())}};function $i(e){return e.length<3?null:{index:e[0]<<8|e[1],packet:e.subarray(2)}}var ea=class{constructor(){this.last=-1}take(e){if(this.last>=0){let t=e-this.last&65535;if(t===0||t>=32768)return!1}return this.last=e,!0}reset(){this.last=-1}};function ta(e){if(e.length>=10)return e;let t=new Uint8Array(10);t.set(e.subarray(0,6));let n=new DataView(t.buffer);return n.setUint32(6,Math.round(n.getUint32(2)/100)||480),t}function na(e,t){return{snd:e,snd_decoded:t.decoded,snd_concealed:t.concealed,snd_underruns:t.underruns,snd_dropped:t.dropped}}var ra=class{constructor(e,t=.2){this.min=e,this.max=t,this.next=0,this.calmSince=0,this.minLead=1/0,this.windowAt=0,this.underruns=0,this.dropped=0,this.cushion=e}at(e,t){this.next0&&(this.underruns++,this.cushion=Math.min(this.max,this.cushion+.02)),this.calmSince=e,this.next=e+this.cushion,this.minLead=1/0,this.windowAt=e):e-this.calmSince>10&&this.cushion>this.min&&(this.cushion=Math.max(this.min,this.cushion-.01),this.calmSince=e);let n=this.next-e;if(n>this.cushion+.15)return this.dropped++,null;if(this.minLead=Math.min(this.minLead,n),e-this.windowAt>=.25){let t=this.minLead>this.cushion+ia;if(this.minLead=1/0,this.windowAt=e,t)return this.dropped++,null}let r=this.next;return this.next+=t,r}reset(){this.next=0}},ia=.02;async function aa(e,t){try{return typeof AudioDecoder>`u`?!1:!!(await AudioDecoder.isConfigSupported({codec:`opus`,sampleRate:e,numberOfChannels:t})).supported}catch{return!1}}var oa=class{constructor(e,t=()=>performance.now()){this.decoder=e,this.now=t,this.n={frames:0,dropped:0,late:0,stalls:0,stall_ms:0,worst_stall_ms:0,key_waits:0},this.a=0,this.d=0,this.w=!1,this.q=[],this.sum=0,this.cnt=0,this.codec=``}get frames(){return this.n.frames}arrived(){let e=this.now();this.a&&e-this.a>50&&this.n.late++,this.a=e}drop(){this.n.dropped++,this.w||this.n.key_waits++,this.w=!0}decoding(){this.w=!1,this.q.push(this.now())>64&&this.q.shift()}drawn(e=!1){let t=this.now(),n=e?this.q.shift():void 0;n!==void 0&&(this.sum+=t-n,this.cnt++);let r=this.d?t-this.d:0;r>100&&this.stall(r),this.d=t,this.n.frames++}stall(e){this.n.stalls++,this.n.stall_ms+=e,this.n.worst_stall_ms=Math.max(this.n.worst_stall_ms,e)}snapshot(){let e=this.d?this.now()-this.d:0,t={...this.n,decoder:this.decoder};this.codec&&(t.codec=this.codec),e>100&&(t.stalls=this.n.stalls+1,t.stall_ms=this.n.stall_ms+e,t.worst_stall_ms=Math.max(this.n.worst_stall_ms,e));for(let e of[`stall_ms`,`worst_stall_ms`])t[e]=Math.round(t[e]);return t.decode_ms=this.cnt?Math.round(this.sum/this.cnt*10)/10:0,this.sum=this.cnt=0,t}},sa=[`pointerup`,`touchend`,`click`,`keydown`],ca=class{get element(){if(!this.wrap){let e=document.createElement(`div`);e.className=`h-full w-full`,e.append(this.canvas),this.mse&&e.append(this.mse.element),this.wrap=e}return this.wrap}get stats(){return this.mse?.stats??this.ownStats}soundReport(){return this.soundOn?this.mseSound?this.mseSound.report():na(this.soundWasm?`wasm`:`webcodecs`,this.soundStats):null}constructor(e,t=`watch`,n){this.onProblem=e,this.latency=t,this.onNeedKey=n,this.canvas=document.createElement(`canvas`),this.wrap=null,this.mse=null,this.failsNoPicture=0,this.ctx=this.canvas.getContext(`2d`,{alpha:!1}),this.hevc=!1,this.header=null,this.spsRect=null,this.software=!1,this.video=null,this.opening=!1,this.stopped=!1,this.sawKey=!1,this.ownStats=new oa(`webcodecs`),this.problemShown=!1,this.ts=0,this.pipe=null,this.audioGen=0,this.actx=null,this.soundOn=!1,this.unarm=null,this.mseSound=null,this.audioHeader=null,this.soundWasm=!1,this.onSoundFail=null,this.muted=!1,this.keyAsk=new Qi(n),this.clock=new ra(t===`player`?.05:.08),typeof AudioDecoder>`u`&&N()&&(this.mseSound=new P(t,()=>this.mseSoundFailed())),this.canvas.className=`block h-full w-full object-contain`,this.canvas.dataset.testid=`watch-canvas`}setHevc(e){this.hevc=e,this.header&&(this.spsRect=qr(this.header,e)),this.mse?.setHevc(e)}get onMse(){return!!this.mse}decodeFailed(){if(this.mse||this.ownStats.frames>0||++this.failsNoPicture<3||!fa())return!1;let e=new ba(this.onProblem,this.latency,this.onNeedKey);e.setHevc(this.hevc),e.markProblemShown(),this.mse=e;let t=this.video;this.video=null;try{t?.close()}catch{}return this.canvas.style&&(this.canvas.style.display=`none`),this.wrap?.append(e.element),this.header&&e.onMessage(new Uint8Array([0,...this.header]).buffer),this.onNeedKey?.(),!0}startSound(){this.soundOn=!0,la(),this.mseSound?this.mseSound.start():this.openContext()}openContext(){try{if(!this.actx){let e=new AudioContext({latencyHint:`interactive`});this.actx=e,e.onstatechange=()=>{this.actx===e&&e.state!==`running`&&e.state!==`closed`&&this.armResume()}}this.actx.resume().catch(()=>{})}catch{this.onSoundFail?.()}}get sound(){return this.soundOn}setMuted(e){this.muted=e,this.mseSound?.setMuted(e)}resumeSound(){if(!this.soundOn)return;if(this.mseSound)return this.mseSound.resume();let e=this.actx;e&&e.state!==`running`&&e.state!==`closed`&&(this.clock.reset(),e.resume().catch(()=>{}),this.armResume())}get soundStats(){return{decoded:this.pipe?.decoded??0,concealed:this.pipe?.concealed??0,underruns:this.clock.underruns,dropped:this.clock.dropped,cushionMs:Math.round(this.clock.cushion*1e3)}}armResume(){if(this.unarm||typeof window>`u`||!window.addEventListener)return;let e=()=>{let e=this.actx;if(!e||e.state===`closed`)return this.unarm?.();this.clock.reset(),e.resume().then(()=>{e.state===`running`&&this.unarm?.()}).catch(()=>{})};for(let t of sa)window.addEventListener(t,e,!0);this.unarm=()=>{for(let t of sa)window.removeEventListener(t,e,!0);this.unarm=null}}onMessage(e){let t=new Uint8Array(e);if(t.length<1||this.stopped)return;let n=t[0],r=t.subarray(1);if(this.mse&&(n===0||n===1))return n===0&&(this.header=r.slice()),this.mse.onMessage(e);n===0?this.openVideo(r.slice()):n===1?this.onVideo(r):n===3?this.openAudio(r.slice()):n===4&&this.onAudio(r)}async openVideo(e){if(this.header=e,this.spsRect=qr(e,this.hevc),!this.opening){this.opening=!0;try{let t=this.hevc?await xa(e):Oi(e);if(this.mse||this.stopped)return;if(!t){this.problemShown=!0,this.onProblem(`no_hevc`);return}this.ownStats.codec=t;let n=this.hevc?void 0:Vi(e)??void 0;try{this.video?.close()}catch{}let r=new VideoDecoder({output:e=>{let t=this.realVisible(e),n=this.canvas;(n.width!==t.displayWidth||n.height!==t.displayHeight)&&(n.width=t.displayWidth,n.height=t.displayHeight),this.ctx?.drawImage(t,0,0,n.width,n.height),this.ownStats.drawn(!0),t.close(),this.problemShown&&(this.problemShown=!1,this.onProblem(null))},error:()=>{this.video===r&&(this.problemShown=!0,this.onProblem(`decode`),this.decodeFailed()||this.rebuild())}}),i={codec:t,optimizeForLatency:!0};n&&(i.description=n),this.software&&(i.hardwareAcceleration=`prefer-software`),r.configure(i),this.video=r,this.sawKey=!1}catch{this.problemShown=!0,this.onProblem(`decode`),this.decodeFailed()}finally{this.opening=!1}}}realVisible(e){let t=this.spsRect,n=Jr(e,t);if(n)try{let t=new VideoFrame(e,{visibleRect:{x:n.x,y:n.y,width:n.w,height:n.h},displayWidth:n.w,displayHeight:n.h});return e.close(),t}catch{return e}let r=e.visibleRect;if(t&&r&&!this.software&&(r.width{if(this.video===e){try{e?.close()}catch{}this.rebuild(),this.onNeedKey?.()}})}return e}rebuild(){this.mse||this.stopped||(this.video=null,this.sawKey=!1,this.header&&this.openVideo(this.header).then(()=>this.keyAsk.waiting()))}onVideo(e){let t=this.video;if(t?.state===`closed`){this.opening||this.rebuild();return}if(!t||t.state!==`configured`)return;let n=Di(e,this.hevc);if(this.ownStats.arrived(),!this.sawKey&&!n)return this.ownStats.drop(),this.keyAsk.waiting();if(!n&&t.decodeQueueSize>qi[this.latency])return this.sawKey=!1,this.ownStats.drop(),this.keyAsk.waiting();this.sawKey=!0;let r=e;this.hevc?n&&this.header&&(r=new Uint8Array(this.header.length+e.length),r.set(this.header,0),r.set(e,this.header.length)):r=Li(e,!1,!0),this.ts+=16667,this.ownStats.decoding(),t.decode(new EncodedVideoChunk({type:n?`key`:`delta`,timestamp:this.ts,data:r}))}openAudio(e){if(e.length<6)return;let t=++this.audioGen;if(this.pipe?.reset(),this.pipe=null,this.clock.reset(),this.audioHeader=e,this.mseSound)return this.mseSound.setHeader(e);let n=e[0];aa(new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(2),n).then(n=>{if(t!==this.audioGen)return;if(!n)return N()?this.soundThroughMse(e):this.soundThroughWasm(e);let r=new Qr((e,t)=>this.play(e,t,r.sampleRate));try{r.header(ta(e)),this.pipe=r}catch{this.soundThroughMse(e)}})}soundThroughMse(e){this.pipe=null,this.mseSound||(this.mseSound=new P(this.latency,()=>this.mseSoundFailed()),this.soundOn&&this.mseSound.start()),this.mseSound.setHeader(e)}soundThroughWasm(e){this.pipe?.reset(),this.soundWasm=!0;let t=new Qr((e,n)=>this.play(e,n,t.sampleRate),Ei,()=>{this.pipe===t&&(this.pipe=null),this.onSoundFail?.()});this.pipe=t,t.header(ta(e))}mseSoundFailed(){let e=this.mseSound;e&&(this.mseSound=null,e.stop(),this.soundOn&&(this.openContext(),this.actx&&this.actx.state!==`running`&&this.armResume()),this.audioHeader&&this.soundThroughWasm(this.audioHeader))}onAudio(e){if(this.mseSound)return this.mseSound.frame(e);this.soundOn&&this.pipe&&this.pipe.packet(e)}play(e,t,n){let r=this.actx;if(!r||r.state!==`running`||!e.length)return;let i=e[0].length,a=this.clock.at(r.currentTime,i/n);if(a===null)return;let o=r.createBuffer(e.length,i,n),s=this.muted?0:t;e.forEach((e,t)=>o.copyToChannel(s===1?e:e.map(e=>e*s),t));let c=r.createBufferSource();c.buffer=o,c.connect(r.destination),c.start(a)}stop(){this.stopped=!0;try{this.video?.close()}catch{}this.mse?.stop(),this.audioGen++,this.pipe?.reset(),this.pipe=null,this.unarm?.(),this.actx?.close().catch(()=>{}),this.mseSound?.stop()}};function la(){try{let e=navigator.audioSession;e&&e.type!==`playback`&&(e.type=`playback`)}catch{}}function ua(e,t){try{return e.isTypeSupported(t)}catch{return!1}}function N(){let e=typeof window>`u`?null:fa();return!!e&&(ua(e,`audio/mp4; codecs="Opus"`)||ua(e,`audio/mp4; codecs="opus"`))}var P=class{constructor(e,t,n=document.createElement(`audio`)){this.onFail=t,this.header=null,this.time=0,this.on=!1,this.failed=!1,this.order=new ea,this.el=n,this.track=new ga(n,()=>this.fail(),e===`player`?Yi:e)}get playing(){return this.on&&!this.failed}report(){return{snd:`mse`,snd_jumps:this.track.seeks}}setHeader(e){this.header=e,this.on&&this.open()}start(){if(!this.on&&(this.on=!0,this.header&&this.open(),!this.failed))try{this.el.play()?.catch?.(()=>{})}catch{}}frame(e){if(!this.on||this.failed||!this.track.ready&&!this.track.backlog)return;let t=$i(e);if(!t||!this.order.take(t.index))return;let n=Ki(this.track.nextSeq(),this.time,t.packet);this.time+=Gi(t.packet),this.track.push(n)}setMuted(e){this.el.muted=e}resume(){if(this.playing&&this.el.paused)try{this.el.play()?.catch?.(()=>{})}catch{}}stop(){this.on=!1,this.track.close()}open(){let e=this.header;if(!e||e.length<6||this.failed)return;let t=e[0],n=Wi(t,new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(2));this.track.open(`audio/mp4; codecs="Opus"`,n)||this.track.open(`audio/mp4; codecs="opus"`,n)?(this.time=0,this.order.reset()):this.fail()}fail(){this.failed||(this.failed=!0,this.onFail())}},da=class{constructor(e,t,n=Ei){this.onFail=t,this.codecs=n,this.actx=null,this.pipe=null,this.header=null,this.on=!1,this.failed=!1,this.muted=!1,this.unarm=null,this.played=!1,this.clock=new ra(e===`player`?.05:.08)}get playing(){return this.on&&!this.failed}get stats(){return{decoded:this.pipe?.decoded??0,concealed:this.pipe?.concealed??0,underruns:this.clock.underruns,dropped:this.clock.dropped}}start(){if(!this.failed){this.on=!0,la();try{if(!this.actx){let e=new AudioContext({latencyHint:`interactive`});this.actx=e,e.onstatechange=()=>{this.actx===e&&e.state!==`running`&&e.state!==`closed`&&this.armResume()}}this.actx.resume().catch(()=>{}),this.actx.state!==`running`&&this.armResume()}catch{return this.fail()}this.header&&!this.pipe&&this.open()}}setHeader(e){e.length<6||(this.header=e,this.pipe?.reset(),this.pipe=null,this.clock.reset(),this.on&&this.open())}frame(e){this.on&&!this.failed&&this.pipe?.packet(e)}setMuted(e){this.muted=e}resume(){let e=this.actx;this.playing&&e&&e.state!==`running`&&e.state!==`closed`&&(this.clock.reset(),e.resume().catch(()=>{}),this.armResume())}stop(){this.on=!1,this.pipe?.reset(),this.pipe=null,this.unarm?.(),this.actx?.close().catch(()=>{}),this.actx=null}open(){let e=this.header;if(!e||this.failed)return;let t=new Qr((e,n)=>this.play(e,n,t.sampleRate),this.codecs,()=>{this.pipe===t&&this.fail()});this.pipe=t,t.header(ta(e))}play(e,t,n){let r=this.actx;if(!r||r.state!==`running`||!e.length)return;let i=e[0].length,a=this.clock.at(r.currentTime,i/n);if(a===null)return;let o=r.createBuffer(e.length,i,n),s=this.muted?0:t;e.forEach((e,t)=>o.copyToChannel(s===1?e:e.map(e=>e*s),t));let c=r.createBufferSource();c.buffer=o,c.connect(r.destination),c.start(a),this.played=!0}armResume(){if(this.unarm||typeof window>`u`||!window.addEventListener)return;let e=()=>{let e=this.actx;if(!e||e.state===`closed`)return this.unarm?.();this.clock.reset(),e.resume().then(()=>{e.state===`running`&&this.unarm?.()}).catch(()=>{})};for(let t of sa)window.addEventListener(t,e,!0);this.unarm=()=>{for(let t of sa)window.removeEventListener(t,e,!0);this.unarm=null}}fail(){this.failed||(this.failed=!0,this.stop(),this.onFail())}};function fa(){let e=window;return e.ManagedMediaSource??e.MediaSource??null}var pa=10,ma=3;function ha(e,t,n,r=ma){let i=null;for(let a of e)a>t&&a<=n-r&&(i=a);return i}var ga=class{constructor(e,t,n=`watch`,r,i=()=>performance.now()){this.el=e,this.onError=t,this.latency=n,this.onNeedKey=r,this.now=i,this.ms=null,this.sb=null,this.queue=[],this.mime=``,this.seq=1,this.ready=!1,this.dropped=!1,this.keys=null,this.seeks=0,this.maxLagS=0,this.fromZero=0,this.trims=0,this.lastJump=null,this.trimAt=-1,this.trimFrom=-1,this.keyAt=-1,this.attached=null,r&&(this.keys=[])}setEdge(e){this.latency=e}markKey(e){this.keys?.push(e),this.keyAt=this.now()}open(e,t){let n=fa();if(!n||!ua(n,e))return!1;this.close();let r=new n;return this.ms=r,this.mime=e,this.queue=[t],this.seq=1,this.ready=!1,this.keys&&=[],r.addEventListener(`sourceopen`,()=>{if(this.ms===r)try{let e=r.addSourceBuffer(this.mime);e.mode=`segments`,e.addEventListener(`updateend`,()=>this.pump()),e.addEventListener(`error`,()=>this.onError()),this.sb=e,this.ready=!0,this.pump()}catch{this.onError()}}),`ManagedMediaSource`in window&&n===window.ManagedMediaSource&&(this.el.disableRemotePlayback=!0),this.attached=_a(this.el,r),!0}nextSeq(){return this.seq++}get backlog(){return this.queue.length}push(e){this.queue.push(e),this.pump()}pump(){let e=this.sb;if(!e||e.updating||!this.ready)return;let t=this.el;if(e.buffered.length){let n=e.buffered.end(e.buffered.length-1),r=e.buffered.start(0),i=n-t.currentTime,a=Xi(i,n,this.latency);if(a.seekTo!==null){this.seeks++,this.maxLagS=Math.max(this.maxLagS,i);let o=this.now(),s=e=>e<0?-1:Math.round(o-e);t.currentTime<.05&&r>1&&this.fromZero++,this.lastJump={at:t.currentTime,start:r,end:n,ranges:e.buffered.length,readyState:t.readyState,paused:t.paused,seeking:t.seeking,sinceTrimMs:s(this.trimAt),trimFrom:this.trimFrom,sinceKeyMs:s(this.keyAt)},t.currentTime=Math.max(r,a.seekTo)}if(t.playbackRate!==a.rate&&(t.playbackRate=a.rate),t.currentTime-r>pa&&this.trim(e,r))return}let n=this.queue.shift();if(n){try{e.appendBuffer(n)}catch{this.dropped=!0}t.paused&&t.play().catch(()=>{})}}trim(e,t){let n=this.el.currentTime,r=n-ma;if(this.keys){if(r=ha(this.keys,t,n),r===null)return(this.keys[this.keys.length-1]??-1/0)<=n-ma&&this.onNeedKey?.(),!1;let e=r;this.keys=this.keys.filter(t=>t>=e),r-=.001}try{return e.remove(t,r),this.trims++,this.trimAt=this.now(),this.trimFrom=n,!0}catch{return!1}}close(){this.ready=!1,this.sb=null,this.queue=[];let e=this.ms;if(this.ms=null,e&&e.readyState===`open`)try{e.endOfStream()}catch{}if(this.attached===`object`)try{this.el.srcObject=null}catch{}this.attached=null,this.el.src?.startsWith(`blob:`)&&URL.revokeObjectURL(this.el.src),this.el.removeAttribute(`src`)}};function _a(e,t){if(`srcObject`in e)try{return e.srcObject=t,`object`}catch{}return e.src=URL.createObjectURL(t),`url`}var va=1e4,ya=class{constructor(e=3,t=va,n=()=>performance.now()){this.max=e,this.windowMs=t,this.now=n,this.at=[]}fail(){let e=this.now();return this.at=this.at.filter(t=>e-t=this.max}clear(){this.at=[]}},ba=class{constructor(e,t=`watch`,n,r){this.onProblem=e,this.latency=t,this.wasm=null,this.audioHeader=null,this.muted=!1,this.gaveUp=!1,this.reopening=!1,this.failedWhileOpening=!1,this.wrap=document.createElement(`div`),this.hevc=!1,this.header=null,this.sawKey=!1,this.stats=new oa(`mse`),this.problemShown=!1,this.vTime=0,this.vLast=0,this.soundOn=!1,this.onSoundFail=null,this.onGiveUp=null,this.keyAsk=new Qi(n),this.fails=new ya(3,va,r);let i=document.createElement(`video`);i.muted=!0,i.autoplay=!0,i.playsInline=!0,i.className=`block h-full w-full object-contain`,i.dataset.testid=`watch-video`,this.audio=new P(t,()=>this.soundThroughWasm()),this.wrap.className=`h-full w-full`,this.wrap.append(i,this.audio.el),this.video=new ga(i,()=>this.showProblem(),t,()=>this.keyAsk.waiting()),i.addEventListener(`error`,()=>this.restartVideo()),i.addEventListener(`playing`,()=>{this.fails.clear(),this.problemShown&&(this.problemShown=!1,this.onProblem(null))})}markProblemShown(){this.problemShown=!0}showProblem(){this.problemShown||(this.problemShown=!0,this.onProblem(`decode`))}restartVideo(){if(this.gaveUp)return;if(this.reopening){this.failedWhileOpening=!0;return}if(this.showProblem(),this.fails.fail()){this.gaveUp=!0,this.video.close(),this.onGiveUp?.();return}let e=this.header;if(e){this.header=null,this.reopening=!0,this.failedWhileOpening=!1;try{this.openVideo(e)}finally{this.reopening=!1}this.sawKey=!1,this.keyAsk.waiting(),this.failedWhileOpening&&(this.failedWhileOpening=!1,this.restartVideo())}}get failed(){return this.gaveUp}setVideoEdge(e){this.video.setEdge(e)}get videoSeeks(){return{seeks:this.video.seeks,maxLagMs:Math.round(this.video.maxLagS*1e3),fromZero:this.video.fromZero,trims:this.video.trims,lastJump:this.video.lastJump}}get element(){return this.wrap}resume(){let e=this.video.el;e.paused&&e.play()?.catch?.(()=>{})}setHevc(e){this.hevc=e}startSound(){if(this.soundOn=!0,this.wasm)return this.wasm.start();if(!N())return this.soundThroughWasm();this.audio.start()}soundThroughWasm(){if(this.wasm)return;this.audio.stop();let e=new da(this.latency,()=>this.onSoundFail?.());this.wasm=e,e.setMuted(this.muted),this.audioHeader&&e.setHeader(this.audioHeader),this.soundOn&&e.start()}resumeSound(){this.soundOn&&(this.wasm?this.wasm.resume():this.audio.resume())}setMuted(e){this.muted=e,this.audio.setMuted(e),this.wasm?.setMuted(e)}soundReport(){return this.soundOn?this.wasm?na(`wasm`,this.wasm.stats):this.audio.report():null}get soundPlaying(){return this.wasm?this.wasm.played:this.audio.playing}get sound(){return this.soundOn}onMessage(e){let t=new Uint8Array(e);if(t.length<1)return;let n=t[0],r=t.subarray(1);n===0?this.openVideo(r.slice()):n===1?this.onVideo(r):n===3?(this.audioHeader=r.slice(),(this.wasm??this.audio).setHeader(this.audioHeader)):n===4&&(this.wasm??this.audio).frame(r)}openVideo(e){let t=!!this.header&&this.header.length===e.length&&this.header.every((t,n)=>t===e[n]);if(t&&this.video.ready)return;if(this.gaveUp){if(t)return;this.gaveUp=!1,this.fails.clear()}this.header=e;let n=qr(e,this.hevc)??{w:1920,h:1080},r=Hi(e,this.hevc,n);r&&(this.stats.codec=/codecs="([^"]+)"/.exec(r.mime)?.[1]??``,this.video.open(r.mime,r.init)?(this.sawKey=!1,this.vTime=0,this.vLast=0):(this.problemShown=!0,this.onProblem(this.hevc?`no_hevc`:`decode`)))}onVideo(e){if(!this.video.ready&&!this.video.backlog)return;let t=Di(e,this.hevc);if(this.video.dropped&&(this.video.dropped=!1,this.sawKey=!1),this.stats.arrived(),!this.sawKey&&!t)return this.stats.drop(),this.keyAsk.waiting();if(!t&&this.video.backlog>qi[this.latency])return this.sawKey=!1,this.stats.drop(),this.keyAsk.waiting();this.sawKey=!0,this.stats.drawn();let n=performance.now(),r=this.vLast?Math.min(9e3,Math.max(750,Math.round((n-this.vLast)*90))):1500;this.vLast=n,t&&this.video.markKey(this.vTime/9e4),this.video.push(Ui(this.video.nextSeq(),this.vTime,r,e,this.hevc,t)),this.vTime+=r}stop(){this.video.close(),this.audio.stop(),this.wasm?.stop()}};async function xa(e){let t=Yr(e);if(t&&typeof VideoDecoder<`u`)try{if((await VideoDecoder.isConfigSupported({codec:t,codedWidth:1920,codedHeight:1080})).supported)return t}catch{}return Ai(1920,1080)}var F={CROSS:1,CIRCLE:2,SQUARE:4,TRIANGLE:8,LEFT:16,RIGHT:32,UP:64,DOWN:128,L1:256,R1:512,L3:1024,R3:2048,OPTIONS:4096,SHARE:8192,TOUCHPAD:16384,PS:32768},Sa={buttons:0,l2:0,r2:0,lx:0,ly:0,rx:0,ry:0};function Ca(e,t){let n=e=>Math.max(0,Math.min(1,e));return[Math.round(n(e)*1919),Math.round(n(t)*941)]}F.UP,F.DOWN,F.LEFT,F.RIGHT,F.CROSS,F.CROSS,F.CIRCLE,F.CIRCLE,F.SQUARE,F.TRIANGLE,F.L1,F.R1,F.L3,F.R3,F.OPTIONS,F.SHARE,F.PS,F.TOUCHPAD,F.UP,F.DOWN,F.LEFT,F.RIGHT,F.CROSS,F.CIRCLE,F.SQUARE,F.TRIANGLE,F.L1,F.R1,F.L3,F.R3,F.OPTIONS,F.SHARE,F.PS,F.TOUCHPAD;var wa=e=>Math.max(-32768,Math.min(32767,Math.round(e))),Ta=[F.CROSS,F.CIRCLE,F.SQUARE,F.TRIANGLE,F.L1,F.R1,0,0,F.SHARE,F.OPTIONS,F.L3,F.R3,F.UP,F.DOWN,F.LEFT,F.RIGHT,F.PS,F.TOUCHPAD];function Ea(e){return Math.abs(e)<=1.01?Math.round((e+1)*3.5)%8:null}var Da=[0,1,1,1,0,-1,-1,-1],Oa=[-1,-1,0,1,1,1,0,-1];function ka(e,t){let n=e.axes[t.a]??0;if(t.hat){let e=Ea(n);return e===null?0:(t.hat===`x`?Da:Oa)[e]}return t.inv?-n:n}var Aa={buttons:Ta.flatMap((e,t)=>e?[[e,{b:t}]]:[]),l2:{b:6},r2:{b:7},lx:{a:0},ly:{a:1},rx:{a:2},ry:{a:3}};function ja(e,t,n=!1){if(`b`in t){let r=e.buttons[t.b];return r?n&&r.value>0?Math.min(1,r.value):Math.max(+!!r.pressed,r.value):0}if(`h`in t){let n=Ea(e.axes[t.h]??9);if(n===null)return 0;let r=(n-t.at+8)%8;return+(r===0||r===1||r===7)}let r=e.axes[t.a];if(r===void 0)return 0;let i=t.rest??0;return Math.min(1,Math.max(0,(r-i)/(t.d-i)))}function Ma(e){if(e.mapping===`standard`)return Aa;let t=Na.get(e.id);if(t)return t;let n=e.axes.findIndex(e=>Math.abs(e)>1.05);if(n<0)return Aa;let r={...Aa,buttons:[...Aa.buttons,[F.UP,{h:n,at:0}],[F.RIGHT,{h:n,at:2}],[F.DOWN,{h:n,at:4}],[F.LEFT,{h:n,at:6}]]};return Na.set(e.id,r),r}var Na=new Map;function Pa(e,t=Ma){let n={...Sa},r=e=>Math.abs(e)<.08?0:wa(e*32767),i=(e,t)=>Math.abs(t)>Math.abs(e)?t:e,a=(e,t)=>t?r(ka(e,t)):0;for(let r of e){if(!r||!r.connected)continue;let e=t(r);for(let[t,i]of e.buttons)ja(r,i)>.5&&(n.buttons|=t);e.l2&&(n.l2=Math.max(n.l2,Math.round(ja(r,e.l2,!0)*255))),e.r2&&(n.r2=Math.max(n.r2,Math.round(ja(r,e.r2,!0)*255))),n.lx=i(n.lx,a(r,e.lx)),n.ly=i(n.ly,a(r,e.ly)),n.rx=i(n.rx,a(r,e.rx)),n.ry=i(n.ry,a(r,e.ry))}return n}function Fa(e,t){return{buttons:e.buttons|t.buttons,l2:Math.max(e.l2,t.l2),r2:Math.max(e.r2,t.r2),lx:wa(e.lx+t.lx),ly:wa(e.ly+t.ly),rx:wa(e.rx+t.rx),ry:wa(e.ry+t.ry),touch:e.touch??t.touch??null,motion:e.motion??t.motion??null}}var I=e=>e.toLowerCase().padStart(4,`0`);function Ia(e){let t=/^(.*?)\s*\((?:[^()]*?\s)?Vendor:\s*([0-9a-f]{1,4})\s+Product:\s*([0-9a-f]{1,4})\s*\)\s*$/i.exec(e);if(t)return{vendor:I(t[2]),product:I(t[3]),name:t[1].trim()};let n=/^([0-9a-f]{1,4})-([0-9a-f]{1,4})-(.*)$/i.exec(e.trim());return n?{vendor:I(n[1]),product:I(n[2]),name:n[3].trim()}:null}function La(e=globalThis.navigator){let t=e?.userAgent??``;return/Android|iPhone|iPad|iPod/i.test(t)?null:/Macintosh|Mac OS X/i.test(t)?(e?.maxTouchPoints??0)>1?null:`m`:/Windows/i.test(t)?`w`:/Linux|CrOS|X11/i.test(t)?`l`:null}function Ra(e,t){if(!t)return null;let n=t===`l`?[`l`]:[`m`,`w`];for(let t of n){let n=Ge[`${t}${e.vendor}${e.product}`];if(n!==void 0)return We[n]??null}return null}var za={1:0,2:2,4:4,8:6};function Ba(e){let t=0,n=!1;for(let r of e){let e=/a(\d+)/.exec(r);e&&(t=Math.max(t,Number(e[1])+1)),r.startsWith(`h`)&&(n=!0)}return{n:t,hat:n}}function Va(e,t,n){let{n:r,hat:i}=Ba(t),a=Ta.length,o=e.axes.findIndex(e=>Math.abs(e)>1.05),s=e=>e;if(i&&o<0)return n===`l`&&e.axes.length>=r+2?{hat:-1,hatXY:r,axis:s}:null;if(!(i?o>r:n!==`l`&&e.axes.length>=r+2))return{hat:o,hatXY:-1,axis:s};if(r<=4)return{hat:o,hatXY:-1,axis:e=>[0,1,2,5][e]??e};let c=t[a+2]?.replace(`~`,``)===`a2`&&t[a+3]?.replace(`~`,``)===`a3`,l=[t[6],t[7]].every(e=>/^a[45]~?$/.test(e??``));return r===6&&c&&l?{hat:o,hatXY:-1,axis:e=>[0,1,2,5,3,4][e]??e}:{hat:o,hatXY:-1,axis:s}}function Ha(e,t){let n=/^b(\d+)$/.exec(e);if(n)return{b:Number(n[1])};if(n=/^([+-]?)a(\d+)(~?)$/.exec(e),n){let e=t.axis(Number(n[2]));return n[1]===`+`?{a:e,d:1}:n[1]===`-`?{a:e,d:-1}:n[3]?{a:e,d:-1,rest:1}:{a:e,d:1,rest:-1}}if(n=/^h0\.(\d)$/.exec(e),n){let e=za[n[1]];if(e===void 0)return null;if(t.hat>=0)return{h:t.hat,at:e};if(t.hatXY>=0)return e===0?{a:t.hatXY+1,d:-1}:e===4?{a:t.hatXY+1,d:1}:e===6?{a:t.hatXY,d:-1}:{a:t.hatXY,d:1}}return null}function Ua(e,t){let n=/^a(\d+)(~?)$/.exec(e);if(n)return n[2]?{a:t.axis(Number(n[1])),inv:!0}:{a:t.axis(Number(n[1]))};if(e===`hx`||e===`hy`){if(t.hat>=0)return{a:t.hat,hat:e===`hx`?`x`:`y`};if(t.hatXY>=0)return{a:t.hatXY+ +(e===`hy`)}}return null}function Wa(e,t,n){let r=e.split(`,`),i=Va(t,r,n);if(!i)return null;let a={buttons:[],l2:null,r2:null,lx:null,ly:null,rx:null,ry:null};for(let e=0;eArray.isArray(e)&&e.length===2&&typeof e[0]==`number`&&Ja(e[1]))&&[t.l2,t.r2,t.lx,t.ly,t.rx,t.ry].every(Ja)}function Xa(){try{let e=yt(qa),t=e?JSON.parse(e):null;return!t||typeof t!=`object`||Array.isArray(t)?{}:Object.fromEntries(Object.entries(t).filter(e=>Ya(e[1])))}catch{return{}}}function Za(e,t){let n=Xa();return t?n[e]=t:delete n[e],vt(qa,JSON.stringify(n)),Qa=n,n}var Qa=null;function $a(e){return Qa??=Xa(),Qa[e.id]??eo(Qa,e.id)??Ka(e)??Ma(e)}function eo(e,t){if(!t.endsWith(` (app)`))return null;let n=t.slice(0,-6).trim().toLowerCase();if(!n)return null;let r=Object.keys(e).filter(e=>{let t=e.trim().toLowerCase();return t===n||t.includes(n)}),i=r.find(e=>e.trim().toLowerCase()===n)??(r.length===1?r[0]:null);return i?(Qa=Za(t,e[i]),e[i]):null}[{kind:`button`,bit:F.CROSS,name:`✕`},{kind:`button`,bit:F.CIRCLE,name:`○`},{kind:`button`,bit:F.SQUARE,name:`□`},{kind:`button`,bit:F.TRIANGLE,name:`△`},{kind:`button`,bit:F.UP,name:`↑`},{kind:`button`,bit:F.DOWN,name:`↓`},{kind:`button`,bit:F.LEFT,name:`←`},{kind:`button`,bit:F.RIGHT,name:`→`},{kind:`button`,bit:F.L1,name:`L1`},{kind:`button`,bit:F.R1,name:`R1`},{kind:`trigger`,which:`l2`,name:`L2`},{kind:`trigger`,which:`r2`,name:`R2`},{kind:`button`,bit:F.L3,name:`L3`},{kind:`button`,bit:F.R3,name:`R3`},{kind:`button`,bit:F.OPTIONS,name:`Options`},{kind:`button`,bit:F.SHARE,name:`Create`},{kind:`button`,bit:F.PS,name:`PS`},{kind:`button`,bit:F.TOUCHPAD,name:`Touchpad`},{kind:`axis`,which:`lx`,name:`L →`},{kind:`axis`,which:`ly`,name:`L ↓`},{kind:`axis`,which:`rx`,name:`R →`},{kind:`axis`,which:`ry`,name:`R ↓`}].filter(e=>e.kind!==`button`||![F.L3,F.R3,F.OPTIONS,F.SHARE,F.PS,F.TOUCHPAD].includes(e.bit));var to=12e4;function no(e){let t;try{t=JSON.parse(e)}catch{return null}return Array.isArray(t.rumble)?{rumble:[Number(t.rumble[0])||0,Number(t.rumble[1])||0]}:Array.isArray(t.light)?{light:t.light}:t.stage===`asking`?{kind:`asking`}:t.stage===`refused`?{kind:`refused`,why:String(t.why??``)}:t.stage===`joined`?{kind:`joined`,host:t.session?.host??null,playing:!!t.session?.playing,passcode:!!t.session?.passcode}:null}function ro(e,t){return e.buttons===t.buttons&&e.l2===t.l2&&e.r2===t.r2&&e.lx===t.lx&&e.ly===t.ly&&e.rx===t.rx&&e.ry===t.ry&&(e.touch?.[0]??-1)===(t.touch?.[0]??-1)&&(e.touch?.[1]??-1)===(t.touch?.[1]??-1)&&(e.motion?.t??-1)===(t.motion?.t??-1)}var io=class{constructor(e){this.o=e,this.ws=null,this.last={...Sa},this.lastSent=0,this.raf=0,this.keepalive=null,this.watchdog=null,this.retry=null,this.done=!1,this.stage={kind:`connecting`},this.wasIn=!1,this.attempt=0,this.deadline=0,this.lastHeard=0,this.control=!1,this.neutral=!1,this.now=e.now??(()=>Date.now()),this.WS=e.WebSocketImpl??WebSocket}get currentStage(){return this.stage}setStage(e){this.stage=e,this.o.onStage(e)}start(){if(this.done=!1,this.setStage({kind:`connecting`}),this.connect(),this.done)return;let e=this.o.raf??(e=>window.requestAnimationFrame(e)),t=()=>{this.send(!1),this.raf=e(t)};this.raf=e(t),this.keepalive=setInterval(()=>this.send(!1),250),this.watchdog=setInterval(()=>this.checkSilence(),1e3)}connect(){let e;this.lastHeard=this.now();try{e=new this.WS(this.o.url)}catch{this.dropped();return}this.ws=e,e.binaryType=`arraybuffer`,this.control=!this.o.watch,this.o.watch&&this.o.watch.onControl(!1),e.onmessage=t=>{this.ws===e&&(this.lastHeard=this.now(),this.onMessage(t.data))},e.onclose=t=>{if(this.ws!==e)return;this.ws=null;let n=Le(t);n&&!this.wasIn?this.finish({kind:`refused`,why:`net:${n}`}):this.dropped()},e.onopen=()=>{this.ws===e&&(this.lastHeard=this.now(),this.o.hello&&e.send(JSON.stringify({hello:this.o.hello})),this.send(!0))}}onMessage(e){if(typeof e!=`string`){e instanceof ArrayBuffer&&this.o.watch?.onFrame(e);return}if(this.o.hello&&e.startsWith(`{"rt":`))try{let t=JSON.parse(e);if(typeof t.rt==`string`&&/^[0-9a-f]{32}$/.test(t.rt)){this.o.hello.rt=t.rt,this.o.onReconnectToken?.(t.rt);return}}catch{}if(e.includes(`"kbm_caps"`))try{let t=JSON.parse(e);if(t.kbm_caps){let e=t.kbm_caps;this.o.onKbmCaps?.({mouse:e.mouse===!0,keyboard:e.keyboard===!0,reason:typeof e.reason==`string`?e.reason:null});return}}catch{}if(this.o.watch)try{let t=JSON.parse(e);if(t.watch&&this.o.watch.onCodec(!!t.watch.hevc),typeof t.control==`boolean`){this.control=t.control,this.o.watch.onControl(t.control),t.control&&this.send(!0);return}}catch{}let t=no(e);if(t){if(`rumble`in t){let[e,n]=t.rumble;navigator.vibrate?.(e||n?250:0)}else if(`light`in t)this.o.onLight?.(t.light);else if(t.kind===`refused`)this.finish(t);else{if(t.kind===`joined`){let e=this.stage.kind!==`joined`;this.wasIn=!0,this.attempt=0,this.setStage(t),e&&this.send(!0);return}this.setStage(t)}}}dropped(){if(this.done)return;if(!this.wasIn||(this.stage.kind!==`reconnecting`&&(this.deadline=this.now()+to),this.now()>=this.deadline)){this.finish({kind:`lost`});return}let e=Re(this.attempt);this.setStage({kind:`reconnecting`,attempt:this.attempt}),this.attempt+=1,this.retry&&clearTimeout(this.retry),this.retry=setTimeout(()=>{this.retry=null,this.done||this.connect()},e)}checkSilence(){let e=this.ws;if(e&&!this.done&&(this.stage.kind===`joined`||this.stage.kind===`reconnecting`)&&!(this.now()-this.lastHeard<=3500)){this.ws=null;try{e.close()}catch{}this.dropped()}}wake(){this.stage.kind===`lost`&&this.wasIn?(this.attempt=0,this.start()):this.stage.kind===`reconnecting`&&(this.deadline=this.now()+to,this.attempt=0,this.retry&&(clearTimeout(this.retry),this.retry=null,this.connect()))}setNeutral(e){this.neutral!==e&&(this.neutral=e,this.send(!0))}current(){let e=Pa(Ue(typeof navigator>`u`?void 0:navigator),$a),t=this.o.touchPad();return{...Fa(e,t),touch:t.touch??null,motion:this.o.motion?.()??null}}send(e){let t=this.ws;if(!t||t.readyState!==this.WS.OPEN||!this.control)return;let n=this.neutral?{...Sa,touch:null,motion:null}:this.current(),r=this.now();!e&&ro(n,this.last)&&r-this.lastSent<250||(this.last=n,this.lastSent=r,t.send(JSON.stringify({pad:{...n,touch:n.touch??null,motion:n.motion??null},ka:1})))}askKeyframe(){let e=this.ws;e&&e.readyState===this.WS.OPEN&&e.send(JSON.stringify({keyframe:!0}))}sendKbm(e){let t=this.ws;return!t||t.readyState!==this.WS.OPEN||!this.control?!1:(t.send(e instanceof Uint8Array?e:JSON.stringify(e)),!0)}sendPad(){this.send(!1)}clearTimers(){(this.o.cancelRaf??(e=>window.cancelAnimationFrame(e)))(this.raf),this.keepalive&&clearInterval(this.keepalive),this.watchdog&&clearInterval(this.watchdog),this.retry&&clearTimeout(this.retry),this.keepalive=this.watchdog=this.retry=null}finish(e){this.done=!0,this.clearTimers();let t=this.ws;this.ws=null;try{t?.close()}catch{}this.setStage(e)}stop(){this.done=!0,this.clearTimers();let e=this.ws;this.ws=null,e&&e.readyState===this.WS.OPEN&&e.send(JSON.stringify({pad:{...Sa,touch:null}})),e?.close()}},ao=`ps5upload.pad.device`;function oo(e,t=e=>crypto.getRandomValues(e)){let n=e.get(ao);if(n&&/^[0-9a-f]{32}$/.test(n))return n;let r=new Uint8Array(16);t(r);let i=Array.from(r,e=>e.toString(16).padStart(2,`0`)).join(``);return e.set(ao,i),i}var so=new Set,co={held:new Set,touch:null,touchPad:Sa,mapping:!1,get paused(){return so.size>0},motion:null},lo={s:.85,m:1,l:1.15},uo=.25;function fo(e){return typeof e!=`number`||!Number.isFinite(e)?1:Math.min(1,Math.max(uo,e))}var po={overlay:{width:844,height:390},deck:{width:390,height:480}},mo=.7,ho=1.4;function go(e,t,n,r){let i=lo[e]??1;if(!(t>0)||!(n>0))return i;let a=r?po.deck:po.overlay,o=Math.min(ho,Math.max(mo,Math.min(t/a.width,n/a.height)));return Math.round(o*i*1e3)/1e3}var _o=34;function vo(e,t){return t>0&&8+Math.max(112*e,90)+156*e+124*e+Math.max(56*e,44)+_o>t}function yo(e,t,n){let r=e/32767,i=t/32767,a=Math.hypot(r,i),o=a>1?1/a:1;return{dx:r*o*n,dy:i*o*n}}var bo=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),L=s(((e,t)=>{t.exports=bo()}))(),xo=`calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2)`,So=32767,Co=12;function wo({stream:e,layout:t=`overlay`,opacity:n=1,size:r=`m`,deckTop:i=`0px`,onMenu:a}){let o=Tn(),s=(0,T.useRef)(new Map),c=(0,T.useRef)({...Sa}),[l,u]=(0,T.useState)({...Sa}),[d,f]=(0,T.useState)({l:!1,r:!1,touchpad:!1}),p=(0,T.useRef)(null),[m,h]=(0,T.useState)({width:0,height:0});(0,T.useEffect)(()=>{let e=p.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect();h(e=>e.width===t.width&&e.height===t.height?e:{width:t.width,height:t.height})};if(t(),typeof ResizeObserver>`u`)return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t);let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]),(0,T.useEffect)(()=>()=>{co.touchPad={...Sa}},[]);let g=()=>{let t={...Sa,touch:null},n={l:!1,r:!1,touchpad:!1};for(let e of s.current.values())e.kind===`stick`&&(n[e.which]=!0),e.kind===`touchpad`&&(n.touchpad=!0),e.kind===`button`&&(t.buttons|=e.bit),e.kind===`trigger`&&(t[e.which]=255),e.kind===`touchpad`&&e.pressed&&(t.buttons|=F.TOUCHPAD);t.lx=c.current.lx,t.ly=c.current.ly,t.rx=c.current.rx,t.ry=c.current.ry,t.touch=c.current.touch??null,co.touchPad=t,e?.sendPad(),u(t),f(e=>e.l===n.l&&e.r===n.r&&e.touchpad===n.touchpad?e:n)},_=(e,t,n)=>{let r=Math.max(-1,Math.min(1,(t-e.cx)/e.radius)),i=Math.max(-1,Math.min(1,(n-e.cy)/e.radius));c.current[e.which===`l`?`lx`:`rx`]=Math.round(r*So),c.current[e.which===`l`?`ly`:`ry`]=Math.round(i*So)},v=(e,t)=>{e.preventDefault(),e.stopPropagation();let n=e.currentTarget;try{n.setPointerCapture(e.pointerId)}catch{}let r=t(n);s.current.set(e.pointerId,r),r.kind===`stick`&&_(r,e.clientX,e.clientY),r.kind===`touchpad`&&(c.current.touch=Ca((e.clientX-r.rect.left)/r.rect.width,(e.clientY-r.rect.top)/r.rect.height)),navigator.vibrate?.(8),g()},y=e=>{let t=s.current.get(e.pointerId);if(t){if(e.stopPropagation(),t.kind===`stick`)_(t,e.clientX,e.clientY);else if(t.kind===`touchpad`)c.current.touch=Ca((e.clientX-t.rect.left)/t.rect.width,(e.clientY-t.rect.top)/t.rect.height),t.pressed&&Math.hypot(e.clientX-t.x0,e.clientY-t.y0)>Co&&(t.pressed=!1);else return;g()}},b=e=>{let t=s.current.get(e.pointerId);t&&(e.stopPropagation(),s.current.delete(e.pointerId),t.kind===`stick`&&(c.current[t.which===`l`?`lx`:`rx`]=0,c.current[t.which===`l`?`ly`:`ry`]=0),t.kind===`touchpad`&&(c.current.touch=null),g())},x=e=>e.stopPropagation(),S={onPointerMove:y,onPointerUp:b,onPointerCancel:b,onClick:x,onDoubleClick:x},ee=e=>(l.buttons&e)!==0,te=e=>`border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.35)] transition-colors duration-75 ${e?`border-white bg-white/50`:`border-white/70 bg-white/10`}`,C=`text-white [text-shadow:0_1px_2px_rgba(0,0,0,0.6)]`,ne={filter:`drop-shadow(0 0 1.5px rgba(0,0,0,0.5))`},w=e=>({stroke:e?`#fff`:`rgba(255,255,255,0.75)`,fill:e?`rgba(255,255,255,0.5)`:`rgba(255,255,255,0.1)`}),re=`pointer-events-auto flex touch-none select-none items-center justify-center bg-transparent p-0`,ie={minHeight:`calc(44px / var(--k))`,minWidth:`calc(44px / var(--k))`},ae=(e,t,n,r)=>(0,L.jsx)(`button`,{type:`button`,"aria-label":e,onPointerDown:e=>v(e,()=>({kind:`button`,bit:t})),...S,className:`${re} ${n}`,style:ie,children:r}),oe=(e,t,n,r)=>(0,L.jsx)(`span`,{className:`flex h-[32px] w-[76px] items-center justify-center text-[13px] font-semibold tracking-wide ${C} ${te(t)}`,style:{borderRadius:r?n===`l`?`16px 9px 9px 9px`:`9px 16px 9px 9px`:`9px`},children:e}),se=(e,t,n,r)=>ae(e,t,`h-[44px] w-[84px]`,oe(e,ee(t),n,r)),ce=(e,t,n)=>(0,L.jsx)(`button`,{type:`button`,"aria-label":e,onPointerDown:e=>v(e,()=>({kind:`trigger`,which:t})),...S,className:`${re} h-[44px] w-[84px]`,style:ie,children:oe(e,l[t]>0,n,!0)}),le=(e,t,n)=>ae(e,t,`h-[52px] w-[52px]`,(0,L.jsx)(`svg`,{viewBox:`0 0 52 52`,width:`52`,height:`52`,"aria-hidden":!0,style:ne,children:(0,L.jsxs)(`g`,{transform:`rotate(${n} 26 26)`,strokeWidth:`1.5`,strokeLinejoin:`round`,...w(ee(t)),children:[(0,L.jsx)(`path`,{d:`M10 9 Q10 3 16 3 L36 3 Q42 3 42 9 L42 30 Q42 34.5 38.5 38 L29.5 47 Q26 50.5 22.5 47 L13.5 38 Q10 34.5 10 30 Z`}),(0,L.jsx)(`path`,{d:`M20.5 23 L26 17 L31.5 23`,fill:`none`,stroke:`#fff`,strokeLinecap:`round`,strokeWidth:`1.8`})]})})),ue=(e,t,n)=>ae(e,t,`h-[52px] w-[52px]`,(0,L.jsxs)(`svg`,{viewBox:`0 0 52 52`,width:`52`,height:`52`,"aria-hidden":!0,style:ne,children:[(0,L.jsx)(`circle`,{cx:`26`,cy:`26`,r:`22.5`,strokeWidth:`1.5`,...w(ee(t))}),(0,L.jsx)(`g`,{fill:`none`,stroke:`#fff`,strokeWidth:`1.8`,strokeLinejoin:`round`,strokeLinecap:`round`,children:n})]})),de=(e,t)=>ae(e,t,`h-[44px] min-w-[64px] px-[4px]`,(0,L.jsx)(`span`,{className:`flex h-[24px] items-center rounded-full px-[10px] text-[10px] font-semibold uppercase tracking-wider ${C} ${te(ee(t))}`,children:e})),fe=(e,t)=>ae(e,t,`h-[44px] w-[44px]`,(0,L.jsx)(`span`,{className:`flex h-[36px] w-[36px] items-center justify-center rounded-full text-[11px] font-bold ${C} ${te(ee(t))}`,children:e})),pe=e=>{let{dx:t,dy:n}=yo(e===`l`?l.lx:l.rx,e===`l`?l.ly:l.ry,34),r=d[e];return(0,L.jsx)(`div`,{"aria-label":e===`l`?o(`rp_touch_left_stick`,void 0,`Left stick`):o(`rp_touch_right_stick`,void 0,`Right stick`),onPointerDown:t=>v(t,t=>{let n=t.getBoundingClientRect();return{kind:`stick`,which:e,cx:n.left+n.width/2,cy:n.top+n.height/2,radius:n.width/2}}),...S,className:`pointer-events-auto relative h-[124px] w-[124px] touch-none rounded-full border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.3)] transition-colors duration-75 ${r?`border-white/80 bg-white/[0.12]`:`border-white/45 bg-white/[0.05]`}`,children:(0,L.jsx)(`div`,{className:`absolute left-1/2 top-1/2 h-[54px] w-[54px] rounded-full ${te(r)}`,style:{transform:`translate(calc(-50% + ${t}px), calc(-50% + ${n}px))`}})})},E=t===`deck`,me=go(r,m.width,m.height,E),he=e=>`${e}px * var(--k)`,ge=`max(12px, env(safe-area-inset-left))`,ve=`max(12px, env(safe-area-inset-right))`,ye=`max(12px, env(safe-area-inset-bottom))`,be=E?`8px`:t===`overlay-bar`?`3.5rem`:`max(10px, env(safe-area-inset-top))`,xe=(e,t,n=0)=>t?n?`calc(${e} + max(${he(t)}, ${n}px))`:`calc(${e} + ${he(t)})`:e,Se=(e,t)=>({position:`absolute`,...t,transform:`scale(var(--k))`,transformOrigin:e}),Ce=E&&vo(me,m.height),D=E?void 0:`58%`,O=e=>E?{top:xe(be,Ce?96:112,Ce?72:90),[e]:e===`left`?ge:ve}:{top:D,translate:`0 -50%`,[e]:e===`left`?ge:ve},we=e=>({bottom:Ce?ye:xe(ye,E?56:0,44),[e]:Ce?`calc(${e===`left`?ge:ve} + 8px + max(${he(80)}, 44px))`:xe(e===`left`?ge:ve,E?40:168)}),Te=!!a&&!E;return(0,L.jsxs)(`div`,{ref:p,className:`pointer-events-none absolute z-10 select-none [-webkit-touch-callout:none] ${E?`inset-x-0 bottom-0`:`inset-0`}`,style:{top:E?i:void 0,"--k":me},"data-testid":`rp-touch`,"data-layout":t,"data-scale":me,onContextMenu:e=>e.preventDefault(),children:[(0,L.jsxs)(`div`,{className:`absolute inset-0`,style:{opacity:fo(n)},children:[(0,L.jsx)(`div`,{style:Se(`top left`,{top:be,left:ge}),children:(0,L.jsxs)(`div`,{className:`ms-[8px] flex flex-col`,style:{rotate:E?void 0:`6deg`,transformOrigin:`top left`},children:[ce(`L2`,`l2`,`l`),se(`L1`,F.L1,`l`,!1)]})}),(0,L.jsx)(`div`,{style:Se(`top right`,{top:be,right:ve}),children:(0,L.jsxs)(`div`,{className:`me-[8px] flex flex-col items-end`,style:{rotate:E?void 0:`-6deg`,transformOrigin:`top right`},children:[ce(`R2`,`r2`,`r`),se(`R1`,F.R1,`r`,!1)]})}),(0,L.jsx)(`div`,{"aria-label":o(`rp_touch_touchpad`,void 0,`Touchpad`),onPointerDown:e=>v(e,t=>({kind:`touchpad`,rect:t.getBoundingClientRect(),x0:e.clientX,y0:e.clientY,pressed:!0})),...S,className:`pointer-events-auto absolute touch-none rounded-2xl border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.3)] transition-colors duration-75 ${d.touchpad?`border-white/80 bg-white/25`:`border-white/40 bg-white/[0.05]`}`,style:E?{top:xe(be,6),left:xe(ge,104),right:xe(ve,104),height:`max(44px, calc(${he(64)}))`}:{top:be,left:`50%`,translate:`-50% 0`,width:`min(calc(${he(250)}), 34vw)`,height:`max(44px, calc(${he(56)}))`}}),(0,L.jsxs)(`div`,{className:`grid grid-cols-3 grid-rows-3`,style:Se(E?`top left`:`left center`,O(`left`)),children:[(0,L.jsx)(`span`,{}),le(`↑`,F.UP,0),(0,L.jsx)(`span`,{}),le(`←`,F.LEFT,-90),(0,L.jsx)(`span`,{}),le(`→`,F.RIGHT,90),(0,L.jsx)(`span`,{}),le(`↓`,F.DOWN,180),(0,L.jsx)(`span`,{})]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-3 grid-rows-3`,style:Se(E?`top right`:`right center`,O(`right`)),children:[(0,L.jsx)(`span`,{}),ue(`△`,F.TRIANGLE,(0,L.jsx)(`path`,{d:`M26 16.5 L35 32 L17 32 Z`})),(0,L.jsx)(`span`,{}),ue(`□`,F.SQUARE,(0,L.jsx)(`rect`,{x:`18`,y:`18`,width:`16`,height:`16`,rx:`1`})),(0,L.jsx)(`span`,{}),ue(`○`,F.CIRCLE,(0,L.jsx)(`circle`,{cx:`26`,cy:`26`,r:`8.5`})),(0,L.jsx)(`span`,{}),ue(`✕`,F.CROSS,(0,L.jsx)(`path`,{d:`M19 19 L33 33 M33 19 L19 33`})),(0,L.jsx)(`span`,{})]}),(0,L.jsx)(`div`,{style:Se(`bottom left`,we(`left`)),children:pe(`l`)}),(0,L.jsx)(`div`,{style:Se(`bottom right`,we(`right`)),children:pe(`r`)}),(0,L.jsx)(`div`,{style:Se(`bottom left`,{bottom:ye,left:ge}),children:de(`Create`,F.SHARE)}),(0,L.jsx)(`div`,{style:Se(`bottom right`,{bottom:ye,right:ve}),children:de(`Options`,F.OPTIONS)}),(0,L.jsx)(`div`,{style:Se(`bottom center`,{bottom:Ce?xe(ye,124,88):xe(ye,Te?48:0,48),left:xo,translate:`-50% 0`}),children:fe(`PS`,F.PS)})]}),Te&&(0,L.jsx)(`div`,{style:{...Se(`bottom center`,{bottom:ye,left:`calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2)`,translate:`-50% 0`}),opacity:Math.max(.7,fo(n))},children:(0,L.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),a?.()},onDoubleClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),"aria-label":o(`rp_menu`,void 0,`Menu`),"aria-haspopup":`dialog`,className:`${re} h-[44px] w-[56px]`,style:ie,"data-testid":`rp-menu-handle`,children:(0,L.jsx)(`span`,{className:`flex h-[26px] w-[44px] items-center justify-center rounded-full ${C} ${te(!1)}`,children:(0,L.jsx)(_e,{size:15,strokeWidth:2,"aria-hidden":!0})})})})]})}var To=class{constructor(e,t=()=>1){this.sink=e,this.speed=t,this.fingers=new Map,this.most=0,this.moved=!1,this.gestureT0=0,this.lastTap=null,this.dragging=!1}down(e,t,n,r){if(!this.fingers.size){this.most=0,this.moved=!1,this.gestureT0=r;let e=this.lastTap;e&&r-e.t<=300&&Math.hypot(t-e.x,n-e.y)<=40&&(this.dragging=!0,this.sink.button(0,!0)),this.lastTap=null}this.fingers.set(e,{x:t,y:n,x0:t,y0:n,t0:r}),this.most=Math.max(this.most,this.fingers.size)}move(e,t,n){let r=this.fingers.get(e);if(!r)return;let i=t-r.x,a=n-r.y;if(r.x=t,r.y=n,!this.moved&&Math.hypot(t-r.x0,n-r.y0)>10&&(this.moved=!0),!this.moved)return;if(this.fingers.size>=2){if(this.dragging)return;let e=this.fingers.size;this.sink.scroll(-a/e,-i/e);return}if(this.most>=2)return;let o=this.speed();this.sink.move(i*o,a*o)}up(e,t){let n=this.fingers.get(e);if(!n||(this.fingers.delete(e),this.fingers.size))return;if(this.dragging){this.dragging=!1,this.sink.button(0,!1);return}let r=t-this.gestureT0<=250+(this.most>=2?150:0);if(this.moved||!r)return;let i=this.most>=2?2:0;this.sink.button(i,!0),this.sink.button(i,!1),i===0&&(this.lastTap={t,x:n.x,y:n.y})}cancel(){this.fingers.clear(),this.lastTap=null,this.dragging&&(this.dragging=!1,this.sink.button(0,!1))}},Eo={" ":`Space`,"-":`Minus`,"=":`Equal`,"[":`BracketLeft`,"]":`BracketRight`,"\\":`Backslash`,";":`Semicolon`,"'":`Quote`,"`":`Backquote`,",":`Comma`,".":`Period`,"/":`Slash`,"\n":`Enter`,"\r":`Enter`," ":`Tab`},Do={"!":`Digit1`,"@":`Digit2`,"#":`Digit3`,$:`Digit4`,"%":`Digit5`,"^":`Digit6`,"&":`Digit7`,"*":`Digit8`,"(":`Digit9`,")":`Digit0`,_:`Minus`,"+":`Equal`,"{":`BracketLeft`,"}":`BracketRight`,"|":`Backslash`,":":`Semicolon`,'"':`Quote`,"~":`Backquote`,"<":`Comma`,">":`Period`,"?":`Slash`};function Oo(e){return e.length===1?e>=`a`&&e<=`z`?{code:`Key${e.toUpperCase()}`,shift:!1}:e>=`A`&&e<=`Z`?{code:`Key${e}`,shift:!0}:e>=`0`&&e<=`9`?{code:`Digit${e}`,shift:!1}:Eo[e]?{code:Eo[e],shift:!1}:Do[e]?{code:Do[e],shift:!0}:null:null}var ko={Backspace:`Backspace`,Enter:`Enter`,Tab:`Tab`,Escape:`Escape`,Delete:`Delete`,ArrowUp:`ArrowUp`,ArrowDown:`ArrowDown`,ArrowLeft:`ArrowLeft`,ArrowRight:`ArrowRight`,Home:`Home`,End:`End`,PageUp:`PageUp`,PageDown:`PageDown`};function Ao(e){return ko[e]??null}function jo(e,t){let n=``;for(let r of t){let t=Oo(r);t?Mo(e,t.code,t.shift):n+=r}return n}function Mo(e,t,n=!1){let r=n&&!e.shiftHeld?.();r&&e.key(`ShiftLeft`,!0),e.key(t,!0),e.key(t,!1),r&&e.key(`ShiftLeft`,!1)}function No(e,t){let n=[...e],r=[...t],i=0;for(;i{o.current=e,s.current=t});let c=(0,T.useRef)(null),l=()=>c.current??=new To({move:(e,t)=>o.current?.move(e,t),button:(e,t)=>o.current?.button(e,t),scroll:(e,t)=>o.current?.scroll(e,t)},()=>s.current);(0,T.useEffect)(()=>()=>c.current?.cancel(),[]);let u=e=>e.stopPropagation();return(0,L.jsx)(`div`,{className:`touch-none select-none [-webkit-touch-callout:none] ${n}`,style:r,"data-testid":a,onPointerDown:e=>{u(e);try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}l().down(e.pointerId,e.clientX,e.clientY,e.timeStamp)},onPointerMove:e=>{u(e),l().move(e.pointerId,e.clientX,e.clientY)},onPointerUp:e=>{u(e),l().up(e.pointerId,e.timeStamp)},onPointerCancel:e=>{u(e),l().cancel()},onClick:u,onDoubleClick:u,onContextMenu:e=>{e.preventDefault(),u(e)},children:i})}var R=` `,Fo=40;function Io({sink:e,onUntypeable:t,className:n=``}){let r=Tn(),i=(0,T.useRef)(null),a=(0,T.useRef)(R),o=(0,T.useRef)(!1),[s,c]=(0,T.useState)(!1),[l,u]=(0,T.useState)(!1);(0,T.useEffect)(()=>{if(!l)return;let e=window.setTimeout(()=>u(!1),3e3);return()=>window.clearTimeout(e)},[l]);let d=()=>{let e=i.current;e&&!o.current&&(!e.value.startsWith(R)||e.value.length>Fo)&&(e.value=R,a.current=R)},f=()=>{let n=i.current;if(!n||!e)return;let{deleted:r,inserted:o}=No(a.current,n.value);a.current=n.value;for(let t=0;te.stopPropagation(),onClick:e=>{e.stopPropagation();let t=i.current;t&&(s?t.blur():(t.value=R,a.current=R,t.focus({preventScroll:!0}),t.setSelectionRange(t.value.length,t.value.length)))},className:`flex h-11 w-11 items-center justify-center rounded-full border border-white/25 bg-black/45 text-white backdrop-blur-sm disabled:opacity-40 ${s?`bg-white/30`:``} ${n}`,"data-testid":`rp-tp-keyboard`,children:(0,L.jsx)(he,{size:18,"aria-hidden":!0})}),(0,L.jsx)(`input`,{ref:i,type:`text`,defaultValue:R,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:!1,enterKeyHint:`send`,"aria-label":r(`rp_tp_keyboard`,void 0,`Keyboard`),className:`pointer-events-none fixed bottom-0 left-1/2 h-px w-px opacity-0`,"data-testid":`rp-tp-keyboard-input`,"data-rp-typing":``,onFocus:()=>c(!0),onBlur:()=>c(!1),onPointerDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),onKeyDown:t=>{if(t.stopPropagation(),!e||t.nativeEvent.isComposing)return;let n=Ao(t.key);n&&(t.preventDefault(),Mo(e,n))},onKeyUp:e=>e.stopPropagation(),onCompositionStart:()=>{o.current=!0},onCompositionEnd:()=>{o.current=!1,f()},onInput:f}),l&&(0,L.jsx)(`div`,{className:`pointer-events-none fixed bottom-20 left-1/2 z-[300] w-max max-w-[min(22rem,calc(100%-2rem))] -translate-x-1/2 rounded-full bg-black/80 px-3 py-1.5 text-center text-xs text-white`,"data-testid":`rp-tp-untypeable`,children:r(`rp_tp_untypeable`,void 0,`Only English letters, numbers and symbols can be typed here. Use a text field on the PS5 for others.`)})]})}function Lo({mode:e,onChange:t,blocked:n,style:r,touchpadLabel:i,tight:a=!1,hidden:o=!1}){let s=Tn(),c=(r,i,o)=>{let s=r===`touchpad`&&!!n;return(0,L.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":e===r,"aria-disabled":s||void 0,"aria-label":a&&e!==r?o:void 0,title:s?n:o,onClick:e=>{e.stopPropagation(),s||t(r)},onPointerDown:e=>e.stopPropagation(),onDoubleClick:e=>e.stopPropagation(),className:`flex h-8 items-center gap-1 rounded-full px-2.5 text-xs ${e===r?`bg-white text-black`:`text-white`} ${s?`opacity-40`:``}`,"data-testid":`rp-touch-mode-${r}`,children:[i,(!a||e===r)&&(0,L.jsx)(`span`,{children:o})]})};return(0,L.jsxs)(`div`,{role:`radiogroup`,"aria-label":s(`rp_tp_mode`,void 0,`Touch controls`),"aria-hidden":o||void 0,className:`absolute left-1/2 z-30 flex -translate-x-1/2 gap-0.5 rounded-full border border-white/20 bg-black/50 p-0.5 backdrop-blur-sm transition-opacity duration-200 ${o?`pointer-events-none opacity-0`:`pointer-events-auto opacity-100`}`,style:r,"data-testid":`rp-touch-mode`,children:[c(`controller`,(0,L.jsx)(E,{size:14,"aria-hidden":!0}),s(`rp_kbm_controller`,void 0,`Controller`)),c(`touchpad`,(0,L.jsx)(ye,{size:14,"aria-hidden":!0}),i??s(`rp_tp_touchpad`,void 0,`Touchpad`))]})}var Ro={0:1,2:2,1:4,3:8,4:16},zo={ControlLeft:1,ShiftLeft:2,AltLeft:4,MetaLeft:8,OSLeft:8,ControlRight:16,ShiftRight:32,AltRight:64,MetaRight:128,OSRight:128};function Bo(){let e={};for(let t=0;t<26;t++)e[`Key${String.fromCharCode(65+t)}`]=4+t;for(let t=1;t<=9;t++)e[`Digit${t}`]=30+t-1;e.Digit0=39,Object.assign(e,{Enter:40,Escape:41,Backspace:42,Tab:43,Space:44,Minus:45,Equal:46,BracketLeft:47,BracketRight:48,Backslash:49,IntlHash:50,Semicolon:51,Quote:52,Backquote:53,Comma:54,Period:55,Slash:56,CapsLock:57,PrintScreen:70,ScrollLock:71,Pause:72,Insert:73,Home:74,PageUp:75,Delete:76,End:77,PageDown:78,ArrowRight:79,ArrowLeft:80,ArrowDown:81,ArrowUp:82,NumLock:83,NumpadDivide:84,NumpadMultiply:85,NumpadSubtract:86,NumpadAdd:87,NumpadEnter:88,NumpadDecimal:99,IntlBackslash:100,ContextMenu:101,NumpadEqual:103,IntlRo:135,KanaMode:136,IntlYen:137,Convert:138,NonConvert:139,Lang1:144,Lang2:145});for(let t=1;t<=9;t++)e[`Numpad${t}`]=89+t-1;e.Numpad0=98;for(let t=1;t<=12;t++)e[`F${t}`]=58+t-1;for(let t=13;t<=24;t++)e[`F${t}`]=104+t-13;return e}var Vo=Bo(),Ho=(e,t,n)=>Math.max(t,Math.min(n,Math.trunc(e)));function Uo(e,t=0,n=0,r=0,i=0){let a=new Uint8Array(17),o=new DataView(a.buffer);return a[0]=8,a[1]=e.buttons&255,a[2]=e.mods&255,o.setInt16(3,Ho(t,-32768,32767),!0),o.setInt16(5,Ho(n,-32768,32767),!0),o.setInt8(7,Ho(r,-128,127)),o.setInt8(8,Ho(i,-128,127)),e.keys.slice(0,8).forEach((e,t)=>a[9+t]=e&255),a}function Wo(e){let t={buttons:0,mods:0,keys:[]};for(let n of e){t.buttons|=n.buttons,t.mods|=n.mods;for(let e of n.keys)!t.keys.includes(e)&&t.keys.length<8&&t.keys.push(e)}return t}function z(e,t,n){let r=e+t/(n===1?3:n===2?1:100),i=Math.trunc(r);return{notches:-i,carry:r-i}}var B=class{constructor(e){this.st={buttons:0,mods:0,keys:[]},this.dx=0,this.dy=0,this.wheel=0,this.hwheel=0,this.wheelCarry=0,this.hwheelCarry=0,this.moveTimer=null,this.hb=null,this.want={mouse:!1,keyboard:!1},this.guests=new Map,this.d={setTimer:(e,t)=>window.setTimeout(e,t),clearTimer:e=>window.clearTimeout(e),setRepeat:(e,t)=>window.setInterval(e,t),clearRepeat:e=>window.clearInterval(e),...e}}get state(){return this.st}shiftHeld(){return(this.st.mods&(zo.ShiftLeft|zo.ShiftRight))!==0}get holding(){return this.st.buttons!==0||this.st.mods!==0||this.st.keys.length>0}setWant(e){let t=e.mouse||e.keyboard,n=e.mouse!==this.want.mouse||e.keyboard!==this.want.keyboard;this.want={...e},n&&(this.hb!==null&&this.d.clearRepeat(this.hb),this.hb=null,this.beat(),t&&(this.hb=this.d.setRepeat(()=>this.beat(),500)))}get wanted(){return this.want}beat(){let e=this.want.mouse||this.want.keyboard;this.d.send({kbm:e?{on:!0,mouse:this.want.mouse,keyboard:this.want.keyboard}:{on:!1}})}key(e,t){let n=zo[e];if(n){let e=t?this.st.mods|n:this.st.mods&~n;return e!==this.st.mods&&(this.st={...this.st,mods:e},this.flush()),!0}let r=Vo[e];if(!r)return!1;let i=this.st.keys.includes(r);return t&&!i&&this.st.keys.length<8?(this.st={...this.st,keys:[...this.st.keys,r]},this.flush()):!t&&i&&(this.st={...this.st,keys:this.st.keys.filter(e=>e!==r)},this.flush()),!0}button(e,t){let n=Ro[e];if(!n)return;let r=t?this.st.buttons|n:this.st.buttons&~n;r!==this.st.buttons&&(this.st={...this.st,buttons:r},this.flush())}guest(e,t){if(t)this.guests.set(e,{buttons:t.buttons,mods:t.mods,keys:t.keys.slice(0,8)});else if(!this.guests.delete(e))return;this.flush()}guestMotion(e,t,n,r){this.dx+=e,this.dy+=t,this.wheel+=n,this.hwheel+=r,(e||t||n||r)&&this.later()}get guestIds(){return[...this.guests.keys()]}move(e,t){this.dx+=e,this.dy+=t,this.later()}scroll(e,t,n){let r=z(this.wheelCarry,e,n),i=z(this.hwheelCarry,t,n);this.wheelCarry=r.carry,this.hwheelCarry=i.carry,this.wheel+=r.notches,this.hwheel-=i.notches,(this.wheel||this.hwheel)&&this.later()}later(){this.moveTimer===null&&(this.moveTimer=this.d.setTimer(()=>this.flush(),4))}flush(){this.moveTimer!==null&&this.d.clearTimer(this.moveTimer),this.moveTimer=null;let e=this.guests.size?Wo([this.st,...this.guests.values()]):this.st;do{let t=Ho(this.dx,-32768,32767),n=Ho(this.dy,-32768,32767),r=Ho(this.wheel,-128,127),i=Ho(this.hwheel,-128,127);this.dx-=t,this.dy-=n,this.wheel-=r,this.hwheel-=i,this.d.send(Uo(e,t,n,r,i))}while(Math.abs(this.dx)>=1||Math.abs(this.dy)>=1||this.wheel||this.hwheel)}releaseAll(){this.dx=this.dy=this.wheel=this.hwheel=0,this.wheelCarry=this.hwheelCarry=0;let e=this.holding;this.st={buttons:0,mods:0,keys:[]},this.moveTimer!==null&&this.d.clearTimer(this.moveTimer),this.moveTimer=null,e&&this.d.send(Uo(this.guests.size?Wo(this.guests.values()):this.st))}dispose(){this.guests.clear(),this.releaseAll(),this.setWant({mouse:!1,keyboard:!1})}},Go=`data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAYZbW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAfQAAAfQAAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAmt0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAfQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAABAAAAAQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAH0AAAAAAAABAAAAAAHjbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAABAAAABAABVxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAABjm1pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAU5zdGJsAAAAunN0c2QAAAAAAAAAAQAAAKphdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABAAEABIAAAASAAAAAAAAAABFExhdmM2My4xLjEwMiBsaWJ4MjY0AAAAAAAAAAAAAAAAGP//AAAAMGF2Y0MBQsAK/+EAF2dCwAqmEXsBEAAAAwAQAAADACDxImEYAQAGaMhCAZSyAAAAEHBhc3AAAAABAAAAAQAAABRidHJ0AAAAAAAABUAAAAAAAAAAGHN0dHMAAAAAAAAAAQAAAAQAAEAAAAAAFHN0c3MAAAAAAAAAAQAAAAEAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAJHN0c3oAAAAAAAAAAAAAAAQAAAKCAAAACgAAAAoAAAAKAAAAIHN0Y28AAAAAAAAABAAABlwAAAj+AAAJKAAACVIAAALZdHJhawAAAFx0a2hkAAAAAwAAAAAAAAAAAAAAAgAAAAAAAH0AAAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAB9AAAABAAAAQAAAAACUW1kaWEAAAAgbWRoZAAAAAAAAAAAAAAAAAAAH0AAAIEAVcQAAAAAAC1oZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU291bmRIYW5kbGVyAAAAAfxtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAcBzdGJsAAAAfnN0c2QAAAAAAAAAAQAAAG5tcDRhAAAAAAAAAAEAAAAAAAAAAAABABAAAAAAH0AAAAAAADZlc2RzAAAAAAOAgIAlAAIABICAgBdAFQAAAAAAH0AAAAEcBYCAgAUViFblAAaAgIABAgAAABRidHJ0AAAAAAAAH0AAAAEcAAAAIHN0dHMAAAAAAAAAAgAAACAAAAQAAAAAAQAAAQAAAAAoc3RzYwAAAAAAAAACAAAAAQAAAAEAAAABAAAAAgAAAAgAAAABAAAAmHN0c3oAAAAAAAAAAAAAACEAAAATAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAkc3RjbwAAAAAAAAAFAAAGSQAACN4AAAkIAAAJMgAACVwAAAAac2dwZAEAAAByb2xsAAAAAgAAAAH//wAAABxzYmdwAAAAAHJvbGwAAAABAAAAIQAAAAEAAABhdWR0YQAAAFltZXRhAAAAAAAAACFoZGxyAAAAAAAAAABtZGlyYXBwbAAAAAAAAAAAAAAAACxpbHN0AAAAJKl0b28AAAAcZGF0YQAAAAEAAAAATGF2ZjYzLjEuMTAyAAAACGZyZWUAAAM7bWRhdNwATGF2YzYzLjEuMTAyAAIwQA4AAAJvBgX//2vcRem95tlIt5Ys2CDZI+7veDI2NCAtIGNvcmUgMTY1IHIzMjIyIGIzNTYwNWEgLSBILjI2NC9NUEVHLTQgQVZDIGNvZGVjIC0gQ29weWxlZnQgMjAwMy0yMDI1IC0gaHR0cDovL3d3dy52aWRlb2xhbi5vcmcveDI2NC5odG1sIC0gb3B0aW9uczogY2FiYWM9MCByZWY9MTYgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDEzMSBtZT11bWggc3VibWU9MTAgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0yNCBjaHJvbWFfbWU9MSB0cmVsbGlzPTIgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz0xIGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTQga2V5aW50X21pbj0xIHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NCByYz1jcmYgbWJ0cmVlPTEgY3JmPTUxLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IGlwX3JhdGlvPTEuNDAgYXE9MToxLjAwAIAAAAALZYiCAv5MUAAQv8ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmhwF/UABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmioBb1ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmjsBX1ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBw==`,Ko=null,qo=null;function Jo(e){e.play().catch(()=>{if(qo||Ko!==e)return;let t=()=>{Yo(),Ko===e&&e.play().catch(()=>{})};window.addEventListener(`pointerdown`,t,{capture:!0}),qo=()=>window.removeEventListener(`pointerdown`,t,{capture:!0})})}function Yo(){qo?.(),qo=null}function Xo(){if(typeof document<`u`){if(!Ko){let e=document.createElement(`video`);e.muted=!0,e.loop=!0,e.playsInline=!0,e.setAttribute(`playsinline`,``),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`data-testid`,`keep-screen-video`),e.style.cssText=`position:fixed;left:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none`,e.src=Go,document.body.appendChild(e),Ko=e}Jo(Ko)}}function Zo(){Yo(),Ko&&=(Ko.pause(),Ko.removeAttribute(`src`),Ko.remove(),null)}function Qo(){return typeof navigator>`u`?null:navigator.wakeLock??null}function V(){return Te()||!gn()}var $o=new Set,es=null,ts=Promise.resolve(),ns=!1;async function rs(){if($o.size===0||es&&!es.released)return;let e=Qo();if(!e)Te()&&Xo();else try{let t=await e.request(`screen`);t.addEventListener(`release`,()=>{es===t&&(es=null)}),es=t}catch{}}async function is(){Zo();let e=es;if(es=null,e&&!e.released)try{await e.release()}catch{}}function as(){ns||typeof document>`u`||(ns=!0,document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&$o.size>0&&(ts=ts.then(rs))}))}function os(e,t){if(!V())return;as();let n=$o.size>0;t?$o.add(e):$o.delete(e);let r=$o.size>0;n!==r&&(ts=ts.then(r?rs:is))}var ss=new Set;function cs(){if(typeof window<`u`)return window.PS5UploadPad}function ls(e,t){let n=ss.size>0;t?ss.add(e):ss.delete(e);let r=ss.size>0;if(n!==r)try{cs()?.setActive(r)}catch{}}function us(e,t){let[n,r]=(0,T.useState)(!1);return(0,T.useEffect)(()=>{if(!e||!t)return;let n=!0;return Pe(e,je).then(e=>{n&&!e&&r(!0)}),()=>{n=!1}},[e,t]),n}function ds({href:e}){let t=Tn();return(0,L.jsxs)(`div`,{className:`flex flex-col items-center gap-3 text-center`,"data-testid":`open-on-wifi`,children:[(0,L.jsx)(`p`,{className:`max-w-sm text-sm text-white/60`,children:t(`join_open_lan_body`,void 0,`Can't reach the internet? If you're on the same Wi-Fi as your friend, open the game there.`)}),(0,L.jsx)(`a`,{href:e,rel:`noreferrer`,className:`rounded-full bg-white px-4 py-2 text-sm font-medium text-black`,"data-testid":`open-on-wifi-link`,children:t(`join_open_lan`,void 0,`Open on this Wi-Fi`)})]})}function fs(e,t,n){switch(t.kind){case`connecting`:return e(`pad_connecting`,void 0,`Connecting…`);case`asking`:return e(`pad_asking`,{name:n},`Waiting for ${n} to allow this phone…`);case`joined`:return t.host?t.passcode&&!t.playing?e(`pad_wait_passcode`,{name:n},`Waiting for the passcode on ${n}`):t.playing?e(`pad_playing`,{host:t.host},`Controller for ${t.host}`):e(`pad_starting`,void 0,`Connected. The stream is starting…`):e(`pad_no_session`,void 0,`Connected. Waiting for Remote Play to start on the computer.`);case`refused`:return t.why===`denied`?e(`pad_denied`,void 0,`The computer said no.`):t.why===`no_answer`?e(`pad_no_answer`,void 0,`The computer didn't answer in time. Try again.`):t.why===`kicked`?e(`pad_kicked`,void 0,`The computer took this phone out of the game.`):t.why===`closed`?e(`pad_link_closed`,void 0,`The computer closed the link. Scan the new code to play again.`):t.why===`key`?e(`pad_old_code`,void 0,`This code has expired. Scan the new one on the computer.`):t.why===`full`?e(`pad_full`,void 0,`Four phones are playing already.`):t.why===`no_stream`?e(`pad_watch_no_stream`,void 0,`Nothing is streaming on the computer right now.`):t.why.startsWith(`net:`)?ps(e,t.why.slice(4)):e(`pad_refused`,void 0,`The computer did not let this phone in.`);case`reconnecting`:return e(`pad_reconnecting`,void 0,`Connection lost. Reconnecting…`);case`lost`:return e(`pad_lost`,void 0,`Lost the connection to the computer.`)}}function ps(e,t){switch(t){case`mismatch`:return e(`join_net_mismatch`,void 0,`This link doesn't match the host; ask them for a new one.`);case`no_direct`:return e(`join_net_no_direct`,void 0,`A direct connection isn't possible from this network (both sides' routers are strict). Try Wi-Fi instead of mobile data, or ask the host to turn on UPnP.`);case`no_room`:return e(`pad_old_code`,void 0,`This code has expired. Scan the new one on the computer.`);case`net_full`:return e(`pad_full`,void 0,`Four phones are playing already.`);case`no_hub`:return e(`join_net_no_hub`,void 0,`Couldn't reach the PS5Upload invite service. Check your internet connection, then try again.`);case`offer`:case`no_webrtc`:return e(`join_net_no_webrtc`,void 0,`This browser can't make direct connections. Try a recent Chrome, Safari or Firefox.`);default:return e(`pad_lost`,void 0,`Lost the connection to the computer.`)}}function ms(e){return e.kind!==`refused`||e.why!==`kicked`&&e.why!==`closed`}async function hs(){try{await document.documentElement.requestFullscreen?.({navigationUI:`hide`}),await screen.orientation.lock?.(`landscape`)}catch{}}function gs(e,t){return t?.mouse?null:t?.reason===`vinput_helper_old`||t?.reason===`helper_old`?e(`rp_kbm_helper_old`,void 0,`Update the PS5 helper to use a keyboard and mouse.`):t?.reason===`vinput_needs_loader`?e(`rp_kbm_needs_loader`,void 0,`Needs a payload loader on port 9021`):e(`rp_kbm_unavailable`,void 0,`Native keyboard & mouse isn't available on this console yet.`)}function _s({client:e,caps:t}){let n=Tn(),r=(0,T.useMemo)(()=>new B({send:t=>e.sendKbm(t)}),[e]);(0,T.useEffect)(()=>{r.setWant({mouse:!0,keyboard:t.keyboard})},[r,t.keyboard]),(0,T.useEffect)(()=>()=>r.dispose(),[r]);let i=(0,T.useMemo)(()=>({move:(e,t)=>r.move(e,t),button:(e,t)=>r.button(e,t),scroll:(e,t)=>r.scroll(e,t,0),key:(e,t)=>r.key(e,t),shiftHeld:()=>r.shiftHeld()}),[r]);return(0,L.jsxs)(Po,{sink:i,speed:1.5,className:`absolute inset-0 z-10`,testId:`pad-touchpad`,children:[(0,L.jsx)(`p`,{className:`pointer-events-none absolute inset-x-6 top-1/2 -translate-y-1/2 text-center text-xs leading-5 text-white/50`,children:n(`rp_tp_tips`,void 0,`Drag to move. Tap to click. Two fingers: tap to right-click, drag to scroll. Tap, then touch and drag to select.`)}),(0,L.jsx)(`div`,{className:`absolute`,style:{right:`max(12px, env(safe-area-inset-right))`,bottom:`max(12px, env(safe-area-inset-bottom))`},children:(0,L.jsx)(Io,{sink:t.keyboard?i:null})})]})}function vs({url:e,computer:t,onLeave:n,watch:r=!1,transport:i,hello:a,onReconnectToken:o,lanUrl:s=null}){let c=Tn(),l=us(i?e:null,s),u=t??c(`pad_net_computer`,void 0,`the computer`),[d,f]=(0,T.useState)({kind:`connecting`}),[p,m]=(0,T.useState)(0),[h,g]=(0,T.useState)(()=>typeof window<`u`&&window.innerHeight>window.innerWidth),[_,v]=(0,T.useState)(null),[y,b]=(0,T.useState)(null),[x,S]=(0,T.useState)(!1),ee=(0,T.useRef)(null),te=(0,T.useRef)(null),[C,ne]=(0,T.useState)(!r),[w,re]=(0,T.useState)(null),[ie,ae]=(0,T.useState)(!1),[oe,se]=(0,T.useState)(null),[ce,le]=(0,T.useState)(`controller`);(0,T.useEffect)(()=>(os(`pad-remote`,!0),ls(`pad-remote`,!0),()=>{os(`pad-remote`,!1),ls(`pad-remote`,!1)}),[]),(0,T.useEffect)(()=>{if(!x)return;let e=Ae(e=>{co.motion=e});return()=>{e(),co.motion=null}},[x]),(0,T.useEffect)(()=>{let t=r?Zi(re,`watch`,()=>n.askKeyframe()):null;ee.current=t,t&&te.current?.appendChild(t.element),ne(!r),ae(!1);let n=new io({url:e,WebSocketImpl:i,hello:a,onReconnectToken:o,onStage:f,touchPad:()=>co.touchPad,onLight:v,onKbmCaps:se,motion:()=>co.motion,watch:t?{onFrame:e=>t.onMessage(e),onCodec:e=>t.setHevc(e),onControl:ne}:void 0});b(n),n.start();let s=()=>{let e=document.visibilityState===`hidden`;n.setNeutral(e),e||n.wake()},c=()=>n.setNeutral(!0);return document.addEventListener(`visibilitychange`,s),window.addEventListener(`blur`,c),window.addEventListener(`focus`,s),()=>{document.removeEventListener(`visibilitychange`,s),window.removeEventListener(`blur`,c),window.removeEventListener(`focus`,s),n.stop(),t?.stop(),t?.element.remove()}},[e,p,r]),(0,T.useEffect)(()=>{let e=()=>g(window.innerHeight>window.innerWidth);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let ue=d.kind===`refused`||d.kind===`lost`,de=d.kind===`joined`||d.kind===`reconnecting`,pe=!!s&&!de&&(l||d.kind===`refused`&&d.why===`net:no_hub`);return(0,L.jsxs)(`div`,{className:`fixed inset-0 select-none overflow-hidden bg-black text-white [-webkit-touch-callout:none]`,style:{touchAction:`none`},"data-testid":`pad-app`,children:[(0,L.jsxs)(`div`,{className:`absolute inset-x-0 top-0 z-20 flex items-center justify-center gap-2 px-3 pt-[max(6px,env(safe-area-inset-top))] text-xs text-white/80`,children:[(0,L.jsx)(`span`,{className:`inline-block h-2 w-2 shrink-0 rounded-full`,style:{background:d.kind===`joined`?_?`rgb(${_[0]},${_[1]},${_[2]})`:`var(--color-success,#22c55e)`:ue?`var(--color-bad,#ef4444)`:`#eab308`}}),(0,L.jsx)(`span`,{className:`truncate`,"data-testid":`pad-stage`,children:r&&d.kind===`joined`&&d.host&&(!d.passcode||d.playing)?C?c(`pad_watch_control`,void 0,`Watching, and you have the controller`):c(`pad_watch_watching`,{host:d.host},`Watching ${d.host}`):fs(c,d,u)}),de&&typeof document<`u`&&!!document.documentElement.requestFullscreen&&!document.fullscreenElement&&(0,L.jsxs)(`button`,{type:`button`,onClick:()=>void hs(),className:`flex items-center gap-1 rounded-full bg-white/15 px-2 py-1`,"data-testid":`pad-full`,children:[(0,L.jsx)(fe,{size:12}),c(`pad_fill`,void 0,`Full screen`)]}),de&&k()&&(0,L.jsx)(`button`,{type:`button`,onClick:()=>{x?S(!1):ke().then(S)},"aria-pressed":x,className:`rounded-full px-2 py-1 ${x?`bg-white text-black`:`bg-white/15`}`,"data-testid":`pad-motion`,children:c(`pad_motion`,void 0,`Motion`)}),n&&(0,L.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-full bg-white/15 px-2 py-1`,"data-testid":`pad-leave`,children:c(`pad_leave`,void 0,`Stop being a controller`)})]}),(0,L.jsx)(`div`,{ref:te,className:`absolute inset-0 z-0 flex items-center justify-center`,"aria-hidden":!0}),r&&de&&!ie&&(0,L.jsxs)(`button`,{type:`button`,onClick:()=>{ee.current?.startSound(),ae(!0)},className:`absolute bottom-4 left-1/2 z-20 flex -translate-x-1/2 items-center gap-1.5 rounded-full bg-white/90 px-3 py-1.5 text-xs font-medium text-black`,"data-testid":`watch-sound`,children:[(0,L.jsx)(Ce,{size:14}),c(`pad_watch_sound`,void 0,`Sound`)]}),r&&w&&(0,L.jsx)(`p`,{className:`absolute inset-x-4 top-1/2 z-10 -translate-y-1/2 text-center text-sm text-white/85`,"data-testid":`watch-problem`,children:w===`no_hevc`?c(`pad_watch_no_hevc`,void 0,`This device can't play this stream's picture: the computer streams HEVC, and this device plays only H.264.`):c(`pad_watch_decode`,void 0,`The picture could not be played here.`)}),de&&C&&(ce===`touchpad`&&oe?.mouse&&y?(0,L.jsx)(_s,{client:y,caps:oe}):(0,L.jsx)(wo,{stream:y,layout:`overlay`})),de&&C&&(0,L.jsx)(Lo,{mode:ce===`touchpad`&&oe?.mouse?`touchpad`:`controller`,onChange:le,blocked:gs(c,oe),touchpadLabel:c(`pad_touchpad_tab`,void 0,`Touchpad & keyboard`),style:{top:`calc(max(6px, env(safe-area-inset-top)) + 2rem)`}}),de&&h&&(0,L.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-6 z-20 flex justify-center`,children:(0,L.jsxs)(`span`,{className:`flex items-center gap-2 rounded-full bg-black/70 px-3 py-1.5 text-xs text-white/85`,children:[(0,L.jsx)(xe,{size:14}),c(`pad_turn`,void 0,`Turn the phone sideways`)]})}),pe&&!ue&&s&&(0,L.jsx)(`div`,{className:`absolute inset-x-0 bottom-8 z-10 flex justify-center px-6`,children:(0,L.jsx)(ds,{href:s})}),ue&&(0,L.jsxs)(`div`,{className:`absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 px-6 text-center text-sm`,children:[(0,L.jsx)(`p`,{className:`max-w-sm text-white/85`,children:fs(c,d,u)}),pe&&s&&(0,L.jsx)(ds,{href:s}),ms(d)&&(0,L.jsx)(`button`,{type:`button`,onClick:()=>m(e=>e+1),className:`rounded-full bg-white px-4 py-2 text-sm font-medium text-black`,"data-testid":`pad-retry`,children:c(`pad_retry`,void 0,`Try again`)})]})]})}var ys=`ps5upload.openIn`,bs=`ps5upload.openIn.tab`;function xs(){try{return sessionStorage.getItem(bs)===`browser`}catch{return!1}}function Ss(){try{sessionStorage.setItem(bs,`browser`)}catch{}}function Cs(e){return e===`browser`?`browser`:e===`app`?`opening`:`ask`}function ws({appLink:e,children:t}){let n=Tn(),[r,i]=(0,T.useState)(()=>xs()?`browser`:Cs(yt(ys))),[a,o]=(0,T.useState)(!1);if((0,T.useEffect)(()=>{r===`opening`&&yt(`ps5upload.openIn`)===`app`&&(location.href=e)},[]),r===`browser`)return(0,L.jsx)(L.Fragment,{children:t});let s=()=>{a&&vt(ys,`app`),i(`opening`),location.href=e},c=()=>{r===`ask`&&a?vt(ys,`browser`):r===`opening`&&yt(`ps5upload.openIn`)===`app`&&bt(ys),Ss(),i(`browser`)};return(0,L.jsx)(`div`,{className:`flex min-h-[100dvh] items-center justify-center bg-black px-6 text-white`,"data-testid":`open-in-gate`,"data-join-ui":``,children:(0,L.jsx)(`div`,{className:`w-full max-w-sm space-y-4 rounded-2xl border border-white/10 bg-neutral-900 p-6`,children:r===`ask`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsx)(`h1`,{className:`text-lg font-semibold`,children:n(`open_in_title`,void 0,`Open in the PS5Upload app?`)}),(0,L.jsx)(`p`,{className:`text-sm text-white/60`,children:n(`open_in_body`,void 0,`Have the PS5Upload app on this device? Open this there, or carry on in the browser.`)})]}),(0,L.jsx)(`button`,{type:`button`,onClick:s,autoFocus:!0,className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black`,"data-testid":`open-in-app`,children:n(`open_in_app`,void 0,`Open in the app`)}),(0,L.jsx)(`button`,{type:`button`,onClick:c,className:`w-full rounded-full border border-white/20 py-2.5 text-sm font-semibold text-white hover:bg-white/10`,"data-testid":`open-in-browser`,children:n(`open_in_browser`,void 0,`Continue in browser`)}),(0,L.jsxs)(`label`,{className:`flex items-center justify-center gap-2 text-xs text-white/60`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:a,onChange:e=>o(e.target.checked),"data-testid":`open-in-remember`}),n(`open_in_remember`,void 0,`Remember my choice on this device`)]})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsx)(`h1`,{className:`text-lg font-semibold`,children:n(`open_in_opening`,void 0,`Opening the PS5Upload app…`)}),(0,L.jsx)(`p`,{className:`text-sm text-white/60`,children:n(`open_in_not_opened`,void 0,`Nothing happened? The app may not be on this device.`)})]}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>location.href=e,autoFocus:!0,className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black`,"data-testid":`open-in-again`,children:n(`open_in_again`,void 0,`Try again`)}),(0,L.jsx)(`button`,{type:`button`,onClick:c,className:`w-full rounded-full border border-white/20 py-2.5 text-sm font-semibold text-white hover:bg-white/10`,"data-testid":`open-in-browser`,children:n(`open_in_browser`,void 0,`Continue in browser`)})]})})})}function Ts(e){return`ps5upload://pad?link=${encodeURIComponent(e)}`}function Es(e){let t=(e??``).trim().replace(/^\[|\]$/g,``).toLowerCase(),n=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(t);if(n){let e=n.slice(1).map(Number);if(e.some(e=>e>255))return null;let[t,r]=e;return t===10||t===172&&r>=16&&r<32||t===192&&r===168||t===169&&r===254||t===127?0:t===100&&r>=64&&r<128?1:2}if(!t.includes(`:`)||!/^[0-9a-f:.]+$/.test(t))return null;if(t.startsWith(`fd7a:115c:a1e0:`))return 1;let r=parseInt(t.split(`:`)[0]||`0`,16);return(r&65024)==64512||(r&65472)==65152||t===`::1`?0:2}function Ds(e,t){let n=Es(e),r=Es(t);return n===1||r===1?`tailscale`:r===0?`lan`:r===2?`internet`:null}function Os(e){let t=[];if(typeof e.forEach==`function`)e.forEach(e=>t.push(e));else for(let n of e)t.push(n);let n=new Map(t.map(e=>[String(e.id),e])),r=t.filter(e=>e.type===`candidate-pair`),i=t.filter(e=>e.type===`transport`&&typeof e.selectedCandidatePairId==`string`).map(e=>n.get(String(e.selectedCandidatePairId))).find(Boolean)??r.find(e=>e.selected===!0)??r.find(e=>e.nominated===!0&&e.state===`succeeded`);if(!i)return null;let a=e=>{let t=n.get(String(e));if(!t)return null;let r=t.address??t.ip;return typeof r==`string`?r:null};return Ds(a(i.localCandidateId),a(i.remoteCandidateId))}function ks(e){let t=e.replace(/:\d+$/,``).replace(/^\[|\]$/g,``);return`${t===`localhost`||t===`127.0.0.1`||t===`::1`?`ws`:`wss`}://${e}/ws`}function As(e){let t=new Set;for(let n of e.matchAll(/^a=fingerprint:sha-256[ \t]+([0-9A-Fa-f:]+)[ \t]*\r?$/gim))t.add(n[1].toUpperCase());return/^a=fingerprint:(?!sha-256[ \t])/im.test(e)?null:t.size===1?[...t][0]:null}function js(e,t){let n=As(e);return n!==null&&n===t.toUpperCase()}var Ms=16777216;function Ns(e){let t=16383,n=Math.max(1,Math.ceil(e.length/t)),r=[];for(let i=0;ithis.max)return this.parts=[],this.size=0,{kind:`error`,why:`too_big`};if(this.parts.push(r.slice()),this.size+=r.length,n===1)return{kind:`partial`};let i=new Uint8Array(this.size),a=0;for(let e of this.parts)i.set(e,a),a+=e.length;return this.parts=[],this.size=0,{kind:`message`,data:i.buffer}}};function Fs(e){let t=new Uint8Array(9);return t[0]=3,t.set(e.subarray(0,8),1),t}var Is=[`stun:stun.cloudflare.com:3478`,`stun:stun.l.google.com:19302`];function Ls(e){let t=e.trim().replace(/^a=/,``).split(/\s+/);return t.length<8||t[6]!==`typ`||t[2].toLowerCase()===`udp`&&!t[4].toLowerCase().endsWith(`.local`)}var Rs=1500,zs=2e4;function Bs(e){let t=e?.codecs??[],n=e=>t.filter(t=>t.mimeType.toLowerCase()===e);return[...n(`video/h264`),...n(`video/h265`),...n(`video/rtx`)]}var Vs=null;function Hs(e){e.onopen=e.onmessage=e.onclose=e.onerror=null;try{e.readyState===1&&e.send(JSON.stringify({t:`leave`})),e.close(1e3)}catch{}}function Us(e,t){let n=Vs;return n?(Vs=null,n.timer&&clearTimeout(n.timer),n.url!==e||n.room!==t||n.ws.readyState>1||n.msgs.some(e=>e.t===`error`||e.t===`closed`)?(Hs(n.ws),null):{ws:n.ws,msgs:n.msgs}):null}function Ws(e,t={}){var n;let r=t.WebSocketImpl??(typeof WebSocket>`u`?void 0:WebSocket),i=t.PeerConnection??(typeof RTCPeerConnection>`u`?void 0:RTCPeerConnection),a=t.iceTimeoutMs??15e3,o=t.log??(()=>{});class s{constructor(e){this.CONNECTING=0,this.OPEN=1,this.CLOSING=2,this.CLOSED=3,this.readyState=0,this.binaryType=`arraybuffer`,this.onopen=null,this.onmessage=null,this.onclose=null,this.onerror=null,this.hub=null,this.pc=null,this.dc=null,this.timer=null,this.rx=new Ps,this.answered=!1,this.early=[],this.hubBackUntil=0,this.offerSdp=null,this.offerSent=!1,this.ownEarly=[],this.media=null,setTimeout(()=>this.begin(),0)}begin(){if(this.readyState!==0)return;if(!i||!r){this.fail(`no_webrtc`);return}let n=t.signalUrl??ks(e.hub),a=t.signalUrl||t.lan?null:Us(n,e.room),s;if(a)s=a.ws,o(`hub: joined early`);else try{s=new r(n)}catch{this.fail(`no_hub`);return}if(this.hub=s,this.prepare(),this.readyState===0){s.onopen=()=>s.send(JSON.stringify(t.lan?{v:1,t:`join`,lan:!0}:{v:1,t:`join`,room:e.room})),s.onmessage=e=>{if(typeof e.data!=`string`)return;let t;try{t=JSON.parse(e.data)}catch{return}this.onHub(t)},s.onclose=e=>{this.hub===s&&(this.hub=null,this.readyState===0&&(this.answered||e?.code===1001&&this.hubRestarting()||this.fail(`no_hub`)))},s.onerror=()=>{};for(let e of a?.msgs??[])this.onHub(e)}}signal(e){let t=this.hub;t&&t.readyState===1&&t.send(JSON.stringify({t:`signal`,to:`host`,data:e}))}onHub(e){if(this.readyState===0)switch(e.t){case`joined`:o(`hub: joined room as ${e.gid??`?`}`),this.sendOffer();return;case`signal`:e.from===`host`&&e.data&&typeof e.data==`object`&&this.onSignal(e.data);return;case`closed`:this.fail(`no_room`);return;case`error`:if(o(`hub: error ${e.why??`?`}`),e.why===`no_room`&&this.hubBackUntil&&this.hubRestarting())return;this.fail(e.why===`no_room`?`no_room`:e.why===`room_full`?`net_full`:`no_hub`);return}}prepare(){if(!i)return;this.offerSent=!1,this.ownEarly=[];let e;try{e=new i({iceServers:[{urls:Is}]})}catch{this.fail(`no_webrtc`);return}this.pc=e;let n=e.createDataChannel(t.label??`join`,{ordered:!0});if(n.binaryType=`arraybuffer`,this.dc=n,n.onopen=()=>this.opened(n),n.onmessage=e=>this.fromChannel(e.data),n.onclose=()=>{this.dc===n&&this.dropped()},t.video&&e.addTransceiver){try{let t=e.addTransceiver(`video`,{direction:`recvonly`}),n=Bs(globalThis.RTCRtpReceiver?.getCapabilities?.(`video`));n.length&&t.setCodecPreferences&&t.setCodecPreferences(n)}catch{}try{e.addTransceiver(`audio`,{direction:`recvonly`})}catch{}e.ontrack=t=>{if(this.pc!==e)return;let n=this.media?.stream??t.streams[0]??new MediaStream;n.getTracks().includes(t.track)||n.addTrack(t.track),this.media=t.track.kind===`audio`?{stream:n,receiver:this.media?.receiver??t.receiver,audio:t.receiver}:{stream:n,receiver:t.receiver,...this.media?.audio?{audio:this.media.audio}:{}}}}e.onicecandidate=t=>{if(this.pc!==e)return;let n=t.candidate;if(!n||!n.candidate||!Ls(n.candidate))return;let r={type:`candidate`,candidate:n.candidate,sdpMid:n.sdpMid??`0`};this.offerSent?this.signal(r):this.ownEarly.push(r)},e.oniceconnectionstatechange=()=>{if(this.pc!==e)return;let t=e.iceConnectionState;o(`ice: ${t}`),t===`failed`&&(this.readyState===0?this.fail(`no_direct`):this.dropped())},this.offerSdp=(async()=>{let t=await e.createOffer();return await e.setLocalDescription(t),e.localDescription?.sdp??t.sdp??``})().catch(()=>(this.pc===e&&this.fail(`no_webrtc`),null))}async sendOffer(){let e=this.pc,t=this.offerSdp;if(!e||!t||this.offerSent)return;this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,this.readyState===0&&this.fail(`no_direct`)},a);let n=await t;if(this.pc===e&&n!==null&&this.readyState===0){this.signal({type:`offer`,sdp:n}),this.offerSent=!0;for(let e of this.ownEarly.splice(0))this.signal(e)}}async onSignal(t){let n=this.pc;if(t.type===`bye`)this.fail(t.why===`full`?`net_full`:`offer`);else if(n){if(t.type===`answer`){if(this.answered||typeof t.sdp!=`string`)return;if(e.fp?!js(t.sdp,e.fp):As(t.sdp)===null){o(`answer: fingerprint does not match the link`),this.fail(`mismatch`);return}this.answered=!0;try{await n.setRemoteDescription({type:`answer`,sdp:t.sdp});for(let e of this.early.splice(0))await n.addIceCandidate(e).catch(()=>{})}catch{this.fail(`offer`)}}else if(t.type===`candidate`&&typeof t.candidate==`string`&&t.candidate){let e={candidate:t.candidate,sdpMid:typeof t.sdpMid==`string`?t.sdpMid:`0`,sdpMLineIndex:typeof t.sdpMLineIndex==`number`?t.sdpMLineIndex:0};this.answered?await n.addIceCandidate(e).catch(()=>{}):this.early.push(e)}}}opened(e){this.dc===e&&this.readyState===0&&(this.clearTimer(),this.readyState=1,o(`channel open`),this.leaveHub(),this.onopen?.(new Event(`open`)))}fromChannel(e){if(this.readyState!==1)return;if(typeof e==`string`){this.onmessage?.(new MessageEvent(`message`,{data:e}));return}if(!(e instanceof ArrayBuffer))return;let t=this.rx.push(e);switch(t.kind){case`ping`:try{this.dc?.send(Fs(t.data))}catch{}return;case`message`:this.onmessage?.(new MessageEvent(`message`,{data:t.data}));return;case`error`:o(`channel: bad binary message (${t.why})`),this.dropped();return;default:return}}async netPath(){let e=this.pc;if(!e||this.readyState!==1||typeof e.getStats!=`function`)return null;try{return Os(await e.getStats())}catch{return null}}send(e){let t=this.dc;if(this.readyState!==1||!t||t.readyState!==`open`)throw Error(`not open`);if(typeof e==`string`){t.send(e);return}let n=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);for(let e of Ns(n))t.send(e)}close(){this.readyState!==3&&(this.teardown(),this.emitClose(1e3,``,!0))}clearTimer(){this.timer&&clearTimeout(this.timer),this.timer=null}leaveHub(){let e=this.hub;if(this.hub=null,e)try{e.readyState===1&&e.send(JSON.stringify({t:`leave`})),e.close(1e3)}catch{}}hubRestarting(){let e=Date.now();return this.hubBackUntil||=e+zs,e>=this.hubBackUntil?!1:(o(`hub: restarting, trying again`),this.clearTimer(),this.leaveHub(),this.closePeer(),this.answered=!1,this.early=[],this.timer=setTimeout(()=>{this.timer=null,this.begin()},Rs),!0)}teardown(){this.readyState=3,this.clearTimer(),this.leaveHub(),this.closePeer()}closePeer(){let e=this.pc,t=this.dc;this.pc=null,this.dc=null,this.media=null,this.offerSdp=null,this.offerSent=!1,this.ownEarly=[];try{t?.close()}catch{}try{e?.close()}catch{}}dropped(){this.readyState!==3&&(this.teardown(),this.emitClose(1006,``,!1))}fail(e){this.readyState!==3&&(o(`failed: ${e}`),this.teardown(),this.emitClose(Ie,`net:${e}`,!1))}emitClose(e,t,n){let r=this.onclose;if(!r)return;let i=typeof CloseEvent>`u`?{type:`close`,code:e,reason:t,wasClean:n}:new CloseEvent(`close`,{code:e,reason:t,wasClean:n});setTimeout(()=>r(i),0)}}return n=s,n.CONNECTING=0,n.OPEN=1,n.CLOSING=2,n.CLOSED=3,s}function Gs(e,t=0){return/iPad/.test(e)||/Macintosh/.test(e)&&t>1?`ipad`:/iPhone|iPod/.test(e)?`iphone`:/Android/.test(e)?`android`:`phone`}var Ks=new URLSearchParams(location.hash.slice(1)),qs=Ks.get(`t`)??``,Js=Ks.get(`w`)===`1`,Ys=Gs(navigator.userAgent,navigator.maxTouchPoints),Xs=oo({get:yt,set:vt}),Zs=Be(location.hash),Qs=(0,x.createRoot)(document.getElementById(`root`));if(Zs){let e=Ws(Zs,{label:`pad`,log:e=>console.info(`[pad] ${e}`)}),t=`ps5upload.pad.rt.${Zs.room}`,n=yt(t),r={t:Zs.key,name:Ys,d:Xs,...Js?{w:1}:{},...n?{rt:n}:{}},i=Me(location.hash,`pad`);Qs.render((0,L.jsx)(vs,{url:ks(Zs.hub),computer:null,watch:Js,transport:e,hello:r,onReconnectToken:e=>vt(t,e),lanUrl:i?Ne(i,{watch:Js}):null}))}else{let e=location.pathname.replace(/\/pad\/?$/,``),t=`${location.protocol===`https:`?`wss`:`ws`}://${location.host}${e}/api/pad/ws?t=${encodeURIComponent(qs)}&name=${Ys}&d=${Xs}${Js?`&w=1`:``}`;Qs.render((0,L.jsx)(ws,{appLink:Ts(location.href),children:(0,L.jsx)(vs,{url:t,computer:location.hostname,watch:Js})}))} diff --git a/engine/crates/ps5upload-hub/PROTOCOL.md b/engine/crates/ps5upload-hub/PROTOCOL.md index 08c31fb0f..bbbb3e3e5 100644 --- a/engine/crates/ps5upload-hub/PROTOCOL.md +++ b/engine/crates/ps5upload-hub/PROTOCOL.md @@ -176,10 +176,10 @@ Forwarded as `{"t":"signal","from":"host"|"","data":}`. A *client* is an IPv4 address or an IPv6 /64. Behind a reverse proxy, the client address comes from the proxy's header (last entry) only when the proxy is configured as trusted. -A guest's signals are its offer and each ICE candidate, one signal each, so a client should send -few: one transport for all its sections (`bundlePolicy: "max-bundle"`), and none of the -candidates the host cannot use (the engine takes UDP candidates with an address; `.local` and -TCP ones it drops). The guest pages do both: about 5 signals a try instead of 20 to 40. +A guest's signals are its offer and each ICE candidate, one signal each, so a client should not +send the candidates the host cannot use: the engine takes UDP candidates with an address and +drops `.local` (mDNS) and TCP ones. The guest pages leave those out (Firefox on one network: 11 +signals a try instead of 21). ## Close codes diff --git a/engine/crates/ps5upload-hub/src/config.rs b/engine/crates/ps5upload-hub/src/config.rs index 7120ce416..29ff119b5 100644 --- a/engine/crates/ps5upload-hub/src/config.rs +++ b/engine/crates/ps5upload-hub/src/config.rs @@ -166,8 +166,8 @@ impl Default for Config { // signal each. Firefox on one network found 20 for the Play Together page as it was // (a data channel, a video and an audio track: a set of candidates for each), so with // the offer it went past the old 20 and was closed before it could connect; a home - // with IPv6 or a VPN finds twice as many. The pages now ask for one set and leave out - // the candidates the engine cannot use, a fifth as many; older pages stay in use. + // with IPv6 or a VPN finds twice as many. The pages now leave out the candidates the + // engine cannot use (about half); older pages stay in use. max_signals_per_guest: 60, // Room for a home of three or four, each trying twice in the minute with such a page. max_signals_per_guest_client: 300, diff --git a/engine/crates/ps5upload-hub/tests/hub.rs b/engine/crates/ps5upload-hub/tests/hub.rs index 0ff6e3b19..3d308990e 100644 --- a/engine/crates/ps5upload-hub/tests/hub.rs +++ b/engine/crates/ps5upload-hub/tests/hub.rs @@ -1258,9 +1258,9 @@ async fn the_limit_that_fired_is_counted() { /// One home (one IPv4: a family, or a carrier-grade NAT) with three devices joining one Play /// Together, each trying twice within the minute (the first try dropped and the page made a new -/// one), with the page as it was before it asked for one set of candidates: its offer, then 40 -/// candidates (Firefox found 20 on one plain network for the page's data channel, video and -/// audio; IPv6 or a VPN doubles that). The host answers each try with its answer and 10 +/// one), with the page as it was before it left out the candidates the engine drops: its offer, +/// then 40 candidates (Firefox found 20 on one plain network for the page's data channel, video +/// and audio; IPv6 or a VPN doubles that). The host answers each try with its answer and 10 /// candidates. Returns how many times a limit fired. async fn family_session(c: Config) -> u64 { let t = start(Config { diff --git a/site/join/index.html b/site/join/index.html index a1377f178..dca7207d2 100644 --- a/site/join/index.html +++ b/site/join/index.html @@ -15,8 +15,8 @@ `);for(i=r=0;ri||c[r]!==l[i]){var u=` `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Le=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ie(n):``}function ze(e,t){switch(e.tag){case 26:case 27:case 5:return Ie(e.type);case 16:return Ie(`Lazy`);case 13:return e.child!==t&&t!==null?Ie(`Suspense Fallback`):Ie(`Suspense`);case 19:return Ie(`SuspenseList`);case 0:case 15:return Re(e.type,!1);case 11:return Re(e.type.render,!1);case 1:return Re(e.type,!0);case 31:return Ie(`Activity`);case 30:return Ie(`ViewTransition`);default:return``}}function Be(e){try{var t=``,n=null;do t+=ze(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` -`+e.stack}}var Ve=Object.prototype.hasOwnProperty,He=t.unstable_scheduleCallback,Ue=t.unstable_cancelCallback,We=t.unstable_shouldYield,Ge=t.unstable_requestPaint,Ke=t.unstable_now,qe=t.unstable_getCurrentPriorityLevel,Je=t.unstable_ImmediatePriority,Ye=t.unstable_UserBlockingPriority,Xe=t.unstable_NormalPriority,Ze=t.unstable_LowPriority,Qe=t.unstable_IdlePriority,$e=t.log,et=t.unstable_setDisableYieldValue,tt=null,nt=null;function rt(e){if(typeof $e==`function`&&et(e),nt&&typeof nt.setStrictMode==`function`)try{nt.setStrictMode(tt,e)}catch{}}var it=Math.clz32?Math.clz32:st,at=Math.log,ot=Math.LN2;function st(e){return e>>>=0,e===0?32:31-(at(e)/ot|0)|0}var ct=256,lt=262144,ut=4194304;function dt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ft(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=dt(n))):i=dt(o):i=dt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=dt(n))):i=dt(o)):i=dt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function pt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function mt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0n;n++)t.push(e);return t}function vt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function yt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0=vr),xr=` `,Sr=!1;function Cr(e,t){switch(e){case`keyup`:return gr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function wr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Tr=!1;function Er(e,t){switch(e){case`compositionend`:return wr(t);case`keypress`:return t.which===32?(Sr=!0,xr):null;case`textInput`:return e=t.data,e===xr&&Sr?null:e;default:return null}}function Dr(e,t){if(Tr)return e===`compositionend`||!_r&&Cr(e,t)?(e=zn(),Rn=Ln=In=null,Tr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Xr(n)}}function Qr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $r(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Yr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yr(e.document)}return t}function ei(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var ti=Nn&&`documentMode`in document&&11>=document.documentMode,ni=null,ri=null,ii=null,ai=!1;function oi(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ai||ni==null||ni!==Yr(r)||(r=ni,`selectionStart`in r&&ei(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ii&&Jr(ii,r)||(ii=r,r=Jf(ri,`onSelect`),0>=o,i-=o,ea=1<<32-it(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),L&&na(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),L&&na(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return L&&na(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),L&&na(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===ie&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case ne:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===ie){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),uo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&ro(l)===r.type){n(e,r.sibling),c=a(r,o.props),uo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===ie?(c=F(o.props.children,e.mode,c,o.key),uo(c,o),c.return=e,e=c):(c=Vi(o.type,o.key,o.props,null,e.mode,c),uo(c,o),c.return=e,e=c)}return s(e);case re:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Wi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=ro(o),_(e,r,o,c)}if(be(o))return h(e,r,o,c);if(_e(o)){if(l=_e(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,lo(o),c);if(o.$$typeof===se)return _(e,r,ka(e,o),c);fo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Hi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{co=0;var i=_(e,t,n,r);return so=null,i}catch(t){if(t===Za||t===$a)throw t;var a=Li(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var mo=po(!0),ho=po(!1),go=!1;function _o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function yo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function bo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Pi(e),Ni(e,null,n),t}return Ai(e,r,t,n),Pi(e)}function xo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xt(e,n)}}function So(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Co=!1;function wo(){if(Co){var e=Ha;if(e!==null)throw e}}function To(e,t,n,r){Co=!1;var i=e.updateQueue;go=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===Va&&(Co=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=E({},d,f);break a;case 2:go=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),od|=o,e.lanes=o,e.memoizedState=d}}function Eo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Do(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=A.T,s={};s.types=o===null?null:o.types,A.T=s,dc(e,!1,t,n);try{var c=i(),l=A.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?uc(e,t,Ga(c,r),jd(e)):uc(e,t,r,jd(e))}catch(n){uc(e,t,{then:function(){},status:`rejected`,reason:n},jd())}finally{j.p=a,o!==null&&s.types!==null&&(o.types=s.types),A.T=o}}function ec(){}function tc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=nc(e).queue;$s(e,a,t,xe,n===null?ec:function(){return rc(e),n(r)})}function nc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:xe,baseState:xe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:xe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function rc(e){var t=nc(e);t.next===null&&(t=e.alternate.memoizedState),uc(e,t.next.queue,{},jd())}function ic(){return Oa(sh)}function ac(){return ss().memoizedState}function oc(){return ss().memoizedState}function sc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=jd();e=yo(n);var r=bo(t,e,n);r!==null&&(Pd(r,t,n),xo(r,t,n)),t={cache:Pa()},e.payload=t;return}t=t.return}}function cc(e,t,n){var r=jd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fc(e)?pc(t,n):(n=ji(e,t,n,r),n!==null&&(Pd(n,e,r),mc(n,t,r)))}function lc(e,t,n){uc(e,t,n,jd())}function uc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fc(e))pc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,qr(s,o))return Ai(e,t,i,0),q===null&&ki(),!1}catch{}if(n=ji(e,t,i,r),n!==null)return Pd(n,e,r),mc(n,t,r),!0}return!1}function dc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},fc(e)){if(t)throw Error(i(479))}else t=ji(e,n,r,2),t!==null&&Pd(t,e,2)}function fc(e){var t=e.alternate;return e===B||t!==null&&t===B}function pc(e,t){Ko=Go=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function mc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xt(e,n)}}var hc={readContext:Oa,use:us,useCallback:H,useContext:H,useEffect:H,useImperativeHandle:H,useLayoutEffect:H,useInsertionEffect:H,useMemo:H,useReducer:H,useRef:H,useState:H,useDebugValue:H,useDeferredValue:H,useTransition:H,useSyncExternalStore:H,useId:H,useHostTransitionStatus:H,useFormState:H,useActionState:H,useOptimistic:H,useMemoCache:H,useCacheRefresh:H,useEffectEvent:H},gc={readContext:Oa,use:us,useCallback:function(e,t){return os().memoizedState=[e,t===void 0?null:t],e},useContext:Oa,useEffect:Bs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Rs(4194308,4,Ks.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Rs(4194308,4,e,t)},useInsertionEffect:function(e,t){Rs(4,2,e,t)},useMemo:function(e,t){var n=os();t=t===void 0?null:t;var r=e();if(qo){rt(!0);try{e()}finally{rt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=os();if(n!==void 0){var i=n(t);if(qo){rt(!0);try{n(t)}finally{rt(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=cc.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=os();return e={current:e},t.memoizedState=e},useState:function(e){e=Ss(e);var t=e.queue,n=lc.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Js,useDeferredValue:function(e,t){return Zs(os(),e,t)},useTransition:function(){var e=Ss(!1);return e=$s.bind(null,B,e.queue,!0,!1),os().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,a=os();if(L){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),q===null)throw Error(i(349));Y&127||_s(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Bs(ys.bind(null,r,o,e),[e]),r.flags|=2048,Is(9,{destroy:void 0},vs.bind(null,r,o,n,t),null),n},useId:function(){var e=os(),t=q.identifierPrefix;if(L){var n=ta,r=ea;n=(r&~(1<<32-it(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Jo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Ot]=t,o[kt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(np(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&ml(t)}}return U(t),t.subtreeFlags&=-33554433,hl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ml(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Oe.current,ma(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=sa,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ot]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ep(e.nodeValue,n)),e||da(t,!0)}else e=lp(e).createTextNode(r),e[Ot]=t,t.stateNode=e}return U(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ma(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Ot]=t}else ha(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),e=!1}else n=ga(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(zo(t),t):(zo(t),null);if(t.flags&128)throw Error(i(558))}return U(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ma(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Ot]=t}else ha(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),a=!1}else a=ga(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(zo(t),t):(zo(t),null)}return zo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),_l(t,t.updateQueue),U(t),null);case 4:return je(),e===null&&Wf(t.stateNode.containerInfo),t.flags|=67108864,U(t),null;case 10:return Sa(t.type),U(t),null;case 19:if(Vo(t),r=t.memoizedState,r===null)return U(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)vl(r,!1);else{if(ad!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ho(e),o!==null){for(t.flags|=128,vl(r,!1),e=o.updateQueue,t.updateQueue=e,_l(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Bi(n,e),n=n.sibling;return z(t,Bo.current&1|2),L&&na(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ke()>gd&&(t.flags|=128,a=!0,vl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Ho(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,_l(t,e),vl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!L)return U(t),null}else 2*Ke()-r.renderingStartTime>gd&&n!==536870912&&(t.flags|=128,a=!0,vl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ke(),e.sibling=null,o=Bo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||L?z(t,o):(n=o,M(No,t),M(Bo,n),Po===null&&(Po=t)),L&&na(t,r.treeForkCount),e}return U(t),null;case 22:case 23:return zo(t),Mo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(U(t),t.subtreeFlags&6&&(t.flags|=8192)):U(t),n=t.updateQueue,n!==null&&_l(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Te(qa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Sa(Na),U(t),null;case 25:return null;case 30:return t.flags|=33554432,U(t),null}throw Error(i(156,t.tag))}function bl(e,t){switch(aa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sa(Na),je(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ne(t),null;case 31:if(t.memoizedState!==null){if(zo(t),t.alternate===null)throw Error(i(340));ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(zo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Vo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return je(),null;case 10:return Sa(t.type),null;case 22:case 23:return zo(t),Mo(),e!==null&&Te(qa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Sa(Na),null;case 25:return null;default:return null}}function xl(e,t){switch(aa(t),t.tag){case 3:Sa(Na),je();break;case 26:case 27:case 5:Ne(t);break;case 4:je();break;case 31:t.memoizedState!==null&&zo(t);break;case 13:zo(t);break;case 19:Vo(t);break;case 10:Sa(t.type);break;case 22:case 23:zo(t),Mo(),e!==null&&Te(qa);break;case 24:Sa(Na)}}function Sl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Cl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function wl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Do(t,n)}catch(t){Z(e,e.return,t)}}}function Tl(e,t,n){n.props=Cc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function El(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=Si(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);f(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Dl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}}function Ol(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n title`))),np(r,t,n),r[Ot]=e,Ht(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;sg&&(o=g,g=h,h=o);var _=Zr(s,h),v=Zr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,A.T=null,n=wd,wd=null;var o=bd,s=Sd;if(yd=0,xd=bd=null,Sd=0,K&6)throw Error(i(331));var c=K;if(K|=4,Yu(o.current),Vu(o,o.current,s,n),K=c,Df(0,!1),nt&&typeof nt.onPostCommitFiberRoot==`function`)try{nt.onPostCommitFiberRoot(tt,o)}catch{}return!0}finally{j.p=a,A.T=r,uf(e,t)}}function pf(e,t,n){t=Ki(n,t),t=kc(e.stateNode,t,2),e=bo(e,t,2),e!==null&&(vt(e,2),Ef(e))}function Z(e,t,n){if(e.tag===3)pf(e,e,n);else for(;t!==null;){if(t.tag===3){pf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(vd===null||!vd.has(r))){e=Ki(n,e),n=Ac(2),r=bo(t,n,2),r!==null&&(jc(n,r,t,e),vt(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $u;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(rd=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(ad===4||ad===3&&(Y&62914560)===Y&&300>Ke()-md?K&2?cd|=n:Vd(e,0):cd|=n,ud===Y&&(ud=0)),Ef(e)}function gf(e,t){t===0&&(t=gt()),e=Mi(e,t),e!==null&&(vt(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),gf(e,n)}function yf(e,t){return He(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-it(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=Y,a=ft(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||pt(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&hp()&&(e=Tf);for(var t=Ke(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}yd!==0&&yd!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=ln(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),Ht(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+ln(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+ln(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+ln(n.imageSizes)+`"]`)):i+=`[href="`+ln(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=E({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[It]=!0,o.onload=o.onerror=function(){Ut(o)}),Ht(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+ln(r)+`"][href="`+ln(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=E({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),Ht(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=Vt(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=E({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Ht(c),np(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=Vt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=E({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Ht(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=Vt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=E({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Ht(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var a=(a=Oe.current)?bm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Vt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=Vt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Vt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+ln(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[It]){r.loading=1;return}}else t=e.createElement(`link`),t[It]=!0,t.onload=t.onerror=Ut.bind(null,t),np(t,`link`,n),Ht(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+ln(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+ln(n.href)+`"]`);if(r)return t.instance=r,Ht(r),r;var a=E({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ht(r),np(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,Ht(o),o;r=Im(n),(a=vm.get(a))&&Hm(r,a),o=(e.ownerDocument||e).createElement(`link`),Ht(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,Ht(a),a):(r=n,(a=vm.get(o))&&(r=E({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ht(a),np(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ht(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),Ht(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=b()}))(),S=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function ee(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:S(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var C=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},w=e=>{let t=C(e);return t.charAt(0).toUpperCase()+t.slice(1)},T=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),E={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function te(e){return e!=null}function ne(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??E.width,a=e.size??e.height??E.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?T(...c):T(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??E[`stroke-width`])*Number(e.size??e.width??E.width)/Number(t.size??t.width??E.width):t.strokeWidth??E[`stroke-width`];return[`svg`,{...Object.entries(E).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&te(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&te(t.width)&&{[r(`width`)]:t.width},...`height`in t&&te(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function re(e,t={}){return ne(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var ie=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},D=u(_(),1),ae=(0,D.createContext)({}),oe=()=>(0,D.useContext)(ae),se=(0,D.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=oe()??{},y=!!c||ie(d),[b,x,S=[]]=re(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:T(v,s),hasA11yProp:y,attributes:d});return(0,D.createElement)(b,{ref:f,...x},[...S.map(([e,t])=>(0,D.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function ce(e,t=[],n=[]){let r=typeof e==`string`?ee(e,t,n):e,i=(0,D.forwardRef)(({className:e,...t},n)=>(0,D.createElement)(se,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=w(r.name)),i}var le={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};le.node;var ue=ce(le),de={name:`expand`,size:24,node:[[`path`,{d:`m15 15 6 6`,key:`1s409w`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}],[`path`,{d:`M21 16v5h-5`,key:`1ck2sf`}],[`path`,{d:`M21 8V3h-5`,key:`1qoq8a`}],[`path`,{d:`M3 16v5h5`,key:`1t08am`}],[`path`,{d:`m3 21 6-6`,key:`wwnumi`}],[`path`,{d:`M3 8V3h5`,key:`1ln10m`}],[`path`,{d:`M9 9 3 3`,key:`v551iv`}]]};de.node;var O=ce(de),fe={name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};fe.node;var pe=ce(fe),k={name:`gamepad-2`,size:24,node:[[`line`,{x1:`6`,x2:`10`,y1:`11`,y2:`11`,key:`1gktln`}],[`line`,{x1:`8`,x2:`8`,y1:`9`,y2:`13`,key:`qnk9ow`}],[`line`,{x1:`15`,x2:`15.01`,y1:`12`,y2:`12`,key:`krot7o`}],[`line`,{x1:`18`,x2:`18.01`,y1:`10`,y2:`10`,key:`1lcuu1`}],[`path`,{d:`M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z`,key:`mfqc10`}]]};k.node;var me=ce(k),he={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};he.node;var ge=ce(he),_e={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};_e.node;var ve=ce(_e),ye={name:`minimize`,size:24,node:[[`path`,{d:`M8 3v3a2 2 0 0 1-2 2H3`,key:`hohbtr`}],[`path`,{d:`M21 8h-3a2 2 0 0 1-2-2V3`,key:`5jw1f3`}],[`path`,{d:`M3 16h3a2 2 0 0 1 2 2v3`,key:`198tvr`}],[`path`,{d:`M16 21v-3a2 2 0 0 1 2-2h3`,key:`ph8mxp`}]]};ye.node;var be=ce(ye),A={name:`rotate-cw`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]};A.node;var j=ce(A),xe={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};xe.node;var Se=ce(xe),Ce={name:`volume-2`,size:24,node:[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]};Ce.node;var we=ce(Ce),Te={name:`volume-x`,size:24,node:[[`path`,{d:`M11 4.702a.7.7 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.7.7 0 0 0 11 19.298z`,key:`1p7khw`}],[`path`,{d:`m16.5 14.5 5-5`,key:`cul3yw`}],[`path`,{d:`m16.5 9.5 5 5`,key:`1akey5`}]]};Te.node;var M=ce(Te),Ee={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Ee.node;var De=ce(Ee),Oe=({"ar":{"usb_skipped_not_payload":"{name}: ليس ملف .elf أو .bin","usb_skipped_unknown":"{id}: لم يعد في قائمة الحمولات","browser_unsupported":"يتطلب هذا تطبيق سطح المكتب. لا يعمل في المتصفح.","video_recovered_notice":"تعطّل «العب» في المرة السابقة أثناء بدء الصورة، لذا يُفك ترميز الصورة الآن بدون بطاقة الرسومات (للتغيير: الإعدادات › النافذة › الرسومات › فك ترميز الفيديو بالعتاد).","video_recovered_title":"يُفك ترميز الصورة الآن برمجيًا","open_in_title":"هل تفتحه في تطبيق PS5Upload؟","open_in_body":"هل لديك تطبيق PS5Upload على هذا الجهاز؟ افتح الرابط فيه، أو تابع في المتصفح.","open_in_app":"فتح في التطبيق","open_in_browser":"المتابعة في المتصفح","open_in_remember":"تذكّر اختياري على هذا الجهاز","open_in_opening":"جارٍ فتح تطبيق PS5Upload…","open_in_not_opened":"لم يحدث شيء؟ ربما التطبيق غير مثبّت على هذا الجهاز.","open_in_again":"حاول مجددًا","pad_8bitdo_no_xinput":"لا يحتوي جهاز 8BitDo هذا على وضع X-input. إذا كان أحد الأزرار خاطئًا، فافحص وحدة التحكم.","pad_8bitdo_how_switch":"اضبط المفتاح في الخلف على X ثم اضغط Start","pad_8bitdo_how_startx":"أطفئه، ثم اضغط مطولًا على Start + X لتشغيله","pad_8bitdo_how_receiver":"استخدم جهاز الاستقبال 2.4G أو كابل USB","pad_8bitdo_how_manual":"يشرح دليله الطريقة","pad_8bitdo_xinput":"للحصول على أفضل نتيجة، بدّل وحدة 8BitDo إلى وضع X-input: {how}.","rp_touch_left_stick":"العصا اليسرى","rp_touch_right_stick":"العصا اليمنى","rp_touch_touchpad":"لوحة اللمس","rp_menu":"القائمة","rp_pad_step_lx":"ادفع العصا اليسرى إلى اليمين","rp_pad_step_ly":"ادفع العصا اليسرى إلى الأسفل","rp_pad_step_rx":"ادفع العصا اليمنى إلى اليمين","rp_pad_step_ry":"ادفع العصا اليمنى إلى الأسفل","join_check_bottom":"اضغط زر الوجه السفلي (✕)","join_check_right":"اضغط زر الوجه الأيمن (○)","join_check_left":"اضغط زر الوجه الأيسر (□)","join_check_top":"اضغط زر الوجه العلوي (△)","rp_pad_press":"اضغط {name}","join_check_saved":"تم الحفظ لوحدة التحكم هذه على هذا الجهاز. جرّبها أدناه.","join_check_title":"افحص وحدة التحكم","join_done":"تم","rp_pads_none":"لم تُرصد أي يد تحكم بعد. وصّل واحدة واضغط أي زر فيها.","rp_pad_mapped":"تلعب بتعيين أزرارك","join_check_unknown":"وحدة التحكم هذه ليست في قائمتنا، لذا قد تكون أزرارها مختلطة. يستغرق إعدادها بضع ثوانٍ.","rp_pad_standard":"معروفة","rp_pad_progress":"{n} من {total}","rp_pad_skip":"تخطٍّ","rp_pad_back":"رجوع","rp_pad_cancel":"إلغاء","join_check_try":"اضغط الأزرار وحرّك العصي: ما تضغطه يضيء.","join_check_redo":"إعادة","join_check_map":"إعداد الأزرار","rp_pad_reset":"إعادة ضبط","join_open_lan_body":"لا يمكنك الوصول إلى الإنترنت؟ إذا كنت على شبكة Wi-Fi نفسها مع صديقك، فافتح اللعبة هناك.","join_open_lan":"افتح على شبكة Wi-Fi هذه","join_path_lan":"الشبكة المنزلية","join_path_internet":"الإنترنت","join_seat_taken":"احتاج {host} إلى استعادة يد التحكم ولم تكن هناك يد تحكم أخرى متاحة على PS5، لذا خرجت من اللعبة. اطلب من {host} أن يسمح لك بالدخول مرة أخرى.","join_refused_key":"انتهت صلاحية هذه الدعوة. اطلب من {host} رابطًا جديدًا.","join_refused_expired":"فقدت مكانك في اللعبة. اطلب من {host} إدخالك مجددًا.","join_refused_full":"اللعبة ممتلئة: يوجد أربعة لاعبين بالفعل.","join_refused_denied":"لم يسمح لك {host} بالدخول هذه المرة.","join_refused_no_answer":"لم يُجب {host} في الوقت المناسب. أخبر {host} ثم حاول مرة أخرى.","join_refused_closed":"{host} لا يستضيف العب معًا الآن.","join_refused_old_helper":"يحتاج PS5 الخاص بـ {host} إلى مساعد محدّث لميزة العب معًا.","join_refused_not_playing":"{host} لا يلعب الآن. اطلب من {host} أن يبدأ اللعب أولًا.","join_refused_unreachable":"لم يتمكن حاسوب {host} من الوصول إلى جهاز PS5. حاول مرة أخرى بعد قليل.","join_refused_slow_down":"رموز خاطئة كثيرة جدًا. انتظر دقيقة ثم حاول مرة أخرى.","join_refused_address":"عنوان هذا الرابط خارج شبكتك المنزلية، لذا لن يستخدمه التطبيق. اطلب من {host} رابطًا يحمل عنوان IP لجهازه.","join_refused_other":"لم يسمح لك {host} بالدخول.","join_ended_kicked":"أخرجك {host} من اللعبة.","join_ended_closed":"أغلق {host} العب معًا.","join_ended_host_stopped":"توقف المضيف عن اللعب.","join_ended_replaced":"فُتحت هذه اللعبة في علامة تبويب أخرى أو على جهاز آخر، لذا توقفت هنا.","join_ended_pad_lost":"فقد PS5 يد التحكم الخاصة بك، لذا خرجت من اللعبة. اطلب من {host} إدخالك مجددًا.","join_ended_gave_up":"لم يعد الاتصال بـ {host} في الوقت المناسب.","join_net_lost":"انقطع الاتصال بـ{host}. تحقق من اتصالك بالإنترنت ثم اطلب مرة أخرى.","join_ended_lost":"تعذّر الوصول إلى {host}. تأكد أنكما على الشبكة نفسها.","join_ended_left":"غادرت اللعبة.","join_net_mismatch":"هذا الرابط لا يطابق المضيف؛ اطلب منه رابطًا جديدًا.","join_net_no_direct":"لا يمكن إنشاء اتصال مباشر من هذه الشبكة (الموجّهان لدى الطرفين صارمان). جرّب Wi-Fi بدلًا من بيانات الجوال، أو اطلب من المضيف تشغيل UPnP.","join_net_no_room":"هذه الدعوة لم تعد مفتوحة. اطلب من {host} رابطًا جديدًا.","join_net_full":"لا يتّسع لعب {host} لصديق آخر الآن. حاول مجددًا بعد لحظة.","join_net_no_hub":"تعذّر الوصول إلى خدمة دعوات PS5Upload. تحقّق من اتصالك بالإنترنت ثم حاول مجددًا.","join_net_offer":"تعذّر على كمبيوتر {host} الاتصال بهذا المتصفح. جرّب متصفحًا آخر.","join_net_no_webrtc":"هذا المتصفح لا يستطيع إنشاء اتصالات مباشرة. جرّب إصدارًا حديثًا من Chrome أو Safari أو Firefox.","join_cancel":"إلغاء","join_host_fallback":"صديقك","join_connecting":"جارٍ الاتصال بـ {host}…","join_waiting":"بانتظار أن يسمح لك {host} بالدخول","join_waiting_body":"يرى {host} اسمك على شاشته ويضغط سماح.","join_retry":"حاول مجددًا","join_again":"اطلب الانضمام مجددًا","join_playing_at":"تلعب لدى {host}","join_you_are":"أنت اللاعب {n}","join_seat_stream":"أنت تلعب بمستخدم PS5 الخاص بـ {host}. لا حاجة لاختيار مستخدم.","join_plays_as":"أنت تلعب باسم {profile}. لا حاجة لاختيار مستخدم.","join_seat_tv_asks":"اختار {host} ملفًا شخصيًا لك، لكن تعذّر استخدامه. سيسألك التلفاز عن هويتك.","join_picking":"اضغط PS، ثم اختر اللعب السريع على التلفاز","join_hide_controls":"إخفاء","join_sound":"اضغط لتشغيل الصوت","rp_unmute":"تشغيل الصوت","rp_mute":"كتم","join_no_sound":"لا يوجد صوت في هذا المتصفح","join_exit_fullscreen":"الخروج من ملء الشاشة","pad_fill":"ملء الشاشة","join_leave":"مغادرة","join_show_controls":"إظهار عناصر التحكم","join_hold_hint":"اضغط مطولاً على الصورة لإظهار الأزرار","pad_watch_no_hevc":"لا يستطيع هذا الجهاز تشغيل صورة هذا البث: الحاسوب يبث بـ HEVC وهذا الجهاز يشغّل H.264 فقط.","pad_watch_decode":"تعذّر تشغيل الصورة هنا.","join_pad_ready":"يد التحكم جاهزة","join_check_unknown_short":"ليست في قائمتنا: قد تكون الأزرار مختلطة.","join_full_to_play":"اضغط على ملء الشاشة للعب بيد التحكم التي على الشاشة.","join_pad_none":"وصّل يد تحكم (USB أو Bluetooth) واضغط أي زر.","join_pad_keys":"أو استخدم لوحة المفاتيح: WASD للتحريك، الأسهم للأزرار الاتجاهية، Enter ✕، Backspace ○، Q □، E △، Tab Options.","join_tv_back_hint":"اضغط على زر الرجوع في جهاز التحكم عن بُعد لإظهار الأزرار.","join_block_note":"أوقف {host} زرَّي PS وCreate للأصدقاء.","join_guide_title":"خطوة أخيرة على التلفاز","join_guide_body":"اضغط زر PS مرة واحدة على يد التحكم. يسأل التلفاز «من يستخدم يد التحكم هذه؟». اختر اللعب السريع أو مستخدمك الخاص. لا يحتاج المضيف إلى فعل أي شيء.","join_guide_menus":"في الشاشة الرئيسية لجهاز PS5 يتحكم المضيف وحده بالقوائم؛ يد التحكم الخاصة بك تلعب داخل الألعاب.","join_guide_ok":"فهمت","join_host_away":"توقف المضيف عن اللعب — بانتظار أن يبدأ من جديد ({time})","join_reconnecting":"جارٍ إعادة الاتصال…","join_reconnecting_left":"مكانك محفوظ لمدة {time}.","pad_turn":"أدر الهاتف أفقيًا","join_game_label":"لعبة {host}","join_title":"انضم إلى لعبة صديق","join_title_body":"العب على PS5 الخاص بـ {host} كلاعب 2 أو 3 أو 4.","join_name_label":"اسمك","join_name_hint":"يرى صديقك هذا الاسم عندما تطلب الانضمام.","join_button":"انضمام"},"bn":{"usb_skipped_not_payload":"{name}: .elf বা .bin ফাইল নয়","usb_skipped_unknown":"{id}: আর পেলোড তালিকায় নেই","browser_unsupported":"এর জন্য ডেস্কটপ অ্যাপ দরকার। এটি ব্রাউজারে কাজ করে না।","video_recovered_notice":"গতবার ছবি শুরু করার সময় খেলুন ক্র্যাশ করেছিল, তাই ছবি এখন গ্রাফিক্স কার্ড ছাড়া ডিকোড হয় (বদলাতে সেটিংস › উইন্ডো › গ্রাফিক্স › হার্ডওয়্যার ভিডিও ডিকোডিং)।","video_recovered_title":"ছবি এখন সফটওয়্যারে ডিকোড হয়","open_in_title":"PS5Upload অ্যাপে খুলবেন?","open_in_body":"এই ডিভাইসে PS5Upload অ্যাপ আছে? সেখানে খুলুন, অথবা ব্রাউজারেই চালিয়ে যান।","open_in_app":"অ্যাপে খুলুন","open_in_browser":"ব্রাউজারে চালিয়ে যান","open_in_remember":"এই ডিভাইসে আমার পছন্দ মনে রাখুন","open_in_opening":"PS5Upload অ্যাপ খোলা হচ্ছে…","open_in_not_opened":"কিছু হলো না? হয়তো এই ডিভাইসে অ্যাপটি নেই।","open_in_again":"আবার চেষ্টা করুন","pad_8bitdo_no_xinput":"এই 8BitDo-তে X-input মোড নেই। কোনো বোতাম ভুল হলে কন্ট্রোলারটি পরীক্ষা করুন।","pad_8bitdo_how_switch":"পেছনের সুইচটি X-এ দিন, তারপর Start চাপুন","pad_8bitdo_how_startx":"এটি বন্ধ করুন, তারপর Start + X চেপে ধরে চালু করুন","pad_8bitdo_how_receiver":"এর 2.4G রিসিভার বা একটি USB কেবল ব্যবহার করুন","pad_8bitdo_how_manual":"এর ম্যানুয়ালে উপায় দেওয়া আছে","pad_8bitdo_xinput":"সেরা ফলের জন্য আপনার 8BitDo-কে X-input মোডে নিন: {how}।","rp_touch_left_stick":"বাম স্টিক","rp_touch_right_stick":"ডান স্টিক","rp_touch_touchpad":"টাচপ্যাড","rp_menu":"মেনু","rp_pad_step_lx":"বাম স্টিক ডানে ঠেলুন","rp_pad_step_ly":"বাম স্টিক নিচে ঠেলুন","rp_pad_step_rx":"ডান স্টিক ডানে ঠেলুন","rp_pad_step_ry":"ডান স্টিক নিচে ঠেলুন","join_check_bottom":"নিচের ফেস বোতামটি চাপুন (✕)","join_check_right":"ডান দিকের ফেস বোতামটি চাপুন (○)","join_check_left":"বাঁ দিকের ফেস বোতামটি চাপুন (□)","join_check_top":"উপরের ফেস বোতামটি চাপুন (△)","rp_pad_press":"{name} চাপুন","join_check_saved":"এই ডিভাইসে এই কন্ট্রোলারের জন্য সেভ হয়েছে। নিচে চেষ্টা করে দেখুন।","join_check_title":"আপনার কন্ট্রোলার পরীক্ষা করুন","join_done":"হয়ে গেছে","rp_pads_none":"এখনও কোনো কন্ট্রোলার দেখা যায়নি। একটি সংযুক্ত করে তার যেকোনো বোতাম চাপুন।","rp_pad_mapped":"আপনার ম্যাপিং দিয়ে খেলে","join_check_unknown":"এই কন্ট্রোলারটি আমাদের তালিকায় নেই, তাই এর বোতামগুলো এলোমেলো হতে পারে। সেট আপ করতে কয়েক সেকেন্ড লাগে।","rp_pad_standard":"শনাক্ত হয়েছে","rp_pad_progress":"{total}-এর মধ্যে {n}","rp_pad_skip":"এড়িয়ে যান","rp_pad_back":"পেছনে","rp_pad_cancel":"বাতিল","join_check_try":"বোতাম চাপুন ও স্টিক নাড়ান: যা চাপবেন তা জ্বলে উঠবে।","join_check_redo":"আবার করুন","join_check_map":"বোতাম সেট আপ করুন","rp_pad_reset":"রিসেট","join_open_lan_body":"ইন্টারনেট পাচ্ছেন না? বন্ধুর সাথে একই Wi-Fi-তে থাকলে সেখানেই গেমটি খুলুন।","join_open_lan":"এই Wi-Fi-তে খুলুন","join_path_lan":"হোম নেটওয়ার্ক","join_path_internet":"ইন্টারনেট","join_seat_taken":"{host}-এর নিজের কন্ট্রোলার ফেরত দরকার ছিল এবং PS5-এ আর কোনো কন্ট্রোলার খালি ছিল না, তাই আপনি গেম থেকে বেরিয়ে গেছেন। {host}-কে আবার ঢুকতে দিতে বলুন।","join_refused_key":"এই আমন্ত্রণের মেয়াদ শেষ। {host}-এর কাছে নতুন লিংক চান।","join_refused_expired":"গেমে আপনার জায়গা চলে গেছে। {host}-কে আবার ঢুকতে দিতে বলুন।","join_refused_full":"গেম পূর্ণ: ইতিমধ্যে চারজন খেলছে।","join_refused_denied":"{host} এবার আপনাকে ঢুকতে দেয়নি।","join_refused_no_answer":"{host} সময়মতো উত্তর দেননি। {host}-কে জানান, তারপর আবার চেষ্টা করুন।","join_refused_closed":"{host} এখন \"একসাথে খেলুন\" চালাচ্ছে না।","join_refused_old_helper":"\"একসাথে খেলুন\"-এর জন্য {host}-এর PS5-এ আপডেট করা হেল্পার দরকার।","join_refused_not_playing":"{host} এখন খেলছে না। {host}-কে আগে খেলা শুরু করতে বলুন।","join_refused_unreachable":"{host}-এর কম্পিউটার তাদের PS5-এ পৌঁছাতে পারেনি। একটু পরে আবার চেষ্টা করুন।","join_refused_slow_down":"অনেক বেশি ভুল কোড। এক মিনিট অপেক্ষা করে আবার চেষ্টা করুন।","join_refused_address":"এই লিঙ্কের ঠিকানা আপনার হোম নেটওয়ার্কের বাইরে, তাই অ্যাপ এটি ব্যবহার করবে না। {host}-এর কাছে তাঁর কম্পিউটারের IP ঠিকানা সহ একটি লিঙ্ক চান।","join_refused_other":"{host} আপনাকে ঢুকতে দেয়নি।","join_ended_kicked":"{host} আপনাকে গেম থেকে বের করে দিয়েছে।","join_ended_closed":"{host} \"একসাথে খেলুন\" বন্ধ করেছে।","join_ended_host_stopped":"হোস্ট খেলা বন্ধ করেছে।","join_ended_replaced":"এই গেমটি অন্য ট্যাব বা ডিভাইসে খোলা হয়েছে, তাই এখানে থেমে গেছে।","join_ended_pad_lost":"PS5 আপনার কন্ট্রোলার হারিয়েছে, তাই আপনি গেমের বাইরে। {host}-কে আবার ঢুকতে দিতে বলুন।","join_ended_gave_up":"{host}-এর সাথে সংযোগ সময়মতো ফিরে আসেনি।","join_net_lost":"{host}-এর সাথে সংযোগ কেটে গেছে। আপনার ইন্টারনেট সংযোগ দেখুন, তারপর আবার অনুরোধ করুন।","join_ended_lost":"{host}-এর কাছে পৌঁছানো যায়নি। আপনারা একই নেটওয়ার্কে আছেন কিনা দেখুন।","join_ended_left":"আপনি গেম ছেড়ে গেছেন।","join_net_mismatch":"এই লিংকটি হোস্টের সঙ্গে মেলে না; তাঁর কাছে নতুন লিংক চান।","join_net_no_direct":"এই নেটওয়ার্ক থেকে সরাসরি সংযোগ সম্ভব নয় (দুই দিকের রাউটারই কড়া)। মোবাইল ডেটার বদলে Wi-Fi চেষ্টা করুন, অথবা হোস্টকে UPnP চালু করতে বলুন।","join_net_no_room":"এই আমন্ত্রণটি আর খোলা নেই। {host}-এর কাছে নতুন লিংক চান।","join_net_full":"{host}-এর গেমে এখন আরেকজন বন্ধুর জায়গা নেই। একটু পরে আবার চেষ্টা করুন।","join_net_no_hub":"PS5Upload আমন্ত্রণ পরিষেবায় পৌঁছানো যায়নি। ইন্টারনেট সংযোগ দেখে আবার চেষ্টা করুন।","join_net_offer":"{host}-এর কম্পিউটার এই ব্রাউজারের সঙ্গে সংযোগ করতে পারেনি। অন্য ব্রাউজার চেষ্টা করুন।","join_net_no_webrtc":"এই ব্রাউজার সরাসরি সংযোগ করতে পারে না। Chrome, Safari বা Firefox-এর নতুন সংস্করণ চেষ্টা করুন।","join_cancel":"বাতিল","join_host_fallback":"আপনার বন্ধু","join_connecting":"{host}-এর সাথে সংযোগ হচ্ছে…","join_waiting":"{host} আপনাকে ঢুকতে দেওয়ার অপেক্ষায়","join_waiting_body":"{host} তার স্ক্রিনে আপনার নাম দেখে \"অনুমতি দিন\" চাপবে।","join_retry":"আবার চেষ্টা করুন","join_again":"আবার যোগ দিতে অনুরোধ করুন","join_playing_at":"{host}-এর কাছে খেলছেন","join_you_are":"আপনি প্লেয়ার {n}","join_seat_stream":"আপনি {host}-এর PS5 ইউজার হিসেবে খেলছেন। ইউজার বাছার দরকার নেই।","join_plays_as":"আপনি {profile} হিসেবে খেলছেন। কাউকে বেছে নিতে হবে না।","join_seat_tv_asks":"{host} আপনার জন্য একটি প্রোফাইল বেছে রেখেছিল, কিন্তু সেটা ব্যবহার করা যায়নি। টিভি জিজ্ঞেস করবে আপনি কে।","join_picking":"PS চাপুন, তারপর টিভিতে দ্রুত খেলা বেছে নিন","join_hide_controls":"লুকান","join_sound":"শব্দের জন্য ট্যাপ করুন","rp_unmute":"শব্দ চালু","rp_mute":"নিঃশব্দ","join_no_sound":"এই ব্রাউজারে শব্দ নেই","join_exit_fullscreen":"ফুল স্ক্রিন থেকে বের হন","pad_fill":"পূর্ণ স্ক্রিন","join_leave":"ছেড়ে যান","join_show_controls":"নিয়ন্ত্রণগুলি দেখান","join_hold_hint":"বোতামগুলো দেখাতে ছবিতে চেপে ধরে রাখুন","pad_watch_no_hevc":"এই ডিভাইস এই স্ট্রিমের ছবি চালাতে পারে না: কম্পিউটার HEVC-তে স্ট্রিম করে, আর এই ডিভাইস শুধু H.264 চালায়।","pad_watch_decode":"ছবিটি এখানে চালানো যায়নি।","join_pad_ready":"আপনার কন্ট্রোলার প্রস্তুত","join_check_unknown_short":"আমাদের তালিকায় নেই: বোতামগুলো এলোমেলো হতে পারে।","join_full_to_play":"অন-স্ক্রিন কন্ট্রোলার দিয়ে খেলতে ফুল স্ক্রিনে ট্যাপ করুন।","join_pad_none":"একটি কন্ট্রোলার সংযুক্ত করুন (USB বা Bluetooth) এবং যেকোনো বোতাম চাপুন।","join_pad_keys":"অথবা কিবোর্ড ব্যবহার করুন: WASD নড়াচড়া, তীর চিহ্ন D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options।","join_tv_back_hint":"বোতামগুলো দেখতে রিমোটে Back চাপুন।","join_block_note":"{host} বন্ধুদের জন্য PS ও Create বন্ধ করে রেখেছে।","join_guide_title":"টিভিতে আর একটি ধাপ","join_guide_body":"আপনার কন্ট্রোলারে একবার PS চাপুন। টিভি জিজ্ঞেস করবে \"এই কন্ট্রোলার কে ব্যবহার করছে?\"। দ্রুত খেলা বা নিজের ইউজার বেছে নিন। হোস্টকে কিছু করতে হবে না।","join_guide_menus":"PS5-এর হোম স্ক্রিনে শুধু হোস্ট মেনু চালাতে পারে; আপনার কন্ট্রোলার গেমের ভেতরে খেলে।","join_guide_ok":"বুঝেছি","join_host_away":"হোস্ট খেলা বন্ধ করেছে — আবার শুরু করার অপেক্ষায় ({time})","join_reconnecting":"আবার সংযোগ হচ্ছে…","join_reconnecting_left":"আপনার জায়গা {time} ধরে রাখা থাকবে।","pad_turn":"ফোনটি আড়াআড়ি ঘোরান","join_game_label":"{host}-এর গেম","join_title":"বন্ধুর গেমে যোগ দিন","join_title_body":"{host}-এর PS5-এ প্লেয়ার 2, 3 বা 4 হিসেবে খেলুন।","join_name_label":"আপনার নাম","join_name_hint":"যোগ দিতে অনুরোধ করলে আপনার বন্ধু এটি দেখবে।","join_button":"যোগ দিন"},"de":{"usb_skipped_not_payload":"{name}: keine .elf- oder .bin-Datei","usb_skipped_unknown":"{id}: nicht mehr in der Payload-Liste","browser_unsupported":"Dafür brauchst du die Desktop-App. Im Browser funktioniert das nicht.","video_recovered_notice":"Play ist beim letzten Mal beim Starten des Bildes abgestürzt, daher wird das Bild jetzt ohne Grafikkarte dekodiert (ändern unter Einstellungen › Fenster › Grafik › Hardware-Videodekodierung).","video_recovered_title":"Bild wird jetzt per Software dekodiert","open_in_title":"In der PS5Upload-App öffnen?","open_in_body":"Hast du die PS5Upload-App auf diesem Gerät? Öffne dies dort oder mach im Browser weiter.","open_in_app":"In der App öffnen","open_in_browser":"Im Browser weiter","open_in_remember":"Meine Wahl auf diesem Gerät merken","open_in_opening":"PS5Upload-App wird geöffnet …","open_in_not_opened":"Nichts passiert? Die App ist vielleicht nicht auf diesem Gerät.","open_in_again":"Erneut versuchen","pad_8bitdo_no_xinput":"Dieser 8BitDo hat keinen X-input-Modus. Wenn eine Taste falsch ist, prüfe den Controller.","pad_8bitdo_how_switch":"stell den Schalter auf der Rückseite auf X und drück dann Start","pad_8bitdo_how_startx":"schalte ihn aus und halte dann Start + X gedrückt, um ihn einzuschalten","pad_8bitdo_how_receiver":"nutze seinen 2.4G-Empfänger oder ein USB-Kabel","pad_8bitdo_how_manual":"wie, steht in seiner Anleitung","pad_8bitdo_xinput":"Für das beste Ergebnis schalte deinen 8BitDo in den X-input-Modus: {how}.","rp_touch_left_stick":"Linker Stick","rp_touch_right_stick":"Rechter Stick","rp_menu":"Menü","rp_pad_step_lx":"Drücke den linken Stick nach rechts","rp_pad_step_ly":"Drücke den linken Stick nach unten","rp_pad_step_rx":"Drücke den rechten Stick nach rechts","rp_pad_step_ry":"Drücke den rechten Stick nach unten","join_check_bottom":"Drück die untere Aktionstaste (✕)","join_check_right":"Drück die rechte Aktionstaste (○)","join_check_left":"Drück die linke Aktionstaste (□)","join_check_top":"Drück die obere Aktionstaste (△)","rp_pad_press":"Drücke {name}","join_check_saved":"Für diesen Controller auf diesem Gerät gespeichert. Probier es unten aus.","join_check_title":"Controller prüfen","join_done":"Fertig","rp_pads_none":"Noch kein Controller erkannt. Schließe einen an und drücke eine beliebige Taste darauf.","rp_pad_mapped":"Spielt mit deiner Belegung","join_check_unknown":"Dieser Controller ist nicht auf unserer Liste, die Tasten könnten also vertauscht sein. Das Einrichten dauert nur ein paar Sekunden.","rp_pad_standard":"Erkannt","rp_pad_progress":"{n} von {total}","rp_pad_skip":"Überspringen","rp_pad_back":"Zurück","rp_pad_cancel":"Abbrechen","join_check_try":"Drück Tasten und beweg die Sticks: Was du drückst, leuchtet auf.","join_check_redo":"Neu einrichten","join_check_map":"Tasten einrichten","rp_pad_reset":"Zurücksetzen","join_open_lan_body":"Kein Internet? Wenn du im selben WLAN wie dein Freund bist, öffne das Spiel dort.","join_open_lan":"In diesem WLAN öffnen","join_path_lan":"Heimnetz","join_seat_taken":"{host} brauchte seinen Controller zurück, und auf der PS5 war kein anderer Controller frei, daher bist du aus dem Spiel. Bitte {host}, dich wieder hereinzulassen.","join_refused_key":"Diese Einladung ist abgelaufen. Bitte {host} um einen neuen Link.","join_refused_expired":"Dein Platz im Spiel ist verloren. Bitte {host}, dich wieder hereinzulassen.","join_refused_full":"Das Spiel ist voll: Es sind schon vier Spieler da.","join_refused_denied":"{host} hat dich diesmal nicht reingelassen.","join_refused_no_answer":"{host} hat nicht rechtzeitig geantwortet. Sag {host} Bescheid und versuche es noch einmal.","join_refused_closed":"{host} bietet gerade kein „Zusammen spielen“ an.","join_refused_old_helper":"Die PS5 von {host} braucht einen aktuellen Helfer für „Zusammen spielen“.","join_refused_not_playing":"{host} spielt gerade nicht. Bitte {host}, zuerst Spielen zu starten.","join_refused_unreachable":"Der Computer von {host} hat die PS5 nicht erreicht. Versuch es gleich noch einmal.","join_refused_slow_down":"Zu viele falsche Codes. Warte eine Minute und versuch es dann noch einmal.","join_refused_address":"Die Adresse dieses Links liegt außerhalb deines Heimnetzes, daher verwendet die App sie nicht. Bitte {host} um einen Link mit der IP-Adresse des Computers.","join_refused_other":"{host} hat dich nicht reingelassen.","join_ended_kicked":"{host} hat dich aus dem Spiel genommen.","join_ended_closed":"{host} hat „Zusammen spielen“ beendet.","join_ended_host_stopped":"Der Gastgeber hat aufgehört zu spielen.","join_ended_replaced":"Dieses Spiel wurde in einem anderen Tab oder auf einem anderen Gerät geöffnet, daher wurde es hier beendet.","join_ended_pad_lost":"Die PS5 hat deinen Controller verloren, daher bist du aus dem Spiel. Bitte {host}, dich wieder hereinzulassen.","join_ended_gave_up":"Die Verbindung zu {host} kam nicht rechtzeitig zurück.","join_net_lost":"Die Verbindung zu {host} ist abgebrochen. Prüfe deine Internetverbindung und frage dann erneut.","join_ended_lost":"{host} nicht erreichbar. Prüfe, ob ihr im selben Netzwerk seid.","join_ended_left":"Du hast das Spiel verlassen.","join_net_mismatch":"Dieser Link passt nicht zum Gastgeber. Bitte ihn um einen neuen.","join_net_no_direct":"Von diesem Netzwerk aus ist keine direkte Verbindung möglich (die Router beider Seiten sind streng). Versuche WLAN statt mobiler Daten oder bitte den Gastgeber, UPnP einzuschalten.","join_net_no_room":"Diese Einladung ist nicht mehr offen. Bitte {host} um einen neuen Link.","join_net_full":"Im Spiel von {host} ist gerade kein Platz für einen weiteren Freund. Versuche es gleich noch einmal.","join_net_no_hub":"Der Einladungsdienst von PS5Upload ist nicht erreichbar. Prüfe deine Internetverbindung und versuche es dann erneut.","join_net_offer":"Der Computer von {host} konnte sich nicht mit diesem Browser verbinden. Versuche einen anderen Browser.","join_net_no_webrtc":"Dieser Browser kann keine direkten Verbindungen herstellen. Versuche ein aktuelles Chrome, Safari oder Firefox.","join_cancel":"Abbrechen","join_host_fallback":"dein Freund","join_connecting":"Verbinde mit {host}…","join_waiting":"Warte, bis {host} dich reinlässt","join_waiting_body":"{host} sieht deinen Namen auf dem Bildschirm und tippt auf „Zulassen“.","join_retry":"Erneut versuchen","join_again":"Erneut zum Mitspielen anfragen","join_playing_at":"Du spielst bei {host}","join_you_are":"Du bist Spieler {n}","join_seat_stream":"Du spielst als PS5-Benutzer von {host}. Du musst keinen wählen.","join_plays_as":"Du spielst als {profile}. Du musst keinen wählen.","join_seat_tv_asks":"{host} hat ein Profil für dich gewählt, aber es konnte nicht genutzt werden. Der Fernseher fragt, wer du bist.","join_picking":"PS drücken, dann am Fernseher „Schnellspiel“ wählen","join_hide_controls":"Ausblenden","join_sound":"Für Ton tippen","rp_unmute":"Ton an","rp_mute":"Stumm","join_no_sound":"Kein Ton in diesem Browser","join_exit_fullscreen":"Vollbild verlassen","pad_fill":"Vollbild","join_leave":"Verlassen","join_show_controls":"Steuerelemente einblenden","join_hold_hint":"Bild gedrückt halten, um die Tasten einzublenden","pad_watch_no_hevc":"Dieses Gerät kann das Bild dieses Streams nicht abspielen: Der Computer streamt HEVC, dieses Gerät kann nur H.264.","pad_watch_decode":"Das Bild konnte hier nicht abgespielt werden.","join_pad_ready":"Dein Controller ist bereit","join_check_unknown_short":"Nicht auf unserer Liste: Tasten könnten vertauscht sein.","join_full_to_play":"Tippe auf Vollbild, um mit dem Bildschirm-Controller zu spielen.","join_pad_none":"Schließe einen Controller an (USB oder Bluetooth) und drücke eine beliebige Taste.","join_pad_keys":"Oder nutze die Tastatur: WASD bewegen, Pfeiltasten Steuerkreuz, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Drücke auf der Fernbedienung Zurück, um die Schaltflächen einzublenden.","join_block_note":"{host} hat PS und Create für Freunde ausgeschaltet.","join_guide_title":"Noch ein Schritt am Fernseher","join_guide_body":"Drücke einmal PS auf deinem Controller. Der Fernseher fragt „Wer benutzt diesen Controller?“. Wähle „Schnellspiel“ oder deinen eigenen Benutzer. Der Gastgeber muss nichts tun.","join_guide_menus":"Auf dem Startbildschirm der PS5 steuert nur der Gastgeber die Menüs; dein Controller spielt in den Spielen.","join_guide_ok":"Verstanden","join_host_away":"Der Gastgeber hat aufgehört zu spielen – wir warten, bis er wieder anfängt ({time})","join_reconnecting":"Verbinde neu…","join_reconnecting_left":"Dein Platz wird {time} lang freigehalten.","pad_turn":"Dreh das Handy quer","join_game_label":"Spiel von {host}","join_title":"Bei Freunden mitspielen","join_title_body":"Spiele auf der PS5 von {host} als Spieler 2, 3 oder 4.","join_name_label":"Dein Name","join_name_hint":"Das sieht dein Freund, wenn du zum Mitspielen anfragst.","join_button":"Mitspielen"},"en":{"usb_skipped_not_payload":"{name}: not an .elf or .bin file","usb_skipped_unknown":"{id}: not in the payload list any more","browser_unsupported":"This needs the desktop app. It does not work in the browser.","video_recovered_notice":"Play crashed while starting the picture last time, so the picture is now decoded without the graphics card (Settings › Window › Graphics › Hardware video decoding to change it).","video_recovered_title":"Picture now decoded in software","open_in_title":"Open in the PS5Upload app?","open_in_body":"Have the PS5Upload app on this device? Open this there, or carry on in the browser.","open_in_app":"Open in the app","open_in_browser":"Continue in browser","open_in_remember":"Remember my choice on this device","open_in_opening":"Opening the PS5Upload app…","open_in_not_opened":"Nothing happened? The app may not be on this device.","open_in_again":"Try again","pad_8bitdo_no_xinput":"This 8BitDo has no X-input mode. If a button is wrong, check the controller.","pad_8bitdo_how_switch":"set the switch on the back to X, then press Start","pad_8bitdo_how_startx":"turn it off, then hold Start + X to turn it on","pad_8bitdo_how_receiver":"use its 2.4G receiver or a USB cable","pad_8bitdo_how_manual":"its manual says how","pad_8bitdo_xinput":"For the best result, switch your 8BitDo to X-input mode: {how}.","rp_touch_left_stick":"Left stick","rp_touch_right_stick":"Right stick","rp_touch_touchpad":"Touchpad","rp_menu":"Menu","rp_pad_step_lx":"Push the left stick right","rp_pad_step_ly":"Push the left stick down","rp_pad_step_rx":"Push the right stick right","rp_pad_step_ry":"Push the right stick down","join_check_bottom":"Press the bottom face button (✕)","join_check_right":"Press the right face button (○)","join_check_left":"Press the left face button (□)","join_check_top":"Press the top face button (△)","rp_pad_press":"Press {name}","join_check_saved":"Saved for this controller on this device. Try it below.","join_check_title":"Check your controller","join_done":"Done","rp_pads_none":"No controller seen yet. Connect one and press any button on it.","rp_pad_mapped":"Plays with your mapping","join_check_unknown":"This controller isn't on our list, so its buttons may be mixed up. Setting it up takes a few seconds.","rp_pad_standard":"Recognized","rp_pad_progress":"{n} of {total}","rp_pad_skip":"Skip","rp_pad_back":"Back","rp_pad_cancel":"Cancel","join_check_try":"Press buttons and move the sticks: what you press lights up.","join_check_redo":"Redo","join_check_map":"Set up the buttons","rp_pad_reset":"Reset","join_open_lan_body":"Can't reach the internet? If you're on the same Wi-Fi as your friend, open the game there.","join_open_lan":"Open on this Wi-Fi","join_path_lan":"Home network","join_path_tailscale":"Tailscale","join_path_internet":"Internet","join_seat_taken":"{host} needed their controller back and no other controller was free on the PS5, so you're out of the game. Ask {host} to let you in again.","join_refused_key":"This invite has expired. Ask {host} for a new link.","join_refused_expired":"Your place in the game was lost. Ask {host} to let you in again.","join_refused_full":"The game is full: four players already.","join_refused_denied":"{host} didn't let you in this time.","join_refused_no_answer":"{host} didn't answer in time. Tell {host}, then try again.","join_refused_closed":"{host} isn't hosting Play Together right now.","join_refused_old_helper":"{host}'s PS5 needs an updated helper for Play Together.","join_refused_not_playing":"{host} isn't playing right now. Ask {host} to start Play first.","join_refused_unreachable":"{host}'s computer couldn't reach their PS5. Try again in a moment.","join_refused_slow_down":"Too many wrong codes. Wait a minute, then try again.","join_refused_address":"This link's address is outside your home network, so the app will not use it. Ask {host} for a link with their computer's IP address.","join_refused_other":"{host} didn't let you in.","join_ended_kicked":"{host} took you out of the game.","join_ended_closed":"{host} closed Play Together.","join_ended_host_stopped":"The host stopped playing.","join_ended_replaced":"This game was opened in another tab or on another device, so it stopped here.","join_ended_pad_lost":"The PS5 lost your controller, so you're out of the game. Ask {host} to let you in again.","join_ended_gave_up":"The connection to {host} didn't come back in time.","join_net_lost":"The connection to {host} dropped. Check your internet connection, then ask again.","join_ended_lost":"Couldn't reach {host}. Check that you're on the same network.","join_ended_left":"You left the game.","join_net_mismatch":"This link doesn't match the host; ask them for a new one.","join_net_no_direct":"A direct connection isn't possible from this network (both sides' routers are strict). Try Wi-Fi instead of mobile data, or ask the host to turn on UPnP.","join_net_no_room":"This invite isn't open any more. Ask {host} for a new link.","join_net_full":"{host}'s game has no room for another friend right now. Try again in a moment.","join_net_no_hub":"Couldn't reach the PS5Upload invite service. Check your internet connection, then try again.","join_net_offer":"{host}'s computer couldn't connect to this browser. Try another browser.","join_net_no_webrtc":"This browser can't make direct connections. Try a recent Chrome, Safari or Firefox.","join_cancel":"Cancel","join_host_fallback":"your friend","join_connecting":"Connecting to {host}…","join_waiting":"Waiting for {host} to let you in","join_waiting_body":"{host} sees your name on their screen and taps Allow.","join_retry":"Try again","join_again":"Ask to join again","join_playing_at":"Playing at {host}'s","join_you_are":"You are Player {n}","join_seat_stream":"You're playing as {host}'s PS5 user. No need to pick one.","join_plays_as":"You're playing as {profile}. No need to pick one.","join_seat_tv_asks":"{host} chose a profile for you, but it couldn't be used. The TV will ask who you are.","join_picking":"Press PS, then pick Quick Play on the TV","join_hide_controls":"Hide","join_sound":"Tap for sound","rp_unmute":"Sound on","rp_mute":"Mute","join_no_sound":"No sound in this browser","join_exit_fullscreen":"Leave full screen","pad_fill":"Full screen","join_leave":"Leave","join_show_controls":"Show controls","join_hold_hint":"Press and hold the picture to show the buttons","pad_watch_no_hevc":"This device can't play this stream's picture: the computer streams HEVC, and this device plays only H.264.","pad_watch_decode":"The picture could not be played here.","join_pad_ready":"Your controller is ready","join_check_unknown_short":"Not on our list: buttons may be mixed up.","join_full_to_play":"Tap full screen to play with the on-screen controller.","join_pad_none":"Connect a controller (USB or Bluetooth) and press any button.","join_pad_keys":"Or use the keyboard: WASD move, arrows D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Press Back on the remote for the buttons.","join_block_note":"{host} turned off PS and Create for friends.","join_guide_title":"One more step on the TV","join_guide_body":"On your controller, press PS once. The TV asks \"Who's using this controller?\". Pick Quick Play or your own user. The host doesn't need to do anything.","join_guide_menus":"On the PS5's home screen only the host controls the menus; your controller plays inside games.","join_guide_ok":"Got it","join_host_away":"The host stopped playing — waiting for them to start again ({time})","join_reconnecting":"Reconnecting…","join_reconnecting_left":"Your place is kept for {time}.","pad_turn":"Turn the phone sideways","join_game_label":"{host}'s game","join_title":"Join a friend's game","join_title_body":"Play on {host}'s PS5 as Player 2, 3 or 4.","join_name_label":"Your name","join_name_hint":"Your friend sees this when you ask to join.","join_button":"Join"},"es":{"usb_skipped_not_payload":"{name}: no es un archivo .elf ni .bin","usb_skipped_unknown":"{id}: ya no está en la lista de payloads","browser_unsupported":"Esto necesita la aplicación de escritorio. No funciona en el navegador.","video_recovered_notice":"Play se cerró al iniciar la imagen la última vez, así que ahora la imagen se decodifica sin la tarjeta gráfica (cámbialo en Configuración › Ventana › Gráficos › Decodificación de vídeo por hardware).","video_recovered_title":"La imagen ahora se decodifica por software","open_in_title":"¿Abrir en la app PS5Upload?","open_in_body":"¿Tienes la app PS5Upload en este dispositivo? Ábrelo ahí o sigue en el navegador.","open_in_app":"Abrir en la app","open_in_browser":"Seguir en el navegador","open_in_remember":"Recordar mi elección en este dispositivo","open_in_opening":"Abriendo la app PS5Upload…","open_in_not_opened":"¿No pasó nada? Puede que la app no esté en este dispositivo.","open_in_again":"Reintentar","pad_8bitdo_no_xinput":"Este 8BitDo no tiene modo X-input. Si un botón no va bien, comprueba el mando.","pad_8bitdo_how_switch":"pon el interruptor de atrás en X y pulsa Start","pad_8bitdo_how_startx":"apágalo y luego mantén Start + X para encenderlo","pad_8bitdo_how_receiver":"usa su receptor 2.4G o un cable USB","pad_8bitdo_how_manual":"su manual explica cómo","pad_8bitdo_xinput":"Para el mejor resultado, pon tu 8BitDo en modo X-input: {how}.","rp_touch_left_stick":"Joystick izquierdo","rp_touch_right_stick":"Joystick derecho","rp_touch_touchpad":"Panel táctil","rp_menu":"Menú","rp_pad_step_lx":"Mueve el stick izquierdo a la derecha","rp_pad_step_ly":"Mueve el stick izquierdo hacia abajo","rp_pad_step_rx":"Mueve el stick derecho a la derecha","rp_pad_step_ry":"Mueve el stick derecho hacia abajo","join_check_bottom":"Pulsa el botón de acción de abajo (✕)","join_check_right":"Pulsa el botón de acción de la derecha (○)","join_check_left":"Pulsa el botón de acción de la izquierda (□)","join_check_top":"Pulsa el botón de acción de arriba (△)","rp_pad_press":"Pulsa {name}","join_check_saved":"Guardado para este mando en este dispositivo. Pruébalo abajo.","join_check_title":"Comprueba tu mando","join_done":"Listo","rp_pads_none":"Aún no se ve ningún mando. Conecta uno y pulsa cualquier botón.","rp_pad_mapped":"Juega con tu asignación","join_check_unknown":"Este mando no está en nuestra lista, así que sus botones pueden estar cambiados. Configurarlo lleva unos segundos.","rp_pad_standard":"Reconocido","rp_pad_progress":"{n} de {total}","rp_pad_skip":"Omitir","rp_pad_back":"Atrás","rp_pad_cancel":"Cancelar","join_check_try":"Pulsa botones y mueve los sticks: lo que pulses se ilumina.","join_check_redo":"Rehacer","join_check_map":"Configurar los botones","rp_pad_reset":"Restablecer","join_open_lan_body":"¿Sin internet? Si estás en el mismo Wi-Fi que tu amigo, abre la partida desde ahí.","join_open_lan":"Abrir en este Wi-Fi","join_path_lan":"Red doméstica","join_seat_taken":"{host} necesitaba recuperar su mando y no había otro mando libre en la PS5, así que has salido de la partida. Pide a {host} que te deje entrar otra vez.","join_refused_key":"Esta invitación ha caducado. Pide a {host} un enlace nuevo.","join_refused_expired":"Perdiste tu sitio en la partida. Pide a {host} que te deje entrar de nuevo.","join_refused_full":"La partida está llena: ya hay cuatro jugadores.","join_refused_denied":"{host} no te dejó entrar esta vez.","join_refused_no_answer":"{host} no respondió a tiempo. Avisa a {host} e inténtalo de nuevo.","join_refused_closed":"{host} no está ofreciendo Jugar juntos ahora mismo.","join_refused_old_helper":"La PS5 de {host} necesita un ayudante actualizado para Jugar juntos.","join_refused_not_playing":"{host} no está jugando ahora. Pide a {host} que inicie Jugar primero.","join_refused_unreachable":"El ordenador de {host} no pudo conectar con su PS5. Inténtalo de nuevo en un momento.","join_refused_slow_down":"Demasiados códigos incorrectos. Espera un minuto y vuelve a intentarlo.","join_refused_address":"La dirección de este enlace está fuera de tu red doméstica, así que la aplicación no la usará. Pide a {host} un enlace con la dirección IP de su equipo.","join_refused_other":"{host} no te dejó entrar.","join_ended_kicked":"{host} te sacó de la partida.","join_ended_closed":"{host} cerró Jugar juntos.","join_ended_host_stopped":"El anfitrión dejó de jugar.","join_ended_replaced":"Esta partida se abrió en otra pestaña o en otro dispositivo, así que terminó aquí.","join_ended_pad_lost":"La PS5 perdió tu mando, así que estás fuera de la partida. Pide a {host} que te deje entrar de nuevo.","join_ended_gave_up":"La conexión con {host} no volvió a tiempo.","join_net_lost":"Se cortó la conexión con {host}. Revisa tu conexión a internet y vuelve a pedirlo.","join_ended_lost":"No se pudo contactar con {host}. Comprueba que estéis en la misma red.","join_ended_left":"Saliste de la partida.","join_net_mismatch":"Este enlace no coincide con el anfitrión; pídele uno nuevo.","join_net_no_direct":"No es posible una conexión directa desde esta red (los routers de ambos lados son estrictos). Prueba con Wi-Fi en lugar de datos móviles o pide al anfitrión que active UPnP.","join_net_no_room":"Esta invitación ya no está abierta. Pide a {host} un enlace nuevo.","join_net_full":"La partida de {host} no tiene sitio para otro amigo ahora mismo. Inténtalo de nuevo en un momento.","join_net_no_hub":"No se pudo contactar con el servicio de invitaciones de PS5Upload. Comprueba tu conexión a internet e inténtalo de nuevo.","join_net_offer":"El ordenador de {host} no pudo conectar con este navegador. Prueba con otro navegador.","join_net_no_webrtc":"Este navegador no puede hacer conexiones directas. Prueba una versión reciente de Chrome, Safari o Firefox.","join_cancel":"Cancelar","join_host_fallback":"tu amigo","join_connecting":"Conectando con {host}…","join_waiting":"Esperando a que {host} te deje entrar","join_waiting_body":"{host} ve tu nombre en su pantalla y toca Permitir.","join_retry":"Reintentar","join_again":"Pedir unirme otra vez","join_playing_at":"Jugando en casa de {host}","join_you_are":"Eres el Jugador {n}","join_seat_stream":"Juegas con el usuario de PS5 de {host}. No hace falta elegir uno.","join_plays_as":"Juegas como {profile}. No hace falta elegir uno.","join_seat_tv_asks":"{host} eligió un perfil para ti, pero no se pudo usar. La TV te preguntará quién eres.","join_picking":"Pulsa PS y luego elige Juego rápido en la tele","join_hide_controls":"Ocultar","join_sound":"Activar sonido","rp_unmute":"Activar sonido","rp_mute":"Silenciar","join_no_sound":"Sin sonido en este navegador","join_exit_fullscreen":"Salir de pantalla completa","pad_fill":"Pantalla completa","join_leave":"Salir","join_show_controls":"Mostrar controles","join_hold_hint":"Mantén pulsada la imagen para mostrar los botones","pad_watch_no_hevc":"Este dispositivo no puede reproducir la imagen de este stream: el ordenador emite en HEVC y este dispositivo solo reproduce H.264.","pad_watch_decode":"La imagen no se pudo reproducir aquí.","join_pad_ready":"Tu mando está listo","join_check_unknown_short":"No está en nuestra lista: los botones pueden estar cambiados.","join_full_to_play":"Toca pantalla completa para jugar con el mando en pantalla.","join_pad_none":"Conecta un mando (USB o Bluetooth) y pulsa cualquier botón.","join_pad_keys":"O usa el teclado: WASD para moverte, flechas cruceta, Enter ✕, Retroceso ○, Q □, E △, Tab Options.","join_tv_back_hint":"Pulsa Atrás en el mando a distancia para ver los botones.","join_block_note":"{host} desactivó PS y Create para los amigos.","join_guide_title":"Un paso más en la tele","join_guide_body":"Pulsa PS una vez en tu mando. La tele pregunta «¿Quién usa este mando?». Elige Juego rápido o tu propio usuario. El anfitrión no tiene que hacer nada.","join_guide_menus":"En la pantalla de inicio de la PS5 solo el anfitrión controla los menús; tu mando juega dentro de los juegos.","join_guide_ok":"Entendido","join_host_away":"El anfitrión dejó de jugar: esperando a que vuelva a empezar ({time})","join_reconnecting":"Reconectando…","join_reconnecting_left":"Tu sitio se guarda durante {time}.","pad_turn":"Gira el móvil en horizontal","join_game_label":"Partida de {host}","join_title":"Unirse a la partida de un amigo","join_title_body":"Juega en la PS5 de {host} como Jugador 2, 3 o 4.","join_name_label":"Tu nombre","join_name_hint":"Tu amigo lo verá cuando pidas unirte.","join_button":"Unirme"},"fa":{"usb_skipped_not_payload":"{name}: فایل .elf یا .bin نیست","usb_skipped_unknown":"{id}: دیگر در فهرست پیلودها نیست","browser_unsupported":"این کار به برنامه رومیزی نیاز دارد. در مرورگر کار نمی‌کند.","video_recovered_notice":"دفعهٔ پیش «بازی» هنگام شروع تصویر از کار افتاد، پس تصویر اکنون بدون کارت گرافیک رمزگشایی می‌شود (برای تغییر: تنظیمات › پنجره › گرافیک › رمزگشایی ویدیو با سخت‌افزار).","video_recovered_title":"تصویر اکنون با نرم‌افزار رمزگشایی می‌شود","open_in_title":"در برنامهٔ PS5Upload باز شود؟","open_in_body":"برنامهٔ PS5Upload روی این دستگاه هست؟ این را آنجا باز کنید، یا در مرورگر ادامه دهید.","open_in_app":"باز کردن در برنامه","open_in_browser":"ادامه در مرورگر","open_in_remember":"انتخابم را روی این دستگاه به خاطر بسپار","open_in_opening":"در حال باز کردن برنامهٔ PS5Upload…","open_in_not_opened":"اتفاقی نیفتاد؟ شاید برنامه روی این دستگاه نیست.","open_in_again":"دوباره امتحان کنید","pad_8bitdo_no_xinput":"این 8BitDo حالت X-input ندارد. اگر دکمه‌ای اشتباه است، کنترلر را بررسی کنید.","pad_8bitdo_how_switch":"کلید پشت را روی X بگذارید، سپس Start را بزنید","pad_8bitdo_how_startx":"آن را خاموش کنید، سپس Start + X را نگه دارید تا روشن شود","pad_8bitdo_how_receiver":"از گیرنده 2.4G آن یا کابل USB استفاده کنید","pad_8bitdo_how_manual":"دفترچه راهنمای آن روش را می‌گوید","pad_8bitdo_xinput":"برای بهترین نتیجه، 8BitDo خود را به حالت X-input ببرید: {how}.","rp_touch_left_stick":"استیک چپ","rp_touch_right_stick":"استیک راست","rp_touch_touchpad":"صفحه لمسی","rp_menu":"منو","rp_pad_step_lx":"استیک چپ را به راست فشار دهید","rp_pad_step_ly":"استیک چپ را به پایین فشار دهید","rp_pad_step_rx":"استیک راست را به راست فشار دهید","rp_pad_step_ry":"استیک راست را به پایین فشار دهید","join_check_bottom":"دکمهٔ پایینی را بزنید (✕)","join_check_right":"دکمهٔ سمت راست را بزنید (○)","join_check_left":"دکمهٔ سمت چپ را بزنید (□)","join_check_top":"دکمهٔ بالایی را بزنید (△)","rp_pad_press":"{name} را فشار دهید","join_check_saved":"برای این کنترلر روی این دستگاه ذخیره شد. پایین امتحانش کنید.","join_check_title":"کنترلر خود را بررسی کنید","join_done":"تمام","rp_pads_none":"هنوز دسته‌ای دیده نشده. یکی وصل کنید و یکی از دکمه‌هایش را فشار دهید.","rp_pad_mapped":"با نگاشت شما بازی می‌کند","join_check_unknown":"این کنترلر در فهرست ما نیست، پس ممکن است دکمه‌هایش جابه‌جا باشند. تنظیم آن چند ثانیه طول می‌کشد.","rp_pad_standard":"شناخته شد","rp_pad_progress":"{n} از {total}","rp_pad_skip":"رد کردن","rp_pad_back":"بازگشت","rp_pad_cancel":"لغو","join_check_try":"دکمه‌ها را بزنید و استیک‌ها را حرکت دهید: هر چه بزنید روشن می‌شود.","join_check_redo":"انجام دوباره","join_check_map":"تنظیم دکمه‌ها","rp_pad_reset":"بازنشانی","join_open_lan_body":"به اینترنت دسترسی ندارید؟ اگر با دوستتان روی یک Wi-Fi هستید، بازی را آنجا باز کنید.","join_open_lan":"باز کردن روی همین Wi-Fi","join_path_lan":"شبکهٔ خانگی","join_path_internet":"اینترنت","join_seat_taken":"{host} دستهٔ خودش را لازم داشت و دستهٔ آزاد دیگری روی PS5 نبود، پس از بازی بیرون رفتید. از {host} بخواهید دوباره راهتان بدهد.","join_refused_key":"این دعوت منقضی شده است. از {host} پیوند جدید بخواهید.","join_refused_expired":"جای شما در بازی از دست رفت. از {host} بخواهید دوباره راهتان بدهد.","join_refused_full":"بازی پر است: چهار بازیکن از قبل هستند.","join_refused_denied":"{host} این بار اجازهٔ ورود نداد.","join_refused_no_answer":"{host} به‌موقع پاسخ نداد. به {host} خبر دهید و دوباره امتحان کنید.","join_refused_closed":"{host} الان «بازی با هم» را میزبانی نمی‌کند.","join_refused_old_helper":"PS5 {host} برای «بازی با هم» به دستیار به‌روز نیاز دارد.","join_refused_not_playing":"{host} الان بازی نمی‌کند. از {host} بخواهید اول بازی را شروع کند.","join_refused_unreachable":"رایانهٔ {host} به PS5 دسترسی پیدا نکرد. کمی بعد دوباره امتحان کنید.","join_refused_slow_down":"تعداد کدهای اشتباه زیاد است. یک دقیقه صبر کنید و دوباره امتحان کنید.","join_refused_address":"نشانی این پیوند بیرون از شبکه خانگی شماست، پس برنامه از آن استفاده نمی‌کند. از {host} پیوندی با نشانی IP رایانه‌اش بخواهید.","join_refused_other":"{host} اجازهٔ ورود نداد.","join_ended_kicked":"{host} شما را از بازی بیرون کرد.","join_ended_closed":"{host} «بازی با هم» را بست.","join_ended_host_stopped":"میزبان بازی را متوقف کرد.","join_ended_replaced":"این بازی در زبانه یا دستگاه دیگری باز شد، پس اینجا متوقف شد.","join_ended_pad_lost":"PS5 دستهٔ شما را از دست داد، پس از بازی بیرون رفتید. از {host} بخواهید دوباره راهتان بدهد.","join_ended_gave_up":"اتصال به {host} به‌موقع برنگشت.","join_net_lost":"اتصال به {host} قطع شد. اتصال اینترنت خود را بررسی کنید و دوباره درخواست دهید.","join_ended_lost":"دسترسی به {host} ممکن نشد. بررسی کنید روی یک شبکه باشید.","join_ended_left":"از بازی خارج شدید.","join_net_mismatch":"این پیوند با میزبان جور نیست؛ از او پیوند تازه‌ای بخواهید.","join_net_no_direct":"اتصال مستقیم از این شبکه ممکن نیست (روترهای هر دو طرف سخت‌گیرند). به‌جای داده همراه Wi-Fi را امتحان کنید یا از میزبان بخواهید UPnP را روشن کند.","join_net_no_room":"این دعوت دیگر باز نیست. از {host} پیوند تازه‌ای بخواهید.","join_net_full":"بازی {host} اکنون جای دوست دیگری ندارد. کمی بعد دوباره امتحان کنید.","join_net_no_hub":"دسترسی به سرویس دعوت PS5Upload ممکن نشد. اتصال اینترنت را بررسی کنید و دوباره امتحان کنید.","join_net_offer":"رایانه {host} نتوانست به این مرورگر وصل شود. مرورگر دیگری را امتحان کنید.","join_net_no_webrtc":"این مرورگر نمی‌تواند اتصال مستقیم برقرار کند. نسخه تازه Chrome، Safari یا Firefox را امتحان کنید.","join_cancel":"لغو","join_host_fallback":"دوستتان","join_connecting":"در حال اتصال به {host}…","join_waiting":"منتظر اجازهٔ ورود از {host}","join_waiting_body":"{host} نام شما را روی صفحه‌اش می‌بیند و «اجازه» را می‌زند.","join_retry":"دوباره امتحان کنید","join_again":"دوباره درخواست پیوستن","join_playing_at":"در حال بازی پیش {host}","join_you_are":"شما بازیکن {n} هستید","join_seat_stream":"شما با کاربر PS5 {host} بازی می‌کنید. لازم نیست کاربری انتخاب کنید.","join_plays_as":"شما با {profile} بازی می‌کنید. نیازی به انتخاب نیست.","join_seat_tv_asks":"{host} پروفایلی برای شما انتخاب کرد، اما نشد از آن استفاده کرد. تلویزیون می‌پرسد شما کیستید.","join_picking":"PS را بزنید، سپس روی تلویزیون «بازی سریع» را انتخاب کنید","join_hide_controls":"پنهان کردن","join_sound":"برای صدا ضربه بزنید","rp_unmute":"صدا روشن","rp_mute":"بی‌صدا","join_no_sound":"در این مرورگر صدا پخش نمی‌شود","join_exit_fullscreen":"خروج از تمام‌صفحه","pad_fill":"تمام‌صفحه","join_leave":"خروج","join_show_controls":"نمایش کنترل‌ها","join_hold_hint":"برای نمایش دکمه‌ها، تصویر را لمس کرده و نگه دارید","pad_watch_no_hevc":"این دستگاه نمی‌تواند تصویر این استریم را پخش کند: کامپیوتر HEVC می‌فرستد و این دستگاه فقط H.264 پخش می‌کند.","pad_watch_decode":"تصویر اینجا پخش نشد.","join_pad_ready":"دستهٔ شما آماده است","join_check_unknown_short":"در فهرست ما نیست: ممکن است دکمه‌ها جابه‌جا باشند.","join_full_to_play":"برای بازی با دسته روی صفحه، تمام‌صفحه را بزنید.","join_pad_none":"یک دسته وصل کنید (USB یا Bluetooth) و هر دکمه‌ای را بزنید.","join_pad_keys":"یا از صفحه‌کلید استفاده کنید: WASD حرکت، کلیدهای جهت D-pad، Enter ✕، Backspace ○، Q □، E △، Tab Options.","join_tv_back_hint":"برای دیدن دکمه‌ها، روی کنترل از راه دور دکمهٔ بازگشت را بزنید.","join_block_note":"{host} دکمه‌های PS و Create را برای دوستان خاموش کرده است.","join_guide_title":"یک قدم دیگر روی تلویزیون","join_guide_body":"یک بار PS را روی دسته‌تان بزنید. تلویزیون می‌پرسد «چه کسی از این دسته استفاده می‌کند؟». «بازی سریع» یا کاربر خودتان را انتخاب کنید. میزبان لازم نیست کاری بکند.","join_guide_menus":"در صفحه اصلی PS5 فقط میزبان منوها را کنترل می‌کند؛ دسته شما داخل بازی‌ها بازی می‌کند.","join_guide_ok":"متوجه شدم","join_host_away":"میزبان بازی را متوقف کرد — در انتظار شروع دوباره ({time})","join_reconnecting":"در حال اتصال دوباره…","join_reconnecting_left":"جای شما تا {time} نگه داشته می‌شود.","pad_turn":"گوشی را افقی کنید","join_game_label":"بازی {host}","join_title":"پیوستن به بازی یک دوست","join_title_body":"روی PS5 {host} به‌عنوان بازیکن ۲، ۳ یا ۴ بازی کنید.","join_name_label":"نام شما","join_name_hint":"وقتی درخواست پیوستن بدهید، دوستتان این را می‌بیند.","join_button":"پیوستن"},"fr":{"usb_skipped_not_payload":"{name} : pas un fichier .elf ou .bin","usb_skipped_unknown":"{id} : n'est plus dans la liste des payloads","browser_unsupported":"Il faut l'application de bureau. Cela ne fonctionne pas dans le navigateur.","video_recovered_notice":"Play a planté au démarrage de l'image la dernière fois : l'image est donc maintenant décodée sans la carte graphique (modifiable dans Paramètres › Fenêtre › Graphismes › Décodage vidéo matériel).","video_recovered_title":"Image désormais décodée par logiciel","open_in_title":"Ouvrir dans l’app PS5Upload ?","open_in_body":"Vous avez l’app PS5Upload sur cet appareil ? Ouvrez ceci dedans, ou continuez dans le navigateur.","open_in_app":"Ouvrir dans l’app","open_in_browser":"Continuer dans le navigateur","open_in_remember":"Retenir mon choix sur cet appareil","open_in_opening":"Ouverture de l’app PS5Upload…","open_in_not_opened":"Rien ne s’est passé ? L’app n’est peut-être pas sur cet appareil.","open_in_again":"Réessayer","pad_8bitdo_no_xinput":"Cette manette 8BitDo n'a pas de mode X-input. Si un bouton ne correspond pas, vérifiez la manette.","pad_8bitdo_how_switch":"mettez l'interrupteur à l'arrière sur X, puis appuyez sur Start","pad_8bitdo_how_startx":"éteignez-la, puis maintenez Start + X pour l'allumer","pad_8bitdo_how_receiver":"utilisez son récepteur 2.4G ou un câble USB","pad_8bitdo_how_manual":"son manuel explique comment","pad_8bitdo_xinput":"Pour un meilleur résultat, passez votre 8BitDo en mode X-input : {how}.","rp_touch_left_stick":"Joystick gauche","rp_touch_right_stick":"Joystick droit","rp_touch_touchpad":"Pavé tactile","rp_pad_step_lx":"Poussez le stick gauche vers la droite","rp_pad_step_ly":"Poussez le stick gauche vers le bas","rp_pad_step_rx":"Poussez le stick droit vers la droite","rp_pad_step_ry":"Poussez le stick droit vers le bas","join_check_bottom":"Appuyez sur le bouton du bas (✕)","join_check_right":"Appuyez sur le bouton de droite (○)","join_check_left":"Appuyez sur le bouton de gauche (□)","join_check_top":"Appuyez sur le bouton du haut (△)","rp_pad_press":"Appuyez sur {name}","join_check_saved":"Enregistré pour cette manette sur cet appareil. Essayez-la ci-dessous.","join_check_title":"Vérifier la manette","join_done":"Terminé","rp_pads_none":"Aucune manette détectée. Connectez-en une et appuyez sur n'importe quel bouton.","rp_pad_mapped":"Joue avec votre configuration","join_check_unknown":"Cette manette n'est pas dans notre liste, ses boutons peuvent donc être inversés. La configurer ne prend que quelques secondes.","rp_pad_standard":"Reconnue","rp_pad_progress":"{n} sur {total}","rp_pad_skip":"Passer","rp_pad_back":"Retour","rp_pad_cancel":"Annuler","join_check_try":"Appuyez sur des boutons et bougez les sticks : ce que vous pressez s'allume.","join_check_redo":"Refaire","join_check_map":"Configurer les boutons","rp_pad_reset":"Réinitialiser","join_open_lan_body":"Pas d'accès à Internet ? Si vous êtes sur le même Wi-Fi que votre ami, ouvrez la partie par là.","join_open_lan":"Ouvrir sur ce Wi-Fi","join_path_lan":"Réseau domestique","join_seat_taken":"{host} avait besoin de récupérer sa manette et aucune autre manette n'était libre sur la PS5 : vous avez quitté la partie. Demandez à {host} de vous laisser revenir.","join_refused_key":"Cette invitation a expiré. Demandez un nouveau lien à {host}.","join_refused_expired":"Votre place dans la partie est perdue. Demandez à {host} de vous laisser revenir.","join_refused_full":"La partie est pleine : il y a déjà quatre joueurs.","join_refused_denied":"{host} ne vous a pas laissé entrer cette fois.","join_refused_no_answer":"{host} n'a pas répondu à temps. Prévenez {host}, puis réessayez.","join_refused_closed":"{host} n'organise pas de Jouer ensemble pour le moment.","join_refused_old_helper":"La PS5 de {host} a besoin d'un assistant à jour pour Jouer ensemble.","join_refused_not_playing":"{host} ne joue pas en ce moment. Demandez d'abord à {host} de lancer Jouer.","join_refused_unreachable":"L'ordinateur de {host} n'a pas pu joindre sa PS5. Réessayez dans un instant.","join_refused_slow_down":"Trop de codes erronés. Attendez une minute, puis réessayez.","join_refused_address":"L'adresse de ce lien est hors de ton réseau domestique, l'application ne l'utilisera donc pas. Demande à {host} un lien avec l'adresse IP de son ordinateur.","join_refused_other":"{host} ne vous a pas laissé entrer.","join_ended_kicked":"{host} vous a retiré de la partie.","join_ended_closed":"{host} a fermé Jouer ensemble.","join_ended_host_stopped":"L'hôte a arrêté de jouer.","join_ended_replaced":"Cette partie a été ouverte dans un autre onglet ou sur un autre appareil, elle s'est donc arrêtée ici.","join_ended_pad_lost":"La PS5 a perdu votre manette, vous êtes donc sorti de la partie. Demandez à {host} de vous laisser revenir.","join_ended_gave_up":"La connexion à {host} n'est pas revenue à temps.","join_net_lost":"La connexion à {host} a été coupée. Vérifiez votre connexion Internet, puis redemandez.","join_ended_lost":"Impossible de joindre {host}. Vérifiez que vous êtes sur le même réseau.","join_ended_left":"Vous avez quitté la partie.","join_net_mismatch":"Ce lien ne correspond pas à l'hôte ; demandez-lui-en un nouveau.","join_net_no_direct":"Une connexion directe est impossible depuis ce réseau (les routeurs des deux côtés sont stricts). Essayez le Wi-Fi plutôt que les données mobiles, ou demandez à l'hôte d'activer l'UPnP.","join_net_no_room":"Cette invitation n'est plus ouverte. Demandez un nouveau lien à {host}.","join_net_full":"La partie de {host} n'a pas de place pour un autre ami pour le moment. Réessayez dans un instant.","join_net_no_hub":"Impossible de joindre le service d'invitations de PS5Upload. Vérifiez votre connexion internet, puis réessayez.","join_net_offer":"L'ordinateur de {host} n'a pas pu se connecter à ce navigateur. Essayez un autre navigateur.","join_net_no_webrtc":"Ce navigateur ne peut pas établir de connexions directes. Essayez une version récente de Chrome, Safari ou Firefox.","join_cancel":"Annuler","join_host_fallback":"votre ami","join_connecting":"Connexion à {host}…","join_waiting":"En attente que {host} vous laisse entrer","join_waiting_body":"{host} voit votre nom à l'écran et appuie sur Autoriser.","join_retry":"Réessayer","join_again":"Redemander à rejoindre","join_playing_at":"En jeu chez {host}","join_you_are":"Vous êtes le joueur {n}","join_seat_stream":"Vous jouez avec l'utilisateur PS5 de {host}. Inutile d'en choisir un.","join_plays_as":"Vous jouez en tant que {profile}. Inutile d'en choisir un.","join_seat_tv_asks":"{host} a choisi un profil pour vous, mais il n'a pas pu être utilisé. La TV va vous demander qui vous êtes.","join_picking":"Appuyez sur PS, puis choisissez Jeu rapide sur la télé","join_hide_controls":"Masquer","join_sound":"Touchez pour le son","rp_unmute":"Son activé","rp_mute":"Couper le son","join_no_sound":"Pas de son dans ce navigateur","join_exit_fullscreen":"Quitter le plein écran","pad_fill":"Plein écran","join_leave":"Quitter","join_show_controls":"Afficher les commandes","join_hold_hint":"Maintenez l'image appuyée pour afficher les boutons","pad_watch_no_hevc":"Cet appareil ne peut pas lire l'image de ce stream : l'ordinateur diffuse en HEVC et cet appareil ne lit que le H.264.","pad_watch_decode":"L'image n'a pas pu être lue ici.","join_pad_ready":"Votre manette est prête","join_check_unknown_short":"Pas dans notre liste : les boutons peuvent être inversés.","join_full_to_play":"Touchez plein écran pour jouer avec la manette à l'écran.","join_pad_none":"Branchez une manette (USB ou Bluetooth) et appuyez sur un bouton.","join_pad_keys":"Ou utilisez le clavier : ZQSD/WASD pour bouger, flèches croix directionnelle, Entrée ✕, Retour arrière ○, Q □, E △, Tab Options.","join_tv_back_hint":"Appuyez sur Retour sur la télécommande pour afficher les boutons.","join_block_note":"{host} a désactivé PS et Create pour les amis.","join_guide_title":"Encore une étape sur la télé","join_guide_body":"Appuyez une fois sur PS sur votre manette. La télé demande « Qui utilise cette manette ? ». Choisissez Jeu rapide ou votre propre utilisateur. L'hôte n'a rien à faire.","join_guide_menus":"Sur l'écran d'accueil de la PS5, seul l'hôte contrôle les menus ; votre manette joue dans les jeux.","join_guide_ok":"Compris","join_host_away":"L'hôte a arrêté de jouer — en attente de sa reprise ({time})","join_reconnecting":"Reconnexion…","join_reconnecting_left":"Votre place est gardée pendant {time}.","pad_turn":"Tournez le téléphone à l'horizontale","join_game_label":"Partie de {host}","join_title":"Rejoindre la partie d'un ami","join_title_body":"Jouez sur la PS5 de {host} en tant que joueur 2, 3 ou 4.","join_name_label":"Votre nom","join_name_hint":"Votre ami le verra quand vous demanderez à rejoindre.","join_button":"Rejoindre"},"hi":{"usb_skipped_not_payload":"{name}: .elf या .bin फ़ाइल नहीं है","usb_skipped_unknown":"{id}: अब पेलोड सूची में नहीं है","browser_unsupported":"इसके लिए डेस्कटॉप ऐप चाहिए। यह ब्राउज़र में काम नहीं करता।","video_recovered_notice":"पिछली बार तस्वीर शुरू करते समय खेलें क्रैश हो गया था, इसलिए तस्वीर अब ग्राफ़िक्स कार्ड के बिना डिकोड होती है (बदलने के लिए सेटिंग्स › विंडो › ग्राफ़िक्स › हार्डवेयर वीडियो डिकोडिंग)।","video_recovered_title":"तस्वीर अब सॉफ़्टवेयर से डिकोड होती है","open_in_title":"PS5Upload ऐप में खोलें?","open_in_body":"क्या इस डिवाइस पर PS5Upload ऐप है? इसे वहाँ खोलें, या ब्राउज़र में ही जारी रखें।","open_in_app":"ऐप में खोलें","open_in_browser":"ब्राउज़र में जारी रखें","open_in_remember":"इस डिवाइस पर मेरी पसंद याद रखें","open_in_opening":"PS5Upload ऐप खुल रहा है…","open_in_not_opened":"कुछ नहीं हुआ? शायद इस डिवाइस पर ऐप नहीं है।","open_in_again":"फिर कोशिश करें","pad_8bitdo_no_xinput":"इस 8BitDo में X-input मोड नहीं है। अगर कोई बटन गलत है, तो कंट्रोलर जाँचें।","pad_8bitdo_how_switch":"पीछे का स्विच X पर करें, फिर Start दबाएँ","pad_8bitdo_how_startx":"इसे बंद करें, फिर Start + X दबाकर रखें ताकि यह चालू हो","pad_8bitdo_how_receiver":"इसका 2.4G रिसीवर या USB केबल इस्तेमाल करें","pad_8bitdo_how_manual":"इसकी मैनुअल में तरीका दिया है","pad_8bitdo_xinput":"सबसे अच्छे नतीजे के लिए अपने 8BitDo को X-input मोड में करें: {how}।","rp_touch_left_stick":"बायाँ स्टिक","rp_touch_right_stick":"दायाँ स्टिक","rp_touch_touchpad":"टचपैड","rp_menu":"मेनू","rp_pad_step_lx":"बायाँ स्टिक दाईं ओर धकेलें","rp_pad_step_ly":"बायाँ स्टिक नीचे धकेलें","rp_pad_step_rx":"दायाँ स्टिक दाईं ओर धकेलें","rp_pad_step_ry":"दायाँ स्टिक नीचे धकेलें","join_check_bottom":"नीचे वाला फ़ेस बटन दबाएँ (✕)","join_check_right":"दाईं ओर वाला फ़ेस बटन दबाएँ (○)","join_check_left":"बाईं ओर वाला फ़ेस बटन दबाएँ (□)","join_check_top":"ऊपर वाला फ़ेस बटन दबाएँ (△)","rp_pad_press":"{name} दबाएँ","join_check_saved":"इस डिवाइस पर इस कंट्रोलर के लिए सेव हो गया। नीचे आज़माएँ।","join_check_title":"अपना कंट्रोलर जाँचें","join_done":"हो गया","rp_pads_none":"अभी तक कोई कंट्रोलर नहीं दिखा। एक कनेक्ट करें और उस पर कोई भी बटन दबाएँ।","rp_pad_mapped":"आपकी मैपिंग से खेलता है","join_check_unknown":"यह कंट्रोलर हमारी सूची में नहीं है, इसलिए इसके बटन आपस में बदले हो सकते हैं। सेट अप करने में कुछ सेकंड लगते हैं।","rp_pad_standard":"पहचाना गया","rp_pad_progress":"{total} में से {n}","rp_pad_skip":"छोड़ें","rp_pad_back":"वापस","rp_pad_cancel":"रद्द करें","join_check_try":"बटन दबाएँ और स्टिक हिलाएँ: जो दबाएँगे वह जल उठेगा।","join_check_redo":"फिर से करें","join_check_map":"बटन सेट करें","rp_pad_reset":"रीसेट करें","join_open_lan_body":"इंटरनेट नहीं मिल रहा? अगर आप दोस्त वाले Wi-Fi पर ही हैं, तो गेम वहीं खोलें।","join_open_lan":"इसी Wi-Fi पर खोलें","join_path_lan":"होम नेटवर्क","join_path_internet":"इंटरनेट","join_seat_taken":"{host} को अपना कंट्रोलर वापस चाहिए था और PS5 पर कोई दूसरा कंट्रोलर खाली नहीं था, इसलिए आप गेम से बाहर हो गए। {host} से फिर से अंदर आने देने को कहें।","join_refused_key":"इस न्योते की समय-सीमा खत्म हो गई है। {host} से नया लिंक माँगें।","join_refused_expired":"गेम में आपकी जगह चली गई। {host} से फिर अंदर लेने को कहें।","join_refused_full":"गेम भर गया है: पहले से चार प्लेयर हैं।","join_refused_denied":"{host} ने इस बार आपको अंदर नहीं आने दिया।","join_refused_no_answer":"{host} ने समय पर जवाब नहीं दिया। {host} को बताएँ, फिर कोशिश करें।","join_refused_closed":"{host} अभी 'साथ खेलें' नहीं चला रहे हैं।","join_refused_old_helper":"'साथ खेलें' के लिए {host} के PS5 को अपडेटेड हेल्पर चाहिए।","join_refused_not_playing":"{host} अभी नहीं खेल रहे हैं। {host} से पहले खेलें शुरू करने को कहें।","join_refused_unreachable":"{host} का कंप्यूटर उनके PS5 तक नहीं पहुँच सका। थोड़ी देर में फिर कोशिश करें।","join_refused_slow_down":"बहुत सारे गलत कोड। एक मिनट रुकें, फिर कोशिश करें।","join_refused_address":"इस लिंक का पता आपके होम नेटवर्क से बाहर है, इसलिए ऐप इसका उपयोग नहीं करेगा। {host} से उनके कंप्यूटर के IP पते वाला लिंक माँगें।","join_refused_other":"{host} ने आपको अंदर नहीं आने दिया।","join_ended_kicked":"{host} ने आपको गेम से हटा दिया।","join_ended_closed":"{host} ने 'साथ खेलें' बंद कर दिया।","join_ended_host_stopped":"होस्ट ने खेलना बंद कर दिया।","join_ended_replaced":"यह गेम किसी दूसरे टैब या डिवाइस पर खुल गया, इसलिए यहाँ रुक गया।","join_ended_pad_lost":"PS5 ने आपका कंट्रोलर खो दिया, इसलिए आप गेम से बाहर हैं। {host} से फिर अंदर लेने को कहें।","join_ended_gave_up":"{host} से कनेक्शन समय पर वापस नहीं आया।","join_net_lost":"{host} से कनेक्शन टूट गया। अपना इंटरनेट कनेक्शन जाँचें, फिर दोबारा पूछें।","join_ended_lost":"{host} तक नहीं पहुँच सके। देखें कि आप एक ही नेटवर्क पर हैं।","join_ended_left":"आपने गेम छोड़ दिया।","join_net_mismatch":"यह लिंक होस्ट से मेल नहीं खाता; उनसे नया लिंक माँगें।","join_net_no_direct":"इस नेटवर्क से सीधा कनेक्शन संभव नहीं है (दोनों तरफ़ के राउटर सख़्त हैं)। मोबाइल डेटा की जगह Wi-Fi आज़माएँ, या होस्ट से UPnP चालू करने को कहें।","join_net_no_room":"यह न्योता अब खुला नहीं है। {host} से नया लिंक माँगें।","join_net_full":"{host} के गेम में अभी एक और दोस्त की जगह नहीं है। थोड़ी देर में फिर कोशिश करें।","join_net_no_hub":"PS5Upload न्योता सेवा तक नहीं पहुँच सके। अपना इंटरनेट कनेक्शन जाँचें, फिर कोशिश करें।","join_net_offer":"{host} का कंप्यूटर इस ब्राउज़र से कनेक्ट नहीं हो सका। कोई दूसरा ब्राउज़र आज़माएँ।","join_net_no_webrtc":"यह ब्राउज़र सीधे कनेक्शन नहीं बना सकता। Chrome, Safari या Firefox का नया संस्करण आज़माएँ।","join_cancel":"रद्द करें","join_host_fallback":"आपका दोस्त","join_connecting":"{host} से जुड़ रहे हैं…","join_waiting":"{host} के अंदर आने देने का इंतज़ार","join_waiting_body":"{host} अपनी स्क्रीन पर आपका नाम देखकर 'अनुमति दें' पर टैप करेंगे।","join_retry":"फिर कोशिश करें","join_again":"फिर से जुड़ने के लिए पूछें","join_playing_at":"{host} के यहाँ खेल रहे हैं","join_you_are":"आप प्लेयर {n} हैं","join_seat_stream":"आप {host} के PS5 यूज़र के रूप में खेल रहे हैं। यूज़र चुनने की ज़रूरत नहीं।","join_plays_as":"आप {profile} के रूप में खेल रहे हैं। कुछ चुनने की ज़रूरत नहीं।","join_seat_tv_asks":"{host} ने आपके लिए एक प्रोफ़ाइल चुनी थी, पर वह इस्तेमाल नहीं हो सकी। टीवी पूछेगा कि आप कौन हैं।","join_picking":"PS दबाएँ, फिर TV पर क्विक प्ले चुनें","join_hide_controls":"छिपाएँ","join_sound":"आवाज़ के लिए टैप करें","rp_unmute":"ध्वनि चालू","rp_mute":"म्यूट","join_no_sound":"इस ब्राउज़र में आवाज़ नहीं है","join_exit_fullscreen":"फ़ुल स्क्रीन से बाहर निकलें","pad_fill":"फ़ुल स्क्रीन","join_leave":"छोड़ें","join_show_controls":"कंट्रोल दिखाएं","join_hold_hint":"बटन दिखाने के लिए तस्वीर को दबाकर रखें","pad_watch_no_hevc":"यह डिवाइस इस स्ट्रीम की तस्वीर नहीं चला सकता: कंप्यूटर HEVC में स्ट्रीम करता है और यह डिवाइस सिर्फ़ H.264 चलाता है।","pad_watch_decode":"तस्वीर यहाँ नहीं चल सकी।","join_pad_ready":"आपका कंट्रोलर तैयार है","join_check_unknown_short":"हमारी सूची में नहीं: बटन बदले हुए हो सकते हैं।","join_full_to_play":"ऑन-स्क्रीन कंट्रोलर से खेलने के लिए फ़ुल स्क्रीन पर टैप करें।","join_pad_none":"कंट्रोलर जोड़ें (USB या Bluetooth) और कोई भी बटन दबाएँ।","join_pad_keys":"या कीबोर्ड इस्तेमाल करें: WASD चलना, ऐरो D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options।","join_tv_back_hint":"बटन देखने के लिए रिमोट पर Back दबाएँ।","join_block_note":"{host} ने दोस्तों के लिए PS और Create बंद कर दिए हैं।","join_guide_title":"TV पर एक और कदम","join_guide_body":"अपने कंट्रोलर पर एक बार PS दबाएँ। TV पूछेगा \"यह कंट्रोलर कौन इस्तेमाल कर रहा है?\"। क्विक प्ले या अपना यूज़र चुनें। होस्ट को कुछ नहीं करना है।","join_guide_menus":"PS5 की होम स्क्रीन पर सिर्फ़ होस्ट मेन्यू चलाता है; आपका कंट्रोलर गेम के अंदर खेलता है।","join_guide_ok":"ठीक है","join_host_away":"होस्ट ने खेलना बंद कर दिया — उनके फिर से शुरू करने का इंतज़ार ({time})","join_reconnecting":"फिर से जुड़ रहे हैं…","join_reconnecting_left":"आपकी जगह {time} तक रखी जाएगी।","pad_turn":"फ़ोन को आड़ा घुमाएँ","join_game_label":"{host} का गेम","join_title":"दोस्त के गेम में जुड़ें","join_title_body":"{host} के PS5 पर प्लेयर 2, 3 या 4 बनकर खेलें।","join_name_label":"आपका नाम","join_name_hint":"जुड़ने के लिए पूछने पर आपका दोस्त यह देखेगा।","join_button":"जुड़ें"},"hu":{"usb_skipped_not_payload":"{name}: nem .elf vagy .bin fájl","usb_skipped_unknown":"{id}: már nincs a payloadok listáján","browser_unsupported":"Ehhez az asztali alkalmazás kell. Böngészőben nem működik.","video_recovered_notice":"Legutóbb a Play összeomlott a kép indításakor, ezért a kép mostantól videokártya nélkül dekódolódik (módosítás: Beállítások › Ablak › Grafika › Hardveres videódekódolás).","video_recovered_title":"A kép mostantól szoftveresen dekódolódik","open_in_title":"Megnyitod a PS5Upload appban?","open_in_body":"Megvan a PS5Upload app ezen az eszközön? Nyisd meg ott, vagy folytasd a böngészőben.","open_in_app":"Megnyitás az appban","open_in_browser":"Folytatás a böngészőben","open_in_remember":"Választásom megjegyzése ezen az eszközön","open_in_opening":"A PS5Upload app megnyitása…","open_in_not_opened":"Nem történt semmi? Lehet, hogy az app nincs ezen az eszközön.","open_in_again":"Újra","pad_8bitdo_no_xinput":"Ennek a 8BitDo-nak nincs X-input módja. Ha egy gomb rossz, ellenőrizd a kontrollert.","pad_8bitdo_how_switch":"állítsd a hátsó kapcsolót X-re, majd nyomd meg a Start gombot","pad_8bitdo_how_startx":"kapcsold ki, majd a Start + X nyomva tartásával kapcsold be","pad_8bitdo_how_receiver":"használd a 2.4G vevőjét vagy egy USB-kábelt","pad_8bitdo_how_manual":"a kézikönyve leírja, hogyan","pad_8bitdo_xinput":"A legjobb eredményért kapcsold a 8BitDo-t X-input módba: {how}.","rp_touch_left_stick":"Bal kar","rp_touch_right_stick":"Jobb kar","rp_touch_touchpad":"Érintőpad","rp_menu":"Menü","rp_pad_step_lx":"Told a bal kart jobbra","rp_pad_step_ly":"Told a bal kart lefelé","rp_pad_step_rx":"Told a jobb kart jobbra","rp_pad_step_ry":"Told a jobb kart lefelé","join_check_bottom":"Nyomd meg az alsó előlapi gombot (✕)","join_check_right":"Nyomd meg a jobb oldali előlapi gombot (○)","join_check_left":"Nyomd meg a bal oldali előlapi gombot (□)","join_check_top":"Nyomd meg a felső előlapi gombot (△)","rp_pad_press":"Nyomd meg: {name}","join_check_saved":"Elmentve ehhez a kontrollerhez ezen az eszközön. Próbáld ki lent.","join_check_title":"Kontroller ellenőrzése","join_done":"Kész","rp_pads_none":"Még nem látható kontroller. Csatlakoztass egyet, és nyomd meg bármelyik gombját.","rp_pad_mapped":"A saját kiosztásoddal játszik","join_check_unknown":"Ez a kontroller nincs a listánkon, így a gombjai összekeveredhetnek. A beállítás csak pár másodperc.","rp_pad_standard":"Felismerve","rp_pad_progress":"{n} / {total}","rp_pad_skip":"Kihagyás","rp_pad_back":"Vissza","rp_pad_cancel":"Mégse","join_check_try":"Nyomj gombokat és mozgasd a karokat: amit megnyomsz, az felvillan.","join_check_redo":"Újra","join_check_map":"Gombok beállítása","rp_pad_reset":"Visszaállítás","join_open_lan_body":"Nem éred el az internetet? Ha ugyanazon a Wi-Fin vagy, mint a barátod, ott nyisd meg a játékot.","join_open_lan":"Megnyitás ezen a Wi-Fin","join_path_lan":"Otthoni hálózat","join_seat_taken":"{host} visszakérte a kontrollerét, és a PS5-ön nem volt más szabad kontroller, ezért kikerültél a játékból. Kérd meg {host} játékost, hogy engedjen be újra.","join_refused_key":"Ez a meghívó lejárt. Kérj új linket tőle: {host}.","join_refused_expired":"Elveszett a helyed a játékban. Kérd meg {host} felhasználót, hogy engedjen be újra.","join_refused_full":"A játék megtelt: már négy játékos van bent.","join_refused_denied":"{host} most nem engedett be.","join_refused_no_answer":"{host} nem válaszolt időben. Szólj neki ({host}), majd próbáld újra.","join_refused_closed":"{host} most nem indított Közös játékot.","join_refused_old_helper":"{host} PS5-jének frissített segédprogram kell a Közös játékhoz.","join_refused_not_playing":"{host} most nem játszik. Kérd meg, hogy előbb indítsa el a Játékot ({host}).","join_refused_unreachable":"{host} számítógépe nem érte el a PS5-öt. Próbáld újra egy kicsit később.","join_refused_slow_down":"Túl sok hibás kód. Várj egy percet, aztán próbáld újra.","join_refused_address":"A hivatkozás címe kívül esik az otthoni hálózatodon, ezért az alkalmazás nem használja. Kérj {host} felhasználótól olyan hivatkozást, amely a számítógépe IP-címét tartalmazza.","join_refused_other":"{host} nem engedett be.","join_ended_kicked":"{host} kivett a játékból.","join_ended_closed":"{host} bezárta a Közös játékot.","join_ended_host_stopped":"A házigazda abbahagyta a játékot.","join_ended_replaced":"Ezt a játékot egy másik lapon vagy eszközön nyitották meg, ezért itt leállt.","join_ended_pad_lost":"A PS5 elvesztette a kontrollered, ezért kikerültél a játékból. Kérd meg {host} felhasználót, hogy engedjen be újra.","join_ended_gave_up":"A kapcsolat {host} felé nem állt helyre időben.","join_net_lost":"Megszakadt a kapcsolat ezzel: {host}. Ellenőrizd az internetkapcsolatod, aztán kérd újra.","join_ended_lost":"{host} nem érhető el. Ellenőrizd, hogy ugyanazon a hálózaton vagytok-e.","join_ended_left":"Kiléptél a játékból.","join_net_mismatch":"Ez a link nem egyezik a házigazdával; kérj tőle újat.","join_net_no_direct":"Erről a hálózatról nem lehet közvetlen kapcsolatot létrehozni (mindkét oldal routere szigorú). Próbáld Wi-Fi-vel mobilnet helyett, vagy kérd meg a házigazdát, hogy kapcsolja be az UPnP-t.","join_net_no_room":"Ez a meghívó már nem érvényes. Kérj új linket {host} felhasználótól.","join_net_full":"{host} játékában most nincs hely egy újabb barátnak. Próbáld újra egy kicsit később.","join_net_no_hub":"A PS5Upload meghívószolgáltatása nem érhető el. Ellenőrizd az internetkapcsolatot, majd próbáld újra.","join_net_offer":"{host} számítógépe nem tudott kapcsolódni ehhez a böngészőhöz. Próbálj ki egy másik böngészőt.","join_net_no_webrtc":"Ez a böngésző nem tud közvetlen kapcsolatot létrehozni. Próbáld egy friss Chrome-mal, Safarival vagy Firefoxszal.","join_cancel":"Mégse","join_host_fallback":"a barátod","join_connecting":"Csatlakozás ehhez: {host}…","join_waiting":"Várakozás, amíg {host} beenged","join_waiting_body":"{host} látja a neved a képernyőjén, és az Engedélyezésre koppint.","join_retry":"Újra","join_again":"Csatlakozás kérése újra","join_playing_at":"Játék itt: {host}","join_you_are":"Te vagy a(z) {n}. játékos","join_seat_stream":"{host} PS5-felhasználójaként játszol. Nem kell felhasználót választanod.","join_plays_as":"{profile} néven játszol. Nem kell választanod.","join_seat_tv_asks":"{host} választott neked egy profilt, de nem lehetett használni. A tévé megkérdezi, ki vagy.","join_picking":"Nyomd meg a PS gombot, aztán a tévén válaszd a Gyors játékot","join_hide_controls":"Elrejtés","join_sound":"Koppints a hanghoz","rp_unmute":"Hang be","rp_mute":"Némítás","join_no_sound":"Ebben a böngészőben nincs hang","join_exit_fullscreen":"Kilépés a teljes képernyőből","pad_fill":"Teljes képernyő","join_leave":"Kilépés","join_show_controls":"Vezérlők megjelenítése","join_hold_hint":"A gombok megjelenítéséhez tartsd lenyomva a képet","pad_watch_no_hevc":"Ez az eszköz nem tudja lejátszani ennek a streamnek a képét: a számítógép HEVC-ben streamel, ez az eszköz csak H.264-et játszik le.","pad_watch_decode":"A képet itt nem sikerült lejátszani.","join_pad_ready":"A kontrollered készen áll","join_check_unknown_short":"Nincs a listánkon: a gombok összekeveredhetnek.","join_full_to_play":"Koppints a Teljes képernyő gombra, hogy a képernyős kontrollerrel játssz.","join_pad_none":"Csatlakoztass egy kontrollert (USB vagy Bluetooth), és nyomj meg egy gombot.","join_pad_keys":"Vagy használd a billentyűzetet: WASD mozgás, nyilak D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"A gombokhoz nyomd meg a távirányítón a Vissza gombot.","join_block_note":"{host} kikapcsolta a PS és Create gombot a barátoknak.","join_guide_title":"Még egy lépés a tévén","join_guide_body":"Nyomd meg egyszer a PS gombot a kontrollereden. A tévé megkérdezi: „Ki használja ezt a kontrollert?”. Válaszd a Gyors játékot vagy a saját felhasználódat. A házigazdának semmit sem kell tennie.","join_guide_menus":"A PS5 kezdőképernyőjén csak a házigazda kezeli a menüket; a te kontrollered a játékokban működik.","join_guide_ok":"Értem","join_host_away":"A házigazda abbahagyta a játékot – várjuk, hogy újra elkezdje ({time})","join_reconnecting":"Újracsatlakozás…","join_reconnecting_left":"A helyed még {time} ideig fenntartjuk.","pad_turn":"Fordítsd el a telefont fekvőre","join_game_label":"{host} játéka","join_title":"Csatlakozás egy barát játékához","join_title_body":"Játssz {host} PS5-jén 2., 3. vagy 4. játékosként.","join_name_label":"A neved","join_name_hint":"A barátod ezt látja, amikor csatlakozni szeretnél.","join_button":"Csatlakozás"},"id":{"usb_skipped_not_payload":"{name}: bukan file .elf atau .bin","usb_skipped_unknown":"{id}: tidak ada lagi di daftar payload","browser_unsupported":"Ini memerlukan aplikasi desktop. Tidak berfungsi di browser.","video_recovered_notice":"Terakhir kali Play crash saat memulai gambar, jadi gambar kini didekode tanpa kartu grafis (ubah di Pengaturan › Jendela › Grafis › Dekode video perangkat keras).","video_recovered_title":"Gambar kini didekode oleh perangkat lunak","open_in_title":"Buka di aplikasi PS5Upload?","open_in_body":"Punya aplikasi PS5Upload di perangkat ini? Buka di sana, atau lanjutkan di browser.","open_in_app":"Buka di aplikasi","open_in_browser":"Lanjutkan di browser","open_in_remember":"Ingat pilihan saya di perangkat ini","open_in_opening":"Membuka aplikasi PS5Upload…","open_in_not_opened":"Tidak terjadi apa-apa? Mungkin aplikasinya tidak ada di perangkat ini.","open_in_again":"Coba lagi","pad_8bitdo_no_xinput":"8BitDo ini tidak punya mode X-input. Jika ada tombol yang salah, periksa kontrolernya.","pad_8bitdo_how_switch":"geser sakelar di belakang ke X, lalu tekan Start","pad_8bitdo_how_startx":"matikan, lalu tahan Start + X untuk menyalakannya","pad_8bitdo_how_receiver":"gunakan receiver 2.4G-nya atau kabel USB","pad_8bitdo_how_manual":"caranya ada di buku panduannya","pad_8bitdo_xinput":"Untuk hasil terbaik, ubah 8BitDo kamu ke mode X-input: {how}.","rp_touch_left_stick":"Stik kiri","rp_touch_right_stick":"Stik kanan","rp_pad_step_lx":"Dorong stik kiri ke kanan","rp_pad_step_ly":"Dorong stik kiri ke bawah","rp_pad_step_rx":"Dorong stik kanan ke kanan","rp_pad_step_ry":"Dorong stik kanan ke bawah","join_check_bottom":"Tekan tombol muka bawah (✕)","join_check_right":"Tekan tombol muka kanan (○)","join_check_left":"Tekan tombol muka kiri (□)","join_check_top":"Tekan tombol muka atas (△)","rp_pad_press":"Tekan {name}","join_check_saved":"Disimpan untuk kontroler ini di perangkat ini. Coba di bawah.","join_check_title":"Periksa kontrolermu","join_done":"Selesai","rp_pads_none":"Belum ada kontroler terdeteksi. Sambungkan satu dan tekan tombol apa saja.","rp_pad_mapped":"Bermain dengan pemetaan Anda","join_check_unknown":"Kontroler ini tidak ada di daftar kami, jadi tombolnya bisa tertukar. Mengaturnya hanya butuh beberapa detik.","rp_pad_standard":"Dikenali","rp_pad_progress":"{n} dari {total}","rp_pad_skip":"Lewati","rp_pad_back":"Kembali","rp_pad_cancel":"Batal","join_check_try":"Tekan tombol dan gerakkan stik: yang kamu tekan akan menyala.","join_check_redo":"Ulangi","join_check_map":"Atur tombol","rp_pad_reset":"Atur ulang","join_open_lan_body":"Tidak bisa ke internet? Kalau kamu di Wi-Fi yang sama dengan temanmu, buka game-nya di sana.","join_open_lan":"Buka di Wi-Fi ini","join_path_lan":"Jaringan rumah","join_seat_taken":"{host} membutuhkan kontrolernya kembali dan tidak ada kontroler lain yang kosong di PS5, jadi Anda keluar dari permainan. Minta {host} untuk mengizinkan Anda masuk lagi.","join_refused_key":"Undangan ini sudah kedaluwarsa. Minta tautan baru ke {host}.","join_refused_expired":"Tempat Anda di permainan hilang. Minta {host} untuk memasukkan Anda lagi.","join_refused_full":"Game sudah penuh: sudah ada empat pemain.","join_refused_denied":"{host} tidak mengizinkan Anda masuk kali ini.","join_refused_no_answer":"{host} tidak menjawab tepat waktu. Beri tahu {host}, lalu coba lagi.","join_refused_closed":"{host} sedang tidak membuka Main Bareng.","join_refused_old_helper":"PS5 milik {host} perlu helper terbaru untuk Main Bareng.","join_refused_not_playing":"{host} sedang tidak main. Minta {host} memulai Main dulu.","join_refused_unreachable":"Komputer {host} tidak bisa menjangkau PS5-nya. Coba lagi sebentar lagi.","join_refused_slow_down":"Terlalu banyak kode yang salah. Tunggu satu menit, lalu coba lagi.","join_refused_address":"Alamat tautan ini berada di luar jaringan rumah Anda, jadi aplikasi tidak akan memakainya. Minta {host} tautan dengan alamat IP komputernya.","join_refused_other":"{host} tidak mengizinkan Anda masuk.","join_ended_kicked":"{host} mengeluarkan Anda dari game.","join_ended_closed":"{host} menutup Main Bareng.","join_ended_host_stopped":"Host berhenti main.","join_ended_replaced":"Permainan ini dibuka di tab atau perangkat lain, jadi berhenti di sini.","join_ended_pad_lost":"PS5 kehilangan kontroler Anda, jadi Anda keluar dari permainan. Minta {host} untuk memasukkan Anda lagi.","join_ended_gave_up":"Koneksi ke {host} tidak pulih tepat waktu.","join_net_lost":"Koneksi ke {host} terputus. Periksa koneksi internetmu, lalu minta lagi.","join_ended_lost":"Tidak bisa menjangkau {host}. Pastikan Anda di jaringan yang sama.","join_ended_left":"Anda keluar dari game.","join_net_mismatch":"Tautan ini tidak cocok dengan host; minta tautan baru kepadanya.","join_net_no_direct":"Koneksi langsung tidak mungkin dari jaringan ini (router kedua pihak ketat). Coba Wi-Fi alih-alih data seluler, atau minta host menyalakan UPnP.","join_net_no_room":"Undangan ini sudah tidak terbuka. Minta tautan baru kepada {host}.","join_net_full":"Permainan {host} tidak punya tempat untuk teman lain sekarang. Coba lagi sebentar lagi.","join_net_no_hub":"Tidak bisa menjangkau layanan undangan PS5Upload. Periksa koneksi internet Anda, lalu coba lagi.","join_net_offer":"Komputer {host} tidak bisa terhubung ke browser ini. Coba browser lain.","join_net_no_webrtc":"Browser ini tidak bisa membuat koneksi langsung. Coba Chrome, Safari, atau Firefox versi terbaru.","join_cancel":"Batal","join_host_fallback":"teman Anda","join_connecting":"Menghubungkan ke {host}…","join_waiting":"Menunggu {host} mengizinkan Anda masuk","join_waiting_body":"{host} melihat nama Anda di layarnya lalu mengetuk Izinkan.","join_retry":"Coba lagi","join_again":"Minta bergabung lagi","join_playing_at":"Main di tempat {host}","join_you_are":"Anda Pemain {n}","join_seat_stream":"Anda bermain sebagai pengguna PS5 {host}. Tidak perlu memilih pengguna.","join_plays_as":"Anda bermain sebagai {profile}. Tidak perlu memilih.","join_seat_tv_asks":"{host} memilihkan profil untuk Anda, tetapi tidak bisa dipakai. TV akan menanyakan siapa Anda.","join_picking":"Tekan PS, lalu pilih Main Cepat di TV","join_hide_controls":"Sembunyikan","join_sound":"Ketuk untuk suara","rp_unmute":"Suara aktif","rp_mute":"Bisukan","join_no_sound":"Tidak ada suara di browser ini","join_exit_fullscreen":"Keluar dari layar penuh","pad_fill":"Layar penuh","join_leave":"Keluar","join_show_controls":"Tampilkan kontrol","join_hold_hint":"Tekan dan tahan gambar untuk menampilkan tombol","pad_watch_no_hevc":"Perangkat ini tidak bisa memutar gambar stream ini: komputer mengirim HEVC, dan perangkat ini hanya memutar H.264.","pad_watch_decode":"Gambar tidak dapat diputar di sini.","join_pad_ready":"Kontroler Anda siap","join_check_unknown_short":"Tidak ada di daftar kami: tombol bisa tertukar.","join_full_to_play":"Ketuk Layar penuh untuk main dengan kontroler di layar.","join_pad_none":"Hubungkan kontroler (USB atau Bluetooth) lalu tekan tombol apa saja.","join_pad_keys":"Atau pakai keyboard: WASD gerak, panah D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Tekan Kembali di remote untuk menampilkan tombol.","join_block_note":"{host} mematikan PS dan Create untuk teman.","join_guide_title":"Satu langkah lagi di TV","join_guide_body":"Tekan PS sekali di kontroler Anda. TV bertanya \"Siapa yang memakai kontroler ini?\". Pilih Main Cepat atau pengguna Anda sendiri. Tuan rumah tidak perlu melakukan apa pun.","join_guide_menus":"Di layar beranda PS5 hanya host yang mengendalikan menu; kontroler Anda berfungsi di dalam game.","join_guide_ok":"Mengerti","join_host_away":"Host berhenti main — menunggu mereka mulai lagi ({time})","join_reconnecting":"Menyambung ulang…","join_reconnecting_left":"Tempat Anda disimpan selama {time}.","pad_turn":"Miringkan ponsel ke samping","join_game_label":"Game {host}","join_title":"Gabung ke game teman","join_title_body":"Main di PS5 milik {host} sebagai Pemain 2, 3, atau 4.","join_name_label":"Nama Anda","join_name_hint":"Teman Anda melihat nama ini saat Anda minta bergabung.","join_button":"Gabung"},"it":{"usb_skipped_not_payload":"{name}: non è un file .elf o .bin","usb_skipped_unknown":"{id}: non è più nell'elenco dei payload","browser_unsupported":"Serve l'app desktop. Non funziona nel browser.","video_recovered_notice":"L'ultima volta Play si è chiuso all'avvio dell'immagine, quindi ora l'immagine è decodificata senza la scheda grafica (modificabile in Impostazioni › Finestra › Grafica › Decodifica video hardware).","video_recovered_title":"Immagine ora decodificata via software","open_in_title":"Aprire nell’app PS5Upload?","open_in_body":"Hai l’app PS5Upload su questo dispositivo? Aprilo lì, oppure continua nel browser.","open_in_app":"Apri nell’app","open_in_browser":"Continua nel browser","open_in_remember":"Ricorda la mia scelta su questo dispositivo","open_in_opening":"Apertura dell’app PS5Upload…","open_in_not_opened":"Non è successo niente? Forse l’app non è su questo dispositivo.","open_in_again":"Riprova","pad_8bitdo_no_xinput":"Questo 8BitDo non ha la modalità X-input. Se un tasto è sbagliato, controlla il controller.","pad_8bitdo_how_switch":"porta l'interruttore sul retro su X, poi premi Start","pad_8bitdo_how_startx":"spegnilo, poi tieni premuto Start + X per accenderlo","pad_8bitdo_how_receiver":"usa il suo ricevitore 2.4G o un cavo USB","pad_8bitdo_how_manual":"il suo manuale spiega come","pad_8bitdo_xinput":"Per il risultato migliore, passa il tuo 8BitDo in modalità X-input: {how}.","rp_touch_left_stick":"Levetta sinistra","rp_touch_right_stick":"Levetta destra","rp_pad_step_lx":"Spingi la levetta sinistra a destra","rp_pad_step_ly":"Spingi la levetta sinistra in basso","rp_pad_step_rx":"Spingi la levetta destra a destra","rp_pad_step_ry":"Spingi la levetta destra in basso","join_check_bottom":"Premi il tasto frontale in basso (✕)","join_check_right":"Premi il tasto frontale a destra (○)","join_check_left":"Premi il tasto frontale a sinistra (□)","join_check_top":"Premi il tasto frontale in alto (△)","rp_pad_press":"Premi {name}","join_check_saved":"Salvato per questo controller su questo dispositivo. Provalo qui sotto.","join_check_title":"Controlla il controller","join_done":"Fatto","rp_pads_none":"Nessun controller rilevato. Collegane uno e premi un tasto qualsiasi.","rp_pad_mapped":"Gioca con la tua mappatura","join_check_unknown":"Questo controller non è nel nostro elenco, quindi i tasti potrebbero essere scambiati. Configurarlo richiede pochi secondi.","rp_pad_standard":"Riconosciuto","rp_pad_progress":"{n} di {total}","rp_pad_skip":"Salta","rp_pad_back":"Indietro","rp_pad_cancel":"Annulla","join_check_try":"Premi i tasti e muovi le levette: ciò che premi si illumina.","join_check_redo":"Rifai","join_check_map":"Configura i tasti","rp_pad_reset":"Ripristina","join_open_lan_body":"Niente Internet? Se sei sullo stesso Wi-Fi del tuo amico, apri la partita da lì.","join_open_lan":"Apri su questo Wi-Fi","join_path_lan":"Rete domestica","join_seat_taken":"{host} aveva bisogno di riavere il suo controller e sulla PS5 non c'era un altro controller libero, quindi sei uscito dalla partita. Chiedi a {host} di farti entrare di nuovo.","join_refused_key":"Questo invito è scaduto. Chiedi a {host} un nuovo link.","join_refused_expired":"Il tuo posto nella partita è perso. Chiedi a {host} di farti rientrare.","join_refused_full":"La partita è piena: ci sono già quattro giocatori.","join_refused_denied":"Stavolta {host} non ti ha fatto entrare.","join_refused_no_answer":"{host} non ha risposto in tempo. Avvisa {host}, poi riprova.","join_refused_closed":"Al momento {host} non sta ospitando Gioca insieme.","join_refused_old_helper":"La PS5 di {host} ha bisogno di un helper aggiornato per Gioca insieme.","join_refused_not_playing":"{host} non sta giocando ora. Chiedi prima a {host} di avviare Gioca.","join_refused_unreachable":"Il computer di {host} non è riuscito a raggiungere la PS5. Riprova tra poco.","join_refused_slow_down":"Troppi codici errati. Aspetta un minuto e riprova.","join_refused_address":"L'indirizzo di questo link è fuori dalla tua rete domestica, quindi l'app non lo userà. Chiedi a {host} un link con l'indirizzo IP del suo computer.","join_refused_other":"{host} non ti ha fatto entrare.","join_ended_kicked":"{host} ti ha tolto dalla partita.","join_ended_closed":"{host} ha chiuso Gioca insieme.","join_ended_host_stopped":"L'host ha smesso di giocare.","join_ended_replaced":"Questa partita è stata aperta in un'altra scheda o su un altro dispositivo, quindi qui si è fermata.","join_ended_pad_lost":"La PS5 ha perso il tuo controller, quindi sei fuori dalla partita. Chiedi a {host} di farti rientrare.","join_ended_gave_up":"La connessione con {host} non è tornata in tempo.","join_net_lost":"La connessione con {host} si è interrotta. Controlla la connessione Internet, poi chiedi di nuovo.","join_ended_lost":"Impossibile raggiungere {host}. Controlla di essere sulla stessa rete.","join_ended_left":"Sei uscito dalla partita.","join_net_mismatch":"Questo link non corrisponde all'host; chiedigliene uno nuovo.","join_net_no_direct":"Da questa rete non è possibile una connessione diretta (i router di entrambi i lati sono restrittivi). Prova il Wi-Fi invece dei dati mobili, oppure chiedi all'host di attivare UPnP.","join_net_no_room":"Questo invito non è più aperto. Chiedi a {host} un nuovo link.","join_net_full":"La partita di {host} non ha posto per un altro amico in questo momento. Riprova tra poco.","join_net_no_hub":"Impossibile raggiungere il servizio inviti di PS5Upload. Controlla la connessione a internet, poi riprova.","join_net_offer":"Il computer di {host} non è riuscito a connettersi a questo browser. Prova un altro browser.","join_net_no_webrtc":"Questo browser non può creare connessioni dirette. Prova una versione recente di Chrome, Safari o Firefox.","join_cancel":"Annulla","join_host_fallback":"il tuo amico","join_connecting":"Connessione a {host}…","join_waiting":"In attesa che {host} ti faccia entrare","join_waiting_body":"{host} vede il tuo nome sullo schermo e tocca Consenti.","join_retry":"Riprova","join_again":"Chiedi di nuovo di entrare","join_playing_at":"Giochi da {host}","join_you_are":"Sei il Giocatore {n}","join_seat_stream":"Stai giocando con l'utente PS5 di {host}. Non serve sceglierne uno.","join_plays_as":"Stai giocando come {profile}. Non devi sceglierne uno.","join_seat_tv_asks":"{host} ha scelto un profilo per te, ma non si è potuto usare. La TV ti chiederà chi sei.","join_picking":"Premi PS, poi scegli Gioco rapido sulla TV","join_hide_controls":"Nascondi","join_sound":"Tocca per l'audio","rp_unmute":"Audio attivo","rp_mute":"Muto","join_no_sound":"Nessun suono in questo browser","join_exit_fullscreen":"Esci da schermo intero","pad_fill":"Schermo intero","join_leave":"Esci","join_show_controls":"Mostra i comandi","join_hold_hint":"Tieni premuto sull'immagine per mostrare i pulsanti","pad_watch_no_hevc":"Questo dispositivo non può riprodurre l'immagine di questo stream: il computer trasmette in HEVC e questo dispositivo riproduce solo H.264.","pad_watch_decode":"Non è stato possibile riprodurre l'immagine qui.","join_pad_ready":"Il tuo controller è pronto","join_check_unknown_short":"Non è nel nostro elenco: i tasti potrebbero essere scambiati.","join_full_to_play":"Tocca schermo intero per giocare con il controller a schermo.","join_pad_none":"Collega un controller (USB o Bluetooth) e premi un tasto qualsiasi.","join_pad_keys":"Oppure usa la tastiera: WASD per muoverti, frecce croce direzionale, Invio ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Premi Indietro sul telecomando per vedere i pulsanti.","join_block_note":"{host} ha disattivato PS e Create per gli amici.","join_guide_title":"Ancora un passo sulla TV","join_guide_body":"Premi PS una volta sul controller. La TV chiede \"Chi sta usando questo controller?\". Scegli Gioco rapido o il tuo utente. L'host non deve fare nulla.","join_guide_menus":"Nella schermata iniziale della PS5 solo chi ospita controlla i menu; il tuo controller gioca dentro i giochi.","join_guide_ok":"Ho capito","join_host_away":"L'host ha smesso di giocare: in attesa che ricominci ({time})","join_reconnecting":"Riconnessione…","join_reconnecting_left":"Il tuo posto resta riservato per {time}.","pad_turn":"Ruota il telefono in orizzontale","join_game_label":"Partita di {host}","join_title":"Unisciti alla partita di un amico","join_title_body":"Gioca sulla PS5 di {host} come Giocatore 2, 3 o 4.","join_name_label":"Il tuo nome","join_name_hint":"Il tuo amico lo vede quando chiedi di entrare.","join_button":"Unisciti"},"ja":{"usb_skipped_not_payload":"{name}:.elf または .bin ファイルではありません","usb_skipped_unknown":"{id}: ペイロード一覧にありません","browser_unsupported":"デスクトップアプリが必要です。ブラウザーでは動作しません。","video_recovered_notice":"前回 Play が映像の開始中にクラッシュしたため、映像をグラフィックカードを使わずにデコードするようにしました(設定 › ウィンドウ › グラフィック › ハードウェア映像デコード で変更できます)。","video_recovered_title":"映像はソフトウェアでデコードされます","open_in_title":"PS5Upload アプリで開きますか?","open_in_body":"この端末に PS5Upload アプリがあれば、アプリで開けます。ブラウザーのまま続けることもできます。","open_in_app":"アプリで開く","open_in_browser":"ブラウザーで続ける","open_in_remember":"この端末で選択を記憶する","open_in_opening":"PS5Upload アプリを開いています…","open_in_not_opened":"何も起きませんか?この端末にアプリが入っていないかもしれません。","open_in_again":"再試行","pad_8bitdo_no_xinput":"この 8BitDo には X-input モードがありません。ボタンが違う場合はコントローラーを確認してください。","pad_8bitdo_how_switch":"背面のスイッチを X にして Start を押す","pad_8bitdo_how_startx":"電源を切り、Start + X を押したまま電源を入れる","pad_8bitdo_how_receiver":"付属の 2.4G レシーバーか USB ケーブルを使う","pad_8bitdo_how_manual":"方法は取扱説明書にあります","pad_8bitdo_xinput":"最適に使うには、8BitDo を X-input モードにしてください: {how}。","rp_touch_left_stick":"左スティック","rp_touch_right_stick":"右スティック","rp_touch_touchpad":"タッチパッド","rp_menu":"メニュー","rp_pad_step_lx":"左スティックを右に倒してください","rp_pad_step_ly":"左スティックを下に倒してください","rp_pad_step_rx":"右スティックを右に倒してください","rp_pad_step_ry":"右スティックを下に倒してください","join_check_bottom":"下のボタンを押してください (✕)","join_check_right":"右のボタンを押してください (○)","join_check_left":"左のボタンを押してください (□)","join_check_top":"上のボタンを押してください (△)","rp_pad_press":"{name} を押してください","join_check_saved":"このデバイスでこのコントローラー用に保存しました。下で試してください。","join_check_title":"コントローラーを確認","join_done":"完了","rp_pads_none":"コントローラーがまだ見つかりません。接続して、いずれかのボタンを押してください。","rp_pad_mapped":"あなたの割り当てで操作します","join_check_unknown":"このコントローラーは一覧にないため、ボタンが入れ替わっている可能性があります。設定は数秒で終わります。","rp_pad_standard":"認識済み","rp_pad_progress":"{n} / {total}","rp_pad_skip":"スキップ","rp_pad_back":"戻る","rp_pad_cancel":"キャンセル","join_check_try":"ボタンを押したりスティックを動かしたりしてください。押したものが光ります。","join_check_redo":"やり直す","join_check_map":"ボタンを設定","rp_pad_reset":"リセット","join_open_lan_body":"インターネットにつながりませんか?友だちと同じ Wi-Fi にいるなら、そこでゲームを開いてください。","join_open_lan":"この Wi-Fi で開く","join_path_lan":"ホームネットワーク","join_path_internet":"インターネット","join_seat_taken":"{host}が自分のコントローラーを必要とし、PS5に空いているコントローラーがほかになかったため、ゲームから退出しました。もう一度入れてもらうよう{host}に頼んでください。","join_refused_key":"この招待は期限切れです。{host}さんに新しいリンクをもらってください。","join_refused_expired":"ゲームの席がなくなりました。{host} さんにもう一度入れてもらってください。","join_refused_full":"満員です:すでに4人がプレイしています。","join_refused_denied":"今回は{host}さんに参加を許可されませんでした。","join_refused_no_answer":"{host} さんが時間内に応答しませんでした。{host} さんに伝えてから、もう一度お試しください。","join_refused_closed":"{host}さんは今「いっしょにプレイ」を開いていません。","join_refused_old_helper":"「いっしょにプレイ」を使うには、{host}さんのPS5のヘルパーを更新する必要があります。","join_refused_not_playing":"{host}さんは今プレイしていません。先に{host}さんにプレイを始めてもらってください。","join_refused_unreachable":"{host}さんのコンピューターがPS5に接続できませんでした。少ししてからもう一度お試しください。","join_refused_slow_down":"間違ったコードが多すぎます。1分待ってからもう一度お試しください。","join_refused_address":"このリンクのアドレスはホームネットワークの外にあるため、アプリは使用しません。{host} にコンピューターの IP アドレスのリンクを頼んでください。","join_refused_other":"{host}さんに参加を許可されませんでした。","join_ended_kicked":"{host}さんにゲームから外されました。","join_ended_closed":"{host}さんが「いっしょにプレイ」を終了しました。","join_ended_host_stopped":"ホストがプレイをやめました。","join_ended_replaced":"このゲームが別のタブまたは別のデバイスで開かれたため、ここでは終了しました。","join_ended_pad_lost":"PS5 があなたのコントローラーを見失ったため、ゲームから外れました。{host} さんにもう一度入れてもらってください。","join_ended_gave_up":"{host}さんとの接続が時間内に戻りませんでした。","join_net_lost":"{host} との接続が切れました。インターネット接続を確認してから、もう一度お願いしてください。","join_ended_lost":"{host}さんに接続できませんでした。同じネットワークにいるか確認してください。","join_ended_left":"ゲームから退出しました。","join_net_mismatch":"このリンクはホストと一致しません。ホストに新しいリンクをもらってください。","join_net_no_direct":"このネットワークからは直接接続できません(双方のルーターが厳しい設定です)。モバイルデータではなく Wi-Fi を試すか、ホストに UPnP をオンにしてもらってください。","join_net_no_room":"この招待はもう有効ではありません。{host}さんに新しいリンクをもらってください。","join_net_full":"{host}さんのゲームには今これ以上友だちが入れません。少ししてからもう一度お試しください。","join_net_no_hub":"PS5Upload の招待サービスに接続できませんでした。インターネット接続を確認して、もう一度お試しください。","join_net_offer":"{host}さんのコンピューターがこのブラウザーに接続できませんでした。別のブラウザーをお試しください。","join_net_no_webrtc":"このブラウザーは直接接続ができません。最新の Chrome、Safari、Firefox をお試しください。","join_cancel":"キャンセル","join_host_fallback":"フレンド","join_connecting":"{host}さんに接続中…","join_waiting":"{host}さんの許可を待っています","join_waiting_body":"{host}さんの画面にあなたの名前が表示され、「許可」をタップすると参加できます。","join_retry":"再試行","join_again":"もう一度参加をリクエスト","join_playing_at":"{host}さんのPS5でプレイ中","join_you_are":"あなたはプレイヤー{n}です","join_seat_stream":"{host}のPS5ユーザーとしてプレイしています。ユーザーを選ぶ必要はありません。","join_plays_as":"{profile}としてプレイしています。選ぶ必要はありません。","join_seat_tv_asks":"{host}があなた用のプロフィールを選びましたが、使えませんでした。テレビで誰がプレイするかを聞かれます。","join_picking":"PSボタンを押して、テレビで「クイックプレイ」を選んでください","join_hide_controls":"隠す","join_sound":"タップして音を出す","rp_unmute":"音声オン","rp_mute":"ミュート","join_no_sound":"このブラウザーでは音声を再生できません","join_exit_fullscreen":"全画面を終了","pad_fill":"全画面","join_leave":"退出","join_show_controls":"操作ボタンを表示","join_hold_hint":"画面を長押しするとボタンが表示されます","pad_watch_no_hevc":"この端末ではこの配信の映像を再生できません。PC は HEVC で配信していますが、この端末は H.264 のみ再生できます。","pad_watch_decode":"ここでは映像を再生できませんでした。","join_pad_ready":"コントローラーの準備ができました","join_check_unknown_short":"一覧にありません: ボタンが入れ替わっている可能性があります。","join_full_to_play":"全画面をタップすると、画面上のコントローラーでプレイできます。","join_pad_none":"コントローラーをつないで(USBまたはBluetooth)、いずれかのボタンを押してください。","join_pad_keys":"キーボードでも遊べます:WASDで移動、矢印キーで方向キー、Enter ✕、Backspace ○、Q □、E △、Tab OPTIONS。","join_tv_back_hint":"ボタンを表示するには、リモコンの戻るを押してください。","join_block_note":"{host}さんがフレンドのPSボタンとCreateボタンを無効にしています。","join_guide_title":"テレビであと1ステップ","join_guide_body":"コントローラーのPSボタンを1回押してください。テレビに「このコントローラーを使うのは誰ですか?」と表示されます。クイックプレイか自分のユーザーを選んでください。ホストの操作は不要です。","join_guide_menus":"PS5のホーム画面でメニューを操作できるのはホストだけです。あなたのコントローラーはゲームの中で使えます。","join_guide_ok":"OK","join_host_away":"ホストがプレイをやめました — 再開を待っています({time})","join_reconnecting":"再接続中…","join_reconnecting_left":"あと{time}は枠が確保されています。","pad_turn":"スマホを横向きにしてください","join_game_label":"{host}さんのゲーム","join_title":"フレンドのゲームに参加","join_title_body":"{host}さんのPS5でプレイヤー2・3・4として遊べます。","join_name_label":"あなたの名前","join_name_hint":"参加をリクエストすると、フレンドにこの名前が表示されます。","join_button":"参加"},"ko":{"usb_skipped_not_payload":"{name}: .elf 또는 .bin 파일이 아님","usb_skipped_unknown":"{id}: 더 이상 페이로드 목록에 없습니다","browser_unsupported":"데스크톱 앱이 필요합니다. 브라우저에서는 작동하지 않습니다.","video_recovered_notice":"지난번 화면을 시작하는 중에 Play가 충돌하여, 이제 그래픽 카드 없이 화면을 디코딩합니다(설정 › 창 › 그래픽 › 하드웨어 영상 디코딩에서 변경).","video_recovered_title":"이제 화면을 소프트웨어로 디코딩합니다","open_in_title":"PS5Upload 앱에서 열까요?","open_in_body":"이 기기에 PS5Upload 앱이 있나요? 앱에서 열거나 브라우저에서 계속하세요.","open_in_app":"앱에서 열기","open_in_browser":"브라우저에서 계속","open_in_remember":"이 기기에서 선택 기억하기","open_in_opening":"PS5Upload 앱을 여는 중…","open_in_not_opened":"아무 일도 없나요? 이 기기에 앱이 없을 수 있습니다.","open_in_again":"다시 시도","pad_8bitdo_no_xinput":"이 8BitDo에는 X-input 모드가 없습니다. 버튼이 다르게 동작하면 컨트롤러를 확인하세요.","pad_8bitdo_how_switch":"뒷면 스위치를 X로 놓고 Start를 누르세요","pad_8bitdo_how_startx":"전원을 끈 다음 Start + X를 누른 채로 켜세요","pad_8bitdo_how_receiver":"2.4G 수신기나 USB 케이블을 사용하세요","pad_8bitdo_how_manual":"방법은 설명서에 있습니다","pad_8bitdo_xinput":"가장 잘 동작하도록 8BitDo를 X-input 모드로 바꾸세요: {how}.","rp_touch_left_stick":"왼쪽 스틱","rp_touch_right_stick":"오른쪽 스틱","rp_touch_touchpad":"터치패드","rp_menu":"메뉴","rp_pad_step_lx":"왼쪽 스틱을 오른쪽으로 미세요","rp_pad_step_ly":"왼쪽 스틱을 아래로 미세요","rp_pad_step_rx":"오른쪽 스틱을 오른쪽으로 미세요","rp_pad_step_ry":"오른쪽 스틱을 아래로 미세요","join_check_bottom":"아래쪽 버튼을 누르세요 (✕)","join_check_right":"오른쪽 버튼을 누르세요 (○)","join_check_left":"왼쪽 버튼을 누르세요 (□)","join_check_top":"위쪽 버튼을 누르세요 (△)","rp_pad_press":"{name} 버튼을 누르세요","join_check_saved":"이 기기에서 이 컨트롤러용으로 저장했습니다. 아래에서 시험해 보세요.","join_check_title":"컨트롤러 확인","join_done":"완료","rp_pads_none":"아직 컨트롤러가 보이지 않습니다. 컨트롤러를 연결하고 아무 버튼이나 누르세요.","rp_pad_mapped":"내 버튼 설정으로 플레이","join_check_unknown":"이 컨트롤러는 목록에 없어서 버튼이 뒤바뀌어 있을 수 있습니다. 설정은 몇 초면 됩니다.","rp_pad_standard":"인식됨","rp_pad_progress":"{n} / {total}","rp_pad_skip":"건너뛰기","rp_pad_back":"뒤로","rp_pad_cancel":"취소","join_check_try":"버튼을 누르고 스틱을 움직여 보세요. 누른 것이 켜집니다.","join_check_redo":"다시 하기","join_check_map":"버튼 설정","rp_pad_reset":"초기화","join_open_lan_body":"인터넷에 연결되지 않나요? 친구와 같은 Wi-Fi에 있다면 거기서 게임을 여세요.","join_open_lan":"이 Wi-Fi에서 열기","join_path_lan":"홈 네트워크","join_path_internet":"인터넷","join_seat_taken":"{host} 님이 컨트롤러를 다시 써야 했는데 PS5에 남은 컨트롤러가 없어서 게임에서 나왔어요. {host} 님에게 다시 들여보내 달라고 하세요.","join_refused_key":"초대가 만료됐어요. {host} 님에게 새 링크를 요청하세요.","join_refused_expired":"게임 자리를 잃었습니다. {host} 님에게 다시 들여보내 달라고 하세요.","join_refused_full":"게임이 꽉 찼어요. 이미 4명이 플레이 중이에요.","join_refused_denied":"이번에는 {host} 님이 참여를 허용하지 않았어요.","join_refused_no_answer":"{host} 님이 제시간에 응답하지 않았습니다. {host} 님에게 알린 뒤 다시 시도하세요.","join_refused_closed":"{host} 님은 지금 함께 플레이를 열고 있지 않아요.","join_refused_old_helper":"함께 플레이를 하려면 {host} 님의 PS5 헬퍼를 업데이트해야 해요.","join_refused_not_playing":"{host} 님은 지금 플레이 중이 아니에요. {host} 님에게 먼저 플레이를 시작해 달라고 하세요.","join_refused_unreachable":"{host} 님의 컴퓨터가 PS5에 연결하지 못했어요. 잠시 후 다시 시도하세요.","join_refused_slow_down":"잘못된 코드를 너무 많이 입력했어요. 1분 후에 다시 시도하세요.","join_refused_address":"이 링크의 주소는 홈 네트워크 밖에 있어 앱에서 사용하지 않습니다. {host}에게 컴퓨터의 IP 주소가 있는 링크를 요청하세요.","join_refused_other":"{host} 님이 참여를 허용하지 않았어요.","join_ended_kicked":"{host} 님이 나를 게임에서 내보냈어요.","join_ended_closed":"{host} 님이 함께 플레이를 닫았어요.","join_ended_host_stopped":"호스트가 플레이를 멈췄어요.","join_ended_replaced":"이 게임이 다른 탭이나 다른 기기에서 열려서 여기서는 멈췄습니다.","join_ended_pad_lost":"PS5가 컨트롤러를 잃어서 게임에서 나왔습니다. {host} 님에게 다시 들여보내 달라고 하세요.","join_ended_gave_up":"{host} 님과의 연결이 제때 돌아오지 않았어요.","join_net_lost":"{host}와의 연결이 끊겼어요. 인터넷 연결을 확인한 다음 다시 요청하세요.","join_ended_lost":"{host} 님에게 연결할 수 없어요. 같은 네트워크에 있는지 확인하세요.","join_ended_left":"게임에서 나왔어요.","join_net_mismatch":"이 링크는 호스트와 일치하지 않아요. 새 링크를 요청하세요.","join_net_no_direct":"이 네트워크에서는 직접 연결할 수 없어요(양쪽 공유기가 모두 엄격해요). 모바일 데이터 대신 Wi-Fi를 쓰거나 호스트에게 UPnP를 켜 달라고 하세요.","join_net_no_room":"이 초대는 더 이상 열려 있지 않아요. {host} 님에게 새 링크를 요청하세요.","join_net_full":"{host} 님의 게임에 지금은 친구가 더 들어갈 자리가 없어요. 잠시 후 다시 시도하세요.","join_net_no_hub":"PS5Upload 초대 서비스에 연결할 수 없어요. 인터넷 연결을 확인한 뒤 다시 시도하세요.","join_net_offer":"{host} 님의 컴퓨터가 이 브라우저에 연결하지 못했어요. 다른 브라우저를 써 보세요.","join_net_no_webrtc":"이 브라우저는 직접 연결을 할 수 없어요. 최신 Chrome, Safari 또는 Firefox를 써 보세요.","join_cancel":"취소","join_host_fallback":"친구","join_connecting":"{host} 님에게 연결 중…","join_waiting":"{host} 님이 허용하기를 기다리는 중","join_waiting_body":"{host} 님 화면에 내 이름이 보이고, 허용을 누르면 들어갈 수 있어요.","join_retry":"다시 시도","join_again":"다시 참여 요청","join_playing_at":"{host} 님의 PS5에서 플레이 중","join_you_are":"나는 플레이어 {n}","join_seat_stream":"{host} 님의 PS5 사용자로 플레이하고 있어요. 사용자를 고를 필요가 없어요.","join_plays_as":"{profile}(으)로 플레이하고 있어요. 고를 필요가 없어요.","join_seat_tv_asks":"{host} 님이 프로필을 골라 두었지만 쓸 수 없었어요. TV에서 누구인지 물어볼 거예요.","join_picking":"PS 버튼을 누른 다음 TV에서 빠른 플레이를 선택하세요","join_hide_controls":"숨기기","join_sound":"눌러서 소리 켜기","rp_unmute":"소리 켜기","rp_mute":"음소거","join_no_sound":"이 브라우저에서는 소리가 나오지 않습니다","join_exit_fullscreen":"전체 화면 종료","pad_fill":"전체 화면","join_leave":"나가기","join_show_controls":"컨트롤 표시","join_hold_hint":"화면을 길게 누르면 버튼이 표시됩니다","pad_watch_no_hevc":"이 기기는 이 스트림의 화면을 재생할 수 없습니다. 컴퓨터는 HEVC로 스트리밍하고 이 기기는 H.264만 재생합니다.","pad_watch_decode":"여기서 화면을 재생할 수 없었습니다.","join_pad_ready":"컨트롤러가 준비됐어요","join_check_unknown_short":"목록에 없음: 버튼이 뒤바뀌어 있을 수 있습니다.","join_full_to_play":"전체 화면을 탭하면 화면 컨트롤러로 플레이할 수 있어요.","join_pad_none":"컨트롤러를 연결(USB 또는 Bluetooth)하고 아무 버튼이나 누르세요.","join_pad_keys":"키보드로도 할 수 있어요: WASD 이동, 방향키 D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"버튼을 보려면 리모컨의 뒤로 버튼을 누르세요.","join_block_note":"{host} 님이 친구의 PS 및 Create 버튼을 막아 두었어요.","join_guide_title":"TV에서 한 단계만 더","join_guide_body":"컨트롤러의 PS 버튼을 한 번 누르세요. TV에 \"이 컨트롤러를 누가 사용하나요?\"가 나타나요. 빠른 플레이나 내 사용자를 선택하세요. 호스트는 아무것도 하지 않아도 돼요.","join_guide_menus":"PS5 홈 화면에서는 호스트만 메뉴를 조작할 수 있어요. 내 컨트롤러는 게임 안에서 플레이합니다.","join_guide_ok":"알겠어요","join_host_away":"호스트가 플레이를 멈췄어요 — 다시 시작하기를 기다리는 중 ({time})","join_reconnecting":"다시 연결 중…","join_reconnecting_left":"{time} 동안 자리가 유지돼요.","pad_turn":"휴대폰을 가로로 돌리세요","join_game_label":"{host} 님의 게임","join_title":"친구 게임에 참여","join_title_body":"{host} 님의 PS5에서 플레이어 2, 3, 4로 플레이하세요.","join_name_label":"내 이름","join_name_hint":"참여를 요청하면 친구에게 이 이름이 보여요.","join_button":"참여"},"pl":{"usb_skipped_not_payload":"{name}: to nie jest plik .elf ani .bin","usb_skipped_unknown":"{id}: nie ma już na liście payloadów","browser_unsupported":"To wymaga aplikacji na komputer. W przeglądarce nie działa.","video_recovered_notice":"Ostatnio Play zawiesił się przy uruchamianiu obrazu, więc obraz jest teraz dekodowany bez karty graficznej (zmień w Ustawienia › Okno › Grafika › Sprzętowe dekodowanie wideo).","video_recovered_title":"Obraz jest teraz dekodowany programowo","open_in_title":"Otworzyć w aplikacji PS5Upload?","open_in_body":"Masz aplikację PS5Upload na tym urządzeniu? Otwórz to w niej albo kontynuuj w przeglądarce.","open_in_app":"Otwórz w aplikacji","open_in_browser":"Kontynuuj w przeglądarce","open_in_remember":"Zapamiętaj mój wybór na tym urządzeniu","open_in_opening":"Otwieranie aplikacji PS5Upload…","open_in_not_opened":"Nic się nie stało? Aplikacji może nie być na tym urządzeniu.","open_in_again":"Spróbuj ponownie","pad_8bitdo_no_xinput":"Ten 8BitDo nie ma trybu X-input. Jeśli któryś przycisk działa źle, sprawdź kontroler.","pad_8bitdo_how_switch":"ustaw przełącznik z tyłu na X, a potem naciśnij Start","pad_8bitdo_how_startx":"wyłącz go, a potem przytrzymaj Start + X, aby go włączyć","pad_8bitdo_how_receiver":"użyj jego odbiornika 2.4G lub kabla USB","pad_8bitdo_how_manual":"instrukcja podaje, jak to zrobić","pad_8bitdo_xinput":"Aby działał najlepiej, przełącz 8BitDo w tryb X-input: {how}.","rp_touch_left_stick":"Lewa gałka","rp_touch_right_stick":"Prawa gałka","rp_touch_touchpad":"Panel dotykowy","rp_pad_step_lx":"Wychyl lewą gałkę w prawo","rp_pad_step_ly":"Wychyl lewą gałkę w dół","rp_pad_step_rx":"Wychyl prawą gałkę w prawo","rp_pad_step_ry":"Wychyl prawą gałkę w dół","join_check_bottom":"Naciśnij dolny przycisk (✕)","join_check_right":"Naciśnij prawy przycisk (○)","join_check_left":"Naciśnij lewy przycisk (□)","join_check_top":"Naciśnij górny przycisk (△)","rp_pad_press":"Naciśnij {name}","join_check_saved":"Zapisano dla tego kontrolera na tym urządzeniu. Wypróbuj poniżej.","join_check_title":"Sprawdź kontroler","join_done":"Gotowe","rp_pads_none":"Nie wykryto jeszcze kontrolera. Podłącz go i naciśnij dowolny przycisk.","rp_pad_mapped":"Gra z twoim mapowaniem","join_check_unknown":"Tego kontrolera nie ma na naszej liście, więc przyciski mogą być pomieszane. Konfiguracja zajmuje kilka sekund.","rp_pad_standard":"Rozpoznany","rp_pad_progress":"{n} z {total}","rp_pad_skip":"Pomiń","rp_pad_back":"Wstecz","rp_pad_cancel":"Anuluj","join_check_try":"Naciskaj przyciski i ruszaj gałkami: to, co naciśniesz, się podświetli.","join_check_redo":"Powtórz","join_check_map":"Ustaw przyciski","rp_pad_reset":"Resetuj","join_open_lan_body":"Brak internetu? Jeśli jesteś w tej samej sieci Wi-Fi co znajomy, otwórz grę tam.","join_open_lan":"Otwórz w tej sieci Wi-Fi","join_path_lan":"Sieć domowa","join_seat_taken":"{host} potrzebował z powrotem swojego kontrolera, a na PS5 nie było innego wolnego kontrolera, więc wypadasz z gry. Poproś {host}, żeby wpuścił Cię ponownie.","join_refused_key":"To zaproszenie wygasło. Poproś {host} o nowy link.","join_refused_expired":"Twoje miejsce w grze przepadło. Poproś {host} o ponowne wpuszczenie.","join_refused_full":"Brak miejsc: gra już czterech graczy.","join_refused_denied":"{host} tym razem cię nie wpuścił.","join_refused_no_answer":"{host}: brak odpowiedzi na czas. Daj znać ({host}) i spróbuj ponownie.","join_refused_closed":"{host} nie prowadzi teraz Graj razem.","join_refused_old_helper":"PS5 {host} potrzebuje zaktualizowanego pomocnika do Graj razem.","join_refused_not_playing":"{host} teraz nie gra. Poproś {host}, żeby najpierw uruchomił Graj.","join_refused_unreachable":"Komputer {host} nie mógł połączyć się z PS5. Spróbuj ponownie za chwilę.","join_refused_slow_down":"Zbyt wiele błędnych kodów. Odczekaj minutę i spróbuj ponownie.","join_refused_address":"Adres tego linku jest poza Twoją siecią domową, więc aplikacja go nie użyje. Poproś {host} o link z adresem IP komputera.","join_refused_other":"{host} cię nie wpuścił.","join_ended_kicked":"{host} usunął cię z gry.","join_ended_closed":"{host} zamknął Graj razem.","join_ended_host_stopped":"Gospodarz przestał grać.","join_ended_replaced":"Tę grę otwarto w innej karcie lub na innym urządzeniu, więc tu się zatrzymała.","join_ended_pad_lost":"PS5 straciła Twój kontroler, więc wypadasz z gry. Poproś {host} o ponowne wpuszczenie.","join_ended_gave_up":"Połączenie z {host} nie wróciło na czas.","join_net_lost":"Połączenie z {host} zostało przerwane. Sprawdź połączenie internetowe i poproś ponownie.","join_ended_lost":"Nie można połączyć się z {host}. Sprawdź, czy jesteście w tej samej sieci.","join_ended_left":"Opuściłeś grę.","join_net_mismatch":"Ten link nie pasuje do gospodarza; poproś go o nowy.","join_net_no_direct":"Z tej sieci nie da się nawiązać bezpośredniego połączenia (routery po obu stronach są restrykcyjne). Spróbuj Wi-Fi zamiast danych komórkowych albo poproś gospodarza o włączenie UPnP.","join_net_no_room":"To zaproszenie nie jest już otwarte. Poproś {host} o nowy link.","join_net_full":"W grze {host} nie ma teraz miejsca dla kolejnego znajomego. Spróbuj ponownie za chwilę.","join_net_no_hub":"Nie można połączyć się z usługą zaproszeń PS5Upload. Sprawdź połączenie z internetem i spróbuj ponownie.","join_net_offer":"Komputer {host} nie mógł połączyć się z tą przeglądarką. Spróbuj innej przeglądarki.","join_net_no_webrtc":"Ta przeglądarka nie potrafi nawiązywać bezpośrednich połączeń. Spróbuj aktualnego Chrome, Safari lub Firefoksa.","join_cancel":"Anuluj","join_host_fallback":"twój znajomy","join_connecting":"Łączenie z {host}…","join_waiting":"Czekasz, aż {host} cię wpuści","join_waiting_body":"{host} widzi twoje imię na ekranie i stuka Zezwól.","join_retry":"Spróbuj ponownie","join_again":"Poproś ponownie o dołączenie","join_playing_at":"Grasz u {host}","join_you_are":"Jesteś Graczem {n}","join_seat_stream":"Grasz jako użytkownik PS5 gospodarza {host}. Nie musisz nikogo wybierać.","join_plays_as":"Grasz jako {profile}. Nie musisz niczego wybierać.","join_seat_tv_asks":"{host} wybrał dla ciebie profil, ale nie dało się go użyć. Telewizor zapyta, kim jesteś.","join_picking":"Naciśnij PS, a potem wybierz Szybką grę na telewizorze","join_hide_controls":"Ukryj","join_sound":"Włącz dźwięk","rp_unmute":"Dźwięk wł.","rp_mute":"Wycisz","join_no_sound":"Brak dźwięku w tej przeglądarce","join_exit_fullscreen":"Wyjdź z pełnego ekranu","pad_fill":"Pełny ekran","join_leave":"Wyjdź","join_show_controls":"Pokaż przyciski","join_hold_hint":"Przytrzymaj obraz, aby pokazać przyciski","pad_watch_no_hevc":"To urządzenie nie odtworzy obrazu tego streamu: komputer nadaje w HEVC, a to urządzenie odtwarza tylko H.264.","pad_watch_decode":"Nie udało się tu odtworzyć obrazu.","join_pad_ready":"Twój kontroler jest gotowy","join_check_unknown_short":"Nie ma go na liście: przyciski mogą być pomieszane.","join_full_to_play":"Stuknij Pełny ekran, aby grać kontrolerem ekranowym.","join_pad_none":"Podłącz kontroler (USB lub Bluetooth) i naciśnij dowolny przycisk.","join_pad_keys":"Albo użyj klawiatury: WASD ruch, strzałki krzyżak, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Naciśnij Wstecz na pilocie, aby pokazać przyciski.","join_block_note":"{host} wyłączył PS i Create dla znajomych.","join_guide_title":"Jeszcze jeden krok na telewizorze","join_guide_body":"Naciśnij raz PS na kontrolerze. Telewizor zapyta „Kto używa tego kontrolera?”. Wybierz Szybką grę albo swojego użytkownika. Gospodarz nie musi nic robić.","join_guide_menus":"Na ekranie głównym PS5 menu steruje tylko gospodarz; twój kontroler działa w grach.","join_guide_ok":"Rozumiem","join_host_away":"Gospodarz przestał grać — czekamy, aż zacznie znowu ({time})","join_reconnecting":"Ponowne łączenie…","join_reconnecting_left":"Twoje miejsce czeka jeszcze {time}.","pad_turn":"Obróć telefon poziomo","join_game_label":"Gra {host}","join_title":"Dołącz do gry znajomego","join_title_body":"Graj na PS5 {host} jako Gracz 2, 3 lub 4.","join_name_label":"Twoje imię","join_name_hint":"Znajomy zobaczy je, gdy poprosisz o dołączenie.","join_button":"Dołącz"},"pt-BR":{"usb_skipped_not_payload":"{name}: não é um arquivo .elf ou .bin","usb_skipped_unknown":"{id}: não está mais na lista de payloads","browser_unsupported":"Isso precisa do aplicativo para desktop. Não funciona no navegador.","video_recovered_notice":"O Play travou ao iniciar a imagem da última vez, então a imagem agora é decodificada sem a placa de vídeo (altere em Configurações › Janela › Gráficos › Decodificação de vídeo por hardware).","video_recovered_title":"Imagem agora decodificada por software","open_in_title":"Abrir no app PS5Upload?","open_in_body":"Tem o app PS5Upload neste aparelho? Abra por ele ou continue no navegador.","open_in_app":"Abrir no app","open_in_browser":"Continuar no navegador","open_in_remember":"Lembrar minha escolha neste aparelho","open_in_opening":"Abrindo o app PS5Upload…","open_in_not_opened":"Nada aconteceu? Talvez o app não esteja neste aparelho.","open_in_again":"Tentar de novo","pad_8bitdo_no_xinput":"Este 8BitDo não tem modo X-input. Se algum botão estiver errado, verifique o controle.","pad_8bitdo_how_switch":"coloque a chave de trás em X e aperte Start","pad_8bitdo_how_startx":"desligue e depois segure Start + X para ligar","pad_8bitdo_how_receiver":"use o receptor 2.4G dele ou um cabo USB","pad_8bitdo_how_manual":"o manual dele explica como","pad_8bitdo_xinput":"Para o melhor resultado, coloque seu 8BitDo no modo X-input: {how}.","rp_touch_left_stick":"Analógico esquerdo","rp_touch_right_stick":"Analógico direito","rp_pad_step_lx":"Mova o analógico esquerdo para a direita","rp_pad_step_ly":"Mova o analógico esquerdo para baixo","rp_pad_step_rx":"Mova o analógico direito para a direita","rp_pad_step_ry":"Mova o analógico direito para baixo","join_check_bottom":"Aperte o botão de baixo (✕)","join_check_right":"Aperte o botão da direita (○)","join_check_left":"Aperte o botão da esquerda (□)","join_check_top":"Aperte o botão de cima (△)","rp_pad_press":"Pressione {name}","join_check_saved":"Salvo para este controle neste aparelho. Teste abaixo.","join_check_title":"Verificar seu controle","join_done":"Concluído","rp_pads_none":"Nenhum controle detectado ainda. Conecte um e pressione qualquer botão nele.","rp_pad_mapped":"Joga com o seu mapeamento","join_check_unknown":"Este controle não está na nossa lista, então os botões podem estar trocados. Configurar leva poucos segundos.","rp_pad_standard":"Reconhecido","rp_pad_progress":"{n} de {total}","rp_pad_skip":"Pular","rp_pad_back":"Voltar","rp_pad_cancel":"Cancelar","join_check_try":"Aperte botões e mova os analógicos: o que você apertar acende.","join_check_redo":"Refazer","join_check_map":"Configurar os botões","rp_pad_reset":"Redefinir","join_open_lan_body":"Sem internet? Se você está no mesmo Wi-Fi que seu amigo, abra o jogo por lá.","join_open_lan":"Abrir neste Wi-Fi","join_path_lan":"Rede doméstica","join_seat_taken":"{host} precisou do controle de volta e não havia outro controle livre no PS5, então você saiu do jogo. Peça para {host} deixar você entrar de novo.","join_refused_key":"Este convite expirou. Peça um novo link a {host}.","join_refused_expired":"Seu lugar no jogo foi perdido. Peça a {host} para deixar você entrar de novo.","join_refused_full":"O jogo está cheio: já tem quatro jogadores.","join_refused_denied":"{host} não deixou você entrar desta vez.","join_refused_no_answer":"{host} não respondeu a tempo. Avise {host} e tente de novo.","join_refused_closed":"{host} não está com o Jogar juntos aberto agora.","join_refused_old_helper":"O PS5 de {host} precisa de um auxiliar atualizado para o Jogar juntos.","join_refused_not_playing":"{host} não está jogando agora. Peça para {host} iniciar o Jogar primeiro.","join_refused_unreachable":"O computador de {host} não conseguiu acessar o PS5. Tente de novo daqui a pouco.","join_refused_slow_down":"Muitos códigos errados. Espere um minuto e tente de novo.","join_refused_address":"O endereço deste link está fora da sua rede doméstica, então o aplicativo não vai usá-lo. Peça a {host} um link com o endereço IP do computador.","join_refused_other":"{host} não deixou você entrar.","join_ended_kicked":"{host} tirou você do jogo.","join_ended_closed":"{host} fechou o Jogar juntos.","join_ended_host_stopped":"O anfitrião parou de jogar.","join_ended_replaced":"Este jogo foi aberto em outra aba ou em outro dispositivo, então parou aqui.","join_ended_pad_lost":"O PS5 perdeu seu controle, então você saiu do jogo. Peça a {host} para deixar você entrar de novo.","join_ended_gave_up":"A conexão com {host} não voltou a tempo.","join_net_lost":"A conexão com {host} caiu. Verifique sua conexão de internet e peça de novo.","join_ended_lost":"Não foi possível alcançar {host}. Verifique se vocês estão na mesma rede.","join_ended_left":"Você saiu do jogo.","join_net_mismatch":"Este link não corresponde ao anfitrião; peça um novo a ele.","join_net_no_direct":"Não é possível uma conexão direta a partir desta rede (os roteadores dos dois lados são restritos). Tente o Wi-Fi em vez dos dados móveis ou peça ao anfitrião para ativar o UPnP.","join_net_no_room":"Este convite não está mais aberto. Peça a {host} um novo link.","join_net_full":"O jogo de {host} não tem lugar para mais um amigo agora. Tente de novo daqui a pouco.","join_net_no_hub":"Não foi possível alcançar o serviço de convites do PS5Upload. Verifique sua conexão com a internet e tente de novo.","join_net_offer":"O computador de {host} não conseguiu se conectar a este navegador. Tente outro navegador.","join_net_no_webrtc":"Este navegador não consegue fazer conexões diretas. Tente uma versão recente do Chrome, Safari ou Firefox.","join_cancel":"Cancelar","join_host_fallback":"seu amigo","join_connecting":"Conectando a {host}…","join_waiting":"Esperando {host} deixar você entrar","join_waiting_body":"{host} vê seu nome na tela e toca em Permitir.","join_retry":"Tentar de novo","join_again":"Pedir para entrar de novo","join_playing_at":"Jogando na casa de {host}","join_you_are":"Você é o Jogador {n}","join_seat_stream":"Você está jogando com o usuário do PS5 de {host}. Não precisa escolher um.","join_plays_as":"Você está jogando como {profile}. Não precisa escolher.","join_seat_tv_asks":"{host} escolheu um perfil para você, mas não foi possível usá-lo. A TV vai perguntar quem você é.","join_picking":"Aperte PS e depois escolha Jogo rápido na TV","join_hide_controls":"Ocultar","join_sound":"Ativar som","rp_unmute":"Ativar som","rp_mute":"Silenciar","join_no_sound":"Sem som neste navegador","join_exit_fullscreen":"Sair da tela cheia","pad_fill":"Tela cheia","join_leave":"Sair","join_show_controls":"Mostrar controles","join_hold_hint":"Toque e segure a imagem para mostrar os botões","pad_watch_no_hevc":"Este aparelho não reproduz a imagem deste stream: o computador transmite em HEVC e este aparelho reproduz apenas H.264.","pad_watch_decode":"Não foi possível reproduzir a imagem aqui.","join_pad_ready":"Seu controle está pronto","join_check_unknown_short":"Não está na nossa lista: os botões podem estar trocados.","join_full_to_play":"Toque em tela cheia para jogar com o controle na tela.","join_pad_none":"Conecte um controle (USB ou Bluetooth) e aperte qualquer botão.","join_pad_keys":"Ou use o teclado: WASD move, setas direcional, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Aperte Voltar no controle remoto para ver os botões.","join_block_note":"{host} desativou PS e Create para amigos.","join_guide_title":"Mais um passo na TV","join_guide_body":"Aperte PS uma vez no seu controle. A TV pergunta \"Quem está usando este controle?\". Escolha Jogo rápido ou o seu próprio usuário. O anfitrião não precisa fazer nada.","join_guide_menus":"Na tela inicial do PS5 só o anfitrião controla os menus; seu controle joga dentro dos jogos.","join_guide_ok":"Entendi","join_host_away":"O anfitrião parou de jogar — esperando ele começar de novo ({time})","join_reconnecting":"Reconectando…","join_reconnecting_left":"Seu lugar fica guardado por {time}.","pad_turn":"Vire o celular na horizontal","join_game_label":"Jogo de {host}","join_title":"Entrar no jogo de um amigo","join_title_body":"Jogue no PS5 de {host} como Jogador 2, 3 ou 4.","join_name_label":"Seu nome","join_name_hint":"Seu amigo vê isto quando você pede para entrar.","join_button":"Entrar"},"ru":{"usb_skipped_not_payload":"{name}: не файл .elf или .bin","usb_skipped_unknown":"{id}: больше нет в списке пейлоадов","browser_unsupported":"Для этого нужно настольное приложение. В браузере это не работает.","video_recovered_notice":"В прошлый раз Play упал при запуске картинки, поэтому теперь картинка декодируется без видеокарты (изменить: Настройки › Окно › Графика › Аппаратное декодирование видео).","video_recovered_title":"Картинка теперь декодируется программно","open_in_title":"Открыть в приложении PS5Upload?","open_in_body":"Приложение PS5Upload есть на этом устройстве? Откройте это там или продолжите в браузере.","open_in_app":"Открыть в приложении","open_in_browser":"Продолжить в браузере","open_in_remember":"Запомнить выбор на этом устройстве","open_in_opening":"Открываем приложение PS5Upload…","open_in_not_opened":"Ничего не произошло? Возможно, приложения нет на этом устройстве.","open_in_again":"Повторить","pad_8bitdo_no_xinput":"У этого 8BitDo нет режима X-input. Если кнопка срабатывает не так, проверьте контроллер.","pad_8bitdo_how_switch":"переведите переключатель сзади в положение X, затем нажмите Start","pad_8bitdo_how_startx":"выключите его, затем включите, удерживая Start + X","pad_8bitdo_how_receiver":"используйте его приёмник 2.4G или кабель USB","pad_8bitdo_how_manual":"как это сделать, сказано в его инструкции","pad_8bitdo_xinput":"Для лучшего результата переключите 8BitDo в режим X-input: {how}.","rp_touch_left_stick":"Левый стик","rp_touch_right_stick":"Правый стик","rp_touch_touchpad":"Сенсорная панель","rp_menu":"Меню","rp_pad_step_lx":"Отклоните левый стик вправо","rp_pad_step_ly":"Отклоните левый стик вниз","rp_pad_step_rx":"Отклоните правый стик вправо","rp_pad_step_ry":"Отклоните правый стик вниз","join_check_bottom":"Нажмите нижнюю кнопку (✕)","join_check_right":"Нажмите правую кнопку (○)","join_check_left":"Нажмите левую кнопку (□)","join_check_top":"Нажмите верхнюю кнопку (△)","rp_pad_press":"Нажмите {name}","join_check_saved":"Сохранено для этого контроллера на этом устройстве. Попробуйте ниже.","join_check_title":"Проверить контроллер","join_done":"Готово","rp_pads_none":"Контроллер пока не найден. Подключите его и нажмите любую кнопку.","rp_pad_mapped":"Играет с вашей раскладкой","join_check_unknown":"Этого контроллера нет в нашем списке, поэтому кнопки могут быть перепутаны. Настройка займёт несколько секунд.","rp_pad_standard":"Распознан","rp_pad_progress":"{n} из {total}","rp_pad_skip":"Пропустить","rp_pad_back":"Назад","rp_pad_cancel":"Отмена","join_check_try":"Нажимайте кнопки и двигайте стики: нажатое подсвечивается.","join_check_redo":"Заново","join_check_map":"Настроить кнопки","rp_pad_reset":"Сбросить","join_open_lan_body":"Нет доступа к интернету? Если вы в той же сети Wi-Fi, что и друг, откройте игру там.","join_open_lan":"Открыть в этой сети Wi-Fi","join_path_lan":"Домашняя сеть","join_path_internet":"Интернет","join_seat_taken":"{host} понадобился его контроллер, а других свободных контроллеров на PS5 не было, поэтому вы вышли из игры. Попросите {host} впустить вас снова.","join_refused_key":"Срок приглашения истёк. Попросите у {host} новую ссылку.","join_refused_expired":"Ваше место в игре потеряно. Попросите {host} впустить вас снова.","join_refused_full":"Мест нет: уже играют четверо.","join_refused_denied":"{host} в этот раз вас не впустил.","join_refused_no_answer":"{host} не ответил вовремя. Сообщите {host} и попробуйте ещё раз.","join_refused_closed":"{host} сейчас не проводит «Совместную игру».","join_refused_old_helper":"Для «Совместной игры» на PS5 {host} нужен обновлённый помощник.","join_refused_not_playing":"{host} сейчас не играет. Попросите {host} сначала запустить Игру.","join_refused_unreachable":"Компьютер {host} не смог связаться с PS5. Попробуйте ещё раз чуть позже.","join_refused_slow_down":"Слишком много неверных кодов. Подождите минуту и попробуйте снова.","join_refused_address":"Адрес этой ссылки находится вне вашей домашней сети, поэтому приложение его не использует. Попросите {host} дать ссылку с IP-адресом компьютера.","join_refused_other":"{host} вас не впустил.","join_ended_kicked":"{host} убрал вас из игры.","join_ended_closed":"{host} закрыл «Совместную игру».","join_ended_host_stopped":"Хост перестал играть.","join_ended_replaced":"Эту игру открыли в другой вкладке или на другом устройстве, поэтому здесь она остановилась.","join_ended_pad_lost":"PS5 потеряла ваш контроллер, поэтому вы вышли из игры. Попросите {host} впустить вас снова.","join_ended_gave_up":"Соединение с {host} не восстановилось вовремя.","join_net_lost":"Соединение с {host} прервалось. Проверьте подключение к интернету и попросите ещё раз.","join_ended_lost":"Не удалось связаться с {host}. Проверьте, что вы в одной сети.","join_ended_left":"Вы вышли из игры.","join_net_mismatch":"Эта ссылка не совпадает с хостом; попросите у него новую.","join_net_no_direct":"Из этой сети прямое подключение невозможно (роутеры с обеих сторон строгие). Попробуйте Wi-Fi вместо мобильного интернета или попросите хоста включить UPnP.","join_net_no_room":"Это приглашение больше не действует. Попросите у {host} новую ссылку.","join_net_full":"В игре {host} сейчас нет места для ещё одного друга. Попробуйте чуть позже.","join_net_no_hub":"Не удалось связаться со службой приглашений PS5Upload. Проверьте подключение к интернету и попробуйте снова.","join_net_offer":"Компьютер {host} не смог подключиться к этому браузеру. Попробуйте другой браузер.","join_net_no_webrtc":"Этот браузер не умеет устанавливать прямые подключения. Попробуйте свежую версию Chrome, Safari или Firefox.","join_cancel":"Отмена","join_host_fallback":"ваш друг","join_connecting":"Подключение к {host}…","join_waiting":"Ждём, пока {host} вас впустит","join_waiting_body":"{host} видит ваше имя на экране и нажимает «Разрешить».","join_retry":"Повторить","join_again":"Снова попроситься в игру","join_playing_at":"Игра у {host}","join_you_are":"Вы — Игрок {n}","join_seat_stream":"Вы играете под пользователем PS5 хоста {host}. Выбирать пользователя не нужно.","join_plays_as":"Вы играете как {profile}. Выбирать никого не нужно.","join_seat_tv_asks":"{host} выбрал для вас профиль, но использовать его не удалось. Телевизор спросит, кто вы.","join_picking":"Нажмите PS, затем выберите «Быстрая игра» на телевизоре","join_hide_controls":"Скрыть","join_sound":"Включить звук","rp_unmute":"Включить звук","rp_mute":"Без звука","join_no_sound":"В этом браузере нет звука","join_exit_fullscreen":"Выйти из полноэкранного режима","pad_fill":"Во весь экран","join_leave":"Выйти","join_show_controls":"Показать кнопки","join_hold_hint":"Нажмите и удерживайте изображение, чтобы показать кнопки","pad_watch_no_hevc":"Это устройство не может показать картинку этой трансляции: компьютер передаёт HEVC, а устройство воспроизводит только H.264.","pad_watch_decode":"Картинку не удалось воспроизвести здесь.","join_pad_ready":"Ваш контроллер готов","join_check_unknown_short":"Нет в нашем списке: кнопки могут быть перепутаны.","join_full_to_play":"Нажмите «Во весь экран», чтобы играть с экранным контроллером.","join_pad_none":"Подключите контроллер (USB или Bluetooth) и нажмите любую кнопку.","join_pad_keys":"Или играйте с клавиатуры: WASD — движение, стрелки — крестовина, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Нажмите «Назад» на пульте, чтобы показать кнопки.","join_block_note":"{host} отключил PS и Create для друзей.","join_guide_title":"Ещё один шаг на телевизоре","join_guide_body":"Нажмите PS на контроллере один раз. Телевизор спросит «Кто использует этот контроллер?». Выберите «Быстрая игра» или своего пользователя. Хосту ничего делать не нужно.","join_guide_menus":"На главном экране PS5 меню управляет только хост; ваш контроллер работает внутри игр.","join_guide_ok":"Понятно","join_host_away":"Хост перестал играть — ждём, когда он начнёт снова ({time})","join_reconnecting":"Переподключение…","join_reconnecting_left":"Ваше место сохраняется ещё {time}.","pad_turn":"Поверните телефон горизонтально","join_game_label":"Игра {host}","join_title":"Присоединиться к игре друга","join_title_body":"Играйте на PS5 {host} как Игрок 2, 3 или 4.","join_name_label":"Ваше имя","join_name_hint":"Друг увидит его, когда вы попроситесь в игру.","join_button":"Войти"},"th":{"usb_skipped_not_payload":"{name}: ไม่ใช่ไฟล์ .elf หรือ .bin","usb_skipped_unknown":"{id}: ไม่อยู่ในรายการเพย์โหลดแล้ว","browser_unsupported":"ต้องใช้แอปเดสก์ท็อป ใช้ในเบราว์เซอร์ไม่ได้","video_recovered_notice":"ครั้งก่อนหน้าเล่นล่มขณะเริ่มภาพ ตอนนี้จึงถอดรหัสภาพโดยไม่ใช้การ์ดจอ (เปลี่ยนได้ที่ การตั้งค่า › หน้าต่าง › กราฟิก › ถอดรหัสวิดีโอด้วยฮาร์ดแวร์)","video_recovered_title":"ตอนนี้ถอดรหัสภาพด้วยซอฟต์แวร์","open_in_title":"เปิดในแอป PS5Upload ไหม","open_in_body":"มีแอป PS5Upload ในอุปกรณ์นี้ไหม เปิดในแอป หรือใช้ต่อในเบราว์เซอร์ก็ได้","open_in_app":"เปิดในแอป","open_in_browser":"ใช้ต่อในเบราว์เซอร์","open_in_remember":"จำตัวเลือกของฉันในอุปกรณ์นี้","open_in_opening":"กำลังเปิดแอป PS5Upload…","open_in_not_opened":"ไม่มีอะไรเกิดขึ้นใช่ไหม อุปกรณ์นี้อาจไม่มีแอป","open_in_again":"ลองอีกครั้ง","pad_8bitdo_no_xinput":"8BitDo รุ่นนี้ไม่มีโหมด X-input หากปุ่มใดทำงานผิด ให้ตรวจสอบคอนโทรลเลอร์","pad_8bitdo_how_switch":"เลื่อนสวิตช์ด้านหลังไปที่ X แล้วกด Start","pad_8bitdo_how_startx":"ปิดเครื่อง แล้วกด Start + X ค้างไว้เพื่อเปิด","pad_8bitdo_how_receiver":"ใช้ตัวรับสัญญาณ 2.4G หรือสาย USB","pad_8bitdo_how_manual":"ดูวิธีได้ในคู่มือ","pad_8bitdo_xinput":"เพื่อผลลัพธ์ที่ดีที่สุด ให้เปลี่ยน 8BitDo เป็นโหมด X-input: {how}","rp_touch_left_stick":"สติกซ้าย","rp_touch_right_stick":"สติกขวา","rp_touch_touchpad":"ทัชแพด","rp_menu":"เมนู","rp_pad_step_lx":"ดันอนาล็อกซ้ายไปทางขวา","rp_pad_step_ly":"ดันอนาล็อกซ้ายลง","rp_pad_step_rx":"ดันอนาล็อกขวาไปทางขวา","rp_pad_step_ry":"ดันอนาล็อกขวาลง","join_check_bottom":"กดปุ่มด้านล่าง (✕)","join_check_right":"กดปุ่มด้านขวา (○)","join_check_left":"กดปุ่มด้านซ้าย (□)","join_check_top":"กดปุ่มด้านบน (△)","rp_pad_press":"กด {name}","join_check_saved":"บันทึกสำหรับคอนโทรลเลอร์นี้บนอุปกรณ์นี้แล้ว ลองใช้ด้านล่าง","join_check_title":"ตรวจสอบคอนโทรลเลอร์","join_done":"เสร็จสิ้น","rp_pads_none":"ยังไม่พบคอนโทรลเลอร์ เชื่อมต่อแล้วกดปุ่มใดก็ได้บนคอนโทรลเลอร์","rp_pad_mapped":"เล่นตามการกำหนดปุ่มของคุณ","join_check_unknown":"คอนโทรลเลอร์นี้ไม่อยู่ในรายการของเรา ปุ่มจึงอาจสลับกัน การตั้งค่าใช้เวลาเพียงไม่กี่วินาที","rp_pad_standard":"รู้จักแล้ว","rp_pad_progress":"{n} จาก {total}","rp_pad_skip":"ข้าม","rp_pad_back":"ย้อนกลับ","rp_pad_cancel":"ยกเลิก","join_check_try":"กดปุ่มและขยับสติ๊ก: ปุ่มที่กดจะสว่างขึ้น","join_check_redo":"ทำใหม่","join_check_map":"ตั้งค่าปุ่ม","rp_pad_reset":"รีเซ็ต","join_open_lan_body":"เข้าอินเทอร์เน็ตไม่ได้? ถ้าคุณอยู่บน Wi-Fi เดียวกับเพื่อน ให้เปิดเกมที่นั่น","join_open_lan":"เปิดบน Wi-Fi นี้","join_path_lan":"เครือข่ายในบ้าน","join_path_internet":"อินเทอร์เน็ต","join_seat_taken":"{host} ต้องใช้คอนโทรลเลอร์ของตัวเองคืน และไม่มีคอนโทรลเลอร์อื่นว่างบน PS5 คุณจึงออกจากเกม ขอให้ {host} ให้คุณเข้าอีกครั้ง","join_refused_key":"คำเชิญนี้หมดอายุแล้ว ขอลิงก์ใหม่จาก {host}","join_refused_expired":"ที่ของคุณในเกมหายไปแล้ว ขอให้ {host} ให้เข้าใหม่","join_refused_full":"เกมเต็มแล้ว: มีผู้เล่นครบสี่คน","join_refused_denied":"{host} ไม่ได้ให้คุณเข้าในครั้งนี้","join_refused_no_answer":"{host} ไม่ตอบทันเวลา แจ้ง {host} แล้วลองอีกครั้ง","join_refused_closed":"ตอนนี้ {host} ไม่ได้เปิดเล่นด้วยกัน","join_refused_old_helper":"PS5 ของ {host} ต้องอัปเดตตัวช่วยเพื่อเล่นด้วยกัน","join_refused_not_playing":"ตอนนี้ {host} ไม่ได้เล่นอยู่ ขอให้ {host} เริ่มเล่นก่อน","join_refused_unreachable":"คอมพิวเตอร์ของ {host} เชื่อมต่อกับ PS5 ไม่ได้ ลองใหม่อีกครั้งในอีกสักครู่","join_refused_slow_down":"ใส่รหัสผิดหลายครั้งเกินไป รอหนึ่งนาทีแล้วลองใหม่","join_refused_address":"ที่อยู่ของลิงก์นี้อยู่นอกเครือข่ายภายในบ้าน แอปจึงไม่ใช้ ขอลิงก์ที่มีที่อยู่ IP ของคอมพิวเตอร์จาก {host}","join_refused_other":"{host} ไม่ได้ให้คุณเข้า","join_ended_kicked":"{host} นำคุณออกจากเกม","join_ended_closed":"{host} ปิดเล่นด้วยกันแล้ว","join_ended_host_stopped":"โฮสต์หยุดเล่นแล้ว","join_ended_replaced":"เกมนี้ถูกเปิดในแท็บอื่นหรืออุปกรณ์อื่น จึงหยุดที่นี่","join_ended_pad_lost":"PS5 ทำคอนโทรลเลอร์ของคุณหาย คุณจึงออกจากเกม ขอให้ {host} ให้เข้าใหม่","join_ended_gave_up":"การเชื่อมต่อกับ {host} ไม่กลับมาทันเวลา","join_net_lost":"การเชื่อมต่อกับ {host} หลุด ตรวจสอบการเชื่อมต่ออินเทอร์เน็ต แล้วขอเข้าร่วมอีกครั้ง","join_ended_lost":"ติดต่อ {host} ไม่ได้ ตรวจสอบว่าอยู่ในเครือข่ายเดียวกัน","join_ended_left":"คุณออกจากเกมแล้ว","join_net_mismatch":"ลิงก์นี้ไม่ตรงกับโฮสต์ ขอลิงก์ใหม่จากเขา","join_net_no_direct":"เชื่อมต่อโดยตรงจากเครือข่ายนี้ไม่ได้ (เราเตอร์ทั้งสองฝั่งเข้มงวด) ลองใช้ Wi-Fi แทนเน็ตมือถือ หรือขอให้โฮสต์เปิด UPnP","join_net_no_room":"คำเชิญนี้ปิดไปแล้ว ขอลิงก์ใหม่จาก {host}","join_net_full":"เกมของ {host} ไม่มีที่ว่างสำหรับเพื่อนเพิ่มในตอนนี้ ลองใหม่อีกสักครู่","join_net_no_hub":"ติดต่อบริการคำเชิญของ PS5Upload ไม่ได้ ตรวจสอบการเชื่อมต่ออินเทอร์เน็ตแล้วลองใหม่","join_net_offer":"คอมพิวเตอร์ของ {host} เชื่อมต่อกับเบราว์เซอร์นี้ไม่ได้ ลองเบราว์เซอร์อื่น","join_net_no_webrtc":"เบราว์เซอร์นี้เชื่อมต่อโดยตรงไม่ได้ ลองใช้ Chrome, Safari หรือ Firefox เวอร์ชันล่าสุด","join_cancel":"ยกเลิก","join_host_fallback":"เพื่อนของคุณ","join_connecting":"กำลังเชื่อมต่อกับ {host}…","join_waiting":"กำลังรอ {host} ให้คุณเข้า","join_waiting_body":"{host} จะเห็นชื่อคุณบนหน้าจอและแตะอนุญาต","join_retry":"ลองอีกครั้ง","join_again":"ขอเข้าร่วมอีกครั้ง","join_playing_at":"กำลังเล่นที่บ้าน {host}","join_you_are":"คุณคือผู้เล่น {n}","join_seat_stream":"คุณกำลังเล่นด้วยผู้ใช้ PS5 ของ {host} ไม่ต้องเลือกผู้ใช้","join_plays_as":"คุณกำลังเล่นในนาม {profile} ไม่ต้องเลือกอะไร","join_seat_tv_asks":"{host} เลือกโปรไฟล์ไว้ให้คุณ แต่ใช้ไม่ได้ ทีวีจะถามว่าคุณเป็นใคร","join_picking":"กด PS แล้วเลือกเล่นด่วนบนทีวี","join_hide_controls":"ซ่อน","join_sound":"แตะเพื่อเปิดเสียง","rp_unmute":"เปิดเสียง","rp_mute":"ปิดเสียง","join_no_sound":"เบราว์เซอร์นี้ไม่มีเสียง","join_exit_fullscreen":"ออกจากเต็มจอ","pad_fill":"เต็มจอ","join_leave":"ออก","join_show_controls":"แสดงปุ่มควบคุม","join_hold_hint":"กดค้างที่ภาพเพื่อแสดงปุ่ม","pad_watch_no_hevc":"อุปกรณ์นี้เล่นภาพของสตรีมนี้ไม่ได้: คอมพิวเตอร์สตรีมเป็น HEVC แต่อุปกรณ์นี้เล่นได้แค่ H.264","pad_watch_decode":"เล่นภาพที่นี่ไม่ได้","join_pad_ready":"คอนโทรลเลอร์ของคุณพร้อมแล้ว","join_check_unknown_short":"ไม่อยู่ในรายการ: ปุ่มอาจสลับกัน","join_full_to_play":"แตะเต็มหน้าจอเพื่อเล่นด้วยคอนโทรลเลอร์บนหน้าจอ","join_pad_none":"เชื่อมต่อคอนโทรลเลอร์ (USB หรือ Bluetooth) แล้วกดปุ่มใดก็ได้","join_pad_keys":"หรือใช้คีย์บอร์ด: WASD เคลื่อนที่, ลูกศร D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options","join_tv_back_hint":"กดปุ่มย้อนกลับบนรีโมตเพื่อแสดงปุ่ม","join_block_note":"{host} ปิดปุ่ม PS และ Create สำหรับเพื่อน","join_guide_title":"อีกขั้นตอนเดียวบนทีวี","join_guide_body":"กด PS บนคอนโทรลเลอร์หนึ่งครั้ง ทีวีจะถามว่า \"ใครกำลังใช้คอนโทรลเลอร์นี้?\" เลือกเล่นด่วนหรือผู้ใช้ของคุณเอง เจ้าของเกมไม่ต้องทำอะไร","join_guide_menus":"บนหน้าจอหลักของ PS5 มีแค่โฮสต์ที่ควบคุมเมนูได้ คอนโทรลเลอร์ของคุณใช้เล่นในเกม","join_guide_ok":"เข้าใจแล้ว","join_host_away":"โฮสต์หยุดเล่นแล้ว — กำลังรอให้เริ่มเล่นอีกครั้ง ({time})","join_reconnecting":"กำลังเชื่อมต่อใหม่…","join_reconnecting_left":"ที่ของคุณจะถูกเก็บไว้ {time}","pad_turn":"หมุนมือถือเป็นแนวนอน","join_game_label":"เกมของ {host}","join_title":"เข้าร่วมเกมของเพื่อน","join_title_body":"เล่นบน PS5 ของ {host} เป็นผู้เล่น 2, 3 หรือ 4","join_name_label":"ชื่อของคุณ","join_name_hint":"เพื่อนจะเห็นชื่อนี้เมื่อคุณขอเข้าร่วม","join_button":"เข้าร่วม"},"tr":{"usb_skipped_not_payload":"{name}: .elf veya .bin dosyası değil","usb_skipped_unknown":"{id}: artık payload listesinde değil","browser_unsupported":"Bunun için masaüstü uygulaması gerekir. Tarayıcıda çalışmaz.","video_recovered_notice":"Play geçen sefer görüntüyü başlatırken çöktü, bu yüzden görüntü artık ekran kartı olmadan çözülüyor (değiştirmek için Ayarlar › Pencere › Grafik › Donanımsal video çözme).","video_recovered_title":"Görüntü artık yazılımla çözülüyor","open_in_title":"PS5Upload uygulamasında açılsın mı?","open_in_body":"Bu cihazda PS5Upload uygulaması var mı? Bunu orada aç ya da tarayıcıda devam et.","open_in_app":"Uygulamada aç","open_in_browser":"Tarayıcıda devam et","open_in_remember":"Bu cihazda seçimimi hatırla","open_in_opening":"PS5Upload uygulaması açılıyor…","open_in_not_opened":"Bir şey olmadı mı? Uygulama bu cihazda olmayabilir.","open_in_again":"Tekrar dene","pad_8bitdo_no_xinput":"Bu 8BitDo'nun X-input modu yok. Bir tuş yanlışsa kumandayı kontrol et.","pad_8bitdo_how_switch":"arkadaki düğmeyi X'e getir, sonra Start'a bas","pad_8bitdo_how_startx":"kapat, sonra açmak için Start + X'e basılı tut","pad_8bitdo_how_receiver":"2.4G alıcısını ya da bir USB kablosu kullan","pad_8bitdo_how_manual":"nasıl yapılacağı kılavuzunda yazıyor","pad_8bitdo_xinput":"En iyi sonuç için 8BitDo'nu X-input moduna al: {how}.","rp_touch_left_stick":"Sol çubuk","rp_touch_right_stick":"Sağ çubuk","rp_touch_touchpad":"Dokunmatik yüzey","rp_menu":"Menü","rp_pad_step_lx":"Sol çubuğu sağa itin","rp_pad_step_ly":"Sol çubuğu aşağı itin","rp_pad_step_rx":"Sağ çubuğu sağa itin","rp_pad_step_ry":"Sağ çubuğu aşağı itin","join_check_bottom":"Alttaki yüz tuşuna bas (✕)","join_check_right":"Sağdaki yüz tuşuna bas (○)","join_check_left":"Soldaki yüz tuşuna bas (□)","join_check_top":"Üstteki yüz tuşuna bas (△)","rp_pad_press":"{name} tuşuna basın","join_check_saved":"Bu cihazda bu kumanda için kaydedildi. Aşağıda dene.","join_check_title":"Kumandanı kontrol et","join_done":"Tamam","rp_pads_none":"Henüz kumanda görülmedi. Bir tane bağlayın ve herhangi bir tuşuna basın.","rp_pad_mapped":"Sizin eşlemenizle oynuyor","join_check_unknown":"Bu kumanda listemizde yok, bu yüzden tuşları karışık olabilir. Ayarlamak birkaç saniye sürer.","rp_pad_standard":"Tanındı","rp_pad_progress":"{n} / {total}","rp_pad_skip":"Atla","rp_pad_back":"Geri","rp_pad_cancel":"İptal","join_check_try":"Tuşlara bas ve çubukları oynat: bastığın şey yanar.","join_check_redo":"Yeniden yap","join_check_map":"Tuşları ayarla","rp_pad_reset":"Sıfırla","join_open_lan_body":"İnternete ulaşamıyor musun? Arkadaşınla aynı Wi-Fi'daysan oyunu orada aç.","join_open_lan":"Bu Wi-Fi'da aç","join_path_lan":"Ev ağı","join_path_internet":"İnternet","join_seat_taken":"{host} kumandasını geri istedi ve PS5'te boş başka kumanda yoktu, bu yüzden oyundan çıktın. {host} adlı kişiden seni tekrar almasını iste.","join_refused_key":"Bu davetin süresi doldu. {host} kullanıcısından yeni bir bağlantı iste.","join_refused_expired":"Oyundaki yerin gitti. {host} seni yeniden alsın diye iste.","join_refused_full":"Oyun dolu: zaten dört oyuncu var.","join_refused_denied":"{host} bu sefer seni içeri almadı.","join_refused_no_answer":"{host} zamanında yanıt vermedi. {host} kişisine haber ver, sonra yeniden dene.","join_refused_closed":"{host} şu anda Birlikte Oyna açmıyor.","join_refused_old_helper":"Birlikte Oyna için {host} adlı kişinin PS5'inde yardımcının güncellenmesi gerekiyor.","join_refused_not_playing":"{host} şu anda oynamıyor. Önce Oyna'yı başlatmasını {host} kullanıcısından iste.","join_refused_unreachable":"{host} adlı kişinin bilgisayarı PS5'e ulaşamadı. Biraz sonra tekrar dene.","join_refused_slow_down":"Çok fazla yanlış kod. Bir dakika bekle, sonra tekrar dene.","join_refused_address":"Bu bağlantının adresi ev ağınızın dışında olduğundan uygulama bunu kullanmaz. {host} kullanıcısından bilgisayarının IP adresini içeren bir bağlantı isteyin.","join_refused_other":"{host} seni içeri almadı.","join_ended_kicked":"{host} seni oyundan çıkardı.","join_ended_closed":"{host}, Birlikte Oyna'yı kapattı.","join_ended_host_stopped":"Ev sahibi oynamayı bıraktı.","join_ended_replaced":"Bu oyun başka bir sekmede veya cihazda açıldı, bu yüzden burada durdu.","join_ended_pad_lost":"PS5 kumandanı kaybetti, bu yüzden oyundan çıktın. {host} seni yeniden alsın diye iste.","join_ended_gave_up":"{host} ile bağlantı zamanında geri gelmedi.","join_net_lost":"{host} ile bağlantı koptu. İnternet bağlantını kontrol et, sonra yeniden iste.","join_ended_lost":"{host} kullanıcısına ulaşılamadı. Aynı ağda olduğunuzu kontrol et.","join_ended_left":"Oyundan ayrıldın.","join_net_mismatch":"Bu bağlantı ev sahibiyle eşleşmiyor; ondan yeni bir bağlantı iste.","join_net_no_direct":"Bu ağdan doğrudan bağlantı mümkün değil (iki tarafın yönlendiricisi de katı). Mobil veri yerine Wi-Fi dene ya da ev sahibinden UPnP'yi açmasını iste.","join_net_no_room":"Bu davet artık açık değil. {host} kullanıcısından yeni bir bağlantı iste.","join_net_full":"{host} kullanıcısının oyununda şu an başka bir arkadaşa yer yok. Biraz sonra tekrar dene.","join_net_no_hub":"PS5Upload davet hizmetine ulaşılamadı. İnternet bağlantını kontrol et, sonra tekrar dene.","join_net_offer":"{host} kullanıcısının bilgisayarı bu tarayıcıya bağlanamadı. Başka bir tarayıcı dene.","join_net_no_webrtc":"Bu tarayıcı doğrudan bağlantı kuramıyor. Güncel bir Chrome, Safari veya Firefox dene.","join_cancel":"İptal","join_host_fallback":"arkadaşın","join_connecting":"Bağlanılıyor: {host}…","join_waiting":"{host} seni içeri alsın diye bekleniyor","join_waiting_body":"{host} adını ekranında görür ve İzin ver'e dokunur.","join_retry":"Tekrar dene","join_again":"Tekrar katılmak iste","join_playing_at":"Oynadığın yer: {host}","join_you_are":"Sen {n}. Oyuncusun","join_seat_stream":"{host} adlı kişinin PS5 kullanıcısıyla oynuyorsun. Kullanıcı seçmene gerek yok.","join_plays_as":"{profile} olarak oynuyorsunuz. Seçim yapmanıza gerek yok.","join_seat_tv_asks":"{host} sizin için bir profil seçti ama kullanılamadı. TV kim olduğunuzu soracak.","join_picking":"PS'ye bas, sonra televizyonda Hızlı Oyna'yı seç","join_hide_controls":"Gizle","join_sound":"Ses için dokun","rp_unmute":"Sesi aç","rp_mute":"Sessiz","join_no_sound":"Bu tarayıcıda ses yok","join_exit_fullscreen":"Tam ekrandan çık","pad_fill":"Tam ekran","join_leave":"Ayrıl","join_show_controls":"Kontrolleri göster","join_hold_hint":"Düğmeleri göstermek için görüntüye basılı tut","pad_watch_no_hevc":"Bu cihaz bu yayının görüntüsünü oynatamıyor: bilgisayar HEVC yayınlıyor, bu cihaz yalnızca H.264 oynatıyor.","pad_watch_decode":"Görüntü burada oynatılamadı.","join_pad_ready":"Kumandan hazır","join_check_unknown_short":"Listemizde yok: tuşlar karışık olabilir.","join_full_to_play":"Ekran kumandasıyla oynamak için Tam ekran'a dokun.","join_pad_none":"Bir kumanda bağla (USB veya Bluetooth) ve herhangi bir tuşa bas.","join_pad_keys":"Ya da klavyeyi kullan: WASD hareket, ok tuşları yön tuşları, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Düğmeleri görmek için kumandada Geri'ye bas.","join_block_note":"{host}, arkadaşlar için PS ve Create tuşlarını kapattı.","join_guide_title":"Televizyonda bir adım daha","join_guide_body":"Kumandandaki PS tuşuna bir kez bas. Televizyon \"Bu kumandayı kim kullanıyor?\" diye sorar. Hızlı Oyna'yı ya da kendi kullanıcını seç. Ev sahibinin bir şey yapması gerekmez.","join_guide_menus":"PS5 ana ekranında menüleri yalnızca ev sahibi kontrol eder; senin kumandan oyunların içinde çalışır.","join_guide_ok":"Anladım","join_host_away":"Ev sahibi oynamayı bıraktı — yeniden başlaması bekleniyor ({time})","join_reconnecting":"Yeniden bağlanıyor…","join_reconnecting_left":"Yerin {time} boyunca tutuluyor.","pad_turn":"Telefonu yan çevirin","join_game_label":"{host} adlı kişinin oyunu","join_title":"Bir arkadaşının oyununa katıl","join_title_body":"{host} adlı kişinin PS5'inde 2., 3. veya 4. Oyuncu olarak oyna.","join_name_label":"Adın","join_name_hint":"Katılmak istediğinde arkadaşın bunu görür.","join_button":"Katıl"},"vi":{"usb_skipped_not_payload":"{name}: không phải tệp .elf hoặc .bin","usb_skipped_unknown":"{id}: không còn trong danh sách payload","browser_unsupported":"Việc này cần ứng dụng máy tính. Không hoạt động trong trình duyệt.","video_recovered_notice":"Lần trước Play bị sập khi bắt đầu hình, nên giờ hình được giải mã không dùng card đồ họa (đổi trong Cài đặt › Cửa sổ › Đồ họa › Giải mã video bằng phần cứng).","video_recovered_title":"Hình giờ được giải mã bằng phần mềm","open_in_title":"Mở trong ứng dụng PS5Upload?","open_in_body":"Thiết bị này có ứng dụng PS5Upload? Mở trong ứng dụng, hoặc tiếp tục trên trình duyệt.","open_in_app":"Mở trong ứng dụng","open_in_browser":"Tiếp tục trên trình duyệt","open_in_remember":"Nhớ lựa chọn của tôi trên thiết bị này","open_in_opening":"Đang mở ứng dụng PS5Upload…","open_in_not_opened":"Không có gì xảy ra? Có thể thiết bị này chưa có ứng dụng.","open_in_again":"Thử lại","pad_8bitdo_no_xinput":"8BitDo này không có chế độ X-input. Nếu có nút sai, hãy kiểm tra tay cầm.","pad_8bitdo_how_switch":"gạt công tắc phía sau sang X, rồi nhấn Start","pad_8bitdo_how_startx":"tắt tay cầm, rồi giữ Start + X để bật lại","pad_8bitdo_how_receiver":"dùng bộ thu 2.4G của nó hoặc cáp USB","pad_8bitdo_how_manual":"cách làm có trong sách hướng dẫn","pad_8bitdo_xinput":"Để chơi tốt nhất, hãy chuyển 8BitDo sang chế độ X-input: {how}.","rp_touch_left_stick":"Cần trái","rp_touch_right_stick":"Cần phải","rp_touch_touchpad":"Bàn di cảm ứng","rp_pad_step_lx":"Đẩy cần trái sang phải","rp_pad_step_ly":"Đẩy cần trái xuống dưới","rp_pad_step_rx":"Đẩy cần phải sang phải","rp_pad_step_ry":"Đẩy cần phải xuống dưới","join_check_bottom":"Nhấn nút mặt phía dưới (✕)","join_check_right":"Nhấn nút mặt bên phải (○)","join_check_left":"Nhấn nút mặt bên trái (□)","join_check_top":"Nhấn nút mặt phía trên (△)","rp_pad_press":"Nhấn {name}","join_check_saved":"Đã lưu cho tay cầm này trên thiết bị này. Thử ngay bên dưới.","join_check_title":"Kiểm tra tay cầm","join_done":"Xong","rp_pads_none":"Chưa thấy tay cầm nào. Hãy kết nối một tay cầm và nhấn nút bất kỳ.","rp_pad_mapped":"Chơi theo cách gán nút của bạn","join_check_unknown":"Tay cầm này không có trong danh sách của chúng tôi nên các nút có thể bị lẫn. Thiết lập chỉ mất vài giây.","rp_pad_standard":"Đã nhận diện","rp_pad_progress":"{n}/{total}","rp_pad_skip":"Bỏ qua","rp_pad_back":"Quay lại","rp_pad_cancel":"Hủy","join_check_try":"Nhấn nút và di chuyển cần: nút bạn nhấn sẽ sáng lên.","join_check_redo":"Làm lại","join_check_map":"Thiết lập nút","rp_pad_reset":"Đặt lại","join_open_lan_body":"Không vào được internet? Nếu bạn dùng cùng Wi-Fi với bạn mình, hãy mở trò chơi ở đó.","join_open_lan":"Mở trên Wi-Fi này","join_path_lan":"Mạng nhà","join_seat_taken":"{host} cần lấy lại tay cầm và trên PS5 không còn tay cầm nào trống, nên bạn đã rời trò chơi. Hãy nhờ {host} cho bạn vào lại.","join_refused_key":"Lời mời này đã hết hạn. Hãy xin {host} liên kết mới.","join_refused_expired":"Bạn đã mất chỗ trong trò chơi. Hãy nhờ {host} cho vào lại.","join_refused_full":"Trò chơi đã đủ người: đã có bốn người chơi.","join_refused_denied":"Lần này {host} chưa cho bạn vào.","join_refused_no_answer":"{host} không trả lời kịp. Hãy báo {host}, rồi thử lại.","join_refused_closed":"{host} hiện không mở Chơi cùng nhau.","join_refused_old_helper":"PS5 của {host} cần cập nhật trình trợ giúp để Chơi cùng nhau.","join_refused_not_playing":"{host} hiện không chơi. Hãy nhờ {host} bắt đầu Chơi trước.","join_refused_unreachable":"Máy tính của {host} không kết nối được với PS5. Hãy thử lại sau giây lát.","join_refused_slow_down":"Nhập sai mã quá nhiều lần. Hãy đợi một phút rồi thử lại.","join_refused_address":"Địa chỉ của liên kết này nằm ngoài mạng gia đình nên ứng dụng sẽ không dùng. Hãy nhờ {host} gửi liên kết có địa chỉ IP của máy tính.","join_refused_other":"{host} không cho bạn vào.","join_ended_kicked":"{host} đã mời bạn ra khỏi trò chơi.","join_ended_closed":"{host} đã đóng Chơi cùng nhau.","join_ended_host_stopped":"Chủ phòng đã dừng chơi.","join_ended_replaced":"Trò chơi này đã được mở ở tab khác hoặc thiết bị khác, nên đã dừng ở đây.","join_ended_pad_lost":"PS5 đã mất tay cầm của bạn, nên bạn đã ra khỏi trò chơi. Hãy nhờ {host} cho vào lại.","join_ended_gave_up":"Kết nối tới {host} không trở lại kịp.","join_net_lost":"Kết nối tới {host} đã bị ngắt. Hãy kiểm tra kết nối internet, rồi xin vào lại.","join_ended_lost":"Không liên lạc được với {host}. Hãy kiểm tra hai bên có cùng mạng không.","join_ended_left":"Bạn đã rời trò chơi.","join_net_mismatch":"Liên kết này không khớp với chủ phòng; hãy xin họ một liên kết mới.","join_net_no_direct":"Không thể kết nối trực tiếp từ mạng này (bộ định tuyến của cả hai bên đều chặt). Hãy thử Wi-Fi thay cho dữ liệu di động, hoặc nhờ chủ phòng bật UPnP.","join_net_no_room":"Lời mời này không còn mở. Hãy xin {host} một liên kết mới.","join_net_full":"Trò chơi của {host} hiện không còn chỗ cho thêm một người bạn. Hãy thử lại sau giây lát.","join_net_no_hub":"Không liên lạc được với dịch vụ lời mời của PS5Upload. Hãy kiểm tra kết nối internet rồi thử lại.","join_net_offer":"Máy tính của {host} không kết nối được với trình duyệt này. Hãy thử trình duyệt khác.","join_net_no_webrtc":"Trình duyệt này không thể tạo kết nối trực tiếp. Hãy thử Chrome, Safari hoặc Firefox bản mới.","join_cancel":"Hủy","join_host_fallback":"bạn của bạn","join_connecting":"Đang kết nối tới {host}…","join_waiting":"Đang chờ {host} cho bạn vào","join_waiting_body":"{host} sẽ thấy tên bạn trên màn hình và chạm Cho phép.","join_retry":"Thử lại","join_again":"Xin vào lại","join_playing_at":"Đang chơi ở chỗ {host}","join_you_are":"Bạn là Người chơi {n}","join_seat_stream":"Bạn đang chơi bằng người dùng PS5 của {host}. Không cần chọn người dùng.","join_plays_as":"Bạn đang chơi bằng {profile}. Không cần chọn.","join_seat_tv_asks":"{host} đã chọn một hồ sơ cho bạn nhưng không dùng được. TV sẽ hỏi bạn là ai.","join_picking":"Bấm PS, rồi chọn Chơi nhanh trên TV","join_hide_controls":"Ẩn","join_sound":"Chạm để bật tiếng","rp_unmute":"Bật âm thanh","rp_mute":"Tắt tiếng","join_no_sound":"Trình duyệt này không phát được âm thanh","join_exit_fullscreen":"Thoát toàn màn hình","pad_fill":"Toàn màn hình","join_leave":"Rời đi","join_show_controls":"Hiện các nút điều khiển","join_hold_hint":"Nhấn giữ hình ảnh để hiện các nút","pad_watch_no_hevc":"Thiết bị này không phát được hình của stream này: máy tính truyền HEVC, còn thiết bị này chỉ phát H.264.","pad_watch_decode":"Không phát được hình ở đây.","join_pad_ready":"Tay cầm của bạn đã sẵn sàng","join_check_unknown_short":"Không có trong danh sách: các nút có thể bị lẫn.","join_full_to_play":"Chạm toàn màn hình để chơi bằng tay cầm trên màn hình.","join_pad_none":"Kết nối tay cầm (USB hoặc Bluetooth) rồi bấm nút bất kỳ.","join_pad_keys":"Hoặc dùng bàn phím: WASD di chuyển, phím mũi tên D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Nhấn Quay lại trên điều khiển từ xa để hiện các nút.","join_block_note":"{host} đã tắt PS và Create với bạn bè.","join_guide_title":"Thêm một bước trên TV","join_guide_body":"Bấm PS một lần trên tay cầm. TV sẽ hỏi \"Ai đang dùng tay cầm này?\". Chọn Chơi nhanh hoặc người dùng của bạn. Chủ phòng không cần làm gì.","join_guide_menus":"Trên màn hình chính PS5 chỉ chủ phòng điều khiển menu; tay cầm của bạn chơi bên trong trò chơi.","join_guide_ok":"Đã hiểu","join_host_away":"Chủ phòng đã dừng chơi — đang chờ họ chơi lại ({time})","join_reconnecting":"Đang kết nối lại…","join_reconnecting_left":"Chỗ của bạn được giữ trong {time}.","pad_turn":"Xoay ngang điện thoại","join_game_label":"Trò chơi của {host}","join_title":"Vào trò chơi của bạn bè","join_title_body":"Chơi trên PS5 của {host} với vai Người chơi 2, 3 hoặc 4.","join_name_label":"Tên của bạn","join_name_hint":"Bạn bè sẽ thấy tên này khi bạn xin vào.","join_button":"Vào chơi"},"zh-CN":{"usb_skipped_not_payload":"{name}:不是 .elf 或 .bin 文件","usb_skipped_unknown":"{id}:已不在 Payload 列表中","browser_unsupported":"这需要桌面应用,无法在浏览器中使用。","video_recovered_notice":"上次 Play 在开始显示画面时崩溃,因此画面现在不使用显卡解码(可在 设置 › 窗口 › 图形 › 硬件视频解码 中更改)。","video_recovered_title":"画面现由软件解码","open_in_title":"在 PS5Upload 应用中打开?","open_in_body":"这台设备装了 PS5Upload 应用?可以在应用中打开,或继续使用浏览器。","open_in_app":"在应用中打开","open_in_browser":"继续使用浏览器","open_in_remember":"在此设备上记住我的选择","open_in_opening":"正在打开 PS5Upload 应用…","open_in_not_opened":"没有反应?这台设备可能没有安装应用。","open_in_again":"重试","pad_8bitdo_no_xinput":"这款 8BitDo 没有 X-input 模式。如果有按键不对,请检查手柄。","pad_8bitdo_how_switch":"把背面的开关拨到 X,然后按 Start","pad_8bitdo_how_startx":"先关机,然后按住 Start + X 开机","pad_8bitdo_how_receiver":"使用它的 2.4G 接收器或 USB 线","pad_8bitdo_how_manual":"方法见其说明书","pad_8bitdo_xinput":"为获得最佳效果,请将 8BitDo 切换到 X-input 模式:{how}。","rp_touch_left_stick":"左摇杆","rp_touch_right_stick":"右摇杆","rp_touch_touchpad":"触摸板","rp_menu":"菜单","rp_pad_step_lx":"将左摇杆推向右","rp_pad_step_ly":"将左摇杆推向下","rp_pad_step_rx":"将右摇杆推向右","rp_pad_step_ry":"将右摇杆推向下","join_check_bottom":"按下方的功能键 (✕)","join_check_right":"按右侧的功能键 (○)","join_check_left":"按左侧的功能键 (□)","join_check_top":"按上方的功能键 (△)","rp_pad_press":"按 {name}","join_check_saved":"已在此设备上为这个手柄保存。可在下方试用。","join_check_title":"检查你的手柄","join_done":"完成","rp_pads_none":"还没有检测到手柄。请连接一个手柄并按任意按钮。","rp_pad_mapped":"使用你的按键映射","join_check_unknown":"这个手柄不在我们的列表中,按键可能会错位。设置只需几秒钟。","rp_pad_standard":"已识别","rp_pad_progress":"{n}/{total}","rp_pad_skip":"跳过","rp_pad_back":"返回","rp_pad_cancel":"取消","join_check_try":"按下按键、推动摇杆:按下的部分会亮起。","join_check_redo":"重新设置","join_check_map":"设置按键","rp_pad_reset":"重置","join_open_lan_body":"连不上互联网?如果你和朋友在同一个 Wi-Fi 上,就在那里打开游戏。","join_open_lan":"在此 Wi-Fi 上打开","join_path_lan":"家庭网络","join_path_internet":"互联网","join_seat_taken":"{host} 需要收回手柄,而 PS5 上没有其他空闲手柄,所以你已退出游戏。请 {host} 再次让你加入。","join_refused_key":"此邀请已过期。请向 {host} 要一个新链接。","join_refused_expired":"你在游戏中的位置已失去。请让 {host} 再次放你进去。","join_refused_full":"游戏已满:已经有四名玩家。","join_refused_denied":"{host} 这次没有让你加入。","join_refused_no_answer":"{host} 没有及时响应。请告诉 {host},然后重试。","join_refused_closed":"{host} 目前没有开启一起畅玩。","join_refused_old_helper":"{host} 的 PS5 需要更新助手才能一起畅玩。","join_refused_not_playing":"{host} 现在没在玩。请让 {host} 先开始畅玩。","join_refused_unreachable":"{host} 的电脑无法连接到其 PS5。请稍后再试。","join_refused_slow_down":"错误的代码太多。请等一分钟后再试。","join_refused_address":"此链接的地址不在你的家庭网络内,因此应用不会使用它。请向 {host} 索取包含其电脑 IP 地址的链接。","join_refused_other":"{host} 没有让你加入。","join_ended_kicked":"{host} 已将你移出游戏。","join_ended_closed":"{host} 已关闭一起畅玩。","join_ended_host_stopped":"房主已停止游戏。","join_ended_replaced":"这场游戏在另一个标签页或另一台设备上打开了,所以这里已停止。","join_ended_pad_lost":"PS5 丢失了你的手柄,所以你已退出游戏。请让 {host} 再次放你进去。","join_ended_gave_up":"与 {host} 的连接未能及时恢复。","join_net_lost":"与 {host} 的连接已断开。请检查你的互联网连接,然后重新请求。","join_ended_lost":"无法连接到 {host}。请检查你们是否在同一网络。","join_ended_left":"你已离开游戏。","join_net_mismatch":"此链接与主机不匹配;请向对方要一个新链接。","join_net_no_direct":"无法从此网络直接连接(双方的路由器都很严格)。请改用 Wi-Fi 而不是移动数据,或请主机打开 UPnP。","join_net_no_room":"此邀请已失效。请向 {host} 要一个新链接。","join_net_full":"{host} 的游戏现在没有位置再加一位朋友。请稍后再试。","join_net_no_hub":"无法连接 PS5Upload 邀请服务。请检查网络连接后重试。","join_net_offer":"{host} 的电脑无法连接到此浏览器。请换一个浏览器试试。","join_net_no_webrtc":"此浏览器无法建立直接连接。请使用较新版本的 Chrome、Safari 或 Firefox。","join_cancel":"取消","join_host_fallback":"你的好友","join_connecting":"正在连接 {host}…","join_waiting":"正在等待 {host} 让你加入","join_waiting_body":"{host} 会在屏幕上看到你的名字并点按“允许”。","join_retry":"重试","join_again":"再次请求加入","join_playing_at":"正在 {host} 那里玩","join_you_are":"你是玩家 {n}","join_seat_stream":"你正在以 {host} 的 PS5 用户身份游玩,无需选择用户。","join_plays_as":"你正在以 {profile} 的身份游玩,无需选择。","join_seat_tv_asks":"{host} 为你选择了个人资料,但无法使用。电视会询问你是谁。","join_picking":"按 PS 键,然后在电视上选择“快速游戏”","join_hide_controls":"隐藏","join_sound":"点按开启声音","rp_unmute":"开启声音","rp_mute":"静音","join_no_sound":"此浏览器无法播放声音","join_exit_fullscreen":"退出全屏","pad_fill":"全屏","join_leave":"离开","join_show_controls":"显示控制按钮","join_hold_hint":"长按画面以显示按钮","pad_watch_no_hevc":"此设备无法播放这个串流的画面:电脑以 HEVC 串流,而此设备只能播放 H.264。","pad_watch_decode":"无法在这里播放画面。","join_pad_ready":"你的手柄已就绪","join_check_unknown_short":"不在我们的列表中:按键可能错位。","join_full_to_play":"点按全屏,即可用屏幕手柄游玩。","join_pad_none":"连接手柄(USB 或 Bluetooth),然后按任意键。","join_pad_keys":"也可以用键盘:WASD 移动,方向键为十字键,Enter ✕,Backspace ○,Q □,E △,Tab Options。","join_tv_back_hint":"按遥控器上的返回键显示按钮。","join_block_note":"{host} 已为好友关闭 PS 和 Create 键。","join_guide_title":"电视上还差一步","join_guide_body":"在手柄上按一次 PS 键。电视会询问“谁在使用这个手柄?”。选择“快速游戏”或你自己的用户。主机玩家无需任何操作。","join_guide_menus":"在 PS5 主屏幕上只有房主能操作菜单;你的手柄在游戏里使用。","join_guide_ok":"知道了","join_host_away":"房主已停止游戏 — 正在等待对方重新开始({time})","join_reconnecting":"正在重新连接…","join_reconnecting_left":"你的位置会保留 {time}。","pad_turn":"请横放手机","join_game_label":"{host} 的游戏","join_title":"加入好友的游戏","join_title_body":"在 {host} 的 PS5 上作为玩家 2、3 或 4 游玩。","join_name_label":"你的名字","join_name_hint":"你请求加入时,好友会看到这个名字。","join_button":"加入"},"zh-TW":{"usb_skipped_not_payload":"{name}:不是 .elf 或 .bin 檔案","usb_skipped_unknown":"{id}:已不在 Payload 清單中","browser_unsupported":"這需要桌面應用程式,無法在瀏覽器中使用。","video_recovered_notice":"上次 Play 在開始顯示畫面時當掉,因此畫面現在不使用顯示卡解碼(可在 設定 › 視窗 › 圖形 › 硬體視訊解碼 中變更)。","video_recovered_title":"畫面現改由軟體解碼","open_in_title":"在 PS5Upload 應用程式中開啟?","open_in_body":"這台裝置有 PS5Upload 應用程式?可以在應用程式中開啟,或繼續使用瀏覽器。","open_in_app":"在應用程式中開啟","open_in_browser":"繼續使用瀏覽器","open_in_remember":"在此裝置上記住我的選擇","open_in_opening":"正在開啟 PS5Upload 應用程式…","open_in_not_opened":"沒有反應?這台裝置可能沒有安裝應用程式。","open_in_again":"重試","pad_8bitdo_no_xinput":"這款 8BitDo 沒有 X-input 模式。如果有按鍵不對,請檢查控制器。","pad_8bitdo_how_switch":"把背面的開關撥到 X,然後按 Start","pad_8bitdo_how_startx":"先關機,然後按住 Start + X 開機","pad_8bitdo_how_receiver":"使用它的 2.4G 接收器或 USB 線","pad_8bitdo_how_manual":"方法請見其說明書","pad_8bitdo_xinput":"為獲得最佳效果,請將 8BitDo 切換到 X-input 模式:{how}。","rp_touch_left_stick":"左類比搖桿","rp_touch_right_stick":"右類比搖桿","rp_touch_touchpad":"觸控板","rp_menu":"選單","rp_pad_step_lx":"將左類比搖桿推向右","rp_pad_step_ly":"將左類比搖桿推向下","rp_pad_step_rx":"將右類比搖桿推向右","rp_pad_step_ry":"將右類比搖桿推向下","join_check_bottom":"按下方的功能鍵 (✕)","join_check_right":"按右側的功能鍵 (○)","join_check_left":"按左側的功能鍵 (□)","join_check_top":"按上方的功能鍵 (△)","rp_pad_press":"按下 {name}","join_check_saved":"已在此裝置上為這個控制器儲存。可在下方試用。","join_check_title":"檢查你的控制器","join_done":"完成","rp_pads_none":"尚未偵測到控制器。請連接一個控制器並按下任一按鈕。","rp_pad_mapped":"使用你的按鍵對應","join_check_unknown":"這個控制器不在我們的清單中,按鍵可能會錯位。設定只需幾秒鐘。","rp_pad_standard":"已辨識","rp_pad_progress":"{n}/{total}","rp_pad_skip":"略過","rp_pad_back":"返回","rp_pad_cancel":"取消","join_check_try":"按下按鍵、推動搖桿:按下的部分會亮起。","join_check_redo":"重新設定","join_check_map":"設定按鍵","rp_pad_reset":"重設","join_open_lan_body":"連不上網際網路?如果你和朋友在同一個 Wi-Fi 上,就在那裡開啟遊戲。","join_open_lan":"在此 Wi-Fi 上開啟","join_path_lan":"家用網路","join_path_internet":"網際網路","join_seat_taken":"{host} 需要收回控制器,而 PS5 上沒有其他空閒的控制器,所以你已離開遊戲。請 {host} 再次讓你加入。","join_refused_key":"此邀請已過期。請向 {host} 要一個新連結。","join_refused_expired":"你在遊戲中的位置已失去。請讓 {host} 再次放你進去。","join_refused_full":"遊戲已滿:已經有四名玩家。","join_refused_denied":"{host} 這次沒有讓你加入。","join_refused_no_answer":"{host} 沒有及時回應。請告訴 {host},然後再試一次。","join_refused_closed":"{host} 目前沒有開啟一起暢玩。","join_refused_old_helper":"{host} 的 PS5 需要更新助手才能一起暢玩。","join_refused_not_playing":"{host} 現在沒在玩。請讓 {host} 先開始暢玩。","join_refused_unreachable":"{host} 的電腦無法連線到其 PS5。請稍後再試。","join_refused_slow_down":"錯誤的代碼太多。請等一分鐘後再試。","join_refused_address":"此連結的位址不在你的家用網路內,因此應用程式不會使用它。請向 {host} 索取包含其電腦 IP 位址的連結。","join_refused_other":"{host} 沒有讓你加入。","join_ended_kicked":"{host} 已將你移出遊戲。","join_ended_closed":"{host} 已關閉一起暢玩。","join_ended_host_stopped":"房主已停止遊戲。","join_ended_replaced":"這場遊戲在另一個分頁或另一台裝置上開啟了,所以這裡已停止。","join_ended_pad_lost":"PS5 遺失了你的控制器,所以你已退出遊戲。請讓 {host} 再次放你進去。","join_ended_gave_up":"與 {host} 的連線未能及時恢復。","join_net_lost":"與 {host} 的連線已中斷。請檢查你的網際網路連線,然後重新要求。","join_ended_lost":"無法連線到 {host}。請確認你們是否在同一個網路。","join_ended_left":"你已離開遊戲。","join_net_mismatch":"這個連結與主機不符;請向對方要一個新連結。","join_net_no_direct":"無法從這個網路直接連線(雙方的路由器都很嚴格)。請改用 Wi-Fi 而非行動數據,或請主機開啟 UPnP。","join_net_no_room":"這個邀請已失效。請向 {host} 要一個新連結。","join_net_full":"{host} 的遊戲目前沒有位置再加一位朋友。請稍後再試。","join_net_no_hub":"無法連線到 PS5Upload 邀請服務。請檢查網路連線後再試一次。","join_net_offer":"{host} 的電腦無法連線到這個瀏覽器。請換個瀏覽器試試。","join_net_no_webrtc":"這個瀏覽器無法建立直接連線。請使用較新版本的 Chrome、Safari 或 Firefox。","join_cancel":"取消","join_host_fallback":"你的好友","join_connecting":"正在連線到 {host}…","join_waiting":"正在等待 {host} 讓你加入","join_waiting_body":"{host} 會在螢幕上看到你的名字並點選「允許」。","join_retry":"重試","join_again":"再次要求加入","join_playing_at":"正在 {host} 那裡玩","join_you_are":"你是玩家 {n}","join_seat_stream":"你正在以 {host} 的 PS5 使用者身分遊玩,不需要選擇使用者。","join_plays_as":"你正以 {profile} 的身分遊玩,無需選擇。","join_seat_tv_asks":"{host} 為你選了一個個人檔案,但無法使用。電視會詢問你是誰。","join_picking":"按下 PS,然後在電視上選擇「快速遊玩」","join_hide_controls":"隱藏","join_sound":"點一下開啟聲音","rp_unmute":"開啟聲音","rp_mute":"靜音","join_no_sound":"此瀏覽器無法播放聲音","join_exit_fullscreen":"離開全螢幕","pad_fill":"全螢幕","join_leave":"離開","join_show_controls":"顯示控制項","join_hold_hint":"長按畫面以顯示按鈕","pad_watch_no_hevc":"此裝置無法播放這個串流的畫面:電腦以 HEVC 串流,而此裝置只能播放 H.264。","pad_watch_decode":"無法在這裡播放畫面。","join_pad_ready":"你的控制器已就緒","join_check_unknown_short":"不在我們的清單中:按鍵可能錯位。","join_full_to_play":"點一下全螢幕,即可用螢幕上的控制器遊玩。","join_pad_none":"連接控制器(USB 或 Bluetooth),然後按任意按鈕。","join_pad_keys":"也可以用鍵盤:WASD 移動,方向鍵為十字鍵,Enter ✕,Backspace ○,Q □,E △,Tab Options。","join_tv_back_hint":"按遙控器上的返回鍵以顯示按鈕。","join_block_note":"{host} 已為好友關閉 PS 和 Create 按鈕。","join_guide_title":"電視上還差一步","join_guide_body":"在控制器上按一次 PS 按鈕。電視會詢問「誰在使用這支控制器?」。選擇「快速遊玩」或你自己的使用者。主持人不需要任何操作。","join_guide_menus":"在 PS5 主畫面上只有房主能操作選單;你的控制器在遊戲裡使用。","join_guide_ok":"知道了","join_host_away":"房主已停止遊戲 — 正在等待對方重新開始({time})","join_reconnecting":"正在重新連線…","join_reconnecting_left":"你的位置會保留 {time}。","pad_turn":"請橫放手機","join_game_label":"{host} 的遊戲","join_title":"加入好友的遊戲","join_title_body":"在 {host} 的 PS5 上以玩家 2、3 或 4 的身分遊玩。","join_name_label":"你的名字","join_name_hint":"你要求加入時,好友會看到這個名字。","join_button":"加入"}}),ke=new Set([`ar`,`fa`]);function Ae(){let e=Object.keys(Oe);try{let t=localStorage.getItem(`ps5upload.lang`);if(t&&e.includes(t))return t}catch{}let t=typeof navigator>`u`?[]:[...navigator.languages??[],navigator.language];for(let n of t){if(!n)continue;if(e.includes(n))return n;let t=n.split(`-`)[0],r=e.find(e=>e===t);if(r)return r;if(t===`zh`)return/TW|HK|MO|Hant/i.test(n)?`zh-TW`:`zh-CN`;let i=e.find(e=>e.split(`-`)[0]===t);if(i)return i}return`en`}var je=Ae();typeof document<`u`&&(document.documentElement.lang=je,document.documentElement.dir=ke.has(je)?`rtl`:`ltr`);var Me=Oe[je]??{},Ne=Oe.en??{},Pe=(e,t)=>t?e.replace(/\{(\w+)\}/g,(e,n)=>n in t?String(t[n]):e):e,Fe=((e,t,n)=>{let r=typeof t==`string`?void 0:t,i=typeof t==`string`?t:n;return Pe(Me[e]??Ne[e]??i??e,r)});function Ie(){return Fe}var Le=4e3;function Re(e,t,n=`lan`){let r=new URLSearchParams(e.replace(/^#/,``)).get(n);if(!r)return null;try{let e=new URL(r),n=e.origin+e.pathname;return/^https?:$/.test(e.protocol)&&r===n&&RegExp(`/${t}/?$`).test(e.pathname)?n:null}catch{return null}}function ze(e,t){return t.key?`${e}#i=${encodeURIComponent(t.key)}`:t.watch?`${e}#w=1`:e}function Be(e,t=Le,n=typeof WebSocket>`u`?void 0:WebSocket){return new Promise(r=>{try{let i=new n(e),a=e=>{clearTimeout(o),i.onopen=i.onclose=i.onerror=null,i.close(),r(e)},o=setTimeout(()=>a(!1),t);i.onopen=()=>a(!0),i.onclose=i.onerror=()=>a(!1)}catch{r(!1)}})}var Ve=[`mismatch`,`no_direct`,`no_room`,`net_full`,`no_hub`,`offer`,`no_webrtc`],He=4100;function Ue(e){if(!e||e.code!==4100||typeof e.reason!=`string`||!e.reason.startsWith(`net:`))return null;let t=e.reason.slice(4);return Ve.includes(t)?t:null}var We=new Set([`key`,`expired`,`full`,`denied`,`no_answer`,`closed`,`old_helper`,`not_playing`,`unreachable`,`slow_down`,`address`,`seat_taken`]),Ge={kicked:`kicked`,host_stopped:`host_stopped`,replaced:`replaced`,lost:`pad_lost`,seat_taken:`seat_taken`},Ke=new Set([`asking`,`picking_user`,`playing`,`reconnecting`,`left`]),qe=e=>Math.max(0,Math.min(255,Math.round(Number(e)||0)));function Je(e){let t;try{let n=JSON.parse(e);if(!n||typeof n!=`object`)return null;t=n}catch{return null}if(typeof t.pong==`number`)return{kind:`pong`,t:t.pong};if(t.stage===`asking`)return{kind:`asking`};if(t.stage===`waiting`)return{kind:`waiting`};if(t.stage===`joined`&&typeof t.player==`number`&&typeof t.token==`string`)return{kind:`joined`,player:t.player,token:t.token,hevc:t.hevc===!0,track:t.track===!0,audio:t.audio===!0};if(t.stage===`refused`){let e=String(t.why??``);return{kind:`refused`,why:We.has(e)?e:`refused`}}if(typeof t.bye==`string`)return{kind:`bye`,why:Object.prototype.hasOwnProperty.call(Ge,t.bye)?Ge[t.bye]:`closed`};if(t.status&&typeof t.status==`object`){let e=t.status,n=typeof e.state==`string`&&Ke.has(e.state)?e.state:null;return{kind:`status`,status:{player:typeof e.player==`number`?e.player:0,state:n,rttMs:typeof e.rtt_ms==`number`?e.rtt_ms:null,host:typeof e.host==`string`&&e.host?e.host:null,blockSystem:e.block_system===!0,streamSeat:e.stream_seat===!0,playsAs:typeof e.plays_as==`string`&&e.plays_as?e.plays_as:null,seatNote:typeof e.seat_note==`string`&&e.seat_note?e.seat_note:null}}}let n=Array.isArray(t.rumble)?[qe(t.rumble[0]),qe(t.rumble[1])]:null,r=Array.isArray(t.light)?[qe(t.light[0]),qe(t.light[1]),qe(t.light[2])]:null;return n||r?{kind:`feedback`,rumble:n,light:r}:null}function Ye(e){return Math.max(-32768,Math.min(32767,Math.round(e)))+32768>>8}function Xe([e,t]){return[Math.max(0,Math.min(1919,Math.round(e))),Math.max(0,Math.min(1079,Math.round(t*1079/941)))]}function Ze(e,t){let n=t.touch?[[0,...Xe(t.touch)]]:[],r=t.motion??null,i=16+n.length*5+(r?25:0),a=new ArrayBuffer(i),o=new DataView(a),s=0;o.setUint8(s++,1),o.setUint32(s,e>>>0,!0),s+=4,o.setUint32(s,t.buttons>>>0,!0),s+=4;for(let e of[t.lx,t.ly,t.rx,t.ry])o.setUint8(s++,Ye(e));o.setUint8(s++,qe(t.l2)),o.setUint8(s++,qe(t.r2)),o.setUint8(s++,n.length);for(let[e,t,r]of n)o.setUint8(s++,e),o.setUint16(s,t,!0),s+=2,o.setUint16(s,r,!0),s+=2;if(r){o.setUint8(s++,2);for(let e of[...r.gyro,...r.accel])o.setFloat32(s,e/1e3,!0),s+=4}return new Uint8Array(a)}function Qe(e){return Math.min(4e3,250*2**Math.max(0,Math.min(e,10)))}var $e=6e4,et=6e4;function tt(e){return e&&/^[0-9A-Fa-f]{2}(:[0-9A-Fa-f]{2}){31}$/.test(e)?e.toUpperCase():null}function nt(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=t.get(`room`)??``,r=t.get(`k`)??``,i=t.get(`fp`)??``,a=t.get(`hub`)??``;return!/^[A-Za-z0-9_-]{22}$/.test(n)||!/^[A-Za-z0-9_-]{8,128}$/.test(r)||!tt(i)||!/^([A-Za-z0-9.-]{1,253}|\[[0-9A-Fa-f:.]{2,45}\])(:\d{1,5})?$/.test(a)?null:{room:n,key:r,fp:i.toUpperCase(),hub:a}}function rt(e){return`ps5upload://join?link=${encodeURIComponent(e)}`}function it(e){return e==null||!Number.isFinite(e)?`none`:e<60?`good`:e<120?`fair`:`slow`}function at(e){switch(e){case 1:return[0,0,255];case 2:return[255,0,0];case 3:return[0,255,0];default:return[255,0,255]}}var ot=(e,t)=>`#version 300 es +`+e.stack}}var Ve=Object.prototype.hasOwnProperty,He=t.unstable_scheduleCallback,Ue=t.unstable_cancelCallback,We=t.unstable_shouldYield,Ge=t.unstable_requestPaint,Ke=t.unstable_now,qe=t.unstable_getCurrentPriorityLevel,Je=t.unstable_ImmediatePriority,Ye=t.unstable_UserBlockingPriority,Xe=t.unstable_NormalPriority,Ze=t.unstable_LowPriority,Qe=t.unstable_IdlePriority,$e=t.log,et=t.unstable_setDisableYieldValue,tt=null,nt=null;function rt(e){if(typeof $e==`function`&&et(e),nt&&typeof nt.setStrictMode==`function`)try{nt.setStrictMode(tt,e)}catch{}}var it=Math.clz32?Math.clz32:st,at=Math.log,ot=Math.LN2;function st(e){return e>>>=0,e===0?32:31-(at(e)/ot|0)|0}var ct=256,lt=262144,ut=4194304;function dt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ft(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=dt(n))):i=dt(o):i=dt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=dt(n))):i=dt(o)):i=dt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function pt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function mt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0n;n++)t.push(e);return t}function vt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function yt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0=vr),xr=` `,Sr=!1;function Cr(e,t){switch(e){case`keyup`:return gr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function wr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Tr=!1;function Er(e,t){switch(e){case`compositionend`:return wr(t);case`keypress`:return t.which===32?(Sr=!0,xr):null;case`textInput`:return e=t.data,e===xr&&Sr?null:e;default:return null}}function Dr(e,t){if(Tr)return e===`compositionend`||!_r&&Cr(e,t)?(e=zn(),Rn=Ln=In=null,Tr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Xr(n)}}function Qr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $r(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Yr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yr(e.document)}return t}function ei(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var ti=Nn&&`documentMode`in document&&11>=document.documentMode,ni=null,ri=null,ii=null,ai=!1;function oi(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ai||ni==null||ni!==Yr(r)||(r=ni,`selectionStart`in r&&ei(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ii&&Jr(ii,r)||(ii=r,r=Jf(ri,`onSelect`),0>=o,i-=o,ea=1<<32-it(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),L&&na(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),L&&na(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return L&&na(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),L&&na(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===ie&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case ne:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===ie){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),uo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&ro(l)===r.type){n(e,r.sibling),c=a(r,o.props),uo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===ie?(c=F(o.props.children,e.mode,c,o.key),uo(c,o),c.return=e,e=c):(c=Vi(o.type,o.key,o.props,null,e.mode,c),uo(c,o),c.return=e,e=c)}return s(e);case re:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Wi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=ro(o),_(e,r,o,c)}if(be(o))return h(e,r,o,c);if(_e(o)){if(l=_e(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,lo(o),c);if(o.$$typeof===se)return _(e,r,ka(e,o),c);fo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Hi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{co=0;var i=_(e,t,n,r);return so=null,i}catch(t){if(t===Za||t===$a)throw t;var a=Li(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var mo=po(!0),ho=po(!1),go=!1;function _o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function yo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function bo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Pi(e),Ni(e,null,n),t}return Ai(e,r,t,n),Pi(e)}function xo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xt(e,n)}}function So(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Co=!1;function wo(){if(Co){var e=Ha;if(e!==null)throw e}}function To(e,t,n,r){Co=!1;var i=e.updateQueue;go=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===Va&&(Co=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=E({},d,f);break a;case 2:go=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),od|=o,e.lanes=o,e.memoizedState=d}}function Eo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Do(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=A.T,s={};s.types=o===null?null:o.types,A.T=s,fc(e,!1,t,n);try{var c=i(),l=A.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?dc(e,t,Ga(c,r),jd(e)):dc(e,t,r,jd(e))}catch(n){dc(e,t,{then:function(){},status:`rejected`,reason:n},jd())}finally{j.p=a,o!==null&&s.types!==null&&(o.types=s.types),A.T=o}}function tc(){}function nc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=rc(e).queue;ec(e,a,t,xe,n===null?tc:function(){return ic(e),n(r)})}function rc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:xe,baseState:xe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:xe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ic(e){var t=rc(e);t.next===null&&(t=e.alternate.memoizedState),dc(e,t.next.queue,{},jd())}function ac(){return Oa(sh)}function oc(){return cs().memoizedState}function sc(){return cs().memoizedState}function cc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=jd();e=yo(n);var r=bo(t,e,n);r!==null&&(Pd(r,t,n),xo(r,t,n)),t={cache:Pa()},e.payload=t;return}t=t.return}}function lc(e,t,n){var r=jd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},pc(e)?mc(t,n):(n=ji(e,t,n,r),n!==null&&(Pd(n,e,r),hc(n,t,r)))}function uc(e,t,n){dc(e,t,n,jd())}function dc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(pc(e))mc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,qr(s,o))return Ai(e,t,i,0),q===null&&ki(),!1}catch{}if(n=ji(e,t,i,r),n!==null)return Pd(n,e,r),hc(n,t,r),!0}return!1}function fc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},pc(e)){if(t)throw Error(i(479))}else t=ji(e,n,r,2),t!==null&&Pd(t,e,2)}function pc(e){var t=e.alternate;return e===B||t!==null&&t===B}function mc(e,t){Ko=Go=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xt(e,n)}}var gc={readContext:Oa,use:ds,useCallback:Qo,useContext:Qo,useEffect:Qo,useImperativeHandle:Qo,useLayoutEffect:Qo,useInsertionEffect:Qo,useMemo:Qo,useReducer:Qo,useRef:Qo,useState:Qo,useDebugValue:Qo,useDeferredValue:Qo,useTransition:Qo,useSyncExternalStore:Qo,useId:Qo,useHostTransitionStatus:Qo,useFormState:Qo,useActionState:Qo,useOptimistic:Qo,useMemoCache:Qo,useCacheRefresh:Qo,useEffectEvent:Qo},_c={readContext:Oa,use:ds,useCallback:function(e,t){return ss().memoizedState=[e,t===void 0?null:t],e},useContext:Oa,useEffect:Vs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),zs(4194308,4,qs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zs(4194308,4,e,t)},useInsertionEffect:function(e,t){zs(4,2,e,t)},useMemo:function(e,t){var n=ss();t=t===void 0?null:t;var r=e();if(qo){rt(!0);try{e()}finally{rt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ss();if(n!==void 0){var i=n(t);if(qo){rt(!0);try{n(t)}finally{rt(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=lc.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=ss();return e={current:e},t.memoizedState=e},useState:function(e){e=Cs(e);var t=e.queue,n=uc.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ys,useDeferredValue:function(e,t){return Qs(ss(),e,t)},useTransition:function(){var e=Cs(!1);return e=ec.bind(null,B,e.queue,!0,!1),ss().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,a=ss();if(L){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),q===null)throw Error(i(349));Y&127||vs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Vs(bs.bind(null,r,o,e),[e]),r.flags|=2048,Ls(9,{destroy:void 0},ys.bind(null,r,o,n,t),null),n},useId:function(){var e=ss(),t=q.identifierPrefix;if(L){var n=ta,r=ea;n=(r&~(1<<32-it(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Jo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Ot]=t,o[kt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(np(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&hl(t)}}return H(t),t.subtreeFlags&=-33554433,gl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&hl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Oe.current,ma(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=sa,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ot]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ep(e.nodeValue,n)),e||da(t,!0)}else e=lp(e).createTextNode(r),e[Ot]=t,t.stateNode=e}return H(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ma(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Ot]=t}else ha(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),e=!1}else n=ga(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(zo(t),t):(zo(t),null);if(t.flags&128)throw Error(i(558))}return H(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ma(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Ot]=t}else ha(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),a=!1}else a=ga(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(zo(t),t):(zo(t),null)}return zo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),vl(t,t.updateQueue),H(t),null);case 4:return je(),e===null&&Wf(t.stateNode.containerInfo),t.flags|=67108864,H(t),null;case 10:return Sa(t.type),H(t),null;case 19:if(Vo(t),r=t.memoizedState,r===null)return H(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)yl(r,!1);else{if(ad!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ho(e),o!==null){for(t.flags|=128,yl(r,!1),e=o.updateQueue,t.updateQueue=e,vl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Bi(n,e),n=n.sibling;return z(t,Bo.current&1|2),L&&na(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ke()>gd&&(t.flags|=128,a=!0,yl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Ho(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,vl(t,e),yl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!L)return H(t),null}else 2*Ke()-r.renderingStartTime>gd&&n!==536870912&&(t.flags|=128,a=!0,yl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ke(),e.sibling=null,o=Bo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||L?z(t,o):(n=o,M(No,t),M(Bo,n),Po===null&&(Po=t)),L&&na(t,r.treeForkCount),e}return H(t),null;case 22:case 23:return zo(t),Mo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(H(t),t.subtreeFlags&6&&(t.flags|=8192)):H(t),n=t.updateQueue,n!==null&&vl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Te(qa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Sa(Na),H(t),null;case 25:return null;case 30:return t.flags|=33554432,H(t),null}throw Error(i(156,t.tag))}function xl(e,t){switch(aa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sa(Na),je(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ne(t),null;case 31:if(t.memoizedState!==null){if(zo(t),t.alternate===null)throw Error(i(340));ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(zo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Vo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return je(),null;case 10:return Sa(t.type),null;case 22:case 23:return zo(t),Mo(),e!==null&&Te(qa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Sa(Na),null;case 25:return null;default:return null}}function Sl(e,t){switch(aa(t),t.tag){case 3:Sa(Na),je();break;case 26:case 27:case 5:Ne(t);break;case 4:je();break;case 31:t.memoizedState!==null&&zo(t);break;case 13:zo(t);break;case 19:Vo(t);break;case 10:Sa(t.type);break;case 22:case 23:zo(t),Mo(),e!==null&&Te(qa);break;case 24:Sa(Na)}}function Cl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function wl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Tl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Do(t,n)}catch(t){Z(e,e.return,t)}}}function El(e,t,n){n.props=wc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Dl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=Si(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);f(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function U(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}}function Ol(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n title`))),np(r,t,n),r[Ot]=e,Ht(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;sg&&(o=g,g=h,h=o);var _=Zr(s,h),v=Zr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,A.T=null,n=wd,wd=null;var o=bd,s=Sd;if(yd=0,xd=bd=null,Sd=0,K&6)throw Error(i(331));var c=K;if(K|=4,Yu(o.current),Vu(o,o.current,s,n),K=c,Df(0,!1),nt&&typeof nt.onPostCommitFiberRoot==`function`)try{nt.onPostCommitFiberRoot(tt,o)}catch{}return!0}finally{j.p=a,A.T=r,uf(e,t)}}function pf(e,t,n){t=Ki(n,t),t=Ac(e.stateNode,t,2),e=bo(e,t,2),e!==null&&(vt(e,2),Ef(e))}function Z(e,t,n){if(e.tag===3)pf(e,e,n);else for(;t!==null;){if(t.tag===3){pf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(vd===null||!vd.has(r))){e=Ki(n,e),n=jc(2),r=bo(t,n,2),r!==null&&(Mc(n,r,t,e),vt(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $u;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(rd=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(ad===4||ad===3&&(Y&62914560)===Y&&300>Ke()-md?K&2?cd|=n:Vd(e,0):cd|=n,ud===Y&&(ud=0)),Ef(e)}function gf(e,t){t===0&&(t=gt()),e=Mi(e,t),e!==null&&(vt(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),gf(e,n)}function yf(e,t){return He(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-it(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=Y,a=ft(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||pt(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&hp()&&(e=Tf);for(var t=Ke(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}yd!==0&&yd!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=ln(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),Ht(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+ln(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+ln(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+ln(n.imageSizes)+`"]`)):i+=`[href="`+ln(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=E({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[It]=!0,o.onload=o.onerror=function(){Ut(o)}),Ht(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+ln(r)+`"][href="`+ln(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=E({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),Ht(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=Vt(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=E({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Ht(c),np(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=Vt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=E({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Ht(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=Vt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=E({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Ht(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var a=(a=Oe.current)?bm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Vt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=Vt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Vt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+ln(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[It]){r.loading=1;return}}else t=e.createElement(`link`),t[It]=!0,t.onload=t.onerror=Ut.bind(null,t),np(t,`link`,n),Ht(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+ln(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+ln(n.href)+`"]`);if(r)return t.instance=r,Ht(r),r;var a=E({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ht(r),np(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,Ht(o),o;r=Im(n),(a=vm.get(a))&&Hm(r,a),o=(e.ownerDocument||e).createElement(`link`),Ht(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,Ht(a),a):(r=n,(a=vm.get(o))&&(r=E({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ht(a),np(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ht(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),Ht(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=b()}))(),S=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function ee(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:S(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var C=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},w=e=>{let t=C(e);return t.charAt(0).toUpperCase()+t.slice(1)},T=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),E={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function te(e){return e!=null}function ne(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??E.width,a=e.size??e.height??E.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?T(...c):T(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??E[`stroke-width`])*Number(e.size??e.width??E.width)/Number(t.size??t.width??E.width):t.strokeWidth??E[`stroke-width`];return[`svg`,{...Object.entries(E).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&te(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&te(t.width)&&{[r(`width`)]:t.width},...`height`in t&&te(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function re(e,t={}){return ne(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var ie=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},D=u(_(),1),ae=(0,D.createContext)({}),oe=()=>(0,D.useContext)(ae),se=(0,D.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=oe()??{},y=!!c||ie(d),[b,x,S=[]]=re(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:T(v,s),hasA11yProp:y,attributes:d});return(0,D.createElement)(b,{ref:f,...x},[...S.map(([e,t])=>(0,D.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function ce(e,t=[],n=[]){let r=typeof e==`string`?ee(e,t,n):e,i=(0,D.forwardRef)(({className:e,...t},n)=>(0,D.createElement)(se,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=w(r.name)),i}var le={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};le.node;var ue=ce(le),de={name:`expand`,size:24,node:[[`path`,{d:`m15 15 6 6`,key:`1s409w`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}],[`path`,{d:`M21 16v5h-5`,key:`1ck2sf`}],[`path`,{d:`M21 8V3h-5`,key:`1qoq8a`}],[`path`,{d:`M3 16v5h5`,key:`1t08am`}],[`path`,{d:`m3 21 6-6`,key:`wwnumi`}],[`path`,{d:`M3 8V3h5`,key:`1ln10m`}],[`path`,{d:`M9 9 3 3`,key:`v551iv`}]]};de.node;var O=ce(de),fe={name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};fe.node;var pe=ce(fe),k={name:`gamepad-2`,size:24,node:[[`line`,{x1:`6`,x2:`10`,y1:`11`,y2:`11`,key:`1gktln`}],[`line`,{x1:`8`,x2:`8`,y1:`9`,y2:`13`,key:`qnk9ow`}],[`line`,{x1:`15`,x2:`15.01`,y1:`12`,y2:`12`,key:`krot7o`}],[`line`,{x1:`18`,x2:`18.01`,y1:`10`,y2:`10`,key:`1lcuu1`}],[`path`,{d:`M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z`,key:`mfqc10`}]]};k.node;var me=ce(k),he={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};he.node;var ge=ce(he),_e={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};_e.node;var ve=ce(_e),ye={name:`minimize`,size:24,node:[[`path`,{d:`M8 3v3a2 2 0 0 1-2 2H3`,key:`hohbtr`}],[`path`,{d:`M21 8h-3a2 2 0 0 1-2-2V3`,key:`5jw1f3`}],[`path`,{d:`M3 16h3a2 2 0 0 1 2 2v3`,key:`198tvr`}],[`path`,{d:`M16 21v-3a2 2 0 0 1 2-2h3`,key:`ph8mxp`}]]};ye.node;var be=ce(ye),A={name:`rotate-cw`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]};A.node;var j=ce(A),xe={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};xe.node;var Se=ce(xe),Ce={name:`volume-2`,size:24,node:[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]};Ce.node;var we=ce(Ce),Te={name:`volume-x`,size:24,node:[[`path`,{d:`M11 4.702a.7.7 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.7.7 0 0 0 11 19.298z`,key:`1p7khw`}],[`path`,{d:`m16.5 14.5 5-5`,key:`cul3yw`}],[`path`,{d:`m16.5 9.5 5 5`,key:`1akey5`}]]};Te.node;var M=ce(Te),Ee={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Ee.node;var De=ce(Ee),Oe=({"ar":{"usb_skipped_not_payload":"{name}: ليس ملف .elf أو .bin","usb_skipped_unknown":"{id}: لم يعد في قائمة الحمولات","browser_unsupported":"يتطلب هذا تطبيق سطح المكتب. لا يعمل في المتصفح.","video_recovered_notice":"تعطّل «العب» في المرة السابقة أثناء بدء الصورة، لذا يُفك ترميز الصورة الآن بدون بطاقة الرسومات (للتغيير: الإعدادات › النافذة › الرسومات › فك ترميز الفيديو بالعتاد).","video_recovered_title":"يُفك ترميز الصورة الآن برمجيًا","open_in_title":"هل تفتحه في تطبيق PS5Upload؟","open_in_body":"هل لديك تطبيق PS5Upload على هذا الجهاز؟ افتح الرابط فيه، أو تابع في المتصفح.","open_in_app":"فتح في التطبيق","open_in_browser":"المتابعة في المتصفح","open_in_remember":"تذكّر اختياري على هذا الجهاز","open_in_opening":"جارٍ فتح تطبيق PS5Upload…","open_in_not_opened":"لم يحدث شيء؟ ربما التطبيق غير مثبّت على هذا الجهاز.","open_in_again":"حاول مجددًا","pad_8bitdo_no_xinput":"لا يحتوي جهاز 8BitDo هذا على وضع X-input. إذا كان أحد الأزرار خاطئًا، فافحص وحدة التحكم.","pad_8bitdo_how_switch":"اضبط المفتاح في الخلف على X ثم اضغط Start","pad_8bitdo_how_startx":"أطفئه، ثم اضغط مطولًا على Start + X لتشغيله","pad_8bitdo_how_receiver":"استخدم جهاز الاستقبال 2.4G أو كابل USB","pad_8bitdo_how_manual":"يشرح دليله الطريقة","pad_8bitdo_xinput":"للحصول على أفضل نتيجة، بدّل وحدة 8BitDo إلى وضع X-input: {how}.","rp_touch_left_stick":"العصا اليسرى","rp_touch_right_stick":"العصا اليمنى","rp_touch_touchpad":"لوحة اللمس","rp_menu":"القائمة","rp_pad_step_lx":"ادفع العصا اليسرى إلى اليمين","rp_pad_step_ly":"ادفع العصا اليسرى إلى الأسفل","rp_pad_step_rx":"ادفع العصا اليمنى إلى اليمين","rp_pad_step_ry":"ادفع العصا اليمنى إلى الأسفل","join_check_bottom":"اضغط زر الوجه السفلي (✕)","join_check_right":"اضغط زر الوجه الأيمن (○)","join_check_left":"اضغط زر الوجه الأيسر (□)","join_check_top":"اضغط زر الوجه العلوي (△)","rp_pad_press":"اضغط {name}","join_check_saved":"تم الحفظ لوحدة التحكم هذه على هذا الجهاز. جرّبها أدناه.","join_check_title":"افحص وحدة التحكم","join_done":"تم","rp_pads_none":"لم تُرصد أي يد تحكم بعد. وصّل واحدة واضغط أي زر فيها.","rp_pad_mapped":"تلعب بتعيين أزرارك","join_check_unknown":"وحدة التحكم هذه ليست في قائمتنا، لذا قد تكون أزرارها مختلطة. يستغرق إعدادها بضع ثوانٍ.","rp_pad_standard":"معروفة","rp_pad_progress":"{n} من {total}","rp_pad_skip":"تخطٍّ","rp_pad_back":"رجوع","rp_pad_cancel":"إلغاء","join_check_try":"اضغط الأزرار وحرّك العصي: ما تضغطه يضيء.","join_check_redo":"إعادة","join_check_map":"إعداد الأزرار","rp_pad_reset":"إعادة ضبط","join_open_lan_body":"لا يمكنك الوصول إلى الإنترنت؟ إذا كنت على شبكة Wi-Fi نفسها مع صديقك، فافتح اللعبة هناك.","join_open_lan":"افتح على شبكة Wi-Fi هذه","join_path_lan":"الشبكة المنزلية","join_path_internet":"الإنترنت","join_seat_taken":"احتاج {host} إلى استعادة يد التحكم ولم تكن هناك يد تحكم أخرى متاحة على PS5، لذا خرجت من اللعبة. اطلب من {host} أن يسمح لك بالدخول مرة أخرى.","join_refused_key":"انتهت صلاحية هذه الدعوة. اطلب من {host} رابطًا جديدًا.","join_refused_expired":"فقدت مكانك في اللعبة. اطلب من {host} إدخالك مجددًا.","join_refused_full":"اللعبة ممتلئة: يوجد أربعة لاعبين بالفعل.","join_refused_denied":"لم يسمح لك {host} بالدخول هذه المرة.","join_refused_no_answer":"لم يُجب {host} في الوقت المناسب. أخبر {host} ثم حاول مرة أخرى.","join_refused_closed":"{host} لا يستضيف العب معًا الآن.","join_refused_old_helper":"يحتاج PS5 الخاص بـ {host} إلى مساعد محدّث لميزة العب معًا.","join_refused_not_playing":"{host} لا يلعب الآن. اطلب من {host} أن يبدأ اللعب أولًا.","join_refused_unreachable":"لم يتمكن حاسوب {host} من الوصول إلى جهاز PS5. حاول مرة أخرى بعد قليل.","join_refused_slow_down":"رموز خاطئة كثيرة جدًا. انتظر دقيقة ثم حاول مرة أخرى.","join_refused_address":"عنوان هذا الرابط خارج شبكتك المنزلية، لذا لن يستخدمه التطبيق. اطلب من {host} رابطًا يحمل عنوان IP لجهازه.","join_refused_other":"لم يسمح لك {host} بالدخول.","join_ended_kicked":"أخرجك {host} من اللعبة.","join_ended_closed":"أغلق {host} العب معًا.","join_ended_host_stopped":"توقف المضيف عن اللعب.","join_ended_replaced":"فُتحت هذه اللعبة في علامة تبويب أخرى أو على جهاز آخر، لذا توقفت هنا.","join_ended_pad_lost":"فقد PS5 يد التحكم الخاصة بك، لذا خرجت من اللعبة. اطلب من {host} إدخالك مجددًا.","join_ended_gave_up":"لم يعد الاتصال بـ {host} في الوقت المناسب.","join_net_lost":"انقطع الاتصال بـ{host}. تحقق من اتصالك بالإنترنت ثم اطلب مرة أخرى.","join_ended_lost":"تعذّر الوصول إلى {host}. تأكد أنكما على الشبكة نفسها.","join_ended_left":"غادرت اللعبة.","join_net_mismatch":"هذا الرابط لا يطابق المضيف؛ اطلب منه رابطًا جديدًا.","join_net_no_direct":"لا يمكن إنشاء اتصال مباشر من هذه الشبكة (الموجّهان لدى الطرفين صارمان). جرّب Wi-Fi بدلًا من بيانات الجوال، أو اطلب من المضيف تشغيل UPnP.","join_net_no_room":"هذه الدعوة لم تعد مفتوحة. اطلب من {host} رابطًا جديدًا.","join_net_full":"لا يتّسع لعب {host} لصديق آخر الآن. حاول مجددًا بعد لحظة.","join_net_no_hub":"تعذّر الوصول إلى خدمة دعوات PS5Upload. تحقّق من اتصالك بالإنترنت ثم حاول مجددًا.","join_net_offer":"تعذّر على كمبيوتر {host} الاتصال بهذا المتصفح. جرّب متصفحًا آخر.","join_net_no_webrtc":"هذا المتصفح لا يستطيع إنشاء اتصالات مباشرة. جرّب إصدارًا حديثًا من Chrome أو Safari أو Firefox.","join_cancel":"إلغاء","join_host_fallback":"صديقك","join_connecting":"جارٍ الاتصال بـ {host}…","join_waiting":"بانتظار أن يسمح لك {host} بالدخول","join_waiting_body":"يرى {host} اسمك على شاشته ويضغط سماح.","join_retry":"حاول مجددًا","join_again":"اطلب الانضمام مجددًا","join_playing_at":"تلعب لدى {host}","join_you_are":"أنت اللاعب {n}","join_seat_stream":"أنت تلعب بمستخدم PS5 الخاص بـ {host}. لا حاجة لاختيار مستخدم.","join_plays_as":"أنت تلعب باسم {profile}. لا حاجة لاختيار مستخدم.","join_seat_tv_asks":"اختار {host} ملفًا شخصيًا لك، لكن تعذّر استخدامه. سيسألك التلفاز عن هويتك.","join_picking":"اضغط PS، ثم اختر اللعب السريع على التلفاز","join_hide_controls":"إخفاء","join_sound":"اضغط لتشغيل الصوت","rp_unmute":"تشغيل الصوت","rp_mute":"كتم","join_no_sound":"لا يوجد صوت في هذا المتصفح","join_exit_fullscreen":"الخروج من ملء الشاشة","pad_fill":"ملء الشاشة","join_leave":"مغادرة","join_show_controls":"إظهار عناصر التحكم","join_hold_hint":"اضغط مطولاً على الصورة لإظهار الأزرار","pad_watch_no_hevc":"لا يستطيع هذا الجهاز تشغيل صورة هذا البث: الحاسوب يبث بـ HEVC وهذا الجهاز يشغّل H.264 فقط.","pad_watch_decode":"تعذّر تشغيل الصورة هنا.","join_pad_ready":"يد التحكم جاهزة","join_check_unknown_short":"ليست في قائمتنا: قد تكون الأزرار مختلطة.","join_full_to_play":"اضغط على ملء الشاشة للعب بيد التحكم التي على الشاشة.","join_pad_none":"وصّل يد تحكم (USB أو Bluetooth) واضغط أي زر.","join_pad_keys":"أو استخدم لوحة المفاتيح: WASD للتحريك، الأسهم للأزرار الاتجاهية، Enter ✕، Backspace ○، Q □، E △، Tab Options.","join_tv_back_hint":"اضغط على زر الرجوع في جهاز التحكم عن بُعد لإظهار الأزرار.","join_block_note":"أوقف {host} زرَّي PS وCreate للأصدقاء.","join_guide_title":"خطوة أخيرة على التلفاز","join_guide_body":"اضغط زر PS مرة واحدة على يد التحكم. يسأل التلفاز «من يستخدم يد التحكم هذه؟». اختر اللعب السريع أو مستخدمك الخاص. لا يحتاج المضيف إلى فعل أي شيء.","join_guide_menus":"في الشاشة الرئيسية لجهاز PS5 يتحكم المضيف وحده بالقوائم؛ يد التحكم الخاصة بك تلعب داخل الألعاب.","join_guide_ok":"فهمت","join_host_away":"توقف المضيف عن اللعب — بانتظار أن يبدأ من جديد ({time})","join_reconnecting":"جارٍ إعادة الاتصال…","join_reconnecting_left":"مكانك محفوظ لمدة {time}.","pad_turn":"أدر الهاتف أفقيًا","join_game_label":"لعبة {host}","join_title":"انضم إلى لعبة صديق","join_title_body":"العب على PS5 الخاص بـ {host} كلاعب 2 أو 3 أو 4.","join_name_label":"اسمك","join_name_hint":"يرى صديقك هذا الاسم عندما تطلب الانضمام.","join_button":"انضمام"},"bn":{"usb_skipped_not_payload":"{name}: .elf বা .bin ফাইল নয়","usb_skipped_unknown":"{id}: আর পেলোড তালিকায় নেই","browser_unsupported":"এর জন্য ডেস্কটপ অ্যাপ দরকার। এটি ব্রাউজারে কাজ করে না।","video_recovered_notice":"গতবার ছবি শুরু করার সময় খেলুন ক্র্যাশ করেছিল, তাই ছবি এখন গ্রাফিক্স কার্ড ছাড়া ডিকোড হয় (বদলাতে সেটিংস › উইন্ডো › গ্রাফিক্স › হার্ডওয়্যার ভিডিও ডিকোডিং)।","video_recovered_title":"ছবি এখন সফটওয়্যারে ডিকোড হয়","open_in_title":"PS5Upload অ্যাপে খুলবেন?","open_in_body":"এই ডিভাইসে PS5Upload অ্যাপ আছে? সেখানে খুলুন, অথবা ব্রাউজারেই চালিয়ে যান।","open_in_app":"অ্যাপে খুলুন","open_in_browser":"ব্রাউজারে চালিয়ে যান","open_in_remember":"এই ডিভাইসে আমার পছন্দ মনে রাখুন","open_in_opening":"PS5Upload অ্যাপ খোলা হচ্ছে…","open_in_not_opened":"কিছু হলো না? হয়তো এই ডিভাইসে অ্যাপটি নেই।","open_in_again":"আবার চেষ্টা করুন","pad_8bitdo_no_xinput":"এই 8BitDo-তে X-input মোড নেই। কোনো বোতাম ভুল হলে কন্ট্রোলারটি পরীক্ষা করুন।","pad_8bitdo_how_switch":"পেছনের সুইচটি X-এ দিন, তারপর Start চাপুন","pad_8bitdo_how_startx":"এটি বন্ধ করুন, তারপর Start + X চেপে ধরে চালু করুন","pad_8bitdo_how_receiver":"এর 2.4G রিসিভার বা একটি USB কেবল ব্যবহার করুন","pad_8bitdo_how_manual":"এর ম্যানুয়ালে উপায় দেওয়া আছে","pad_8bitdo_xinput":"সেরা ফলের জন্য আপনার 8BitDo-কে X-input মোডে নিন: {how}।","rp_touch_left_stick":"বাম স্টিক","rp_touch_right_stick":"ডান স্টিক","rp_touch_touchpad":"টাচপ্যাড","rp_menu":"মেনু","rp_pad_step_lx":"বাম স্টিক ডানে ঠেলুন","rp_pad_step_ly":"বাম স্টিক নিচে ঠেলুন","rp_pad_step_rx":"ডান স্টিক ডানে ঠেলুন","rp_pad_step_ry":"ডান স্টিক নিচে ঠেলুন","join_check_bottom":"নিচের ফেস বোতামটি চাপুন (✕)","join_check_right":"ডান দিকের ফেস বোতামটি চাপুন (○)","join_check_left":"বাঁ দিকের ফেস বোতামটি চাপুন (□)","join_check_top":"উপরের ফেস বোতামটি চাপুন (△)","rp_pad_press":"{name} চাপুন","join_check_saved":"এই ডিভাইসে এই কন্ট্রোলারের জন্য সেভ হয়েছে। নিচে চেষ্টা করে দেখুন।","join_check_title":"আপনার কন্ট্রোলার পরীক্ষা করুন","join_done":"হয়ে গেছে","rp_pads_none":"এখনও কোনো কন্ট্রোলার দেখা যায়নি। একটি সংযুক্ত করে তার যেকোনো বোতাম চাপুন।","rp_pad_mapped":"আপনার ম্যাপিং দিয়ে খেলে","join_check_unknown":"এই কন্ট্রোলারটি আমাদের তালিকায় নেই, তাই এর বোতামগুলো এলোমেলো হতে পারে। সেট আপ করতে কয়েক সেকেন্ড লাগে।","rp_pad_standard":"শনাক্ত হয়েছে","rp_pad_progress":"{total}-এর মধ্যে {n}","rp_pad_skip":"এড়িয়ে যান","rp_pad_back":"পেছনে","rp_pad_cancel":"বাতিল","join_check_try":"বোতাম চাপুন ও স্টিক নাড়ান: যা চাপবেন তা জ্বলে উঠবে।","join_check_redo":"আবার করুন","join_check_map":"বোতাম সেট আপ করুন","rp_pad_reset":"রিসেট","join_open_lan_body":"ইন্টারনেট পাচ্ছেন না? বন্ধুর সাথে একই Wi-Fi-তে থাকলে সেখানেই গেমটি খুলুন।","join_open_lan":"এই Wi-Fi-তে খুলুন","join_path_lan":"হোম নেটওয়ার্ক","join_path_internet":"ইন্টারনেট","join_seat_taken":"{host}-এর নিজের কন্ট্রোলার ফেরত দরকার ছিল এবং PS5-এ আর কোনো কন্ট্রোলার খালি ছিল না, তাই আপনি গেম থেকে বেরিয়ে গেছেন। {host}-কে আবার ঢুকতে দিতে বলুন।","join_refused_key":"এই আমন্ত্রণের মেয়াদ শেষ। {host}-এর কাছে নতুন লিংক চান।","join_refused_expired":"গেমে আপনার জায়গা চলে গেছে। {host}-কে আবার ঢুকতে দিতে বলুন।","join_refused_full":"গেম পূর্ণ: ইতিমধ্যে চারজন খেলছে।","join_refused_denied":"{host} এবার আপনাকে ঢুকতে দেয়নি।","join_refused_no_answer":"{host} সময়মতো উত্তর দেননি। {host}-কে জানান, তারপর আবার চেষ্টা করুন।","join_refused_closed":"{host} এখন \"একসাথে খেলুন\" চালাচ্ছে না।","join_refused_old_helper":"\"একসাথে খেলুন\"-এর জন্য {host}-এর PS5-এ আপডেট করা হেল্পার দরকার।","join_refused_not_playing":"{host} এখন খেলছে না। {host}-কে আগে খেলা শুরু করতে বলুন।","join_refused_unreachable":"{host}-এর কম্পিউটার তাদের PS5-এ পৌঁছাতে পারেনি। একটু পরে আবার চেষ্টা করুন।","join_refused_slow_down":"অনেক বেশি ভুল কোড। এক মিনিট অপেক্ষা করে আবার চেষ্টা করুন।","join_refused_address":"এই লিঙ্কের ঠিকানা আপনার হোম নেটওয়ার্কের বাইরে, তাই অ্যাপ এটি ব্যবহার করবে না। {host}-এর কাছে তাঁর কম্পিউটারের IP ঠিকানা সহ একটি লিঙ্ক চান।","join_refused_other":"{host} আপনাকে ঢুকতে দেয়নি।","join_ended_kicked":"{host} আপনাকে গেম থেকে বের করে দিয়েছে।","join_ended_closed":"{host} \"একসাথে খেলুন\" বন্ধ করেছে।","join_ended_host_stopped":"হোস্ট খেলা বন্ধ করেছে।","join_ended_replaced":"এই গেমটি অন্য ট্যাব বা ডিভাইসে খোলা হয়েছে, তাই এখানে থেমে গেছে।","join_ended_pad_lost":"PS5 আপনার কন্ট্রোলার হারিয়েছে, তাই আপনি গেমের বাইরে। {host}-কে আবার ঢুকতে দিতে বলুন।","join_ended_gave_up":"{host}-এর সাথে সংযোগ সময়মতো ফিরে আসেনি।","join_net_lost":"{host}-এর সাথে সংযোগ কেটে গেছে। আপনার ইন্টারনেট সংযোগ দেখুন, তারপর আবার অনুরোধ করুন।","join_ended_lost":"{host}-এর কাছে পৌঁছানো যায়নি। আপনারা একই নেটওয়ার্কে আছেন কিনা দেখুন।","join_ended_left":"আপনি গেম ছেড়ে গেছেন।","join_net_mismatch":"এই লিংকটি হোস্টের সঙ্গে মেলে না; তাঁর কাছে নতুন লিংক চান।","join_net_no_direct":"এই নেটওয়ার্ক থেকে সরাসরি সংযোগ সম্ভব নয় (দুই দিকের রাউটারই কড়া)। মোবাইল ডেটার বদলে Wi-Fi চেষ্টা করুন, অথবা হোস্টকে UPnP চালু করতে বলুন।","join_net_no_room":"এই আমন্ত্রণটি আর খোলা নেই। {host}-এর কাছে নতুন লিংক চান।","join_net_full":"{host}-এর গেমে এখন আরেকজন বন্ধুর জায়গা নেই। একটু পরে আবার চেষ্টা করুন।","join_net_no_hub":"PS5Upload আমন্ত্রণ পরিষেবায় পৌঁছানো যায়নি। ইন্টারনেট সংযোগ দেখে আবার চেষ্টা করুন।","join_net_offer":"{host}-এর কম্পিউটার এই ব্রাউজারের সঙ্গে সংযোগ করতে পারেনি। অন্য ব্রাউজার চেষ্টা করুন।","join_net_no_webrtc":"এই ব্রাউজার সরাসরি সংযোগ করতে পারে না। Chrome, Safari বা Firefox-এর নতুন সংস্করণ চেষ্টা করুন।","join_cancel":"বাতিল","join_host_fallback":"আপনার বন্ধু","join_connecting":"{host}-এর সাথে সংযোগ হচ্ছে…","join_waiting":"{host} আপনাকে ঢুকতে দেওয়ার অপেক্ষায়","join_waiting_body":"{host} তার স্ক্রিনে আপনার নাম দেখে \"অনুমতি দিন\" চাপবে।","join_retry":"আবার চেষ্টা করুন","join_again":"আবার যোগ দিতে অনুরোধ করুন","join_playing_at":"{host}-এর কাছে খেলছেন","join_you_are":"আপনি প্লেয়ার {n}","join_seat_stream":"আপনি {host}-এর PS5 ইউজার হিসেবে খেলছেন। ইউজার বাছার দরকার নেই।","join_plays_as":"আপনি {profile} হিসেবে খেলছেন। কাউকে বেছে নিতে হবে না।","join_seat_tv_asks":"{host} আপনার জন্য একটি প্রোফাইল বেছে রেখেছিল, কিন্তু সেটা ব্যবহার করা যায়নি। টিভি জিজ্ঞেস করবে আপনি কে।","join_picking":"PS চাপুন, তারপর টিভিতে দ্রুত খেলা বেছে নিন","join_hide_controls":"লুকান","join_sound":"শব্দের জন্য ট্যাপ করুন","rp_unmute":"শব্দ চালু","rp_mute":"নিঃশব্দ","join_no_sound":"এই ব্রাউজারে শব্দ নেই","join_exit_fullscreen":"ফুল স্ক্রিন থেকে বের হন","pad_fill":"পূর্ণ স্ক্রিন","join_leave":"ছেড়ে যান","join_show_controls":"নিয়ন্ত্রণগুলি দেখান","join_hold_hint":"বোতামগুলো দেখাতে ছবিতে চেপে ধরে রাখুন","pad_watch_no_hevc":"এই ডিভাইস এই স্ট্রিমের ছবি চালাতে পারে না: কম্পিউটার HEVC-তে স্ট্রিম করে, আর এই ডিভাইস শুধু H.264 চালায়।","pad_watch_decode":"ছবিটি এখানে চালানো যায়নি।","join_pad_ready":"আপনার কন্ট্রোলার প্রস্তুত","join_check_unknown_short":"আমাদের তালিকায় নেই: বোতামগুলো এলোমেলো হতে পারে।","join_full_to_play":"অন-স্ক্রিন কন্ট্রোলার দিয়ে খেলতে ফুল স্ক্রিনে ট্যাপ করুন।","join_pad_none":"একটি কন্ট্রোলার সংযুক্ত করুন (USB বা Bluetooth) এবং যেকোনো বোতাম চাপুন।","join_pad_keys":"অথবা কিবোর্ড ব্যবহার করুন: WASD নড়াচড়া, তীর চিহ্ন D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options।","join_tv_back_hint":"বোতামগুলো দেখতে রিমোটে Back চাপুন।","join_block_note":"{host} বন্ধুদের জন্য PS ও Create বন্ধ করে রেখেছে।","join_guide_title":"টিভিতে আর একটি ধাপ","join_guide_body":"আপনার কন্ট্রোলারে একবার PS চাপুন। টিভি জিজ্ঞেস করবে \"এই কন্ট্রোলার কে ব্যবহার করছে?\"। দ্রুত খেলা বা নিজের ইউজার বেছে নিন। হোস্টকে কিছু করতে হবে না।","join_guide_menus":"PS5-এর হোম স্ক্রিনে শুধু হোস্ট মেনু চালাতে পারে; আপনার কন্ট্রোলার গেমের ভেতরে খেলে।","join_guide_ok":"বুঝেছি","join_host_away":"হোস্ট খেলা বন্ধ করেছে — আবার শুরু করার অপেক্ষায় ({time})","join_reconnecting":"আবার সংযোগ হচ্ছে…","join_reconnecting_left":"আপনার জায়গা {time} ধরে রাখা থাকবে।","pad_turn":"ফোনটি আড়াআড়ি ঘোরান","join_game_label":"{host}-এর গেম","join_title":"বন্ধুর গেমে যোগ দিন","join_title_body":"{host}-এর PS5-এ প্লেয়ার 2, 3 বা 4 হিসেবে খেলুন।","join_name_label":"আপনার নাম","join_name_hint":"যোগ দিতে অনুরোধ করলে আপনার বন্ধু এটি দেখবে।","join_button":"যোগ দিন"},"de":{"usb_skipped_not_payload":"{name}: keine .elf- oder .bin-Datei","usb_skipped_unknown":"{id}: nicht mehr in der Payload-Liste","browser_unsupported":"Dafür brauchst du die Desktop-App. Im Browser funktioniert das nicht.","video_recovered_notice":"Play ist beim letzten Mal beim Starten des Bildes abgestürzt, daher wird das Bild jetzt ohne Grafikkarte dekodiert (ändern unter Einstellungen › Fenster › Grafik › Hardware-Videodekodierung).","video_recovered_title":"Bild wird jetzt per Software dekodiert","open_in_title":"In der PS5Upload-App öffnen?","open_in_body":"Hast du die PS5Upload-App auf diesem Gerät? Öffne dies dort oder mach im Browser weiter.","open_in_app":"In der App öffnen","open_in_browser":"Im Browser weiter","open_in_remember":"Meine Wahl auf diesem Gerät merken","open_in_opening":"PS5Upload-App wird geöffnet …","open_in_not_opened":"Nichts passiert? Die App ist vielleicht nicht auf diesem Gerät.","open_in_again":"Erneut versuchen","pad_8bitdo_no_xinput":"Dieser 8BitDo hat keinen X-input-Modus. Wenn eine Taste falsch ist, prüfe den Controller.","pad_8bitdo_how_switch":"stell den Schalter auf der Rückseite auf X und drück dann Start","pad_8bitdo_how_startx":"schalte ihn aus und halte dann Start + X gedrückt, um ihn einzuschalten","pad_8bitdo_how_receiver":"nutze seinen 2.4G-Empfänger oder ein USB-Kabel","pad_8bitdo_how_manual":"wie, steht in seiner Anleitung","pad_8bitdo_xinput":"Für das beste Ergebnis schalte deinen 8BitDo in den X-input-Modus: {how}.","rp_touch_left_stick":"Linker Stick","rp_touch_right_stick":"Rechter Stick","rp_menu":"Menü","rp_pad_step_lx":"Drücke den linken Stick nach rechts","rp_pad_step_ly":"Drücke den linken Stick nach unten","rp_pad_step_rx":"Drücke den rechten Stick nach rechts","rp_pad_step_ry":"Drücke den rechten Stick nach unten","join_check_bottom":"Drück die untere Aktionstaste (✕)","join_check_right":"Drück die rechte Aktionstaste (○)","join_check_left":"Drück die linke Aktionstaste (□)","join_check_top":"Drück die obere Aktionstaste (△)","rp_pad_press":"Drücke {name}","join_check_saved":"Für diesen Controller auf diesem Gerät gespeichert. Probier es unten aus.","join_check_title":"Controller prüfen","join_done":"Fertig","rp_pads_none":"Noch kein Controller erkannt. Schließe einen an und drücke eine beliebige Taste darauf.","rp_pad_mapped":"Spielt mit deiner Belegung","join_check_unknown":"Dieser Controller ist nicht auf unserer Liste, die Tasten könnten also vertauscht sein. Das Einrichten dauert nur ein paar Sekunden.","rp_pad_standard":"Erkannt","rp_pad_progress":"{n} von {total}","rp_pad_skip":"Überspringen","rp_pad_back":"Zurück","rp_pad_cancel":"Abbrechen","join_check_try":"Drück Tasten und beweg die Sticks: Was du drückst, leuchtet auf.","join_check_redo":"Neu einrichten","join_check_map":"Tasten einrichten","rp_pad_reset":"Zurücksetzen","join_open_lan_body":"Kein Internet? Wenn du im selben WLAN wie dein Freund bist, öffne das Spiel dort.","join_open_lan":"In diesem WLAN öffnen","join_path_lan":"Heimnetz","join_seat_taken":"{host} brauchte seinen Controller zurück, und auf der PS5 war kein anderer Controller frei, daher bist du aus dem Spiel. Bitte {host}, dich wieder hereinzulassen.","join_refused_key":"Diese Einladung ist abgelaufen. Bitte {host} um einen neuen Link.","join_refused_expired":"Dein Platz im Spiel ist verloren. Bitte {host}, dich wieder hereinzulassen.","join_refused_full":"Das Spiel ist voll: Es sind schon vier Spieler da.","join_refused_denied":"{host} hat dich diesmal nicht reingelassen.","join_refused_no_answer":"{host} hat nicht rechtzeitig geantwortet. Sag {host} Bescheid und versuche es noch einmal.","join_refused_closed":"{host} bietet gerade kein „Zusammen spielen“ an.","join_refused_old_helper":"Die PS5 von {host} braucht einen aktuellen Helfer für „Zusammen spielen“.","join_refused_not_playing":"{host} spielt gerade nicht. Bitte {host}, zuerst Spielen zu starten.","join_refused_unreachable":"Der Computer von {host} hat die PS5 nicht erreicht. Versuch es gleich noch einmal.","join_refused_slow_down":"Zu viele falsche Codes. Warte eine Minute und versuch es dann noch einmal.","join_refused_address":"Die Adresse dieses Links liegt außerhalb deines Heimnetzes, daher verwendet die App sie nicht. Bitte {host} um einen Link mit der IP-Adresse des Computers.","join_refused_other":"{host} hat dich nicht reingelassen.","join_ended_kicked":"{host} hat dich aus dem Spiel genommen.","join_ended_closed":"{host} hat „Zusammen spielen“ beendet.","join_ended_host_stopped":"Der Gastgeber hat aufgehört zu spielen.","join_ended_replaced":"Dieses Spiel wurde in einem anderen Tab oder auf einem anderen Gerät geöffnet, daher wurde es hier beendet.","join_ended_pad_lost":"Die PS5 hat deinen Controller verloren, daher bist du aus dem Spiel. Bitte {host}, dich wieder hereinzulassen.","join_ended_gave_up":"Die Verbindung zu {host} kam nicht rechtzeitig zurück.","join_net_lost":"Die Verbindung zu {host} ist abgebrochen. Prüfe deine Internetverbindung und frage dann erneut.","join_ended_lost":"{host} nicht erreichbar. Prüfe, ob ihr im selben Netzwerk seid.","join_ended_left":"Du hast das Spiel verlassen.","join_net_mismatch":"Dieser Link passt nicht zum Gastgeber. Bitte ihn um einen neuen.","join_net_no_direct":"Von diesem Netzwerk aus ist keine direkte Verbindung möglich (die Router beider Seiten sind streng). Versuche WLAN statt mobiler Daten oder bitte den Gastgeber, UPnP einzuschalten.","join_net_no_room":"Diese Einladung ist nicht mehr offen. Bitte {host} um einen neuen Link.","join_net_full":"Im Spiel von {host} ist gerade kein Platz für einen weiteren Freund. Versuche es gleich noch einmal.","join_net_no_hub":"Der Einladungsdienst von PS5Upload ist nicht erreichbar. Prüfe deine Internetverbindung und versuche es dann erneut.","join_net_offer":"Der Computer von {host} konnte sich nicht mit diesem Browser verbinden. Versuche einen anderen Browser.","join_net_no_webrtc":"Dieser Browser kann keine direkten Verbindungen herstellen. Versuche ein aktuelles Chrome, Safari oder Firefox.","join_cancel":"Abbrechen","join_host_fallback":"dein Freund","join_connecting":"Verbinde mit {host}…","join_waiting":"Warte, bis {host} dich reinlässt","join_waiting_body":"{host} sieht deinen Namen auf dem Bildschirm und tippt auf „Zulassen“.","join_retry":"Erneut versuchen","join_again":"Erneut zum Mitspielen anfragen","join_playing_at":"Du spielst bei {host}","join_you_are":"Du bist Spieler {n}","join_seat_stream":"Du spielst als PS5-Benutzer von {host}. Du musst keinen wählen.","join_plays_as":"Du spielst als {profile}. Du musst keinen wählen.","join_seat_tv_asks":"{host} hat ein Profil für dich gewählt, aber es konnte nicht genutzt werden. Der Fernseher fragt, wer du bist.","join_picking":"PS drücken, dann am Fernseher „Schnellspiel“ wählen","join_hide_controls":"Ausblenden","join_sound":"Für Ton tippen","rp_unmute":"Ton an","rp_mute":"Stumm","join_no_sound":"Kein Ton in diesem Browser","join_exit_fullscreen":"Vollbild verlassen","pad_fill":"Vollbild","join_leave":"Verlassen","join_show_controls":"Steuerelemente einblenden","join_hold_hint":"Bild gedrückt halten, um die Tasten einzublenden","pad_watch_no_hevc":"Dieses Gerät kann das Bild dieses Streams nicht abspielen: Der Computer streamt HEVC, dieses Gerät kann nur H.264.","pad_watch_decode":"Das Bild konnte hier nicht abgespielt werden.","join_pad_ready":"Dein Controller ist bereit","join_check_unknown_short":"Nicht auf unserer Liste: Tasten könnten vertauscht sein.","join_full_to_play":"Tippe auf Vollbild, um mit dem Bildschirm-Controller zu spielen.","join_pad_none":"Schließe einen Controller an (USB oder Bluetooth) und drücke eine beliebige Taste.","join_pad_keys":"Oder nutze die Tastatur: WASD bewegen, Pfeiltasten Steuerkreuz, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Drücke auf der Fernbedienung Zurück, um die Schaltflächen einzublenden.","join_block_note":"{host} hat PS und Create für Freunde ausgeschaltet.","join_guide_title":"Noch ein Schritt am Fernseher","join_guide_body":"Drücke einmal PS auf deinem Controller. Der Fernseher fragt „Wer benutzt diesen Controller?“. Wähle „Schnellspiel“ oder deinen eigenen Benutzer. Der Gastgeber muss nichts tun.","join_guide_menus":"Auf dem Startbildschirm der PS5 steuert nur der Gastgeber die Menüs; dein Controller spielt in den Spielen.","join_guide_ok":"Verstanden","join_host_away":"Der Gastgeber hat aufgehört zu spielen – wir warten, bis er wieder anfängt ({time})","join_reconnecting":"Verbinde neu…","join_reconnecting_left":"Dein Platz wird {time} lang freigehalten.","pad_turn":"Dreh das Handy quer","join_game_label":"Spiel von {host}","join_title":"Bei Freunden mitspielen","join_title_body":"Spiele auf der PS5 von {host} als Spieler 2, 3 oder 4.","join_name_label":"Dein Name","join_name_hint":"Das sieht dein Freund, wenn du zum Mitspielen anfragst.","join_button":"Mitspielen"},"en":{"usb_skipped_not_payload":"{name}: not an .elf or .bin file","usb_skipped_unknown":"{id}: not in the payload list any more","browser_unsupported":"This needs the desktop app. It does not work in the browser.","video_recovered_notice":"Play crashed while starting the picture last time, so the picture is now decoded without the graphics card (Settings › Window › Graphics › Hardware video decoding to change it).","video_recovered_title":"Picture now decoded in software","open_in_title":"Open in the PS5Upload app?","open_in_body":"Have the PS5Upload app on this device? Open this there, or carry on in the browser.","open_in_app":"Open in the app","open_in_browser":"Continue in browser","open_in_remember":"Remember my choice on this device","open_in_opening":"Opening the PS5Upload app…","open_in_not_opened":"Nothing happened? The app may not be on this device.","open_in_again":"Try again","pad_8bitdo_no_xinput":"This 8BitDo has no X-input mode. If a button is wrong, check the controller.","pad_8bitdo_how_switch":"set the switch on the back to X, then press Start","pad_8bitdo_how_startx":"turn it off, then hold Start + X to turn it on","pad_8bitdo_how_receiver":"use its 2.4G receiver or a USB cable","pad_8bitdo_how_manual":"its manual says how","pad_8bitdo_xinput":"For the best result, switch your 8BitDo to X-input mode: {how}.","rp_touch_left_stick":"Left stick","rp_touch_right_stick":"Right stick","rp_touch_touchpad":"Touchpad","rp_menu":"Menu","rp_pad_step_lx":"Push the left stick right","rp_pad_step_ly":"Push the left stick down","rp_pad_step_rx":"Push the right stick right","rp_pad_step_ry":"Push the right stick down","join_check_bottom":"Press the bottom face button (✕)","join_check_right":"Press the right face button (○)","join_check_left":"Press the left face button (□)","join_check_top":"Press the top face button (△)","rp_pad_press":"Press {name}","join_check_saved":"Saved for this controller on this device. Try it below.","join_check_title":"Check your controller","join_done":"Done","rp_pads_none":"No controller seen yet. Connect one and press any button on it.","rp_pad_mapped":"Plays with your mapping","join_check_unknown":"This controller isn't on our list, so its buttons may be mixed up. Setting it up takes a few seconds.","rp_pad_standard":"Recognized","rp_pad_progress":"{n} of {total}","rp_pad_skip":"Skip","rp_pad_back":"Back","rp_pad_cancel":"Cancel","join_check_try":"Press buttons and move the sticks: what you press lights up.","join_check_redo":"Redo","join_check_map":"Set up the buttons","rp_pad_reset":"Reset","join_open_lan_body":"Can't reach the internet? If you're on the same Wi-Fi as your friend, open the game there.","join_open_lan":"Open on this Wi-Fi","join_path_lan":"Home network","join_path_tailscale":"Tailscale","join_path_internet":"Internet","join_seat_taken":"{host} needed their controller back and no other controller was free on the PS5, so you're out of the game. Ask {host} to let you in again.","join_refused_key":"This invite has expired. Ask {host} for a new link.","join_refused_expired":"Your place in the game was lost. Ask {host} to let you in again.","join_refused_full":"The game is full: four players already.","join_refused_denied":"{host} didn't let you in this time.","join_refused_no_answer":"{host} didn't answer in time. Tell {host}, then try again.","join_refused_closed":"{host} isn't hosting Play Together right now.","join_refused_old_helper":"{host}'s PS5 needs an updated helper for Play Together.","join_refused_not_playing":"{host} isn't playing right now. Ask {host} to start Play first.","join_refused_unreachable":"{host}'s computer couldn't reach their PS5. Try again in a moment.","join_refused_slow_down":"Too many wrong codes. Wait a minute, then try again.","join_refused_address":"This link's address is outside your home network, so the app will not use it. Ask {host} for a link with their computer's IP address.","join_refused_other":"{host} didn't let you in.","join_ended_kicked":"{host} took you out of the game.","join_ended_closed":"{host} closed Play Together.","join_ended_host_stopped":"The host stopped playing.","join_ended_replaced":"This game was opened in another tab or on another device, so it stopped here.","join_ended_pad_lost":"The PS5 lost your controller, so you're out of the game. Ask {host} to let you in again.","join_ended_gave_up":"The connection to {host} didn't come back in time.","join_net_lost":"The connection to {host} dropped. Check your internet connection, then ask again.","join_ended_lost":"Couldn't reach {host}. Check that you're on the same network.","join_ended_left":"You left the game.","join_net_mismatch":"This link doesn't match the host; ask them for a new one.","join_net_no_direct":"A direct connection isn't possible from this network (both sides' routers are strict). Try Wi-Fi instead of mobile data, or ask the host to turn on UPnP.","join_net_no_room":"This invite isn't open any more. Ask {host} for a new link.","join_net_full":"{host}'s game has no room for another friend right now. Try again in a moment.","join_net_no_hub":"Couldn't reach the PS5Upload invite service. Check your internet connection, then try again.","join_net_offer":"{host}'s computer couldn't connect to this browser. Try another browser.","join_net_no_webrtc":"This browser can't make direct connections. Try a recent Chrome, Safari or Firefox.","join_cancel":"Cancel","join_host_fallback":"your friend","join_connecting":"Connecting to {host}…","join_waiting":"Waiting for {host} to let you in","join_waiting_body":"{host} sees your name on their screen and taps Allow.","join_retry":"Try again","join_again":"Ask to join again","join_playing_at":"Playing at {host}'s","join_you_are":"You are Player {n}","join_seat_stream":"You're playing as {host}'s PS5 user. No need to pick one.","join_plays_as":"You're playing as {profile}. No need to pick one.","join_seat_tv_asks":"{host} chose a profile for you, but it couldn't be used. The TV will ask who you are.","join_picking":"Press PS, then pick Quick Play on the TV","join_hide_controls":"Hide","join_sound":"Tap for sound","rp_unmute":"Sound on","rp_mute":"Mute","join_no_sound":"No sound in this browser","join_exit_fullscreen":"Leave full screen","pad_fill":"Full screen","join_leave":"Leave","join_show_controls":"Show controls","join_hold_hint":"Press and hold the picture to show the buttons","pad_watch_no_hevc":"This device can't play this stream's picture: the computer streams HEVC, and this device plays only H.264.","pad_watch_decode":"The picture could not be played here.","join_pad_ready":"Your controller is ready","join_check_unknown_short":"Not on our list: buttons may be mixed up.","join_full_to_play":"Tap full screen to play with the on-screen controller.","join_pad_none":"Connect a controller (USB or Bluetooth) and press any button.","join_pad_keys":"Or use the keyboard: WASD move, arrows D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Press Back on the remote for the buttons.","join_block_note":"{host} turned off PS and Create for friends.","join_guide_title":"One more step on the TV","join_guide_body":"On your controller, press PS once. The TV asks \"Who's using this controller?\". Pick Quick Play or your own user. The host doesn't need to do anything.","join_guide_menus":"On the PS5's home screen only the host controls the menus; your controller plays inside games.","join_guide_ok":"Got it","join_host_away":"The host stopped playing — waiting for them to start again ({time})","join_reconnecting":"Reconnecting…","join_reconnecting_left":"Your place is kept for {time}.","pad_turn":"Turn the phone sideways","join_game_label":"{host}'s game","join_title":"Join a friend's game","join_title_body":"Play on {host}'s PS5 as Player 2, 3 or 4.","join_name_label":"Your name","join_name_hint":"Your friend sees this when you ask to join.","join_button":"Join"},"es":{"usb_skipped_not_payload":"{name}: no es un archivo .elf ni .bin","usb_skipped_unknown":"{id}: ya no está en la lista de payloads","browser_unsupported":"Esto necesita la aplicación de escritorio. No funciona en el navegador.","video_recovered_notice":"Play se cerró al iniciar la imagen la última vez, así que ahora la imagen se decodifica sin la tarjeta gráfica (cámbialo en Configuración › Ventana › Gráficos › Decodificación de vídeo por hardware).","video_recovered_title":"La imagen ahora se decodifica por software","open_in_title":"¿Abrir en la app PS5Upload?","open_in_body":"¿Tienes la app PS5Upload en este dispositivo? Ábrelo ahí o sigue en el navegador.","open_in_app":"Abrir en la app","open_in_browser":"Seguir en el navegador","open_in_remember":"Recordar mi elección en este dispositivo","open_in_opening":"Abriendo la app PS5Upload…","open_in_not_opened":"¿No pasó nada? Puede que la app no esté en este dispositivo.","open_in_again":"Reintentar","pad_8bitdo_no_xinput":"Este 8BitDo no tiene modo X-input. Si un botón no va bien, comprueba el mando.","pad_8bitdo_how_switch":"pon el interruptor de atrás en X y pulsa Start","pad_8bitdo_how_startx":"apágalo y luego mantén Start + X para encenderlo","pad_8bitdo_how_receiver":"usa su receptor 2.4G o un cable USB","pad_8bitdo_how_manual":"su manual explica cómo","pad_8bitdo_xinput":"Para el mejor resultado, pon tu 8BitDo en modo X-input: {how}.","rp_touch_left_stick":"Joystick izquierdo","rp_touch_right_stick":"Joystick derecho","rp_touch_touchpad":"Panel táctil","rp_menu":"Menú","rp_pad_step_lx":"Mueve el stick izquierdo a la derecha","rp_pad_step_ly":"Mueve el stick izquierdo hacia abajo","rp_pad_step_rx":"Mueve el stick derecho a la derecha","rp_pad_step_ry":"Mueve el stick derecho hacia abajo","join_check_bottom":"Pulsa el botón de acción de abajo (✕)","join_check_right":"Pulsa el botón de acción de la derecha (○)","join_check_left":"Pulsa el botón de acción de la izquierda (□)","join_check_top":"Pulsa el botón de acción de arriba (△)","rp_pad_press":"Pulsa {name}","join_check_saved":"Guardado para este mando en este dispositivo. Pruébalo abajo.","join_check_title":"Comprueba tu mando","join_done":"Listo","rp_pads_none":"Aún no se ve ningún mando. Conecta uno y pulsa cualquier botón.","rp_pad_mapped":"Juega con tu asignación","join_check_unknown":"Este mando no está en nuestra lista, así que sus botones pueden estar cambiados. Configurarlo lleva unos segundos.","rp_pad_standard":"Reconocido","rp_pad_progress":"{n} de {total}","rp_pad_skip":"Omitir","rp_pad_back":"Atrás","rp_pad_cancel":"Cancelar","join_check_try":"Pulsa botones y mueve los sticks: lo que pulses se ilumina.","join_check_redo":"Rehacer","join_check_map":"Configurar los botones","rp_pad_reset":"Restablecer","join_open_lan_body":"¿Sin internet? Si estás en el mismo Wi-Fi que tu amigo, abre la partida desde ahí.","join_open_lan":"Abrir en este Wi-Fi","join_path_lan":"Red doméstica","join_seat_taken":"{host} necesitaba recuperar su mando y no había otro mando libre en la PS5, así que has salido de la partida. Pide a {host} que te deje entrar otra vez.","join_refused_key":"Esta invitación ha caducado. Pide a {host} un enlace nuevo.","join_refused_expired":"Perdiste tu sitio en la partida. Pide a {host} que te deje entrar de nuevo.","join_refused_full":"La partida está llena: ya hay cuatro jugadores.","join_refused_denied":"{host} no te dejó entrar esta vez.","join_refused_no_answer":"{host} no respondió a tiempo. Avisa a {host} e inténtalo de nuevo.","join_refused_closed":"{host} no está ofreciendo Jugar juntos ahora mismo.","join_refused_old_helper":"La PS5 de {host} necesita un ayudante actualizado para Jugar juntos.","join_refused_not_playing":"{host} no está jugando ahora. Pide a {host} que inicie Jugar primero.","join_refused_unreachable":"El ordenador de {host} no pudo conectar con su PS5. Inténtalo de nuevo en un momento.","join_refused_slow_down":"Demasiados códigos incorrectos. Espera un minuto y vuelve a intentarlo.","join_refused_address":"La dirección de este enlace está fuera de tu red doméstica, así que la aplicación no la usará. Pide a {host} un enlace con la dirección IP de su equipo.","join_refused_other":"{host} no te dejó entrar.","join_ended_kicked":"{host} te sacó de la partida.","join_ended_closed":"{host} cerró Jugar juntos.","join_ended_host_stopped":"El anfitrión dejó de jugar.","join_ended_replaced":"Esta partida se abrió en otra pestaña o en otro dispositivo, así que terminó aquí.","join_ended_pad_lost":"La PS5 perdió tu mando, así que estás fuera de la partida. Pide a {host} que te deje entrar de nuevo.","join_ended_gave_up":"La conexión con {host} no volvió a tiempo.","join_net_lost":"Se cortó la conexión con {host}. Revisa tu conexión a internet y vuelve a pedirlo.","join_ended_lost":"No se pudo contactar con {host}. Comprueba que estéis en la misma red.","join_ended_left":"Saliste de la partida.","join_net_mismatch":"Este enlace no coincide con el anfitrión; pídele uno nuevo.","join_net_no_direct":"No es posible una conexión directa desde esta red (los routers de ambos lados son estrictos). Prueba con Wi-Fi en lugar de datos móviles o pide al anfitrión que active UPnP.","join_net_no_room":"Esta invitación ya no está abierta. Pide a {host} un enlace nuevo.","join_net_full":"La partida de {host} no tiene sitio para otro amigo ahora mismo. Inténtalo de nuevo en un momento.","join_net_no_hub":"No se pudo contactar con el servicio de invitaciones de PS5Upload. Comprueba tu conexión a internet e inténtalo de nuevo.","join_net_offer":"El ordenador de {host} no pudo conectar con este navegador. Prueba con otro navegador.","join_net_no_webrtc":"Este navegador no puede hacer conexiones directas. Prueba una versión reciente de Chrome, Safari o Firefox.","join_cancel":"Cancelar","join_host_fallback":"tu amigo","join_connecting":"Conectando con {host}…","join_waiting":"Esperando a que {host} te deje entrar","join_waiting_body":"{host} ve tu nombre en su pantalla y toca Permitir.","join_retry":"Reintentar","join_again":"Pedir unirme otra vez","join_playing_at":"Jugando en casa de {host}","join_you_are":"Eres el Jugador {n}","join_seat_stream":"Juegas con el usuario de PS5 de {host}. No hace falta elegir uno.","join_plays_as":"Juegas como {profile}. No hace falta elegir uno.","join_seat_tv_asks":"{host} eligió un perfil para ti, pero no se pudo usar. La TV te preguntará quién eres.","join_picking":"Pulsa PS y luego elige Juego rápido en la tele","join_hide_controls":"Ocultar","join_sound":"Activar sonido","rp_unmute":"Activar sonido","rp_mute":"Silenciar","join_no_sound":"Sin sonido en este navegador","join_exit_fullscreen":"Salir de pantalla completa","pad_fill":"Pantalla completa","join_leave":"Salir","join_show_controls":"Mostrar controles","join_hold_hint":"Mantén pulsada la imagen para mostrar los botones","pad_watch_no_hevc":"Este dispositivo no puede reproducir la imagen de este stream: el ordenador emite en HEVC y este dispositivo solo reproduce H.264.","pad_watch_decode":"La imagen no se pudo reproducir aquí.","join_pad_ready":"Tu mando está listo","join_check_unknown_short":"No está en nuestra lista: los botones pueden estar cambiados.","join_full_to_play":"Toca pantalla completa para jugar con el mando en pantalla.","join_pad_none":"Conecta un mando (USB o Bluetooth) y pulsa cualquier botón.","join_pad_keys":"O usa el teclado: WASD para moverte, flechas cruceta, Enter ✕, Retroceso ○, Q □, E △, Tab Options.","join_tv_back_hint":"Pulsa Atrás en el mando a distancia para ver los botones.","join_block_note":"{host} desactivó PS y Create para los amigos.","join_guide_title":"Un paso más en la tele","join_guide_body":"Pulsa PS una vez en tu mando. La tele pregunta «¿Quién usa este mando?». Elige Juego rápido o tu propio usuario. El anfitrión no tiene que hacer nada.","join_guide_menus":"En la pantalla de inicio de la PS5 solo el anfitrión controla los menús; tu mando juega dentro de los juegos.","join_guide_ok":"Entendido","join_host_away":"El anfitrión dejó de jugar: esperando a que vuelva a empezar ({time})","join_reconnecting":"Reconectando…","join_reconnecting_left":"Tu sitio se guarda durante {time}.","pad_turn":"Gira el móvil en horizontal","join_game_label":"Partida de {host}","join_title":"Unirse a la partida de un amigo","join_title_body":"Juega en la PS5 de {host} como Jugador 2, 3 o 4.","join_name_label":"Tu nombre","join_name_hint":"Tu amigo lo verá cuando pidas unirte.","join_button":"Unirme"},"fa":{"usb_skipped_not_payload":"{name}: فایل .elf یا .bin نیست","usb_skipped_unknown":"{id}: دیگر در فهرست پیلودها نیست","browser_unsupported":"این کار به برنامه رومیزی نیاز دارد. در مرورگر کار نمی‌کند.","video_recovered_notice":"دفعهٔ پیش «بازی» هنگام شروع تصویر از کار افتاد، پس تصویر اکنون بدون کارت گرافیک رمزگشایی می‌شود (برای تغییر: تنظیمات › پنجره › گرافیک › رمزگشایی ویدیو با سخت‌افزار).","video_recovered_title":"تصویر اکنون با نرم‌افزار رمزگشایی می‌شود","open_in_title":"در برنامهٔ PS5Upload باز شود؟","open_in_body":"برنامهٔ PS5Upload روی این دستگاه هست؟ این را آنجا باز کنید، یا در مرورگر ادامه دهید.","open_in_app":"باز کردن در برنامه","open_in_browser":"ادامه در مرورگر","open_in_remember":"انتخابم را روی این دستگاه به خاطر بسپار","open_in_opening":"در حال باز کردن برنامهٔ PS5Upload…","open_in_not_opened":"اتفاقی نیفتاد؟ شاید برنامه روی این دستگاه نیست.","open_in_again":"دوباره امتحان کنید","pad_8bitdo_no_xinput":"این 8BitDo حالت X-input ندارد. اگر دکمه‌ای اشتباه است، کنترلر را بررسی کنید.","pad_8bitdo_how_switch":"کلید پشت را روی X بگذارید، سپس Start را بزنید","pad_8bitdo_how_startx":"آن را خاموش کنید، سپس Start + X را نگه دارید تا روشن شود","pad_8bitdo_how_receiver":"از گیرنده 2.4G آن یا کابل USB استفاده کنید","pad_8bitdo_how_manual":"دفترچه راهنمای آن روش را می‌گوید","pad_8bitdo_xinput":"برای بهترین نتیجه، 8BitDo خود را به حالت X-input ببرید: {how}.","rp_touch_left_stick":"استیک چپ","rp_touch_right_stick":"استیک راست","rp_touch_touchpad":"صفحه لمسی","rp_menu":"منو","rp_pad_step_lx":"استیک چپ را به راست فشار دهید","rp_pad_step_ly":"استیک چپ را به پایین فشار دهید","rp_pad_step_rx":"استیک راست را به راست فشار دهید","rp_pad_step_ry":"استیک راست را به پایین فشار دهید","join_check_bottom":"دکمهٔ پایینی را بزنید (✕)","join_check_right":"دکمهٔ سمت راست را بزنید (○)","join_check_left":"دکمهٔ سمت چپ را بزنید (□)","join_check_top":"دکمهٔ بالایی را بزنید (△)","rp_pad_press":"{name} را فشار دهید","join_check_saved":"برای این کنترلر روی این دستگاه ذخیره شد. پایین امتحانش کنید.","join_check_title":"کنترلر خود را بررسی کنید","join_done":"تمام","rp_pads_none":"هنوز دسته‌ای دیده نشده. یکی وصل کنید و یکی از دکمه‌هایش را فشار دهید.","rp_pad_mapped":"با نگاشت شما بازی می‌کند","join_check_unknown":"این کنترلر در فهرست ما نیست، پس ممکن است دکمه‌هایش جابه‌جا باشند. تنظیم آن چند ثانیه طول می‌کشد.","rp_pad_standard":"شناخته شد","rp_pad_progress":"{n} از {total}","rp_pad_skip":"رد کردن","rp_pad_back":"بازگشت","rp_pad_cancel":"لغو","join_check_try":"دکمه‌ها را بزنید و استیک‌ها را حرکت دهید: هر چه بزنید روشن می‌شود.","join_check_redo":"انجام دوباره","join_check_map":"تنظیم دکمه‌ها","rp_pad_reset":"بازنشانی","join_open_lan_body":"به اینترنت دسترسی ندارید؟ اگر با دوستتان روی یک Wi-Fi هستید، بازی را آنجا باز کنید.","join_open_lan":"باز کردن روی همین Wi-Fi","join_path_lan":"شبکهٔ خانگی","join_path_internet":"اینترنت","join_seat_taken":"{host} دستهٔ خودش را لازم داشت و دستهٔ آزاد دیگری روی PS5 نبود، پس از بازی بیرون رفتید. از {host} بخواهید دوباره راهتان بدهد.","join_refused_key":"این دعوت منقضی شده است. از {host} پیوند جدید بخواهید.","join_refused_expired":"جای شما در بازی از دست رفت. از {host} بخواهید دوباره راهتان بدهد.","join_refused_full":"بازی پر است: چهار بازیکن از قبل هستند.","join_refused_denied":"{host} این بار اجازهٔ ورود نداد.","join_refused_no_answer":"{host} به‌موقع پاسخ نداد. به {host} خبر دهید و دوباره امتحان کنید.","join_refused_closed":"{host} الان «بازی با هم» را میزبانی نمی‌کند.","join_refused_old_helper":"PS5 {host} برای «بازی با هم» به دستیار به‌روز نیاز دارد.","join_refused_not_playing":"{host} الان بازی نمی‌کند. از {host} بخواهید اول بازی را شروع کند.","join_refused_unreachable":"رایانهٔ {host} به PS5 دسترسی پیدا نکرد. کمی بعد دوباره امتحان کنید.","join_refused_slow_down":"تعداد کدهای اشتباه زیاد است. یک دقیقه صبر کنید و دوباره امتحان کنید.","join_refused_address":"نشانی این پیوند بیرون از شبکه خانگی شماست، پس برنامه از آن استفاده نمی‌کند. از {host} پیوندی با نشانی IP رایانه‌اش بخواهید.","join_refused_other":"{host} اجازهٔ ورود نداد.","join_ended_kicked":"{host} شما را از بازی بیرون کرد.","join_ended_closed":"{host} «بازی با هم» را بست.","join_ended_host_stopped":"میزبان بازی را متوقف کرد.","join_ended_replaced":"این بازی در زبانه یا دستگاه دیگری باز شد، پس اینجا متوقف شد.","join_ended_pad_lost":"PS5 دستهٔ شما را از دست داد، پس از بازی بیرون رفتید. از {host} بخواهید دوباره راهتان بدهد.","join_ended_gave_up":"اتصال به {host} به‌موقع برنگشت.","join_net_lost":"اتصال به {host} قطع شد. اتصال اینترنت خود را بررسی کنید و دوباره درخواست دهید.","join_ended_lost":"دسترسی به {host} ممکن نشد. بررسی کنید روی یک شبکه باشید.","join_ended_left":"از بازی خارج شدید.","join_net_mismatch":"این پیوند با میزبان جور نیست؛ از او پیوند تازه‌ای بخواهید.","join_net_no_direct":"اتصال مستقیم از این شبکه ممکن نیست (روترهای هر دو طرف سخت‌گیرند). به‌جای داده همراه Wi-Fi را امتحان کنید یا از میزبان بخواهید UPnP را روشن کند.","join_net_no_room":"این دعوت دیگر باز نیست. از {host} پیوند تازه‌ای بخواهید.","join_net_full":"بازی {host} اکنون جای دوست دیگری ندارد. کمی بعد دوباره امتحان کنید.","join_net_no_hub":"دسترسی به سرویس دعوت PS5Upload ممکن نشد. اتصال اینترنت را بررسی کنید و دوباره امتحان کنید.","join_net_offer":"رایانه {host} نتوانست به این مرورگر وصل شود. مرورگر دیگری را امتحان کنید.","join_net_no_webrtc":"این مرورگر نمی‌تواند اتصال مستقیم برقرار کند. نسخه تازه Chrome، Safari یا Firefox را امتحان کنید.","join_cancel":"لغو","join_host_fallback":"دوستتان","join_connecting":"در حال اتصال به {host}…","join_waiting":"منتظر اجازهٔ ورود از {host}","join_waiting_body":"{host} نام شما را روی صفحه‌اش می‌بیند و «اجازه» را می‌زند.","join_retry":"دوباره امتحان کنید","join_again":"دوباره درخواست پیوستن","join_playing_at":"در حال بازی پیش {host}","join_you_are":"شما بازیکن {n} هستید","join_seat_stream":"شما با کاربر PS5 {host} بازی می‌کنید. لازم نیست کاربری انتخاب کنید.","join_plays_as":"شما با {profile} بازی می‌کنید. نیازی به انتخاب نیست.","join_seat_tv_asks":"{host} پروفایلی برای شما انتخاب کرد، اما نشد از آن استفاده کرد. تلویزیون می‌پرسد شما کیستید.","join_picking":"PS را بزنید، سپس روی تلویزیون «بازی سریع» را انتخاب کنید","join_hide_controls":"پنهان کردن","join_sound":"برای صدا ضربه بزنید","rp_unmute":"صدا روشن","rp_mute":"بی‌صدا","join_no_sound":"در این مرورگر صدا پخش نمی‌شود","join_exit_fullscreen":"خروج از تمام‌صفحه","pad_fill":"تمام‌صفحه","join_leave":"خروج","join_show_controls":"نمایش کنترل‌ها","join_hold_hint":"برای نمایش دکمه‌ها، تصویر را لمس کرده و نگه دارید","pad_watch_no_hevc":"این دستگاه نمی‌تواند تصویر این استریم را پخش کند: کامپیوتر HEVC می‌فرستد و این دستگاه فقط H.264 پخش می‌کند.","pad_watch_decode":"تصویر اینجا پخش نشد.","join_pad_ready":"دستهٔ شما آماده است","join_check_unknown_short":"در فهرست ما نیست: ممکن است دکمه‌ها جابه‌جا باشند.","join_full_to_play":"برای بازی با دسته روی صفحه، تمام‌صفحه را بزنید.","join_pad_none":"یک دسته وصل کنید (USB یا Bluetooth) و هر دکمه‌ای را بزنید.","join_pad_keys":"یا از صفحه‌کلید استفاده کنید: WASD حرکت، کلیدهای جهت D-pad، Enter ✕، Backspace ○، Q □، E △، Tab Options.","join_tv_back_hint":"برای دیدن دکمه‌ها، روی کنترل از راه دور دکمهٔ بازگشت را بزنید.","join_block_note":"{host} دکمه‌های PS و Create را برای دوستان خاموش کرده است.","join_guide_title":"یک قدم دیگر روی تلویزیون","join_guide_body":"یک بار PS را روی دسته‌تان بزنید. تلویزیون می‌پرسد «چه کسی از این دسته استفاده می‌کند؟». «بازی سریع» یا کاربر خودتان را انتخاب کنید. میزبان لازم نیست کاری بکند.","join_guide_menus":"در صفحه اصلی PS5 فقط میزبان منوها را کنترل می‌کند؛ دسته شما داخل بازی‌ها بازی می‌کند.","join_guide_ok":"متوجه شدم","join_host_away":"میزبان بازی را متوقف کرد — در انتظار شروع دوباره ({time})","join_reconnecting":"در حال اتصال دوباره…","join_reconnecting_left":"جای شما تا {time} نگه داشته می‌شود.","pad_turn":"گوشی را افقی کنید","join_game_label":"بازی {host}","join_title":"پیوستن به بازی یک دوست","join_title_body":"روی PS5 {host} به‌عنوان بازیکن ۲، ۳ یا ۴ بازی کنید.","join_name_label":"نام شما","join_name_hint":"وقتی درخواست پیوستن بدهید، دوستتان این را می‌بیند.","join_button":"پیوستن"},"fr":{"usb_skipped_not_payload":"{name} : pas un fichier .elf ou .bin","usb_skipped_unknown":"{id} : n'est plus dans la liste des payloads","browser_unsupported":"Il faut l'application de bureau. Cela ne fonctionne pas dans le navigateur.","video_recovered_notice":"Play a planté au démarrage de l'image la dernière fois : l'image est donc maintenant décodée sans la carte graphique (modifiable dans Paramètres › Fenêtre › Graphismes › Décodage vidéo matériel).","video_recovered_title":"Image désormais décodée par logiciel","open_in_title":"Ouvrir dans l’app PS5Upload ?","open_in_body":"Vous avez l’app PS5Upload sur cet appareil ? Ouvrez ceci dedans, ou continuez dans le navigateur.","open_in_app":"Ouvrir dans l’app","open_in_browser":"Continuer dans le navigateur","open_in_remember":"Retenir mon choix sur cet appareil","open_in_opening":"Ouverture de l’app PS5Upload…","open_in_not_opened":"Rien ne s’est passé ? L’app n’est peut-être pas sur cet appareil.","open_in_again":"Réessayer","pad_8bitdo_no_xinput":"Cette manette 8BitDo n'a pas de mode X-input. Si un bouton ne correspond pas, vérifiez la manette.","pad_8bitdo_how_switch":"mettez l'interrupteur à l'arrière sur X, puis appuyez sur Start","pad_8bitdo_how_startx":"éteignez-la, puis maintenez Start + X pour l'allumer","pad_8bitdo_how_receiver":"utilisez son récepteur 2.4G ou un câble USB","pad_8bitdo_how_manual":"son manuel explique comment","pad_8bitdo_xinput":"Pour un meilleur résultat, passez votre 8BitDo en mode X-input : {how}.","rp_touch_left_stick":"Joystick gauche","rp_touch_right_stick":"Joystick droit","rp_touch_touchpad":"Pavé tactile","rp_pad_step_lx":"Poussez le stick gauche vers la droite","rp_pad_step_ly":"Poussez le stick gauche vers le bas","rp_pad_step_rx":"Poussez le stick droit vers la droite","rp_pad_step_ry":"Poussez le stick droit vers le bas","join_check_bottom":"Appuyez sur le bouton du bas (✕)","join_check_right":"Appuyez sur le bouton de droite (○)","join_check_left":"Appuyez sur le bouton de gauche (□)","join_check_top":"Appuyez sur le bouton du haut (△)","rp_pad_press":"Appuyez sur {name}","join_check_saved":"Enregistré pour cette manette sur cet appareil. Essayez-la ci-dessous.","join_check_title":"Vérifier la manette","join_done":"Terminé","rp_pads_none":"Aucune manette détectée. Connectez-en une et appuyez sur n'importe quel bouton.","rp_pad_mapped":"Joue avec votre configuration","join_check_unknown":"Cette manette n'est pas dans notre liste, ses boutons peuvent donc être inversés. La configurer ne prend que quelques secondes.","rp_pad_standard":"Reconnue","rp_pad_progress":"{n} sur {total}","rp_pad_skip":"Passer","rp_pad_back":"Retour","rp_pad_cancel":"Annuler","join_check_try":"Appuyez sur des boutons et bougez les sticks : ce que vous pressez s'allume.","join_check_redo":"Refaire","join_check_map":"Configurer les boutons","rp_pad_reset":"Réinitialiser","join_open_lan_body":"Pas d'accès à Internet ? Si vous êtes sur le même Wi-Fi que votre ami, ouvrez la partie par là.","join_open_lan":"Ouvrir sur ce Wi-Fi","join_path_lan":"Réseau domestique","join_seat_taken":"{host} avait besoin de récupérer sa manette et aucune autre manette n'était libre sur la PS5 : vous avez quitté la partie. Demandez à {host} de vous laisser revenir.","join_refused_key":"Cette invitation a expiré. Demandez un nouveau lien à {host}.","join_refused_expired":"Votre place dans la partie est perdue. Demandez à {host} de vous laisser revenir.","join_refused_full":"La partie est pleine : il y a déjà quatre joueurs.","join_refused_denied":"{host} ne vous a pas laissé entrer cette fois.","join_refused_no_answer":"{host} n'a pas répondu à temps. Prévenez {host}, puis réessayez.","join_refused_closed":"{host} n'organise pas de Jouer ensemble pour le moment.","join_refused_old_helper":"La PS5 de {host} a besoin d'un assistant à jour pour Jouer ensemble.","join_refused_not_playing":"{host} ne joue pas en ce moment. Demandez d'abord à {host} de lancer Jouer.","join_refused_unreachable":"L'ordinateur de {host} n'a pas pu joindre sa PS5. Réessayez dans un instant.","join_refused_slow_down":"Trop de codes erronés. Attendez une minute, puis réessayez.","join_refused_address":"L'adresse de ce lien est hors de ton réseau domestique, l'application ne l'utilisera donc pas. Demande à {host} un lien avec l'adresse IP de son ordinateur.","join_refused_other":"{host} ne vous a pas laissé entrer.","join_ended_kicked":"{host} vous a retiré de la partie.","join_ended_closed":"{host} a fermé Jouer ensemble.","join_ended_host_stopped":"L'hôte a arrêté de jouer.","join_ended_replaced":"Cette partie a été ouverte dans un autre onglet ou sur un autre appareil, elle s'est donc arrêtée ici.","join_ended_pad_lost":"La PS5 a perdu votre manette, vous êtes donc sorti de la partie. Demandez à {host} de vous laisser revenir.","join_ended_gave_up":"La connexion à {host} n'est pas revenue à temps.","join_net_lost":"La connexion à {host} a été coupée. Vérifiez votre connexion Internet, puis redemandez.","join_ended_lost":"Impossible de joindre {host}. Vérifiez que vous êtes sur le même réseau.","join_ended_left":"Vous avez quitté la partie.","join_net_mismatch":"Ce lien ne correspond pas à l'hôte ; demandez-lui-en un nouveau.","join_net_no_direct":"Une connexion directe est impossible depuis ce réseau (les routeurs des deux côtés sont stricts). Essayez le Wi-Fi plutôt que les données mobiles, ou demandez à l'hôte d'activer l'UPnP.","join_net_no_room":"Cette invitation n'est plus ouverte. Demandez un nouveau lien à {host}.","join_net_full":"La partie de {host} n'a pas de place pour un autre ami pour le moment. Réessayez dans un instant.","join_net_no_hub":"Impossible de joindre le service d'invitations de PS5Upload. Vérifiez votre connexion internet, puis réessayez.","join_net_offer":"L'ordinateur de {host} n'a pas pu se connecter à ce navigateur. Essayez un autre navigateur.","join_net_no_webrtc":"Ce navigateur ne peut pas établir de connexions directes. Essayez une version récente de Chrome, Safari ou Firefox.","join_cancel":"Annuler","join_host_fallback":"votre ami","join_connecting":"Connexion à {host}…","join_waiting":"En attente que {host} vous laisse entrer","join_waiting_body":"{host} voit votre nom à l'écran et appuie sur Autoriser.","join_retry":"Réessayer","join_again":"Redemander à rejoindre","join_playing_at":"En jeu chez {host}","join_you_are":"Vous êtes le joueur {n}","join_seat_stream":"Vous jouez avec l'utilisateur PS5 de {host}. Inutile d'en choisir un.","join_plays_as":"Vous jouez en tant que {profile}. Inutile d'en choisir un.","join_seat_tv_asks":"{host} a choisi un profil pour vous, mais il n'a pas pu être utilisé. La TV va vous demander qui vous êtes.","join_picking":"Appuyez sur PS, puis choisissez Jeu rapide sur la télé","join_hide_controls":"Masquer","join_sound":"Touchez pour le son","rp_unmute":"Son activé","rp_mute":"Couper le son","join_no_sound":"Pas de son dans ce navigateur","join_exit_fullscreen":"Quitter le plein écran","pad_fill":"Plein écran","join_leave":"Quitter","join_show_controls":"Afficher les commandes","join_hold_hint":"Maintenez l'image appuyée pour afficher les boutons","pad_watch_no_hevc":"Cet appareil ne peut pas lire l'image de ce stream : l'ordinateur diffuse en HEVC et cet appareil ne lit que le H.264.","pad_watch_decode":"L'image n'a pas pu être lue ici.","join_pad_ready":"Votre manette est prête","join_check_unknown_short":"Pas dans notre liste : les boutons peuvent être inversés.","join_full_to_play":"Touchez plein écran pour jouer avec la manette à l'écran.","join_pad_none":"Branchez une manette (USB ou Bluetooth) et appuyez sur un bouton.","join_pad_keys":"Ou utilisez le clavier : ZQSD/WASD pour bouger, flèches croix directionnelle, Entrée ✕, Retour arrière ○, Q □, E △, Tab Options.","join_tv_back_hint":"Appuyez sur Retour sur la télécommande pour afficher les boutons.","join_block_note":"{host} a désactivé PS et Create pour les amis.","join_guide_title":"Encore une étape sur la télé","join_guide_body":"Appuyez une fois sur PS sur votre manette. La télé demande « Qui utilise cette manette ? ». Choisissez Jeu rapide ou votre propre utilisateur. L'hôte n'a rien à faire.","join_guide_menus":"Sur l'écran d'accueil de la PS5, seul l'hôte contrôle les menus ; votre manette joue dans les jeux.","join_guide_ok":"Compris","join_host_away":"L'hôte a arrêté de jouer — en attente de sa reprise ({time})","join_reconnecting":"Reconnexion…","join_reconnecting_left":"Votre place est gardée pendant {time}.","pad_turn":"Tournez le téléphone à l'horizontale","join_game_label":"Partie de {host}","join_title":"Rejoindre la partie d'un ami","join_title_body":"Jouez sur la PS5 de {host} en tant que joueur 2, 3 ou 4.","join_name_label":"Votre nom","join_name_hint":"Votre ami le verra quand vous demanderez à rejoindre.","join_button":"Rejoindre"},"hi":{"usb_skipped_not_payload":"{name}: .elf या .bin फ़ाइल नहीं है","usb_skipped_unknown":"{id}: अब पेलोड सूची में नहीं है","browser_unsupported":"इसके लिए डेस्कटॉप ऐप चाहिए। यह ब्राउज़र में काम नहीं करता।","video_recovered_notice":"पिछली बार तस्वीर शुरू करते समय खेलें क्रैश हो गया था, इसलिए तस्वीर अब ग्राफ़िक्स कार्ड के बिना डिकोड होती है (बदलने के लिए सेटिंग्स › विंडो › ग्राफ़िक्स › हार्डवेयर वीडियो डिकोडिंग)।","video_recovered_title":"तस्वीर अब सॉफ़्टवेयर से डिकोड होती है","open_in_title":"PS5Upload ऐप में खोलें?","open_in_body":"क्या इस डिवाइस पर PS5Upload ऐप है? इसे वहाँ खोलें, या ब्राउज़र में ही जारी रखें।","open_in_app":"ऐप में खोलें","open_in_browser":"ब्राउज़र में जारी रखें","open_in_remember":"इस डिवाइस पर मेरी पसंद याद रखें","open_in_opening":"PS5Upload ऐप खुल रहा है…","open_in_not_opened":"कुछ नहीं हुआ? शायद इस डिवाइस पर ऐप नहीं है।","open_in_again":"फिर कोशिश करें","pad_8bitdo_no_xinput":"इस 8BitDo में X-input मोड नहीं है। अगर कोई बटन गलत है, तो कंट्रोलर जाँचें।","pad_8bitdo_how_switch":"पीछे का स्विच X पर करें, फिर Start दबाएँ","pad_8bitdo_how_startx":"इसे बंद करें, फिर Start + X दबाकर रखें ताकि यह चालू हो","pad_8bitdo_how_receiver":"इसका 2.4G रिसीवर या USB केबल इस्तेमाल करें","pad_8bitdo_how_manual":"इसकी मैनुअल में तरीका दिया है","pad_8bitdo_xinput":"सबसे अच्छे नतीजे के लिए अपने 8BitDo को X-input मोड में करें: {how}।","rp_touch_left_stick":"बायाँ स्टिक","rp_touch_right_stick":"दायाँ स्टिक","rp_touch_touchpad":"टचपैड","rp_menu":"मेनू","rp_pad_step_lx":"बायाँ स्टिक दाईं ओर धकेलें","rp_pad_step_ly":"बायाँ स्टिक नीचे धकेलें","rp_pad_step_rx":"दायाँ स्टिक दाईं ओर धकेलें","rp_pad_step_ry":"दायाँ स्टिक नीचे धकेलें","join_check_bottom":"नीचे वाला फ़ेस बटन दबाएँ (✕)","join_check_right":"दाईं ओर वाला फ़ेस बटन दबाएँ (○)","join_check_left":"बाईं ओर वाला फ़ेस बटन दबाएँ (□)","join_check_top":"ऊपर वाला फ़ेस बटन दबाएँ (△)","rp_pad_press":"{name} दबाएँ","join_check_saved":"इस डिवाइस पर इस कंट्रोलर के लिए सेव हो गया। नीचे आज़माएँ।","join_check_title":"अपना कंट्रोलर जाँचें","join_done":"हो गया","rp_pads_none":"अभी तक कोई कंट्रोलर नहीं दिखा। एक कनेक्ट करें और उस पर कोई भी बटन दबाएँ।","rp_pad_mapped":"आपकी मैपिंग से खेलता है","join_check_unknown":"यह कंट्रोलर हमारी सूची में नहीं है, इसलिए इसके बटन आपस में बदले हो सकते हैं। सेट अप करने में कुछ सेकंड लगते हैं।","rp_pad_standard":"पहचाना गया","rp_pad_progress":"{total} में से {n}","rp_pad_skip":"छोड़ें","rp_pad_back":"वापस","rp_pad_cancel":"रद्द करें","join_check_try":"बटन दबाएँ और स्टिक हिलाएँ: जो दबाएँगे वह जल उठेगा।","join_check_redo":"फिर से करें","join_check_map":"बटन सेट करें","rp_pad_reset":"रीसेट करें","join_open_lan_body":"इंटरनेट नहीं मिल रहा? अगर आप दोस्त वाले Wi-Fi पर ही हैं, तो गेम वहीं खोलें।","join_open_lan":"इसी Wi-Fi पर खोलें","join_path_lan":"होम नेटवर्क","join_path_internet":"इंटरनेट","join_seat_taken":"{host} को अपना कंट्रोलर वापस चाहिए था और PS5 पर कोई दूसरा कंट्रोलर खाली नहीं था, इसलिए आप गेम से बाहर हो गए। {host} से फिर से अंदर आने देने को कहें।","join_refused_key":"इस न्योते की समय-सीमा खत्म हो गई है। {host} से नया लिंक माँगें।","join_refused_expired":"गेम में आपकी जगह चली गई। {host} से फिर अंदर लेने को कहें।","join_refused_full":"गेम भर गया है: पहले से चार प्लेयर हैं।","join_refused_denied":"{host} ने इस बार आपको अंदर नहीं आने दिया।","join_refused_no_answer":"{host} ने समय पर जवाब नहीं दिया। {host} को बताएँ, फिर कोशिश करें।","join_refused_closed":"{host} अभी 'साथ खेलें' नहीं चला रहे हैं।","join_refused_old_helper":"'साथ खेलें' के लिए {host} के PS5 को अपडेटेड हेल्पर चाहिए।","join_refused_not_playing":"{host} अभी नहीं खेल रहे हैं। {host} से पहले खेलें शुरू करने को कहें।","join_refused_unreachable":"{host} का कंप्यूटर उनके PS5 तक नहीं पहुँच सका। थोड़ी देर में फिर कोशिश करें।","join_refused_slow_down":"बहुत सारे गलत कोड। एक मिनट रुकें, फिर कोशिश करें।","join_refused_address":"इस लिंक का पता आपके होम नेटवर्क से बाहर है, इसलिए ऐप इसका उपयोग नहीं करेगा। {host} से उनके कंप्यूटर के IP पते वाला लिंक माँगें।","join_refused_other":"{host} ने आपको अंदर नहीं आने दिया।","join_ended_kicked":"{host} ने आपको गेम से हटा दिया।","join_ended_closed":"{host} ने 'साथ खेलें' बंद कर दिया।","join_ended_host_stopped":"होस्ट ने खेलना बंद कर दिया।","join_ended_replaced":"यह गेम किसी दूसरे टैब या डिवाइस पर खुल गया, इसलिए यहाँ रुक गया।","join_ended_pad_lost":"PS5 ने आपका कंट्रोलर खो दिया, इसलिए आप गेम से बाहर हैं। {host} से फिर अंदर लेने को कहें।","join_ended_gave_up":"{host} से कनेक्शन समय पर वापस नहीं आया।","join_net_lost":"{host} से कनेक्शन टूट गया। अपना इंटरनेट कनेक्शन जाँचें, फिर दोबारा पूछें।","join_ended_lost":"{host} तक नहीं पहुँच सके। देखें कि आप एक ही नेटवर्क पर हैं।","join_ended_left":"आपने गेम छोड़ दिया।","join_net_mismatch":"यह लिंक होस्ट से मेल नहीं खाता; उनसे नया लिंक माँगें।","join_net_no_direct":"इस नेटवर्क से सीधा कनेक्शन संभव नहीं है (दोनों तरफ़ के राउटर सख़्त हैं)। मोबाइल डेटा की जगह Wi-Fi आज़माएँ, या होस्ट से UPnP चालू करने को कहें।","join_net_no_room":"यह न्योता अब खुला नहीं है। {host} से नया लिंक माँगें।","join_net_full":"{host} के गेम में अभी एक और दोस्त की जगह नहीं है। थोड़ी देर में फिर कोशिश करें।","join_net_no_hub":"PS5Upload न्योता सेवा तक नहीं पहुँच सके। अपना इंटरनेट कनेक्शन जाँचें, फिर कोशिश करें।","join_net_offer":"{host} का कंप्यूटर इस ब्राउज़र से कनेक्ट नहीं हो सका। कोई दूसरा ब्राउज़र आज़माएँ।","join_net_no_webrtc":"यह ब्राउज़र सीधे कनेक्शन नहीं बना सकता। Chrome, Safari या Firefox का नया संस्करण आज़माएँ।","join_cancel":"रद्द करें","join_host_fallback":"आपका दोस्त","join_connecting":"{host} से जुड़ रहे हैं…","join_waiting":"{host} के अंदर आने देने का इंतज़ार","join_waiting_body":"{host} अपनी स्क्रीन पर आपका नाम देखकर 'अनुमति दें' पर टैप करेंगे।","join_retry":"फिर कोशिश करें","join_again":"फिर से जुड़ने के लिए पूछें","join_playing_at":"{host} के यहाँ खेल रहे हैं","join_you_are":"आप प्लेयर {n} हैं","join_seat_stream":"आप {host} के PS5 यूज़र के रूप में खेल रहे हैं। यूज़र चुनने की ज़रूरत नहीं।","join_plays_as":"आप {profile} के रूप में खेल रहे हैं। कुछ चुनने की ज़रूरत नहीं।","join_seat_tv_asks":"{host} ने आपके लिए एक प्रोफ़ाइल चुनी थी, पर वह इस्तेमाल नहीं हो सकी। टीवी पूछेगा कि आप कौन हैं।","join_picking":"PS दबाएँ, फिर TV पर क्विक प्ले चुनें","join_hide_controls":"छिपाएँ","join_sound":"आवाज़ के लिए टैप करें","rp_unmute":"ध्वनि चालू","rp_mute":"म्यूट","join_no_sound":"इस ब्राउज़र में आवाज़ नहीं है","join_exit_fullscreen":"फ़ुल स्क्रीन से बाहर निकलें","pad_fill":"फ़ुल स्क्रीन","join_leave":"छोड़ें","join_show_controls":"कंट्रोल दिखाएं","join_hold_hint":"बटन दिखाने के लिए तस्वीर को दबाकर रखें","pad_watch_no_hevc":"यह डिवाइस इस स्ट्रीम की तस्वीर नहीं चला सकता: कंप्यूटर HEVC में स्ट्रीम करता है और यह डिवाइस सिर्फ़ H.264 चलाता है।","pad_watch_decode":"तस्वीर यहाँ नहीं चल सकी।","join_pad_ready":"आपका कंट्रोलर तैयार है","join_check_unknown_short":"हमारी सूची में नहीं: बटन बदले हुए हो सकते हैं।","join_full_to_play":"ऑन-स्क्रीन कंट्रोलर से खेलने के लिए फ़ुल स्क्रीन पर टैप करें।","join_pad_none":"कंट्रोलर जोड़ें (USB या Bluetooth) और कोई भी बटन दबाएँ।","join_pad_keys":"या कीबोर्ड इस्तेमाल करें: WASD चलना, ऐरो D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options।","join_tv_back_hint":"बटन देखने के लिए रिमोट पर Back दबाएँ।","join_block_note":"{host} ने दोस्तों के लिए PS और Create बंद कर दिए हैं।","join_guide_title":"TV पर एक और कदम","join_guide_body":"अपने कंट्रोलर पर एक बार PS दबाएँ। TV पूछेगा \"यह कंट्रोलर कौन इस्तेमाल कर रहा है?\"। क्विक प्ले या अपना यूज़र चुनें। होस्ट को कुछ नहीं करना है।","join_guide_menus":"PS5 की होम स्क्रीन पर सिर्फ़ होस्ट मेन्यू चलाता है; आपका कंट्रोलर गेम के अंदर खेलता है।","join_guide_ok":"ठीक है","join_host_away":"होस्ट ने खेलना बंद कर दिया — उनके फिर से शुरू करने का इंतज़ार ({time})","join_reconnecting":"फिर से जुड़ रहे हैं…","join_reconnecting_left":"आपकी जगह {time} तक रखी जाएगी।","pad_turn":"फ़ोन को आड़ा घुमाएँ","join_game_label":"{host} का गेम","join_title":"दोस्त के गेम में जुड़ें","join_title_body":"{host} के PS5 पर प्लेयर 2, 3 या 4 बनकर खेलें।","join_name_label":"आपका नाम","join_name_hint":"जुड़ने के लिए पूछने पर आपका दोस्त यह देखेगा।","join_button":"जुड़ें"},"hu":{"usb_skipped_not_payload":"{name}: nem .elf vagy .bin fájl","usb_skipped_unknown":"{id}: már nincs a payloadok listáján","browser_unsupported":"Ehhez az asztali alkalmazás kell. Böngészőben nem működik.","video_recovered_notice":"Legutóbb a Play összeomlott a kép indításakor, ezért a kép mostantól videokártya nélkül dekódolódik (módosítás: Beállítások › Ablak › Grafika › Hardveres videódekódolás).","video_recovered_title":"A kép mostantól szoftveresen dekódolódik","open_in_title":"Megnyitod a PS5Upload appban?","open_in_body":"Megvan a PS5Upload app ezen az eszközön? Nyisd meg ott, vagy folytasd a böngészőben.","open_in_app":"Megnyitás az appban","open_in_browser":"Folytatás a böngészőben","open_in_remember":"Választásom megjegyzése ezen az eszközön","open_in_opening":"A PS5Upload app megnyitása…","open_in_not_opened":"Nem történt semmi? Lehet, hogy az app nincs ezen az eszközön.","open_in_again":"Újra","pad_8bitdo_no_xinput":"Ennek a 8BitDo-nak nincs X-input módja. Ha egy gomb rossz, ellenőrizd a kontrollert.","pad_8bitdo_how_switch":"állítsd a hátsó kapcsolót X-re, majd nyomd meg a Start gombot","pad_8bitdo_how_startx":"kapcsold ki, majd a Start + X nyomva tartásával kapcsold be","pad_8bitdo_how_receiver":"használd a 2.4G vevőjét vagy egy USB-kábelt","pad_8bitdo_how_manual":"a kézikönyve leírja, hogyan","pad_8bitdo_xinput":"A legjobb eredményért kapcsold a 8BitDo-t X-input módba: {how}.","rp_touch_left_stick":"Bal kar","rp_touch_right_stick":"Jobb kar","rp_touch_touchpad":"Érintőpad","rp_menu":"Menü","rp_pad_step_lx":"Told a bal kart jobbra","rp_pad_step_ly":"Told a bal kart lefelé","rp_pad_step_rx":"Told a jobb kart jobbra","rp_pad_step_ry":"Told a jobb kart lefelé","join_check_bottom":"Nyomd meg az alsó előlapi gombot (✕)","join_check_right":"Nyomd meg a jobb oldali előlapi gombot (○)","join_check_left":"Nyomd meg a bal oldali előlapi gombot (□)","join_check_top":"Nyomd meg a felső előlapi gombot (△)","rp_pad_press":"Nyomd meg: {name}","join_check_saved":"Elmentve ehhez a kontrollerhez ezen az eszközön. Próbáld ki lent.","join_check_title":"Kontroller ellenőrzése","join_done":"Kész","rp_pads_none":"Még nem látható kontroller. Csatlakoztass egyet, és nyomd meg bármelyik gombját.","rp_pad_mapped":"A saját kiosztásoddal játszik","join_check_unknown":"Ez a kontroller nincs a listánkon, így a gombjai összekeveredhetnek. A beállítás csak pár másodperc.","rp_pad_standard":"Felismerve","rp_pad_progress":"{n} / {total}","rp_pad_skip":"Kihagyás","rp_pad_back":"Vissza","rp_pad_cancel":"Mégse","join_check_try":"Nyomj gombokat és mozgasd a karokat: amit megnyomsz, az felvillan.","join_check_redo":"Újra","join_check_map":"Gombok beállítása","rp_pad_reset":"Visszaállítás","join_open_lan_body":"Nem éred el az internetet? Ha ugyanazon a Wi-Fin vagy, mint a barátod, ott nyisd meg a játékot.","join_open_lan":"Megnyitás ezen a Wi-Fin","join_path_lan":"Otthoni hálózat","join_seat_taken":"{host} visszakérte a kontrollerét, és a PS5-ön nem volt más szabad kontroller, ezért kikerültél a játékból. Kérd meg {host} játékost, hogy engedjen be újra.","join_refused_key":"Ez a meghívó lejárt. Kérj új linket tőle: {host}.","join_refused_expired":"Elveszett a helyed a játékban. Kérd meg {host} felhasználót, hogy engedjen be újra.","join_refused_full":"A játék megtelt: már négy játékos van bent.","join_refused_denied":"{host} most nem engedett be.","join_refused_no_answer":"{host} nem válaszolt időben. Szólj neki ({host}), majd próbáld újra.","join_refused_closed":"{host} most nem indított Közös játékot.","join_refused_old_helper":"{host} PS5-jének frissített segédprogram kell a Közös játékhoz.","join_refused_not_playing":"{host} most nem játszik. Kérd meg, hogy előbb indítsa el a Játékot ({host}).","join_refused_unreachable":"{host} számítógépe nem érte el a PS5-öt. Próbáld újra egy kicsit később.","join_refused_slow_down":"Túl sok hibás kód. Várj egy percet, aztán próbáld újra.","join_refused_address":"A hivatkozás címe kívül esik az otthoni hálózatodon, ezért az alkalmazás nem használja. Kérj {host} felhasználótól olyan hivatkozást, amely a számítógépe IP-címét tartalmazza.","join_refused_other":"{host} nem engedett be.","join_ended_kicked":"{host} kivett a játékból.","join_ended_closed":"{host} bezárta a Közös játékot.","join_ended_host_stopped":"A házigazda abbahagyta a játékot.","join_ended_replaced":"Ezt a játékot egy másik lapon vagy eszközön nyitották meg, ezért itt leállt.","join_ended_pad_lost":"A PS5 elvesztette a kontrollered, ezért kikerültél a játékból. Kérd meg {host} felhasználót, hogy engedjen be újra.","join_ended_gave_up":"A kapcsolat {host} felé nem állt helyre időben.","join_net_lost":"Megszakadt a kapcsolat ezzel: {host}. Ellenőrizd az internetkapcsolatod, aztán kérd újra.","join_ended_lost":"{host} nem érhető el. Ellenőrizd, hogy ugyanazon a hálózaton vagytok-e.","join_ended_left":"Kiléptél a játékból.","join_net_mismatch":"Ez a link nem egyezik a házigazdával; kérj tőle újat.","join_net_no_direct":"Erről a hálózatról nem lehet közvetlen kapcsolatot létrehozni (mindkét oldal routere szigorú). Próbáld Wi-Fi-vel mobilnet helyett, vagy kérd meg a házigazdát, hogy kapcsolja be az UPnP-t.","join_net_no_room":"Ez a meghívó már nem érvényes. Kérj új linket {host} felhasználótól.","join_net_full":"{host} játékában most nincs hely egy újabb barátnak. Próbáld újra egy kicsit később.","join_net_no_hub":"A PS5Upload meghívószolgáltatása nem érhető el. Ellenőrizd az internetkapcsolatot, majd próbáld újra.","join_net_offer":"{host} számítógépe nem tudott kapcsolódni ehhez a böngészőhöz. Próbálj ki egy másik böngészőt.","join_net_no_webrtc":"Ez a böngésző nem tud közvetlen kapcsolatot létrehozni. Próbáld egy friss Chrome-mal, Safarival vagy Firefoxszal.","join_cancel":"Mégse","join_host_fallback":"a barátod","join_connecting":"Csatlakozás ehhez: {host}…","join_waiting":"Várakozás, amíg {host} beenged","join_waiting_body":"{host} látja a neved a képernyőjén, és az Engedélyezésre koppint.","join_retry":"Újra","join_again":"Csatlakozás kérése újra","join_playing_at":"Játék itt: {host}","join_you_are":"Te vagy a(z) {n}. játékos","join_seat_stream":"{host} PS5-felhasználójaként játszol. Nem kell felhasználót választanod.","join_plays_as":"{profile} néven játszol. Nem kell választanod.","join_seat_tv_asks":"{host} választott neked egy profilt, de nem lehetett használni. A tévé megkérdezi, ki vagy.","join_picking":"Nyomd meg a PS gombot, aztán a tévén válaszd a Gyors játékot","join_hide_controls":"Elrejtés","join_sound":"Koppints a hanghoz","rp_unmute":"Hang be","rp_mute":"Némítás","join_no_sound":"Ebben a böngészőben nincs hang","join_exit_fullscreen":"Kilépés a teljes képernyőből","pad_fill":"Teljes képernyő","join_leave":"Kilépés","join_show_controls":"Vezérlők megjelenítése","join_hold_hint":"A gombok megjelenítéséhez tartsd lenyomva a képet","pad_watch_no_hevc":"Ez az eszköz nem tudja lejátszani ennek a streamnek a képét: a számítógép HEVC-ben streamel, ez az eszköz csak H.264-et játszik le.","pad_watch_decode":"A képet itt nem sikerült lejátszani.","join_pad_ready":"A kontrollered készen áll","join_check_unknown_short":"Nincs a listánkon: a gombok összekeveredhetnek.","join_full_to_play":"Koppints a Teljes képernyő gombra, hogy a képernyős kontrollerrel játssz.","join_pad_none":"Csatlakoztass egy kontrollert (USB vagy Bluetooth), és nyomj meg egy gombot.","join_pad_keys":"Vagy használd a billentyűzetet: WASD mozgás, nyilak D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"A gombokhoz nyomd meg a távirányítón a Vissza gombot.","join_block_note":"{host} kikapcsolta a PS és Create gombot a barátoknak.","join_guide_title":"Még egy lépés a tévén","join_guide_body":"Nyomd meg egyszer a PS gombot a kontrollereden. A tévé megkérdezi: „Ki használja ezt a kontrollert?”. Válaszd a Gyors játékot vagy a saját felhasználódat. A házigazdának semmit sem kell tennie.","join_guide_menus":"A PS5 kezdőképernyőjén csak a házigazda kezeli a menüket; a te kontrollered a játékokban működik.","join_guide_ok":"Értem","join_host_away":"A házigazda abbahagyta a játékot – várjuk, hogy újra elkezdje ({time})","join_reconnecting":"Újracsatlakozás…","join_reconnecting_left":"A helyed még {time} ideig fenntartjuk.","pad_turn":"Fordítsd el a telefont fekvőre","join_game_label":"{host} játéka","join_title":"Csatlakozás egy barát játékához","join_title_body":"Játssz {host} PS5-jén 2., 3. vagy 4. játékosként.","join_name_label":"A neved","join_name_hint":"A barátod ezt látja, amikor csatlakozni szeretnél.","join_button":"Csatlakozás"},"id":{"usb_skipped_not_payload":"{name}: bukan file .elf atau .bin","usb_skipped_unknown":"{id}: tidak ada lagi di daftar payload","browser_unsupported":"Ini memerlukan aplikasi desktop. Tidak berfungsi di browser.","video_recovered_notice":"Terakhir kali Play crash saat memulai gambar, jadi gambar kini didekode tanpa kartu grafis (ubah di Pengaturan › Jendela › Grafis › Dekode video perangkat keras).","video_recovered_title":"Gambar kini didekode oleh perangkat lunak","open_in_title":"Buka di aplikasi PS5Upload?","open_in_body":"Punya aplikasi PS5Upload di perangkat ini? Buka di sana, atau lanjutkan di browser.","open_in_app":"Buka di aplikasi","open_in_browser":"Lanjutkan di browser","open_in_remember":"Ingat pilihan saya di perangkat ini","open_in_opening":"Membuka aplikasi PS5Upload…","open_in_not_opened":"Tidak terjadi apa-apa? Mungkin aplikasinya tidak ada di perangkat ini.","open_in_again":"Coba lagi","pad_8bitdo_no_xinput":"8BitDo ini tidak punya mode X-input. Jika ada tombol yang salah, periksa kontrolernya.","pad_8bitdo_how_switch":"geser sakelar di belakang ke X, lalu tekan Start","pad_8bitdo_how_startx":"matikan, lalu tahan Start + X untuk menyalakannya","pad_8bitdo_how_receiver":"gunakan receiver 2.4G-nya atau kabel USB","pad_8bitdo_how_manual":"caranya ada di buku panduannya","pad_8bitdo_xinput":"Untuk hasil terbaik, ubah 8BitDo kamu ke mode X-input: {how}.","rp_touch_left_stick":"Stik kiri","rp_touch_right_stick":"Stik kanan","rp_pad_step_lx":"Dorong stik kiri ke kanan","rp_pad_step_ly":"Dorong stik kiri ke bawah","rp_pad_step_rx":"Dorong stik kanan ke kanan","rp_pad_step_ry":"Dorong stik kanan ke bawah","join_check_bottom":"Tekan tombol muka bawah (✕)","join_check_right":"Tekan tombol muka kanan (○)","join_check_left":"Tekan tombol muka kiri (□)","join_check_top":"Tekan tombol muka atas (△)","rp_pad_press":"Tekan {name}","join_check_saved":"Disimpan untuk kontroler ini di perangkat ini. Coba di bawah.","join_check_title":"Periksa kontrolermu","join_done":"Selesai","rp_pads_none":"Belum ada kontroler terdeteksi. Sambungkan satu dan tekan tombol apa saja.","rp_pad_mapped":"Bermain dengan pemetaan Anda","join_check_unknown":"Kontroler ini tidak ada di daftar kami, jadi tombolnya bisa tertukar. Mengaturnya hanya butuh beberapa detik.","rp_pad_standard":"Dikenali","rp_pad_progress":"{n} dari {total}","rp_pad_skip":"Lewati","rp_pad_back":"Kembali","rp_pad_cancel":"Batal","join_check_try":"Tekan tombol dan gerakkan stik: yang kamu tekan akan menyala.","join_check_redo":"Ulangi","join_check_map":"Atur tombol","rp_pad_reset":"Atur ulang","join_open_lan_body":"Tidak bisa ke internet? Kalau kamu di Wi-Fi yang sama dengan temanmu, buka game-nya di sana.","join_open_lan":"Buka di Wi-Fi ini","join_path_lan":"Jaringan rumah","join_seat_taken":"{host} membutuhkan kontrolernya kembali dan tidak ada kontroler lain yang kosong di PS5, jadi Anda keluar dari permainan. Minta {host} untuk mengizinkan Anda masuk lagi.","join_refused_key":"Undangan ini sudah kedaluwarsa. Minta tautan baru ke {host}.","join_refused_expired":"Tempat Anda di permainan hilang. Minta {host} untuk memasukkan Anda lagi.","join_refused_full":"Game sudah penuh: sudah ada empat pemain.","join_refused_denied":"{host} tidak mengizinkan Anda masuk kali ini.","join_refused_no_answer":"{host} tidak menjawab tepat waktu. Beri tahu {host}, lalu coba lagi.","join_refused_closed":"{host} sedang tidak membuka Main Bareng.","join_refused_old_helper":"PS5 milik {host} perlu helper terbaru untuk Main Bareng.","join_refused_not_playing":"{host} sedang tidak main. Minta {host} memulai Main dulu.","join_refused_unreachable":"Komputer {host} tidak bisa menjangkau PS5-nya. Coba lagi sebentar lagi.","join_refused_slow_down":"Terlalu banyak kode yang salah. Tunggu satu menit, lalu coba lagi.","join_refused_address":"Alamat tautan ini berada di luar jaringan rumah Anda, jadi aplikasi tidak akan memakainya. Minta {host} tautan dengan alamat IP komputernya.","join_refused_other":"{host} tidak mengizinkan Anda masuk.","join_ended_kicked":"{host} mengeluarkan Anda dari game.","join_ended_closed":"{host} menutup Main Bareng.","join_ended_host_stopped":"Host berhenti main.","join_ended_replaced":"Permainan ini dibuka di tab atau perangkat lain, jadi berhenti di sini.","join_ended_pad_lost":"PS5 kehilangan kontroler Anda, jadi Anda keluar dari permainan. Minta {host} untuk memasukkan Anda lagi.","join_ended_gave_up":"Koneksi ke {host} tidak pulih tepat waktu.","join_net_lost":"Koneksi ke {host} terputus. Periksa koneksi internetmu, lalu minta lagi.","join_ended_lost":"Tidak bisa menjangkau {host}. Pastikan Anda di jaringan yang sama.","join_ended_left":"Anda keluar dari game.","join_net_mismatch":"Tautan ini tidak cocok dengan host; minta tautan baru kepadanya.","join_net_no_direct":"Koneksi langsung tidak mungkin dari jaringan ini (router kedua pihak ketat). Coba Wi-Fi alih-alih data seluler, atau minta host menyalakan UPnP.","join_net_no_room":"Undangan ini sudah tidak terbuka. Minta tautan baru kepada {host}.","join_net_full":"Permainan {host} tidak punya tempat untuk teman lain sekarang. Coba lagi sebentar lagi.","join_net_no_hub":"Tidak bisa menjangkau layanan undangan PS5Upload. Periksa koneksi internet Anda, lalu coba lagi.","join_net_offer":"Komputer {host} tidak bisa terhubung ke browser ini. Coba browser lain.","join_net_no_webrtc":"Browser ini tidak bisa membuat koneksi langsung. Coba Chrome, Safari, atau Firefox versi terbaru.","join_cancel":"Batal","join_host_fallback":"teman Anda","join_connecting":"Menghubungkan ke {host}…","join_waiting":"Menunggu {host} mengizinkan Anda masuk","join_waiting_body":"{host} melihat nama Anda di layarnya lalu mengetuk Izinkan.","join_retry":"Coba lagi","join_again":"Minta bergabung lagi","join_playing_at":"Main di tempat {host}","join_you_are":"Anda Pemain {n}","join_seat_stream":"Anda bermain sebagai pengguna PS5 {host}. Tidak perlu memilih pengguna.","join_plays_as":"Anda bermain sebagai {profile}. Tidak perlu memilih.","join_seat_tv_asks":"{host} memilihkan profil untuk Anda, tetapi tidak bisa dipakai. TV akan menanyakan siapa Anda.","join_picking":"Tekan PS, lalu pilih Main Cepat di TV","join_hide_controls":"Sembunyikan","join_sound":"Ketuk untuk suara","rp_unmute":"Suara aktif","rp_mute":"Bisukan","join_no_sound":"Tidak ada suara di browser ini","join_exit_fullscreen":"Keluar dari layar penuh","pad_fill":"Layar penuh","join_leave":"Keluar","join_show_controls":"Tampilkan kontrol","join_hold_hint":"Tekan dan tahan gambar untuk menampilkan tombol","pad_watch_no_hevc":"Perangkat ini tidak bisa memutar gambar stream ini: komputer mengirim HEVC, dan perangkat ini hanya memutar H.264.","pad_watch_decode":"Gambar tidak dapat diputar di sini.","join_pad_ready":"Kontroler Anda siap","join_check_unknown_short":"Tidak ada di daftar kami: tombol bisa tertukar.","join_full_to_play":"Ketuk Layar penuh untuk main dengan kontroler di layar.","join_pad_none":"Hubungkan kontroler (USB atau Bluetooth) lalu tekan tombol apa saja.","join_pad_keys":"Atau pakai keyboard: WASD gerak, panah D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Tekan Kembali di remote untuk menampilkan tombol.","join_block_note":"{host} mematikan PS dan Create untuk teman.","join_guide_title":"Satu langkah lagi di TV","join_guide_body":"Tekan PS sekali di kontroler Anda. TV bertanya \"Siapa yang memakai kontroler ini?\". Pilih Main Cepat atau pengguna Anda sendiri. Tuan rumah tidak perlu melakukan apa pun.","join_guide_menus":"Di layar beranda PS5 hanya host yang mengendalikan menu; kontroler Anda berfungsi di dalam game.","join_guide_ok":"Mengerti","join_host_away":"Host berhenti main — menunggu mereka mulai lagi ({time})","join_reconnecting":"Menyambung ulang…","join_reconnecting_left":"Tempat Anda disimpan selama {time}.","pad_turn":"Miringkan ponsel ke samping","join_game_label":"Game {host}","join_title":"Gabung ke game teman","join_title_body":"Main di PS5 milik {host} sebagai Pemain 2, 3, atau 4.","join_name_label":"Nama Anda","join_name_hint":"Teman Anda melihat nama ini saat Anda minta bergabung.","join_button":"Gabung"},"it":{"usb_skipped_not_payload":"{name}: non è un file .elf o .bin","usb_skipped_unknown":"{id}: non è più nell'elenco dei payload","browser_unsupported":"Serve l'app desktop. Non funziona nel browser.","video_recovered_notice":"L'ultima volta Play si è chiuso all'avvio dell'immagine, quindi ora l'immagine è decodificata senza la scheda grafica (modificabile in Impostazioni › Finestra › Grafica › Decodifica video hardware).","video_recovered_title":"Immagine ora decodificata via software","open_in_title":"Aprire nell’app PS5Upload?","open_in_body":"Hai l’app PS5Upload su questo dispositivo? Aprilo lì, oppure continua nel browser.","open_in_app":"Apri nell’app","open_in_browser":"Continua nel browser","open_in_remember":"Ricorda la mia scelta su questo dispositivo","open_in_opening":"Apertura dell’app PS5Upload…","open_in_not_opened":"Non è successo niente? Forse l’app non è su questo dispositivo.","open_in_again":"Riprova","pad_8bitdo_no_xinput":"Questo 8BitDo non ha la modalità X-input. Se un tasto è sbagliato, controlla il controller.","pad_8bitdo_how_switch":"porta l'interruttore sul retro su X, poi premi Start","pad_8bitdo_how_startx":"spegnilo, poi tieni premuto Start + X per accenderlo","pad_8bitdo_how_receiver":"usa il suo ricevitore 2.4G o un cavo USB","pad_8bitdo_how_manual":"il suo manuale spiega come","pad_8bitdo_xinput":"Per il risultato migliore, passa il tuo 8BitDo in modalità X-input: {how}.","rp_touch_left_stick":"Levetta sinistra","rp_touch_right_stick":"Levetta destra","rp_pad_step_lx":"Spingi la levetta sinistra a destra","rp_pad_step_ly":"Spingi la levetta sinistra in basso","rp_pad_step_rx":"Spingi la levetta destra a destra","rp_pad_step_ry":"Spingi la levetta destra in basso","join_check_bottom":"Premi il tasto frontale in basso (✕)","join_check_right":"Premi il tasto frontale a destra (○)","join_check_left":"Premi il tasto frontale a sinistra (□)","join_check_top":"Premi il tasto frontale in alto (△)","rp_pad_press":"Premi {name}","join_check_saved":"Salvato per questo controller su questo dispositivo. Provalo qui sotto.","join_check_title":"Controlla il controller","join_done":"Fatto","rp_pads_none":"Nessun controller rilevato. Collegane uno e premi un tasto qualsiasi.","rp_pad_mapped":"Gioca con la tua mappatura","join_check_unknown":"Questo controller non è nel nostro elenco, quindi i tasti potrebbero essere scambiati. Configurarlo richiede pochi secondi.","rp_pad_standard":"Riconosciuto","rp_pad_progress":"{n} di {total}","rp_pad_skip":"Salta","rp_pad_back":"Indietro","rp_pad_cancel":"Annulla","join_check_try":"Premi i tasti e muovi le levette: ciò che premi si illumina.","join_check_redo":"Rifai","join_check_map":"Configura i tasti","rp_pad_reset":"Ripristina","join_open_lan_body":"Niente Internet? Se sei sullo stesso Wi-Fi del tuo amico, apri la partita da lì.","join_open_lan":"Apri su questo Wi-Fi","join_path_lan":"Rete domestica","join_seat_taken":"{host} aveva bisogno di riavere il suo controller e sulla PS5 non c'era un altro controller libero, quindi sei uscito dalla partita. Chiedi a {host} di farti entrare di nuovo.","join_refused_key":"Questo invito è scaduto. Chiedi a {host} un nuovo link.","join_refused_expired":"Il tuo posto nella partita è perso. Chiedi a {host} di farti rientrare.","join_refused_full":"La partita è piena: ci sono già quattro giocatori.","join_refused_denied":"Stavolta {host} non ti ha fatto entrare.","join_refused_no_answer":"{host} non ha risposto in tempo. Avvisa {host}, poi riprova.","join_refused_closed":"Al momento {host} non sta ospitando Gioca insieme.","join_refused_old_helper":"La PS5 di {host} ha bisogno di un helper aggiornato per Gioca insieme.","join_refused_not_playing":"{host} non sta giocando ora. Chiedi prima a {host} di avviare Gioca.","join_refused_unreachable":"Il computer di {host} non è riuscito a raggiungere la PS5. Riprova tra poco.","join_refused_slow_down":"Troppi codici errati. Aspetta un minuto e riprova.","join_refused_address":"L'indirizzo di questo link è fuori dalla tua rete domestica, quindi l'app non lo userà. Chiedi a {host} un link con l'indirizzo IP del suo computer.","join_refused_other":"{host} non ti ha fatto entrare.","join_ended_kicked":"{host} ti ha tolto dalla partita.","join_ended_closed":"{host} ha chiuso Gioca insieme.","join_ended_host_stopped":"L'host ha smesso di giocare.","join_ended_replaced":"Questa partita è stata aperta in un'altra scheda o su un altro dispositivo, quindi qui si è fermata.","join_ended_pad_lost":"La PS5 ha perso il tuo controller, quindi sei fuori dalla partita. Chiedi a {host} di farti rientrare.","join_ended_gave_up":"La connessione con {host} non è tornata in tempo.","join_net_lost":"La connessione con {host} si è interrotta. Controlla la connessione Internet, poi chiedi di nuovo.","join_ended_lost":"Impossibile raggiungere {host}. Controlla di essere sulla stessa rete.","join_ended_left":"Sei uscito dalla partita.","join_net_mismatch":"Questo link non corrisponde all'host; chiedigliene uno nuovo.","join_net_no_direct":"Da questa rete non è possibile una connessione diretta (i router di entrambi i lati sono restrittivi). Prova il Wi-Fi invece dei dati mobili, oppure chiedi all'host di attivare UPnP.","join_net_no_room":"Questo invito non è più aperto. Chiedi a {host} un nuovo link.","join_net_full":"La partita di {host} non ha posto per un altro amico in questo momento. Riprova tra poco.","join_net_no_hub":"Impossibile raggiungere il servizio inviti di PS5Upload. Controlla la connessione a internet, poi riprova.","join_net_offer":"Il computer di {host} non è riuscito a connettersi a questo browser. Prova un altro browser.","join_net_no_webrtc":"Questo browser non può creare connessioni dirette. Prova una versione recente di Chrome, Safari o Firefox.","join_cancel":"Annulla","join_host_fallback":"il tuo amico","join_connecting":"Connessione a {host}…","join_waiting":"In attesa che {host} ti faccia entrare","join_waiting_body":"{host} vede il tuo nome sullo schermo e tocca Consenti.","join_retry":"Riprova","join_again":"Chiedi di nuovo di entrare","join_playing_at":"Giochi da {host}","join_you_are":"Sei il Giocatore {n}","join_seat_stream":"Stai giocando con l'utente PS5 di {host}. Non serve sceglierne uno.","join_plays_as":"Stai giocando come {profile}. Non devi sceglierne uno.","join_seat_tv_asks":"{host} ha scelto un profilo per te, ma non si è potuto usare. La TV ti chiederà chi sei.","join_picking":"Premi PS, poi scegli Gioco rapido sulla TV","join_hide_controls":"Nascondi","join_sound":"Tocca per l'audio","rp_unmute":"Audio attivo","rp_mute":"Muto","join_no_sound":"Nessun suono in questo browser","join_exit_fullscreen":"Esci da schermo intero","pad_fill":"Schermo intero","join_leave":"Esci","join_show_controls":"Mostra i comandi","join_hold_hint":"Tieni premuto sull'immagine per mostrare i pulsanti","pad_watch_no_hevc":"Questo dispositivo non può riprodurre l'immagine di questo stream: il computer trasmette in HEVC e questo dispositivo riproduce solo H.264.","pad_watch_decode":"Non è stato possibile riprodurre l'immagine qui.","join_pad_ready":"Il tuo controller è pronto","join_check_unknown_short":"Non è nel nostro elenco: i tasti potrebbero essere scambiati.","join_full_to_play":"Tocca schermo intero per giocare con il controller a schermo.","join_pad_none":"Collega un controller (USB o Bluetooth) e premi un tasto qualsiasi.","join_pad_keys":"Oppure usa la tastiera: WASD per muoverti, frecce croce direzionale, Invio ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Premi Indietro sul telecomando per vedere i pulsanti.","join_block_note":"{host} ha disattivato PS e Create per gli amici.","join_guide_title":"Ancora un passo sulla TV","join_guide_body":"Premi PS una volta sul controller. La TV chiede \"Chi sta usando questo controller?\". Scegli Gioco rapido o il tuo utente. L'host non deve fare nulla.","join_guide_menus":"Nella schermata iniziale della PS5 solo chi ospita controlla i menu; il tuo controller gioca dentro i giochi.","join_guide_ok":"Ho capito","join_host_away":"L'host ha smesso di giocare: in attesa che ricominci ({time})","join_reconnecting":"Riconnessione…","join_reconnecting_left":"Il tuo posto resta riservato per {time}.","pad_turn":"Ruota il telefono in orizzontale","join_game_label":"Partita di {host}","join_title":"Unisciti alla partita di un amico","join_title_body":"Gioca sulla PS5 di {host} come Giocatore 2, 3 o 4.","join_name_label":"Il tuo nome","join_name_hint":"Il tuo amico lo vede quando chiedi di entrare.","join_button":"Unisciti"},"ja":{"usb_skipped_not_payload":"{name}:.elf または .bin ファイルではありません","usb_skipped_unknown":"{id}: ペイロード一覧にありません","browser_unsupported":"デスクトップアプリが必要です。ブラウザーでは動作しません。","video_recovered_notice":"前回 Play が映像の開始中にクラッシュしたため、映像をグラフィックカードを使わずにデコードするようにしました(設定 › ウィンドウ › グラフィック › ハードウェア映像デコード で変更できます)。","video_recovered_title":"映像はソフトウェアでデコードされます","open_in_title":"PS5Upload アプリで開きますか?","open_in_body":"この端末に PS5Upload アプリがあれば、アプリで開けます。ブラウザーのまま続けることもできます。","open_in_app":"アプリで開く","open_in_browser":"ブラウザーで続ける","open_in_remember":"この端末で選択を記憶する","open_in_opening":"PS5Upload アプリを開いています…","open_in_not_opened":"何も起きませんか?この端末にアプリが入っていないかもしれません。","open_in_again":"再試行","pad_8bitdo_no_xinput":"この 8BitDo には X-input モードがありません。ボタンが違う場合はコントローラーを確認してください。","pad_8bitdo_how_switch":"背面のスイッチを X にして Start を押す","pad_8bitdo_how_startx":"電源を切り、Start + X を押したまま電源を入れる","pad_8bitdo_how_receiver":"付属の 2.4G レシーバーか USB ケーブルを使う","pad_8bitdo_how_manual":"方法は取扱説明書にあります","pad_8bitdo_xinput":"最適に使うには、8BitDo を X-input モードにしてください: {how}。","rp_touch_left_stick":"左スティック","rp_touch_right_stick":"右スティック","rp_touch_touchpad":"タッチパッド","rp_menu":"メニュー","rp_pad_step_lx":"左スティックを右に倒してください","rp_pad_step_ly":"左スティックを下に倒してください","rp_pad_step_rx":"右スティックを右に倒してください","rp_pad_step_ry":"右スティックを下に倒してください","join_check_bottom":"下のボタンを押してください (✕)","join_check_right":"右のボタンを押してください (○)","join_check_left":"左のボタンを押してください (□)","join_check_top":"上のボタンを押してください (△)","rp_pad_press":"{name} を押してください","join_check_saved":"このデバイスでこのコントローラー用に保存しました。下で試してください。","join_check_title":"コントローラーを確認","join_done":"完了","rp_pads_none":"コントローラーがまだ見つかりません。接続して、いずれかのボタンを押してください。","rp_pad_mapped":"あなたの割り当てで操作します","join_check_unknown":"このコントローラーは一覧にないため、ボタンが入れ替わっている可能性があります。設定は数秒で終わります。","rp_pad_standard":"認識済み","rp_pad_progress":"{n} / {total}","rp_pad_skip":"スキップ","rp_pad_back":"戻る","rp_pad_cancel":"キャンセル","join_check_try":"ボタンを押したりスティックを動かしたりしてください。押したものが光ります。","join_check_redo":"やり直す","join_check_map":"ボタンを設定","rp_pad_reset":"リセット","join_open_lan_body":"インターネットにつながりませんか?友だちと同じ Wi-Fi にいるなら、そこでゲームを開いてください。","join_open_lan":"この Wi-Fi で開く","join_path_lan":"ホームネットワーク","join_path_internet":"インターネット","join_seat_taken":"{host}が自分のコントローラーを必要とし、PS5に空いているコントローラーがほかになかったため、ゲームから退出しました。もう一度入れてもらうよう{host}に頼んでください。","join_refused_key":"この招待は期限切れです。{host}さんに新しいリンクをもらってください。","join_refused_expired":"ゲームの席がなくなりました。{host} さんにもう一度入れてもらってください。","join_refused_full":"満員です:すでに4人がプレイしています。","join_refused_denied":"今回は{host}さんに参加を許可されませんでした。","join_refused_no_answer":"{host} さんが時間内に応答しませんでした。{host} さんに伝えてから、もう一度お試しください。","join_refused_closed":"{host}さんは今「いっしょにプレイ」を開いていません。","join_refused_old_helper":"「いっしょにプレイ」を使うには、{host}さんのPS5のヘルパーを更新する必要があります。","join_refused_not_playing":"{host}さんは今プレイしていません。先に{host}さんにプレイを始めてもらってください。","join_refused_unreachable":"{host}さんのコンピューターがPS5に接続できませんでした。少ししてからもう一度お試しください。","join_refused_slow_down":"間違ったコードが多すぎます。1分待ってからもう一度お試しください。","join_refused_address":"このリンクのアドレスはホームネットワークの外にあるため、アプリは使用しません。{host} にコンピューターの IP アドレスのリンクを頼んでください。","join_refused_other":"{host}さんに参加を許可されませんでした。","join_ended_kicked":"{host}さんにゲームから外されました。","join_ended_closed":"{host}さんが「いっしょにプレイ」を終了しました。","join_ended_host_stopped":"ホストがプレイをやめました。","join_ended_replaced":"このゲームが別のタブまたは別のデバイスで開かれたため、ここでは終了しました。","join_ended_pad_lost":"PS5 があなたのコントローラーを見失ったため、ゲームから外れました。{host} さんにもう一度入れてもらってください。","join_ended_gave_up":"{host}さんとの接続が時間内に戻りませんでした。","join_net_lost":"{host} との接続が切れました。インターネット接続を確認してから、もう一度お願いしてください。","join_ended_lost":"{host}さんに接続できませんでした。同じネットワークにいるか確認してください。","join_ended_left":"ゲームから退出しました。","join_net_mismatch":"このリンクはホストと一致しません。ホストに新しいリンクをもらってください。","join_net_no_direct":"このネットワークからは直接接続できません(双方のルーターが厳しい設定です)。モバイルデータではなく Wi-Fi を試すか、ホストに UPnP をオンにしてもらってください。","join_net_no_room":"この招待はもう有効ではありません。{host}さんに新しいリンクをもらってください。","join_net_full":"{host}さんのゲームには今これ以上友だちが入れません。少ししてからもう一度お試しください。","join_net_no_hub":"PS5Upload の招待サービスに接続できませんでした。インターネット接続を確認して、もう一度お試しください。","join_net_offer":"{host}さんのコンピューターがこのブラウザーに接続できませんでした。別のブラウザーをお試しください。","join_net_no_webrtc":"このブラウザーは直接接続ができません。最新の Chrome、Safari、Firefox をお試しください。","join_cancel":"キャンセル","join_host_fallback":"フレンド","join_connecting":"{host}さんに接続中…","join_waiting":"{host}さんの許可を待っています","join_waiting_body":"{host}さんの画面にあなたの名前が表示され、「許可」をタップすると参加できます。","join_retry":"再試行","join_again":"もう一度参加をリクエスト","join_playing_at":"{host}さんのPS5でプレイ中","join_you_are":"あなたはプレイヤー{n}です","join_seat_stream":"{host}のPS5ユーザーとしてプレイしています。ユーザーを選ぶ必要はありません。","join_plays_as":"{profile}としてプレイしています。選ぶ必要はありません。","join_seat_tv_asks":"{host}があなた用のプロフィールを選びましたが、使えませんでした。テレビで誰がプレイするかを聞かれます。","join_picking":"PSボタンを押して、テレビで「クイックプレイ」を選んでください","join_hide_controls":"隠す","join_sound":"タップして音を出す","rp_unmute":"音声オン","rp_mute":"ミュート","join_no_sound":"このブラウザーでは音声を再生できません","join_exit_fullscreen":"全画面を終了","pad_fill":"全画面","join_leave":"退出","join_show_controls":"操作ボタンを表示","join_hold_hint":"画面を長押しするとボタンが表示されます","pad_watch_no_hevc":"この端末ではこの配信の映像を再生できません。PC は HEVC で配信していますが、この端末は H.264 のみ再生できます。","pad_watch_decode":"ここでは映像を再生できませんでした。","join_pad_ready":"コントローラーの準備ができました","join_check_unknown_short":"一覧にありません: ボタンが入れ替わっている可能性があります。","join_full_to_play":"全画面をタップすると、画面上のコントローラーでプレイできます。","join_pad_none":"コントローラーをつないで(USBまたはBluetooth)、いずれかのボタンを押してください。","join_pad_keys":"キーボードでも遊べます:WASDで移動、矢印キーで方向キー、Enter ✕、Backspace ○、Q □、E △、Tab OPTIONS。","join_tv_back_hint":"ボタンを表示するには、リモコンの戻るを押してください。","join_block_note":"{host}さんがフレンドのPSボタンとCreateボタンを無効にしています。","join_guide_title":"テレビであと1ステップ","join_guide_body":"コントローラーのPSボタンを1回押してください。テレビに「このコントローラーを使うのは誰ですか?」と表示されます。クイックプレイか自分のユーザーを選んでください。ホストの操作は不要です。","join_guide_menus":"PS5のホーム画面でメニューを操作できるのはホストだけです。あなたのコントローラーはゲームの中で使えます。","join_guide_ok":"OK","join_host_away":"ホストがプレイをやめました — 再開を待っています({time})","join_reconnecting":"再接続中…","join_reconnecting_left":"あと{time}は枠が確保されています。","pad_turn":"スマホを横向きにしてください","join_game_label":"{host}さんのゲーム","join_title":"フレンドのゲームに参加","join_title_body":"{host}さんのPS5でプレイヤー2・3・4として遊べます。","join_name_label":"あなたの名前","join_name_hint":"参加をリクエストすると、フレンドにこの名前が表示されます。","join_button":"参加"},"ko":{"usb_skipped_not_payload":"{name}: .elf 또는 .bin 파일이 아님","usb_skipped_unknown":"{id}: 더 이상 페이로드 목록에 없습니다","browser_unsupported":"데스크톱 앱이 필요합니다. 브라우저에서는 작동하지 않습니다.","video_recovered_notice":"지난번 화면을 시작하는 중에 Play가 충돌하여, 이제 그래픽 카드 없이 화면을 디코딩합니다(설정 › 창 › 그래픽 › 하드웨어 영상 디코딩에서 변경).","video_recovered_title":"이제 화면을 소프트웨어로 디코딩합니다","open_in_title":"PS5Upload 앱에서 열까요?","open_in_body":"이 기기에 PS5Upload 앱이 있나요? 앱에서 열거나 브라우저에서 계속하세요.","open_in_app":"앱에서 열기","open_in_browser":"브라우저에서 계속","open_in_remember":"이 기기에서 선택 기억하기","open_in_opening":"PS5Upload 앱을 여는 중…","open_in_not_opened":"아무 일도 없나요? 이 기기에 앱이 없을 수 있습니다.","open_in_again":"다시 시도","pad_8bitdo_no_xinput":"이 8BitDo에는 X-input 모드가 없습니다. 버튼이 다르게 동작하면 컨트롤러를 확인하세요.","pad_8bitdo_how_switch":"뒷면 스위치를 X로 놓고 Start를 누르세요","pad_8bitdo_how_startx":"전원을 끈 다음 Start + X를 누른 채로 켜세요","pad_8bitdo_how_receiver":"2.4G 수신기나 USB 케이블을 사용하세요","pad_8bitdo_how_manual":"방법은 설명서에 있습니다","pad_8bitdo_xinput":"가장 잘 동작하도록 8BitDo를 X-input 모드로 바꾸세요: {how}.","rp_touch_left_stick":"왼쪽 스틱","rp_touch_right_stick":"오른쪽 스틱","rp_touch_touchpad":"터치패드","rp_menu":"메뉴","rp_pad_step_lx":"왼쪽 스틱을 오른쪽으로 미세요","rp_pad_step_ly":"왼쪽 스틱을 아래로 미세요","rp_pad_step_rx":"오른쪽 스틱을 오른쪽으로 미세요","rp_pad_step_ry":"오른쪽 스틱을 아래로 미세요","join_check_bottom":"아래쪽 버튼을 누르세요 (✕)","join_check_right":"오른쪽 버튼을 누르세요 (○)","join_check_left":"왼쪽 버튼을 누르세요 (□)","join_check_top":"위쪽 버튼을 누르세요 (△)","rp_pad_press":"{name} 버튼을 누르세요","join_check_saved":"이 기기에서 이 컨트롤러용으로 저장했습니다. 아래에서 시험해 보세요.","join_check_title":"컨트롤러 확인","join_done":"완료","rp_pads_none":"아직 컨트롤러가 보이지 않습니다. 컨트롤러를 연결하고 아무 버튼이나 누르세요.","rp_pad_mapped":"내 버튼 설정으로 플레이","join_check_unknown":"이 컨트롤러는 목록에 없어서 버튼이 뒤바뀌어 있을 수 있습니다. 설정은 몇 초면 됩니다.","rp_pad_standard":"인식됨","rp_pad_progress":"{n} / {total}","rp_pad_skip":"건너뛰기","rp_pad_back":"뒤로","rp_pad_cancel":"취소","join_check_try":"버튼을 누르고 스틱을 움직여 보세요. 누른 것이 켜집니다.","join_check_redo":"다시 하기","join_check_map":"버튼 설정","rp_pad_reset":"초기화","join_open_lan_body":"인터넷에 연결되지 않나요? 친구와 같은 Wi-Fi에 있다면 거기서 게임을 여세요.","join_open_lan":"이 Wi-Fi에서 열기","join_path_lan":"홈 네트워크","join_path_internet":"인터넷","join_seat_taken":"{host} 님이 컨트롤러를 다시 써야 했는데 PS5에 남은 컨트롤러가 없어서 게임에서 나왔어요. {host} 님에게 다시 들여보내 달라고 하세요.","join_refused_key":"초대가 만료됐어요. {host} 님에게 새 링크를 요청하세요.","join_refused_expired":"게임 자리를 잃었습니다. {host} 님에게 다시 들여보내 달라고 하세요.","join_refused_full":"게임이 꽉 찼어요. 이미 4명이 플레이 중이에요.","join_refused_denied":"이번에는 {host} 님이 참여를 허용하지 않았어요.","join_refused_no_answer":"{host} 님이 제시간에 응답하지 않았습니다. {host} 님에게 알린 뒤 다시 시도하세요.","join_refused_closed":"{host} 님은 지금 함께 플레이를 열고 있지 않아요.","join_refused_old_helper":"함께 플레이를 하려면 {host} 님의 PS5 헬퍼를 업데이트해야 해요.","join_refused_not_playing":"{host} 님은 지금 플레이 중이 아니에요. {host} 님에게 먼저 플레이를 시작해 달라고 하세요.","join_refused_unreachable":"{host} 님의 컴퓨터가 PS5에 연결하지 못했어요. 잠시 후 다시 시도하세요.","join_refused_slow_down":"잘못된 코드를 너무 많이 입력했어요. 1분 후에 다시 시도하세요.","join_refused_address":"이 링크의 주소는 홈 네트워크 밖에 있어 앱에서 사용하지 않습니다. {host}에게 컴퓨터의 IP 주소가 있는 링크를 요청하세요.","join_refused_other":"{host} 님이 참여를 허용하지 않았어요.","join_ended_kicked":"{host} 님이 나를 게임에서 내보냈어요.","join_ended_closed":"{host} 님이 함께 플레이를 닫았어요.","join_ended_host_stopped":"호스트가 플레이를 멈췄어요.","join_ended_replaced":"이 게임이 다른 탭이나 다른 기기에서 열려서 여기서는 멈췄습니다.","join_ended_pad_lost":"PS5가 컨트롤러를 잃어서 게임에서 나왔습니다. {host} 님에게 다시 들여보내 달라고 하세요.","join_ended_gave_up":"{host} 님과의 연결이 제때 돌아오지 않았어요.","join_net_lost":"{host}와의 연결이 끊겼어요. 인터넷 연결을 확인한 다음 다시 요청하세요.","join_ended_lost":"{host} 님에게 연결할 수 없어요. 같은 네트워크에 있는지 확인하세요.","join_ended_left":"게임에서 나왔어요.","join_net_mismatch":"이 링크는 호스트와 일치하지 않아요. 새 링크를 요청하세요.","join_net_no_direct":"이 네트워크에서는 직접 연결할 수 없어요(양쪽 공유기가 모두 엄격해요). 모바일 데이터 대신 Wi-Fi를 쓰거나 호스트에게 UPnP를 켜 달라고 하세요.","join_net_no_room":"이 초대는 더 이상 열려 있지 않아요. {host} 님에게 새 링크를 요청하세요.","join_net_full":"{host} 님의 게임에 지금은 친구가 더 들어갈 자리가 없어요. 잠시 후 다시 시도하세요.","join_net_no_hub":"PS5Upload 초대 서비스에 연결할 수 없어요. 인터넷 연결을 확인한 뒤 다시 시도하세요.","join_net_offer":"{host} 님의 컴퓨터가 이 브라우저에 연결하지 못했어요. 다른 브라우저를 써 보세요.","join_net_no_webrtc":"이 브라우저는 직접 연결을 할 수 없어요. 최신 Chrome, Safari 또는 Firefox를 써 보세요.","join_cancel":"취소","join_host_fallback":"친구","join_connecting":"{host} 님에게 연결 중…","join_waiting":"{host} 님이 허용하기를 기다리는 중","join_waiting_body":"{host} 님 화면에 내 이름이 보이고, 허용을 누르면 들어갈 수 있어요.","join_retry":"다시 시도","join_again":"다시 참여 요청","join_playing_at":"{host} 님의 PS5에서 플레이 중","join_you_are":"나는 플레이어 {n}","join_seat_stream":"{host} 님의 PS5 사용자로 플레이하고 있어요. 사용자를 고를 필요가 없어요.","join_plays_as":"{profile}(으)로 플레이하고 있어요. 고를 필요가 없어요.","join_seat_tv_asks":"{host} 님이 프로필을 골라 두었지만 쓸 수 없었어요. TV에서 누구인지 물어볼 거예요.","join_picking":"PS 버튼을 누른 다음 TV에서 빠른 플레이를 선택하세요","join_hide_controls":"숨기기","join_sound":"눌러서 소리 켜기","rp_unmute":"소리 켜기","rp_mute":"음소거","join_no_sound":"이 브라우저에서는 소리가 나오지 않습니다","join_exit_fullscreen":"전체 화면 종료","pad_fill":"전체 화면","join_leave":"나가기","join_show_controls":"컨트롤 표시","join_hold_hint":"화면을 길게 누르면 버튼이 표시됩니다","pad_watch_no_hevc":"이 기기는 이 스트림의 화면을 재생할 수 없습니다. 컴퓨터는 HEVC로 스트리밍하고 이 기기는 H.264만 재생합니다.","pad_watch_decode":"여기서 화면을 재생할 수 없었습니다.","join_pad_ready":"컨트롤러가 준비됐어요","join_check_unknown_short":"목록에 없음: 버튼이 뒤바뀌어 있을 수 있습니다.","join_full_to_play":"전체 화면을 탭하면 화면 컨트롤러로 플레이할 수 있어요.","join_pad_none":"컨트롤러를 연결(USB 또는 Bluetooth)하고 아무 버튼이나 누르세요.","join_pad_keys":"키보드로도 할 수 있어요: WASD 이동, 방향키 D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"버튼을 보려면 리모컨의 뒤로 버튼을 누르세요.","join_block_note":"{host} 님이 친구의 PS 및 Create 버튼을 막아 두었어요.","join_guide_title":"TV에서 한 단계만 더","join_guide_body":"컨트롤러의 PS 버튼을 한 번 누르세요. TV에 \"이 컨트롤러를 누가 사용하나요?\"가 나타나요. 빠른 플레이나 내 사용자를 선택하세요. 호스트는 아무것도 하지 않아도 돼요.","join_guide_menus":"PS5 홈 화면에서는 호스트만 메뉴를 조작할 수 있어요. 내 컨트롤러는 게임 안에서 플레이합니다.","join_guide_ok":"알겠어요","join_host_away":"호스트가 플레이를 멈췄어요 — 다시 시작하기를 기다리는 중 ({time})","join_reconnecting":"다시 연결 중…","join_reconnecting_left":"{time} 동안 자리가 유지돼요.","pad_turn":"휴대폰을 가로로 돌리세요","join_game_label":"{host} 님의 게임","join_title":"친구 게임에 참여","join_title_body":"{host} 님의 PS5에서 플레이어 2, 3, 4로 플레이하세요.","join_name_label":"내 이름","join_name_hint":"참여를 요청하면 친구에게 이 이름이 보여요.","join_button":"참여"},"pl":{"usb_skipped_not_payload":"{name}: to nie jest plik .elf ani .bin","usb_skipped_unknown":"{id}: nie ma już na liście payloadów","browser_unsupported":"To wymaga aplikacji na komputer. W przeglądarce nie działa.","video_recovered_notice":"Ostatnio Play zawiesił się przy uruchamianiu obrazu, więc obraz jest teraz dekodowany bez karty graficznej (zmień w Ustawienia › Okno › Grafika › Sprzętowe dekodowanie wideo).","video_recovered_title":"Obraz jest teraz dekodowany programowo","open_in_title":"Otworzyć w aplikacji PS5Upload?","open_in_body":"Masz aplikację PS5Upload na tym urządzeniu? Otwórz to w niej albo kontynuuj w przeglądarce.","open_in_app":"Otwórz w aplikacji","open_in_browser":"Kontynuuj w przeglądarce","open_in_remember":"Zapamiętaj mój wybór na tym urządzeniu","open_in_opening":"Otwieranie aplikacji PS5Upload…","open_in_not_opened":"Nic się nie stało? Aplikacji może nie być na tym urządzeniu.","open_in_again":"Spróbuj ponownie","pad_8bitdo_no_xinput":"Ten 8BitDo nie ma trybu X-input. Jeśli któryś przycisk działa źle, sprawdź kontroler.","pad_8bitdo_how_switch":"ustaw przełącznik z tyłu na X, a potem naciśnij Start","pad_8bitdo_how_startx":"wyłącz go, a potem przytrzymaj Start + X, aby go włączyć","pad_8bitdo_how_receiver":"użyj jego odbiornika 2.4G lub kabla USB","pad_8bitdo_how_manual":"instrukcja podaje, jak to zrobić","pad_8bitdo_xinput":"Aby działał najlepiej, przełącz 8BitDo w tryb X-input: {how}.","rp_touch_left_stick":"Lewa gałka","rp_touch_right_stick":"Prawa gałka","rp_touch_touchpad":"Panel dotykowy","rp_pad_step_lx":"Wychyl lewą gałkę w prawo","rp_pad_step_ly":"Wychyl lewą gałkę w dół","rp_pad_step_rx":"Wychyl prawą gałkę w prawo","rp_pad_step_ry":"Wychyl prawą gałkę w dół","join_check_bottom":"Naciśnij dolny przycisk (✕)","join_check_right":"Naciśnij prawy przycisk (○)","join_check_left":"Naciśnij lewy przycisk (□)","join_check_top":"Naciśnij górny przycisk (△)","rp_pad_press":"Naciśnij {name}","join_check_saved":"Zapisano dla tego kontrolera na tym urządzeniu. Wypróbuj poniżej.","join_check_title":"Sprawdź kontroler","join_done":"Gotowe","rp_pads_none":"Nie wykryto jeszcze kontrolera. Podłącz go i naciśnij dowolny przycisk.","rp_pad_mapped":"Gra z twoim mapowaniem","join_check_unknown":"Tego kontrolera nie ma na naszej liście, więc przyciski mogą być pomieszane. Konfiguracja zajmuje kilka sekund.","rp_pad_standard":"Rozpoznany","rp_pad_progress":"{n} z {total}","rp_pad_skip":"Pomiń","rp_pad_back":"Wstecz","rp_pad_cancel":"Anuluj","join_check_try":"Naciskaj przyciski i ruszaj gałkami: to, co naciśniesz, się podświetli.","join_check_redo":"Powtórz","join_check_map":"Ustaw przyciski","rp_pad_reset":"Resetuj","join_open_lan_body":"Brak internetu? Jeśli jesteś w tej samej sieci Wi-Fi co znajomy, otwórz grę tam.","join_open_lan":"Otwórz w tej sieci Wi-Fi","join_path_lan":"Sieć domowa","join_seat_taken":"{host} potrzebował z powrotem swojego kontrolera, a na PS5 nie było innego wolnego kontrolera, więc wypadasz z gry. Poproś {host}, żeby wpuścił Cię ponownie.","join_refused_key":"To zaproszenie wygasło. Poproś {host} o nowy link.","join_refused_expired":"Twoje miejsce w grze przepadło. Poproś {host} o ponowne wpuszczenie.","join_refused_full":"Brak miejsc: gra już czterech graczy.","join_refused_denied":"{host} tym razem cię nie wpuścił.","join_refused_no_answer":"{host}: brak odpowiedzi na czas. Daj znać ({host}) i spróbuj ponownie.","join_refused_closed":"{host} nie prowadzi teraz Graj razem.","join_refused_old_helper":"PS5 {host} potrzebuje zaktualizowanego pomocnika do Graj razem.","join_refused_not_playing":"{host} teraz nie gra. Poproś {host}, żeby najpierw uruchomił Graj.","join_refused_unreachable":"Komputer {host} nie mógł połączyć się z PS5. Spróbuj ponownie za chwilę.","join_refused_slow_down":"Zbyt wiele błędnych kodów. Odczekaj minutę i spróbuj ponownie.","join_refused_address":"Adres tego linku jest poza Twoją siecią domową, więc aplikacja go nie użyje. Poproś {host} o link z adresem IP komputera.","join_refused_other":"{host} cię nie wpuścił.","join_ended_kicked":"{host} usunął cię z gry.","join_ended_closed":"{host} zamknął Graj razem.","join_ended_host_stopped":"Gospodarz przestał grać.","join_ended_replaced":"Tę grę otwarto w innej karcie lub na innym urządzeniu, więc tu się zatrzymała.","join_ended_pad_lost":"PS5 straciła Twój kontroler, więc wypadasz z gry. Poproś {host} o ponowne wpuszczenie.","join_ended_gave_up":"Połączenie z {host} nie wróciło na czas.","join_net_lost":"Połączenie z {host} zostało przerwane. Sprawdź połączenie internetowe i poproś ponownie.","join_ended_lost":"Nie można połączyć się z {host}. Sprawdź, czy jesteście w tej samej sieci.","join_ended_left":"Opuściłeś grę.","join_net_mismatch":"Ten link nie pasuje do gospodarza; poproś go o nowy.","join_net_no_direct":"Z tej sieci nie da się nawiązać bezpośredniego połączenia (routery po obu stronach są restrykcyjne). Spróbuj Wi-Fi zamiast danych komórkowych albo poproś gospodarza o włączenie UPnP.","join_net_no_room":"To zaproszenie nie jest już otwarte. Poproś {host} o nowy link.","join_net_full":"W grze {host} nie ma teraz miejsca dla kolejnego znajomego. Spróbuj ponownie za chwilę.","join_net_no_hub":"Nie można połączyć się z usługą zaproszeń PS5Upload. Sprawdź połączenie z internetem i spróbuj ponownie.","join_net_offer":"Komputer {host} nie mógł połączyć się z tą przeglądarką. Spróbuj innej przeglądarki.","join_net_no_webrtc":"Ta przeglądarka nie potrafi nawiązywać bezpośrednich połączeń. Spróbuj aktualnego Chrome, Safari lub Firefoksa.","join_cancel":"Anuluj","join_host_fallback":"twój znajomy","join_connecting":"Łączenie z {host}…","join_waiting":"Czekasz, aż {host} cię wpuści","join_waiting_body":"{host} widzi twoje imię na ekranie i stuka Zezwól.","join_retry":"Spróbuj ponownie","join_again":"Poproś ponownie o dołączenie","join_playing_at":"Grasz u {host}","join_you_are":"Jesteś Graczem {n}","join_seat_stream":"Grasz jako użytkownik PS5 gospodarza {host}. Nie musisz nikogo wybierać.","join_plays_as":"Grasz jako {profile}. Nie musisz niczego wybierać.","join_seat_tv_asks":"{host} wybrał dla ciebie profil, ale nie dało się go użyć. Telewizor zapyta, kim jesteś.","join_picking":"Naciśnij PS, a potem wybierz Szybką grę na telewizorze","join_hide_controls":"Ukryj","join_sound":"Włącz dźwięk","rp_unmute":"Dźwięk wł.","rp_mute":"Wycisz","join_no_sound":"Brak dźwięku w tej przeglądarce","join_exit_fullscreen":"Wyjdź z pełnego ekranu","pad_fill":"Pełny ekran","join_leave":"Wyjdź","join_show_controls":"Pokaż przyciski","join_hold_hint":"Przytrzymaj obraz, aby pokazać przyciski","pad_watch_no_hevc":"To urządzenie nie odtworzy obrazu tego streamu: komputer nadaje w HEVC, a to urządzenie odtwarza tylko H.264.","pad_watch_decode":"Nie udało się tu odtworzyć obrazu.","join_pad_ready":"Twój kontroler jest gotowy","join_check_unknown_short":"Nie ma go na liście: przyciski mogą być pomieszane.","join_full_to_play":"Stuknij Pełny ekran, aby grać kontrolerem ekranowym.","join_pad_none":"Podłącz kontroler (USB lub Bluetooth) i naciśnij dowolny przycisk.","join_pad_keys":"Albo użyj klawiatury: WASD ruch, strzałki krzyżak, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Naciśnij Wstecz na pilocie, aby pokazać przyciski.","join_block_note":"{host} wyłączył PS i Create dla znajomych.","join_guide_title":"Jeszcze jeden krok na telewizorze","join_guide_body":"Naciśnij raz PS na kontrolerze. Telewizor zapyta „Kto używa tego kontrolera?”. Wybierz Szybką grę albo swojego użytkownika. Gospodarz nie musi nic robić.","join_guide_menus":"Na ekranie głównym PS5 menu steruje tylko gospodarz; twój kontroler działa w grach.","join_guide_ok":"Rozumiem","join_host_away":"Gospodarz przestał grać — czekamy, aż zacznie znowu ({time})","join_reconnecting":"Ponowne łączenie…","join_reconnecting_left":"Twoje miejsce czeka jeszcze {time}.","pad_turn":"Obróć telefon poziomo","join_game_label":"Gra {host}","join_title":"Dołącz do gry znajomego","join_title_body":"Graj na PS5 {host} jako Gracz 2, 3 lub 4.","join_name_label":"Twoje imię","join_name_hint":"Znajomy zobaczy je, gdy poprosisz o dołączenie.","join_button":"Dołącz"},"pt-BR":{"usb_skipped_not_payload":"{name}: não é um arquivo .elf ou .bin","usb_skipped_unknown":"{id}: não está mais na lista de payloads","browser_unsupported":"Isso precisa do aplicativo para desktop. Não funciona no navegador.","video_recovered_notice":"O Play travou ao iniciar a imagem da última vez, então a imagem agora é decodificada sem a placa de vídeo (altere em Configurações › Janela › Gráficos › Decodificação de vídeo por hardware).","video_recovered_title":"Imagem agora decodificada por software","open_in_title":"Abrir no app PS5Upload?","open_in_body":"Tem o app PS5Upload neste aparelho? Abra por ele ou continue no navegador.","open_in_app":"Abrir no app","open_in_browser":"Continuar no navegador","open_in_remember":"Lembrar minha escolha neste aparelho","open_in_opening":"Abrindo o app PS5Upload…","open_in_not_opened":"Nada aconteceu? Talvez o app não esteja neste aparelho.","open_in_again":"Tentar de novo","pad_8bitdo_no_xinput":"Este 8BitDo não tem modo X-input. Se algum botão estiver errado, verifique o controle.","pad_8bitdo_how_switch":"coloque a chave de trás em X e aperte Start","pad_8bitdo_how_startx":"desligue e depois segure Start + X para ligar","pad_8bitdo_how_receiver":"use o receptor 2.4G dele ou um cabo USB","pad_8bitdo_how_manual":"o manual dele explica como","pad_8bitdo_xinput":"Para o melhor resultado, coloque seu 8BitDo no modo X-input: {how}.","rp_touch_left_stick":"Analógico esquerdo","rp_touch_right_stick":"Analógico direito","rp_pad_step_lx":"Mova o analógico esquerdo para a direita","rp_pad_step_ly":"Mova o analógico esquerdo para baixo","rp_pad_step_rx":"Mova o analógico direito para a direita","rp_pad_step_ry":"Mova o analógico direito para baixo","join_check_bottom":"Aperte o botão de baixo (✕)","join_check_right":"Aperte o botão da direita (○)","join_check_left":"Aperte o botão da esquerda (□)","join_check_top":"Aperte o botão de cima (△)","rp_pad_press":"Pressione {name}","join_check_saved":"Salvo para este controle neste aparelho. Teste abaixo.","join_check_title":"Verificar seu controle","join_done":"Concluído","rp_pads_none":"Nenhum controle detectado ainda. Conecte um e pressione qualquer botão nele.","rp_pad_mapped":"Joga com o seu mapeamento","join_check_unknown":"Este controle não está na nossa lista, então os botões podem estar trocados. Configurar leva poucos segundos.","rp_pad_standard":"Reconhecido","rp_pad_progress":"{n} de {total}","rp_pad_skip":"Pular","rp_pad_back":"Voltar","rp_pad_cancel":"Cancelar","join_check_try":"Aperte botões e mova os analógicos: o que você apertar acende.","join_check_redo":"Refazer","join_check_map":"Configurar os botões","rp_pad_reset":"Redefinir","join_open_lan_body":"Sem internet? Se você está no mesmo Wi-Fi que seu amigo, abra o jogo por lá.","join_open_lan":"Abrir neste Wi-Fi","join_path_lan":"Rede doméstica","join_seat_taken":"{host} precisou do controle de volta e não havia outro controle livre no PS5, então você saiu do jogo. Peça para {host} deixar você entrar de novo.","join_refused_key":"Este convite expirou. Peça um novo link a {host}.","join_refused_expired":"Seu lugar no jogo foi perdido. Peça a {host} para deixar você entrar de novo.","join_refused_full":"O jogo está cheio: já tem quatro jogadores.","join_refused_denied":"{host} não deixou você entrar desta vez.","join_refused_no_answer":"{host} não respondeu a tempo. Avise {host} e tente de novo.","join_refused_closed":"{host} não está com o Jogar juntos aberto agora.","join_refused_old_helper":"O PS5 de {host} precisa de um auxiliar atualizado para o Jogar juntos.","join_refused_not_playing":"{host} não está jogando agora. Peça para {host} iniciar o Jogar primeiro.","join_refused_unreachable":"O computador de {host} não conseguiu acessar o PS5. Tente de novo daqui a pouco.","join_refused_slow_down":"Muitos códigos errados. Espere um minuto e tente de novo.","join_refused_address":"O endereço deste link está fora da sua rede doméstica, então o aplicativo não vai usá-lo. Peça a {host} um link com o endereço IP do computador.","join_refused_other":"{host} não deixou você entrar.","join_ended_kicked":"{host} tirou você do jogo.","join_ended_closed":"{host} fechou o Jogar juntos.","join_ended_host_stopped":"O anfitrião parou de jogar.","join_ended_replaced":"Este jogo foi aberto em outra aba ou em outro dispositivo, então parou aqui.","join_ended_pad_lost":"O PS5 perdeu seu controle, então você saiu do jogo. Peça a {host} para deixar você entrar de novo.","join_ended_gave_up":"A conexão com {host} não voltou a tempo.","join_net_lost":"A conexão com {host} caiu. Verifique sua conexão de internet e peça de novo.","join_ended_lost":"Não foi possível alcançar {host}. Verifique se vocês estão na mesma rede.","join_ended_left":"Você saiu do jogo.","join_net_mismatch":"Este link não corresponde ao anfitrião; peça um novo a ele.","join_net_no_direct":"Não é possível uma conexão direta a partir desta rede (os roteadores dos dois lados são restritos). Tente o Wi-Fi em vez dos dados móveis ou peça ao anfitrião para ativar o UPnP.","join_net_no_room":"Este convite não está mais aberto. Peça a {host} um novo link.","join_net_full":"O jogo de {host} não tem lugar para mais um amigo agora. Tente de novo daqui a pouco.","join_net_no_hub":"Não foi possível alcançar o serviço de convites do PS5Upload. Verifique sua conexão com a internet e tente de novo.","join_net_offer":"O computador de {host} não conseguiu se conectar a este navegador. Tente outro navegador.","join_net_no_webrtc":"Este navegador não consegue fazer conexões diretas. Tente uma versão recente do Chrome, Safari ou Firefox.","join_cancel":"Cancelar","join_host_fallback":"seu amigo","join_connecting":"Conectando a {host}…","join_waiting":"Esperando {host} deixar você entrar","join_waiting_body":"{host} vê seu nome na tela e toca em Permitir.","join_retry":"Tentar de novo","join_again":"Pedir para entrar de novo","join_playing_at":"Jogando na casa de {host}","join_you_are":"Você é o Jogador {n}","join_seat_stream":"Você está jogando com o usuário do PS5 de {host}. Não precisa escolher um.","join_plays_as":"Você está jogando como {profile}. Não precisa escolher.","join_seat_tv_asks":"{host} escolheu um perfil para você, mas não foi possível usá-lo. A TV vai perguntar quem você é.","join_picking":"Aperte PS e depois escolha Jogo rápido na TV","join_hide_controls":"Ocultar","join_sound":"Ativar som","rp_unmute":"Ativar som","rp_mute":"Silenciar","join_no_sound":"Sem som neste navegador","join_exit_fullscreen":"Sair da tela cheia","pad_fill":"Tela cheia","join_leave":"Sair","join_show_controls":"Mostrar controles","join_hold_hint":"Toque e segure a imagem para mostrar os botões","pad_watch_no_hevc":"Este aparelho não reproduz a imagem deste stream: o computador transmite em HEVC e este aparelho reproduz apenas H.264.","pad_watch_decode":"Não foi possível reproduzir a imagem aqui.","join_pad_ready":"Seu controle está pronto","join_check_unknown_short":"Não está na nossa lista: os botões podem estar trocados.","join_full_to_play":"Toque em tela cheia para jogar com o controle na tela.","join_pad_none":"Conecte um controle (USB ou Bluetooth) e aperte qualquer botão.","join_pad_keys":"Ou use o teclado: WASD move, setas direcional, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Aperte Voltar no controle remoto para ver os botões.","join_block_note":"{host} desativou PS e Create para amigos.","join_guide_title":"Mais um passo na TV","join_guide_body":"Aperte PS uma vez no seu controle. A TV pergunta \"Quem está usando este controle?\". Escolha Jogo rápido ou o seu próprio usuário. O anfitrião não precisa fazer nada.","join_guide_menus":"Na tela inicial do PS5 só o anfitrião controla os menus; seu controle joga dentro dos jogos.","join_guide_ok":"Entendi","join_host_away":"O anfitrião parou de jogar — esperando ele começar de novo ({time})","join_reconnecting":"Reconectando…","join_reconnecting_left":"Seu lugar fica guardado por {time}.","pad_turn":"Vire o celular na horizontal","join_game_label":"Jogo de {host}","join_title":"Entrar no jogo de um amigo","join_title_body":"Jogue no PS5 de {host} como Jogador 2, 3 ou 4.","join_name_label":"Seu nome","join_name_hint":"Seu amigo vê isto quando você pede para entrar.","join_button":"Entrar"},"ru":{"usb_skipped_not_payload":"{name}: не файл .elf или .bin","usb_skipped_unknown":"{id}: больше нет в списке пейлоадов","browser_unsupported":"Для этого нужно настольное приложение. В браузере это не работает.","video_recovered_notice":"В прошлый раз Play упал при запуске картинки, поэтому теперь картинка декодируется без видеокарты (изменить: Настройки › Окно › Графика › Аппаратное декодирование видео).","video_recovered_title":"Картинка теперь декодируется программно","open_in_title":"Открыть в приложении PS5Upload?","open_in_body":"Приложение PS5Upload есть на этом устройстве? Откройте это там или продолжите в браузере.","open_in_app":"Открыть в приложении","open_in_browser":"Продолжить в браузере","open_in_remember":"Запомнить выбор на этом устройстве","open_in_opening":"Открываем приложение PS5Upload…","open_in_not_opened":"Ничего не произошло? Возможно, приложения нет на этом устройстве.","open_in_again":"Повторить","pad_8bitdo_no_xinput":"У этого 8BitDo нет режима X-input. Если кнопка срабатывает не так, проверьте контроллер.","pad_8bitdo_how_switch":"переведите переключатель сзади в положение X, затем нажмите Start","pad_8bitdo_how_startx":"выключите его, затем включите, удерживая Start + X","pad_8bitdo_how_receiver":"используйте его приёмник 2.4G или кабель USB","pad_8bitdo_how_manual":"как это сделать, сказано в его инструкции","pad_8bitdo_xinput":"Для лучшего результата переключите 8BitDo в режим X-input: {how}.","rp_touch_left_stick":"Левый стик","rp_touch_right_stick":"Правый стик","rp_touch_touchpad":"Сенсорная панель","rp_menu":"Меню","rp_pad_step_lx":"Отклоните левый стик вправо","rp_pad_step_ly":"Отклоните левый стик вниз","rp_pad_step_rx":"Отклоните правый стик вправо","rp_pad_step_ry":"Отклоните правый стик вниз","join_check_bottom":"Нажмите нижнюю кнопку (✕)","join_check_right":"Нажмите правую кнопку (○)","join_check_left":"Нажмите левую кнопку (□)","join_check_top":"Нажмите верхнюю кнопку (△)","rp_pad_press":"Нажмите {name}","join_check_saved":"Сохранено для этого контроллера на этом устройстве. Попробуйте ниже.","join_check_title":"Проверить контроллер","join_done":"Готово","rp_pads_none":"Контроллер пока не найден. Подключите его и нажмите любую кнопку.","rp_pad_mapped":"Играет с вашей раскладкой","join_check_unknown":"Этого контроллера нет в нашем списке, поэтому кнопки могут быть перепутаны. Настройка займёт несколько секунд.","rp_pad_standard":"Распознан","rp_pad_progress":"{n} из {total}","rp_pad_skip":"Пропустить","rp_pad_back":"Назад","rp_pad_cancel":"Отмена","join_check_try":"Нажимайте кнопки и двигайте стики: нажатое подсвечивается.","join_check_redo":"Заново","join_check_map":"Настроить кнопки","rp_pad_reset":"Сбросить","join_open_lan_body":"Нет доступа к интернету? Если вы в той же сети Wi-Fi, что и друг, откройте игру там.","join_open_lan":"Открыть в этой сети Wi-Fi","join_path_lan":"Домашняя сеть","join_path_internet":"Интернет","join_seat_taken":"{host} понадобился его контроллер, а других свободных контроллеров на PS5 не было, поэтому вы вышли из игры. Попросите {host} впустить вас снова.","join_refused_key":"Срок приглашения истёк. Попросите у {host} новую ссылку.","join_refused_expired":"Ваше место в игре потеряно. Попросите {host} впустить вас снова.","join_refused_full":"Мест нет: уже играют четверо.","join_refused_denied":"{host} в этот раз вас не впустил.","join_refused_no_answer":"{host} не ответил вовремя. Сообщите {host} и попробуйте ещё раз.","join_refused_closed":"{host} сейчас не проводит «Совместную игру».","join_refused_old_helper":"Для «Совместной игры» на PS5 {host} нужен обновлённый помощник.","join_refused_not_playing":"{host} сейчас не играет. Попросите {host} сначала запустить Игру.","join_refused_unreachable":"Компьютер {host} не смог связаться с PS5. Попробуйте ещё раз чуть позже.","join_refused_slow_down":"Слишком много неверных кодов. Подождите минуту и попробуйте снова.","join_refused_address":"Адрес этой ссылки находится вне вашей домашней сети, поэтому приложение его не использует. Попросите {host} дать ссылку с IP-адресом компьютера.","join_refused_other":"{host} вас не впустил.","join_ended_kicked":"{host} убрал вас из игры.","join_ended_closed":"{host} закрыл «Совместную игру».","join_ended_host_stopped":"Хост перестал играть.","join_ended_replaced":"Эту игру открыли в другой вкладке или на другом устройстве, поэтому здесь она остановилась.","join_ended_pad_lost":"PS5 потеряла ваш контроллер, поэтому вы вышли из игры. Попросите {host} впустить вас снова.","join_ended_gave_up":"Соединение с {host} не восстановилось вовремя.","join_net_lost":"Соединение с {host} прервалось. Проверьте подключение к интернету и попросите ещё раз.","join_ended_lost":"Не удалось связаться с {host}. Проверьте, что вы в одной сети.","join_ended_left":"Вы вышли из игры.","join_net_mismatch":"Эта ссылка не совпадает с хостом; попросите у него новую.","join_net_no_direct":"Из этой сети прямое подключение невозможно (роутеры с обеих сторон строгие). Попробуйте Wi-Fi вместо мобильного интернета или попросите хоста включить UPnP.","join_net_no_room":"Это приглашение больше не действует. Попросите у {host} новую ссылку.","join_net_full":"В игре {host} сейчас нет места для ещё одного друга. Попробуйте чуть позже.","join_net_no_hub":"Не удалось связаться со службой приглашений PS5Upload. Проверьте подключение к интернету и попробуйте снова.","join_net_offer":"Компьютер {host} не смог подключиться к этому браузеру. Попробуйте другой браузер.","join_net_no_webrtc":"Этот браузер не умеет устанавливать прямые подключения. Попробуйте свежую версию Chrome, Safari или Firefox.","join_cancel":"Отмена","join_host_fallback":"ваш друг","join_connecting":"Подключение к {host}…","join_waiting":"Ждём, пока {host} вас впустит","join_waiting_body":"{host} видит ваше имя на экране и нажимает «Разрешить».","join_retry":"Повторить","join_again":"Снова попроситься в игру","join_playing_at":"Игра у {host}","join_you_are":"Вы — Игрок {n}","join_seat_stream":"Вы играете под пользователем PS5 хоста {host}. Выбирать пользователя не нужно.","join_plays_as":"Вы играете как {profile}. Выбирать никого не нужно.","join_seat_tv_asks":"{host} выбрал для вас профиль, но использовать его не удалось. Телевизор спросит, кто вы.","join_picking":"Нажмите PS, затем выберите «Быстрая игра» на телевизоре","join_hide_controls":"Скрыть","join_sound":"Включить звук","rp_unmute":"Включить звук","rp_mute":"Без звука","join_no_sound":"В этом браузере нет звука","join_exit_fullscreen":"Выйти из полноэкранного режима","pad_fill":"Во весь экран","join_leave":"Выйти","join_show_controls":"Показать кнопки","join_hold_hint":"Нажмите и удерживайте изображение, чтобы показать кнопки","pad_watch_no_hevc":"Это устройство не может показать картинку этой трансляции: компьютер передаёт HEVC, а устройство воспроизводит только H.264.","pad_watch_decode":"Картинку не удалось воспроизвести здесь.","join_pad_ready":"Ваш контроллер готов","join_check_unknown_short":"Нет в нашем списке: кнопки могут быть перепутаны.","join_full_to_play":"Нажмите «Во весь экран», чтобы играть с экранным контроллером.","join_pad_none":"Подключите контроллер (USB или Bluetooth) и нажмите любую кнопку.","join_pad_keys":"Или играйте с клавиатуры: WASD — движение, стрелки — крестовина, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Нажмите «Назад» на пульте, чтобы показать кнопки.","join_block_note":"{host} отключил PS и Create для друзей.","join_guide_title":"Ещё один шаг на телевизоре","join_guide_body":"Нажмите PS на контроллере один раз. Телевизор спросит «Кто использует этот контроллер?». Выберите «Быстрая игра» или своего пользователя. Хосту ничего делать не нужно.","join_guide_menus":"На главном экране PS5 меню управляет только хост; ваш контроллер работает внутри игр.","join_guide_ok":"Понятно","join_host_away":"Хост перестал играть — ждём, когда он начнёт снова ({time})","join_reconnecting":"Переподключение…","join_reconnecting_left":"Ваше место сохраняется ещё {time}.","pad_turn":"Поверните телефон горизонтально","join_game_label":"Игра {host}","join_title":"Присоединиться к игре друга","join_title_body":"Играйте на PS5 {host} как Игрок 2, 3 или 4.","join_name_label":"Ваше имя","join_name_hint":"Друг увидит его, когда вы попроситесь в игру.","join_button":"Войти"},"th":{"usb_skipped_not_payload":"{name}: ไม่ใช่ไฟล์ .elf หรือ .bin","usb_skipped_unknown":"{id}: ไม่อยู่ในรายการเพย์โหลดแล้ว","browser_unsupported":"ต้องใช้แอปเดสก์ท็อป ใช้ในเบราว์เซอร์ไม่ได้","video_recovered_notice":"ครั้งก่อนหน้าเล่นล่มขณะเริ่มภาพ ตอนนี้จึงถอดรหัสภาพโดยไม่ใช้การ์ดจอ (เปลี่ยนได้ที่ การตั้งค่า › หน้าต่าง › กราฟิก › ถอดรหัสวิดีโอด้วยฮาร์ดแวร์)","video_recovered_title":"ตอนนี้ถอดรหัสภาพด้วยซอฟต์แวร์","open_in_title":"เปิดในแอป PS5Upload ไหม","open_in_body":"มีแอป PS5Upload ในอุปกรณ์นี้ไหม เปิดในแอป หรือใช้ต่อในเบราว์เซอร์ก็ได้","open_in_app":"เปิดในแอป","open_in_browser":"ใช้ต่อในเบราว์เซอร์","open_in_remember":"จำตัวเลือกของฉันในอุปกรณ์นี้","open_in_opening":"กำลังเปิดแอป PS5Upload…","open_in_not_opened":"ไม่มีอะไรเกิดขึ้นใช่ไหม อุปกรณ์นี้อาจไม่มีแอป","open_in_again":"ลองอีกครั้ง","pad_8bitdo_no_xinput":"8BitDo รุ่นนี้ไม่มีโหมด X-input หากปุ่มใดทำงานผิด ให้ตรวจสอบคอนโทรลเลอร์","pad_8bitdo_how_switch":"เลื่อนสวิตช์ด้านหลังไปที่ X แล้วกด Start","pad_8bitdo_how_startx":"ปิดเครื่อง แล้วกด Start + X ค้างไว้เพื่อเปิด","pad_8bitdo_how_receiver":"ใช้ตัวรับสัญญาณ 2.4G หรือสาย USB","pad_8bitdo_how_manual":"ดูวิธีได้ในคู่มือ","pad_8bitdo_xinput":"เพื่อผลลัพธ์ที่ดีที่สุด ให้เปลี่ยน 8BitDo เป็นโหมด X-input: {how}","rp_touch_left_stick":"สติกซ้าย","rp_touch_right_stick":"สติกขวา","rp_touch_touchpad":"ทัชแพด","rp_menu":"เมนู","rp_pad_step_lx":"ดันอนาล็อกซ้ายไปทางขวา","rp_pad_step_ly":"ดันอนาล็อกซ้ายลง","rp_pad_step_rx":"ดันอนาล็อกขวาไปทางขวา","rp_pad_step_ry":"ดันอนาล็อกขวาลง","join_check_bottom":"กดปุ่มด้านล่าง (✕)","join_check_right":"กดปุ่มด้านขวา (○)","join_check_left":"กดปุ่มด้านซ้าย (□)","join_check_top":"กดปุ่มด้านบน (△)","rp_pad_press":"กด {name}","join_check_saved":"บันทึกสำหรับคอนโทรลเลอร์นี้บนอุปกรณ์นี้แล้ว ลองใช้ด้านล่าง","join_check_title":"ตรวจสอบคอนโทรลเลอร์","join_done":"เสร็จสิ้น","rp_pads_none":"ยังไม่พบคอนโทรลเลอร์ เชื่อมต่อแล้วกดปุ่มใดก็ได้บนคอนโทรลเลอร์","rp_pad_mapped":"เล่นตามการกำหนดปุ่มของคุณ","join_check_unknown":"คอนโทรลเลอร์นี้ไม่อยู่ในรายการของเรา ปุ่มจึงอาจสลับกัน การตั้งค่าใช้เวลาเพียงไม่กี่วินาที","rp_pad_standard":"รู้จักแล้ว","rp_pad_progress":"{n} จาก {total}","rp_pad_skip":"ข้าม","rp_pad_back":"ย้อนกลับ","rp_pad_cancel":"ยกเลิก","join_check_try":"กดปุ่มและขยับสติ๊ก: ปุ่มที่กดจะสว่างขึ้น","join_check_redo":"ทำใหม่","join_check_map":"ตั้งค่าปุ่ม","rp_pad_reset":"รีเซ็ต","join_open_lan_body":"เข้าอินเทอร์เน็ตไม่ได้? ถ้าคุณอยู่บน Wi-Fi เดียวกับเพื่อน ให้เปิดเกมที่นั่น","join_open_lan":"เปิดบน Wi-Fi นี้","join_path_lan":"เครือข่ายในบ้าน","join_path_internet":"อินเทอร์เน็ต","join_seat_taken":"{host} ต้องใช้คอนโทรลเลอร์ของตัวเองคืน และไม่มีคอนโทรลเลอร์อื่นว่างบน PS5 คุณจึงออกจากเกม ขอให้ {host} ให้คุณเข้าอีกครั้ง","join_refused_key":"คำเชิญนี้หมดอายุแล้ว ขอลิงก์ใหม่จาก {host}","join_refused_expired":"ที่ของคุณในเกมหายไปแล้ว ขอให้ {host} ให้เข้าใหม่","join_refused_full":"เกมเต็มแล้ว: มีผู้เล่นครบสี่คน","join_refused_denied":"{host} ไม่ได้ให้คุณเข้าในครั้งนี้","join_refused_no_answer":"{host} ไม่ตอบทันเวลา แจ้ง {host} แล้วลองอีกครั้ง","join_refused_closed":"ตอนนี้ {host} ไม่ได้เปิดเล่นด้วยกัน","join_refused_old_helper":"PS5 ของ {host} ต้องอัปเดตตัวช่วยเพื่อเล่นด้วยกัน","join_refused_not_playing":"ตอนนี้ {host} ไม่ได้เล่นอยู่ ขอให้ {host} เริ่มเล่นก่อน","join_refused_unreachable":"คอมพิวเตอร์ของ {host} เชื่อมต่อกับ PS5 ไม่ได้ ลองใหม่อีกครั้งในอีกสักครู่","join_refused_slow_down":"ใส่รหัสผิดหลายครั้งเกินไป รอหนึ่งนาทีแล้วลองใหม่","join_refused_address":"ที่อยู่ของลิงก์นี้อยู่นอกเครือข่ายภายในบ้าน แอปจึงไม่ใช้ ขอลิงก์ที่มีที่อยู่ IP ของคอมพิวเตอร์จาก {host}","join_refused_other":"{host} ไม่ได้ให้คุณเข้า","join_ended_kicked":"{host} นำคุณออกจากเกม","join_ended_closed":"{host} ปิดเล่นด้วยกันแล้ว","join_ended_host_stopped":"โฮสต์หยุดเล่นแล้ว","join_ended_replaced":"เกมนี้ถูกเปิดในแท็บอื่นหรืออุปกรณ์อื่น จึงหยุดที่นี่","join_ended_pad_lost":"PS5 ทำคอนโทรลเลอร์ของคุณหาย คุณจึงออกจากเกม ขอให้ {host} ให้เข้าใหม่","join_ended_gave_up":"การเชื่อมต่อกับ {host} ไม่กลับมาทันเวลา","join_net_lost":"การเชื่อมต่อกับ {host} หลุด ตรวจสอบการเชื่อมต่ออินเทอร์เน็ต แล้วขอเข้าร่วมอีกครั้ง","join_ended_lost":"ติดต่อ {host} ไม่ได้ ตรวจสอบว่าอยู่ในเครือข่ายเดียวกัน","join_ended_left":"คุณออกจากเกมแล้ว","join_net_mismatch":"ลิงก์นี้ไม่ตรงกับโฮสต์ ขอลิงก์ใหม่จากเขา","join_net_no_direct":"เชื่อมต่อโดยตรงจากเครือข่ายนี้ไม่ได้ (เราเตอร์ทั้งสองฝั่งเข้มงวด) ลองใช้ Wi-Fi แทนเน็ตมือถือ หรือขอให้โฮสต์เปิด UPnP","join_net_no_room":"คำเชิญนี้ปิดไปแล้ว ขอลิงก์ใหม่จาก {host}","join_net_full":"เกมของ {host} ไม่มีที่ว่างสำหรับเพื่อนเพิ่มในตอนนี้ ลองใหม่อีกสักครู่","join_net_no_hub":"ติดต่อบริการคำเชิญของ PS5Upload ไม่ได้ ตรวจสอบการเชื่อมต่ออินเทอร์เน็ตแล้วลองใหม่","join_net_offer":"คอมพิวเตอร์ของ {host} เชื่อมต่อกับเบราว์เซอร์นี้ไม่ได้ ลองเบราว์เซอร์อื่น","join_net_no_webrtc":"เบราว์เซอร์นี้เชื่อมต่อโดยตรงไม่ได้ ลองใช้ Chrome, Safari หรือ Firefox เวอร์ชันล่าสุด","join_cancel":"ยกเลิก","join_host_fallback":"เพื่อนของคุณ","join_connecting":"กำลังเชื่อมต่อกับ {host}…","join_waiting":"กำลังรอ {host} ให้คุณเข้า","join_waiting_body":"{host} จะเห็นชื่อคุณบนหน้าจอและแตะอนุญาต","join_retry":"ลองอีกครั้ง","join_again":"ขอเข้าร่วมอีกครั้ง","join_playing_at":"กำลังเล่นที่บ้าน {host}","join_you_are":"คุณคือผู้เล่น {n}","join_seat_stream":"คุณกำลังเล่นด้วยผู้ใช้ PS5 ของ {host} ไม่ต้องเลือกผู้ใช้","join_plays_as":"คุณกำลังเล่นในนาม {profile} ไม่ต้องเลือกอะไร","join_seat_tv_asks":"{host} เลือกโปรไฟล์ไว้ให้คุณ แต่ใช้ไม่ได้ ทีวีจะถามว่าคุณเป็นใคร","join_picking":"กด PS แล้วเลือกเล่นด่วนบนทีวี","join_hide_controls":"ซ่อน","join_sound":"แตะเพื่อเปิดเสียง","rp_unmute":"เปิดเสียง","rp_mute":"ปิดเสียง","join_no_sound":"เบราว์เซอร์นี้ไม่มีเสียง","join_exit_fullscreen":"ออกจากเต็มจอ","pad_fill":"เต็มจอ","join_leave":"ออก","join_show_controls":"แสดงปุ่มควบคุม","join_hold_hint":"กดค้างที่ภาพเพื่อแสดงปุ่ม","pad_watch_no_hevc":"อุปกรณ์นี้เล่นภาพของสตรีมนี้ไม่ได้: คอมพิวเตอร์สตรีมเป็น HEVC แต่อุปกรณ์นี้เล่นได้แค่ H.264","pad_watch_decode":"เล่นภาพที่นี่ไม่ได้","join_pad_ready":"คอนโทรลเลอร์ของคุณพร้อมแล้ว","join_check_unknown_short":"ไม่อยู่ในรายการ: ปุ่มอาจสลับกัน","join_full_to_play":"แตะเต็มหน้าจอเพื่อเล่นด้วยคอนโทรลเลอร์บนหน้าจอ","join_pad_none":"เชื่อมต่อคอนโทรลเลอร์ (USB หรือ Bluetooth) แล้วกดปุ่มใดก็ได้","join_pad_keys":"หรือใช้คีย์บอร์ด: WASD เคลื่อนที่, ลูกศร D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options","join_tv_back_hint":"กดปุ่มย้อนกลับบนรีโมตเพื่อแสดงปุ่ม","join_block_note":"{host} ปิดปุ่ม PS และ Create สำหรับเพื่อน","join_guide_title":"อีกขั้นตอนเดียวบนทีวี","join_guide_body":"กด PS บนคอนโทรลเลอร์หนึ่งครั้ง ทีวีจะถามว่า \"ใครกำลังใช้คอนโทรลเลอร์นี้?\" เลือกเล่นด่วนหรือผู้ใช้ของคุณเอง เจ้าของเกมไม่ต้องทำอะไร","join_guide_menus":"บนหน้าจอหลักของ PS5 มีแค่โฮสต์ที่ควบคุมเมนูได้ คอนโทรลเลอร์ของคุณใช้เล่นในเกม","join_guide_ok":"เข้าใจแล้ว","join_host_away":"โฮสต์หยุดเล่นแล้ว — กำลังรอให้เริ่มเล่นอีกครั้ง ({time})","join_reconnecting":"กำลังเชื่อมต่อใหม่…","join_reconnecting_left":"ที่ของคุณจะถูกเก็บไว้ {time}","pad_turn":"หมุนมือถือเป็นแนวนอน","join_game_label":"เกมของ {host}","join_title":"เข้าร่วมเกมของเพื่อน","join_title_body":"เล่นบน PS5 ของ {host} เป็นผู้เล่น 2, 3 หรือ 4","join_name_label":"ชื่อของคุณ","join_name_hint":"เพื่อนจะเห็นชื่อนี้เมื่อคุณขอเข้าร่วม","join_button":"เข้าร่วม"},"tr":{"usb_skipped_not_payload":"{name}: .elf veya .bin dosyası değil","usb_skipped_unknown":"{id}: artık payload listesinde değil","browser_unsupported":"Bunun için masaüstü uygulaması gerekir. Tarayıcıda çalışmaz.","video_recovered_notice":"Play geçen sefer görüntüyü başlatırken çöktü, bu yüzden görüntü artık ekran kartı olmadan çözülüyor (değiştirmek için Ayarlar › Pencere › Grafik › Donanımsal video çözme).","video_recovered_title":"Görüntü artık yazılımla çözülüyor","open_in_title":"PS5Upload uygulamasında açılsın mı?","open_in_body":"Bu cihazda PS5Upload uygulaması var mı? Bunu orada aç ya da tarayıcıda devam et.","open_in_app":"Uygulamada aç","open_in_browser":"Tarayıcıda devam et","open_in_remember":"Bu cihazda seçimimi hatırla","open_in_opening":"PS5Upload uygulaması açılıyor…","open_in_not_opened":"Bir şey olmadı mı? Uygulama bu cihazda olmayabilir.","open_in_again":"Tekrar dene","pad_8bitdo_no_xinput":"Bu 8BitDo'nun X-input modu yok. Bir tuş yanlışsa kumandayı kontrol et.","pad_8bitdo_how_switch":"arkadaki düğmeyi X'e getir, sonra Start'a bas","pad_8bitdo_how_startx":"kapat, sonra açmak için Start + X'e basılı tut","pad_8bitdo_how_receiver":"2.4G alıcısını ya da bir USB kablosu kullan","pad_8bitdo_how_manual":"nasıl yapılacağı kılavuzunda yazıyor","pad_8bitdo_xinput":"En iyi sonuç için 8BitDo'nu X-input moduna al: {how}.","rp_touch_left_stick":"Sol çubuk","rp_touch_right_stick":"Sağ çubuk","rp_touch_touchpad":"Dokunmatik yüzey","rp_menu":"Menü","rp_pad_step_lx":"Sol çubuğu sağa itin","rp_pad_step_ly":"Sol çubuğu aşağı itin","rp_pad_step_rx":"Sağ çubuğu sağa itin","rp_pad_step_ry":"Sağ çubuğu aşağı itin","join_check_bottom":"Alttaki yüz tuşuna bas (✕)","join_check_right":"Sağdaki yüz tuşuna bas (○)","join_check_left":"Soldaki yüz tuşuna bas (□)","join_check_top":"Üstteki yüz tuşuna bas (△)","rp_pad_press":"{name} tuşuna basın","join_check_saved":"Bu cihazda bu kumanda için kaydedildi. Aşağıda dene.","join_check_title":"Kumandanı kontrol et","join_done":"Tamam","rp_pads_none":"Henüz kumanda görülmedi. Bir tane bağlayın ve herhangi bir tuşuna basın.","rp_pad_mapped":"Sizin eşlemenizle oynuyor","join_check_unknown":"Bu kumanda listemizde yok, bu yüzden tuşları karışık olabilir. Ayarlamak birkaç saniye sürer.","rp_pad_standard":"Tanındı","rp_pad_progress":"{n} / {total}","rp_pad_skip":"Atla","rp_pad_back":"Geri","rp_pad_cancel":"İptal","join_check_try":"Tuşlara bas ve çubukları oynat: bastığın şey yanar.","join_check_redo":"Yeniden yap","join_check_map":"Tuşları ayarla","rp_pad_reset":"Sıfırla","join_open_lan_body":"İnternete ulaşamıyor musun? Arkadaşınla aynı Wi-Fi'daysan oyunu orada aç.","join_open_lan":"Bu Wi-Fi'da aç","join_path_lan":"Ev ağı","join_path_internet":"İnternet","join_seat_taken":"{host} kumandasını geri istedi ve PS5'te boş başka kumanda yoktu, bu yüzden oyundan çıktın. {host} adlı kişiden seni tekrar almasını iste.","join_refused_key":"Bu davetin süresi doldu. {host} kullanıcısından yeni bir bağlantı iste.","join_refused_expired":"Oyundaki yerin gitti. {host} seni yeniden alsın diye iste.","join_refused_full":"Oyun dolu: zaten dört oyuncu var.","join_refused_denied":"{host} bu sefer seni içeri almadı.","join_refused_no_answer":"{host} zamanında yanıt vermedi. {host} kişisine haber ver, sonra yeniden dene.","join_refused_closed":"{host} şu anda Birlikte Oyna açmıyor.","join_refused_old_helper":"Birlikte Oyna için {host} adlı kişinin PS5'inde yardımcının güncellenmesi gerekiyor.","join_refused_not_playing":"{host} şu anda oynamıyor. Önce Oyna'yı başlatmasını {host} kullanıcısından iste.","join_refused_unreachable":"{host} adlı kişinin bilgisayarı PS5'e ulaşamadı. Biraz sonra tekrar dene.","join_refused_slow_down":"Çok fazla yanlış kod. Bir dakika bekle, sonra tekrar dene.","join_refused_address":"Bu bağlantının adresi ev ağınızın dışında olduğundan uygulama bunu kullanmaz. {host} kullanıcısından bilgisayarının IP adresini içeren bir bağlantı isteyin.","join_refused_other":"{host} seni içeri almadı.","join_ended_kicked":"{host} seni oyundan çıkardı.","join_ended_closed":"{host}, Birlikte Oyna'yı kapattı.","join_ended_host_stopped":"Ev sahibi oynamayı bıraktı.","join_ended_replaced":"Bu oyun başka bir sekmede veya cihazda açıldı, bu yüzden burada durdu.","join_ended_pad_lost":"PS5 kumandanı kaybetti, bu yüzden oyundan çıktın. {host} seni yeniden alsın diye iste.","join_ended_gave_up":"{host} ile bağlantı zamanında geri gelmedi.","join_net_lost":"{host} ile bağlantı koptu. İnternet bağlantını kontrol et, sonra yeniden iste.","join_ended_lost":"{host} kullanıcısına ulaşılamadı. Aynı ağda olduğunuzu kontrol et.","join_ended_left":"Oyundan ayrıldın.","join_net_mismatch":"Bu bağlantı ev sahibiyle eşleşmiyor; ondan yeni bir bağlantı iste.","join_net_no_direct":"Bu ağdan doğrudan bağlantı mümkün değil (iki tarafın yönlendiricisi de katı). Mobil veri yerine Wi-Fi dene ya da ev sahibinden UPnP'yi açmasını iste.","join_net_no_room":"Bu davet artık açık değil. {host} kullanıcısından yeni bir bağlantı iste.","join_net_full":"{host} kullanıcısının oyununda şu an başka bir arkadaşa yer yok. Biraz sonra tekrar dene.","join_net_no_hub":"PS5Upload davet hizmetine ulaşılamadı. İnternet bağlantını kontrol et, sonra tekrar dene.","join_net_offer":"{host} kullanıcısının bilgisayarı bu tarayıcıya bağlanamadı. Başka bir tarayıcı dene.","join_net_no_webrtc":"Bu tarayıcı doğrudan bağlantı kuramıyor. Güncel bir Chrome, Safari veya Firefox dene.","join_cancel":"İptal","join_host_fallback":"arkadaşın","join_connecting":"Bağlanılıyor: {host}…","join_waiting":"{host} seni içeri alsın diye bekleniyor","join_waiting_body":"{host} adını ekranında görür ve İzin ver'e dokunur.","join_retry":"Tekrar dene","join_again":"Tekrar katılmak iste","join_playing_at":"Oynadığın yer: {host}","join_you_are":"Sen {n}. Oyuncusun","join_seat_stream":"{host} adlı kişinin PS5 kullanıcısıyla oynuyorsun. Kullanıcı seçmene gerek yok.","join_plays_as":"{profile} olarak oynuyorsunuz. Seçim yapmanıza gerek yok.","join_seat_tv_asks":"{host} sizin için bir profil seçti ama kullanılamadı. TV kim olduğunuzu soracak.","join_picking":"PS'ye bas, sonra televizyonda Hızlı Oyna'yı seç","join_hide_controls":"Gizle","join_sound":"Ses için dokun","rp_unmute":"Sesi aç","rp_mute":"Sessiz","join_no_sound":"Bu tarayıcıda ses yok","join_exit_fullscreen":"Tam ekrandan çık","pad_fill":"Tam ekran","join_leave":"Ayrıl","join_show_controls":"Kontrolleri göster","join_hold_hint":"Düğmeleri göstermek için görüntüye basılı tut","pad_watch_no_hevc":"Bu cihaz bu yayının görüntüsünü oynatamıyor: bilgisayar HEVC yayınlıyor, bu cihaz yalnızca H.264 oynatıyor.","pad_watch_decode":"Görüntü burada oynatılamadı.","join_pad_ready":"Kumandan hazır","join_check_unknown_short":"Listemizde yok: tuşlar karışık olabilir.","join_full_to_play":"Ekran kumandasıyla oynamak için Tam ekran'a dokun.","join_pad_none":"Bir kumanda bağla (USB veya Bluetooth) ve herhangi bir tuşa bas.","join_pad_keys":"Ya da klavyeyi kullan: WASD hareket, ok tuşları yön tuşları, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Düğmeleri görmek için kumandada Geri'ye bas.","join_block_note":"{host}, arkadaşlar için PS ve Create tuşlarını kapattı.","join_guide_title":"Televizyonda bir adım daha","join_guide_body":"Kumandandaki PS tuşuna bir kez bas. Televizyon \"Bu kumandayı kim kullanıyor?\" diye sorar. Hızlı Oyna'yı ya da kendi kullanıcını seç. Ev sahibinin bir şey yapması gerekmez.","join_guide_menus":"PS5 ana ekranında menüleri yalnızca ev sahibi kontrol eder; senin kumandan oyunların içinde çalışır.","join_guide_ok":"Anladım","join_host_away":"Ev sahibi oynamayı bıraktı — yeniden başlaması bekleniyor ({time})","join_reconnecting":"Yeniden bağlanıyor…","join_reconnecting_left":"Yerin {time} boyunca tutuluyor.","pad_turn":"Telefonu yan çevirin","join_game_label":"{host} adlı kişinin oyunu","join_title":"Bir arkadaşının oyununa katıl","join_title_body":"{host} adlı kişinin PS5'inde 2., 3. veya 4. Oyuncu olarak oyna.","join_name_label":"Adın","join_name_hint":"Katılmak istediğinde arkadaşın bunu görür.","join_button":"Katıl"},"vi":{"usb_skipped_not_payload":"{name}: không phải tệp .elf hoặc .bin","usb_skipped_unknown":"{id}: không còn trong danh sách payload","browser_unsupported":"Việc này cần ứng dụng máy tính. Không hoạt động trong trình duyệt.","video_recovered_notice":"Lần trước Play bị sập khi bắt đầu hình, nên giờ hình được giải mã không dùng card đồ họa (đổi trong Cài đặt › Cửa sổ › Đồ họa › Giải mã video bằng phần cứng).","video_recovered_title":"Hình giờ được giải mã bằng phần mềm","open_in_title":"Mở trong ứng dụng PS5Upload?","open_in_body":"Thiết bị này có ứng dụng PS5Upload? Mở trong ứng dụng, hoặc tiếp tục trên trình duyệt.","open_in_app":"Mở trong ứng dụng","open_in_browser":"Tiếp tục trên trình duyệt","open_in_remember":"Nhớ lựa chọn của tôi trên thiết bị này","open_in_opening":"Đang mở ứng dụng PS5Upload…","open_in_not_opened":"Không có gì xảy ra? Có thể thiết bị này chưa có ứng dụng.","open_in_again":"Thử lại","pad_8bitdo_no_xinput":"8BitDo này không có chế độ X-input. Nếu có nút sai, hãy kiểm tra tay cầm.","pad_8bitdo_how_switch":"gạt công tắc phía sau sang X, rồi nhấn Start","pad_8bitdo_how_startx":"tắt tay cầm, rồi giữ Start + X để bật lại","pad_8bitdo_how_receiver":"dùng bộ thu 2.4G của nó hoặc cáp USB","pad_8bitdo_how_manual":"cách làm có trong sách hướng dẫn","pad_8bitdo_xinput":"Để chơi tốt nhất, hãy chuyển 8BitDo sang chế độ X-input: {how}.","rp_touch_left_stick":"Cần trái","rp_touch_right_stick":"Cần phải","rp_touch_touchpad":"Bàn di cảm ứng","rp_pad_step_lx":"Đẩy cần trái sang phải","rp_pad_step_ly":"Đẩy cần trái xuống dưới","rp_pad_step_rx":"Đẩy cần phải sang phải","rp_pad_step_ry":"Đẩy cần phải xuống dưới","join_check_bottom":"Nhấn nút mặt phía dưới (✕)","join_check_right":"Nhấn nút mặt bên phải (○)","join_check_left":"Nhấn nút mặt bên trái (□)","join_check_top":"Nhấn nút mặt phía trên (△)","rp_pad_press":"Nhấn {name}","join_check_saved":"Đã lưu cho tay cầm này trên thiết bị này. Thử ngay bên dưới.","join_check_title":"Kiểm tra tay cầm","join_done":"Xong","rp_pads_none":"Chưa thấy tay cầm nào. Hãy kết nối một tay cầm và nhấn nút bất kỳ.","rp_pad_mapped":"Chơi theo cách gán nút của bạn","join_check_unknown":"Tay cầm này không có trong danh sách của chúng tôi nên các nút có thể bị lẫn. Thiết lập chỉ mất vài giây.","rp_pad_standard":"Đã nhận diện","rp_pad_progress":"{n}/{total}","rp_pad_skip":"Bỏ qua","rp_pad_back":"Quay lại","rp_pad_cancel":"Hủy","join_check_try":"Nhấn nút và di chuyển cần: nút bạn nhấn sẽ sáng lên.","join_check_redo":"Làm lại","join_check_map":"Thiết lập nút","rp_pad_reset":"Đặt lại","join_open_lan_body":"Không vào được internet? Nếu bạn dùng cùng Wi-Fi với bạn mình, hãy mở trò chơi ở đó.","join_open_lan":"Mở trên Wi-Fi này","join_path_lan":"Mạng nhà","join_seat_taken":"{host} cần lấy lại tay cầm và trên PS5 không còn tay cầm nào trống, nên bạn đã rời trò chơi. Hãy nhờ {host} cho bạn vào lại.","join_refused_key":"Lời mời này đã hết hạn. Hãy xin {host} liên kết mới.","join_refused_expired":"Bạn đã mất chỗ trong trò chơi. Hãy nhờ {host} cho vào lại.","join_refused_full":"Trò chơi đã đủ người: đã có bốn người chơi.","join_refused_denied":"Lần này {host} chưa cho bạn vào.","join_refused_no_answer":"{host} không trả lời kịp. Hãy báo {host}, rồi thử lại.","join_refused_closed":"{host} hiện không mở Chơi cùng nhau.","join_refused_old_helper":"PS5 của {host} cần cập nhật trình trợ giúp để Chơi cùng nhau.","join_refused_not_playing":"{host} hiện không chơi. Hãy nhờ {host} bắt đầu Chơi trước.","join_refused_unreachable":"Máy tính của {host} không kết nối được với PS5. Hãy thử lại sau giây lát.","join_refused_slow_down":"Nhập sai mã quá nhiều lần. Hãy đợi một phút rồi thử lại.","join_refused_address":"Địa chỉ của liên kết này nằm ngoài mạng gia đình nên ứng dụng sẽ không dùng. Hãy nhờ {host} gửi liên kết có địa chỉ IP của máy tính.","join_refused_other":"{host} không cho bạn vào.","join_ended_kicked":"{host} đã mời bạn ra khỏi trò chơi.","join_ended_closed":"{host} đã đóng Chơi cùng nhau.","join_ended_host_stopped":"Chủ phòng đã dừng chơi.","join_ended_replaced":"Trò chơi này đã được mở ở tab khác hoặc thiết bị khác, nên đã dừng ở đây.","join_ended_pad_lost":"PS5 đã mất tay cầm của bạn, nên bạn đã ra khỏi trò chơi. Hãy nhờ {host} cho vào lại.","join_ended_gave_up":"Kết nối tới {host} không trở lại kịp.","join_net_lost":"Kết nối tới {host} đã bị ngắt. Hãy kiểm tra kết nối internet, rồi xin vào lại.","join_ended_lost":"Không liên lạc được với {host}. Hãy kiểm tra hai bên có cùng mạng không.","join_ended_left":"Bạn đã rời trò chơi.","join_net_mismatch":"Liên kết này không khớp với chủ phòng; hãy xin họ một liên kết mới.","join_net_no_direct":"Không thể kết nối trực tiếp từ mạng này (bộ định tuyến của cả hai bên đều chặt). Hãy thử Wi-Fi thay cho dữ liệu di động, hoặc nhờ chủ phòng bật UPnP.","join_net_no_room":"Lời mời này không còn mở. Hãy xin {host} một liên kết mới.","join_net_full":"Trò chơi của {host} hiện không còn chỗ cho thêm một người bạn. Hãy thử lại sau giây lát.","join_net_no_hub":"Không liên lạc được với dịch vụ lời mời của PS5Upload. Hãy kiểm tra kết nối internet rồi thử lại.","join_net_offer":"Máy tính của {host} không kết nối được với trình duyệt này. Hãy thử trình duyệt khác.","join_net_no_webrtc":"Trình duyệt này không thể tạo kết nối trực tiếp. Hãy thử Chrome, Safari hoặc Firefox bản mới.","join_cancel":"Hủy","join_host_fallback":"bạn của bạn","join_connecting":"Đang kết nối tới {host}…","join_waiting":"Đang chờ {host} cho bạn vào","join_waiting_body":"{host} sẽ thấy tên bạn trên màn hình và chạm Cho phép.","join_retry":"Thử lại","join_again":"Xin vào lại","join_playing_at":"Đang chơi ở chỗ {host}","join_you_are":"Bạn là Người chơi {n}","join_seat_stream":"Bạn đang chơi bằng người dùng PS5 của {host}. Không cần chọn người dùng.","join_plays_as":"Bạn đang chơi bằng {profile}. Không cần chọn.","join_seat_tv_asks":"{host} đã chọn một hồ sơ cho bạn nhưng không dùng được. TV sẽ hỏi bạn là ai.","join_picking":"Bấm PS, rồi chọn Chơi nhanh trên TV","join_hide_controls":"Ẩn","join_sound":"Chạm để bật tiếng","rp_unmute":"Bật âm thanh","rp_mute":"Tắt tiếng","join_no_sound":"Trình duyệt này không phát được âm thanh","join_exit_fullscreen":"Thoát toàn màn hình","pad_fill":"Toàn màn hình","join_leave":"Rời đi","join_show_controls":"Hiện các nút điều khiển","join_hold_hint":"Nhấn giữ hình ảnh để hiện các nút","pad_watch_no_hevc":"Thiết bị này không phát được hình của stream này: máy tính truyền HEVC, còn thiết bị này chỉ phát H.264.","pad_watch_decode":"Không phát được hình ở đây.","join_pad_ready":"Tay cầm của bạn đã sẵn sàng","join_check_unknown_short":"Không có trong danh sách: các nút có thể bị lẫn.","join_full_to_play":"Chạm toàn màn hình để chơi bằng tay cầm trên màn hình.","join_pad_none":"Kết nối tay cầm (USB hoặc Bluetooth) rồi bấm nút bất kỳ.","join_pad_keys":"Hoặc dùng bàn phím: WASD di chuyển, phím mũi tên D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.","join_tv_back_hint":"Nhấn Quay lại trên điều khiển từ xa để hiện các nút.","join_block_note":"{host} đã tắt PS và Create với bạn bè.","join_guide_title":"Thêm một bước trên TV","join_guide_body":"Bấm PS một lần trên tay cầm. TV sẽ hỏi \"Ai đang dùng tay cầm này?\". Chọn Chơi nhanh hoặc người dùng của bạn. Chủ phòng không cần làm gì.","join_guide_menus":"Trên màn hình chính PS5 chỉ chủ phòng điều khiển menu; tay cầm của bạn chơi bên trong trò chơi.","join_guide_ok":"Đã hiểu","join_host_away":"Chủ phòng đã dừng chơi — đang chờ họ chơi lại ({time})","join_reconnecting":"Đang kết nối lại…","join_reconnecting_left":"Chỗ của bạn được giữ trong {time}.","pad_turn":"Xoay ngang điện thoại","join_game_label":"Trò chơi của {host}","join_title":"Vào trò chơi của bạn bè","join_title_body":"Chơi trên PS5 của {host} với vai Người chơi 2, 3 hoặc 4.","join_name_label":"Tên của bạn","join_name_hint":"Bạn bè sẽ thấy tên này khi bạn xin vào.","join_button":"Vào chơi"},"zh-CN":{"usb_skipped_not_payload":"{name}:不是 .elf 或 .bin 文件","usb_skipped_unknown":"{id}:已不在 Payload 列表中","browser_unsupported":"这需要桌面应用,无法在浏览器中使用。","video_recovered_notice":"上次 Play 在开始显示画面时崩溃,因此画面现在不使用显卡解码(可在 设置 › 窗口 › 图形 › 硬件视频解码 中更改)。","video_recovered_title":"画面现由软件解码","open_in_title":"在 PS5Upload 应用中打开?","open_in_body":"这台设备装了 PS5Upload 应用?可以在应用中打开,或继续使用浏览器。","open_in_app":"在应用中打开","open_in_browser":"继续使用浏览器","open_in_remember":"在此设备上记住我的选择","open_in_opening":"正在打开 PS5Upload 应用…","open_in_not_opened":"没有反应?这台设备可能没有安装应用。","open_in_again":"重试","pad_8bitdo_no_xinput":"这款 8BitDo 没有 X-input 模式。如果有按键不对,请检查手柄。","pad_8bitdo_how_switch":"把背面的开关拨到 X,然后按 Start","pad_8bitdo_how_startx":"先关机,然后按住 Start + X 开机","pad_8bitdo_how_receiver":"使用它的 2.4G 接收器或 USB 线","pad_8bitdo_how_manual":"方法见其说明书","pad_8bitdo_xinput":"为获得最佳效果,请将 8BitDo 切换到 X-input 模式:{how}。","rp_touch_left_stick":"左摇杆","rp_touch_right_stick":"右摇杆","rp_touch_touchpad":"触摸板","rp_menu":"菜单","rp_pad_step_lx":"将左摇杆推向右","rp_pad_step_ly":"将左摇杆推向下","rp_pad_step_rx":"将右摇杆推向右","rp_pad_step_ry":"将右摇杆推向下","join_check_bottom":"按下方的功能键 (✕)","join_check_right":"按右侧的功能键 (○)","join_check_left":"按左侧的功能键 (□)","join_check_top":"按上方的功能键 (△)","rp_pad_press":"按 {name}","join_check_saved":"已在此设备上为这个手柄保存。可在下方试用。","join_check_title":"检查你的手柄","join_done":"完成","rp_pads_none":"还没有检测到手柄。请连接一个手柄并按任意按钮。","rp_pad_mapped":"使用你的按键映射","join_check_unknown":"这个手柄不在我们的列表中,按键可能会错位。设置只需几秒钟。","rp_pad_standard":"已识别","rp_pad_progress":"{n}/{total}","rp_pad_skip":"跳过","rp_pad_back":"返回","rp_pad_cancel":"取消","join_check_try":"按下按键、推动摇杆:按下的部分会亮起。","join_check_redo":"重新设置","join_check_map":"设置按键","rp_pad_reset":"重置","join_open_lan_body":"连不上互联网?如果你和朋友在同一个 Wi-Fi 上,就在那里打开游戏。","join_open_lan":"在此 Wi-Fi 上打开","join_path_lan":"家庭网络","join_path_internet":"互联网","join_seat_taken":"{host} 需要收回手柄,而 PS5 上没有其他空闲手柄,所以你已退出游戏。请 {host} 再次让你加入。","join_refused_key":"此邀请已过期。请向 {host} 要一个新链接。","join_refused_expired":"你在游戏中的位置已失去。请让 {host} 再次放你进去。","join_refused_full":"游戏已满:已经有四名玩家。","join_refused_denied":"{host} 这次没有让你加入。","join_refused_no_answer":"{host} 没有及时响应。请告诉 {host},然后重试。","join_refused_closed":"{host} 目前没有开启一起畅玩。","join_refused_old_helper":"{host} 的 PS5 需要更新助手才能一起畅玩。","join_refused_not_playing":"{host} 现在没在玩。请让 {host} 先开始畅玩。","join_refused_unreachable":"{host} 的电脑无法连接到其 PS5。请稍后再试。","join_refused_slow_down":"错误的代码太多。请等一分钟后再试。","join_refused_address":"此链接的地址不在你的家庭网络内,因此应用不会使用它。请向 {host} 索取包含其电脑 IP 地址的链接。","join_refused_other":"{host} 没有让你加入。","join_ended_kicked":"{host} 已将你移出游戏。","join_ended_closed":"{host} 已关闭一起畅玩。","join_ended_host_stopped":"房主已停止游戏。","join_ended_replaced":"这场游戏在另一个标签页或另一台设备上打开了,所以这里已停止。","join_ended_pad_lost":"PS5 丢失了你的手柄,所以你已退出游戏。请让 {host} 再次放你进去。","join_ended_gave_up":"与 {host} 的连接未能及时恢复。","join_net_lost":"与 {host} 的连接已断开。请检查你的互联网连接,然后重新请求。","join_ended_lost":"无法连接到 {host}。请检查你们是否在同一网络。","join_ended_left":"你已离开游戏。","join_net_mismatch":"此链接与主机不匹配;请向对方要一个新链接。","join_net_no_direct":"无法从此网络直接连接(双方的路由器都很严格)。请改用 Wi-Fi 而不是移动数据,或请主机打开 UPnP。","join_net_no_room":"此邀请已失效。请向 {host} 要一个新链接。","join_net_full":"{host} 的游戏现在没有位置再加一位朋友。请稍后再试。","join_net_no_hub":"无法连接 PS5Upload 邀请服务。请检查网络连接后重试。","join_net_offer":"{host} 的电脑无法连接到此浏览器。请换一个浏览器试试。","join_net_no_webrtc":"此浏览器无法建立直接连接。请使用较新版本的 Chrome、Safari 或 Firefox。","join_cancel":"取消","join_host_fallback":"你的好友","join_connecting":"正在连接 {host}…","join_waiting":"正在等待 {host} 让你加入","join_waiting_body":"{host} 会在屏幕上看到你的名字并点按“允许”。","join_retry":"重试","join_again":"再次请求加入","join_playing_at":"正在 {host} 那里玩","join_you_are":"你是玩家 {n}","join_seat_stream":"你正在以 {host} 的 PS5 用户身份游玩,无需选择用户。","join_plays_as":"你正在以 {profile} 的身份游玩,无需选择。","join_seat_tv_asks":"{host} 为你选择了个人资料,但无法使用。电视会询问你是谁。","join_picking":"按 PS 键,然后在电视上选择“快速游戏”","join_hide_controls":"隐藏","join_sound":"点按开启声音","rp_unmute":"开启声音","rp_mute":"静音","join_no_sound":"此浏览器无法播放声音","join_exit_fullscreen":"退出全屏","pad_fill":"全屏","join_leave":"离开","join_show_controls":"显示控制按钮","join_hold_hint":"长按画面以显示按钮","pad_watch_no_hevc":"此设备无法播放这个串流的画面:电脑以 HEVC 串流,而此设备只能播放 H.264。","pad_watch_decode":"无法在这里播放画面。","join_pad_ready":"你的手柄已就绪","join_check_unknown_short":"不在我们的列表中:按键可能错位。","join_full_to_play":"点按全屏,即可用屏幕手柄游玩。","join_pad_none":"连接手柄(USB 或 Bluetooth),然后按任意键。","join_pad_keys":"也可以用键盘:WASD 移动,方向键为十字键,Enter ✕,Backspace ○,Q □,E △,Tab Options。","join_tv_back_hint":"按遥控器上的返回键显示按钮。","join_block_note":"{host} 已为好友关闭 PS 和 Create 键。","join_guide_title":"电视上还差一步","join_guide_body":"在手柄上按一次 PS 键。电视会询问“谁在使用这个手柄?”。选择“快速游戏”或你自己的用户。主机玩家无需任何操作。","join_guide_menus":"在 PS5 主屏幕上只有房主能操作菜单;你的手柄在游戏里使用。","join_guide_ok":"知道了","join_host_away":"房主已停止游戏 — 正在等待对方重新开始({time})","join_reconnecting":"正在重新连接…","join_reconnecting_left":"你的位置会保留 {time}。","pad_turn":"请横放手机","join_game_label":"{host} 的游戏","join_title":"加入好友的游戏","join_title_body":"在 {host} 的 PS5 上作为玩家 2、3 或 4 游玩。","join_name_label":"你的名字","join_name_hint":"你请求加入时,好友会看到这个名字。","join_button":"加入"},"zh-TW":{"usb_skipped_not_payload":"{name}:不是 .elf 或 .bin 檔案","usb_skipped_unknown":"{id}:已不在 Payload 清單中","browser_unsupported":"這需要桌面應用程式,無法在瀏覽器中使用。","video_recovered_notice":"上次 Play 在開始顯示畫面時當掉,因此畫面現在不使用顯示卡解碼(可在 設定 › 視窗 › 圖形 › 硬體視訊解碼 中變更)。","video_recovered_title":"畫面現改由軟體解碼","open_in_title":"在 PS5Upload 應用程式中開啟?","open_in_body":"這台裝置有 PS5Upload 應用程式?可以在應用程式中開啟,或繼續使用瀏覽器。","open_in_app":"在應用程式中開啟","open_in_browser":"繼續使用瀏覽器","open_in_remember":"在此裝置上記住我的選擇","open_in_opening":"正在開啟 PS5Upload 應用程式…","open_in_not_opened":"沒有反應?這台裝置可能沒有安裝應用程式。","open_in_again":"重試","pad_8bitdo_no_xinput":"這款 8BitDo 沒有 X-input 模式。如果有按鍵不對,請檢查控制器。","pad_8bitdo_how_switch":"把背面的開關撥到 X,然後按 Start","pad_8bitdo_how_startx":"先關機,然後按住 Start + X 開機","pad_8bitdo_how_receiver":"使用它的 2.4G 接收器或 USB 線","pad_8bitdo_how_manual":"方法請見其說明書","pad_8bitdo_xinput":"為獲得最佳效果,請將 8BitDo 切換到 X-input 模式:{how}。","rp_touch_left_stick":"左類比搖桿","rp_touch_right_stick":"右類比搖桿","rp_touch_touchpad":"觸控板","rp_menu":"選單","rp_pad_step_lx":"將左類比搖桿推向右","rp_pad_step_ly":"將左類比搖桿推向下","rp_pad_step_rx":"將右類比搖桿推向右","rp_pad_step_ry":"將右類比搖桿推向下","join_check_bottom":"按下方的功能鍵 (✕)","join_check_right":"按右側的功能鍵 (○)","join_check_left":"按左側的功能鍵 (□)","join_check_top":"按上方的功能鍵 (△)","rp_pad_press":"按下 {name}","join_check_saved":"已在此裝置上為這個控制器儲存。可在下方試用。","join_check_title":"檢查你的控制器","join_done":"完成","rp_pads_none":"尚未偵測到控制器。請連接一個控制器並按下任一按鈕。","rp_pad_mapped":"使用你的按鍵對應","join_check_unknown":"這個控制器不在我們的清單中,按鍵可能會錯位。設定只需幾秒鐘。","rp_pad_standard":"已辨識","rp_pad_progress":"{n}/{total}","rp_pad_skip":"略過","rp_pad_back":"返回","rp_pad_cancel":"取消","join_check_try":"按下按鍵、推動搖桿:按下的部分會亮起。","join_check_redo":"重新設定","join_check_map":"設定按鍵","rp_pad_reset":"重設","join_open_lan_body":"連不上網際網路?如果你和朋友在同一個 Wi-Fi 上,就在那裡開啟遊戲。","join_open_lan":"在此 Wi-Fi 上開啟","join_path_lan":"家用網路","join_path_internet":"網際網路","join_seat_taken":"{host} 需要收回控制器,而 PS5 上沒有其他空閒的控制器,所以你已離開遊戲。請 {host} 再次讓你加入。","join_refused_key":"此邀請已過期。請向 {host} 要一個新連結。","join_refused_expired":"你在遊戲中的位置已失去。請讓 {host} 再次放你進去。","join_refused_full":"遊戲已滿:已經有四名玩家。","join_refused_denied":"{host} 這次沒有讓你加入。","join_refused_no_answer":"{host} 沒有及時回應。請告訴 {host},然後再試一次。","join_refused_closed":"{host} 目前沒有開啟一起暢玩。","join_refused_old_helper":"{host} 的 PS5 需要更新助手才能一起暢玩。","join_refused_not_playing":"{host} 現在沒在玩。請讓 {host} 先開始暢玩。","join_refused_unreachable":"{host} 的電腦無法連線到其 PS5。請稍後再試。","join_refused_slow_down":"錯誤的代碼太多。請等一分鐘後再試。","join_refused_address":"此連結的位址不在你的家用網路內,因此應用程式不會使用它。請向 {host} 索取包含其電腦 IP 位址的連結。","join_refused_other":"{host} 沒有讓你加入。","join_ended_kicked":"{host} 已將你移出遊戲。","join_ended_closed":"{host} 已關閉一起暢玩。","join_ended_host_stopped":"房主已停止遊戲。","join_ended_replaced":"這場遊戲在另一個分頁或另一台裝置上開啟了,所以這裡已停止。","join_ended_pad_lost":"PS5 遺失了你的控制器,所以你已退出遊戲。請讓 {host} 再次放你進去。","join_ended_gave_up":"與 {host} 的連線未能及時恢復。","join_net_lost":"與 {host} 的連線已中斷。請檢查你的網際網路連線,然後重新要求。","join_ended_lost":"無法連線到 {host}。請確認你們是否在同一個網路。","join_ended_left":"你已離開遊戲。","join_net_mismatch":"這個連結與主機不符;請向對方要一個新連結。","join_net_no_direct":"無法從這個網路直接連線(雙方的路由器都很嚴格)。請改用 Wi-Fi 而非行動數據,或請主機開啟 UPnP。","join_net_no_room":"這個邀請已失效。請向 {host} 要一個新連結。","join_net_full":"{host} 的遊戲目前沒有位置再加一位朋友。請稍後再試。","join_net_no_hub":"無法連線到 PS5Upload 邀請服務。請檢查網路連線後再試一次。","join_net_offer":"{host} 的電腦無法連線到這個瀏覽器。請換個瀏覽器試試。","join_net_no_webrtc":"這個瀏覽器無法建立直接連線。請使用較新版本的 Chrome、Safari 或 Firefox。","join_cancel":"取消","join_host_fallback":"你的好友","join_connecting":"正在連線到 {host}…","join_waiting":"正在等待 {host} 讓你加入","join_waiting_body":"{host} 會在螢幕上看到你的名字並點選「允許」。","join_retry":"重試","join_again":"再次要求加入","join_playing_at":"正在 {host} 那裡玩","join_you_are":"你是玩家 {n}","join_seat_stream":"你正在以 {host} 的 PS5 使用者身分遊玩,不需要選擇使用者。","join_plays_as":"你正以 {profile} 的身分遊玩,無需選擇。","join_seat_tv_asks":"{host} 為你選了一個個人檔案,但無法使用。電視會詢問你是誰。","join_picking":"按下 PS,然後在電視上選擇「快速遊玩」","join_hide_controls":"隱藏","join_sound":"點一下開啟聲音","rp_unmute":"開啟聲音","rp_mute":"靜音","join_no_sound":"此瀏覽器無法播放聲音","join_exit_fullscreen":"離開全螢幕","pad_fill":"全螢幕","join_leave":"離開","join_show_controls":"顯示控制項","join_hold_hint":"長按畫面以顯示按鈕","pad_watch_no_hevc":"此裝置無法播放這個串流的畫面:電腦以 HEVC 串流,而此裝置只能播放 H.264。","pad_watch_decode":"無法在這裡播放畫面。","join_pad_ready":"你的控制器已就緒","join_check_unknown_short":"不在我們的清單中:按鍵可能錯位。","join_full_to_play":"點一下全螢幕,即可用螢幕上的控制器遊玩。","join_pad_none":"連接控制器(USB 或 Bluetooth),然後按任意按鈕。","join_pad_keys":"也可以用鍵盤:WASD 移動,方向鍵為十字鍵,Enter ✕,Backspace ○,Q □,E △,Tab Options。","join_tv_back_hint":"按遙控器上的返回鍵以顯示按鈕。","join_block_note":"{host} 已為好友關閉 PS 和 Create 按鈕。","join_guide_title":"電視上還差一步","join_guide_body":"在控制器上按一次 PS 按鈕。電視會詢問「誰在使用這支控制器?」。選擇「快速遊玩」或你自己的使用者。主持人不需要任何操作。","join_guide_menus":"在 PS5 主畫面上只有房主能操作選單;你的控制器在遊戲裡使用。","join_guide_ok":"知道了","join_host_away":"房主已停止遊戲 — 正在等待對方重新開始({time})","join_reconnecting":"正在重新連線…","join_reconnecting_left":"你的位置會保留 {time}。","pad_turn":"請橫放手機","join_game_label":"{host} 的遊戲","join_title":"加入好友的遊戲","join_title_body":"在 {host} 的 PS5 上以玩家 2、3 或 4 的身分遊玩。","join_name_label":"你的名字","join_name_hint":"你要求加入時,好友會看到這個名字。","join_button":"加入"}}),ke=new Set([`ar`,`fa`]);function Ae(){let e=Object.keys(Oe);try{let t=localStorage.getItem(`ps5upload.lang`);if(t&&e.includes(t))return t}catch{}let t=typeof navigator>`u`?[]:[...navigator.languages??[],navigator.language];for(let n of t){if(!n)continue;if(e.includes(n))return n;let t=n.split(`-`)[0],r=e.find(e=>e===t);if(r)return r;if(t===`zh`)return/TW|HK|MO|Hant/i.test(n)?`zh-TW`:`zh-CN`;let i=e.find(e=>e.split(`-`)[0]===t);if(i)return i}return`en`}var je=Ae();typeof document<`u`&&(document.documentElement.lang=je,document.documentElement.dir=ke.has(je)?`rtl`:`ltr`);var Me=Oe[je]??{},Ne=Oe.en??{},Pe=(e,t)=>t?e.replace(/\{(\w+)\}/g,(e,n)=>n in t?String(t[n]):e):e,Fe=((e,t,n)=>{let r=typeof t==`string`?void 0:t,i=typeof t==`string`?t:n;return Pe(Me[e]??Ne[e]??i??e,r)});function Ie(){return Fe}var Le=4e3;function Re(e,t,n=`lan`){let r=new URLSearchParams(e.replace(/^#/,``)).get(n);if(!r)return null;try{let e=new URL(r),n=e.origin+e.pathname;return/^https?:$/.test(e.protocol)&&r===n&&RegExp(`/${t}/?$`).test(e.pathname)?n:null}catch{return null}}function ze(e,t){return t.key?`${e}#i=${encodeURIComponent(t.key)}`:t.watch?`${e}#w=1`:e}function Be(e,t=Le,n=typeof WebSocket>`u`?void 0:WebSocket){return new Promise(r=>{try{let i=new n(e),a=e=>{clearTimeout(o),i.onopen=i.onclose=i.onerror=null,i.close(),r(e)},o=setTimeout(()=>a(!1),t);i.onopen=()=>a(!0),i.onclose=i.onerror=()=>a(!1)}catch{r(!1)}})}var Ve=[`mismatch`,`no_direct`,`no_room`,`net_full`,`no_hub`,`offer`,`no_webrtc`],He=4100;function Ue(e){if(!e||e.code!==4100||typeof e.reason!=`string`||!e.reason.startsWith(`net:`))return null;let t=e.reason.slice(4);return Ve.includes(t)?t:null}var We=new Set([`key`,`expired`,`full`,`denied`,`no_answer`,`closed`,`old_helper`,`not_playing`,`unreachable`,`slow_down`,`address`,`seat_taken`]),Ge={kicked:`kicked`,host_stopped:`host_stopped`,replaced:`replaced`,lost:`pad_lost`,seat_taken:`seat_taken`},Ke=new Set([`asking`,`picking_user`,`playing`,`reconnecting`,`left`]),qe=e=>Math.max(0,Math.min(255,Math.round(Number(e)||0)));function Je(e){let t;try{let n=JSON.parse(e);if(!n||typeof n!=`object`)return null;t=n}catch{return null}if(typeof t.pong==`number`)return{kind:`pong`,t:t.pong};if(t.stage===`asking`)return{kind:`asking`};if(t.stage===`waiting`)return{kind:`waiting`};if(t.stage===`joined`&&typeof t.player==`number`&&typeof t.token==`string`)return{kind:`joined`,player:t.player,token:t.token,hevc:t.hevc===!0,track:t.track===!0,audio:t.audio===!0};if(t.stage===`refused`){let e=String(t.why??``);return{kind:`refused`,why:We.has(e)?e:`refused`}}if(typeof t.bye==`string`)return{kind:`bye`,why:Object.prototype.hasOwnProperty.call(Ge,t.bye)?Ge[t.bye]:`closed`};if(t.status&&typeof t.status==`object`){let e=t.status,n=typeof e.state==`string`&&Ke.has(e.state)?e.state:null;return{kind:`status`,status:{player:typeof e.player==`number`?e.player:0,state:n,rttMs:typeof e.rtt_ms==`number`?e.rtt_ms:null,host:typeof e.host==`string`&&e.host?e.host:null,blockSystem:e.block_system===!0,streamSeat:e.stream_seat===!0,playsAs:typeof e.plays_as==`string`&&e.plays_as?e.plays_as:null,seatNote:typeof e.seat_note==`string`&&e.seat_note?e.seat_note:null}}}let n=Array.isArray(t.rumble)?[qe(t.rumble[0]),qe(t.rumble[1])]:null,r=Array.isArray(t.light)?[qe(t.light[0]),qe(t.light[1]),qe(t.light[2])]:null;return n||r?{kind:`feedback`,rumble:n,light:r}:null}function Ye(e){return Math.max(-32768,Math.min(32767,Math.round(e)))+32768>>8}function Xe([e,t]){return[Math.max(0,Math.min(1919,Math.round(e))),Math.max(0,Math.min(1079,Math.round(t*1079/941)))]}function Ze(e,t){let n=t.touch?[[0,...Xe(t.touch)]]:[],r=t.motion??null,i=16+n.length*5+(r?25:0),a=new ArrayBuffer(i),o=new DataView(a),s=0;o.setUint8(s++,1),o.setUint32(s,e>>>0,!0),s+=4,o.setUint32(s,t.buttons>>>0,!0),s+=4;for(let e of[t.lx,t.ly,t.rx,t.ry])o.setUint8(s++,Ye(e));o.setUint8(s++,qe(t.l2)),o.setUint8(s++,qe(t.r2)),o.setUint8(s++,n.length);for(let[e,t,r]of n)o.setUint8(s++,e),o.setUint16(s,t,!0),s+=2,o.setUint16(s,r,!0),s+=2;if(r){o.setUint8(s++,2);for(let e of[...r.gyro,...r.accel])o.setFloat32(s,e/1e3,!0),s+=4}return new Uint8Array(a)}function Qe(e){return Math.min(4e3,250*2**Math.max(0,Math.min(e,10)))}var $e=6e4,et=6e4;function tt(e){return e&&/^[0-9A-Fa-f]{2}(:[0-9A-Fa-f]{2}){31}$/.test(e)?e.toUpperCase():null}function nt(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=t.get(`room`)??``,r=t.get(`k`)??``,i=t.get(`fp`)??``,a=t.get(`hub`)??``;return!/^[A-Za-z0-9_-]{22}$/.test(n)||!/^[A-Za-z0-9_-]{8,128}$/.test(r)||!tt(i)||!/^([A-Za-z0-9.-]{1,253}|\[[0-9A-Fa-f:.]{2,45}\])(:\d{1,5})?$/.test(a)?null:{room:n,key:r,fp:i.toUpperCase(),hub:a}}function rt(e){return`ps5upload://join?link=${encodeURIComponent(e)}`}function it(e){return e==null||!Number.isFinite(e)?`none`:e<60?`good`:e<120?`fair`:`slow`}function at(e){switch(e){case 1:return[0,0,255];case 2:return[255,0,0];case 3:return[0,255,0];default:return[255,0,255]}}var ot=(e,t)=>`#version 300 es precision mediump float; in vec2 uv; out vec4 o; @@ -268,7 +268,7 @@ ã/¸Äyf"Ÿ5TàyÊ0îEê²Þ—€m6ëÞè6ðÏâ§9ž¬„k=}¼àt<ž‚¦Mdžç6"p_î3, oO3p"pw÷´/(1ñøs.íA/&ÏUÃ_X™ÍpÕ1hÌ80E’Qö„ ow÷!x.™AÜ"¢j+惡¦¶®ä“R–ow÷!xꔊpn…â#ðù z AÍp\Ž0N˜HJê´ªØ^U -I€wu¸öôú!3å6³‹âVq£³¹´RN£%y10º:pŠ#\:J:b9Hµ7h_Ž:¢I9 _¼™µV,þ <`});var E={a:v};this.setModule=t=>{e.setModule(bi,t)},this.getModule=()=>e.getModule(bi),this.instantiate=()=>(this.getModule().then(e=>WebAssembly.instantiate(e,E)).then(e=>{let t=e.exports;y(t),a=t.g,o(),T(t),n()}),this.ready=new Promise(e=>{n=e}).then(()=>{this.HEAP=a.buffer,this.malloc=x,this.free=C,this.opus_frame_decoder_create=b,this.opus_frame_decode_float_deinterleaved=S,this.opus_frame_decoder_destroy=ee}),this)}var xi=o((()=>{}));function Si(e={}){Si.errors||Object.defineProperties(Si,{errors:{value:new Map([[-1,`OPUS_BAD_ARG: One or more invalid/out of range arguments`],[-2,`OPUS_BUFFER_TOO_SMALL: Not enough bytes allocated in the buffer`],[-3,`OPUS_INTERNAL_ERROR: An internal error was detected`],[-4,`OPUS_INVALID_PACKET: The compressed data passed is corrupted`],[-5,`OPUS_UNIMPLEMENTED: Invalid/unsupported request number`],[-6,`OPUS_INVALID_STATE: An encoder or decoder structure is invalid or already freed`],[-7,`OPUS_ALLOC_FAIL: Memory allocation has failed`]])}}),this._init=()=>new this._WASMAudioDecoderCommon(this).instantiate(this._EmscriptenWASM,this._module).then(e=>{this._common=e,this._inputBytes=0,this._outputSamples=0,this._frameNumber=0,this._input=this._common.allocateTypedArray(this._inputSize,Uint8Array),this._output=this._common.allocateTypedArray(this._outputChannels*this._outputChannelSize,Float32Array);let t=this._common.allocateTypedArray(this._channels,Uint8Array);t.buf.set(this._channelMappingTable),this._decoder=this._common.wasm.opus_frame_decoder_create(this._sampleRate,this._channels,this._streamCount,this._coupledStreamCount,t.ptr,this._preSkip,this._forceStereo)}),Object.defineProperty(this,"ready",{enumerable:!0,get:()=>this._ready}),this.reset=()=>(this.free(),this._init()),this.free=()=>{this._common.free(),this._common.wasm.opus_frame_decoder_destroy(this._decoder),this._common.wasm.free(this._decoder)},this._decode=e=>{if(!(e instanceof Uint8Array))throw Error(`Data to decode must be Uint8Array. Instead got `+typeof e);this._input.buf.set(e);let t=this._common.wasm.opus_frame_decode_float_deinterleaved(this._decoder,this._input.ptr,e.length,this._output.ptr),n;return t<0&&(n=`libopus `+t+` `+(Si.errors.get(t)||`Unknown Error`),console.error(n),t=0),{outputBuffer:this._common.getOutputChannels(this._output.buf,this._outputChannels,t),samplesDecoded:t,error:n}},this.decodeFrame=e=>{let t=[],n=this._decode(e);return n.error&&this._common.addError(t,n.error,e.length,this._frameNumber,this._inputBytes,this._outputSamples),this._frameNumber++,this._inputBytes+=e.length,this._outputSamples+=n.samplesDecoded,this._WASMAudioDecoderCommon.getDecodedAudioMultiChannel(t,[n.outputBuffer],this._outputChannels,n.samplesDecoded,this._sampleRate)},this.decodeFrames=e=>{let t=[],n=[],r=0,i=0;for(;itypeof e==`number`,n=e.sampleRate,r=e.channels,i=e.streamCount,a=e.coupledStreamCount,o=e.channelMappingTable,s=e.preSkip,c=+!!e.forceStereo;if(r>2&&(!t(i)||!t(a)||!Array.isArray(o)))throw Error(`Invalid Opus Decoder Options for multichannel decoding.`);return this._sampleRate=[8e3,12e3,16e3,24e3,48e3].includes(n)?n:48e3,this._channels=t(r)?r:2,this._streamCount=t(i)?i:1,this._coupledStreamCount=t(a)?a:this._channels-1,this._channelMappingTable=o||(this._channels===2?[0,1]:[0]),this._preSkip=s||0,this._forceStereo=r<=8&&r!=2?c:0,this._inputSize=3840*this._channels,this._outputChannelSize=5760,this._outputChannels=this._forceStereo?2:this._channels,this._ready=this._init(),this}var Ci=o((()=>{yi(),xi()})),wi,Ti=o((()=>{yi(),xi(),Ci(),wi=class extends hi{constructor(e){super(e,`opus-decoder`,Si,bi)}async decodeFrame(e){return this.postToDecoder(`decodeFrame`,e)}async decodeFrames(e){return this.postToDecoder(`decodeFrames`,e)}}})),Ei=c({OpusDecoder:()=>Si,OpusDecoderWebWorker:()=>wi}),Di=o((()=>{Ci(),Ti(),yi(),_i(Si,`OpusDecoder`),_i(wi,`OpusDecoderWebWorker`)})),Oi=[8e3,12e3,16e3,24e3,48e3],ki=null;function Ai(){return ki??=Xn(()=>Promise.resolve().then(()=>(Di(),Ei)),__VITE_PRELOAD__,import.meta.url).catch(e=>{throw ki=null,e}),ki}function ji(){return typeof WebAssembly==`object`&&typeof WebAssembly.instantiate==`function`}function Mi(e,t,n,r){return{numberOfFrames:t,numberOfChannels:e.length,sampleRate:n,timestamp:r,format:`f32-planar`,duration:Math.round(t/n*1e6),copyTo(n,r){n.set(e[r.planeIndex].subarray(0,t))},close(){}}}var Ni=class{constructor(e,t=Ai){this.init=e,this.load=t,this.state=`unconfigured`,this.dec=null,this.pending=[]}configure(e){if(this.state===`closed`)throw Error(`the decoder is closed`);if(!ji())throw Error(`no WebAssembly here`);let t=e.sampleRate;if(!Oi.includes(t))throw Error(`Opus does not decode at ${t} Hz`);let n=e.numberOfChannels;if(n<1||n>2)throw Error(`${n} channels: only mono and stereo are decoded`);this.state=`configured`,this.load().then(async e=>{if(this.state===`closed`)return;let r=new e.OpusDecoder({channels:n,sampleRate:t});if(await r.ready,this.state!==`configured`){r.free();return}this.dec=r;let i=this.pending;this.pending=[];for(let e of i)this.state===`configured`&&this.run(e)}).catch(e=>this.fail(e))}decode(e){if(this.state!==`configured`)return;let t=e;if(this.dec)return this.run(t);this.pending.push({timestamp:t.timestamp,data:t.data.slice()}),this.pending.length>50&&this.pending.shift()}run(e){let t=this.dec;if(!t)return;let n;try{n=t.decodeFrame(e.data)}catch(e){return this.fail(e)}n.samplesDecoded&&n.channelData.length&&this.init.output(Mi(n.channelData,n.samplesDecoded,n.sampleRate,e.timestamp))}fail(e){if(this.state===`closed`)return;this.close();let t=e instanceof Error?e:Error(String(e));queueMicrotask(()=>this.init.error(t))}close(){this.state=`closed`,this.pending=[];let e=this.dec;this.dec=null;try{e?.free()}catch{}}},Pi={makeDecoder:e=>new Ni(e),makeChunk:e=>({type:e.type,timestamp:e.timestamp,data:e.data instanceof Uint8Array?e.data:new Uint8Array(e.data)})};function Fi(e,t){for(let n=0;n+3>1&63;if(t>=16&&t<=21)return!0;if(t<16)return!1}else{let t=e[n+3]&31;if(t===5)return!0;if(t===1)return!1}}return!1}function Ii(e){for(let t=0;t+6e.toString(16).padStart(2,`0`);return`avc1.${n(e[t+4])}${n(e[t+5])}${n(e[t+6])}`}return`avc1.4d4028`}var Li=[`hev1.1.6.L153.B0`,`hvc1.1.6.L153.B0`,`hev1.2.4.L153.B0`,`hvc1.2.4.L153.B0`,`hev1.1.6.L150.90`];async function Ri(e,t){if(typeof VideoDecoder>`u`)return null;for(let n of Li)try{if((await VideoDecoder.isConfigSupported({codec:n,codedWidth:e,codedHeight:t})).supported)return n}catch{}return null}function zi(e){let t=[];for(let n=0;n+2{let i=r+1n&&e[i-1]===0;)i--;return e.subarray(n,i)}).filter(e=>e.length>0)}var Bi=(e,t)=>t?e[0]>>1&63:e[0]&31;function Vi(e,...t){let n=8+t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(n);new DataView(r.buffer).setUint32(0,n);for(let t=0;t<4;t++)r[4+t]=e.charCodeAt(t);let i=8;for(let e of t)r.set(e,i),i+=e.length;return r}function F(...e){let t=new Uint8Array(e.reduce((e,[,t])=>e+t,0)),n=0;for(let[r,i]of e){for(let e=i-1;e>=0;e--)t[n+i-1-e]=Math.floor(r/2**(8*e))&255;n+=i}return t}var Hi=(e,t,n,...r)=>Vi(e,F([t,1],[n,3]),...r),Ui=F([65536,4],[0,4],[0,4],[0,4],[65536,4],[0,4],[0,4],[0,4],[1073741824,4]);function Wi(e){let t=e.handler===`vide`,n=Vi(`ftyp`,new TextEncoder().encode(`isom`),F([1,4]),new TextEncoder().encode(`isomiso6mp41`)),r=Vi(`moov`,Hi(`mvhd`,0,0,F([0,4],[0,4],[e.timescale,4],[0,4],[65536,4],[256,2],[0,2],[0,4],[0,4]),Ui,new Uint8Array(24),F([2,4])),Vi(`trak`,Hi(`tkhd`,0,3,F([0,4],[0,4],[1,4],[0,4],[0,4],[0,4],[0,4],[0,2],[0,2],[t?0:256,2],[0,2]),Ui,F([(e.width??0)*65536,4],[(e.height??0)*65536,4])),Vi(`mdia`,Hi(`mdhd`,0,0,F([0,4],[0,4],[e.timescale,4],[0,4],[21956,2],[0,2])),Hi(`hdlr`,0,0,F([0,4]),new TextEncoder().encode(e.handler),new Uint8Array(12),F([0,1])),Vi(`minf`,t?Hi(`vmhd`,0,1,new Uint8Array(8)):Hi(`smhd`,0,0,F([0,4])),Vi(`dinf`,Hi(`dref`,0,0,F([1,4]),Hi(`url `,0,1))),Vi(`stbl`,Hi(`stsd`,0,0,F([1,4]),e.sampleEntry),Hi(`stts`,0,0,F([0,4])),Hi(`stsc`,0,0,F([0,4])),Hi(`stsz`,0,0,F([0,4],[0,4])),Hi(`stco`,0,0,F([0,4])))))),Vi(`mvex`,Hi(`trex`,0,0,F([1,4],[1,4],[0,4],[0,4],[0,4])))),i=new Uint8Array(n.length+r.length);return i.set(n,0),i.set(r,n.length),i}function Gi(e,t,n,r,i){let a=i?33554432:16842752,o=e=>Hi(`trun`,0,1793,F([1,4],[e,4],[n,4],[r.length,4],[a,4])),s=e=>Vi(`traf`,Hi(`tfhd`,0,131072,F([1,4])),Hi(`tfdt`,1,0,F([t,8])),o(e)),c=Hi(`mfhd`,0,0,F([e,4])),l=Vi(`moof`,c,s(0)).length,u=Vi(`moof`,c,s(l+8)),d=Vi(`mdat`,r),f=new Uint8Array(u.length+d.length);return f.set(u,0),f.set(d,u.length),f}function Ki(e,t,n=!1){let r=t?[35,...n?[32,33,34]:[]]:[9,...n?[7,8]:[]],i=zi(e).filter(e=>!r.includes(Bi(e,t))),a=new Uint8Array(i.reduce((e,t)=>e+4+t.length,0)),o=new DataView(a.buffer),s=0;for(let e of i)o.setUint32(s,e.length),a.set(e,s+4),s+=4+e.length;return a}var qi=e=>e.toString(16).padStart(2,`0`),Ji=e=>{let t=new Uint8Array(2+e.length);return t[0]=e.length>>8,t[1]=e.length&255,t.set(e,2),t},Yi=e=>{let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t};function Xi(e){let t=zi(e),n=t.filter(e=>Bi(e,!1)===7),r=t.filter(e=>Bi(e,!1)===8);return!n.length||!r.length||n[0].length<4?null:Yi([F([1,1],[n[0][1],1],[n[0][2],1],[n[0][3],1],[255,1],[224|n.length,1]),...n.map(Ji),F([r.length,1]),...r.map(Ji)])}function Zi(e,t,n){let r=zi(e),i=e=>r.filter(n=>Bi(n,t)===e),a=(e,t)=>Vi(e,new Uint8Array(6),F([1,2],[0,16],[n.w,2],[n.h,2],[4718592,4],[4718592,4],[0,4],[1,2]),new Uint8Array(32),F([24,2],[65535,2]),t);if(!t){let t=i(7),r=Xi(e);return r?{init:Wi({handler:`vide`,timescale:9e4,sampleEntry:a(`avc1`,Vi(`avcC`,r)),width:n.w,height:n.h}),mime:`video/mp4; codecs="avc1.${qi(t[0][1])}${qi(t[0][2])}${qi(t[0][3])}"`}:null}let o=i(32),s=i(33),c=i(34);if(!o.length||!s.length||!c.length)return null;let l=Xr(s[0]);if(l.length<15)return null;let u=l.subarray(3,15),d=u[0]&31,f=d===2?2:0,p=(e,t)=>Yi([F([128|e,1],[t.length,2]),...t.map(Ji)]),m=Vi(`hvcC`,F([1,1]),u,F([61440,2],[252,1],[253,1],[248|f,1],[248|f,1],[0,2],[15,1],[3,1]),p(32,o),p(33,s),p(34,c)),h=[``,`A`,`B`,`C`][u[0]>>6],g=0,_=(u[1]<<24|u[2]<<16|u[3]<<8|u[4])>>>0;for(let e=0;e<32;e++)_&1<>>0).toString(16),`${u[0]&32?`H`:`L`}${u[11]}`,...v.map(e=>e.toString(16))].join(`.`);return{init:Wi({handler:`vide`,timescale:9e4,sampleEntry:a(`hvc1`,m),width:n.w,height:n.h}),mime:`video/mp4; codecs="${y}"`}}function Qi(e,t,n,r,i,a){return Gi(e,t,n,Ki(r,i),a)}function $i(e,t){let n=Vi(`dOps`,F([0,1],[e,1],[312,2],[t,4],[0,2],[0,1]));return Wi({handler:`soun`,timescale:48e3,sampleEntry:Vi(`Opus`,new Uint8Array(6),F([1,2],[0,8],[e,2],[16,2],[0,4],[3145728e3,4]),n)})}function ea(e){if(!e.length)return 960;let t=e[0]>>3,n=t<12?[480,960,1920,2880][t%4]:t<16?[480,960][t%2]:[120,240,480,960][t%4],r=e[0]&3,i=r===0?1:r===3?(e[1]??1)&63:2;return n*Math.max(1,i)}function ta(e,t,n){return Gi(e,t,ea(n),n,!0)}var na={watch:30,player:4},ra={watch:{seek:.5,speed:1/0,target:.05},player:{seek:.15,speed:.06,target:.02}},ia={seek:.8,speed:.25,target:.12};function aa(e,t,n){let r=typeof n==`string`?ra[n]:n;return e>r.seek?{seekTo:t-r.target,rate:1}:e>r.speed?{seekTo:null,rate:1.1}:{seekTo:null,rate:1}}function oa(e,t=`watch`,n){return typeof VideoDecoder<`u`?new ha(e,t,n):new ka(e,t,n)}var sa=class{constructor(e,t=()=>performance.now()){this.ask=e,this.now=t,this.last=-1/0}waiting(){if(!this.ask)return;let e=this.now();e-this.last<1e3||(this.last=e,this.ask())}};function I(e){return e.length<3?null:{index:e[0]<<8|e[1],packet:e.subarray(2)}}var L=class{constructor(){this.last=-1}take(e){if(this.last>=0){let t=e-this.last&65535;if(t===0||t>=32768)return!1}return this.last=e,!0}reset(){this.last=-1}};function ca(e){if(e.length>=10)return e;let t=new Uint8Array(10);t.set(e.subarray(0,6));let n=new DataView(t.buffer);return n.setUint32(6,Math.round(n.getUint32(2)/100)||480),t}function la(e,t){return{snd:e,snd_decoded:t.decoded,snd_concealed:t.concealed,snd_underruns:t.underruns,snd_dropped:t.dropped}}var ua=class{constructor(e,t=.2){this.min=e,this.max=t,this.next=0,this.calmSince=0,this.minLead=1/0,this.windowAt=0,this.underruns=0,this.dropped=0,this.cushion=e}at(e,t){this.next0&&(this.underruns++,this.cushion=Math.min(this.max,this.cushion+.02)),this.calmSince=e,this.next=e+this.cushion,this.minLead=1/0,this.windowAt=e):e-this.calmSince>10&&this.cushion>this.min&&(this.cushion=Math.max(this.min,this.cushion-.01),this.calmSince=e);let n=this.next-e;if(n>this.cushion+.15)return this.dropped++,null;if(this.minLead=Math.min(this.minLead,n),e-this.windowAt>=.25){let t=this.minLead>this.cushion+da;if(this.minLead=1/0,this.windowAt=e,t)return this.dropped++,null}let r=this.next;return this.next+=t,r}reset(){this.next=0}},da=.02;async function fa(e,t){try{return typeof AudioDecoder>`u`?!1:!!(await AudioDecoder.isConfigSupported({codec:`opus`,sampleRate:e,numberOfChannels:t})).supported}catch{return!1}}var pa=class{constructor(e,t=()=>performance.now()){this.decoder=e,this.now=t,this.n={frames:0,dropped:0,late:0,stalls:0,stall_ms:0,worst_stall_ms:0,key_waits:0},this.a=0,this.d=0,this.w=!1,this.q=[],this.sum=0,this.cnt=0,this.codec=``}get frames(){return this.n.frames}arrived(){let e=this.now();this.a&&e-this.a>50&&this.n.late++,this.a=e}drop(){this.n.dropped++,this.w||this.n.key_waits++,this.w=!0}decoding(){this.w=!1,this.q.push(this.now())>64&&this.q.shift()}drawn(e=!1){let t=this.now(),n=e?this.q.shift():void 0;n!==void 0&&(this.sum+=t-n,this.cnt++);let r=this.d?t-this.d:0;r>100&&this.stall(r),this.d=t,this.n.frames++}stall(e){this.n.stalls++,this.n.stall_ms+=e,this.n.worst_stall_ms=Math.max(this.n.worst_stall_ms,e)}snapshot(){let e=this.d?this.now()-this.d:0,t={...this.n,decoder:this.decoder};this.codec&&(t.codec=this.codec),e>100&&(t.stalls=this.n.stalls+1,t.stall_ms=this.n.stall_ms+e,t.worst_stall_ms=Math.max(this.n.worst_stall_ms,e));for(let e of[`stall_ms`,`worst_stall_ms`])t[e]=Math.round(t[e]);return t.decode_ms=this.cnt?Math.round(this.sum/this.cnt*10)/10:0,this.sum=this.cnt=0,t}},ma=[`pointerup`,`touchend`,`click`,`keydown`],ha=class{get element(){if(!this.wrap){let e=document.createElement(`div`);e.className=`h-full w-full`,e.append(this.canvas),this.mse&&e.append(this.mse.element),this.wrap=e}return this.wrap}get stats(){return this.mse?.stats??this.ownStats}soundReport(){return this.soundOn?this.mseSound?this.mseSound.report():la(this.soundWasm?`wasm`:`webcodecs`,this.soundStats):null}constructor(e,t=`watch`,n){this.onProblem=e,this.latency=t,this.onNeedKey=n,this.canvas=document.createElement(`canvas`),this.wrap=null,this.mse=null,this.failsNoPicture=0,this.ctx=this.canvas.getContext(`2d`,{alpha:!1}),this.hevc=!1,this.header=null,this.spsRect=null,this.software=!1,this.video=null,this.opening=!1,this.stopped=!1,this.sawKey=!1,this.ownStats=new pa(`webcodecs`),this.problemShown=!1,this.ts=0,this.pipe=null,this.audioGen=0,this.actx=null,this.soundOn=!1,this.unarm=null,this.mseSound=null,this.audioHeader=null,this.soundWasm=!1,this.onSoundFail=null,this.muted=!1,this.keyAsk=new sa(n),this.clock=new ua(t===`player`?.05:.08),typeof AudioDecoder>`u`&&va()&&(this.mseSound=new ya(t,()=>this.mseSoundFailed())),this.canvas.className=`block h-full w-full object-contain`,this.canvas.dataset.testid=`watch-canvas`}setHevc(e){this.hevc=e,this.header&&(this.spsRect=ni(this.header,e)),this.mse?.setHevc(e)}get onMse(){return!!this.mse}decodeFailed(){if(this.mse||this.ownStats.frames>0||++this.failsNoPicture<3||!xa())return!1;let e=new ka(this.onProblem,this.latency,this.onNeedKey);e.setHevc(this.hevc),e.markProblemShown(),this.mse=e;let t=this.video;this.video=null;try{t?.close()}catch{}return this.canvas.style&&(this.canvas.style.display=`none`),this.wrap?.append(e.element),this.header&&e.onMessage(new Uint8Array([0,...this.header]).buffer),this.onNeedKey?.(),!0}startSound(){this.soundOn=!0,ga(),this.mseSound?this.mseSound.start():this.openContext()}openContext(){try{if(!this.actx){let e=new AudioContext({latencyHint:`interactive`});this.actx=e,e.onstatechange=()=>{this.actx===e&&e.state!==`running`&&e.state!==`closed`&&this.armResume()}}this.actx.resume().catch(()=>{})}catch{this.onSoundFail?.()}}get sound(){return this.soundOn}setMuted(e){this.muted=e,this.mseSound?.setMuted(e)}resumeSound(){if(!this.soundOn)return;if(this.mseSound)return this.mseSound.resume();let e=this.actx;e&&e.state!==`running`&&e.state!==`closed`&&(this.clock.reset(),e.resume().catch(()=>{}),this.armResume())}get soundStats(){return{decoded:this.pipe?.decoded??0,concealed:this.pipe?.concealed??0,underruns:this.clock.underruns,dropped:this.clock.dropped,cushionMs:Math.round(this.clock.cushion*1e3)}}armResume(){if(this.unarm||typeof window>`u`||!window.addEventListener)return;let e=()=>{let e=this.actx;if(!e||e.state===`closed`)return this.unarm?.();this.clock.reset(),e.resume().then(()=>{e.state===`running`&&this.unarm?.()}).catch(()=>{})};for(let t of ma)window.addEventListener(t,e,!0);this.unarm=()=>{for(let t of ma)window.removeEventListener(t,e,!0);this.unarm=null}}onMessage(e){let t=new Uint8Array(e);if(t.length<1||this.stopped)return;let n=t[0],r=t.subarray(1);if(this.mse&&(n===0||n===1))return n===0&&(this.header=r.slice()),this.mse.onMessage(e);n===0?this.openVideo(r.slice()):n===1?this.onVideo(r):n===3?this.openAudio(r.slice()):n===4&&this.onAudio(r)}async openVideo(e){if(this.header=e,this.spsRect=ni(e,this.hevc),!this.opening){this.opening=!0;try{let t=this.hevc?await Aa(e):Ii(e);if(this.mse||this.stopped)return;if(!t){this.problemShown=!0,this.onProblem(`no_hevc`);return}this.ownStats.codec=t;let n=this.hevc?void 0:Xi(e)??void 0;try{this.video?.close()}catch{}let r=new VideoDecoder({output:e=>{let t=this.realVisible(e),n=this.canvas;(n.width!==t.displayWidth||n.height!==t.displayHeight)&&(n.width=t.displayWidth,n.height=t.displayHeight),this.ctx?.drawImage(t,0,0,n.width,n.height),this.ownStats.drawn(!0),t.close(),this.problemShown&&(this.problemShown=!1,this.onProblem(null))},error:()=>{this.video===r&&(this.problemShown=!0,this.onProblem(`decode`),this.decodeFailed()||this.rebuild())}}),i={codec:t,optimizeForLatency:!0};n&&(i.description=n),this.software&&(i.hardwareAcceleration=`prefer-software`),r.configure(i),this.video=r,this.sawKey=!1}catch{this.problemShown=!0,this.onProblem(`decode`),this.decodeFailed()}finally{this.opening=!1}}}realVisible(e){let t=this.spsRect,n=ri(e,t);if(n)try{let t=new VideoFrame(e,{visibleRect:{x:n.x,y:n.y,width:n.w,height:n.h},displayWidth:n.w,displayHeight:n.h});return e.close(),t}catch{return e}let r=e.visibleRect;if(t&&r&&!this.software&&(r.width{if(this.video===e){try{e?.close()}catch{}this.rebuild(),this.onNeedKey?.()}})}return e}rebuild(){this.mse||this.stopped||(this.video=null,this.sawKey=!1,this.header&&this.openVideo(this.header).then(()=>this.keyAsk.waiting()))}onVideo(e){let t=this.video;if(t?.state===`closed`){this.opening||this.rebuild();return}if(!t||t.state!==`configured`)return;let n=Fi(e,this.hevc);if(this.ownStats.arrived(),!this.sawKey&&!n)return this.ownStats.drop(),this.keyAsk.waiting();if(!n&&t.decodeQueueSize>na[this.latency])return this.sawKey=!1,this.ownStats.drop(),this.keyAsk.waiting();this.sawKey=!0;let r=e;this.hevc?n&&this.header&&(r=new Uint8Array(this.header.length+e.length),r.set(this.header,0),r.set(e,this.header.length)):r=Ki(e,!1,!0),this.ts+=16667,this.ownStats.decoding(),t.decode(new EncodedVideoChunk({type:n?`key`:`delta`,timestamp:this.ts,data:r}))}openAudio(e){if(e.length<6)return;let t=++this.audioGen;if(this.pipe?.reset(),this.pipe=null,this.clock.reset(),this.audioHeader=e,this.mseSound)return this.mseSound.setHeader(e);let n=e[0];fa(new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(2),n).then(n=>{if(t!==this.audioGen)return;if(!n)return va()?this.soundThroughMse(e):this.soundThroughWasm(e);let r=new si((e,t)=>this.play(e,t,r.sampleRate));try{r.header(ca(e)),this.pipe=r}catch{this.soundThroughMse(e)}})}soundThroughMse(e){this.pipe=null,this.mseSound||(this.mseSound=new ya(this.latency,()=>this.mseSoundFailed()),this.soundOn&&this.mseSound.start()),this.mseSound.setHeader(e)}soundThroughWasm(e){this.pipe?.reset(),this.soundWasm=!0;let t=new si((e,n)=>this.play(e,n,t.sampleRate),Pi,()=>{this.pipe===t&&(this.pipe=null),this.onSoundFail?.()});this.pipe=t,t.header(ca(e))}mseSoundFailed(){let e=this.mseSound;e&&(this.mseSound=null,e.stop(),this.soundOn&&(this.openContext(),this.actx&&this.actx.state!==`running`&&this.armResume()),this.audioHeader&&this.soundThroughWasm(this.audioHeader))}onAudio(e){if(this.mseSound)return this.mseSound.frame(e);this.soundOn&&this.pipe&&this.pipe.packet(e)}play(e,t,n){let r=this.actx;if(!r||r.state!==`running`||!e.length)return;let i=e[0].length,a=this.clock.at(r.currentTime,i/n);if(a===null)return;let o=r.createBuffer(e.length,i,n),s=this.muted?0:t;e.forEach((e,t)=>o.copyToChannel(s===1?e:e.map(e=>e*s),t));let c=r.createBufferSource();c.buffer=o,c.connect(r.destination),c.start(a)}stop(){this.stopped=!0;try{this.video?.close()}catch{}this.mse?.stop(),this.audioGen++,this.pipe?.reset(),this.pipe=null,this.unarm?.(),this.actx?.close().catch(()=>{}),this.mseSound?.stop()}};function ga(){try{let e=navigator.audioSession;e&&e.type!==`playback`&&(e.type=`playback`)}catch{}}function _a(e,t){try{return e.isTypeSupported(t)}catch{return!1}}function va(){let e=typeof window>`u`?null:xa();return!!e&&(_a(e,`audio/mp4; codecs="Opus"`)||_a(e,`audio/mp4; codecs="opus"`))}var ya=class{constructor(e,t,n=document.createElement(`audio`)){this.onFail=t,this.header=null,this.time=0,this.on=!1,this.failed=!1,this.order=new L,this.el=n,this.track=new Ta(n,()=>this.fail(),e===`player`?ia:e)}get playing(){return this.on&&!this.failed}report(){return{snd:`mse`,snd_jumps:this.track.seeks}}setHeader(e){this.header=e,this.on&&this.open()}start(){if(!this.on&&(this.on=!0,this.header&&this.open(),!this.failed))try{this.el.play()?.catch?.(()=>{})}catch{}}frame(e){if(!this.on||this.failed||!this.track.ready&&!this.track.backlog)return;let t=I(e);if(!t||!this.order.take(t.index))return;let n=ta(this.track.nextSeq(),this.time,t.packet);this.time+=ea(t.packet),this.track.push(n)}setMuted(e){this.el.muted=e}resume(){if(this.playing&&this.el.paused)try{this.el.play()?.catch?.(()=>{})}catch{}}stop(){this.on=!1,this.track.close()}open(){let e=this.header;if(!e||e.length<6||this.failed)return;let t=e[0],n=$i(t,new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(2));this.track.open(`audio/mp4; codecs="Opus"`,n)||this.track.open(`audio/mp4; codecs="opus"`,n)?(this.time=0,this.order.reset()):this.fail()}fail(){this.failed||(this.failed=!0,this.onFail())}},ba=class{constructor(e,t,n=Pi){this.onFail=t,this.codecs=n,this.actx=null,this.pipe=null,this.header=null,this.on=!1,this.failed=!1,this.muted=!1,this.unarm=null,this.played=!1,this.clock=new ua(e===`player`?.05:.08)}get playing(){return this.on&&!this.failed}get stats(){return{decoded:this.pipe?.decoded??0,concealed:this.pipe?.concealed??0,underruns:this.clock.underruns,dropped:this.clock.dropped}}start(){if(!this.failed){this.on=!0,ga();try{if(!this.actx){let e=new AudioContext({latencyHint:`interactive`});this.actx=e,e.onstatechange=()=>{this.actx===e&&e.state!==`running`&&e.state!==`closed`&&this.armResume()}}this.actx.resume().catch(()=>{}),this.actx.state!==`running`&&this.armResume()}catch{return this.fail()}this.header&&!this.pipe&&this.open()}}setHeader(e){e.length<6||(this.header=e,this.pipe?.reset(),this.pipe=null,this.clock.reset(),this.on&&this.open())}frame(e){this.on&&!this.failed&&this.pipe?.packet(e)}setMuted(e){this.muted=e}resume(){let e=this.actx;this.playing&&e&&e.state!==`running`&&e.state!==`closed`&&(this.clock.reset(),e.resume().catch(()=>{}),this.armResume())}stop(){this.on=!1,this.pipe?.reset(),this.pipe=null,this.unarm?.(),this.actx?.close().catch(()=>{}),this.actx=null}open(){let e=this.header;if(!e||this.failed)return;let t=new si((e,n)=>this.play(e,n,t.sampleRate),this.codecs,()=>{this.pipe===t&&this.fail()});this.pipe=t,t.header(ca(e))}play(e,t,n){let r=this.actx;if(!r||r.state!==`running`||!e.length)return;let i=e[0].length,a=this.clock.at(r.currentTime,i/n);if(a===null)return;let o=r.createBuffer(e.length,i,n),s=this.muted?0:t;e.forEach((e,t)=>o.copyToChannel(s===1?e:e.map(e=>e*s),t));let c=r.createBufferSource();c.buffer=o,c.connect(r.destination),c.start(a),this.played=!0}armResume(){if(this.unarm||typeof window>`u`||!window.addEventListener)return;let e=()=>{let e=this.actx;if(!e||e.state===`closed`)return this.unarm?.();this.clock.reset(),e.resume().then(()=>{e.state===`running`&&this.unarm?.()}).catch(()=>{})};for(let t of ma)window.addEventListener(t,e,!0);this.unarm=()=>{for(let t of ma)window.removeEventListener(t,e,!0);this.unarm=null}}fail(){this.failed||(this.failed=!0,this.stop(),this.onFail())}};function xa(){let e=window;return e.ManagedMediaSource??e.MediaSource??null}var Sa=10,Ca=3;function wa(e,t,n,r=Ca){let i=null;for(let a of e)a>t&&a<=n-r&&(i=a);return i}var Ta=class{constructor(e,t,n=`watch`,r,i=()=>performance.now()){this.el=e,this.onError=t,this.latency=n,this.onNeedKey=r,this.now=i,this.ms=null,this.sb=null,this.queue=[],this.mime=``,this.seq=1,this.ready=!1,this.dropped=!1,this.keys=null,this.seeks=0,this.maxLagS=0,this.fromZero=0,this.trims=0,this.lastJump=null,this.trimAt=-1,this.trimFrom=-1,this.keyAt=-1,this.attached=null,r&&(this.keys=[])}setEdge(e){this.latency=e}markKey(e){this.keys?.push(e),this.keyAt=this.now()}open(e,t){let n=xa();if(!n||!_a(n,e))return!1;this.close();let r=new n;return this.ms=r,this.mime=e,this.queue=[t],this.seq=1,this.ready=!1,this.keys&&=[],r.addEventListener(`sourceopen`,()=>{if(this.ms===r)try{let e=r.addSourceBuffer(this.mime);e.mode=`segments`,e.addEventListener(`updateend`,()=>this.pump()),e.addEventListener(`error`,()=>this.onError()),this.sb=e,this.ready=!0,this.pump()}catch{this.onError()}}),`ManagedMediaSource`in window&&n===window.ManagedMediaSource&&(this.el.disableRemotePlayback=!0),this.attached=Ea(this.el,r),!0}nextSeq(){return this.seq++}get backlog(){return this.queue.length}push(e){this.queue.push(e),this.pump()}pump(){let e=this.sb;if(!e||e.updating||!this.ready)return;let t=this.el;if(e.buffered.length){let n=e.buffered.end(e.buffered.length-1),r=e.buffered.start(0),i=n-t.currentTime,a=aa(i,n,this.latency);if(a.seekTo!==null){this.seeks++,this.maxLagS=Math.max(this.maxLagS,i);let o=this.now(),s=e=>e<0?-1:Math.round(o-e);t.currentTime<.05&&r>1&&this.fromZero++,this.lastJump={at:t.currentTime,start:r,end:n,ranges:e.buffered.length,readyState:t.readyState,paused:t.paused,seeking:t.seeking,sinceTrimMs:s(this.trimAt),trimFrom:this.trimFrom,sinceKeyMs:s(this.keyAt)},t.currentTime=Math.max(r,a.seekTo)}if(t.playbackRate!==a.rate&&(t.playbackRate=a.rate),t.currentTime-r>Sa&&this.trim(e,r))return}let n=this.queue.shift();if(n){try{e.appendBuffer(n)}catch{this.dropped=!0}t.paused&&t.play().catch(()=>{})}}trim(e,t){let n=this.el.currentTime,r=n-Ca;if(this.keys){if(r=wa(this.keys,t,n),r===null)return(this.keys[this.keys.length-1]??-1/0)<=n-Ca&&this.onNeedKey?.(),!1;let e=r;this.keys=this.keys.filter(t=>t>=e),r-=.001}try{return e.remove(t,r),this.trims++,this.trimAt=this.now(),this.trimFrom=n,!0}catch{return!1}}close(){this.ready=!1,this.sb=null,this.queue=[];let e=this.ms;if(this.ms=null,e&&e.readyState===`open`)try{e.endOfStream()}catch{}if(this.attached===`object`)try{this.el.srcObject=null}catch{}this.attached=null,this.el.src?.startsWith(`blob:`)&&URL.revokeObjectURL(this.el.src),this.el.removeAttribute(`src`)}};function Ea(e,t){if(`srcObject`in e)try{return e.srcObject=t,`object`}catch{}return e.src=URL.createObjectURL(t),`url`}var Da=1e4,Oa=class{constructor(e=3,t=Da,n=()=>performance.now()){this.max=e,this.windowMs=t,this.now=n,this.at=[]}fail(){let e=this.now();return this.at=this.at.filter(t=>e-t=this.max}clear(){this.at=[]}},ka=class{constructor(e,t=`watch`,n,r){this.onProblem=e,this.latency=t,this.wasm=null,this.audioHeader=null,this.muted=!1,this.gaveUp=!1,this.reopening=!1,this.failedWhileOpening=!1,this.wrap=document.createElement(`div`),this.hevc=!1,this.header=null,this.sawKey=!1,this.stats=new pa(`mse`),this.problemShown=!1,this.vTime=0,this.vLast=0,this.soundOn=!1,this.onSoundFail=null,this.onGiveUp=null,this.keyAsk=new sa(n),this.fails=new Oa(3,Da,r);let i=document.createElement(`video`);i.muted=!0,i.autoplay=!0,i.playsInline=!0,i.className=`block h-full w-full object-contain`,i.dataset.testid=`watch-video`,this.audio=new ya(t,()=>this.soundThroughWasm()),this.wrap.className=`h-full w-full`,this.wrap.append(i,this.audio.el),this.video=new Ta(i,()=>this.showProblem(),t,()=>this.keyAsk.waiting()),i.addEventListener(`error`,()=>this.restartVideo()),i.addEventListener(`playing`,()=>{this.fails.clear(),this.problemShown&&(this.problemShown=!1,this.onProblem(null))})}markProblemShown(){this.problemShown=!0}showProblem(){this.problemShown||(this.problemShown=!0,this.onProblem(`decode`))}restartVideo(){if(this.gaveUp)return;if(this.reopening){this.failedWhileOpening=!0;return}if(this.showProblem(),this.fails.fail()){this.gaveUp=!0,this.video.close(),this.onGiveUp?.();return}let e=this.header;if(e){this.header=null,this.reopening=!0,this.failedWhileOpening=!1;try{this.openVideo(e)}finally{this.reopening=!1}this.sawKey=!1,this.keyAsk.waiting(),this.failedWhileOpening&&(this.failedWhileOpening=!1,this.restartVideo())}}get failed(){return this.gaveUp}setVideoEdge(e){this.video.setEdge(e)}get videoSeeks(){return{seeks:this.video.seeks,maxLagMs:Math.round(this.video.maxLagS*1e3),fromZero:this.video.fromZero,trims:this.video.trims,lastJump:this.video.lastJump}}get element(){return this.wrap}resume(){let e=this.video.el;e.paused&&e.play()?.catch?.(()=>{})}setHevc(e){this.hevc=e}startSound(){if(this.soundOn=!0,this.wasm)return this.wasm.start();if(!va())return this.soundThroughWasm();this.audio.start()}soundThroughWasm(){if(this.wasm)return;this.audio.stop();let e=new ba(this.latency,()=>this.onSoundFail?.());this.wasm=e,e.setMuted(this.muted),this.audioHeader&&e.setHeader(this.audioHeader),this.soundOn&&e.start()}resumeSound(){this.soundOn&&(this.wasm?this.wasm.resume():this.audio.resume())}setMuted(e){this.muted=e,this.audio.setMuted(e),this.wasm?.setMuted(e)}soundReport(){return this.soundOn?this.wasm?la(`wasm`,this.wasm.stats):this.audio.report():null}get soundPlaying(){return this.wasm?this.wasm.played:this.audio.playing}get sound(){return this.soundOn}onMessage(e){let t=new Uint8Array(e);if(t.length<1)return;let n=t[0],r=t.subarray(1);n===0?this.openVideo(r.slice()):n===1?this.onVideo(r):n===3?(this.audioHeader=r.slice(),(this.wasm??this.audio).setHeader(this.audioHeader)):n===4&&(this.wasm??this.audio).frame(r)}openVideo(e){let t=!!this.header&&this.header.length===e.length&&this.header.every((t,n)=>t===e[n]);if(t&&this.video.ready)return;if(this.gaveUp){if(t)return;this.gaveUp=!1,this.fails.clear()}this.header=e;let n=ni(e,this.hevc)??{w:1920,h:1080},r=Zi(e,this.hevc,n);r&&(this.stats.codec=/codecs="([^"]+)"/.exec(r.mime)?.[1]??``,this.video.open(r.mime,r.init)?(this.sawKey=!1,this.vTime=0,this.vLast=0):(this.problemShown=!0,this.onProblem(this.hevc?`no_hevc`:`decode`)))}onVideo(e){if(!this.video.ready&&!this.video.backlog)return;let t=Fi(e,this.hevc);if(this.video.dropped&&(this.video.dropped=!1,this.sawKey=!1),this.stats.arrived(),!this.sawKey&&!t)return this.stats.drop(),this.keyAsk.waiting();if(!t&&this.video.backlog>na[this.latency])return this.sawKey=!1,this.stats.drop(),this.keyAsk.waiting();this.sawKey=!0,this.stats.drawn();let n=performance.now(),r=this.vLast?Math.min(9e3,Math.max(750,Math.round((n-this.vLast)*90))):1500;this.vLast=n,t&&this.video.markKey(this.vTime/9e4),this.video.push(Qi(this.video.nextSeq(),this.vTime,r,e,this.hevc,t)),this.vTime+=r}stop(){this.video.close(),this.audio.stop(),this.wasm?.stop()}};async function Aa(e){let t=ii(e);if(t&&typeof VideoDecoder<`u`)try{if((await VideoDecoder.isConfigSupported({codec:t,codedWidth:1920,codedHeight:1080})).supported)return t}catch{}return Ri(1920,1080)}var R={CROSS:1,CIRCLE:2,SQUARE:4,TRIANGLE:8,LEFT:16,RIGHT:32,UP:64,DOWN:128,L1:256,R1:512,L3:1024,R3:2048,OPTIONS:4096,SHARE:8192,TOUCHPAD:16384,PS:32768},ja={buttons:0,l2:0,r2:0,lx:0,ly:0,rx:0,ry:0};function Ma(e,t){let n=e=>Math.max(0,Math.min(1,e));return[Math.round(n(e)*1919),Math.round(n(t)*941)]}var Na={ArrowUp:{button:R.UP},ArrowDown:{button:R.DOWN},ArrowLeft:{button:R.LEFT},ArrowRight:{button:R.RIGHT},Enter:{button:R.CROSS},Space:{button:R.CROSS},Backspace:{button:R.CIRCLE},Escape:{button:R.CIRCLE},KeyQ:{button:R.SQUARE},KeyE:{button:R.TRIANGLE},KeyZ:{button:R.L1},KeyC:{button:R.R1},Digit1:{trigger:`l2`},Digit3:{trigger:`r2`},KeyF:{button:R.L3},KeyG:{button:R.R3},Tab:{button:R.OPTIONS},Backquote:{button:R.SHARE},KeyH:{button:R.PS},KeyT:{button:R.TOUCHPAD},KeyW:{stick:`ly`,dir:-1},KeyS:{stick:`ly`,dir:1},KeyA:{stick:`lx`,dir:-1},KeyD:{stick:`lx`,dir:1},KeyI:{stick:`ry`,dir:-1},KeyK:{stick:`ry`,dir:1},KeyJ:{stick:`rx`,dir:-1},KeyL:{stick:`rx`,dir:1}};R.UP,R.DOWN,R.LEFT,R.RIGHT,R.CROSS,R.CIRCLE,R.SQUARE,R.TRIANGLE,R.L1,R.R1,R.L3,R.R3,R.OPTIONS,R.SHARE,R.PS,R.TOUCHPAD;var Pa=e=>Math.max(-32768,Math.min(32767,Math.round(e)));function Fa(e,t=Na){let n={...ja};for(let r of e){let e=t[r];e&&(`button`in e?n.buttons|=e.button:`stick`in e?n[e.stick]=Pa(n[e.stick]+e.dir*32767):n[e.trigger]=255)}return n}var Ia=[R.CROSS,R.CIRCLE,R.SQUARE,R.TRIANGLE,R.L1,R.R1,0,0,R.SHARE,R.OPTIONS,R.L3,R.R3,R.UP,R.DOWN,R.LEFT,R.RIGHT,R.PS,R.TOUCHPAD];function La(e){return Math.abs(e)<=1.01?Math.round((e+1)*3.5)%8:null}var Ra=[0,1,1,1,0,-1,-1,-1],za=[-1,-1,0,1,1,1,0,-1];function Ba(e,t){let n=e.axes[t.a]??0;if(t.hat){let e=La(n);return e===null?0:(t.hat===`x`?Ra:za)[e]}return t.inv?-n:n}var Va={buttons:Ia.flatMap((e,t)=>e?[[e,{b:t}]]:[]),l2:{b:6},r2:{b:7},lx:{a:0},ly:{a:1},rx:{a:2},ry:{a:3}};function Ha(e,t,n=!1){if(`b`in t){let r=e.buttons[t.b];return r?n&&r.value>0?Math.min(1,r.value):Math.max(+!!r.pressed,r.value):0}if(`h`in t){let n=La(e.axes[t.h]??9);if(n===null)return 0;let r=(n-t.at+8)%8;return+(r===0||r===1||r===7)}let r=e.axes[t.a];if(r===void 0)return 0;let i=t.rest??0;return Math.min(1,Math.max(0,(r-i)/(t.d-i)))}function Ua(e){if(e.mapping===`standard`)return Va;let t=Wa.get(e.id);if(t)return t;let n=e.axes.findIndex(e=>Math.abs(e)>1.05);if(n<0)return Va;let r={...Va,buttons:[...Va.buttons,[R.UP,{h:n,at:0}],[R.RIGHT,{h:n,at:2}],[R.DOWN,{h:n,at:4}],[R.LEFT,{h:n,at:6}]]};return Wa.set(e.id,r),r}var Wa=new Map;function Ga(e,t=Ua){let n={...ja},r=e=>Math.abs(e)<.08?0:Pa(e*32767),i=(e,t)=>Math.abs(t)>Math.abs(e)?t:e,a=(e,t)=>t?r(Ba(e,t)):0;for(let r of e){if(!r||!r.connected)continue;let e=t(r);for(let[t,i]of e.buttons)Ha(r,i)>.5&&(n.buttons|=t);e.l2&&(n.l2=Math.max(n.l2,Math.round(Ha(r,e.l2,!0)*255))),e.r2&&(n.r2=Math.max(n.r2,Math.round(Ha(r,e.r2,!0)*255))),n.lx=i(n.lx,a(r,e.lx)),n.ly=i(n.ly,a(r,e.ly)),n.rx=i(n.rx,a(r,e.rx)),n.ry=i(n.ry,a(r,e.ry))}return n}function Ka(e,t){return{buttons:e.buttons|t.buttons,l2:Math.max(e.l2,t.l2),r2:Math.max(e.r2,t.r2),lx:Pa(e.lx+t.lx),ly:Pa(e.ly+t.ly),rx:Pa(e.rx+t.rx),ry:Pa(e.ry+t.ry),touch:e.touch??t.touch??null,motion:e.motion??t.motion??null}}function qa(e,t,n,r=()=>globalThis.navigator?.getGamepads?.()??[]){let i=e=>e?.vibrationActuator;for(let a of e.some(i)?e:r()){let e=i(a);e&&(t===0&&n===0?e.reset?.():e.playEffect?.(`dual-rumble`,{duration:1e3,strongMagnitude:t/255,weakMagnitude:n/255}))}}var Ja=new Map;function Ya(e,t){return{id:`${e.id} (app)`,index:3+e.slot,connected:!0,mapping:`standard`,timestamp:0,axes:e.axes,buttons:e.buttons.map(e=>({pressed:e>.5,touched:e>0,value:e})),vibrationActuator:t?.vibrationActuator??null,hapticActuators:t?.hapticActuators??[]}}function Xa(e){let t=e?.getGamepads?.()??[];return Ja.size===0||t.some(e=>!!e?.connected)?[...t]:[...Ja.values()].sort((e,t)=>e.slot-t.slot).map(e=>Ya(e))}var Za=`b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b1,b2,b0,b3,b6,b4,b7,b5,b8,b9,,,-a1,+a1,-a0,+a0(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,,,,,,,a0,a1(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b2,b1,b3,b0,b4,b5,,,b8,b9,,,-a1,+a1,-a0,+a0(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b2,b3,b0,b1,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b11,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a5(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1(b1,b0,b2,b3,,b7,a3,a4,,b9,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a5,a2(b1,b0,b2,b3,,b7,a3,a4,,b9,,,b12,b14,b15,b13,,,a0,a1,a5,a2(b1,b0,b2,b3,,b7,b4,b5,,b9,,,b12,b14,b15,b13,,,a0,a1,a5~,a2~(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,b8,,a0,a1,a3,a4(b1,b2,,,b7,b5,b4,,,b9,,,b12,b14,b15,b13,,,a0,a1,a5,a2(b0,b1,b3,b4,b6,b5,b7,b2,b8,,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b7,b9,b10,b2,b8,,,h0.1,h0.4,h0.8,h0.2,b5,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,-a1,+a1,-a0,+a0(b0,b1,b3,b4,b6,b5,b7,b2,,b8,,,-a1,+a1,-a0,+a0(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b12,b13,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a5,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b14,,a0,a1,a2,a3(b14,b13,b15,b12,b10,b11,b8,b9,b0,b3,b1,b2,b4,b6,b7,b5,b16,,a0,a1,a2,a3(b0,b1,b3,b2,b4,b5,a2,a5,b8,b9,b11,b12,h0.1,h0.4,h0.8,h0.2,b10,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13,a0,a1,a2,a5(b2,b1,b3,b0,b6,b7,b4,b5,b8,b9,,,-a1,+a1,-a0,+a0(b1,b2,b0,b3,b4,b5,,,b8,b9,,,b12,b13,b15,b14,,,a0,a1,a3,a4(b0,b1,b3,b2,b4,b5,b6,b7,b8,b9,b11,b12,b13,b14,b15,b16,b10,,a0,a1,a2,a3(b0,b1,b3,b2,,b6,a2,a5,,b7,,,b8,b9,b10,b11,,,a0,a1,a3,a4(b0,b1,b3,b2,b4,b5,,,b8,b9,,,b10,b11,b12,b13,,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,,,b13,b8,b10,,,,,,,,hx,hy(b0,b1,b2,b3,b4,b5,,,b12,b9,b11,,,,,,,,hx,hy(b0,b1,b3,b2,b5,b6,b7,b8,b9,b10,b12,b13,b14,b15,b16,b17,b11,,a0,a1,a2,a3(b0,b1,b3,b2,b5,b6,b7,b8,b9,b10,b12,b13,h0.1,h0.4,h0.8,h0.2,b11,,a0,a1,a2,a3(b0,b1,b3,b2,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b0,b1,,,,b2,,b4,,b5,,,h0.1,h0.4,h0.8,h0.2,b6(b0,b1,b2,b3,b12,b4,b13,b5,b14,b6,b15,b7,b11,b8,b10,b9,b16,,a0,a1~,a2,a3~(b1,b3,b0,b2,b13,b5,b12,b4,,b6,,,b11,b8,b10,b9,b16,,a0,a1~,a2,a3~(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b33,,a0,a1,a2,a3(b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b16,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b15,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,,,,,b8,,a0,a1,a3,a4(b1,b0,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12,b13(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,,h0.1,h0.4,h0.8,h0.2,b12,b13(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b11,b12,h0.1,h0.4,h0.8,h0.2,b10,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,b12,b13,b14,b15,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,b14,b13,b14,b13,,,a0,a1,a3,a4(b1,b0,b2,b3,,,,,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b2,b3,b1,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b10(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12,b13,a0,a1,a2,a5(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,+a2,+a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,b8,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b13,,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b0,b3,b2,b4,b5,a2,a5,b6,b7,,,h0.1,h0.4,h0.8,h0.2,b8(b1,b2,,,,,,,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b21,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a5,a4,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,b8,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b13,b13,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,a5,a4,,b6,b7,b8,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a2,a5,b7,b6,b9,b10,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,b7,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a5,a4,b9,b6,b7,b8,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b22,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a2,a3,b6,b7,b9,,b12,b14,b15,b13,b8,,a0,a1(b3,b4,b5,b6,b7,b8,a9,a8,b11,b12,b14,b15,b16,b17,b18,b19,b13,,a0,a1,a2,a3(b0,b1,b3,b4,b8,b6,b9,b7,,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b7,b9,b6,b8,b10,b11,,,h0.1,h0.4,h0.8,h0.2(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b1,b0,b4,b3,b6,b7,,,b10,b11,,,-a1,+a1,-a0,+a0(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,,,b6,b7,b8,b9,,b11,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b3,b1,b4,,b10,a5,a4,,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,,,b6,b7,b8,b9,b10,b11,b13,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,,,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b0,b1,b3,b4,,b6,,b7,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,,,,,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a8,b9,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b8,b6,b9,b7,,b10,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a4,a5,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,,,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b2,b0,b3,b6,b4,b7,b5,b8,b9,,,-a4,+a4,-a3,+a3(b4,b8,b0,b12,b16,b20,b24,b28,b32,b36,b40,b44,h0.1,h0.4,h0.8,h0.2,,,a0,a4,a8,a12(b8,b12,b0,b4,b16,b20,b24,b28,b32,b36,,,h0.1,h0.4,h0.8,h0.2,b44,,a0,a4,a8,a12(b4,b0,b8,b12,,b28,a12,a16,,b36,,,h0.1,h0.4,h0.8,h0.2,,,a0,a4,a20,a8(b1,b2,b0,b3,,b7,a3,a4,,b9,,,b12,b14,b15,b13,,,a0,a1,a5,a2(b4,b0,b8,b12,,b28,a12,a16,,b36,,,b48,b56,b60,b52,,,a0,a4,a20,a8(b1,b2,,,b7,b5,a3,,,b9,,,b12,b14,b15,b13,,,a0,a1,a5,a2(b0,b1,b2,b3,b4,b5,a2,a5,b9,b8,b6,b7,b11,b12,b13,b14,b10,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b7,,,b5,b8,,,-a1,+a1,-a0,+a0,b2(b0,b1,b2,b3,b4,b5,b6,b15,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b13,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a5(b0,b1,b3,b4,b6,b7,a5,a4,b12,b13,b15,b16,h0.1,h0.4,h0.8,h0.2,b14,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,,,-a1,+a1,-a0,+a0,b2(b0,b1,b3,b4,b6,b7,,,b10,b11,,,-a1,+a1,-a0,+a0(b0,b1,b3,b4,b6,b7,b8,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a31(b0,b1,b3,b4,b8,b6,b9,b7,,b11,,,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a3,a4(b1,b0,b4,b3,b6,b7,a4,a5,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,,,b10,b11,,,,,,,,,hx,hy(b0,b1,b2,b3,b4,b5,b6,b7,b16,b15,b8,b9,b10,b11,b13,b12,b17,,a0,a1~,a2,a3~(b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a4(b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b2,b3,b33,b5,,,b6,b7,,,h0.1,h0.4,h0.8,h0.2(b0,b1,b3,b4,b6,b2,,,,b9,,,h0.1,h0.4,h0.8,h0.2(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a3,a4(b1,b2,,,b6,,b9,b7,,b8,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a2(b2,b1,b3,b0,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b3,b4,,b6,,b2,b7,b9,,,b2,b14,b15,b13(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b5,b7,b2,b10,b8,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b6,b7,a5~,a2~,b2,b8,b8,b5,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b4,,b9,b10,b6,b7,b8,,b5,b2,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,,,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b5,b4,b10,b11,b7,b6,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b3,b2,b6,b7,b4,b5,b8,b9,b11,b12,b13,b14,b15,b16,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b16,b19,b17,b18,b6,b7,b8,b9,b10,b11,b13,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a3,a4(b2,b1,b3,b0,b6,b7,b4,b5,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a5,a2(b0,b1,b2,b3,b4,b5,a2,a2,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a2,,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,b8,b9,b6,b7,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,b10,b11,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,b10,b11,b7,b6,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b1,b2,b0,b3,b10,b5,b11,b7,b8,b9,b4,b6,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b2,b0,b3,b5,b7,b4,b6,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,a3,a4,b8,b13,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13,a0,a1,a2,a5(b0,b4,b2,b1,b3,b6,,,b11,b9,,,h0.1,h0.4,h0.8,h0.2(b1,b2,b0,b3,b4,b5,a2,a5,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b9,b10,a4,a5,b4,b6,b7,b8,b11,b12,b13,b14,,,a0,a1,a2,a3(b1,b0,b3,b2,b4,b5,,,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b2,b3,b4,b5,+a2,-a2,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b1,b0,b3,b2,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,,,,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,+a2,-a2,b6,b7,b8,b9,b11,b14,b12,b13,b10,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,,a2,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b7,a4,a3,,,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,,,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b6,b7,b9,b10,b12,b13,b14,b15,b16,b17,b19,b20,h0.1,h0.4,h0.8,h0.2,b18,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,+a2,-a2,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,,,,,,,b7,b6,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b6,b7,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b6,b7,,,b10,b11,,,,,,,,,a0,a1(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a5(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a3,a4(b1,b0,b4,b3,,b6,,b7,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a5`.split(`(`),Qa={l00790006:0,l00790011:1,l00790016:2,l00790122:3,l00790126:4,l00791800:5,l00791803:6,l0079181a:7,l0079181b:8,l0079181c:9,l00791830:10,l00791843:11,l00791844:12,l00791845:11,l00791846:13,l007918d2:7,l007918d4:14,l0079954e:15,l046dc20a:16,l046dc211:17,l046dc216:5,l046dc218:5,l046dc219:5,l046dc21a:18,l046dc21d:14,l046dc21e:14,l046dc21f:14,l046dcad1:5,l046dcad2:5,l04b4010a:19,l04b42411:20,l04b42412:21,l054c0268:22,l054c05c4:23,l054c09cc:24,l054c0ba0:24,l054c0cda:25,l054c0ce6:24,l054c0df2:24,l054c0e5f:24,l054c1337:26,l057e0330:27,l057e0337:28,l057e1337:29,l057e2006:30,l057e2007:31,l057e2008:32,l057e2009:33,l057e2017:34,l057e201e:35,l057e2069:36,l057e2073:37,l05ac022d:38,l05ac055b:39,l05ac057a:40,l05ac061a:41,l0e6f0109:42,l0e6f011e:7,l0e6f011f:14,l0e6f0128:5,l0e6f012f:7,l0e6f0130:7,l0e6f0131:14,l0e6f0139:14,l0e6f0146:43,l0e6f0164:14,l0e6f0180:7,l0e6f0181:7,l0e6f0184:7,l0e6f0185:44,l0e6f0187:7,l0e6f0188:7,l0e6f0203:45,l0e6f0207:46,l0e6f0213:14,l0e6f0214:7,l0e6f02a7:14,l0e6f02a8:47,l0e6f02b2:48,l0e6f02b8:14,l0e6f02c8:14,l0e6f02d7:49,l0e6f02d8:14,l0e6f02da:14,l0e6f02ef:14,l0e6f02f1:14,l0e6f0301:14,l0e6f0315:14,l0e6f0401:14,l0e6f0413:14,l0e6f1112:50,l0e6f1113:51,l0e6ff501:14,l0f0d0009:7,l0f0d0010:42,l0f0d0011:7,l0f0d0016:52,l0f0d0022:42,l0f0d004d:7,l0f0d005e:53,l0f0d005f:54,l0f0d0066:24,l0f0d0067:14,l0f0d006a:8,l0f0d006b:7,l0f0d006d:55,l0f0d006e:7,l0f0d0084:8,l0f0d0085:7,l0f0d0086:47,l0f0d0087:56,l0f0d0088:57,l0f0d0092:58,l0f0d00aa:39,l0f0d00c1:7,l0f0d00ee:59,l0f0d00f6:60,l0f0d00fb:39,l0f0d0137:61,l0f0d0138:62,l0f0d0150:14,l0f0d0185:14,l0f0d0196:63,l0f0d01ab:63,l15320401:24,l15320402:7,l15320705:64,l15320900:65,l15320a03:14,l15320a14:14,l15320a29:14,l15321000:8,l15321008:66,l1532100a:59,l1532100b:24,l15321100:24,l18d19400:65,l20d60dad:67,l20d62002:68,l20d62005:14,l20d6200b:14,l20d6200f:69,l20d62065:14,l20d62802:14,l20d64001:70,l20d64002:70,l20d64005:14,l20d66271:71,l20d6792a:24,l20d689e5:71,l20d6a710:5,l20d6a711:7,l20d6a712:7,l20d6a713:7,l20d6a714:7,l20d6ca6d:7,l24c65300:14,l24c6531a:14,l24c6541a:14,l24c6543a:14,l24c6581a:14,l24c65b02:14,l24c65d04:14,l24c6891a:63,l24c6891b:63,l24c6892a:72,l24c6892b:63,l24c6fafe:14,l27f80bbf:63,l28de1102:73,l28de1105:73,l28de1106:73,l28de1142:73,l28de11fc:43,l28de11ff:14,l28de1201:73,l28de1202:73,l28de1205:74,l2dc80651:75,l2dc81003:76,l2dc81080:76,l2dc82000:14,l2dc82003:14,l2dc8200a:77,l2dc82019:14,l2dc82025:14,l2dc82101:63,l2dc82830:78,l2dc82862:79,l2dc82865:79,l2dc82869:80,l2dc8286a:81,l2dc83010:82,l2dc83011:63,l2dc83012:63,l2dc83013:63,l2dc83015:63,l2dc83016:63,l2dc83017:63,l2dc83019:83,l2dc8301b:63,l2dc8301d:63,l2dc83100:84,l2dc83101:85,l2dc83102:85,l2dc83103:85,l2dc83104:85,l2dc83106:14,l2dc8310a:14,l2dc8310b:14,l2dc83230:86,l2dc83810:79,l2dc83820:87,l2dc85006:88,l2dc85101:89,l2dc85103:86,l2dc85104:90,l2dc85107:91,l2dc85108:91,l2dc85109:90,l2dc85111:92,l2dc85112:82,l2dc86000:92,l2dc86001:93,l2dc86002:92,l2dc86006:82,l2dc86007:94,l2dc86009:82,l2dc86012:63,l2dc86100:87,l2dc86101:93,l2dc86102:92,l2dc86728:95,l2dc89000:96,l2dc89001:96,l2dc89012:93,l2dc89015:79,l2dc89018:78,l2dc89020:97,l2dc89025:98,l2dc8ab21:78,l35371004:14,l35371007:63,l3537100b:14,l35371046:63,l35371058:63,l35371094:63,l35371097:63,l358a0102:63,l358a0202:63,l358a0203:63,l358a0204:63,m00790006:99,m00790011:100,m00791800:101,m00791803:102,m0079181c:41,m00791843:103,m00791844:104,m00791846:105,m007918d2:39,m0079954e:106,m046dc216:5,m046dc218:5,m046dc219:5,m046dc21a:18,m046dc21f:107,m04b4010a:108,m04b42411:20,m04b42412:20,m054c0268:22,m054c05c4:24,m054c09cc:24,m054c0ba0:24,m054c0cda:25,m054c0ce6:24,m054c0df2:24,m054c0e5f:24,m054c1337:26,m057e2006:30,m057e2007:31,m057e2009:60,m057e2017:109,m057e2069:36,m057e2073:37,m05ac061a:41,m0e6f0109:42,m0e6f0184:110,m0e6f0187:5,m0e6f0201:107,m0e6f0203:45,m0e6f0207:46,m0e6f0401:107,m0f0d002d:54,m0f0d004d:7,m0f0d005e:111,m0f0d005f:7,m0f0d0066:24,m0f0d006e:7,m0f0d0084:8,m0f0d0085:7,m0f0d0087:112,m0f0d0088:57,m0f0d0092:58,m0f0d00aa:39,m0f0d00c1:7,m0f0d00ee:113,m0f0d00f6:3,m0f0d0138:62,m0f0d0200:7,m15320401:24,m15320402:7,m15320705:64,m15320900:65,m15320a03:107,m15321000:8,m15321100:24,m18d19400:65,m20d66271:71,m20d6792a:24,m20d6a710:7,m20d6a711:44,m20d6ca6d:7,m24c6543a:107,m24c65d04:107,m24c6891a:114,m24c6891b:63,m24c6892a:64,m24c6892b:63,m24c6fafe:107,m2dc80651:115,m2dc82820:116,m2dc82830:78,m2dc82840:78,m2dc82865:87,m2dc82869:80,m2dc8286a:81,m2dc83011:63,m2dc83012:63,m2dc83013:63,m2dc83015:117,m2dc83016:63,m2dc83017:118,m2dc83019:83,m2dc8301b:63,m2dc8301d:63,m2dc83100:9,m2dc83101:85,m2dc83102:85,m2dc83103:85,m2dc83104:85,m2dc83105:84,m2dc83230:119,m2dc83810:94,m2dc85006:120,m2dc85101:89,m2dc85103:86,m2dc85104:90,m2dc85107:121,m2dc85108:122,m2dc85109:90,m2dc85111:82,m2dc85112:82,m2dc86001:79,m2dc86002:85,m2dc86006:82,m2dc86009:123,m2dc86101:85,m2dc86102:85,m2dc86728:95,m2dc89000:96,m2dc89001:79,m2dc89012:78,m2dc89015:124,m2dc89018:78,m2dc89020:125,m2dc89025:126,m2dc89026:127,m2dc8ab12:116,m35371022:63,m35371041:63,m35371046:63,m35371104:63,m358a0102:63,m358a0201:128,m358a0202:128,m358a0203:128,m358a0204:63,w00790002:129,w00790007:129,w0079000a:129,w00790016:18,w00790122:99,w00790126:130,w00791804:131,w0079181a:7,w0079181b:113,w00791824:132,w00791830:133,w00791845:11,w00791847:12,w0079184f:134,w00791879:135,w0079188f:136,w007918ae:137,w007918d4:138,w046dc209:139,w046dc20a:16,w046dc20b:140,w046dc211:141,w046dc21d:138,w046dc21e:142,w046dc242:142,w046dca84:143,w046dca88:143,w046dcad1:5,w046dcad2:7,w04b42410:144,w04b4c681:130,w054c05c5:145,w057e0330:146,w05ac022d:144,w05ac033d:147,w05ac044d:147,w05ac055b:39,w05ac057a:148,w0e6f0003:149,w0e6f0111:7,w0e6f0114:7,w0e6f0119:7,w0e6f011a:7,w0e6f011e:7,w0e6f011f:150,w0e6f0124:42,w0e6f0128:7,w0e6f012f:7,w0e6f0130:7,w0e6f0132:7,w0e6f0146:138,w0e6f0164:151,w0e6f0180:7,w0e6f0181:7,w0e6f0185:44,w0e6f0188:7,w0e6f0189:7,w0e6f0214:7,w0e6f0301:138,w0e6f1113:51,w0e6f6302:7,w0f0d0009:7,w0f0d000a:152,w0f0d000c:153,w0f0d000d:154,w0f0d0010:155,w0f0d0011:57,w0f0d0013:155,w0f0d001b:152,w0f0d0021:155,w0f0d0022:54,w0f0d0025:42,w0f0d0026:155,w0f0d0027:42,w0f0d0032:155,w0f0d003d:156,w0f0d0040:157,w0f0d0042:155,w0f0d0049:7,w0f0d004b:155,w0f0d0051:155,w0f0d0054:7,w0f0d0055:8,w0f0d005b:113,w0f0d005c:7,w0f0d0064:155,w0f0d0067:70,w0f0d006a:8,w0f0d006b:7,w0f0d006f:158,w0f0d0070:57,w0f0d007b:155,w0f0d008a:8,w0f0d008b:7,w0f0d008c:138,w0f0d009c:8,w0f0d00a0:159,w0f0d00a5:160,w0f0d00a6:111,w0f0d00ad:161,w0f0d00ae:142,w0f0d00af:162,w0f0d00c0:138,w0f0d00c9:5,w0f0d00d8:163,w0f0d00dc:138,w0f0d0101:5,w0f0d0104:142,w0f0d0123:144,w0f0d0137:164,w0f0d0162:165,w0f0d0164:166,w0f0d0196:134,w0f0d0202:167,w0f0d1011:168,w153202a6:169,w15320300:170,w15320707:147,w15320a14:138,w15321004:145,w15321007:145,w15321009:145,w1532100a:5,w18d12c40:171,w20d60060:7,w20d60dad:142,w20d6319f:7,w20d64026:134,w20d64033:134,w20d6571d:7,w20d6576d:7,w20d65795:7,w20d657c7:7,w20d657e5:7,w20d689e5:172,w20d6a712:7,w20d6a713:7,w20d6a714:7,w20d6a720:7,w24c6531a:153,w24c65b02:138,w27f80bbf:173,w28de11fc:70,w28de11ff:174,w2dc802e0:175,w2dc81003:176,w2dc81080:176,w2dc82100:144,w2dc82810:177,w2dc82862:78,w2dc83000:78,w2dc83001:178,w2dc8301c:134,w2dc8310a:134,w2dc83820:179,w2dc85001:180,w2dc86000:79,w2dc86003:123,w2dc86012:134,w2dc86100:85,w2dc86103:123,w2dc8ab11:179,w2dc8ab20:178,w2dc8ab21:78,w35371004:138,w35371007:134,w35371094:134,w35371116:134},$a=e=>e.toLowerCase().padStart(4,`0`);function eo(e){let t=/^(.*?)\s*\((?:[^()]*?\s)?Vendor:\s*([0-9a-f]{1,4})\s+Product:\s*([0-9a-f]{1,4})\s*\)\s*$/i.exec(e);if(t)return{vendor:$a(t[2]),product:$a(t[3]),name:t[1].trim()};let n=/^([0-9a-f]{1,4})-([0-9a-f]{1,4})-(.*)$/i.exec(e.trim());return n?{vendor:$a(n[1]),product:$a(n[2]),name:n[3].trim()}:null}function to(e){return(eo(e)?.name??e.replace(/\s*\((?:XInput\s*)?STANDARD GAMEPAD\)\s*$/i,``)).trim()||e}function no(e=globalThis.navigator){let t=e?.userAgent??``;return/Android|iPhone|iPad|iPod/i.test(t)?null:/Macintosh|Mac OS X/i.test(t)?(e?.maxTouchPoints??0)>1?null:`m`:/Windows/i.test(t)?`w`:/Linux|CrOS|X11/i.test(t)?`l`:null}function ro(e,t){if(!t)return null;let n=t===`l`?[`l`]:[`m`,`w`];for(let t of n){let n=Qa[`${t}${e.vendor}${e.product}`];if(n!==void 0)return Za[n]??null}return null}function io(e){return e.mapping!==`standard`&&eo(e.id)?.vendor===`2dc8`}var ao={6003:`switch`,6006:`switch`,6103:`switch`,3010:`switch`,6001:`startx`,6002:`startx`,6101:`startx`,6102:`startx`,3011:`receiver`,3012:`receiver`,3013:`receiver`,3015:`receiver`,3016:`receiver`,3017:`receiver`,"301b":`receiver`,"301c":`receiver`,"301d":`receiver`,6012:`receiver`,5112:`none`,9020:`none`};function oo(e){let t=eo(e);return t&&ao[t.product]||`manual`}var so={1:0,2:2,4:4,8:6};function co(e){let t=0,n=!1;for(let r of e){let e=/a(\d+)/.exec(r);e&&(t=Math.max(t,Number(e[1])+1)),r.startsWith(`h`)&&(n=!0)}return{n:t,hat:n}}function lo(e,t,n){let{n:r,hat:i}=co(t),a=Ia.length,o=e.axes.findIndex(e=>Math.abs(e)>1.05),s=e=>e;if(i&&o<0)return n===`l`&&e.axes.length>=r+2?{hat:-1,hatXY:r,axis:s}:null;if(!(i?o>r:n!==`l`&&e.axes.length>=r+2))return{hat:o,hatXY:-1,axis:s};if(r<=4)return{hat:o,hatXY:-1,axis:e=>[0,1,2,5][e]??e};let c=t[a+2]?.replace(`~`,``)===`a2`&&t[a+3]?.replace(`~`,``)===`a3`,l=[t[6],t[7]].every(e=>/^a[45]~?$/.test(e??``));return r===6&&c&&l?{hat:o,hatXY:-1,axis:e=>[0,1,2,5,3,4][e]??e}:{hat:o,hatXY:-1,axis:s}}function uo(e,t){let n=/^b(\d+)$/.exec(e);if(n)return{b:Number(n[1])};if(n=/^([+-]?)a(\d+)(~?)$/.exec(e),n){let e=t.axis(Number(n[2]));return n[1]===`+`?{a:e,d:1}:n[1]===`-`?{a:e,d:-1}:n[3]?{a:e,d:-1,rest:1}:{a:e,d:1,rest:-1}}if(n=/^h0\.(\d)$/.exec(e),n){let e=so[n[1]];if(e===void 0)return null;if(t.hat>=0)return{h:t.hat,at:e};if(t.hatXY>=0)return e===0?{a:t.hatXY+1,d:-1}:e===4?{a:t.hatXY+1,d:1}:e===6?{a:t.hatXY,d:-1}:{a:t.hatXY,d:1}}return null}function fo(e,t){let n=/^a(\d+)(~?)$/.exec(e);if(n)return n[2]?{a:t.axis(Number(n[1])),inv:!0}:{a:t.axis(Number(n[1]))};if(e===`hx`||e===`hy`){if(t.hat>=0)return{a:t.hat,hat:e===`hx`?`x`:`y`};if(t.hatXY>=0)return{a:t.hatXY+ +(e===`hy`)}}return null}function po(e,t,n){let r=e.split(`,`),i=lo(t,r,n);if(!i)return null;let a={buttons:[],l2:null,r2:null,lx:null,ly:null,rx:null,ry:null};for(let e=0;eArray.isArray(e)&&e.length===2&&typeof e[0]==`number`&&_o(e[1]))&&[t.l2,t.r2,t.lx,t.ly,t.rx,t.ry].every(_o)}function yo(){try{let e=Lt(go),t=e?JSON.parse(e):null;return!t||typeof t!=`object`||Array.isArray(t)?{}:Object.fromEntries(Object.entries(t).filter(e=>vo(e[1])))}catch{return{}}}function bo(e,t){let n=yo();return t?n[e]=t:delete n[e],It(go,JSON.stringify(n)),xo=n,n}var xo=null;function So(e){return xo??=yo(),xo[e.id]??To(xo,e.id)??ho(e)??Ua(e)}function Co(e){return xo??=yo(),xo[e.id]?`saved`:e.mapping===`standard`?`standard`:ho(e)?`known`:`guess`}function wo(e){return ho(e)??Ua(e)}function To(e,t){if(!t.endsWith(` (app)`))return null;let n=t.slice(0,-6).trim().toLowerCase();if(!n)return null;let r=Object.keys(e).filter(e=>{let t=e.trim().toLowerCase();return t===n||t.includes(n)}),i=r.find(e=>e.trim().toLowerCase()===n)??(r.length===1?r[0]:null);return i?(xo=bo(t,e[i]),e[i]):null}function Eo(e){return{buttons:e.buttons.map(e=>Math.max(+!!e.pressed,e.value)),axes:[...e.axes]}}function Do(e,t){let n=null;if(t.buttons.forEach((t,r)=>{let i=t-(e.buttons[r]??0);t>.5&&i>.5&&(!n||i>n.amount)&&(n={src:{b:r},amount:i})}),n)return n.src;for(let n=0;n1.05?La(t.axes[n]):null;if(r!==null)return{h:n,at:r}}return t.axes.forEach((t,r)=>{let i=e.axes[r]??0,a=t-i;if(!(Math.abs(a)<.6)&&(!n||Math.abs(a)>n.amount)){let e=a>0?1:-1;n={src:Math.abs(i)>.5?{a:r,d:e,rest:i}:{a:r,d:e},amount:Math.abs(a)}}}),n?n.src:null}function Oo(e,t){let n=null;if(t.axes.forEach((t,r)=>{let i=t-(e.axes[r]??0);Math.abs(i)>=.6&&(!n||Math.abs(i)>Math.abs(n.moved))&&(n={a:r,moved:i})}),!n)return null;let r=n;return r.moved>0?{a:r.a}:{a:r.a,inv:!0}}var ko=[{kind:`button`,bit:R.CROSS,name:`✕`},{kind:`button`,bit:R.CIRCLE,name:`○`},{kind:`button`,bit:R.SQUARE,name:`□`},{kind:`button`,bit:R.TRIANGLE,name:`△`},{kind:`button`,bit:R.UP,name:`↑`},{kind:`button`,bit:R.DOWN,name:`↓`},{kind:`button`,bit:R.LEFT,name:`←`},{kind:`button`,bit:R.RIGHT,name:`→`},{kind:`button`,bit:R.L1,name:`L1`},{kind:`button`,bit:R.R1,name:`R1`},{kind:`trigger`,which:`l2`,name:`L2`},{kind:`trigger`,which:`r2`,name:`R2`},{kind:`button`,bit:R.L3,name:`L3`},{kind:`button`,bit:R.R3,name:`R3`},{kind:`button`,bit:R.OPTIONS,name:`Options`},{kind:`button`,bit:R.SHARE,name:`Create`},{kind:`button`,bit:R.PS,name:`PS`},{kind:`button`,bit:R.TOUCHPAD,name:`Touchpad`},{kind:`axis`,which:`lx`,name:`L →`},{kind:`axis`,which:`ly`,name:`L ↓`},{kind:`axis`,which:`rx`,name:`R →`},{kind:`axis`,which:`ry`,name:`R ↓`}];function Ao(){return{buttons:[],l2:null,r2:null,lx:null,ly:null,rx:null,ry:null}}function jo(e,t,n){return t.kind===`button`?{...e,buttons:[...e.buttons.filter(([e])=>e!==t.bit),[t.bit,n]]}:(t.kind,{...e,[t.which]:n})}function Mo(e,t=Va){let n=new Set(e.buttons.map(([e])=>e)),r=e=>`b`in e?`b${e.b}`:`h`in e?`h${e.h}.${e.at}`:`a${e.a}${e.d}`,i=new Set([...e.buttons.map(([,e])=>r(e)),...[e.l2,e.r2].filter(e=>!!e).map(r)]);return{buttons:[...e.buttons,...t.buttons.filter(([e,t])=>!n.has(e)&&!i.has(r(t)))],l2:e.l2??t.l2,r2:e.r2??t.r2,lx:e.lx??t.lx,ly:e.ly??t.ly,rx:e.rx??t.rx,ry:e.ry??t.ry}}var No=ko.filter(e=>e.kind!==`button`||![R.L3,R.R3,R.OPTIONS,R.SHARE,R.PS,R.TOUCHPAD].includes(e.bit));function Po(e,t){return t.buttons.every((t,n)=>Math.abs(t-(e.buttons[n]??0))<.3)&&t.axes.every((t,n)=>Math.abs(t-(e.axes[n]??0))<.3)}var Fo=class{constructor(e=ko){this.steps=e,this.step=0,this.prof=Ao(),this.rest=null,this.waiting=!0}get done(){return this.step>=this.steps.length}get current(){return this.steps[this.step]??null}feed(e){if(this.done)return!1;if(!this.rest)return this.rest=e,this.waiting=!1,!1;if(this.waiting)return Po(this.rest,e)&&(this.waiting=!1),!1;let t=this.steps[this.step],n=t.kind===`axis`?Oo(this.rest,e):Do(this.rest,e);return n?(this.prof=jo(this.prof,t,n),this.go(this.step+1),!0):!1}skip(){this.go(this.step+1)}back(){this.step>0&&this.go(this.step-1)}go(e){this.waiting=!0,this.step=Math.min(e,this.steps.length)}profile(e=Va){return Mo(this.prof,e)}};function Io(e,t){return e.buttons===t.buttons&&e.l2===t.l2&&e.r2===t.r2&&e.lx===t.lx&&e.ly===t.ly&&e.rx===t.rx&&e.ry===t.ry&&(e.touch?.[0]??-1)===(t.touch?.[0]??-1)&&(e.touch?.[1]??-1)===(t.touch?.[1]??-1)&&(e.motion?.t??-1)===(t.motion?.t??-1)}function Lo(){try{return typeof sessionStorage<`u`?sessionStorage:null}catch{return null}}var Ro=e=>`ps5upload.join.token.${e??`app`}`,zo=class{constructor(e){this.o=e,this.ws=null,this.stage={kind:`connecting`},this.token=null,this.player=0,this.last={...ja},this.lastSent=0,this.neutral=!1,this.stopped=!1,this.attempt=0,this.deadline=0,this.raf=0,this.keepalive=null,this.pinger=null,this.retry=null,this.lastHeard=0,this.hostAway=!1,this.pings=0,this.now=e.now??(()=>Date.now()),this.storage=e.storage===void 0?Lo():e.storage,this.WS=e.WebSocketImpl??WebSocket,this.seq=this.now()>>>0;try{this.token=this.storage?.getItem(this.key)??null}catch{this.token=null}}get key(){return Ro(this.o.invite??this.o.code??null)}get current(){return this.stage}get socket(){return this.ws}get resumeToken(){return this.token}setStage(e){this.stage=e,this.o.onStage(e)}start(){if(this.stopped=!1,this.setStage({kind:`connecting`}),this.connect(),this.stopped)return;let e=()=>{this.sendPad(!1),this.raf=(this.o.raf??(e=>window.requestAnimationFrame(e)))(e)};this.raf=(this.o.raf??(e=>window.requestAnimationFrame(e)))(e),this.keepalive=setInterval(()=>this.sendPad(!1),100),this.pinger=setInterval(()=>this.ping(),1e3)}connect(){let e;try{e=new this.WS(this.o.url)}catch{this.dropped();return}this.ws=e,e.binaryType=`arraybuffer`,e.onopen=()=>{if(this.ws!==e)return;this.lastHeard=this.now();let t={name:this.o.name};this.o.invite&&(t.invite=this.o.invite),this.o.code&&(t.code=this.o.code),this.token&&(t.resume=this.token),e.send(JSON.stringify({hello:t}))},e.onmessage=t=>{this.ws===e&&(this.lastHeard=this.now(),typeof t.data==`string`?this.onText(t.data):t.data instanceof ArrayBuffer&&this.stage.kind===`joined`&&this.o.onFrame?.(t.data))},e.onclose=t=>{if(this.ws!==e)return;this.ws=null;let n=Ue(t);n===`mismatch`?(this.forgetToken(),this.finish({kind:`ended`,why:n})):n&&this.stage.kind!==`joined`&&this.stage.kind!==`reconnecting`?this.finish({kind:`ended`,why:n}):this.dropped()},e.onerror=()=>{}}onText(e){let t=Je(e);if(t)switch(t.kind){case`pong`:{let e=this.now()-t.t;e>=0&&e<6e4&&this.o.onRtt?.(e);return}case`asking`:this.stage.kind!==`reconnecting`&&this.setStage({kind:`asking`});return;case`waiting`:this.hostAway||(this.hostAway=!0,this.deadline=this.now()+et),this.attempt=0,this.setStage(this.reconnectingStage());return;case`joined`:this.token=t.token,this.player=t.player,this.attempt=0,this.hostAway=!1;try{this.storage?.setItem(this.key,t.token)}catch{}{let e=t.track&&this.ws?.media||null;this.o.onCodec?.(t.hevc,e,!!e&&t.audio&&!!e.audio)}this.setStage({kind:`joined`,player:t.player,hevc:t.hevc}),this.sendPad(!0);return;case`refused`:this.forgetToken(),this.hostAway&&t.why!==`seat_taken`?this.finish({kind:`ended`,why:`host_stopped`}):this.finish({kind:`refused`,why:t.why});return;case`bye`:if(t.why===`host_stopped`&&this.token){this.hostWait();return}this.forgetToken(),this.finish({kind:`ended`,why:t.why});return;case`status`:this.stage.kind===`joined`&&t.status.player>0&&t.status.player!==this.stage.player&&(this.player=t.status.player,this.setStage({...this.stage,player:t.status.player})),this.o.onStatus?.(t.status);return;case`feedback`:t.rumble&&this.o.onRumble?.(t.rumble[0],t.rumble[1]),t.light&&this.o.onLight?.(t.light);return}}hostWait(){this.hostAway=!0,this.deadline=this.now()+et,this.attempt=0;let e=this.ws;this.ws=null;try{e?.close()}catch{}this.scheduleRetry()}reconnectingStage(){return{kind:`reconnecting`,player:this.player,attempt:this.attempt,deadline:this.deadline,...this.hostAway?{hostStopped:!0}:{}}}giveUp(){this.forgetToken(),this.finish({kind:`ended`,why:this.hostAway?`host_stopped`:`gave_up`})}dropped(){if(this.stopped)return;let e=this.stage;e.kind===`joined`||e.kind===`reconnecting`&&this.token?(e.kind===`joined`&&(this.deadline=this.now()+$e),this.scheduleRetry()):this.finish({kind:`ended`,why:`lost`})}scheduleRetry(){if(this.stopped)return;if(this.now()>=this.deadline){this.giveUp();return}let e=Qe(this.attempt);this.setStage(this.reconnectingStage()),this.attempt+=1,this.retry&&clearTimeout(this.retry),this.retry=setTimeout(()=>{this.retry=null,this.stopped||(this.now()>=this.deadline?this.giveUp():this.connect())},e)}forgetToken(){this.token=null;try{this.storage?.removeItem(this.key)}catch{}}ping(){if(this.hostAway&&!this.stopped&&this.now()>=this.deadline+5e3||!this.stopped&&this.stage.kind===`reconnecting`&&this.now()>=this.deadline+5e3){this.giveUp();return}let e=this.ws;if(e&&e.readyState===this.WS.OPEN){if(this.stage.kind===`joined`&&this.now()-this.lastHeard>3500){this.ws=null;try{e.close()}catch{}this.dropped()}else if(e.send(JSON.stringify({ping:this.now()})),this.stage.kind===`joined`&&this.o.readStats&&++this.pings%2==0){let t=this.o.readStats();t&&e.send(JSON.stringify({stats:t}))}}}setNeutral(e){this.neutral!==e&&(this.neutral=e,this.sendPad(!0))}sendPad(e){let t=this.ws;if(!t||t.readyState!==this.WS.OPEN||this.stage.kind!==`joined`)return;let n=this.neutral?{...ja,touch:null,motion:null}:this.o.readPad(),r=this.now();!e&&Io(n,this.last)&&r-this.lastSent<100||(this.last=n,this.lastSent=r,this.seq=this.seq+1>>>0,t.send(Ze(this.seq,n)))}clearTimers(){(this.o.cancelRaf??(e=>window.cancelAnimationFrame(e)))(this.raf),this.keepalive&&clearInterval(this.keepalive),this.pinger&&clearInterval(this.pinger),this.retry&&clearTimeout(this.retry),this.keepalive=this.pinger=this.retry=null}finish(e){this.stopped=!0,this.clearTimers();let t=this.ws;this.ws=null;try{t?.close()}catch{}this.setStage(e)}askKeyframe(){let e=this.ws;e&&e.readyState===this.WS.OPEN&&this.stage.kind===`joined`&&e.send(JSON.stringify({keyframe:!0}))}leave(){let e=this.ws;e&&e.readyState===this.WS.OPEN&&(this.stage.kind===`joined`&&(this.seq=this.seq+1>>>0,e.send(Ze(this.seq,ja))),e.send(JSON.stringify({leave:1}))),this.forgetToken(),this.finish({kind:`ended`,why:`left`})}stop(){let e=this.ws;e&&e.readyState===this.WS.OPEN&&this.stage.kind===`joined`&&(this.seq=this.seq+1>>>0,e.send(Ze(this.seq,ja))),this.stopped=!0,this.clearTimers(),this.ws=null;try{e?.close()}catch{}}},Bo=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),z=s(((e,t)=>{t.exports=Bo()}))(),Vo=`ps5upload.openIn`,Ho=`ps5upload.openIn.tab`;function Uo(){try{return sessionStorage.getItem(Ho)===`browser`}catch{return!1}}function B(){try{sessionStorage.setItem(Ho,`browser`)}catch{}}function V(e){return e===`browser`?`browser`:e===`app`?`opening`:`ask`}function Wo({appLink:e,children:t}){let n=Ie(),[r,i]=(0,D.useState)(()=>Uo()?`browser`:V(Lt(Vo))),[a,o]=(0,D.useState)(!1);if((0,D.useEffect)(()=>{r===`opening`&&Lt(`ps5upload.openIn`)===`app`&&(location.href=e)},[]),r===`browser`)return(0,z.jsx)(z.Fragment,{children:t});let s=()=>{a&&It(Vo,`app`),i(`opening`),location.href=e},c=()=>{r===`ask`&&a?It(Vo,`browser`):r===`opening`&&Lt(`ps5upload.openIn`)===`app`&&Rt(Vo),B(),i(`browser`)};return(0,z.jsx)(`div`,{className:`flex min-h-[100dvh] items-center justify-center bg-black px-6 text-white`,"data-testid":`open-in-gate`,"data-join-ui":``,children:(0,z.jsx)(`div`,{className:`w-full max-w-sm space-y-4 rounded-2xl border border-white/10 bg-neutral-900 p-6`,children:r===`ask`?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsx)(`h1`,{className:`text-lg font-semibold`,children:n(`open_in_title`,void 0,`Open in the PS5Upload app?`)}),(0,z.jsx)(`p`,{className:`text-sm text-white/60`,children:n(`open_in_body`,void 0,`Have the PS5Upload app on this device? Open this there, or carry on in the browser.`)})]}),(0,z.jsx)(`button`,{type:`button`,onClick:s,autoFocus:!0,className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black`,"data-testid":`open-in-app`,children:n(`open_in_app`,void 0,`Open in the app`)}),(0,z.jsx)(`button`,{type:`button`,onClick:c,className:`w-full rounded-full border border-white/20 py-2.5 text-sm font-semibold text-white hover:bg-white/10`,"data-testid":`open-in-browser`,children:n(`open_in_browser`,void 0,`Continue in browser`)}),(0,z.jsxs)(`label`,{className:`flex items-center justify-center gap-2 text-xs text-white/60`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:a,onChange:e=>o(e.target.checked),"data-testid":`open-in-remember`}),n(`open_in_remember`,void 0,`Remember my choice on this device`)]})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsx)(`h1`,{className:`text-lg font-semibold`,children:n(`open_in_opening`,void 0,`Opening the PS5Upload app…`)}),(0,z.jsx)(`p`,{className:`text-sm text-white/60`,children:n(`open_in_not_opened`,void 0,`Nothing happened? The app may not be on this device.`)})]}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>location.href=e,autoFocus:!0,className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black`,"data-testid":`open-in-again`,children:n(`open_in_again`,void 0,`Try again`)}),(0,z.jsx)(`button`,{type:`button`,onClick:c,className:`w-full rounded-full border border-white/20 py-2.5 text-sm font-semibold text-white hover:bg-white/10`,"data-testid":`open-in-browser`,children:n(`open_in_browser`,void 0,`Continue in browser`)})]})})})}var Go=[`a[href]`,`button:not([disabled])`,`input:not([disabled]):not([type='hidden'])`,`select:not([disabled])`,`textarea:not([disabled])`,`summary`,`[contenteditable='true']`,`[tabindex]`].map(e=>`${e}:not([tabindex='-1'])`).join(`, `),Ko=new Set,qo=[];function Jo(){for(let e of Ko)e()}function Yo(){return qo.length}function Xo(e){return qo.push(e),Jo(),()=>{let t=qo.lastIndexOf(e);t!==-1&&qo.splice(t,1),Jo()}}function Zo(e,t,n){switch(n){case`down`:return t.top-e.bottom;case`up`:return e.top-t.bottom;case`right`:return t.left-e.right;case`left`:return e.left-t.right}}function H(e,t,n){let r=(e.left+e.right)/2,i=(e.top+e.bottom)/2,a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;switch(n){case`down`:return o>i&&t.top>=e.top+1;case`up`:return or&&t.left>=e.left+1;case`left`:return a0?{gap:0,overlap:c}:{gap:-c,overlap:0}}function $o(e,t,n){let r=null,i=1/0,a=!1;for(let o of t){if(!H(e,o.rect,n))continue;let t=Math.max(0,Zo(e,o.rect,n)),s=Qo(e,o.rect,n),c=s.overlap>0;if(a&&!c)continue;let l=c?t-s.overlap/1e6:Math.hypot(t,2*s.gap);(c&&!a||l`u`?void 0:window){try{return!!e?.PS5UploadTv?.isTv()}catch{return!1}}function rs(e=typeof document>`u`?void 0:document){return e?.documentElement.dataset.tv===`1`}function is(e,t){if(!e)return!1;if(e.closest(`[data-own-arrows]`))return!0;let n=e.tagName;if(n===`TEXTAREA`||e.isContentEditable)return!0;let r=t===`left`||t===`right`;if(n===`INPUT`){let t=(e.type||`text`).toLowerCase();if(t===`range`||ts.test(t))return r}return!1}var as=`[aria-modal="true"], [role="dialog"], [role="alertdialog"]`;function os(e){let t=e.activeElement?.closest(as);if(t)return t;if(Yo()>0){let t=e.querySelectorAll(as);if(t.length)return t[t.length-1]}return e}function ss(e){let t=[];return e.querySelectorAll(Go).forEach(e=>{if(e.closest(`[inert], [aria-hidden='true']`)||e.disabled)return;let n=e.getBoundingClientRect();n.width<=0||n.height<=0||t.push({el:e,rect:n})}),t}function cs(e){return(e.find(e=>e.el.getAttribute(`aria-current`)===`page`)??e[0])?.el??null}function ls(e,t=document){let n=es[e.key];if(!n||e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return!1;let r=t.activeElement;if(is(r,n))return!1;let i=ss(os(t));if(!i.length)return!1;let a=i.find(e=>e.el===r),o=a?$o(a.rect,i.filter(e=>e!==a),n):cs(i);return o?(e.preventDefault(),o.focus(),typeof o.scrollIntoView==`function`&&o.scrollIntoView({block:`nearest`,inline:`nearest`}),!0):!1}var us=!1;function ds(e){us||(us=!0,e.addEventListener(`keydown`,t=>void ls(t,e.document)))}function fs(e=typeof window>`u`?void 0:window){e&&(ns(e)&&(e.document.documentElement.dataset.tv=`1`),ds(e))}function ps({id:e,className:t}){let n=Ie(),r=oo(e);if(r===`none`)return(0,z.jsx)(`span`,{className:t,"data-testid":`pad-8bitdo-hint`,"data-how":r,children:n(`pad_8bitdo_no_xinput`,void 0,`This 8BitDo has no X-input mode. If a button is wrong, check the controller.`)});let i=r===`switch`?n(`pad_8bitdo_how_switch`,void 0,`set the switch on the back to X, then press Start`):r===`startx`?n(`pad_8bitdo_how_startx`,void 0,`turn it off, then hold Start + X to turn it on`):r===`receiver`?n(`pad_8bitdo_how_receiver`,void 0,`use its 2.4G receiver or a USB cable`):n(`pad_8bitdo_how_manual`,void 0,`its manual says how`);return(0,z.jsx)(`span`,{className:t,"data-testid":`pad-8bitdo-hint`,"data-how":r,children:n(`pad_8bitdo_xinput`,{how:i},`For the best result, switch your 8BitDo to X-input mode: ${i}.`)})}var ms=new Set,hs={held:new Set,touch:null,touchPad:ja,mapping:!1,get paused(){return ms.size>0},motion:null},gs={s:.85,m:1,l:1.15},_s=.25;function vs(e){return typeof e!=`number`||!Number.isFinite(e)?1:Math.min(1,Math.max(_s,e))}var ys={overlay:{width:844,height:390},deck:{width:390,height:480}},bs=.7,xs=1.4;function Ss(e,t,n,r){let i=gs[e]??1;if(!(t>0)||!(n>0))return i;let a=r?ys.deck:ys.overlay,o=Math.min(xs,Math.max(bs,Math.min(t/a.width,n/a.height)));return Math.round(o*i*1e3)/1e3}var Cs=34;function ws(e,t){return t>0&&8+Math.max(112*e,90)+156*e+124*e+Math.max(56*e,44)+Cs>t}function Ts(e,t,n){let r=e/32767,i=t/32767,a=Math.hypot(r,i),o=a>1?1/a:1;return{dx:r*o*n,dy:i*o*n}}var Es=`calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2)`,Ds=32767,Os=12;function ks({stream:e,layout:t=`overlay`,opacity:n=1,size:r=`m`,deckTop:i=`0px`,onMenu:a}){let o=Ie(),s=(0,D.useRef)(new Map),c=(0,D.useRef)({...ja}),[l,u]=(0,D.useState)({...ja}),[d,f]=(0,D.useState)({l:!1,r:!1,touchpad:!1}),p=(0,D.useRef)(null),[m,h]=(0,D.useState)({width:0,height:0});(0,D.useEffect)(()=>{let e=p.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect();h(e=>e.width===t.width&&e.height===t.height?e:{width:t.width,height:t.height})};if(t(),typeof ResizeObserver>`u`)return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t);let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]),(0,D.useEffect)(()=>()=>{hs.touchPad={...ja}},[]);let g=()=>{let t={...ja,touch:null},n={l:!1,r:!1,touchpad:!1};for(let e of s.current.values())e.kind===`stick`&&(n[e.which]=!0),e.kind===`touchpad`&&(n.touchpad=!0),e.kind===`button`&&(t.buttons|=e.bit),e.kind===`trigger`&&(t[e.which]=255),e.kind===`touchpad`&&e.pressed&&(t.buttons|=R.TOUCHPAD);t.lx=c.current.lx,t.ly=c.current.ly,t.rx=c.current.rx,t.ry=c.current.ry,t.touch=c.current.touch??null,hs.touchPad=t,e?.sendPad(),u(t),f(e=>e.l===n.l&&e.r===n.r&&e.touchpad===n.touchpad?e:n)},_=(e,t,n)=>{let r=Math.max(-1,Math.min(1,(t-e.cx)/e.radius)),i=Math.max(-1,Math.min(1,(n-e.cy)/e.radius));c.current[e.which===`l`?`lx`:`rx`]=Math.round(r*Ds),c.current[e.which===`l`?`ly`:`ry`]=Math.round(i*Ds)},v=(e,t)=>{e.preventDefault(),e.stopPropagation();let n=e.currentTarget;try{n.setPointerCapture(e.pointerId)}catch{}let r=t(n);s.current.set(e.pointerId,r),r.kind===`stick`&&_(r,e.clientX,e.clientY),r.kind===`touchpad`&&(c.current.touch=Ma((e.clientX-r.rect.left)/r.rect.width,(e.clientY-r.rect.top)/r.rect.height)),navigator.vibrate?.(8),g()},y=e=>{let t=s.current.get(e.pointerId);if(t){if(e.stopPropagation(),t.kind===`stick`)_(t,e.clientX,e.clientY);else if(t.kind===`touchpad`)c.current.touch=Ma((e.clientX-t.rect.left)/t.rect.width,(e.clientY-t.rect.top)/t.rect.height),t.pressed&&Math.hypot(e.clientX-t.x0,e.clientY-t.y0)>Os&&(t.pressed=!1);else return;g()}},b=e=>{let t=s.current.get(e.pointerId);t&&(e.stopPropagation(),s.current.delete(e.pointerId),t.kind===`stick`&&(c.current[t.which===`l`?`lx`:`rx`]=0,c.current[t.which===`l`?`ly`:`ry`]=0),t.kind===`touchpad`&&(c.current.touch=null),g())},x=e=>e.stopPropagation(),S={onPointerMove:y,onPointerUp:b,onPointerCancel:b,onClick:x,onDoubleClick:x},ee=e=>(l.buttons&e)!==0,C=e=>`border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.35)] transition-colors duration-75 ${e?`border-white bg-white/50`:`border-white/70 bg-white/10`}`,w=`text-white [text-shadow:0_1px_2px_rgba(0,0,0,0.6)]`,T={filter:`drop-shadow(0 0 1.5px rgba(0,0,0,0.5))`},E=e=>({stroke:e?`#fff`:`rgba(255,255,255,0.75)`,fill:e?`rgba(255,255,255,0.5)`:`rgba(255,255,255,0.1)`}),te=`pointer-events-auto flex touch-none select-none items-center justify-center bg-transparent p-0`,ne={minHeight:`calc(44px / var(--k))`,minWidth:`calc(44px / var(--k))`},re=(e,t,n,r)=>(0,z.jsx)(`button`,{type:`button`,"aria-label":e,onPointerDown:e=>v(e,()=>({kind:`button`,bit:t})),...S,className:`${te} ${n}`,style:ne,children:r}),ie=(e,t,n,r)=>(0,z.jsx)(`span`,{className:`flex h-[32px] w-[76px] items-center justify-center text-[13px] font-semibold tracking-wide ${w} ${C(t)}`,style:{borderRadius:r?n===`l`?`16px 9px 9px 9px`:`9px 16px 9px 9px`:`9px`},children:e}),ae=(e,t,n,r)=>re(e,t,`h-[44px] w-[84px]`,ie(e,ee(t),n,r)),oe=(e,t,n)=>(0,z.jsx)(`button`,{type:`button`,"aria-label":e,onPointerDown:e=>v(e,()=>({kind:`trigger`,which:t})),...S,className:`${te} h-[44px] w-[84px]`,style:ne,children:ie(e,l[t]>0,n,!0)}),se=(e,t,n)=>re(e,t,`h-[52px] w-[52px]`,(0,z.jsx)(`svg`,{viewBox:`0 0 52 52`,width:`52`,height:`52`,"aria-hidden":!0,style:T,children:(0,z.jsxs)(`g`,{transform:`rotate(${n} 26 26)`,strokeWidth:`1.5`,strokeLinejoin:`round`,...E(ee(t)),children:[(0,z.jsx)(`path`,{d:`M10 9 Q10 3 16 3 L36 3 Q42 3 42 9 L42 30 Q42 34.5 38.5 38 L29.5 47 Q26 50.5 22.5 47 L13.5 38 Q10 34.5 10 30 Z`}),(0,z.jsx)(`path`,{d:`M20.5 23 L26 17 L31.5 23`,fill:`none`,stroke:`#fff`,strokeLinecap:`round`,strokeWidth:`1.8`})]})})),ce=(e,t,n)=>re(e,t,`h-[52px] w-[52px]`,(0,z.jsxs)(`svg`,{viewBox:`0 0 52 52`,width:`52`,height:`52`,"aria-hidden":!0,style:T,children:[(0,z.jsx)(`circle`,{cx:`26`,cy:`26`,r:`22.5`,strokeWidth:`1.5`,...E(ee(t))}),(0,z.jsx)(`g`,{fill:`none`,stroke:`#fff`,strokeWidth:`1.8`,strokeLinejoin:`round`,strokeLinecap:`round`,children:n})]})),le=(e,t)=>re(e,t,`h-[44px] min-w-[64px] px-[4px]`,(0,z.jsx)(`span`,{className:`flex h-[24px] items-center rounded-full px-[10px] text-[10px] font-semibold uppercase tracking-wider ${w} ${C(ee(t))}`,children:e})),ue=(e,t)=>re(e,t,`h-[44px] w-[44px]`,(0,z.jsx)(`span`,{className:`flex h-[36px] w-[36px] items-center justify-center rounded-full text-[11px] font-bold ${w} ${C(ee(t))}`,children:e})),de=e=>{let{dx:t,dy:n}=Ts(e===`l`?l.lx:l.rx,e===`l`?l.ly:l.ry,34),r=d[e];return(0,z.jsx)(`div`,{"aria-label":e===`l`?o(`rp_touch_left_stick`,void 0,`Left stick`):o(`rp_touch_right_stick`,void 0,`Right stick`),onPointerDown:t=>v(t,t=>{let n=t.getBoundingClientRect();return{kind:`stick`,which:e,cx:n.left+n.width/2,cy:n.top+n.height/2,radius:n.width/2}}),...S,className:`pointer-events-auto relative h-[124px] w-[124px] touch-none rounded-full border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.3)] transition-colors duration-75 ${r?`border-white/80 bg-white/[0.12]`:`border-white/45 bg-white/[0.05]`}`,children:(0,z.jsx)(`div`,{className:`absolute left-1/2 top-1/2 h-[54px] w-[54px] rounded-full ${C(r)}`,style:{transform:`translate(calc(-50% + ${t}px), calc(-50% + ${n}px))`}})})},O=t===`deck`,fe=Ss(r,m.width,m.height,O),pe=e=>`${e}px * var(--k)`,k=`max(12px, env(safe-area-inset-left))`,me=`max(12px, env(safe-area-inset-right))`,he=`max(12px, env(safe-area-inset-bottom))`,ge=O?`8px`:t===`overlay-bar`?`3.5rem`:`max(10px, env(safe-area-inset-top))`,_e=(e,t,n=0)=>t?n?`calc(${e} + max(${pe(t)}, ${n}px))`:`calc(${e} + ${pe(t)})`:e,ye=(e,t)=>({position:`absolute`,...t,transform:`scale(var(--k))`,transformOrigin:e}),be=O&&ws(fe,m.height),A=O?void 0:`58%`,j=e=>O?{top:_e(ge,be?96:112,be?72:90),[e]:e===`left`?k:me}:{top:A,translate:`0 -50%`,[e]:e===`left`?k:me},xe=e=>({bottom:be?he:_e(he,O?56:0,44),[e]:be?`calc(${e===`left`?k:me} + 8px + max(${pe(80)}, 44px))`:_e(e===`left`?k:me,O?40:168)}),Se=!!a&&!O;return(0,z.jsxs)(`div`,{ref:p,className:`pointer-events-none absolute z-10 select-none [-webkit-touch-callout:none] ${O?`inset-x-0 bottom-0`:`inset-0`}`,style:{top:O?i:void 0,"--k":fe},"data-testid":`rp-touch`,"data-layout":t,"data-scale":fe,onContextMenu:e=>e.preventDefault(),children:[(0,z.jsxs)(`div`,{className:`absolute inset-0`,style:{opacity:vs(n)},children:[(0,z.jsx)(`div`,{style:ye(`top left`,{top:ge,left:k}),children:(0,z.jsxs)(`div`,{className:`ms-[8px] flex flex-col`,style:{rotate:O?void 0:`6deg`,transformOrigin:`top left`},children:[oe(`L2`,`l2`,`l`),ae(`L1`,R.L1,`l`,!1)]})}),(0,z.jsx)(`div`,{style:ye(`top right`,{top:ge,right:me}),children:(0,z.jsxs)(`div`,{className:`me-[8px] flex flex-col items-end`,style:{rotate:O?void 0:`-6deg`,transformOrigin:`top right`},children:[oe(`R2`,`r2`,`r`),ae(`R1`,R.R1,`r`,!1)]})}),(0,z.jsx)(`div`,{"aria-label":o(`rp_touch_touchpad`,void 0,`Touchpad`),onPointerDown:e=>v(e,t=>({kind:`touchpad`,rect:t.getBoundingClientRect(),x0:e.clientX,y0:e.clientY,pressed:!0})),...S,className:`pointer-events-auto absolute touch-none rounded-2xl border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.3)] transition-colors duration-75 ${d.touchpad?`border-white/80 bg-white/25`:`border-white/40 bg-white/[0.05]`}`,style:O?{top:_e(ge,6),left:_e(k,104),right:_e(me,104),height:`max(44px, calc(${pe(64)}))`}:{top:ge,left:`50%`,translate:`-50% 0`,width:`min(calc(${pe(250)}), 34vw)`,height:`max(44px, calc(${pe(56)}))`}}),(0,z.jsxs)(`div`,{className:`grid grid-cols-3 grid-rows-3`,style:ye(O?`top left`:`left center`,j(`left`)),children:[(0,z.jsx)(`span`,{}),se(`↑`,R.UP,0),(0,z.jsx)(`span`,{}),se(`←`,R.LEFT,-90),(0,z.jsx)(`span`,{}),se(`→`,R.RIGHT,90),(0,z.jsx)(`span`,{}),se(`↓`,R.DOWN,180),(0,z.jsx)(`span`,{})]}),(0,z.jsxs)(`div`,{className:`grid grid-cols-3 grid-rows-3`,style:ye(O?`top right`:`right center`,j(`right`)),children:[(0,z.jsx)(`span`,{}),ce(`△`,R.TRIANGLE,(0,z.jsx)(`path`,{d:`M26 16.5 L35 32 L17 32 Z`})),(0,z.jsx)(`span`,{}),ce(`□`,R.SQUARE,(0,z.jsx)(`rect`,{x:`18`,y:`18`,width:`16`,height:`16`,rx:`1`})),(0,z.jsx)(`span`,{}),ce(`○`,R.CIRCLE,(0,z.jsx)(`circle`,{cx:`26`,cy:`26`,r:`8.5`})),(0,z.jsx)(`span`,{}),ce(`✕`,R.CROSS,(0,z.jsx)(`path`,{d:`M19 19 L33 33 M33 19 L19 33`})),(0,z.jsx)(`span`,{})]}),(0,z.jsx)(`div`,{style:ye(`bottom left`,xe(`left`)),children:de(`l`)}),(0,z.jsx)(`div`,{style:ye(`bottom right`,xe(`right`)),children:de(`r`)}),(0,z.jsx)(`div`,{style:ye(`bottom left`,{bottom:he,left:k}),children:le(`Create`,R.SHARE)}),(0,z.jsx)(`div`,{style:ye(`bottom right`,{bottom:he,right:me}),children:le(`Options`,R.OPTIONS)}),(0,z.jsx)(`div`,{style:ye(`bottom center`,{bottom:be?_e(he,124,88):_e(he,Se?48:0,48),left:Es,translate:`-50% 0`}),children:ue(`PS`,R.PS)})]}),Se&&(0,z.jsx)(`div`,{style:{...ye(`bottom center`,{bottom:he,left:`calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2)`,translate:`-50% 0`}),opacity:Math.max(.7,vs(n))},children:(0,z.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),a?.()},onDoubleClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),"aria-label":o(`rp_menu`,void 0,`Menu`),"aria-haspopup":`dialog`,className:`${te} h-[44px] w-[56px]`,style:ne,"data-testid":`rp-menu-handle`,children:(0,z.jsx)(`span`,{className:`flex h-[26px] w-[44px] items-center justify-center rounded-full ${w} ${C(!1)}`,children:(0,z.jsx)(ve,{size:15,strokeWidth:2,"aria-hidden":!0})})})})]})}var As=`data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAYZbW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAfQAAAfQAAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAmt0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAfQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAABAAAAAQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAH0AAAAAAAABAAAAAAHjbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAABAAAABAABVxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAABjm1pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAU5zdGJsAAAAunN0c2QAAAAAAAAAAQAAAKphdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABAAEABIAAAASAAAAAAAAAABFExhdmM2My4xLjEwMiBsaWJ4MjY0AAAAAAAAAAAAAAAAGP//AAAAMGF2Y0MBQsAK/+EAF2dCwAqmEXsBEAAAAwAQAAADACDxImEYAQAGaMhCAZSyAAAAEHBhc3AAAAABAAAAAQAAABRidHJ0AAAAAAAABUAAAAAAAAAAGHN0dHMAAAAAAAAAAQAAAAQAAEAAAAAAFHN0c3MAAAAAAAAAAQAAAAEAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAJHN0c3oAAAAAAAAAAAAAAAQAAAKCAAAACgAAAAoAAAAKAAAAIHN0Y28AAAAAAAAABAAABlwAAAj+AAAJKAAACVIAAALZdHJhawAAAFx0a2hkAAAAAwAAAAAAAAAAAAAAAgAAAAAAAH0AAAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAB9AAAABAAAAQAAAAACUW1kaWEAAAAgbWRoZAAAAAAAAAAAAAAAAAAAH0AAAIEAVcQAAAAAAC1oZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU291bmRIYW5kbGVyAAAAAfxtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAcBzdGJsAAAAfnN0c2QAAAAAAAAAAQAAAG5tcDRhAAAAAAAAAAEAAAAAAAAAAAABABAAAAAAH0AAAAAAADZlc2RzAAAAAAOAgIAlAAIABICAgBdAFQAAAAAAH0AAAAEcBYCAgAUViFblAAaAgIABAgAAABRidHJ0AAAAAAAAH0AAAAEcAAAAIHN0dHMAAAAAAAAAAgAAACAAAAQAAAAAAQAAAQAAAAAoc3RzYwAAAAAAAAACAAAAAQAAAAEAAAABAAAAAgAAAAgAAAABAAAAmHN0c3oAAAAAAAAAAAAAACEAAAATAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAkc3RjbwAAAAAAAAAFAAAGSQAACN4AAAkIAAAJMgAACVwAAAAac2dwZAEAAAByb2xsAAAAAgAAAAH//wAAABxzYmdwAAAAAHJvbGwAAAABAAAAIQAAAAEAAABhdWR0YQAAAFltZXRhAAAAAAAAACFoZGxyAAAAAAAAAABtZGlyYXBwbAAAAAAAAAAAAAAAACxpbHN0AAAAJKl0b28AAAAcZGF0YQAAAAEAAAAATGF2ZjYzLjEuMTAyAAAACGZyZWUAAAM7bWRhdNwATGF2YzYzLjEuMTAyAAIwQA4AAAJvBgX//2vcRem95tlIt5Ys2CDZI+7veDI2NCAtIGNvcmUgMTY1IHIzMjIyIGIzNTYwNWEgLSBILjI2NC9NUEVHLTQgQVZDIGNvZGVjIC0gQ29weWxlZnQgMjAwMy0yMDI1IC0gaHR0cDovL3d3dy52aWRlb2xhbi5vcmcveDI2NC5odG1sIC0gb3B0aW9uczogY2FiYWM9MCByZWY9MTYgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDEzMSBtZT11bWggc3VibWU9MTAgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0yNCBjaHJvbWFfbWU9MSB0cmVsbGlzPTIgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz0xIGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTQga2V5aW50X21pbj0xIHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NCByYz1jcmYgbWJ0cmVlPTEgY3JmPTUxLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IGlwX3JhdGlvPTEuNDAgYXE9MToxLjAwAIAAAAALZYiCAv5MUAAQv8ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmhwF/UABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmioBb1ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmjsBX1ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBw==`,js=null,Ms=null;function Ns(e){e.play().catch(()=>{if(Ms||js!==e)return;let t=()=>{Ps(),js===e&&e.play().catch(()=>{})};window.addEventListener(`pointerdown`,t,{capture:!0}),Ms=()=>window.removeEventListener(`pointerdown`,t,{capture:!0})})}function Ps(){Ms?.(),Ms=null}function Fs(){if(typeof document<`u`){if(!js){let e=document.createElement(`video`);e.muted=!0,e.loop=!0,e.playsInline=!0,e.setAttribute(`playsinline`,``),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`data-testid`,`keep-screen-video`),e.style.cssText=`position:fixed;left:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none`,e.src=As,document.body.appendChild(e),js=e}Ns(js)}}function Is(){Ps(),js&&=(js.pause(),js.removeAttribute(`src`),js.remove(),null)}function Ls(){return typeof navigator>`u`?null:navigator.wakeLock??null}function Rs(){return dt()||!Pn()}var zs=new Set,Bs=null,Vs=Promise.resolve(),Hs=!1;async function Us(){if(zs.size===0||Bs&&!Bs.released)return;let e=Ls();if(!e)dt()&&Fs();else try{let t=await e.request(`screen`);t.addEventListener(`release`,()=>{Bs===t&&(Bs=null)}),Bs=t}catch{}}async function Ws(){Is();let e=Bs;if(Bs=null,e&&!e.released)try{await e.release()}catch{}}function Gs(){Hs||typeof document>`u`||(Hs=!0,document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&zs.size>0&&(Vs=Vs.then(Us))}))}function Ks(e,t){if(!Rs())return;Gs();let n=zs.size>0;t?zs.add(e):zs.delete(e);let r=zs.size>0;n!==r&&(Vs=Vs.then(r?Us:Ws))}var qs=new Set;function Js(){if(typeof window<`u`)return window.PS5UploadPad}function Ys(e,t){let n=qs.size>0;t?qs.add(e):qs.delete(e);let r=qs.size>0;if(n!==r)try{Js()?.setActive(r)}catch{}}var Xs=class e{constructor(e){this.receiver=e,this.last=null,this.was={}}get frames(){return Number(this.last?.frames??0)}static report(e,t){let n=t=>e[t]??0,r=e=>n(e)-(t[e]??0),i=(e,t)=>r(t)>0?Math.round(r(e)/r(t)*1e4)/10:0;return{frames:n(`framesDecoded`),dropped:n(`framesDropped`),stalls:n(`freezeCount`),stall_ms:Math.round(n(`totalFreezesDuration`)*1e3),decode_ms:i(`totalDecodeTime`,`framesDecoded`),jitter_ms:i(`jitterBufferDelay`,`jitterBufferEmittedCount`),nacks:n(`nackCount`),plis:n(`pliCount`),decoder:`track`}}snapshot(){return this.receiver.getStats().then(t=>{t.forEach(t=>{t.type===`inbound-rtp`&&t.kind===`video`&&(this.last=e.report(t,this.was),this.was={...t})})}).catch(()=>{}),this.last}},Zs=class{constructor(e){this.inner=e,this.video=document.createElement(`video`),this.wrap=document.createElement(`div`),this.media=null,this.trackStats=null,this.audio=!1,this.soundOn=!1,this.muted=!1;let t=this.video;t.muted=t.autoplay=t.playsInline=!0,t.className=`block h-full w-full object-contain`,t.dataset.testid=`track-video`,this.wrap.className=`h-full w-full`,this.wrap.append(t,e.element),this.setTrack(null)}get element(){return this.wrap}get stats(){return this.trackStats??this.inner.stats}setTrack(e,t=!1){this.media=e,this.audio=!!e&&t,this.applySound(),this.trackStats=e?new Xs(e.receiver):null,this.video.style.display=e?``:`none`,this.inner.element.style.display=e?`none`:``,this.video.srcObject!==(e?.stream??null)&&(this.video.srcObject=e?.stream??null),e&&this.play()}play(){try{this.video.play()?.catch?.(()=>{})}catch{}}onMessage(e){let t=new Uint8Array(e)[0];this.media&&t<=1||(!this.audio||t!==3&&t!==4)&&this.inner.onMessage(e)}applySound(){this.video.muted=!(this.audio&&this.soundOn&&!this.muted)}setHevc(e){this.inner.setHevc(e)}set onSoundFail(e){this.inner.onSoundFail=e}soundReport(){return this.inner.soundReport()}startSound(){this.inner.startSound(),this.soundOn=!0,this.applySound(),this.media&&this.play()}setMuted(e){this.inner.setMuted(e),this.muted=e,this.applySound()}resumeSound(){this.inner.resumeSound(),this.media&&this.video.paused&&this.play()}stop(){this.inner.stop(),this.video.srcObject=null}},Qs=`ps5upload.join.muted`,$s=5e3,ec=Object.fromEntries(Object.entries(Na).filter(([e])=>e!==`Escape`)),tc=new Set;function nc(e){if(!(e.code in ec)||e.ctrlKey||e.metaKey||e.altKey)return!1;let t=e.target;if(e.code===`Tab`&&(e.shiftKey||rc(t)))return!1;let n=t?.tagName;return!(n===`INPUT`||n===`TEXTAREA`||n===`SELECT`||t?.isContentEditable||rc(t))}function rc(e){let t=e?.tagName;if(t===`BUTTON`||t===`A`)return!0;let n=e?.getAttribute?.(`role`);return n===`button`||n===`link`||n===`menuitem`||n===`tab`||n===`switch`}var ic=!1;function ac(e){ic=e}function oc(e,t,n=null){if(!e||e.frames===0&&!t)return null;let r=e.snapshot();return r&&{...r,...t?{problem:t}:{},...n??{}}}function sc(){if(ic)return{...ja};let e=Ga(Xa(typeof navigator>`u`?void 0:navigator),So),t=hs.touchPad;return{...Ka(Ka(e,Fa(tc,ec)),t),touch:t.touch??null,motion:hs.motion??null}}var cc=class{constructor(e){this.opts=e,this.player=null,this.listeners=new Set,this.cleanups=[],this.subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e)),this.snap={stage:{kind:`connecting`},status:null,rttMs:null,light:null,problem:null,sound:!1,noSound:!1,host:e.host,muted:uc(),path:null},this.client=new zo({url:e.url,invite:e.invite,code:e.code??null,name:e.name,WebSocketImpl:e.transport,readPad:sc,onStage:e=>{this.set({stage:e}),e.kind===`joined`&&this.readPath(),(e.kind===`refused`||e.kind===`ended`)&&this.teardown()},onStatus:e=>this.set({status:e,host:e.host??this.snap.host}),onRtt:e=>this.set({rttMs:e}),onFrame:e=>this.picture().onMessage(e),readStats:()=>oc(this.player?.stats??null,this.snap.problem,this.player?.soundReport()??null),onCodec:(e,t,n)=>{let r=this.picture();r.setHevc(e),r instanceof Zs&&(r.setTrack(t,!!n),t&&this.snap.problem&&this.set({problem:null}))},onRumble:(e,t)=>{let n=Xa(typeof navigator>`u`?void 0:navigator);qa(n,e,t),n.some(e=>e?.connected)||navigator.vibrate?.(e||t?200:0)},onLight:e=>this.set({light:e})})}picture(){if(!this.player){let e=oa(e=>this.set({problem:e}),`player`,()=>this.client.askKeyframe());this.player=this.opts.transport?new Zs(e):e,this.player.onSoundFail=()=>this.set({noSound:!0}),this.player.setMuted(this.snap.muted)}return this.player}async readPath(){let e=this.client.socket,t=this.opts.path??null;if(e?.netPath)try{t=await e.netPath()??this.opts.path??null}catch{t=null}t!==this.snap.path&&this.set({path:t})}get element(){return this.picture().element}start(){let e=()=>{document.visibilityState===`hidden`?tc.clear():this.player?.resumeSound(),this.client.setNeutral(document.visibilityState===`hidden`)},t=()=>{tc.clear(),this.client.setNeutral(!0)},n=e=>{this.client.current.kind===`joined`&&nc(e)&&(!this.opts.keysLive||this.opts.keysLive())&&(e.preventDefault(),tc.add(e.code))},r=e=>{tc.delete(e.code)&&nc(e)&&e.preventDefault()};window.addEventListener(`keydown`,n),window.addEventListener(`keyup`,r);let i=()=>{this.client.setNeutral(document.visibilityState===`hidden`),document.visibilityState!==`hidden`&&this.player?.resumeSound()};document.addEventListener(`visibilitychange`,e),window.addEventListener(`blur`,t),window.addEventListener(`focus`,i);let a=setInterval(()=>{this.client.current.kind===`joined`&&this.readPath()},$s);this.cleanups.push(()=>{clearInterval(a),document.removeEventListener(`visibilitychange`,e),window.removeEventListener(`blur`,t),window.removeEventListener(`focus`,i),window.removeEventListener(`keydown`,n),window.removeEventListener(`keyup`,r),tc.clear()}),this.client.start()}setMuted(e){this.player?.setMuted(e);try{localStorage.setItem(Qs,e?`1`:`0`)}catch{}this.set({muted:e})}startSound(){this.snap.sound||(this.picture().startSound(),this.set({sound:!0}))}leave(){this.client.leave(),this.teardown()}stop(){this.client.stop(),this.teardown()}teardown(){for(let e of this.cleanups.splice(0))e();hs.touchPad={buttons:0,l2:0,r2:0,lx:0,ly:0,rx:0,ry:0};let e=this.player;this.player=null,e&&(e.stop(),e.element.remove())}sendPad(){this.client.sendPad(!1)}get snapshot(){return this.snap}set(e){this.snap={...this.snap,...e};for(let e of this.listeners)e()}};function lc(e){return(0,D.useSyncExternalStore)(e.subscribe,()=>e.snapshot)}function uc(){try{return typeof localStorage<`u`&&localStorage.getItem(Qs)===`1`}catch{return!1}}function dc(e){let t=()=>{let t=e.snapshot.stage.kind,n=t!==`refused`&&t!==`ended`;Ks(`play-together`,n),Ys(`play-together`,n)};t();let n=e.subscribe(t);return()=>{n(),Ks(`play-together`,!1),Ys(`play-together`,!1)}}var fc=3e3,pc=class{constructor(e,t=fc){this.onChange=e,this.delay=t,this.enabled=!1,this.pinned=!1,this.sticky=!1,this.shown=!0,this.timer=null}get visible(){return!this.enabled||this.pinned||this.shown}set(e,t,n=!1){let r=this.enabled&&!this.pinned,i=this.enabled,a=this.sticky;this.enabled=e,this.pinned=t,this.sticky=n,!e||t?(this.stop(),this.show(!0)):n?(this.stop(),!i||!a?this.show(!1):r||this.show(!0)):(!r||a)&&(this.show(!0),this.arm())}poke(){this.show(!0),this.enabled&&!this.pinned&&!this.sticky&&this.arm()}toggle(){this.visible?this.hide():this.poke()}hide(){this.enabled&&!this.pinned&&(this.stop(),this.show(!1))}dispose(){this.stop()}arm(){this.stop(),this.timer=setTimeout(()=>{this.timer=null,this.show(!1)},this.delay)}stop(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}show(e){this.shown!==e&&(this.shown=e,this.onChange(e))}};function mc(e,t,n=!1){let[r,i]=(0,D.useState)(!0),a=(0,D.useRef)(null);(0,D.useEffect)(()=>{let e=new pc(i);return a.current=e,()=>{e.dispose(),a.current=null}},[]),(0,D.useEffect)(()=>{a.current?.set(e,t,n)},[e,t,n]);let o=(0,D.useCallback)(()=>a.current?.poke(),[]),s=(0,D.useCallback)(()=>a.current?.hide(),[]),c=(0,D.useCallback)(()=>a.current?.toggle(),[]);return{shown:!e||t||r,poke:o,hide:s,toggle:c}}var hc=3e4,gc=class{constructor(e,t=hc){this.onChange=e,this.ms=t,this.picking=!1,this.over=!1,this.timer=null}get shown(){return this.picking&&!this.over}set(e){e!==this.picking&&(this.picking=e,this.over=!1,this.stop(),e&&(this.timer=setTimeout(()=>{this.timer=null,this.over=!0,this.onChange()},this.ms)))}stop(){this.timer&&clearTimeout(this.timer),this.timer=null}reset(){this.stop(),this.picking=!1,this.over=!1}};function _c(e){let[,t]=(0,D.useState)(0),[n]=(0,D.useState)(()=>new gc(()=>t(e=>e+1)));return(0,D.useEffect)(()=>{n.set(e),t(e=>e+1)},[n,e]),(0,D.useEffect)(()=>()=>n.reset(),[n]),n.shown}var vc=()=>Xa(typeof navigator>`u`?void 0:navigator).filter(e=>!!e?.connected);function yc(e,t){if(t.kind===`axis`)return t.which===`lx`?e(`rp_pad_step_lx`,void 0,`Push the left stick right`):t.which===`ly`?e(`rp_pad_step_ly`,void 0,`Push the left stick down`):t.which===`rx`?e(`rp_pad_step_rx`,void 0,`Push the right stick right`):e(`rp_pad_step_ry`,void 0,`Push the right stick down`);if(t.kind===`button`){if(t.bit===R.CROSS)return e(`join_check_bottom`,void 0,`Press the bottom face button (✕)`);if(t.bit===R.CIRCLE)return e(`join_check_right`,void 0,`Press the right face button (○)`);if(t.bit===R.SQUARE)return e(`join_check_left`,void 0,`Press the left face button (□)`);if(t.bit===R.TRIANGLE)return e(`join_check_top`,void 0,`Press the top face button (△)`)}return e(`rp_pad_press`,{name:t.name},`Press ${t.name}`)}function bc(e,t){let n=(0,D.useRef)(t);(0,D.useEffect)(()=>{n.current=t}),(0,D.useEffect)(()=>{if(e===null)return;let t=0,r=()=>{n.current(vc().find(t=>t.index===e)??null),t=window.requestAnimationFrame(r)};return t=window.requestAnimationFrame(r),()=>window.cancelAnimationFrame(t)},[e])}var xc=[[R.CROSS,`✕`],[R.CIRCLE,`○`],[R.SQUARE,`□`],[R.TRIANGLE,`△`],[R.UP,`↑`],[R.DOWN,`↓`],[R.LEFT,`←`],[R.RIGHT,`→`],[R.L1,`L1`],[R.R1,`R1`],[R.L3,`L3`],[R.R3,`R3`],[R.SHARE,`Create`],[R.OPTIONS,`Options`],[R.PS,`PS`],[R.TOUCHPAD,`Touchpad`]];function Sc({pad:e}){let t=e=>`flex h-8 min-w-8 items-center justify-center rounded-md px-1.5 text-xs font-medium ${e?`bg-white text-black`:`bg-white/10 text-white/70`}`,n=(e,t,n)=>(0,z.jsxs)(`span`,{className:`relative flex h-12 w-12 items-center justify-center rounded-full bg-white/10 text-[10px] text-white/50`,children:[n,(0,z.jsx)(`span`,{className:`absolute h-3 w-3 rounded-full bg-white`,style:{left:`calc(50% + ${e/32767*18}px - 6px)`,top:`calc(50% + ${t/32767*18}px - 6px)`}})]});return(0,z.jsxs)(`div`,{className:`space-y-2`,"data-testid":`join-pad-test`,"data-buttons":e.buttons,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[xc.map(([n,r])=>(0,z.jsx)(`span`,{className:t((e.buttons&n)!==0),"data-on":(e.buttons&n)===0?`0`:`1`,children:r},n)),(0,z.jsx)(`span`,{className:t(e.l2>30),children:`L2`}),(0,z.jsx)(`span`,{className:t(e.r2>30),children:`R2`})]}),(0,z.jsxs)(`div`,{className:`flex gap-3`,children:[n(e.lx,e.ly,`L`),n(e.rx,e.ry,`R`)]})]})}function Cc({onClose:e}){let t=Ie(),[n,r]=(0,D.useState)(()=>vc().map(e=>({index:e.index,id:e.id}))),[i,a]=(0,D.useState)(()=>vc()[0]?.index??null),[o,s]=(0,D.useState)(ja),[c,l]=(0,D.useState)(null),[u,d]=(0,D.useState)(0),[f,p]=(0,D.useState)(yo),[m,h]=(0,D.useState)(null),[g,_]=(0,D.useState)(null),v=(0,D.useRef)(null);(0,D.useEffect)(()=>(ac(!0),()=>ac(!1)),[]),(0,D.useEffect)(()=>{(v.current?.querySelector(`[data-testid="join-pad-learn-start"]`)??v.current?.querySelector(`[data-testid="join-pad-check-close"]`))?.focus({preventScroll:!0})},[]),(0,D.useEffect)(()=>{let e=document.activeElement;e&&e!==document.body||v.current?.querySelector(`button:not([disabled])`)?.focus({preventScroll:!0})},[c,u]),(0,D.useEffect)(()=>{let e=()=>{let e=vc();r(t=>t.length===e.length&&t.every((t,n)=>t.id===e[n].id&&t.index===e[n].index)?t:e.map(e=>({index:e.index,id:e.id}))),a(t=>t!==null&&e.some(e=>e.index===t)?t:e[0]?.index??null)},t=window.setInterval(e,500);return window.addEventListener(`gamepadconnected`,e),window.addEventListener(`gamepaddisconnected`,e),()=>{window.clearInterval(t),window.removeEventListener(`gamepadconnected`,e),window.removeEventListener(`gamepaddisconnected`,e)}},[]),bc(i,e=>{if(_(t=>t?.id===e?.id?t:e),!e)return;if(c){c.feed(Eo(e))&&y(c,e);return}let t=Ga([e],So);s(e=>e.buttons===t.buttons&&e.l2===t.l2&&e.r2===t.r2&&e.lx===t.lx&&e.ly===t.ly&&e.rx===t.rx&&e.ry===t.ry?e:t)});let y=(e,n)=>{if(!e.done)return d(e.step);let r=n?.id??g?.id;l(null),r&&(p(bo(r,e.profile(n?wo(n):void 0))),h(t(`join_check_saved`,void 0,`Saved for this controller on this device. Try it below.`)))},b=()=>{h(null),d(0),l(new Fo(No))},x=g,S=x?Co(x):null,ee=!!(x&&f[x.id]);return(0,z.jsx)(`div`,{ref:v,role:`dialog`,"aria-modal":`true`,"aria-label":t(`join_check_title`,void 0,`Check your controller`),className:`absolute inset-0 z-40 flex items-center justify-center bg-black/70 p-4 backdrop-blur-sm`,"data-testid":`join-pad-check`,onPointerDown:e=>e.stopPropagation(),children:(0,z.jsxs)(`div`,{className:`w-[min(26rem,100%)] space-y-3 rounded-2xl border border-white/10 bg-neutral-900/95 p-4 text-sm text-white shadow-2xl`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(me,{size:16,className:`text-white/70`}),(0,z.jsx)(`p`,{className:`flex-1 font-semibold`,children:t(`join_check_title`,void 0,`Check your controller`)}),(0,z.jsx)(`button`,{type:`button`,onClick:e,"aria-label":t(`join_done`,void 0,`Done`),className:`flex h-8 w-8 items-center justify-center rounded-full bg-white/10 hover:bg-white/20`,"data-testid":`join-pad-check-close`,children:(0,z.jsx)(De,{size:15})})]}),x?(0,z.jsxs)(z.Fragment,{children:[n.length>1&&(0,z.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:n.map(e=>(0,z.jsx)(`button`,{type:`button`,disabled:!!c,onClick:()=>a(e.index),className:`rounded-full px-2.5 py-1 text-xs ${e.index===i?`bg-white text-black`:`bg-white/10`}`,children:to(e.id)},`${e.index}-${e.id}`))}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`truncate font-medium`,"data-testid":`join-pad-check-name`,children:to(x.id)}),(0,z.jsx)(`p`,{className:`text-xs text-white/60`,"data-testid":`join-pad-check-kind`,"data-kind":S??``,children:S===`saved`?t(`rp_pad_mapped`,void 0,`Plays with your mapping`):S===`guess`?t(`join_check_unknown`,void 0,`This controller isn't on our list, so its buttons may be mixed up. Setting it up takes a few seconds.`):t(`rp_pad_standard`,void 0,`Recognized`)}),io(x)&&(0,z.jsx)(ps,{id:x.id,className:`mt-1 block text-xs text-amber-200/90`})]}),c?(0,z.jsxs)(`div`,{className:`space-y-3`,"data-testid":`join-pad-learn`,children:[(0,z.jsx)(`p`,{className:`text-xs text-white/60`,children:t(`rp_pad_progress`,{n:u+1,total:c.steps.length},`${u+1} of ${c.steps.length}`)}),(0,z.jsx)(`p`,{className:`text-lg font-semibold`,"data-testid":`join-pad-learn-step`,children:c.current?yc(t,c.current):``}),(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:()=>{c.skip(),y(c,x)},className:`rounded-full bg-white/15 px-3 py-1.5 text-xs hover:bg-white/25`,"data-testid":`join-pad-learn-skip`,children:t(`rp_pad_skip`,void 0,`Skip`)}),u>0&&(0,z.jsx)(`button`,{type:`button`,onClick:()=>{c.back(),d(c.step)},className:`rounded-full bg-white/15 px-3 py-1.5 text-xs hover:bg-white/25`,children:t(`rp_pad_back`,void 0,`Back`)}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>l(null),className:`rounded-full px-3 py-1.5 text-xs text-white/70 hover:bg-white/10`,children:t(`rp_pad_cancel`,void 0,`Cancel`)})]})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`text-xs text-white/60`,children:t(`join_check_try`,void 0,`Press buttons and move the sticks: what you press lights up.`)}),(0,z.jsx)(Sc,{pad:o}),m&&(0,z.jsx)(`p`,{className:`text-xs text-emerald-300`,role:`status`,children:m}),(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:b,className:`rounded-full bg-white px-3 py-1.5 text-xs font-medium text-black`,"data-testid":`join-pad-learn-start`,children:ee?t(`join_check_redo`,void 0,`Redo`):t(`join_check_map`,void 0,`Set up the buttons`)}),ee&&(0,z.jsx)(`button`,{type:`button`,onClick:()=>{p(bo(x.id,null)),h(null)},className:`rounded-full bg-white/15 px-3 py-1.5 text-xs hover:bg-white/25`,"data-testid":`join-pad-reset`,children:t(`rp_pad_reset`,void 0,`Reset`)}),(0,z.jsx)(`button`,{type:`button`,onClick:e,className:`rounded-full bg-white/15 px-3 py-1.5 text-xs hover:bg-white/25`,"data-testid":`join-pad-check-done`,children:t(`join_done`,void 0,`Done`)})]})]})]}):(0,z.jsx)(`p`,{className:`text-white/70`,children:t(`rp_pads_none`,void 0,`No controller seen yet. Connect one and press any button on it.`)})]})})}function wc(e,t){let[n,r]=(0,D.useState)(!1);return(0,D.useEffect)(()=>{if(!e||!t)return;let n=!0;return Be(e,Le).then(e=>{n&&!e&&r(!0)}),()=>{n=!1}},[e,t]),n}function Tc({href:e}){let t=Ie();return(0,z.jsxs)(`div`,{className:`flex flex-col items-center gap-3 text-center`,"data-testid":`open-on-wifi`,children:[(0,z.jsx)(`p`,{className:`max-w-sm text-sm text-white/60`,children:t(`join_open_lan_body`,void 0,`Can't reach the internet? If you're on the same Wi-Fi as your friend, open the game there.`)}),(0,z.jsx)(`a`,{href:e,rel:`noreferrer`,className:`rounded-full bg-white px-4 py-2 text-sm font-medium text-black`,"data-testid":`open-on-wifi-link`,children:t(`join_open_lan`,void 0,`Open on this Wi-Fi`)})]})}function Ec(e){let t=Math.max(0,Math.ceil(e));return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`}var Dc=`ps5upload.join.guided`,Oc=1;function kc(e){return e.player!==Oc&&(!e.guided||e.movedOff)&&!e.reconnecting}function Ac(e,t){switch(t){case`lan`:return e(`join_path_lan`,void 0,`Home network`);case`tailscale`:return e(`join_path_tailscale`,void 0,`Tailscale`);default:return e(`join_path_internet`,void 0,`Internet`)}}function jc(e,t){return e(`join_seat_taken`,{host:t},`${t} needed their controller back and no other controller was free on the PS5, so you're out of the game. Ask ${t} to let you in again.`)}function Mc(e,t,n,r=!1){if(t.kind===`refused`)switch(t.why){case`key`:return e(`join_refused_key`,{host:n},`This invite has expired. Ask ${n} for a new link.`);case`expired`:return e(`join_refused_expired`,{host:n},`Your place in the game was lost. Ask ${n} to let you in again.`);case`full`:return e(`join_refused_full`,void 0,`The game is full: four players already.`);case`denied`:return e(`join_refused_denied`,{host:n},`${n} didn't let you in this time.`);case`no_answer`:return e(`join_refused_no_answer`,{host:n},`${n} didn't answer in time. Tell ${n}, then try again.`);case`closed`:return e(`join_refused_closed`,{host:n},`${n} isn't hosting Play Together right now.`);case`old_helper`:return e(`join_refused_old_helper`,{host:n},`${n}'s PS5 needs an updated helper for Play Together.`);case`not_playing`:return e(`join_refused_not_playing`,{host:n},`${n} isn't playing right now. Ask ${n} to start Play first.`);case`unreachable`:return e(`join_refused_unreachable`,{host:n},`${n}'s computer couldn't reach their PS5. Try again in a moment.`);case`slow_down`:return e(`join_refused_slow_down`,void 0,`Too many wrong codes. Wait a minute, then try again.`);case`address`:return e(`join_refused_address`,{host:n},`This link's address is outside your home network, so the app will not use it. Ask ${n} for a link with their computer's IP address.`);case`seat_taken`:return jc(e,n);default:return e(`join_refused_other`,{host:n},`${n} didn't let you in.`)}if(t.kind===`ended`)switch(t.why){case`kicked`:return e(`join_ended_kicked`,{host:n},`${n} took you out of the game.`);case`closed`:return e(`join_ended_closed`,{host:n},`${n} closed Play Together.`);case`host_stopped`:return e(`join_ended_host_stopped`,void 0,`The host stopped playing.`);case`replaced`:return e(`join_ended_replaced`,void 0,`This game was opened in another tab or on another device, so it stopped here.`);case`pad_lost`:return e(`join_ended_pad_lost`,{host:n},`The PS5 lost your controller, so you're out of the game. Ask ${n} to let you in again.`);case`gave_up`:return e(`join_ended_gave_up`,{host:n},`The connection to ${n} didn't come back in time.`);case`lost`:return r?e(`join_net_lost`,{host:n},`The connection to ${n} dropped. Check your internet connection, then ask again.`):e(`join_ended_lost`,{host:n},`Couldn't reach ${n}. Check that you're on the same network.`);case`left`:return e(`join_ended_left`,void 0,`You left the game.`);case`seat_taken`:return jc(e,n);case`mismatch`:return e(`join_net_mismatch`,void 0,`This link doesn't match the host; ask them for a new one.`);case`no_direct`:return e(`join_net_no_direct`,void 0,`A direct connection isn't possible from this network (both sides' routers are strict). Try Wi-Fi instead of mobile data, or ask the host to turn on UPnP.`);case`no_room`:return e(`join_net_no_room`,{host:n},`This invite isn't open any more. Ask ${n} for a new link.`);case`net_full`:return e(`join_net_full`,{host:n},`${n}'s game has no room for another friend right now. Try again in a moment.`);case`no_hub`:return e(`join_net_no_hub`,void 0,`Couldn't reach the PS5Upload invite service. Check your internet connection, then try again.`);case`offer`:return e(`join_net_offer`,{host:n},`${n}'s computer couldn't connect to this browser. Try another browser.`);case`no_webrtc`:return e(`join_net_no_webrtc`,void 0,`This browser can't make direct connections. Try a recent Chrome, Safari or Firefox.`)}return``}function Nc(e){let[t,n]=(0,D.useState)(()=>Date.now());return(0,D.useEffect)(()=>{if(!e)return;n(Date.now());let t=window.setInterval(()=>n(Date.now()),500);return()=>window.clearInterval(t)},[e]),t}function Pc(){let[e,t]=(0,D.useState)({ready:!1,pressed:!1,id:null,kind:null,weak8BitDo:!1});return(0,D.useEffect)(()=>{let e=()=>{let e=Xa(typeof navigator>`u`?void 0:navigator).find(e=>!!e?.connected),n=!!e,r=n?sc():null,i=!!r&&(r.buttons!==0||r.l2>30||r.r2>30),a=e?.id??null,o=e?Co(e):null,s=!!e&&io(e);t(e=>e.ready===n&&e.pressed===i&&e.id===a&&e.kind===o&&e.weak8BitDo===s?e:{ready:n,pressed:i,id:a,kind:o,weak8BitDo:s})};e();let n=window.setInterval(e,120);return window.addEventListener(`gamepadconnected`,e),window.addEventListener(`gamepaddisconnected`,e),()=>{window.clearInterval(n),window.removeEventListener(`gamepadconnected`,e),window.removeEventListener(`gamepaddisconnected`,e)}},[]),e}function Fc(e){return!!e?.closest?.(`[data-testid="rp-touch"]`)}var Ic=14,Lc=()=>typeof window<`u`&&!rs()&&!!window.matchMedia?.(`(pointer: coarse)`).matches;function Rc(e,t,n){return!e||e===t||e.closest?.(`[data-join-game]`)?`game`:n?.contains(e)?`controls`:`page`}function zc(e){return e.checking?`close-check`:e.guide?`close-guide`:e.where===`game`?`show-controls`:e.full?`leave-full`:null}var Bc={good:`var(--color-good,#32d074)`,fair:`var(--color-warn,#ffb340)`,slow:`var(--color-bad,#ff6961)`,none:`rgba(255,255,255,.5)`};function Vc({text:e,body:t,onCancel:n}){let r=Ie();return(0,z.jsxs)(`div`,{className:`flex flex-col items-center gap-5 px-6 py-10 text-center`,"data-testid":`join-waiting`,children:[(0,z.jsxs)(`div`,{className:`relative flex h-24 w-24 items-center justify-center`,"aria-hidden":!0,children:[(0,z.jsx)(`span`,{className:`absolute inset-0 animate-ping rounded-full bg-white/10 [animation-duration:2.4s]`}),(0,z.jsx)(`span`,{className:`absolute inset-3 animate-pulse rounded-full bg-white/10 [animation-duration:2.4s]`}),(0,z.jsx)(`span`,{className:`relative flex h-14 w-14 items-center justify-center rounded-full bg-white/15`,children:(0,z.jsx)(Se,{size:26})})]}),(0,z.jsx)(`p`,{className:`max-w-sm text-base font-medium`,"data-testid":`join-stage`,children:e}),t&&(0,z.jsx)(`p`,{className:`max-w-sm text-sm text-white/60`,children:t}),(0,z.jsx)(`button`,{type:`button`,onClick:n,autoFocus:!0,className:`rounded-full bg-white/15 px-4 py-2 text-sm hover:bg-white/25`,"data-testid":`join-cancel`,children:r(`join_cancel`,void 0,`Cancel`)})]})}function Hc({session:e,inApp:t=!1,onLeave:n,onAgain:r,onFullscreen:i,lanUrl:a=null,hubDown:o=!1}){let s=Ie(),c=lc(e),{stage:l,status:u}=c,d=c.host??s(`join_host_fallback`,void 0,`your friend`),f=(0,D.useRef)(null),p=(0,D.useRef)(null),m=(0,D.useRef)(null),[h,g]=(0,D.useState)(!1),[_,v]=(0,D.useState)(()=>Lt(Dc)===`1`),[y,b]=(0,D.useState)(()=>typeof window<`u`&&window.innerHeight>window.innerWidth),x=Pc(),[S,ee]=(0,D.useState)(!1),C=l.kind===`reconnecting`,w=Nc(C),T=l.kind===`joined`||C,E=u?.state===`picking_user`,te=l.kind===`joined`||l.kind===`reconnecting`?l.player:0,[ne,re]=(0,D.useState)(!1),ie=(0,D.useRef)(te);(0,D.useEffect)(()=>{ie.current===Oc&&te>Oc&&re(!0),te&&(ie.current=te)},[te]);let[ae,oe]=(0,D.useState)(!1),[se,ce]=(0,D.useState)(!1),le=T&&(h||!t),de=Lc(),fe=_c(E),k=mc(le,C||fe&&!de||ae||se,de),{poke:he}=k,_e=(0,D.useRef)(null),ve=()=>{_e.current&&clearTimeout(_e.current.timer),_e.current=null};(0,D.useEffect)(()=>ve,[]);let[ye,A]=(0,D.useState)(!1),xe=(0,D.useRef)(!1);(0,D.useEffect)(()=>{if(!le||!de||k.shown||!_||xe.current)return;xe.current=!0,A(!0);let e=setTimeout(()=>A(!1),6e3);return()=>clearTimeout(e)},[le,de,k.shown,_]),(0,D.useEffect)(()=>{if(!T)return;let t=e.element;return f.current?.appendChild(t),()=>t.remove()},[T,e]),(0,D.useEffect)(()=>{if(!T||c.sound)return;let t=()=>e.startSound(),n=[`pointerup`,`touchend`,`click`,`keydown`];for(let e of n)window.addEventListener(e,t,!0);return()=>{for(let e of n)window.removeEventListener(e,t,!0)}},[T,c.sound,e]),(0,D.useEffect)(()=>{let e=()=>b(window.innerHeight>window.innerWidth);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,D.useEffect)(()=>{if(h)return()=>void i?.(!1)},[h,i]);let Ce=(0,D.useRef)(h);(0,D.useEffect)(()=>{Ce.current=h},[h]),(0,D.useEffect)(()=>{if(!t||!T||!Lc()||typeof window>`u`||!window.matchMedia)return;let e=window.matchMedia(`(orientation: landscape)`),n=()=>{e.matches&&!Ce.current&&(g(!0),i?.(!0))};return n(),e.addEventListener?.(`change`,n),()=>e.removeEventListener?.(`change`,n)},[t,T,i]),(0,D.useEffect)(()=>{t&&T&&rs()&&!Ce.current&&(g(!0),i?.(!0))},[t,T,i]),(0,D.useEffect)(()=>{if(!T)return;let e=e=>{if(e.key!==`Escape`)return;if(S)return void Le.current();if(he(),h)return g(!1);let t=Rc(document.activeElement,document.body,p.current);t===`game`?Le.current():t===`controls`&&m.current?.focus({preventScroll:!0})};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[T,h,he,S]),(0,D.useEffect)(()=>{if(!h||!Lc())return;window.history.pushState(window.history.state,``);let e=window.location.href,t=!1,n=()=>{t=!0,g(!1)};return window.addEventListener(`popstate`,n),()=>{window.removeEventListener(`popstate`,n),!t&&window.location.href===e&&window.history.back()}},[h]),(0,D.useEffect)(()=>{if(!h||typeof document>`u`)return;let e=()=>{document.fullscreenElement||Lc()||g(!1)};return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[h]);let Te=rs(),Ee=T&&kc({player:te,guided:_,movedOff:ne,reconnecting:C})&&!u?.playsAs,De=async e=>{g(e),await i?.(e)},Oe=()=>m.current?.focus({preventScroll:!0}),ke=()=>{It(Dc,`1`),v(!0),re(!1)},Ae=()=>{he();let e=C?`[data-testid="join-reconnecting-leave"]`:`[data-testid="join-bar"] button`;p.current?.querySelector(e)?.focus({preventScroll:!0})},je=()=>{let e=p.current?.querySelector(`[data-testid="join-check-open"]`);e?e.focus({preventScroll:!0}):Oe(),ee(!1)},Me=()=>Rc(document.activeElement,document.body,p.current),[Ne,Pe]=(0,D.useState)(`game`);(0,D.useEffect)(()=>{if(!T)return;let e=()=>Pe(Me()),t=()=>window.setTimeout(e,0);return e(),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t)}},[T]);let Fe=()=>{switch(T?zc({checking:S,guide:Ee,where:Me(),full:h}):null){case`close-check`:return je(),!0;case`close-guide`:return ke(),Oe(),!0;case`show-controls`:return Ae(),!0;case`leave-full`:return De(!1),!0;default:return!1}},Le=(0,D.useRef)(Fe);(0,D.useEffect)(()=>{Le.current=Fe});let Re=t&&!de&&T&&zc({checking:S,guide:Ee,where:Ne,full:h})!==null;(0,D.useEffect)(()=>{if(Re)return Xo(()=>void Le.current())},[Re]);let ze=!t&&T&&!de;(0,D.useEffect)(()=>{if(!ze)return;let e=window.location.href;window.history.pushState(window.history.state,``);let t=!0,n=()=>{if(t=!1,!Le.current())return window.history.back();window.history.pushState(window.history.state,``),t=!0};return window.addEventListener(`popstate`,n),()=>{window.removeEventListener(`popstate`,n),t&&window.location.href===e&&window.history.back()}},[ze]);let Be=l.kind===`joined`;(0,D.useEffect)(()=>{if(!Be)return;let e=document.activeElement;if(e&&e!==document.body)return;let t=Te&&Ee?p.current?.querySelector(`[data-testid="join-guide-ok"]`):null;t?t.focus({preventScroll:!0}):Oe()},[Be]),(0,D.useEffect)(()=>{x.pressed&&T&&!S&&Me()===`controls`&&Oe()},[x.pressed]);let Ve=()=>{e.leave(),n()};if(l.kind===`connecting`||l.kind===`asking`)return(0,z.jsxs)(`div`,{className:t?`rounded-[var(--radius-card)] bg-neutral-900 text-white`:`flex min-h-[100dvh] flex-col items-center justify-center gap-4 bg-black text-white`,"data-join-ui":``,children:[l.kind===`connecting`&&o&&a&&(0,z.jsx)(Tc,{href:a}),(0,z.jsx)(Vc,{text:l.kind===`connecting`?s(`join_connecting`,{host:d},`Connecting to ${d}…`):s(`join_waiting`,{host:d},`Waiting for ${d} to let you in`),body:l.kind===`asking`?s(`join_waiting_body`,{host:d},`${d} sees your name on their screen and taps Allow.`):void 0,onCancel:Ve})]});if(l.kind===`refused`||l.kind===`ended`){let i=l.kind===`refused`||l.why!==`left`&&l.why!==`mismatch`;return(0,z.jsxs)(`div`,{className:t?`flex flex-col items-center gap-4 rounded-[var(--radius-card)] bg-neutral-900 px-6 py-10 text-center text-white`:`flex min-h-[100dvh] flex-col items-center justify-center gap-4 bg-black px-6 text-center text-white`,"data-testid":`join-ended`,"data-why":l.why,"data-join-ui":``,children:[(0,z.jsx)(Se,{size:28,className:`text-white/60`}),(0,z.jsx)(`p`,{className:`max-w-sm text-base`,"data-testid":`join-ended-text`,children:Mc(s,l,d,e.opts.internet??!!e.opts.transport)}),a&&l.why===`no_hub`&&(0,z.jsx)(Tc,{href:a}),(0,z.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[i&&(0,z.jsx)(`button`,{type:`button`,onClick:r,autoFocus:!0,className:`rounded-full bg-white px-4 py-2 text-sm font-medium text-black`,"data-testid":`join-again`,children:l.kind===`refused`&&l.why===`not_playing`?s(`join_retry`,void 0,`Try again`):s(`join_again`,void 0,`Ask to join again`)}),(0,z.jsx)(`button`,{type:`button`,onClick:n,autoFocus:!i,className:`rounded-full bg-white/15 px-4 py-2 text-sm`,"data-testid":`join-done`,children:s(`join_done`,void 0,`Done`)})]})]})}let He=l.player,Ue=c.light??at(He),We=c.rttMs??u?.rttMs??null,Ge=it(We),Ke=Lc(),qe=T&&!C&&!x.ready&&Ke&&(!t||h),Je=kc({player:He,guided:_,movedOff:ne,reconnecting:C}),Ye=He===Oc,Xe=u?.playsAs??null,Ze=C?(l.deadline-w)/1e3:0,Qe=()=>De(!h),$e=t&&!h&&Ke&&T,et=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`span`,{className:`flex items-center gap-1.5 rounded-full bg-black/60 px-2.5 py-1 font-medium`,"data-testid":`join-player`,children:[(0,z.jsx)(`span`,{className:`inline-block h-2.5 w-2.5 rounded-full`,style:{background:`rgb(${Ue[0]},${Ue[1]},${Ue[2]})`}}),t&&(0,z.jsxs)(`span`,{className:`text-white/80`,children:[s(`join_playing_at`,{host:d},`Playing at ${d}'s`),` · `]}),s(`join_you_are`,{n:He},`You are Player ${He}`)]}),We!=null&&(0,z.jsxs)(`span`,{className:`rounded-full bg-black/60 px-2 py-1 tabular-nums`,style:{color:Bc[Ge]},"data-testid":`join-delay`,"data-tone":Ge,"data-path":c.path??void 0,children:[c.path&&(0,z.jsxs)(`span`,{className:`text-white/80`,children:[Ac(s,c.path),` · `]}),Math.round(We),` ms`]}),Ye&&(0,z.jsx)(`span`,{className:`rounded-full bg-black/60 px-2.5 py-1 text-white/85`,"data-testid":`join-seat-stream`,children:s(`join_seat_stream`,{host:d},`You're playing as ${d}'s PS5 user. No need to pick one.`)}),Xe&&!Ye&&(0,z.jsx)(`span`,{className:`rounded-full bg-black/60 px-2.5 py-1 text-white/85`,"data-testid":`join-plays-as`,children:s(`join_plays_as`,{profile:Xe},`You're playing as ${Xe}. No need to pick one.`)}),E&&!Ye&&u?.seatNote&&(0,z.jsx)(`span`,{className:`rounded-full bg-black/60 px-2.5 py-1 text-white/85`,"data-testid":`join-seat-note`,children:s(`join_seat_tv_asks`,{host:d},`${d} chose a profile for you, but it couldn't be used. The TV will ask who you are.`)}),E&&!Ye&&(0,z.jsx)(`span`,{className:`rounded-full bg-white/90 px-2.5 py-1 font-medium text-black`,"data-testid":`join-picking`,children:s(`join_picking`,void 0,`Press PS, then pick Quick Play on the TV`)})]}),tt=(0,z.jsxs)(z.Fragment,{children:[le&&de&&k.shown&&!C&&(0,z.jsxs)(`button`,{type:`button`,onClick:k.hide,className:`flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 font-medium`,"data-testid":`join-hide-controls`,children:[(0,z.jsx)(pe,{size:13}),s(`join_hide_controls`,void 0,`Hide`)]}),!c.sound&&(0,z.jsxs)(`button`,{type:`button`,onClick:()=>e.startSound(),className:`flex items-center gap-1 rounded-full bg-white/90 px-2.5 py-1 font-medium text-black`,"data-testid":`join-sound`,children:[(0,z.jsx)(we,{size:13}),s(`join_sound`,void 0,`Tap for sound`)]}),c.sound&&!c.noSound&&(0,z.jsxs)(`button`,{type:`button`,onClick:()=>e.setMuted(!c.muted),"aria-pressed":c.muted,className:`flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 hover:bg-white/25`,"data-testid":`join-mute`,children:[c.muted?(0,z.jsx)(M,{size:13}):(0,z.jsx)(we,{size:13}),c.muted?s(`rp_unmute`,void 0,`Sound on`):s(`rp_mute`,void 0,`Mute`)]}),c.noSound&&(0,z.jsxs)(`span`,{className:`flex items-center gap-1 rounded-full bg-black/60 px-2.5 py-1 text-white/80`,"data-testid":`join-no-sound`,children:[(0,z.jsx)(M,{size:13}),s(`join_no_sound`,void 0,`No sound in this browser`)]}),(t||typeof document<`u`&&!!document.documentElement.requestFullscreen)&&(0,z.jsx)(`button`,{type:`button`,onClick:()=>void Qe(),"aria-label":h?s(`join_exit_fullscreen`,void 0,`Leave full screen`):s(`pad_fill`,void 0,`Full screen`),className:`flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 hover:bg-white/25`,"data-testid":`join-full`,children:h?(0,z.jsx)(be,{size:13}):(0,z.jsx)(O,{size:13})}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>ee(!0),"aria-label":s(`join_check_title`,void 0,`Check your controller`),title:s(`join_check_title`,void 0,`Check your controller`),className:`flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 hover:bg-white/25`,"data-testid":`join-check-open`,children:(0,z.jsx)(me,{size:13})}),(0,z.jsxs)(`button`,{type:`button`,onClick:Ve,className:`flex items-center gap-1 rounded-full bg-[var(--color-danger,#dc2626)] px-3 py-1 font-medium`,"data-testid":`join-leave`,children:[(0,z.jsx)(ge,{size:13}),s(`join_leave`,void 0,`Leave`)]})]}),nt=k.shown?`opacity-100`:`pointer-events-none opacity-0`,rt={"data-testid":`join-bar`,"data-shown":k.shown?`1`:`0`,onFocus:e=>{(Te||e.target.matches?.(`:focus-visible`))&&ce(!0)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||ce(!1)},onPointerEnter:e=>{e.pointerType===`mouse`&&oe(!0)},onPointerLeave:()=>oe(!1)},ot=h||!t?`fixed inset-0 z-[200] bg-black`:`relative mx-auto aspect-video w-full max-w-[max(20rem,calc((100dvh_-_22rem)*16/9))] overflow-hidden rounded-[var(--radius-card)] bg-black shadow-[var(--shadow-2)]`,st=t&&h;return(0,z.jsxs)(`div`,{className:`space-y-2`,ref:p,"data-join-ui":``,children:[(0,z.jsxs)(`div`,{className:`${ot} select-none text-white [-webkit-touch-callout:none]`,style:{touchAction:`none`},role:st?`dialog`:void 0,"aria-modal":st?!0:void 0,"aria-label":st?s(`pad_fill`,void 0,`Full screen`):void 0,onPointerMove:e=>{if(e.pointerType===`mouse`)return he();let t=_e.current;t&&t.id===e.pointerId&&Math.hypot(e.clientX-t.x,e.clientY-t.y)>Ic&&ve()},onPointerDown:e=>{if(Fc(e.target))return;if(e.pointerType===`mouse`||!de)return he();if(e.target.closest?.(`[data-testid="join-bar"], button, a, input, [role="button"]`))return;ve();let{pointerId:t,clientX:n,clientY:r}=e;_e.current={id:t,x:n,y:r,timer:setTimeout(()=>{_e.current=null,navigator.vibrate?.(15),k.toggle()},450)}},onPointerUp:ve,onPointerCancel:ve,onPointerLeave:ve,"data-testid":`join-stage-view`,children:[(0,z.jsx)(`div`,{ref:f,className:`pointer-events-none absolute inset-0 z-0 flex items-center justify-center`,"aria-hidden":!0}),le&&!k.shown&&!C&&We!=null&&(0,z.jsxs)(`span`,{className:`pointer-events-none absolute z-10 rounded-full bg-black/40 px-1.5 py-0.5 text-[10px] leading-none tabular-nums`,style:{color:Bc[Ge],top:`max(0.5rem, env(safe-area-inset-top))`,right:`max(0.5rem, env(safe-area-inset-right))`},"data-testid":`join-delay-corner`,children:[Math.round(We),` ms`]}),qe?(0,z.jsxs)(`div`,{className:`absolute left-1/2 top-1/2 z-20 flex w-max max-w-[min(24rem,calc(100%-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col items-center gap-2 rounded-2xl bg-black/70 p-3 text-xs backdrop-blur-sm transition-opacity duration-300 ${nt}`,...rt,children:[(0,z.jsx)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:et}),(0,z.jsx)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:tt})]}):$e?null:(0,z.jsxs)(`div`,{className:`absolute inset-x-0 top-0 z-20 flex flex-wrap items-center gap-2 bg-gradient-to-b from-black/70 to-transparent px-3 pb-5 pt-[max(8px,env(safe-area-inset-top))] text-xs transition-opacity duration-300 ${nt}`,...rt,children:[et,(0,z.jsx)(`span`,{className:`flex-1`}),tt]}),!k.shown&&!qe&&(0,z.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),he()},"aria-label":s(`join_show_controls`,void 0,`Show controls`),className:`absolute left-1/2 top-[max(6px,env(safe-area-inset-top))] z-20 flex h-7 w-11 -translate-x-1/2 items-center justify-center rounded-full bg-black/40 text-white/70 opacity-60 hover:opacity-100 focus-visible:opacity-100`,"data-testid":`join-show-controls`,children:(0,z.jsx)(ue,{size:16,"aria-hidden":!0})}),ye&&!k.shown&&(0,z.jsx)(`p`,{className:`pointer-events-none absolute left-1/2 top-[max(10px,env(safe-area-inset-top))] z-20 -translate-x-1/2 rounded-full bg-black/60 px-3 py-1 text-xs text-white/85`,"data-testid":`join-hold-hint`,children:s(`join_hold_hint`,void 0,`Press and hold the picture to show the buttons`)}),c.problem&&(0,z.jsx)(`p`,{className:`absolute inset-x-4 top-1/2 z-10 -translate-y-1/2 text-center text-sm text-white/85`,"data-testid":`join-problem`,children:c.problem===`no_hevc`?s(`pad_watch_no_hevc`,void 0,`This device can't play this stream's picture: the computer streams HEVC, and this device plays only H.264.`):s(`pad_watch_decode`,void 0,`The picture could not be played here.`)}),S&&(0,z.jsx)(Cc,{onClose:je}),qe&&(0,z.jsx)(ks,{stream:e,layout:`overlay`,onMenu:()=>k.shown?k.hide():he()}),!qe&&!C&&(0,z.jsxs)(`div`,{className:`absolute bottom-3 left-3 z-20 flex items-center gap-2 rounded-2xl bg-black/70 px-3 py-1.5 text-xs transition-opacity duration-300 ${nt}`,"data-testid":`join-pad`,children:[(0,z.jsx)(me,{size:14,style:{color:x.pressed?`rgb(${Ue[0]},${Ue[1]},${Ue[2]})`:void 0}}),x.ready?(0,z.jsxs)(`span`,{className:`flex flex-col items-start gap-1`,children:[(0,z.jsx)(`span`,{children:s(`join_pad_ready`,void 0,`Your controller is ready`)}),x.weak8BitDo&&x.id&&(0,z.jsx)(ps,{id:x.id,className:`text-amber-200/90`}),x.kind===`guess`&&no()&&(0,z.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2 text-white/75`,"data-testid":`join-pad-unknown`,children:[s(`join_check_unknown_short`,void 0,`Not on our list: buttons may be mixed up.`),(0,z.jsx)(`button`,{type:`button`,onClick:()=>ee(!0),className:`rounded-full bg-white px-2.5 py-0.5 font-medium text-black`,"data-testid":`join-pad-unknown-check`,children:s(`join_check_title`,void 0,`Check your controller`)})]})]}):Ke&&t&&!h?s(`join_full_to_play`,void 0,`Tap full screen to play with the on-screen controller.`):(0,z.jsxs)(`span`,{className:`flex flex-col`,children:[(0,z.jsx)(`span`,{children:s(`join_pad_none`,void 0,`Connect a controller (USB or Bluetooth) and press any button.`)}),(0,z.jsx)(`span`,{className:`text-white/60`,"data-testid":`join-pad-keys`,children:s(`join_pad_keys`,void 0,`Or use the keyboard: WASD move, arrows D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.`)})]}),Te&&(0,z.jsx)(`span`,{className:`max-w-[14rem] border-l border-white/20 pl-2 text-white/70`,"data-testid":`join-tv-back`,children:s(`join_tv_back_hint`,void 0,`Press Back on the remote for the buttons.`)})]}),u?.blockSystem&&u.state===`playing`&&!qe&&(0,z.jsx)(`p`,{className:`absolute bottom-3 right-3 z-20 rounded-full bg-black/60 px-3 py-1 text-[11px] text-white/70 transition-opacity duration-300 ${nt}`,"data-testid":`join-blocked`,children:s(`join_block_note`,{host:d},`${d} turned off PS and Create for friends.`)}),fe&&!Ye&&de&&!k.shown&&!C&&(0,z.jsx)(`p`,{className:`pointer-events-none absolute left-1/2 top-2 z-20 -translate-x-1/2 whitespace-nowrap rounded-full bg-white/90 px-2.5 py-1 text-xs font-medium text-black`,"data-testid":`join-picking-note`,children:s(`join_picking`,void 0,`Press PS, then pick Quick Play on the TV`)}),Je&&!Xe&&(0,z.jsxs)(`div`,{className:`absolute bottom-14 left-1/2 z-30 w-[min(22rem,calc(100%-2rem))] -translate-x-1/2 rounded-2xl border border-white/10 bg-neutral-900/90 p-4 text-sm shadow-2xl backdrop-blur-md`,"data-testid":`join-guide`,children:[(0,z.jsx)(`p`,{className:`font-semibold`,children:s(`join_guide_title`,void 0,`One more step on the TV`)}),(0,z.jsx)(`p`,{className:`mt-1 text-white/75`,children:s(`join_guide_body`,void 0,`On your controller, press PS once. The TV asks "Who's using this controller?". Pick Quick Play or your own user. The host doesn't need to do anything.`)}),(0,z.jsx)(`p`,{className:`mt-1 text-white/60`,children:s(`join_guide_menus`,void 0,`On the PS5's home screen only the host controls the menus; your controller plays inside games.`)}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>{ke(),Oe()},className:`mt-3 rounded-full bg-white px-3 py-1 text-xs font-medium text-black`,"data-testid":`join-guide-ok`,children:s(`join_guide_ok`,void 0,`Got it`)})]}),C&&(0,z.jsxs)(`div`,{className:`absolute inset-0 z-30 flex flex-col items-center justify-center gap-3 bg-black/70 px-6 text-center`,"data-testid":`join-reconnecting`,children:[(0,z.jsxs)(`button`,{type:`button`,onClick:Ve,className:`absolute right-3 top-[max(10px,env(safe-area-inset-top))] flex items-center gap-1 rounded-full bg-white/15 px-3 py-1.5 text-sm font-medium hover:bg-white/25`,"data-testid":`join-reconnecting-leave`,children:[(0,z.jsx)(ge,{size:14}),s(`join_leave`,void 0,`Leave`)]}),(0,z.jsx)(`span`,{className:`h-7 w-7 animate-spin rounded-full border-2 border-white/30 border-t-white`,"aria-hidden":!0}),l.hostStopped?(0,z.jsx)(`p`,{className:`max-w-sm text-base font-medium`,"data-testid":`join-host-away`,children:s(`join_host_away`,{time:Ec(Ze)},`The host stopped playing — waiting for them to start again (${Ec(Ze)})`)}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`text-base font-medium`,children:s(`join_reconnecting`,void 0,`Reconnecting…`)}),(0,z.jsx)(`p`,{className:`text-sm text-white/70`,"data-testid":`join-reconnecting-left`,children:s(`join_reconnecting_left`,{time:Ec(Ze)},`Your place is kept for ${Ec(Ze)}.`)})]})]}),!t&&T&&y&&Ke&&(0,z.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-16 z-20 flex justify-center`,children:(0,z.jsxs)(`span`,{className:`flex items-center gap-2 rounded-full bg-black/70 px-3 py-1.5 text-xs text-white/85`,children:[(0,z.jsx)(j,{size:14}),s(`pad_turn`,void 0,`Turn the phone sideways`)]})}),(0,z.jsx)(`div`,{ref:m,tabIndex:0,"data-own-arrows":``,"data-join-game":``,"aria-label":s(`join_game_label`,{host:d},`${d}'s game`),className:`pointer-events-none absolute inset-0 outline-none`,"data-testid":`join-game`})]}),$e&&(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 rounded-[var(--radius-card)] bg-neutral-900 px-3 py-2 text-xs text-white`,"data-testid":`join-bar`,"data-shown":`1`,"data-below":`1`,children:[(0,z.jsx)(`div`,{className:`flex w-full min-w-0 flex-wrap items-center gap-2`,children:et}),(0,z.jsxs)(`button`,{type:`button`,onClick:()=>void Qe(),className:`flex h-11 min-w-0 flex-1 items-center justify-center gap-1.5 rounded-full bg-white/15 px-3 text-sm font-medium hover:bg-white/25`,"data-testid":`join-fullscreen-below`,children:[(0,z.jsx)(O,{size:15}),s(`pad_fill`,void 0,`Full screen`)]}),c.sound&&!c.noSound?(0,z.jsx)(`button`,{type:`button`,onClick:()=>e.setMuted(!c.muted),"aria-pressed":c.muted,"aria-label":c.muted?s(`rp_unmute`,void 0,`Sound on`):s(`rp_mute`,void 0,`Mute`),className:`flex h-11 w-11 items-center justify-center rounded-full bg-white/15 hover:bg-white/25`,children:c.muted?(0,z.jsx)(M,{size:16}):(0,z.jsx)(we,{size:16})}):c.sound?null:(0,z.jsxs)(`button`,{type:`button`,onClick:()=>e.startSound(),className:`flex h-11 items-center justify-center gap-1.5 rounded-full bg-white px-3 text-sm font-medium text-black`,children:[(0,z.jsx)(we,{size:15}),s(`join_sound`,void 0,`Tap for sound`)]}),(0,z.jsxs)(`button`,{type:`button`,onClick:Ve,className:`flex h-11 items-center justify-center gap-1.5 rounded-full bg-[var(--color-danger,#dc2626)] px-4 text-sm font-medium`,"data-testid":`join-leave-below`,children:[(0,z.jsx)(ge,{size:15}),s(`join_leave`,void 0,`Leave`)]})]})]})}var Uc=`ps5upload.join.name`;function Wc(e){return/iPhone/.test(e)?`iPhone`:/iPad/.test(e)?`iPad`:/Android/.test(e)?`Android`:``}function Gc(e){return e.trim().slice(0,32)}function Kc(e=``){return Gc(Lt(`ps5upload.join.name`)??``)||e}function qc(e){let t=Gc(e);return t&&It(Uc,t),t}function Jc(e){try{return!!sessionStorage.getItem(Ro(e))}catch{return!1}}async function Yc(e){try{e?(await document.documentElement.requestFullscreen?.({navigationUI:`hide`}),await screen.orientation.lock?.(`landscape`)):document.fullscreenElement&&await document.exitFullscreen()}catch{}}function Xc({url:e,invite:t,host:n,transport:r,lanUrl:i=null,path:a=null,internet:o}){let s=Ie(),c=wc(r&&o!==!1?e:null,i),[l,u]=(0,D.useState)(()=>Kc(Wc(typeof navigator>`u`?``:navigator.userAgent))),[d,f]=(0,D.useState)(null),[p,m]=(0,D.useState)(0),h=(0,D.useCallback)(e=>{if(!e)return;let t=typeof window<`u`&&!!window.matchMedia?.(`(pointer: coarse)`).matches,n=e.querySelector(`[data-testid="join-name"]`)?.value.trim()?`join-go`:t?null:`join-name`;n&&e.querySelector(`[data-testid="${n}"]`)?.focus({preventScroll:!0})},[]),g=i=>{let s=qc(i);if(!s)return;let c=new cc({url:e,invite:t,name:s,host:n,transport:r,path:a,...o===void 0?{}:{internet:o}});f(c),m(e=>e+1),c.start()};if((0,D.useEffect)(()=>{!d&&Jc(t)&&l.trim()&&g(l)},[]),(0,D.useEffect)(()=>d?dc(d):void 0,[d]),(0,D.useEffect)(()=>{if(!d)return;let e=()=>d.stop();return window.addEventListener(`pagehide`,e),()=>window.removeEventListener(`pagehide`,e)},[d]),d)return(0,z.jsx)(Hc,{session:d,lanUrl:i,hubDown:c,onLeave:()=>f(null),onAgain:()=>{d.stop(),g(l)},onFullscreen:Yc},p);let _=n??s(`join_host_fallback`,void 0,`your friend`),v=(0,z.jsx)(`div`,{className:`flex min-h-[100dvh] items-center justify-center bg-black px-6 text-white`,"data-testid":`join-name-step`,"data-join-ui":``,children:(0,z.jsxs)(`form`,{ref:h,className:`w-full max-w-sm space-y-4 rounded-2xl border border-white/10 bg-neutral-900 p-6`,onSubmit:e=>{e.preventDefault(),g(l)},children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(`span`,{className:`flex h-10 w-10 items-center justify-center rounded-full bg-white/10`,children:(0,z.jsx)(Se,{size:20})}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h1`,{className:`text-lg font-semibold`,children:s(`join_title`,void 0,`Join a friend's game`)}),(0,z.jsx)(`p`,{className:`text-sm text-white/60`,children:s(`join_title_body`,{host:_},`Play on ${_}'s PS5 as Player 2, 3 or 4.`)})]})]}),(0,z.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,z.jsx)(`span`,{className:`text-sm font-medium`,children:s(`join_name_label`,void 0,`Your name`)}),(0,z.jsx)(`input`,{value:l,onChange:e=>u(e.target.value),maxLength:32,autoComplete:`nickname`,className:`block w-full rounded-lg border border-white/15 bg-black px-3 py-2 text-base outline-none focus:border-white/50`,"data-testid":`join-name`}),(0,z.jsx)(`span`,{className:`block text-xs text-white/50`,children:s(`join_name_hint`,void 0,`Your friend sees this when you ask to join.`)})]}),(0,z.jsx)(`button`,{type:`submit`,disabled:!l.trim(),className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black disabled:opacity-40`,"data-testid":`join-go`,children:s(`join_button`,void 0,`Join`)}),c&&i&&(0,z.jsx)(Tc,{href:i})]})});return t?(0,z.jsx)(Wo,{appLink:rt(location.href),children:v}):v}function Zc(e){let t=(e??``).trim().replace(/^\[|\]$/g,``).toLowerCase(),n=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(t);if(n){let e=n.slice(1).map(Number);if(e.some(e=>e>255))return null;let[t,r]=e;return t===10||t===172&&r>=16&&r<32||t===192&&r===168||t===169&&r===254||t===127?0:t===100&&r>=64&&r<128?1:2}if(!t.includes(`:`)||!/^[0-9a-f:.]+$/.test(t))return null;if(t.startsWith(`fd7a:115c:a1e0:`))return 1;let r=parseInt(t.split(`:`)[0]||`0`,16);return(r&65024)==64512||(r&65472)==65152||t===`::1`?0:2}function Qc(e,t){let n=Zc(e),r=Zc(t);return n===1||r===1?`tailscale`:r===0?`lan`:r===2?`internet`:null}function $c(e){let t=(e??``).toLowerCase();if(t.endsWith(`.local`))return`lan`;if(t.endsWith(`.ts.net`))return`tailscale`;let n=Zc(t);return n===0?`lan`:n===1?`tailscale`:null}function el(e){let t=[];if(typeof e.forEach==`function`)e.forEach(e=>t.push(e));else for(let n of e)t.push(n);let n=new Map(t.map(e=>[String(e.id),e])),r=t.filter(e=>e.type===`candidate-pair`),i=t.filter(e=>e.type===`transport`&&typeof e.selectedCandidatePairId==`string`).map(e=>n.get(String(e.selectedCandidatePairId))).find(Boolean)??r.find(e=>e.selected===!0)??r.find(e=>e.nominated===!0&&e.state===`succeeded`);if(!i)return null;let a=e=>{let t=n.get(String(e));if(!t)return null;let r=t.address??t.ip;return typeof r==`string`?r:null};return Qc(a(i.localCandidateId),a(i.remoteCandidateId))}function tl(e){let t=e.replace(/:\d+$/,``).replace(/^\[|\]$/g,``);return`${t===`localhost`||t===`127.0.0.1`||t===`::1`?`ws`:`wss`}://${e}/ws`}function nl(e){let t=new Set;for(let n of e.matchAll(/^a=fingerprint:sha-256[ \t]+([0-9A-Fa-f:]+)[ \t]*\r?$/gim))t.add(n[1].toUpperCase());return/^a=fingerprint:(?!sha-256[ \t])/im.test(e)?null:t.size===1?[...t][0]:null}function rl(e,t){let n=nl(e);return n!==null&&n===t.toUpperCase()}var il=16777216;function al(e){let t=16383,n=Math.max(1,Math.ceil(e.length/t)),r=[];for(let i=0;ithis.max)return this.parts=[],this.size=0,{kind:`error`,why:`too_big`};if(this.parts.push(r.slice()),this.size+=r.length,n===1)return{kind:`partial`};let i=new Uint8Array(this.size),a=0;for(let e of this.parts)i.set(e,a),a+=e.length;return this.parts=[],this.size=0,{kind:`message`,data:i.buffer}}};function sl(e){let t=new Uint8Array(9);return t[0]=3,t.set(e.subarray(0,8),1),t}var cl=[`stun:stun.cloudflare.com:3478`,`stun:stun.l.google.com:19302`],ll=1500,ul=2e4;function dl(e){let t=e?.codecs??[],n=e=>t.filter(t=>t.mimeType.toLowerCase()===e);return[...n(`video/h264`),...n(`video/h265`),...n(`video/rtx`)]}var fl=null;function pl(e){e.onopen=e.onmessage=e.onclose=e.onerror=null;try{e.readyState===1&&e.send(JSON.stringify({t:`leave`})),e.close(1e3)}catch{}}function ml(e,t={}){let n=t.WebSocketImpl??(typeof WebSocket>`u`?void 0:WebSocket);if(!n||fl)return;let r=tl(e.hub),i;try{i=new n(r)}catch{return}let a={url:r,room:e.room,ws:i,msgs:[],timer:null};fl=a;let o=()=>{fl===a&&(fl=null,a.timer&&clearTimeout(a.timer),pl(i))};i.onopen=()=>i.send(JSON.stringify({v:1,t:`join`,room:e.room})),i.onmessage=e=>{if(typeof e.data==`string`)try{a.msgs.push(JSON.parse(e.data))}catch{}},i.onclose=o,i.onerror=()=>{},a.timer=setTimeout(o,t.keepMs??6e4)}function hl(e,t){let n=fl;return n?(fl=null,n.timer&&clearTimeout(n.timer),n.url!==e||n.room!==t||n.ws.readyState>1||n.msgs.some(e=>e.t===`error`||e.t===`closed`)?(pl(n.ws),null):{ws:n.ws,msgs:n.msgs}):null}function gl(e,t={}){var n;let r=t.WebSocketImpl??(typeof WebSocket>`u`?void 0:WebSocket),i=t.PeerConnection??(typeof RTCPeerConnection>`u`?void 0:RTCPeerConnection),a=t.iceTimeoutMs??15e3,o=t.log??(()=>{});class s{constructor(e){this.CONNECTING=0,this.OPEN=1,this.CLOSING=2,this.CLOSED=3,this.readyState=0,this.binaryType=`arraybuffer`,this.onopen=null,this.onmessage=null,this.onclose=null,this.onerror=null,this.hub=null,this.pc=null,this.dc=null,this.timer=null,this.rx=new ol,this.answered=!1,this.early=[],this.hubBackUntil=0,this.offerSdp=null,this.offerSent=!1,this.ownEarly=[],this.media=null,setTimeout(()=>this.begin(),0)}begin(){if(this.readyState!==0)return;if(!i||!r){this.fail(`no_webrtc`);return}let n=t.signalUrl??tl(e.hub),a=t.signalUrl||t.lan?null:hl(n,e.room),s;if(a)s=a.ws,o(`hub: joined early`);else try{s=new r(n)}catch{this.fail(`no_hub`);return}if(this.hub=s,this.prepare(),this.readyState===0){s.onopen=()=>s.send(JSON.stringify(t.lan?{v:1,t:`join`,lan:!0}:{v:1,t:`join`,room:e.room})),s.onmessage=e=>{if(typeof e.data!=`string`)return;let t;try{t=JSON.parse(e.data)}catch{return}this.onHub(t)},s.onclose=e=>{this.hub===s&&(this.hub=null,this.readyState===0&&(this.answered||e?.code===1001&&this.hubRestarting()||this.fail(`no_hub`)))},s.onerror=()=>{};for(let e of a?.msgs??[])this.onHub(e)}}signal(e){let t=this.hub;t&&t.readyState===1&&t.send(JSON.stringify({t:`signal`,to:`host`,data:e}))}onHub(e){if(this.readyState===0)switch(e.t){case`joined`:o(`hub: joined room as ${e.gid??`?`}`),this.sendOffer();return;case`signal`:e.from===`host`&&e.data&&typeof e.data==`object`&&this.onSignal(e.data);return;case`closed`:this.fail(`no_room`);return;case`error`:if(o(`hub: error ${e.why??`?`}`),e.why===`no_room`&&this.hubBackUntil&&this.hubRestarting())return;this.fail(e.why===`no_room`?`no_room`:e.why===`room_full`?`net_full`:`no_hub`);return}}prepare(){if(!i)return;this.offerSent=!1,this.ownEarly=[];let e;try{e=new i({iceServers:[{urls:cl}]})}catch{this.fail(`no_webrtc`);return}this.pc=e;let n=e.createDataChannel(t.label??`join`,{ordered:!0});if(n.binaryType=`arraybuffer`,this.dc=n,n.onopen=()=>this.opened(n),n.onmessage=e=>this.fromChannel(e.data),n.onclose=()=>{this.dc===n&&this.dropped()},t.video&&e.addTransceiver){try{let t=e.addTransceiver(`video`,{direction:`recvonly`}),n=dl(globalThis.RTCRtpReceiver?.getCapabilities?.(`video`));n.length&&t.setCodecPreferences&&t.setCodecPreferences(n)}catch{}try{e.addTransceiver(`audio`,{direction:`recvonly`})}catch{}e.ontrack=t=>{if(this.pc!==e)return;let n=this.media?.stream??t.streams[0]??new MediaStream;n.getTracks().includes(t.track)||n.addTrack(t.track),this.media=t.track.kind===`audio`?{stream:n,receiver:this.media?.receiver??t.receiver,audio:t.receiver}:{stream:n,receiver:t.receiver,...this.media?.audio?{audio:this.media.audio}:{}}}}e.onicecandidate=t=>{if(this.pc!==e)return;let n=t.candidate;if(!n||!n.candidate)return;let r={type:`candidate`,candidate:n.candidate,sdpMid:n.sdpMid??`0`};this.offerSent?this.signal(r):this.ownEarly.push(r)},e.oniceconnectionstatechange=()=>{if(this.pc!==e)return;let t=e.iceConnectionState;o(`ice: ${t}`),t===`failed`&&(this.readyState===0?this.fail(`no_direct`):this.dropped())},this.offerSdp=(async()=>{let t=await e.createOffer();return await e.setLocalDescription(t),e.localDescription?.sdp??t.sdp??``})().catch(()=>(this.pc===e&&this.fail(`no_webrtc`),null))}async sendOffer(){let e=this.pc,t=this.offerSdp;if(!e||!t||this.offerSent)return;this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,this.readyState===0&&this.fail(`no_direct`)},a);let n=await t;if(this.pc===e&&n!==null&&this.readyState===0){this.signal({type:`offer`,sdp:n}),this.offerSent=!0;for(let e of this.ownEarly.splice(0))this.signal(e)}}async onSignal(t){let n=this.pc;if(t.type===`bye`)this.fail(t.why===`full`?`net_full`:`offer`);else if(n){if(t.type===`answer`){if(this.answered||typeof t.sdp!=`string`)return;if(e.fp?!rl(t.sdp,e.fp):nl(t.sdp)===null){o(`answer: fingerprint does not match the link`),this.fail(`mismatch`);return}this.answered=!0;try{await n.setRemoteDescription({type:`answer`,sdp:t.sdp});for(let e of this.early.splice(0))await n.addIceCandidate(e).catch(()=>{})}catch{this.fail(`offer`)}}else if(t.type===`candidate`&&typeof t.candidate==`string`&&t.candidate){let e={candidate:t.candidate,sdpMid:typeof t.sdpMid==`string`?t.sdpMid:`0`,sdpMLineIndex:typeof t.sdpMLineIndex==`number`?t.sdpMLineIndex:0};this.answered?await n.addIceCandidate(e).catch(()=>{}):this.early.push(e)}}}opened(e){this.dc===e&&this.readyState===0&&(this.clearTimer(),this.readyState=1,o(`channel open`),this.leaveHub(),this.onopen?.(new Event(`open`)))}fromChannel(e){if(this.readyState!==1)return;if(typeof e==`string`){this.onmessage?.(new MessageEvent(`message`,{data:e}));return}if(!(e instanceof ArrayBuffer))return;let t=this.rx.push(e);switch(t.kind){case`ping`:try{this.dc?.send(sl(t.data))}catch{}return;case`message`:this.onmessage?.(new MessageEvent(`message`,{data:t.data}));return;case`error`:o(`channel: bad binary message (${t.why})`),this.dropped();return;default:return}}async netPath(){let e=this.pc;if(!e||this.readyState!==1||typeof e.getStats!=`function`)return null;try{return el(await e.getStats())}catch{return null}}send(e){let t=this.dc;if(this.readyState!==1||!t||t.readyState!==`open`)throw Error(`not open`);if(typeof e==`string`){t.send(e);return}let n=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);for(let e of al(n))t.send(e)}close(){this.readyState!==3&&(this.teardown(),this.emitClose(1e3,``,!0))}clearTimer(){this.timer&&clearTimeout(this.timer),this.timer=null}leaveHub(){let e=this.hub;if(this.hub=null,e)try{e.readyState===1&&e.send(JSON.stringify({t:`leave`})),e.close(1e3)}catch{}}hubRestarting(){let e=Date.now();return this.hubBackUntil||=e+ul,e>=this.hubBackUntil?!1:(o(`hub: restarting, trying again`),this.clearTimer(),this.leaveHub(),this.closePeer(),this.answered=!1,this.early=[],this.timer=setTimeout(()=>{this.timer=null,this.begin()},ll),!0)}teardown(){this.readyState=3,this.clearTimer(),this.leaveHub(),this.closePeer()}closePeer(){let e=this.pc,t=this.dc;this.pc=null,this.dc=null,this.media=null,this.offerSdp=null,this.offerSent=!1,this.ownEarly=[];try{t?.close()}catch{}try{e?.close()}catch{}}dropped(){this.readyState!==3&&(this.teardown(),this.emitClose(1006,``,!1))}fail(e){this.readyState!==3&&(o(`failed: ${e}`),this.teardown(),this.emitClose(He,`net:${e}`,!1))}emitClose(e,t,n){let r=this.onclose;if(!r)return;let i=typeof CloseEvent>`u`?{type:`close`,code:e,reason:t,wasClean:n}:new CloseEvent(`close`,{code:e,reason:t,wasClean:n});setTimeout(()=>r(i),0)}}return n=s,n.CONNECTING=0,n.OPEN=1,n.CLOSING=2,n.CLOSED=3,s}var _l=3e3;function vl(e,t){return/^https?:\/\/[^/?#]+(\/[^?#]*)?\/join\/?$/.test(e)?e.replace(/^http/,`ws`).replace(/\/join\/?$/,`/${t}`):null}var U=e=>vl(e,`api/join/signal`);function yl(e){let t=[];if(e.rtc){let n=e.net??{room:``,key:``,fp:e.fp??``,hub:``};for(let[r,i]of[[`lan`,e.lan],[`tailscale`,e.ts]]){let a=i?U(i):null;if(!a)continue;let o=e.rtcMake(n,{signalUrl:e.reach(a),...e.net?{}:{lan:!0}});t.push({via:r,make:()=>new o(``),pinned:!!n.fp})}if(e.net){let n=e.rtcMake(e.net,{});t.push({via:`hub`,make:()=>new n(``),pinned:!0})}}let n=e.lan?vl(e.lan,`api/join/ws`):null;if(n){let r=e.reach(n);t.push({via:`socket`,make:()=>e.socket(r)})}return t}var bl=new Map;function xl(e,t,n=300,r=_l){let i=e.some(e=>e===`lan`||e===`tailscale`),a=e.some(e=>e!==`socket`);return e.map(e=>e===t?0:e===`hub`&&i?n:e===`socket`&&a?r:0)}function Sl(e){let t=e.find(e=>e.via===`hub`),n=e.find(e=>(e.via===`lan`||e.via===`tailscale`)&&[`no_direct`,`net_full`,`offer`].includes(Ue(e.e)??``));return t&&(Ue(t.e)!==`no_hub`||!n)?t.e:n?n.e:t?.e??e[e.length-1]?.e??null}function Cl(e,t){var n;let r=t.log??(()=>{}),i=t.headStartMs??300,a=t.socketAfterMs??3e3;class o{constructor(e){this.CONNECTING=0,this.OPEN=1,this.CLOSING=2,this.CLOSED=3,this.readyState=0,this.binaryType=`arraybuffer`,this.onopen=null,this.onmessage=null,this.onclose=null,this.onerror=null,this.live=[],this.waiting=[],this.pinned=new Set,this.t0=0,this.closes=[],this.winner=null,setTimeout(()=>this.begin(),0)}get via(){return this.winner?.via??null}get media(){return this.winner?.s?.media??null}async netPath(){let e=this.winner?.s;return e?.netPath?e.netPath():null}begin(){if(this.readyState!==0)return;let n=e();if(!n.length){this.end({type:`close`,code:1006,reason:``,wasClean:!1});return}this.t0=Date.now();for(let e of n)e.pinned&&this.pinned.add(e.via);let r=xl(n.map(e=>e.via),bl.get(t.room)??null,i,a);n.forEach((e,t)=>{r[t]===0?this.launch(e.via,e.make):this.waiting.push({via:e.via,make:e.make,timer:setTimeout(()=>this.startWaiting(e.via),r[t])})})}startWaiting(e){let t=this.waiting.findIndex(t=>t.via===e);if(t<0)return;let[n]=this.waiting.splice(t,1);clearTimeout(n.timer),this.launch(n.via,n.make)}launch(e,t){if(this.readyState!==0)return;let n;try{n=t()}catch{this.tryClosed(e,{type:`close`,code:1006,reason:``,wasClean:!1});return}r(`path: trying ${e}`);let i={via:e,s:n};this.live.push(i),n.binaryType=this.binaryType,n.onopen=e=>this.won(i,e),n.onclose=t=>{this.live=this.live.filter(e=>e!==i),this.tryClosed(e,t)},n.onerror=()=>{},n.onmessage=null}tryClosed(e,t){if(this.readyState===0){if(r(`path: ${e} failed after ${Date.now()-this.t0} ms${t?.reason?` (${t.reason})`:``}`),this.closes.push({via:e,e:t}),this.pinned.has(e)&&Ue(t)===`mismatch`){for(let e of this.waiting.filter(e=>e.via===`socket`))clearTimeout(e.timer);this.waiting=this.waiting.filter(e=>e.via!==`socket`)}!this.live.length&&this.waiting.length?this.startWaiting(this.waiting[0].via):!this.live.length&&!this.waiting.length&&this.end(Sl(this.closes))}}won(e,n){if(this.readyState!==0)return;this.winner=e,bl.set(t.room,e.via),r(`path: playing by ${e.via} after ${Date.now()-this.t0} ms`);for(let e of this.waiting.splice(0))clearTimeout(e.timer);for(let t of this.live.splice(0))if(t!==e){t.s.onopen=t.s.onclose=t.s.onmessage=t.s.onerror=null;try{t.s.close()}catch{}}let i=e.s;i.onmessage=e=>this.onmessage?.(e),i.onerror=e=>this.onerror?.(e),i.onclose=e=>{this.readyState!==3&&(this.readyState=3,this.onclose?.(e))},this.readyState=1,t.onWin?.(e.via),this.onopen?.(n)}send(e){if(this.readyState!==1||!this.winner)throw Error(`not open`);this.winner.s.send(e)}close(e,t){if(this.readyState===3)return;let n=this.readyState===1;this.readyState=3;for(let e of this.waiting.splice(0))clearTimeout(e.timer);let r=this.winner?[this.winner,...this.live]:this.live.splice(0);for(let n of r){n.s.onopen=n.s.onclose=n.s.onmessage=n.s.onerror=null;try{n.s.close(e,t)}catch{}}let i=this.onclose;if(i){let r={type:`close`,code:e??1e3,reason:t??``,wasClean:n};setTimeout(()=>i(r),0)}}end(e){if(this.readyState===3)return;this.readyState=3;let t=this.onclose,n=e??{type:`close`,code:1006,reason:``,wasClean:!1};t&&setTimeout(()=>t(n),0)}}return n=o,n.CONNECTING=0,n.OPEN=1,n.CLOSING=2,n.CLOSED=3,o}fs();var wl=new URLSearchParams(location.hash.slice(1)),Tl=wl.get(`n`)?.trim()||null,El=nt(location.hash);El&&ml(El);var Dl=(0,x.createRoot)(document.getElementById(`root`));if(El){let e=gl(El,{video:!0,log:e=>console.info(`[join] ${e}`)}),t=Re(location.hash,`join`);Dl.render((0,z.jsx)(Xc,{url:tl(El.hub),invite:El.key,host:Tl,transport:e,lanUrl:t?ze(t,{key:El.key}):null}))}else{let e=wl.get(`i`)||null,t=location.pathname.replace(/\/join\/?$/,``),n=`${location.protocol===`https:`?`wss`:`ws`}://${location.host}${t}/api/join/ws`,r=e=>console.info(`[join] ${e}`),i=`${location.origin}${t}/join`,a=typeof RTCPeerConnection>`u`?void 0:Cl(()=>yl({net:null,lan:i,ts:null,fp:tt(wl.get(`fp`)),rtc:!0,reach:e=>e,rtcMake:(e,t)=>gl(e,{video:!0,log:r,...t}),socket:e=>new WebSocket(e)}),{room:i,log:r});Dl.render((0,z.jsx)(Xc,{url:n,invite:e,host:Tl,path:$c(location.hostname),transport:a,internet:!1}))} +I€wu¸öôú!3å6³‹âVq£³¹´RN£%y10º:pŠ#\:J:b9Hµ7h_Ž:¢I9 _¼™µV,þ <`});var E={a:v};this.setModule=t=>{e.setModule(bi,t)},this.getModule=()=>e.getModule(bi),this.instantiate=()=>(this.getModule().then(e=>WebAssembly.instantiate(e,E)).then(e=>{let t=e.exports;y(t),a=t.g,o(),T(t),n()}),this.ready=new Promise(e=>{n=e}).then(()=>{this.HEAP=a.buffer,this.malloc=x,this.free=C,this.opus_frame_decoder_create=b,this.opus_frame_decode_float_deinterleaved=S,this.opus_frame_decoder_destroy=ee}),this)}var xi=o((()=>{}));function Si(e={}){Si.errors||Object.defineProperties(Si,{errors:{value:new Map([[-1,`OPUS_BAD_ARG: One or more invalid/out of range arguments`],[-2,`OPUS_BUFFER_TOO_SMALL: Not enough bytes allocated in the buffer`],[-3,`OPUS_INTERNAL_ERROR: An internal error was detected`],[-4,`OPUS_INVALID_PACKET: The compressed data passed is corrupted`],[-5,`OPUS_UNIMPLEMENTED: Invalid/unsupported request number`],[-6,`OPUS_INVALID_STATE: An encoder or decoder structure is invalid or already freed`],[-7,`OPUS_ALLOC_FAIL: Memory allocation has failed`]])}}),this._init=()=>new this._WASMAudioDecoderCommon(this).instantiate(this._EmscriptenWASM,this._module).then(e=>{this._common=e,this._inputBytes=0,this._outputSamples=0,this._frameNumber=0,this._input=this._common.allocateTypedArray(this._inputSize,Uint8Array),this._output=this._common.allocateTypedArray(this._outputChannels*this._outputChannelSize,Float32Array);let t=this._common.allocateTypedArray(this._channels,Uint8Array);t.buf.set(this._channelMappingTable),this._decoder=this._common.wasm.opus_frame_decoder_create(this._sampleRate,this._channels,this._streamCount,this._coupledStreamCount,t.ptr,this._preSkip,this._forceStereo)}),Object.defineProperty(this,"ready",{enumerable:!0,get:()=>this._ready}),this.reset=()=>(this.free(),this._init()),this.free=()=>{this._common.free(),this._common.wasm.opus_frame_decoder_destroy(this._decoder),this._common.wasm.free(this._decoder)},this._decode=e=>{if(!(e instanceof Uint8Array))throw Error(`Data to decode must be Uint8Array. Instead got `+typeof e);this._input.buf.set(e);let t=this._common.wasm.opus_frame_decode_float_deinterleaved(this._decoder,this._input.ptr,e.length,this._output.ptr),n;return t<0&&(n=`libopus `+t+` `+(Si.errors.get(t)||`Unknown Error`),console.error(n),t=0),{outputBuffer:this._common.getOutputChannels(this._output.buf,this._outputChannels,t),samplesDecoded:t,error:n}},this.decodeFrame=e=>{let t=[],n=this._decode(e);return n.error&&this._common.addError(t,n.error,e.length,this._frameNumber,this._inputBytes,this._outputSamples),this._frameNumber++,this._inputBytes+=e.length,this._outputSamples+=n.samplesDecoded,this._WASMAudioDecoderCommon.getDecodedAudioMultiChannel(t,[n.outputBuffer],this._outputChannels,n.samplesDecoded,this._sampleRate)},this.decodeFrames=e=>{let t=[],n=[],r=0,i=0;for(;itypeof e==`number`,n=e.sampleRate,r=e.channels,i=e.streamCount,a=e.coupledStreamCount,o=e.channelMappingTable,s=e.preSkip,c=+!!e.forceStereo;if(r>2&&(!t(i)||!t(a)||!Array.isArray(o)))throw Error(`Invalid Opus Decoder Options for multichannel decoding.`);return this._sampleRate=[8e3,12e3,16e3,24e3,48e3].includes(n)?n:48e3,this._channels=t(r)?r:2,this._streamCount=t(i)?i:1,this._coupledStreamCount=t(a)?a:this._channels-1,this._channelMappingTable=o||(this._channels===2?[0,1]:[0]),this._preSkip=s||0,this._forceStereo=r<=8&&r!=2?c:0,this._inputSize=3840*this._channels,this._outputChannelSize=5760,this._outputChannels=this._forceStereo?2:this._channels,this._ready=this._init(),this}var Ci=o((()=>{yi(),xi()})),wi,Ti=o((()=>{yi(),xi(),Ci(),wi=class extends hi{constructor(e){super(e,`opus-decoder`,Si,bi)}async decodeFrame(e){return this.postToDecoder(`decodeFrame`,e)}async decodeFrames(e){return this.postToDecoder(`decodeFrames`,e)}}})),Ei=c({OpusDecoder:()=>Si,OpusDecoderWebWorker:()=>wi}),Di=o((()=>{Ci(),Ti(),yi(),_i(Si,`OpusDecoder`),_i(wi,`OpusDecoderWebWorker`)})),Oi=[8e3,12e3,16e3,24e3,48e3],ki=null;function Ai(){return ki??=Xn(()=>Promise.resolve().then(()=>(Di(),Ei)),__VITE_PRELOAD__,import.meta.url).catch(e=>{throw ki=null,e}),ki}function ji(){return typeof WebAssembly==`object`&&typeof WebAssembly.instantiate==`function`}function Mi(e,t,n,r){return{numberOfFrames:t,numberOfChannels:e.length,sampleRate:n,timestamp:r,format:`f32-planar`,duration:Math.round(t/n*1e6),copyTo(n,r){n.set(e[r.planeIndex].subarray(0,t))},close(){}}}var Ni=class{constructor(e,t=Ai){this.init=e,this.load=t,this.state=`unconfigured`,this.dec=null,this.pending=[]}configure(e){if(this.state===`closed`)throw Error(`the decoder is closed`);if(!ji())throw Error(`no WebAssembly here`);let t=e.sampleRate;if(!Oi.includes(t))throw Error(`Opus does not decode at ${t} Hz`);let n=e.numberOfChannels;if(n<1||n>2)throw Error(`${n} channels: only mono and stereo are decoded`);this.state=`configured`,this.load().then(async e=>{if(this.state===`closed`)return;let r=new e.OpusDecoder({channels:n,sampleRate:t});if(await r.ready,this.state!==`configured`){r.free();return}this.dec=r;let i=this.pending;this.pending=[];for(let e of i)this.state===`configured`&&this.run(e)}).catch(e=>this.fail(e))}decode(e){if(this.state!==`configured`)return;let t=e;if(this.dec)return this.run(t);this.pending.push({timestamp:t.timestamp,data:t.data.slice()}),this.pending.length>50&&this.pending.shift()}run(e){let t=this.dec;if(!t)return;let n;try{n=t.decodeFrame(e.data)}catch(e){return this.fail(e)}n.samplesDecoded&&n.channelData.length&&this.init.output(Mi(n.channelData,n.samplesDecoded,n.sampleRate,e.timestamp))}fail(e){if(this.state===`closed`)return;this.close();let t=e instanceof Error?e:Error(String(e));queueMicrotask(()=>this.init.error(t))}close(){this.state=`closed`,this.pending=[];let e=this.dec;this.dec=null;try{e?.free()}catch{}}},Pi={makeDecoder:e=>new Ni(e),makeChunk:e=>({type:e.type,timestamp:e.timestamp,data:e.data instanceof Uint8Array?e.data:new Uint8Array(e.data)})};function Fi(e,t){for(let n=0;n+3>1&63;if(t>=16&&t<=21)return!0;if(t<16)return!1}else{let t=e[n+3]&31;if(t===5)return!0;if(t===1)return!1}}return!1}function Ii(e){for(let t=0;t+6e.toString(16).padStart(2,`0`);return`avc1.${n(e[t+4])}${n(e[t+5])}${n(e[t+6])}`}return`avc1.4d4028`}var Li=[`hev1.1.6.L153.B0`,`hvc1.1.6.L153.B0`,`hev1.2.4.L153.B0`,`hvc1.2.4.L153.B0`,`hev1.1.6.L150.90`];async function Ri(e,t){if(typeof VideoDecoder>`u`)return null;for(let n of Li)try{if((await VideoDecoder.isConfigSupported({codec:n,codedWidth:e,codedHeight:t})).supported)return n}catch{}return null}function zi(e){let t=[];for(let n=0;n+2{let i=r+1n&&e[i-1]===0;)i--;return e.subarray(n,i)}).filter(e=>e.length>0)}var Bi=(e,t)=>t?e[0]>>1&63:e[0]&31;function Vi(e,...t){let n=8+t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(n);new DataView(r.buffer).setUint32(0,n);for(let t=0;t<4;t++)r[4+t]=e.charCodeAt(t);let i=8;for(let e of t)r.set(e,i),i+=e.length;return r}function F(...e){let t=new Uint8Array(e.reduce((e,[,t])=>e+t,0)),n=0;for(let[r,i]of e){for(let e=i-1;e>=0;e--)t[n+i-1-e]=Math.floor(r/2**(8*e))&255;n+=i}return t}var Hi=(e,t,n,...r)=>Vi(e,F([t,1],[n,3]),...r),Ui=F([65536,4],[0,4],[0,4],[0,4],[65536,4],[0,4],[0,4],[0,4],[1073741824,4]);function Wi(e){let t=e.handler===`vide`,n=Vi(`ftyp`,new TextEncoder().encode(`isom`),F([1,4]),new TextEncoder().encode(`isomiso6mp41`)),r=Vi(`moov`,Hi(`mvhd`,0,0,F([0,4],[0,4],[e.timescale,4],[0,4],[65536,4],[256,2],[0,2],[0,4],[0,4]),Ui,new Uint8Array(24),F([2,4])),Vi(`trak`,Hi(`tkhd`,0,3,F([0,4],[0,4],[1,4],[0,4],[0,4],[0,4],[0,4],[0,2],[0,2],[t?0:256,2],[0,2]),Ui,F([(e.width??0)*65536,4],[(e.height??0)*65536,4])),Vi(`mdia`,Hi(`mdhd`,0,0,F([0,4],[0,4],[e.timescale,4],[0,4],[21956,2],[0,2])),Hi(`hdlr`,0,0,F([0,4]),new TextEncoder().encode(e.handler),new Uint8Array(12),F([0,1])),Vi(`minf`,t?Hi(`vmhd`,0,1,new Uint8Array(8)):Hi(`smhd`,0,0,F([0,4])),Vi(`dinf`,Hi(`dref`,0,0,F([1,4]),Hi(`url `,0,1))),Vi(`stbl`,Hi(`stsd`,0,0,F([1,4]),e.sampleEntry),Hi(`stts`,0,0,F([0,4])),Hi(`stsc`,0,0,F([0,4])),Hi(`stsz`,0,0,F([0,4],[0,4])),Hi(`stco`,0,0,F([0,4])))))),Vi(`mvex`,Hi(`trex`,0,0,F([1,4],[1,4],[0,4],[0,4],[0,4])))),i=new Uint8Array(n.length+r.length);return i.set(n,0),i.set(r,n.length),i}function Gi(e,t,n,r,i){let a=i?33554432:16842752,o=e=>Hi(`trun`,0,1793,F([1,4],[e,4],[n,4],[r.length,4],[a,4])),s=e=>Vi(`traf`,Hi(`tfhd`,0,131072,F([1,4])),Hi(`tfdt`,1,0,F([t,8])),o(e)),c=Hi(`mfhd`,0,0,F([e,4])),l=Vi(`moof`,c,s(0)).length,u=Vi(`moof`,c,s(l+8)),d=Vi(`mdat`,r),f=new Uint8Array(u.length+d.length);return f.set(u,0),f.set(d,u.length),f}function Ki(e,t,n=!1){let r=t?[35,...n?[32,33,34]:[]]:[9,...n?[7,8]:[]],i=zi(e).filter(e=>!r.includes(Bi(e,t))),a=new Uint8Array(i.reduce((e,t)=>e+4+t.length,0)),o=new DataView(a.buffer),s=0;for(let e of i)o.setUint32(s,e.length),a.set(e,s+4),s+=4+e.length;return a}var qi=e=>e.toString(16).padStart(2,`0`),Ji=e=>{let t=new Uint8Array(2+e.length);return t[0]=e.length>>8,t[1]=e.length&255,t.set(e,2),t},Yi=e=>{let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t};function Xi(e){let t=zi(e),n=t.filter(e=>Bi(e,!1)===7),r=t.filter(e=>Bi(e,!1)===8);return!n.length||!r.length||n[0].length<4?null:Yi([F([1,1],[n[0][1],1],[n[0][2],1],[n[0][3],1],[255,1],[224|n.length,1]),...n.map(Ji),F([r.length,1]),...r.map(Ji)])}function Zi(e,t,n){let r=zi(e),i=e=>r.filter(n=>Bi(n,t)===e),a=(e,t)=>Vi(e,new Uint8Array(6),F([1,2],[0,16],[n.w,2],[n.h,2],[4718592,4],[4718592,4],[0,4],[1,2]),new Uint8Array(32),F([24,2],[65535,2]),t);if(!t){let t=i(7),r=Xi(e);return r?{init:Wi({handler:`vide`,timescale:9e4,sampleEntry:a(`avc1`,Vi(`avcC`,r)),width:n.w,height:n.h}),mime:`video/mp4; codecs="avc1.${qi(t[0][1])}${qi(t[0][2])}${qi(t[0][3])}"`}:null}let o=i(32),s=i(33),c=i(34);if(!o.length||!s.length||!c.length)return null;let l=Xr(s[0]);if(l.length<15)return null;let u=l.subarray(3,15),d=u[0]&31,f=d===2?2:0,p=(e,t)=>Yi([F([128|e,1],[t.length,2]),...t.map(Ji)]),m=Vi(`hvcC`,F([1,1]),u,F([61440,2],[252,1],[253,1],[248|f,1],[248|f,1],[0,2],[15,1],[3,1]),p(32,o),p(33,s),p(34,c)),h=[``,`A`,`B`,`C`][u[0]>>6],g=0,_=(u[1]<<24|u[2]<<16|u[3]<<8|u[4])>>>0;for(let e=0;e<32;e++)_&1<>>0).toString(16),`${u[0]&32?`H`:`L`}${u[11]}`,...v.map(e=>e.toString(16))].join(`.`);return{init:Wi({handler:`vide`,timescale:9e4,sampleEntry:a(`hvc1`,m),width:n.w,height:n.h}),mime:`video/mp4; codecs="${y}"`}}function Qi(e,t,n,r,i,a){return Gi(e,t,n,Ki(r,i),a)}function $i(e,t){let n=Vi(`dOps`,F([0,1],[e,1],[312,2],[t,4],[0,2],[0,1]));return Wi({handler:`soun`,timescale:48e3,sampleEntry:Vi(`Opus`,new Uint8Array(6),F([1,2],[0,8],[e,2],[16,2],[0,4],[3145728e3,4]),n)})}function ea(e){if(!e.length)return 960;let t=e[0]>>3,n=t<12?[480,960,1920,2880][t%4]:t<16?[480,960][t%2]:[120,240,480,960][t%4],r=e[0]&3,i=r===0?1:r===3?(e[1]??1)&63:2;return n*Math.max(1,i)}function ta(e,t,n){return Gi(e,t,ea(n),n,!0)}var na={watch:30,player:4},ra={watch:{seek:.5,speed:1/0,target:.05},player:{seek:.15,speed:.06,target:.02}},ia={seek:.8,speed:.25,target:.12};function aa(e,t,n){let r=typeof n==`string`?ra[n]:n;return e>r.seek?{seekTo:t-r.target,rate:1}:e>r.speed?{seekTo:null,rate:1.1}:{seekTo:null,rate:1}}function oa(e,t=`watch`,n){return typeof VideoDecoder<`u`?new ha(e,t,n):new ka(e,t,n)}var sa=class{constructor(e,t=()=>performance.now()){this.ask=e,this.now=t,this.last=-1/0}waiting(){if(!this.ask)return;let e=this.now();e-this.last<1e3||(this.last=e,this.ask())}};function I(e){return e.length<3?null:{index:e[0]<<8|e[1],packet:e.subarray(2)}}var L=class{constructor(){this.last=-1}take(e){if(this.last>=0){let t=e-this.last&65535;if(t===0||t>=32768)return!1}return this.last=e,!0}reset(){this.last=-1}};function ca(e){if(e.length>=10)return e;let t=new Uint8Array(10);t.set(e.subarray(0,6));let n=new DataView(t.buffer);return n.setUint32(6,Math.round(n.getUint32(2)/100)||480),t}function la(e,t){return{snd:e,snd_decoded:t.decoded,snd_concealed:t.concealed,snd_underruns:t.underruns,snd_dropped:t.dropped}}var ua=class{constructor(e,t=.2){this.min=e,this.max=t,this.next=0,this.calmSince=0,this.minLead=1/0,this.windowAt=0,this.underruns=0,this.dropped=0,this.cushion=e}at(e,t){this.next0&&(this.underruns++,this.cushion=Math.min(this.max,this.cushion+.02)),this.calmSince=e,this.next=e+this.cushion,this.minLead=1/0,this.windowAt=e):e-this.calmSince>10&&this.cushion>this.min&&(this.cushion=Math.max(this.min,this.cushion-.01),this.calmSince=e);let n=this.next-e;if(n>this.cushion+.15)return this.dropped++,null;if(this.minLead=Math.min(this.minLead,n),e-this.windowAt>=.25){let t=this.minLead>this.cushion+da;if(this.minLead=1/0,this.windowAt=e,t)return this.dropped++,null}let r=this.next;return this.next+=t,r}reset(){this.next=0}},da=.02;async function fa(e,t){try{return typeof AudioDecoder>`u`?!1:!!(await AudioDecoder.isConfigSupported({codec:`opus`,sampleRate:e,numberOfChannels:t})).supported}catch{return!1}}var pa=class{constructor(e,t=()=>performance.now()){this.decoder=e,this.now=t,this.n={frames:0,dropped:0,late:0,stalls:0,stall_ms:0,worst_stall_ms:0,key_waits:0},this.a=0,this.d=0,this.w=!1,this.q=[],this.sum=0,this.cnt=0,this.codec=``}get frames(){return this.n.frames}arrived(){let e=this.now();this.a&&e-this.a>50&&this.n.late++,this.a=e}drop(){this.n.dropped++,this.w||this.n.key_waits++,this.w=!0}decoding(){this.w=!1,this.q.push(this.now())>64&&this.q.shift()}drawn(e=!1){let t=this.now(),n=e?this.q.shift():void 0;n!==void 0&&(this.sum+=t-n,this.cnt++);let r=this.d?t-this.d:0;r>100&&this.stall(r),this.d=t,this.n.frames++}stall(e){this.n.stalls++,this.n.stall_ms+=e,this.n.worst_stall_ms=Math.max(this.n.worst_stall_ms,e)}snapshot(){let e=this.d?this.now()-this.d:0,t={...this.n,decoder:this.decoder};this.codec&&(t.codec=this.codec),e>100&&(t.stalls=this.n.stalls+1,t.stall_ms=this.n.stall_ms+e,t.worst_stall_ms=Math.max(this.n.worst_stall_ms,e));for(let e of[`stall_ms`,`worst_stall_ms`])t[e]=Math.round(t[e]);return t.decode_ms=this.cnt?Math.round(this.sum/this.cnt*10)/10:0,this.sum=this.cnt=0,t}},ma=[`pointerup`,`touchend`,`click`,`keydown`],ha=class{get element(){if(!this.wrap){let e=document.createElement(`div`);e.className=`h-full w-full`,e.append(this.canvas),this.mse&&e.append(this.mse.element),this.wrap=e}return this.wrap}get stats(){return this.mse?.stats??this.ownStats}soundReport(){return this.soundOn?this.mseSound?this.mseSound.report():la(this.soundWasm?`wasm`:`webcodecs`,this.soundStats):null}constructor(e,t=`watch`,n){this.onProblem=e,this.latency=t,this.onNeedKey=n,this.canvas=document.createElement(`canvas`),this.wrap=null,this.mse=null,this.failsNoPicture=0,this.ctx=this.canvas.getContext(`2d`,{alpha:!1}),this.hevc=!1,this.header=null,this.spsRect=null,this.software=!1,this.video=null,this.opening=!1,this.stopped=!1,this.sawKey=!1,this.ownStats=new pa(`webcodecs`),this.problemShown=!1,this.ts=0,this.pipe=null,this.audioGen=0,this.actx=null,this.soundOn=!1,this.unarm=null,this.mseSound=null,this.audioHeader=null,this.soundWasm=!1,this.onSoundFail=null,this.muted=!1,this.keyAsk=new sa(n),this.clock=new ua(t===`player`?.05:.08),typeof AudioDecoder>`u`&&va()&&(this.mseSound=new ya(t,()=>this.mseSoundFailed())),this.canvas.className=`block h-full w-full object-contain`,this.canvas.dataset.testid=`watch-canvas`}setHevc(e){this.hevc=e,this.header&&(this.spsRect=ni(this.header,e)),this.mse?.setHevc(e)}get onMse(){return!!this.mse}decodeFailed(){if(this.mse||this.ownStats.frames>0||++this.failsNoPicture<3||!xa())return!1;let e=new ka(this.onProblem,this.latency,this.onNeedKey);e.setHevc(this.hevc),e.markProblemShown(),this.mse=e;let t=this.video;this.video=null;try{t?.close()}catch{}return this.canvas.style&&(this.canvas.style.display=`none`),this.wrap?.append(e.element),this.header&&e.onMessage(new Uint8Array([0,...this.header]).buffer),this.onNeedKey?.(),!0}startSound(){this.soundOn=!0,ga(),this.mseSound?this.mseSound.start():this.openContext()}openContext(){try{if(!this.actx){let e=new AudioContext({latencyHint:`interactive`});this.actx=e,e.onstatechange=()=>{this.actx===e&&e.state!==`running`&&e.state!==`closed`&&this.armResume()}}this.actx.resume().catch(()=>{})}catch{this.onSoundFail?.()}}get sound(){return this.soundOn}setMuted(e){this.muted=e,this.mseSound?.setMuted(e)}resumeSound(){if(!this.soundOn)return;if(this.mseSound)return this.mseSound.resume();let e=this.actx;e&&e.state!==`running`&&e.state!==`closed`&&(this.clock.reset(),e.resume().catch(()=>{}),this.armResume())}get soundStats(){return{decoded:this.pipe?.decoded??0,concealed:this.pipe?.concealed??0,underruns:this.clock.underruns,dropped:this.clock.dropped,cushionMs:Math.round(this.clock.cushion*1e3)}}armResume(){if(this.unarm||typeof window>`u`||!window.addEventListener)return;let e=()=>{let e=this.actx;if(!e||e.state===`closed`)return this.unarm?.();this.clock.reset(),e.resume().then(()=>{e.state===`running`&&this.unarm?.()}).catch(()=>{})};for(let t of ma)window.addEventListener(t,e,!0);this.unarm=()=>{for(let t of ma)window.removeEventListener(t,e,!0);this.unarm=null}}onMessage(e){let t=new Uint8Array(e);if(t.length<1||this.stopped)return;let n=t[0],r=t.subarray(1);if(this.mse&&(n===0||n===1))return n===0&&(this.header=r.slice()),this.mse.onMessage(e);n===0?this.openVideo(r.slice()):n===1?this.onVideo(r):n===3?this.openAudio(r.slice()):n===4&&this.onAudio(r)}async openVideo(e){if(this.header=e,this.spsRect=ni(e,this.hevc),!this.opening){this.opening=!0;try{let t=this.hevc?await Aa(e):Ii(e);if(this.mse||this.stopped)return;if(!t){this.problemShown=!0,this.onProblem(`no_hevc`);return}this.ownStats.codec=t;let n=this.hevc?void 0:Xi(e)??void 0;try{this.video?.close()}catch{}let r=new VideoDecoder({output:e=>{let t=this.realVisible(e),n=this.canvas;(n.width!==t.displayWidth||n.height!==t.displayHeight)&&(n.width=t.displayWidth,n.height=t.displayHeight),this.ctx?.drawImage(t,0,0,n.width,n.height),this.ownStats.drawn(!0),t.close(),this.problemShown&&(this.problemShown=!1,this.onProblem(null))},error:()=>{this.video===r&&(this.problemShown=!0,this.onProblem(`decode`),this.decodeFailed()||this.rebuild())}}),i={codec:t,optimizeForLatency:!0};n&&(i.description=n),this.software&&(i.hardwareAcceleration=`prefer-software`),r.configure(i),this.video=r,this.sawKey=!1}catch{this.problemShown=!0,this.onProblem(`decode`),this.decodeFailed()}finally{this.opening=!1}}}realVisible(e){let t=this.spsRect,n=ri(e,t);if(n)try{let t=new VideoFrame(e,{visibleRect:{x:n.x,y:n.y,width:n.w,height:n.h},displayWidth:n.w,displayHeight:n.h});return e.close(),t}catch{return e}let r=e.visibleRect;if(t&&r&&!this.software&&(r.width{if(this.video===e){try{e?.close()}catch{}this.rebuild(),this.onNeedKey?.()}})}return e}rebuild(){this.mse||this.stopped||(this.video=null,this.sawKey=!1,this.header&&this.openVideo(this.header).then(()=>this.keyAsk.waiting()))}onVideo(e){let t=this.video;if(t?.state===`closed`){this.opening||this.rebuild();return}if(!t||t.state!==`configured`)return;let n=Fi(e,this.hevc);if(this.ownStats.arrived(),!this.sawKey&&!n)return this.ownStats.drop(),this.keyAsk.waiting();if(!n&&t.decodeQueueSize>na[this.latency])return this.sawKey=!1,this.ownStats.drop(),this.keyAsk.waiting();this.sawKey=!0;let r=e;this.hevc?n&&this.header&&(r=new Uint8Array(this.header.length+e.length),r.set(this.header,0),r.set(e,this.header.length)):r=Ki(e,!1,!0),this.ts+=16667,this.ownStats.decoding(),t.decode(new EncodedVideoChunk({type:n?`key`:`delta`,timestamp:this.ts,data:r}))}openAudio(e){if(e.length<6)return;let t=++this.audioGen;if(this.pipe?.reset(),this.pipe=null,this.clock.reset(),this.audioHeader=e,this.mseSound)return this.mseSound.setHeader(e);let n=e[0];fa(new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(2),n).then(n=>{if(t!==this.audioGen)return;if(!n)return va()?this.soundThroughMse(e):this.soundThroughWasm(e);let r=new si((e,t)=>this.play(e,t,r.sampleRate));try{r.header(ca(e)),this.pipe=r}catch{this.soundThroughMse(e)}})}soundThroughMse(e){this.pipe=null,this.mseSound||(this.mseSound=new ya(this.latency,()=>this.mseSoundFailed()),this.soundOn&&this.mseSound.start()),this.mseSound.setHeader(e)}soundThroughWasm(e){this.pipe?.reset(),this.soundWasm=!0;let t=new si((e,n)=>this.play(e,n,t.sampleRate),Pi,()=>{this.pipe===t&&(this.pipe=null),this.onSoundFail?.()});this.pipe=t,t.header(ca(e))}mseSoundFailed(){let e=this.mseSound;e&&(this.mseSound=null,e.stop(),this.soundOn&&(this.openContext(),this.actx&&this.actx.state!==`running`&&this.armResume()),this.audioHeader&&this.soundThroughWasm(this.audioHeader))}onAudio(e){if(this.mseSound)return this.mseSound.frame(e);this.soundOn&&this.pipe&&this.pipe.packet(e)}play(e,t,n){let r=this.actx;if(!r||r.state!==`running`||!e.length)return;let i=e[0].length,a=this.clock.at(r.currentTime,i/n);if(a===null)return;let o=r.createBuffer(e.length,i,n),s=this.muted?0:t;e.forEach((e,t)=>o.copyToChannel(s===1?e:e.map(e=>e*s),t));let c=r.createBufferSource();c.buffer=o,c.connect(r.destination),c.start(a)}stop(){this.stopped=!0;try{this.video?.close()}catch{}this.mse?.stop(),this.audioGen++,this.pipe?.reset(),this.pipe=null,this.unarm?.(),this.actx?.close().catch(()=>{}),this.mseSound?.stop()}};function ga(){try{let e=navigator.audioSession;e&&e.type!==`playback`&&(e.type=`playback`)}catch{}}function _a(e,t){try{return e.isTypeSupported(t)}catch{return!1}}function va(){let e=typeof window>`u`?null:xa();return!!e&&(_a(e,`audio/mp4; codecs="Opus"`)||_a(e,`audio/mp4; codecs="opus"`))}var ya=class{constructor(e,t,n=document.createElement(`audio`)){this.onFail=t,this.header=null,this.time=0,this.on=!1,this.failed=!1,this.order=new L,this.el=n,this.track=new Ta(n,()=>this.fail(),e===`player`?ia:e)}get playing(){return this.on&&!this.failed}report(){return{snd:`mse`,snd_jumps:this.track.seeks}}setHeader(e){this.header=e,this.on&&this.open()}start(){if(!this.on&&(this.on=!0,this.header&&this.open(),!this.failed))try{this.el.play()?.catch?.(()=>{})}catch{}}frame(e){if(!this.on||this.failed||!this.track.ready&&!this.track.backlog)return;let t=I(e);if(!t||!this.order.take(t.index))return;let n=ta(this.track.nextSeq(),this.time,t.packet);this.time+=ea(t.packet),this.track.push(n)}setMuted(e){this.el.muted=e}resume(){if(this.playing&&this.el.paused)try{this.el.play()?.catch?.(()=>{})}catch{}}stop(){this.on=!1,this.track.close()}open(){let e=this.header;if(!e||e.length<6||this.failed)return;let t=e[0],n=$i(t,new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(2));this.track.open(`audio/mp4; codecs="Opus"`,n)||this.track.open(`audio/mp4; codecs="opus"`,n)?(this.time=0,this.order.reset()):this.fail()}fail(){this.failed||(this.failed=!0,this.onFail())}},ba=class{constructor(e,t,n=Pi){this.onFail=t,this.codecs=n,this.actx=null,this.pipe=null,this.header=null,this.on=!1,this.failed=!1,this.muted=!1,this.unarm=null,this.played=!1,this.clock=new ua(e===`player`?.05:.08)}get playing(){return this.on&&!this.failed}get stats(){return{decoded:this.pipe?.decoded??0,concealed:this.pipe?.concealed??0,underruns:this.clock.underruns,dropped:this.clock.dropped}}start(){if(!this.failed){this.on=!0,ga();try{if(!this.actx){let e=new AudioContext({latencyHint:`interactive`});this.actx=e,e.onstatechange=()=>{this.actx===e&&e.state!==`running`&&e.state!==`closed`&&this.armResume()}}this.actx.resume().catch(()=>{}),this.actx.state!==`running`&&this.armResume()}catch{return this.fail()}this.header&&!this.pipe&&this.open()}}setHeader(e){e.length<6||(this.header=e,this.pipe?.reset(),this.pipe=null,this.clock.reset(),this.on&&this.open())}frame(e){this.on&&!this.failed&&this.pipe?.packet(e)}setMuted(e){this.muted=e}resume(){let e=this.actx;this.playing&&e&&e.state!==`running`&&e.state!==`closed`&&(this.clock.reset(),e.resume().catch(()=>{}),this.armResume())}stop(){this.on=!1,this.pipe?.reset(),this.pipe=null,this.unarm?.(),this.actx?.close().catch(()=>{}),this.actx=null}open(){let e=this.header;if(!e||this.failed)return;let t=new si((e,n)=>this.play(e,n,t.sampleRate),this.codecs,()=>{this.pipe===t&&this.fail()});this.pipe=t,t.header(ca(e))}play(e,t,n){let r=this.actx;if(!r||r.state!==`running`||!e.length)return;let i=e[0].length,a=this.clock.at(r.currentTime,i/n);if(a===null)return;let o=r.createBuffer(e.length,i,n),s=this.muted?0:t;e.forEach((e,t)=>o.copyToChannel(s===1?e:e.map(e=>e*s),t));let c=r.createBufferSource();c.buffer=o,c.connect(r.destination),c.start(a),this.played=!0}armResume(){if(this.unarm||typeof window>`u`||!window.addEventListener)return;let e=()=>{let e=this.actx;if(!e||e.state===`closed`)return this.unarm?.();this.clock.reset(),e.resume().then(()=>{e.state===`running`&&this.unarm?.()}).catch(()=>{})};for(let t of ma)window.addEventListener(t,e,!0);this.unarm=()=>{for(let t of ma)window.removeEventListener(t,e,!0);this.unarm=null}}fail(){this.failed||(this.failed=!0,this.stop(),this.onFail())}};function xa(){let e=window;return e.ManagedMediaSource??e.MediaSource??null}var Sa=10,Ca=3;function wa(e,t,n,r=Ca){let i=null;for(let a of e)a>t&&a<=n-r&&(i=a);return i}var Ta=class{constructor(e,t,n=`watch`,r,i=()=>performance.now()){this.el=e,this.onError=t,this.latency=n,this.onNeedKey=r,this.now=i,this.ms=null,this.sb=null,this.queue=[],this.mime=``,this.seq=1,this.ready=!1,this.dropped=!1,this.keys=null,this.seeks=0,this.maxLagS=0,this.fromZero=0,this.trims=0,this.lastJump=null,this.trimAt=-1,this.trimFrom=-1,this.keyAt=-1,this.attached=null,r&&(this.keys=[])}setEdge(e){this.latency=e}markKey(e){this.keys?.push(e),this.keyAt=this.now()}open(e,t){let n=xa();if(!n||!_a(n,e))return!1;this.close();let r=new n;return this.ms=r,this.mime=e,this.queue=[t],this.seq=1,this.ready=!1,this.keys&&=[],r.addEventListener(`sourceopen`,()=>{if(this.ms===r)try{let e=r.addSourceBuffer(this.mime);e.mode=`segments`,e.addEventListener(`updateend`,()=>this.pump()),e.addEventListener(`error`,()=>this.onError()),this.sb=e,this.ready=!0,this.pump()}catch{this.onError()}}),`ManagedMediaSource`in window&&n===window.ManagedMediaSource&&(this.el.disableRemotePlayback=!0),this.attached=Ea(this.el,r),!0}nextSeq(){return this.seq++}get backlog(){return this.queue.length}push(e){this.queue.push(e),this.pump()}pump(){let e=this.sb;if(!e||e.updating||!this.ready)return;let t=this.el;if(e.buffered.length){let n=e.buffered.end(e.buffered.length-1),r=e.buffered.start(0),i=n-t.currentTime,a=aa(i,n,this.latency);if(a.seekTo!==null){this.seeks++,this.maxLagS=Math.max(this.maxLagS,i);let o=this.now(),s=e=>e<0?-1:Math.round(o-e);t.currentTime<.05&&r>1&&this.fromZero++,this.lastJump={at:t.currentTime,start:r,end:n,ranges:e.buffered.length,readyState:t.readyState,paused:t.paused,seeking:t.seeking,sinceTrimMs:s(this.trimAt),trimFrom:this.trimFrom,sinceKeyMs:s(this.keyAt)},t.currentTime=Math.max(r,a.seekTo)}if(t.playbackRate!==a.rate&&(t.playbackRate=a.rate),t.currentTime-r>Sa&&this.trim(e,r))return}let n=this.queue.shift();if(n){try{e.appendBuffer(n)}catch{this.dropped=!0}t.paused&&t.play().catch(()=>{})}}trim(e,t){let n=this.el.currentTime,r=n-Ca;if(this.keys){if(r=wa(this.keys,t,n),r===null)return(this.keys[this.keys.length-1]??-1/0)<=n-Ca&&this.onNeedKey?.(),!1;let e=r;this.keys=this.keys.filter(t=>t>=e),r-=.001}try{return e.remove(t,r),this.trims++,this.trimAt=this.now(),this.trimFrom=n,!0}catch{return!1}}close(){this.ready=!1,this.sb=null,this.queue=[];let e=this.ms;if(this.ms=null,e&&e.readyState===`open`)try{e.endOfStream()}catch{}if(this.attached===`object`)try{this.el.srcObject=null}catch{}this.attached=null,this.el.src?.startsWith(`blob:`)&&URL.revokeObjectURL(this.el.src),this.el.removeAttribute(`src`)}};function Ea(e,t){if(`srcObject`in e)try{return e.srcObject=t,`object`}catch{}return e.src=URL.createObjectURL(t),`url`}var Da=1e4,Oa=class{constructor(e=3,t=Da,n=()=>performance.now()){this.max=e,this.windowMs=t,this.now=n,this.at=[]}fail(){let e=this.now();return this.at=this.at.filter(t=>e-t=this.max}clear(){this.at=[]}},ka=class{constructor(e,t=`watch`,n,r){this.onProblem=e,this.latency=t,this.wasm=null,this.audioHeader=null,this.muted=!1,this.gaveUp=!1,this.reopening=!1,this.failedWhileOpening=!1,this.wrap=document.createElement(`div`),this.hevc=!1,this.header=null,this.sawKey=!1,this.stats=new pa(`mse`),this.problemShown=!1,this.vTime=0,this.vLast=0,this.soundOn=!1,this.onSoundFail=null,this.onGiveUp=null,this.keyAsk=new sa(n),this.fails=new Oa(3,Da,r);let i=document.createElement(`video`);i.muted=!0,i.autoplay=!0,i.playsInline=!0,i.className=`block h-full w-full object-contain`,i.dataset.testid=`watch-video`,this.audio=new ya(t,()=>this.soundThroughWasm()),this.wrap.className=`h-full w-full`,this.wrap.append(i,this.audio.el),this.video=new Ta(i,()=>this.showProblem(),t,()=>this.keyAsk.waiting()),i.addEventListener(`error`,()=>this.restartVideo()),i.addEventListener(`playing`,()=>{this.fails.clear(),this.problemShown&&(this.problemShown=!1,this.onProblem(null))})}markProblemShown(){this.problemShown=!0}showProblem(){this.problemShown||(this.problemShown=!0,this.onProblem(`decode`))}restartVideo(){if(this.gaveUp)return;if(this.reopening){this.failedWhileOpening=!0;return}if(this.showProblem(),this.fails.fail()){this.gaveUp=!0,this.video.close(),this.onGiveUp?.();return}let e=this.header;if(e){this.header=null,this.reopening=!0,this.failedWhileOpening=!1;try{this.openVideo(e)}finally{this.reopening=!1}this.sawKey=!1,this.keyAsk.waiting(),this.failedWhileOpening&&(this.failedWhileOpening=!1,this.restartVideo())}}get failed(){return this.gaveUp}setVideoEdge(e){this.video.setEdge(e)}get videoSeeks(){return{seeks:this.video.seeks,maxLagMs:Math.round(this.video.maxLagS*1e3),fromZero:this.video.fromZero,trims:this.video.trims,lastJump:this.video.lastJump}}get element(){return this.wrap}resume(){let e=this.video.el;e.paused&&e.play()?.catch?.(()=>{})}setHevc(e){this.hevc=e}startSound(){if(this.soundOn=!0,this.wasm)return this.wasm.start();if(!va())return this.soundThroughWasm();this.audio.start()}soundThroughWasm(){if(this.wasm)return;this.audio.stop();let e=new ba(this.latency,()=>this.onSoundFail?.());this.wasm=e,e.setMuted(this.muted),this.audioHeader&&e.setHeader(this.audioHeader),this.soundOn&&e.start()}resumeSound(){this.soundOn&&(this.wasm?this.wasm.resume():this.audio.resume())}setMuted(e){this.muted=e,this.audio.setMuted(e),this.wasm?.setMuted(e)}soundReport(){return this.soundOn?this.wasm?la(`wasm`,this.wasm.stats):this.audio.report():null}get soundPlaying(){return this.wasm?this.wasm.played:this.audio.playing}get sound(){return this.soundOn}onMessage(e){let t=new Uint8Array(e);if(t.length<1)return;let n=t[0],r=t.subarray(1);n===0?this.openVideo(r.slice()):n===1?this.onVideo(r):n===3?(this.audioHeader=r.slice(),(this.wasm??this.audio).setHeader(this.audioHeader)):n===4&&(this.wasm??this.audio).frame(r)}openVideo(e){let t=!!this.header&&this.header.length===e.length&&this.header.every((t,n)=>t===e[n]);if(t&&this.video.ready)return;if(this.gaveUp){if(t)return;this.gaveUp=!1,this.fails.clear()}this.header=e;let n=ni(e,this.hevc)??{w:1920,h:1080},r=Zi(e,this.hevc,n);r&&(this.stats.codec=/codecs="([^"]+)"/.exec(r.mime)?.[1]??``,this.video.open(r.mime,r.init)?(this.sawKey=!1,this.vTime=0,this.vLast=0):(this.problemShown=!0,this.onProblem(this.hevc?`no_hevc`:`decode`)))}onVideo(e){if(!this.video.ready&&!this.video.backlog)return;let t=Fi(e,this.hevc);if(this.video.dropped&&(this.video.dropped=!1,this.sawKey=!1),this.stats.arrived(),!this.sawKey&&!t)return this.stats.drop(),this.keyAsk.waiting();if(!t&&this.video.backlog>na[this.latency])return this.sawKey=!1,this.stats.drop(),this.keyAsk.waiting();this.sawKey=!0,this.stats.drawn();let n=performance.now(),r=this.vLast?Math.min(9e3,Math.max(750,Math.round((n-this.vLast)*90))):1500;this.vLast=n,t&&this.video.markKey(this.vTime/9e4),this.video.push(Qi(this.video.nextSeq(),this.vTime,r,e,this.hevc,t)),this.vTime+=r}stop(){this.video.close(),this.audio.stop(),this.wasm?.stop()}};async function Aa(e){let t=ii(e);if(t&&typeof VideoDecoder<`u`)try{if((await VideoDecoder.isConfigSupported({codec:t,codedWidth:1920,codedHeight:1080})).supported)return t}catch{}return Ri(1920,1080)}var R={CROSS:1,CIRCLE:2,SQUARE:4,TRIANGLE:8,LEFT:16,RIGHT:32,UP:64,DOWN:128,L1:256,R1:512,L3:1024,R3:2048,OPTIONS:4096,SHARE:8192,TOUCHPAD:16384,PS:32768},ja={buttons:0,l2:0,r2:0,lx:0,ly:0,rx:0,ry:0};function Ma(e,t){let n=e=>Math.max(0,Math.min(1,e));return[Math.round(n(e)*1919),Math.round(n(t)*941)]}var Na={ArrowUp:{button:R.UP},ArrowDown:{button:R.DOWN},ArrowLeft:{button:R.LEFT},ArrowRight:{button:R.RIGHT},Enter:{button:R.CROSS},Space:{button:R.CROSS},Backspace:{button:R.CIRCLE},Escape:{button:R.CIRCLE},KeyQ:{button:R.SQUARE},KeyE:{button:R.TRIANGLE},KeyZ:{button:R.L1},KeyC:{button:R.R1},Digit1:{trigger:`l2`},Digit3:{trigger:`r2`},KeyF:{button:R.L3},KeyG:{button:R.R3},Tab:{button:R.OPTIONS},Backquote:{button:R.SHARE},KeyH:{button:R.PS},KeyT:{button:R.TOUCHPAD},KeyW:{stick:`ly`,dir:-1},KeyS:{stick:`ly`,dir:1},KeyA:{stick:`lx`,dir:-1},KeyD:{stick:`lx`,dir:1},KeyI:{stick:`ry`,dir:-1},KeyK:{stick:`ry`,dir:1},KeyJ:{stick:`rx`,dir:-1},KeyL:{stick:`rx`,dir:1}};R.UP,R.DOWN,R.LEFT,R.RIGHT,R.CROSS,R.CIRCLE,R.SQUARE,R.TRIANGLE,R.L1,R.R1,R.L3,R.R3,R.OPTIONS,R.SHARE,R.PS,R.TOUCHPAD;var Pa=e=>Math.max(-32768,Math.min(32767,Math.round(e)));function Fa(e,t=Na){let n={...ja};for(let r of e){let e=t[r];e&&(`button`in e?n.buttons|=e.button:`stick`in e?n[e.stick]=Pa(n[e.stick]+e.dir*32767):n[e.trigger]=255)}return n}var Ia=[R.CROSS,R.CIRCLE,R.SQUARE,R.TRIANGLE,R.L1,R.R1,0,0,R.SHARE,R.OPTIONS,R.L3,R.R3,R.UP,R.DOWN,R.LEFT,R.RIGHT,R.PS,R.TOUCHPAD];function La(e){return Math.abs(e)<=1.01?Math.round((e+1)*3.5)%8:null}var Ra=[0,1,1,1,0,-1,-1,-1],za=[-1,-1,0,1,1,1,0,-1];function Ba(e,t){let n=e.axes[t.a]??0;if(t.hat){let e=La(n);return e===null?0:(t.hat===`x`?Ra:za)[e]}return t.inv?-n:n}var Va={buttons:Ia.flatMap((e,t)=>e?[[e,{b:t}]]:[]),l2:{b:6},r2:{b:7},lx:{a:0},ly:{a:1},rx:{a:2},ry:{a:3}};function Ha(e,t,n=!1){if(`b`in t){let r=e.buttons[t.b];return r?n&&r.value>0?Math.min(1,r.value):Math.max(+!!r.pressed,r.value):0}if(`h`in t){let n=La(e.axes[t.h]??9);if(n===null)return 0;let r=(n-t.at+8)%8;return+(r===0||r===1||r===7)}let r=e.axes[t.a];if(r===void 0)return 0;let i=t.rest??0;return Math.min(1,Math.max(0,(r-i)/(t.d-i)))}function Ua(e){if(e.mapping===`standard`)return Va;let t=Wa.get(e.id);if(t)return t;let n=e.axes.findIndex(e=>Math.abs(e)>1.05);if(n<0)return Va;let r={...Va,buttons:[...Va.buttons,[R.UP,{h:n,at:0}],[R.RIGHT,{h:n,at:2}],[R.DOWN,{h:n,at:4}],[R.LEFT,{h:n,at:6}]]};return Wa.set(e.id,r),r}var Wa=new Map;function Ga(e,t=Ua){let n={...ja},r=e=>Math.abs(e)<.08?0:Pa(e*32767),i=(e,t)=>Math.abs(t)>Math.abs(e)?t:e,a=(e,t)=>t?r(Ba(e,t)):0;for(let r of e){if(!r||!r.connected)continue;let e=t(r);for(let[t,i]of e.buttons)Ha(r,i)>.5&&(n.buttons|=t);e.l2&&(n.l2=Math.max(n.l2,Math.round(Ha(r,e.l2,!0)*255))),e.r2&&(n.r2=Math.max(n.r2,Math.round(Ha(r,e.r2,!0)*255))),n.lx=i(n.lx,a(r,e.lx)),n.ly=i(n.ly,a(r,e.ly)),n.rx=i(n.rx,a(r,e.rx)),n.ry=i(n.ry,a(r,e.ry))}return n}function Ka(e,t){return{buttons:e.buttons|t.buttons,l2:Math.max(e.l2,t.l2),r2:Math.max(e.r2,t.r2),lx:Pa(e.lx+t.lx),ly:Pa(e.ly+t.ly),rx:Pa(e.rx+t.rx),ry:Pa(e.ry+t.ry),touch:e.touch??t.touch??null,motion:e.motion??t.motion??null}}function qa(e,t,n,r=()=>globalThis.navigator?.getGamepads?.()??[]){let i=e=>e?.vibrationActuator;for(let a of e.some(i)?e:r()){let e=i(a);e&&(t===0&&n===0?e.reset?.():e.playEffect?.(`dual-rumble`,{duration:1e3,strongMagnitude:t/255,weakMagnitude:n/255}))}}var Ja=new Map;function Ya(e,t){return{id:`${e.id} (app)`,index:3+e.slot,connected:!0,mapping:`standard`,timestamp:0,axes:e.axes,buttons:e.buttons.map(e=>({pressed:e>.5,touched:e>0,value:e})),vibrationActuator:t?.vibrationActuator??null,hapticActuators:t?.hapticActuators??[]}}function Xa(e){let t=e?.getGamepads?.()??[];return Ja.size===0||t.some(e=>!!e?.connected)?[...t]:[...Ja.values()].sort((e,t)=>e.slot-t.slot).map(e=>Ya(e))}var Za=`b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b1,b2,b0,b3,b6,b4,b7,b5,b8,b9,,,-a1,+a1,-a0,+a0(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,,,,,,,a0,a1(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b2,b1,b3,b0,b4,b5,,,b8,b9,,,-a1,+a1,-a0,+a0(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b2,b3,b0,b1,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b11,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a5(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1(b1,b0,b2,b3,,b7,a3,a4,,b9,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a5,a2(b1,b0,b2,b3,,b7,a3,a4,,b9,,,b12,b14,b15,b13,,,a0,a1,a5,a2(b1,b0,b2,b3,,b7,b4,b5,,b9,,,b12,b14,b15,b13,,,a0,a1,a5~,a2~(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,b8,,a0,a1,a3,a4(b1,b2,,,b7,b5,b4,,,b9,,,b12,b14,b15,b13,,,a0,a1,a5,a2(b0,b1,b3,b4,b6,b5,b7,b2,b8,,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b7,b9,b10,b2,b8,,,h0.1,h0.4,h0.8,h0.2,b5,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,-a1,+a1,-a0,+a0(b0,b1,b3,b4,b6,b5,b7,b2,,b8,,,-a1,+a1,-a0,+a0(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b12,b13,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a5,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b14,,a0,a1,a2,a3(b14,b13,b15,b12,b10,b11,b8,b9,b0,b3,b1,b2,b4,b6,b7,b5,b16,,a0,a1,a2,a3(b0,b1,b3,b2,b4,b5,a2,a5,b8,b9,b11,b12,h0.1,h0.4,h0.8,h0.2,b10,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13,a0,a1,a2,a5(b2,b1,b3,b0,b6,b7,b4,b5,b8,b9,,,-a1,+a1,-a0,+a0(b1,b2,b0,b3,b4,b5,,,b8,b9,,,b12,b13,b15,b14,,,a0,a1,a3,a4(b0,b1,b3,b2,b4,b5,b6,b7,b8,b9,b11,b12,b13,b14,b15,b16,b10,,a0,a1,a2,a3(b0,b1,b3,b2,,b6,a2,a5,,b7,,,b8,b9,b10,b11,,,a0,a1,a3,a4(b0,b1,b3,b2,b4,b5,,,b8,b9,,,b10,b11,b12,b13,,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,,,b13,b8,b10,,,,,,,,hx,hy(b0,b1,b2,b3,b4,b5,,,b12,b9,b11,,,,,,,,hx,hy(b0,b1,b3,b2,b5,b6,b7,b8,b9,b10,b12,b13,b14,b15,b16,b17,b11,,a0,a1,a2,a3(b0,b1,b3,b2,b5,b6,b7,b8,b9,b10,b12,b13,h0.1,h0.4,h0.8,h0.2,b11,,a0,a1,a2,a3(b0,b1,b3,b2,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b0,b1,,,,b2,,b4,,b5,,,h0.1,h0.4,h0.8,h0.2,b6(b0,b1,b2,b3,b12,b4,b13,b5,b14,b6,b15,b7,b11,b8,b10,b9,b16,,a0,a1~,a2,a3~(b1,b3,b0,b2,b13,b5,b12,b4,,b6,,,b11,b8,b10,b9,b16,,a0,a1~,a2,a3~(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b33,,a0,a1,a2,a3(b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b16,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b15,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,,,,,b8,,a0,a1,a3,a4(b1,b0,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12,b13(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,,h0.1,h0.4,h0.8,h0.2,b12,b13(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b11,b12,h0.1,h0.4,h0.8,h0.2,b10,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,b12,b13,b14,b15,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,b14,b13,b14,b13,,,a0,a1,a3,a4(b1,b0,b2,b3,,,,,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b2,b3,b1,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b10(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12,b13,a0,a1,a2,a5(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,+a2,+a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,b8,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b13,,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b0,b3,b2,b4,b5,a2,a5,b6,b7,,,h0.1,h0.4,h0.8,h0.2,b8(b1,b2,,,,,,,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b21,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a5,a4,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,b8,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b13,b13,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,a5,a4,,b6,b7,b8,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a2,a5,b7,b6,b9,b10,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,b7,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a5,a4,b9,b6,b7,b8,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b22,,a0,a1,a2,a3(b0,b1,b2,b3,b4,b5,a2,a3,b6,b7,b9,,b12,b14,b15,b13,b8,,a0,a1(b3,b4,b5,b6,b7,b8,a9,a8,b11,b12,b14,b15,b16,b17,b18,b19,b13,,a0,a1,a2,a3(b0,b1,b3,b4,b8,b6,b9,b7,,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b7,b9,b6,b8,b10,b11,,,h0.1,h0.4,h0.8,h0.2(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b9,b10,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b1,b0,b4,b3,b6,b7,,,b10,b11,,,-a1,+a1,-a0,+a0(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,,,b6,b7,b8,b9,,b11,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b3,b1,b4,,b10,a5,a4,,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,,,b6,b7,b8,b9,b10,b11,b13,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,,,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b0,b1,b3,b4,,b6,,b7,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,,,,,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a8,b9,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b8,b6,b9,b7,,b10,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a4,a5,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,,,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b2,b0,b3,b6,b4,b7,b5,b8,b9,,,-a4,+a4,-a3,+a3(b4,b8,b0,b12,b16,b20,b24,b28,b32,b36,b40,b44,h0.1,h0.4,h0.8,h0.2,,,a0,a4,a8,a12(b8,b12,b0,b4,b16,b20,b24,b28,b32,b36,,,h0.1,h0.4,h0.8,h0.2,b44,,a0,a4,a8,a12(b4,b0,b8,b12,,b28,a12,a16,,b36,,,h0.1,h0.4,h0.8,h0.2,,,a0,a4,a20,a8(b1,b2,b0,b3,,b7,a3,a4,,b9,,,b12,b14,b15,b13,,,a0,a1,a5,a2(b4,b0,b8,b12,,b28,a12,a16,,b36,,,b48,b56,b60,b52,,,a0,a4,a20,a8(b1,b2,,,b7,b5,a3,,,b9,,,b12,b14,b15,b13,,,a0,a1,a5,a2(b0,b1,b2,b3,b4,b5,a2,a5,b9,b8,b6,b7,b11,b12,b13,b14,b10,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b7,,,b5,b8,,,-a1,+a1,-a0,+a0,b2(b0,b1,b2,b3,b4,b5,b6,b15,b8,b9,,,h0.1,h0.4,h0.8,h0.2(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b13,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a5(b0,b1,b3,b4,b6,b7,a5,a4,b12,b13,b15,b16,h0.1,h0.4,h0.8,h0.2,b14,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,,,-a1,+a1,-a0,+a0,b2(b0,b1,b3,b4,b6,b7,,,b10,b11,,,-a1,+a1,-a0,+a0(b0,b1,b3,b4,b6,b7,b8,a4,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a31(b0,b1,b3,b4,b8,b6,b9,b7,,b11,,,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,a5,a4,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a3,a4(b1,b0,b4,b3,b6,b7,a4,a5,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a3(b1,b0,b4,b3,b6,b7,a5,a4,b10,b11,,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,,,b10,b11,,,,,,,,,hx,hy(b0,b1,b2,b3,b4,b5,b6,b7,b16,b15,b8,b9,b10,b11,b13,b12,b17,,a0,a1~,a2,a3~(b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a4(b2,b1,b3,b0,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b2,b3,b33,b5,,,b6,b7,,,h0.1,h0.4,h0.8,h0.2(b0,b1,b3,b4,b6,b2,,,,b9,,,h0.1,h0.4,h0.8,h0.2(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a3,a4(b1,b2,,,b6,,b9,b7,,b8,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a2(b2,b1,b3,b0,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b3,b4,,b6,,b2,b7,b9,,,b2,b14,b15,b13(b0,b1,b2,b3,b4,b5,a2,a5,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b5,b7,b2,b10,b8,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b6,b7,a5~,a2~,b2,b8,b8,b5,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b4,,b9,b10,b6,b7,b8,,b5,b2,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,,,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b5,b4,b10,b11,b7,b6,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b3,b2,b6,b7,b4,b5,b8,b9,b11,b12,b13,b14,b15,b16,,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b16,b19,b17,b18,b6,b7,b8,b9,b10,b11,b13,,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a3,a4(b2,b1,b3,b0,b6,b7,b4,b5,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a5,a2(b0,b1,b2,b3,b4,b5,a2,a2,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,a2,,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,b8,b9,b6,b7,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,b10,b11,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,b10,b11,b7,b6,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b1,b2,b0,b3,b10,b5,b11,b7,b8,b9,b4,b6,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b2,b0,b3,b5,b7,b4,b6,b8,b9,,,h0.1,h0.4,h0.8,h0.2,b12(b1,b2,b0,b3,b4,b5,a3,a4,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a3(b1,b2,b0,b3,b4,b5,a3,a4,b8,b13,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,b13,a0,a1,a2,a5(b0,b4,b2,b1,b3,b6,,,b11,b9,,,h0.1,h0.4,h0.8,h0.2(b1,b2,b0,b3,b4,b5,a2,a5,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b2,b3,b9,b10,a4,a5,b4,b6,b7,b8,b11,b12,b13,b14,,,a0,a1,a2,a3(b1,b0,b3,b2,b4,b5,,,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b1,b2,b0,b3,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b2,b3,b4,b5,+a2,-a2,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b1,b0,b3,b2,b4,b5,b6,b7,b8,b9,b10,b11,h0.1,h0.4,h0.8,h0.2,b12,,a0,a1,a2,a3(b0,b1,b3,b4,b6,b7,,,,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,+a2,-a2,b6,b7,b8,b9,b11,b14,b12,b13,b10,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,,a2,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,b3,b4,b6,b7,a4,a3,,,b13,b14,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b0,b1,b2,b3,b4,b5,,,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a2,a5(b6,b7,b9,b10,b12,b13,b14,b15,b16,b17,b19,b20,h0.1,h0.4,h0.8,h0.2,b18,,a0,a1,a3,a4(b0,b1,b2,b3,b4,b5,+a2,-a2,b6,b7,b8,b9,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a4(b0,b1,,,,,,,b7,b6,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b6,b7,,,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1(b0,b1,b3,b4,b6,b7,,,b10,b11,,,,,,,,,a0,a1(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a2,a5(b1,b0,b4,b3,b6,b7,b8,b9,b10,b11,b13,b14,h0.1,h0.4,h0.8,h0.2,b2,,a0,a1,a3,a4(b1,b0,b4,b3,,b6,,b7,b10,b11,,,h0.1,h0.4,h0.8,h0.2,,,a0,a1,a3,a5`.split(`(`),Qa={l00790006:0,l00790011:1,l00790016:2,l00790122:3,l00790126:4,l00791800:5,l00791803:6,l0079181a:7,l0079181b:8,l0079181c:9,l00791830:10,l00791843:11,l00791844:12,l00791845:11,l00791846:13,l007918d2:7,l007918d4:14,l0079954e:15,l046dc20a:16,l046dc211:17,l046dc216:5,l046dc218:5,l046dc219:5,l046dc21a:18,l046dc21d:14,l046dc21e:14,l046dc21f:14,l046dcad1:5,l046dcad2:5,l04b4010a:19,l04b42411:20,l04b42412:21,l054c0268:22,l054c05c4:23,l054c09cc:24,l054c0ba0:24,l054c0cda:25,l054c0ce6:24,l054c0df2:24,l054c0e5f:24,l054c1337:26,l057e0330:27,l057e0337:28,l057e1337:29,l057e2006:30,l057e2007:31,l057e2008:32,l057e2009:33,l057e2017:34,l057e201e:35,l057e2069:36,l057e2073:37,l05ac022d:38,l05ac055b:39,l05ac057a:40,l05ac061a:41,l0e6f0109:42,l0e6f011e:7,l0e6f011f:14,l0e6f0128:5,l0e6f012f:7,l0e6f0130:7,l0e6f0131:14,l0e6f0139:14,l0e6f0146:43,l0e6f0164:14,l0e6f0180:7,l0e6f0181:7,l0e6f0184:7,l0e6f0185:44,l0e6f0187:7,l0e6f0188:7,l0e6f0203:45,l0e6f0207:46,l0e6f0213:14,l0e6f0214:7,l0e6f02a7:14,l0e6f02a8:47,l0e6f02b2:48,l0e6f02b8:14,l0e6f02c8:14,l0e6f02d7:49,l0e6f02d8:14,l0e6f02da:14,l0e6f02ef:14,l0e6f02f1:14,l0e6f0301:14,l0e6f0315:14,l0e6f0401:14,l0e6f0413:14,l0e6f1112:50,l0e6f1113:51,l0e6ff501:14,l0f0d0009:7,l0f0d0010:42,l0f0d0011:7,l0f0d0016:52,l0f0d0022:42,l0f0d004d:7,l0f0d005e:53,l0f0d005f:54,l0f0d0066:24,l0f0d0067:14,l0f0d006a:8,l0f0d006b:7,l0f0d006d:55,l0f0d006e:7,l0f0d0084:8,l0f0d0085:7,l0f0d0086:47,l0f0d0087:56,l0f0d0088:57,l0f0d0092:58,l0f0d00aa:39,l0f0d00c1:7,l0f0d00ee:59,l0f0d00f6:60,l0f0d00fb:39,l0f0d0137:61,l0f0d0138:62,l0f0d0150:14,l0f0d0185:14,l0f0d0196:63,l0f0d01ab:63,l15320401:24,l15320402:7,l15320705:64,l15320900:65,l15320a03:14,l15320a14:14,l15320a29:14,l15321000:8,l15321008:66,l1532100a:59,l1532100b:24,l15321100:24,l18d19400:65,l20d60dad:67,l20d62002:68,l20d62005:14,l20d6200b:14,l20d6200f:69,l20d62065:14,l20d62802:14,l20d64001:70,l20d64002:70,l20d64005:14,l20d66271:71,l20d6792a:24,l20d689e5:71,l20d6a710:5,l20d6a711:7,l20d6a712:7,l20d6a713:7,l20d6a714:7,l20d6ca6d:7,l24c65300:14,l24c6531a:14,l24c6541a:14,l24c6543a:14,l24c6581a:14,l24c65b02:14,l24c65d04:14,l24c6891a:63,l24c6891b:63,l24c6892a:72,l24c6892b:63,l24c6fafe:14,l27f80bbf:63,l28de1102:73,l28de1105:73,l28de1106:73,l28de1142:73,l28de11fc:43,l28de11ff:14,l28de1201:73,l28de1202:73,l28de1205:74,l2dc80651:75,l2dc81003:76,l2dc81080:76,l2dc82000:14,l2dc82003:14,l2dc8200a:77,l2dc82019:14,l2dc82025:14,l2dc82101:63,l2dc82830:78,l2dc82862:79,l2dc82865:79,l2dc82869:80,l2dc8286a:81,l2dc83010:82,l2dc83011:63,l2dc83012:63,l2dc83013:63,l2dc83015:63,l2dc83016:63,l2dc83017:63,l2dc83019:83,l2dc8301b:63,l2dc8301d:63,l2dc83100:84,l2dc83101:85,l2dc83102:85,l2dc83103:85,l2dc83104:85,l2dc83106:14,l2dc8310a:14,l2dc8310b:14,l2dc83230:86,l2dc83810:79,l2dc83820:87,l2dc85006:88,l2dc85101:89,l2dc85103:86,l2dc85104:90,l2dc85107:91,l2dc85108:91,l2dc85109:90,l2dc85111:92,l2dc85112:82,l2dc86000:92,l2dc86001:93,l2dc86002:92,l2dc86006:82,l2dc86007:94,l2dc86009:82,l2dc86012:63,l2dc86100:87,l2dc86101:93,l2dc86102:92,l2dc86728:95,l2dc89000:96,l2dc89001:96,l2dc89012:93,l2dc89015:79,l2dc89018:78,l2dc89020:97,l2dc89025:98,l2dc8ab21:78,l35371004:14,l35371007:63,l3537100b:14,l35371046:63,l35371058:63,l35371094:63,l35371097:63,l358a0102:63,l358a0202:63,l358a0203:63,l358a0204:63,m00790006:99,m00790011:100,m00791800:101,m00791803:102,m0079181c:41,m00791843:103,m00791844:104,m00791846:105,m007918d2:39,m0079954e:106,m046dc216:5,m046dc218:5,m046dc219:5,m046dc21a:18,m046dc21f:107,m04b4010a:108,m04b42411:20,m04b42412:20,m054c0268:22,m054c05c4:24,m054c09cc:24,m054c0ba0:24,m054c0cda:25,m054c0ce6:24,m054c0df2:24,m054c0e5f:24,m054c1337:26,m057e2006:30,m057e2007:31,m057e2009:60,m057e2017:109,m057e2069:36,m057e2073:37,m05ac061a:41,m0e6f0109:42,m0e6f0184:110,m0e6f0187:5,m0e6f0201:107,m0e6f0203:45,m0e6f0207:46,m0e6f0401:107,m0f0d002d:54,m0f0d004d:7,m0f0d005e:111,m0f0d005f:7,m0f0d0066:24,m0f0d006e:7,m0f0d0084:8,m0f0d0085:7,m0f0d0087:112,m0f0d0088:57,m0f0d0092:58,m0f0d00aa:39,m0f0d00c1:7,m0f0d00ee:113,m0f0d00f6:3,m0f0d0138:62,m0f0d0200:7,m15320401:24,m15320402:7,m15320705:64,m15320900:65,m15320a03:107,m15321000:8,m15321100:24,m18d19400:65,m20d66271:71,m20d6792a:24,m20d6a710:7,m20d6a711:44,m20d6ca6d:7,m24c6543a:107,m24c65d04:107,m24c6891a:114,m24c6891b:63,m24c6892a:64,m24c6892b:63,m24c6fafe:107,m2dc80651:115,m2dc82820:116,m2dc82830:78,m2dc82840:78,m2dc82865:87,m2dc82869:80,m2dc8286a:81,m2dc83011:63,m2dc83012:63,m2dc83013:63,m2dc83015:117,m2dc83016:63,m2dc83017:118,m2dc83019:83,m2dc8301b:63,m2dc8301d:63,m2dc83100:9,m2dc83101:85,m2dc83102:85,m2dc83103:85,m2dc83104:85,m2dc83105:84,m2dc83230:119,m2dc83810:94,m2dc85006:120,m2dc85101:89,m2dc85103:86,m2dc85104:90,m2dc85107:121,m2dc85108:122,m2dc85109:90,m2dc85111:82,m2dc85112:82,m2dc86001:79,m2dc86002:85,m2dc86006:82,m2dc86009:123,m2dc86101:85,m2dc86102:85,m2dc86728:95,m2dc89000:96,m2dc89001:79,m2dc89012:78,m2dc89015:124,m2dc89018:78,m2dc89020:125,m2dc89025:126,m2dc89026:127,m2dc8ab12:116,m35371022:63,m35371041:63,m35371046:63,m35371104:63,m358a0102:63,m358a0201:128,m358a0202:128,m358a0203:128,m358a0204:63,w00790002:129,w00790007:129,w0079000a:129,w00790016:18,w00790122:99,w00790126:130,w00791804:131,w0079181a:7,w0079181b:113,w00791824:132,w00791830:133,w00791845:11,w00791847:12,w0079184f:134,w00791879:135,w0079188f:136,w007918ae:137,w007918d4:138,w046dc209:139,w046dc20a:16,w046dc20b:140,w046dc211:141,w046dc21d:138,w046dc21e:142,w046dc242:142,w046dca84:143,w046dca88:143,w046dcad1:5,w046dcad2:7,w04b42410:144,w04b4c681:130,w054c05c5:145,w057e0330:146,w05ac022d:144,w05ac033d:147,w05ac044d:147,w05ac055b:39,w05ac057a:148,w0e6f0003:149,w0e6f0111:7,w0e6f0114:7,w0e6f0119:7,w0e6f011a:7,w0e6f011e:7,w0e6f011f:150,w0e6f0124:42,w0e6f0128:7,w0e6f012f:7,w0e6f0130:7,w0e6f0132:7,w0e6f0146:138,w0e6f0164:151,w0e6f0180:7,w0e6f0181:7,w0e6f0185:44,w0e6f0188:7,w0e6f0189:7,w0e6f0214:7,w0e6f0301:138,w0e6f1113:51,w0e6f6302:7,w0f0d0009:7,w0f0d000a:152,w0f0d000c:153,w0f0d000d:154,w0f0d0010:155,w0f0d0011:57,w0f0d0013:155,w0f0d001b:152,w0f0d0021:155,w0f0d0022:54,w0f0d0025:42,w0f0d0026:155,w0f0d0027:42,w0f0d0032:155,w0f0d003d:156,w0f0d0040:157,w0f0d0042:155,w0f0d0049:7,w0f0d004b:155,w0f0d0051:155,w0f0d0054:7,w0f0d0055:8,w0f0d005b:113,w0f0d005c:7,w0f0d0064:155,w0f0d0067:70,w0f0d006a:8,w0f0d006b:7,w0f0d006f:158,w0f0d0070:57,w0f0d007b:155,w0f0d008a:8,w0f0d008b:7,w0f0d008c:138,w0f0d009c:8,w0f0d00a0:159,w0f0d00a5:160,w0f0d00a6:111,w0f0d00ad:161,w0f0d00ae:142,w0f0d00af:162,w0f0d00c0:138,w0f0d00c9:5,w0f0d00d8:163,w0f0d00dc:138,w0f0d0101:5,w0f0d0104:142,w0f0d0123:144,w0f0d0137:164,w0f0d0162:165,w0f0d0164:166,w0f0d0196:134,w0f0d0202:167,w0f0d1011:168,w153202a6:169,w15320300:170,w15320707:147,w15320a14:138,w15321004:145,w15321007:145,w15321009:145,w1532100a:5,w18d12c40:171,w20d60060:7,w20d60dad:142,w20d6319f:7,w20d64026:134,w20d64033:134,w20d6571d:7,w20d6576d:7,w20d65795:7,w20d657c7:7,w20d657e5:7,w20d689e5:172,w20d6a712:7,w20d6a713:7,w20d6a714:7,w20d6a720:7,w24c6531a:153,w24c65b02:138,w27f80bbf:173,w28de11fc:70,w28de11ff:174,w2dc802e0:175,w2dc81003:176,w2dc81080:176,w2dc82100:144,w2dc82810:177,w2dc82862:78,w2dc83000:78,w2dc83001:178,w2dc8301c:134,w2dc8310a:134,w2dc83820:179,w2dc85001:180,w2dc86000:79,w2dc86003:123,w2dc86012:134,w2dc86100:85,w2dc86103:123,w2dc8ab11:179,w2dc8ab20:178,w2dc8ab21:78,w35371004:138,w35371007:134,w35371094:134,w35371116:134},$a=e=>e.toLowerCase().padStart(4,`0`);function eo(e){let t=/^(.*?)\s*\((?:[^()]*?\s)?Vendor:\s*([0-9a-f]{1,4})\s+Product:\s*([0-9a-f]{1,4})\s*\)\s*$/i.exec(e);if(t)return{vendor:$a(t[2]),product:$a(t[3]),name:t[1].trim()};let n=/^([0-9a-f]{1,4})-([0-9a-f]{1,4})-(.*)$/i.exec(e.trim());return n?{vendor:$a(n[1]),product:$a(n[2]),name:n[3].trim()}:null}function to(e){return(eo(e)?.name??e.replace(/\s*\((?:XInput\s*)?STANDARD GAMEPAD\)\s*$/i,``)).trim()||e}function no(e=globalThis.navigator){let t=e?.userAgent??``;return/Android|iPhone|iPad|iPod/i.test(t)?null:/Macintosh|Mac OS X/i.test(t)?(e?.maxTouchPoints??0)>1?null:`m`:/Windows/i.test(t)?`w`:/Linux|CrOS|X11/i.test(t)?`l`:null}function ro(e,t){if(!t)return null;let n=t===`l`?[`l`]:[`m`,`w`];for(let t of n){let n=Qa[`${t}${e.vendor}${e.product}`];if(n!==void 0)return Za[n]??null}return null}function io(e){return e.mapping!==`standard`&&eo(e.id)?.vendor===`2dc8`}var ao={6003:`switch`,6006:`switch`,6103:`switch`,3010:`switch`,6001:`startx`,6002:`startx`,6101:`startx`,6102:`startx`,3011:`receiver`,3012:`receiver`,3013:`receiver`,3015:`receiver`,3016:`receiver`,3017:`receiver`,"301b":`receiver`,"301c":`receiver`,"301d":`receiver`,6012:`receiver`,5112:`none`,9020:`none`};function oo(e){let t=eo(e);return t&&ao[t.product]||`manual`}var so={1:0,2:2,4:4,8:6};function co(e){let t=0,n=!1;for(let r of e){let e=/a(\d+)/.exec(r);e&&(t=Math.max(t,Number(e[1])+1)),r.startsWith(`h`)&&(n=!0)}return{n:t,hat:n}}function lo(e,t,n){let{n:r,hat:i}=co(t),a=Ia.length,o=e.axes.findIndex(e=>Math.abs(e)>1.05),s=e=>e;if(i&&o<0)return n===`l`&&e.axes.length>=r+2?{hat:-1,hatXY:r,axis:s}:null;if(!(i?o>r:n!==`l`&&e.axes.length>=r+2))return{hat:o,hatXY:-1,axis:s};if(r<=4)return{hat:o,hatXY:-1,axis:e=>[0,1,2,5][e]??e};let c=t[a+2]?.replace(`~`,``)===`a2`&&t[a+3]?.replace(`~`,``)===`a3`,l=[t[6],t[7]].every(e=>/^a[45]~?$/.test(e??``));return r===6&&c&&l?{hat:o,hatXY:-1,axis:e=>[0,1,2,5,3,4][e]??e}:{hat:o,hatXY:-1,axis:s}}function uo(e,t){let n=/^b(\d+)$/.exec(e);if(n)return{b:Number(n[1])};if(n=/^([+-]?)a(\d+)(~?)$/.exec(e),n){let e=t.axis(Number(n[2]));return n[1]===`+`?{a:e,d:1}:n[1]===`-`?{a:e,d:-1}:n[3]?{a:e,d:-1,rest:1}:{a:e,d:1,rest:-1}}if(n=/^h0\.(\d)$/.exec(e),n){let e=so[n[1]];if(e===void 0)return null;if(t.hat>=0)return{h:t.hat,at:e};if(t.hatXY>=0)return e===0?{a:t.hatXY+1,d:-1}:e===4?{a:t.hatXY+1,d:1}:e===6?{a:t.hatXY,d:-1}:{a:t.hatXY,d:1}}return null}function fo(e,t){let n=/^a(\d+)(~?)$/.exec(e);if(n)return n[2]?{a:t.axis(Number(n[1])),inv:!0}:{a:t.axis(Number(n[1]))};if(e===`hx`||e===`hy`){if(t.hat>=0)return{a:t.hat,hat:e===`hx`?`x`:`y`};if(t.hatXY>=0)return{a:t.hatXY+ +(e===`hy`)}}return null}function po(e,t,n){let r=e.split(`,`),i=lo(t,r,n);if(!i)return null;let a={buttons:[],l2:null,r2:null,lx:null,ly:null,rx:null,ry:null};for(let e=0;eArray.isArray(e)&&e.length===2&&typeof e[0]==`number`&&_o(e[1]))&&[t.l2,t.r2,t.lx,t.ly,t.rx,t.ry].every(_o)}function yo(){try{let e=Lt(go),t=e?JSON.parse(e):null;return!t||typeof t!=`object`||Array.isArray(t)?{}:Object.fromEntries(Object.entries(t).filter(e=>vo(e[1])))}catch{return{}}}function bo(e,t){let n=yo();return t?n[e]=t:delete n[e],It(go,JSON.stringify(n)),xo=n,n}var xo=null;function So(e){return xo??=yo(),xo[e.id]??To(xo,e.id)??ho(e)??Ua(e)}function Co(e){return xo??=yo(),xo[e.id]?`saved`:e.mapping===`standard`?`standard`:ho(e)?`known`:`guess`}function wo(e){return ho(e)??Ua(e)}function To(e,t){if(!t.endsWith(` (app)`))return null;let n=t.slice(0,-6).trim().toLowerCase();if(!n)return null;let r=Object.keys(e).filter(e=>{let t=e.trim().toLowerCase();return t===n||t.includes(n)}),i=r.find(e=>e.trim().toLowerCase()===n)??(r.length===1?r[0]:null);return i?(xo=bo(t,e[i]),e[i]):null}function Eo(e){return{buttons:e.buttons.map(e=>Math.max(+!!e.pressed,e.value)),axes:[...e.axes]}}function Do(e,t){let n=null;if(t.buttons.forEach((t,r)=>{let i=t-(e.buttons[r]??0);t>.5&&i>.5&&(!n||i>n.amount)&&(n={src:{b:r},amount:i})}),n)return n.src;for(let n=0;n1.05?La(t.axes[n]):null;if(r!==null)return{h:n,at:r}}return t.axes.forEach((t,r)=>{let i=e.axes[r]??0,a=t-i;if(!(Math.abs(a)<.6)&&(!n||Math.abs(a)>n.amount)){let e=a>0?1:-1;n={src:Math.abs(i)>.5?{a:r,d:e,rest:i}:{a:r,d:e},amount:Math.abs(a)}}}),n?n.src:null}function Oo(e,t){let n=null;if(t.axes.forEach((t,r)=>{let i=t-(e.axes[r]??0);Math.abs(i)>=.6&&(!n||Math.abs(i)>Math.abs(n.moved))&&(n={a:r,moved:i})}),!n)return null;let r=n;return r.moved>0?{a:r.a}:{a:r.a,inv:!0}}var ko=[{kind:`button`,bit:R.CROSS,name:`✕`},{kind:`button`,bit:R.CIRCLE,name:`○`},{kind:`button`,bit:R.SQUARE,name:`□`},{kind:`button`,bit:R.TRIANGLE,name:`△`},{kind:`button`,bit:R.UP,name:`↑`},{kind:`button`,bit:R.DOWN,name:`↓`},{kind:`button`,bit:R.LEFT,name:`←`},{kind:`button`,bit:R.RIGHT,name:`→`},{kind:`button`,bit:R.L1,name:`L1`},{kind:`button`,bit:R.R1,name:`R1`},{kind:`trigger`,which:`l2`,name:`L2`},{kind:`trigger`,which:`r2`,name:`R2`},{kind:`button`,bit:R.L3,name:`L3`},{kind:`button`,bit:R.R3,name:`R3`},{kind:`button`,bit:R.OPTIONS,name:`Options`},{kind:`button`,bit:R.SHARE,name:`Create`},{kind:`button`,bit:R.PS,name:`PS`},{kind:`button`,bit:R.TOUCHPAD,name:`Touchpad`},{kind:`axis`,which:`lx`,name:`L →`},{kind:`axis`,which:`ly`,name:`L ↓`},{kind:`axis`,which:`rx`,name:`R →`},{kind:`axis`,which:`ry`,name:`R ↓`}];function Ao(){return{buttons:[],l2:null,r2:null,lx:null,ly:null,rx:null,ry:null}}function jo(e,t,n){return t.kind===`button`?{...e,buttons:[...e.buttons.filter(([e])=>e!==t.bit),[t.bit,n]]}:(t.kind,{...e,[t.which]:n})}function Mo(e,t=Va){let n=new Set(e.buttons.map(([e])=>e)),r=e=>`b`in e?`b${e.b}`:`h`in e?`h${e.h}.${e.at}`:`a${e.a}${e.d}`,i=new Set([...e.buttons.map(([,e])=>r(e)),...[e.l2,e.r2].filter(e=>!!e).map(r)]);return{buttons:[...e.buttons,...t.buttons.filter(([e,t])=>!n.has(e)&&!i.has(r(t)))],l2:e.l2??t.l2,r2:e.r2??t.r2,lx:e.lx??t.lx,ly:e.ly??t.ly,rx:e.rx??t.rx,ry:e.ry??t.ry}}var No=ko.filter(e=>e.kind!==`button`||![R.L3,R.R3,R.OPTIONS,R.SHARE,R.PS,R.TOUCHPAD].includes(e.bit));function Po(e,t){return t.buttons.every((t,n)=>Math.abs(t-(e.buttons[n]??0))<.3)&&t.axes.every((t,n)=>Math.abs(t-(e.axes[n]??0))<.3)}var Fo=class{constructor(e=ko){this.steps=e,this.step=0,this.prof=Ao(),this.rest=null,this.waiting=!0}get done(){return this.step>=this.steps.length}get current(){return this.steps[this.step]??null}feed(e){if(this.done)return!1;if(!this.rest)return this.rest=e,this.waiting=!1,!1;if(this.waiting)return Po(this.rest,e)&&(this.waiting=!1),!1;let t=this.steps[this.step],n=t.kind===`axis`?Oo(this.rest,e):Do(this.rest,e);return n?(this.prof=jo(this.prof,t,n),this.go(this.step+1),!0):!1}skip(){this.go(this.step+1)}back(){this.step>0&&this.go(this.step-1)}go(e){this.waiting=!0,this.step=Math.min(e,this.steps.length)}profile(e=Va){return Mo(this.prof,e)}};function Io(e,t){return e.buttons===t.buttons&&e.l2===t.l2&&e.r2===t.r2&&e.lx===t.lx&&e.ly===t.ly&&e.rx===t.rx&&e.ry===t.ry&&(e.touch?.[0]??-1)===(t.touch?.[0]??-1)&&(e.touch?.[1]??-1)===(t.touch?.[1]??-1)&&(e.motion?.t??-1)===(t.motion?.t??-1)}function Lo(){try{return typeof sessionStorage<`u`?sessionStorage:null}catch{return null}}var Ro=e=>`ps5upload.join.token.${e??`app`}`,zo=class{constructor(e){this.o=e,this.ws=null,this.stage={kind:`connecting`},this.token=null,this.player=0,this.last={...ja},this.lastSent=0,this.neutral=!1,this.stopped=!1,this.attempt=0,this.deadline=0,this.raf=0,this.keepalive=null,this.pinger=null,this.retry=null,this.lastHeard=0,this.hostAway=!1,this.pings=0,this.now=e.now??(()=>Date.now()),this.storage=e.storage===void 0?Lo():e.storage,this.WS=e.WebSocketImpl??WebSocket,this.seq=this.now()>>>0;try{this.token=this.storage?.getItem(this.key)??null}catch{this.token=null}}get key(){return Ro(this.o.invite??this.o.code??null)}get current(){return this.stage}get socket(){return this.ws}get resumeToken(){return this.token}setStage(e){this.stage=e,this.o.onStage(e)}start(){if(this.stopped=!1,this.setStage({kind:`connecting`}),this.connect(),this.stopped)return;let e=()=>{this.sendPad(!1),this.raf=(this.o.raf??(e=>window.requestAnimationFrame(e)))(e)};this.raf=(this.o.raf??(e=>window.requestAnimationFrame(e)))(e),this.keepalive=setInterval(()=>this.sendPad(!1),100),this.pinger=setInterval(()=>this.ping(),1e3)}connect(){let e;try{e=new this.WS(this.o.url)}catch{this.dropped();return}this.ws=e,e.binaryType=`arraybuffer`,e.onopen=()=>{if(this.ws!==e)return;this.lastHeard=this.now();let t={name:this.o.name};this.o.invite&&(t.invite=this.o.invite),this.o.code&&(t.code=this.o.code),this.token&&(t.resume=this.token),e.send(JSON.stringify({hello:t}))},e.onmessage=t=>{this.ws===e&&(this.lastHeard=this.now(),typeof t.data==`string`?this.onText(t.data):t.data instanceof ArrayBuffer&&this.stage.kind===`joined`&&this.o.onFrame?.(t.data))},e.onclose=t=>{if(this.ws!==e)return;this.ws=null;let n=Ue(t);n===`mismatch`?(this.forgetToken(),this.finish({kind:`ended`,why:n})):n&&this.stage.kind!==`joined`&&this.stage.kind!==`reconnecting`?this.finish({kind:`ended`,why:n}):this.dropped()},e.onerror=()=>{}}onText(e){let t=Je(e);if(t)switch(t.kind){case`pong`:{let e=this.now()-t.t;e>=0&&e<6e4&&this.o.onRtt?.(e);return}case`asking`:this.stage.kind!==`reconnecting`&&this.setStage({kind:`asking`});return;case`waiting`:this.hostAway||(this.hostAway=!0,this.deadline=this.now()+et),this.attempt=0,this.setStage(this.reconnectingStage());return;case`joined`:this.token=t.token,this.player=t.player,this.attempt=0,this.hostAway=!1;try{this.storage?.setItem(this.key,t.token)}catch{}{let e=t.track&&this.ws?.media||null;this.o.onCodec?.(t.hevc,e,!!e&&t.audio&&!!e.audio)}this.setStage({kind:`joined`,player:t.player,hevc:t.hevc}),this.sendPad(!0);return;case`refused`:this.forgetToken(),this.hostAway&&t.why!==`seat_taken`?this.finish({kind:`ended`,why:`host_stopped`}):this.finish({kind:`refused`,why:t.why});return;case`bye`:if(t.why===`host_stopped`&&this.token){this.hostWait();return}this.forgetToken(),this.finish({kind:`ended`,why:t.why});return;case`status`:this.stage.kind===`joined`&&t.status.player>0&&t.status.player!==this.stage.player&&(this.player=t.status.player,this.setStage({...this.stage,player:t.status.player})),this.o.onStatus?.(t.status);return;case`feedback`:t.rumble&&this.o.onRumble?.(t.rumble[0],t.rumble[1]),t.light&&this.o.onLight?.(t.light);return}}hostWait(){this.hostAway=!0,this.deadline=this.now()+et,this.attempt=0;let e=this.ws;this.ws=null;try{e?.close()}catch{}this.scheduleRetry()}reconnectingStage(){return{kind:`reconnecting`,player:this.player,attempt:this.attempt,deadline:this.deadline,...this.hostAway?{hostStopped:!0}:{}}}giveUp(){this.forgetToken(),this.finish({kind:`ended`,why:this.hostAway?`host_stopped`:`gave_up`})}dropped(){if(this.stopped)return;let e=this.stage;e.kind===`joined`||e.kind===`reconnecting`&&this.token?(e.kind===`joined`&&(this.deadline=this.now()+$e),this.scheduleRetry()):this.finish({kind:`ended`,why:`lost`})}scheduleRetry(){if(this.stopped)return;if(this.now()>=this.deadline){this.giveUp();return}let e=Qe(this.attempt);this.setStage(this.reconnectingStage()),this.attempt+=1,this.retry&&clearTimeout(this.retry),this.retry=setTimeout(()=>{this.retry=null,this.stopped||(this.now()>=this.deadline?this.giveUp():this.connect())},e)}forgetToken(){this.token=null;try{this.storage?.removeItem(this.key)}catch{}}ping(){if(this.hostAway&&!this.stopped&&this.now()>=this.deadline+5e3||!this.stopped&&this.stage.kind===`reconnecting`&&this.now()>=this.deadline+5e3){this.giveUp();return}let e=this.ws;if(e&&e.readyState===this.WS.OPEN){if(this.stage.kind===`joined`&&this.now()-this.lastHeard>3500){this.ws=null;try{e.close()}catch{}this.dropped()}else if(e.send(JSON.stringify({ping:this.now()})),this.stage.kind===`joined`&&this.o.readStats&&++this.pings%2==0){let t=this.o.readStats();t&&e.send(JSON.stringify({stats:t}))}}}setNeutral(e){this.neutral!==e&&(this.neutral=e,this.sendPad(!0))}sendPad(e){let t=this.ws;if(!t||t.readyState!==this.WS.OPEN||this.stage.kind!==`joined`)return;let n=this.neutral?{...ja,touch:null,motion:null}:this.o.readPad(),r=this.now();!e&&Io(n,this.last)&&r-this.lastSent<100||(this.last=n,this.lastSent=r,this.seq=this.seq+1>>>0,t.send(Ze(this.seq,n)))}clearTimers(){(this.o.cancelRaf??(e=>window.cancelAnimationFrame(e)))(this.raf),this.keepalive&&clearInterval(this.keepalive),this.pinger&&clearInterval(this.pinger),this.retry&&clearTimeout(this.retry),this.keepalive=this.pinger=this.retry=null}finish(e){this.stopped=!0,this.clearTimers();let t=this.ws;this.ws=null;try{t?.close()}catch{}this.setStage(e)}askKeyframe(){let e=this.ws;e&&e.readyState===this.WS.OPEN&&this.stage.kind===`joined`&&e.send(JSON.stringify({keyframe:!0}))}leave(){let e=this.ws;e&&e.readyState===this.WS.OPEN&&(this.stage.kind===`joined`&&(this.seq=this.seq+1>>>0,e.send(Ze(this.seq,ja))),e.send(JSON.stringify({leave:1}))),this.forgetToken(),this.finish({kind:`ended`,why:`left`})}stop(){let e=this.ws;e&&e.readyState===this.WS.OPEN&&this.stage.kind===`joined`&&(this.seq=this.seq+1>>>0,e.send(Ze(this.seq,ja))),this.stopped=!0,this.clearTimers(),this.ws=null;try{e?.close()}catch{}}},Bo=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),z=s(((e,t)=>{t.exports=Bo()}))(),Vo=`ps5upload.openIn`,Ho=`ps5upload.openIn.tab`;function Uo(){try{return sessionStorage.getItem(Ho)===`browser`}catch{return!1}}function B(){try{sessionStorage.setItem(Ho,`browser`)}catch{}}function V(e){return e===`browser`?`browser`:e===`app`?`opening`:`ask`}function Wo({appLink:e,children:t}){let n=Ie(),[r,i]=(0,D.useState)(()=>Uo()?`browser`:V(Lt(Vo))),[a,o]=(0,D.useState)(!1);if((0,D.useEffect)(()=>{r===`opening`&&Lt(`ps5upload.openIn`)===`app`&&(location.href=e)},[]),r===`browser`)return(0,z.jsx)(z.Fragment,{children:t});let s=()=>{a&&It(Vo,`app`),i(`opening`),location.href=e},c=()=>{r===`ask`&&a?It(Vo,`browser`):r===`opening`&&Lt(`ps5upload.openIn`)===`app`&&Rt(Vo),B(),i(`browser`)};return(0,z.jsx)(`div`,{className:`flex min-h-[100dvh] items-center justify-center bg-black px-6 text-white`,"data-testid":`open-in-gate`,"data-join-ui":``,children:(0,z.jsx)(`div`,{className:`w-full max-w-sm space-y-4 rounded-2xl border border-white/10 bg-neutral-900 p-6`,children:r===`ask`?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsx)(`h1`,{className:`text-lg font-semibold`,children:n(`open_in_title`,void 0,`Open in the PS5Upload app?`)}),(0,z.jsx)(`p`,{className:`text-sm text-white/60`,children:n(`open_in_body`,void 0,`Have the PS5Upload app on this device? Open this there, or carry on in the browser.`)})]}),(0,z.jsx)(`button`,{type:`button`,onClick:s,autoFocus:!0,className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black`,"data-testid":`open-in-app`,children:n(`open_in_app`,void 0,`Open in the app`)}),(0,z.jsx)(`button`,{type:`button`,onClick:c,className:`w-full rounded-full border border-white/20 py-2.5 text-sm font-semibold text-white hover:bg-white/10`,"data-testid":`open-in-browser`,children:n(`open_in_browser`,void 0,`Continue in browser`)}),(0,z.jsxs)(`label`,{className:`flex items-center justify-center gap-2 text-xs text-white/60`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:a,onChange:e=>o(e.target.checked),"data-testid":`open-in-remember`}),n(`open_in_remember`,void 0,`Remember my choice on this device`)]})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsx)(`h1`,{className:`text-lg font-semibold`,children:n(`open_in_opening`,void 0,`Opening the PS5Upload app…`)}),(0,z.jsx)(`p`,{className:`text-sm text-white/60`,children:n(`open_in_not_opened`,void 0,`Nothing happened? The app may not be on this device.`)})]}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>location.href=e,autoFocus:!0,className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black`,"data-testid":`open-in-again`,children:n(`open_in_again`,void 0,`Try again`)}),(0,z.jsx)(`button`,{type:`button`,onClick:c,className:`w-full rounded-full border border-white/20 py-2.5 text-sm font-semibold text-white hover:bg-white/10`,"data-testid":`open-in-browser`,children:n(`open_in_browser`,void 0,`Continue in browser`)})]})})})}var Go=[`a[href]`,`button:not([disabled])`,`input:not([disabled]):not([type='hidden'])`,`select:not([disabled])`,`textarea:not([disabled])`,`summary`,`[contenteditable='true']`,`[tabindex]`].map(e=>`${e}:not([tabindex='-1'])`).join(`, `),Ko=new Set,qo=[];function Jo(){for(let e of Ko)e()}function Yo(){return qo.length}function Xo(e){return qo.push(e),Jo(),()=>{let t=qo.lastIndexOf(e);t!==-1&&qo.splice(t,1),Jo()}}function Zo(e,t,n){switch(n){case`down`:return t.top-e.bottom;case`up`:return e.top-t.bottom;case`right`:return t.left-e.right;case`left`:return e.left-t.right}}function Qo(e,t,n){let r=(e.left+e.right)/2,i=(e.top+e.bottom)/2,a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;switch(n){case`down`:return o>i&&t.top>=e.top+1;case`up`:return or&&t.left>=e.left+1;case`left`:return a0?{gap:0,overlap:c}:{gap:-c,overlap:0}}function es(e,t,n){let r=null,i=1/0,a=!1;for(let o of t){if(!Qo(e,o.rect,n))continue;let t=Math.max(0,Zo(e,o.rect,n)),s=$o(e,o.rect,n),c=s.overlap>0;if(a&&!c)continue;let l=c?t-s.overlap/1e6:Math.hypot(t,2*s.gap);(c&&!a||l`u`?void 0:window){try{return!!e?.PS5UploadTv?.isTv()}catch{return!1}}function is(e=typeof document>`u`?void 0:document){return e?.documentElement.dataset.tv===`1`}function as(e,t){if(!e)return!1;if(e.closest(`[data-own-arrows]`))return!0;let n=e.tagName;if(n===`TEXTAREA`||e.isContentEditable)return!0;let r=t===`left`||t===`right`;if(n===`INPUT`){let t=(e.type||`text`).toLowerCase();if(t===`range`||ns.test(t))return r}return!1}var os=`[aria-modal="true"], [role="dialog"], [role="alertdialog"]`;function ss(e){let t=e.activeElement?.closest(os);if(t)return t;if(Yo()>0){let t=e.querySelectorAll(os);if(t.length)return t[t.length-1]}return e}function cs(e){let t=[];return e.querySelectorAll(Go).forEach(e=>{if(e.closest(`[inert], [aria-hidden='true']`)||e.disabled)return;let n=e.getBoundingClientRect();n.width<=0||n.height<=0||t.push({el:e,rect:n})}),t}function ls(e){return(e.find(e=>e.el.getAttribute(`aria-current`)===`page`)??e[0])?.el??null}function us(e,t=document){let n=ts[e.key];if(!n||e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return!1;let r=t.activeElement;if(as(r,n))return!1;let i=cs(ss(t));if(!i.length)return!1;let a=i.find(e=>e.el===r),o=a?es(a.rect,i.filter(e=>e!==a),n):ls(i);return o?(e.preventDefault(),o.focus(),typeof o.scrollIntoView==`function`&&o.scrollIntoView({block:`nearest`,inline:`nearest`}),!0):!1}var ds=!1;function fs(e){ds||(ds=!0,e.addEventListener(`keydown`,t=>void us(t,e.document)))}function ps(e=typeof window>`u`?void 0:window){e&&(rs(e)&&(e.document.documentElement.dataset.tv=`1`),fs(e))}function ms({id:e,className:t}){let n=Ie(),r=oo(e);if(r===`none`)return(0,z.jsx)(`span`,{className:t,"data-testid":`pad-8bitdo-hint`,"data-how":r,children:n(`pad_8bitdo_no_xinput`,void 0,`This 8BitDo has no X-input mode. If a button is wrong, check the controller.`)});let i=r===`switch`?n(`pad_8bitdo_how_switch`,void 0,`set the switch on the back to X, then press Start`):r===`startx`?n(`pad_8bitdo_how_startx`,void 0,`turn it off, then hold Start + X to turn it on`):r===`receiver`?n(`pad_8bitdo_how_receiver`,void 0,`use its 2.4G receiver or a USB cable`):n(`pad_8bitdo_how_manual`,void 0,`its manual says how`);return(0,z.jsx)(`span`,{className:t,"data-testid":`pad-8bitdo-hint`,"data-how":r,children:n(`pad_8bitdo_xinput`,{how:i},`For the best result, switch your 8BitDo to X-input mode: ${i}.`)})}var hs=new Set,gs={held:new Set,touch:null,touchPad:ja,mapping:!1,get paused(){return hs.size>0},motion:null},_s={s:.85,m:1,l:1.15},vs=.25;function ys(e){return typeof e!=`number`||!Number.isFinite(e)?1:Math.min(1,Math.max(vs,e))}var bs={overlay:{width:844,height:390},deck:{width:390,height:480}},xs=.7,Ss=1.4;function Cs(e,t,n,r){let i=_s[e]??1;if(!(t>0)||!(n>0))return i;let a=r?bs.deck:bs.overlay,o=Math.min(Ss,Math.max(xs,Math.min(t/a.width,n/a.height)));return Math.round(o*i*1e3)/1e3}var ws=34;function Ts(e,t){return t>0&&8+Math.max(112*e,90)+156*e+124*e+Math.max(56*e,44)+ws>t}function Es(e,t,n){let r=e/32767,i=t/32767,a=Math.hypot(r,i),o=a>1?1/a:1;return{dx:r*o*n,dy:i*o*n}}var Ds=`calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2)`,Os=32767,ks=12;function As({stream:e,layout:t=`overlay`,opacity:n=1,size:r=`m`,deckTop:i=`0px`,onMenu:a}){let o=Ie(),s=(0,D.useRef)(new Map),c=(0,D.useRef)({...ja}),[l,u]=(0,D.useState)({...ja}),[d,f]=(0,D.useState)({l:!1,r:!1,touchpad:!1}),p=(0,D.useRef)(null),[m,h]=(0,D.useState)({width:0,height:0});(0,D.useEffect)(()=>{let e=p.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect();h(e=>e.width===t.width&&e.height===t.height?e:{width:t.width,height:t.height})};if(t(),typeof ResizeObserver>`u`)return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t);let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]),(0,D.useEffect)(()=>()=>{gs.touchPad={...ja}},[]);let g=()=>{let t={...ja,touch:null},n={l:!1,r:!1,touchpad:!1};for(let e of s.current.values())e.kind===`stick`&&(n[e.which]=!0),e.kind===`touchpad`&&(n.touchpad=!0),e.kind===`button`&&(t.buttons|=e.bit),e.kind===`trigger`&&(t[e.which]=255),e.kind===`touchpad`&&e.pressed&&(t.buttons|=R.TOUCHPAD);t.lx=c.current.lx,t.ly=c.current.ly,t.rx=c.current.rx,t.ry=c.current.ry,t.touch=c.current.touch??null,gs.touchPad=t,e?.sendPad(),u(t),f(e=>e.l===n.l&&e.r===n.r&&e.touchpad===n.touchpad?e:n)},_=(e,t,n)=>{let r=Math.max(-1,Math.min(1,(t-e.cx)/e.radius)),i=Math.max(-1,Math.min(1,(n-e.cy)/e.radius));c.current[e.which===`l`?`lx`:`rx`]=Math.round(r*Os),c.current[e.which===`l`?`ly`:`ry`]=Math.round(i*Os)},v=(e,t)=>{e.preventDefault(),e.stopPropagation();let n=e.currentTarget;try{n.setPointerCapture(e.pointerId)}catch{}let r=t(n);s.current.set(e.pointerId,r),r.kind===`stick`&&_(r,e.clientX,e.clientY),r.kind===`touchpad`&&(c.current.touch=Ma((e.clientX-r.rect.left)/r.rect.width,(e.clientY-r.rect.top)/r.rect.height)),navigator.vibrate?.(8),g()},y=e=>{let t=s.current.get(e.pointerId);if(t){if(e.stopPropagation(),t.kind===`stick`)_(t,e.clientX,e.clientY);else if(t.kind===`touchpad`)c.current.touch=Ma((e.clientX-t.rect.left)/t.rect.width,(e.clientY-t.rect.top)/t.rect.height),t.pressed&&Math.hypot(e.clientX-t.x0,e.clientY-t.y0)>ks&&(t.pressed=!1);else return;g()}},b=e=>{let t=s.current.get(e.pointerId);t&&(e.stopPropagation(),s.current.delete(e.pointerId),t.kind===`stick`&&(c.current[t.which===`l`?`lx`:`rx`]=0,c.current[t.which===`l`?`ly`:`ry`]=0),t.kind===`touchpad`&&(c.current.touch=null),g())},x=e=>e.stopPropagation(),S={onPointerMove:y,onPointerUp:b,onPointerCancel:b,onClick:x,onDoubleClick:x},ee=e=>(l.buttons&e)!==0,C=e=>`border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.35)] transition-colors duration-75 ${e?`border-white bg-white/50`:`border-white/70 bg-white/10`}`,w=`text-white [text-shadow:0_1px_2px_rgba(0,0,0,0.6)]`,T={filter:`drop-shadow(0 0 1.5px rgba(0,0,0,0.5))`},E=e=>({stroke:e?`#fff`:`rgba(255,255,255,0.75)`,fill:e?`rgba(255,255,255,0.5)`:`rgba(255,255,255,0.1)`}),te=`pointer-events-auto flex touch-none select-none items-center justify-center bg-transparent p-0`,ne={minHeight:`calc(44px / var(--k))`,minWidth:`calc(44px / var(--k))`},re=(e,t,n,r)=>(0,z.jsx)(`button`,{type:`button`,"aria-label":e,onPointerDown:e=>v(e,()=>({kind:`button`,bit:t})),...S,className:`${te} ${n}`,style:ne,children:r}),ie=(e,t,n,r)=>(0,z.jsx)(`span`,{className:`flex h-[32px] w-[76px] items-center justify-center text-[13px] font-semibold tracking-wide ${w} ${C(t)}`,style:{borderRadius:r?n===`l`?`16px 9px 9px 9px`:`9px 16px 9px 9px`:`9px`},children:e}),ae=(e,t,n,r)=>re(e,t,`h-[44px] w-[84px]`,ie(e,ee(t),n,r)),oe=(e,t,n)=>(0,z.jsx)(`button`,{type:`button`,"aria-label":e,onPointerDown:e=>v(e,()=>({kind:`trigger`,which:t})),...S,className:`${te} h-[44px] w-[84px]`,style:ne,children:ie(e,l[t]>0,n,!0)}),se=(e,t,n)=>re(e,t,`h-[52px] w-[52px]`,(0,z.jsx)(`svg`,{viewBox:`0 0 52 52`,width:`52`,height:`52`,"aria-hidden":!0,style:T,children:(0,z.jsxs)(`g`,{transform:`rotate(${n} 26 26)`,strokeWidth:`1.5`,strokeLinejoin:`round`,...E(ee(t)),children:[(0,z.jsx)(`path`,{d:`M10 9 Q10 3 16 3 L36 3 Q42 3 42 9 L42 30 Q42 34.5 38.5 38 L29.5 47 Q26 50.5 22.5 47 L13.5 38 Q10 34.5 10 30 Z`}),(0,z.jsx)(`path`,{d:`M20.5 23 L26 17 L31.5 23`,fill:`none`,stroke:`#fff`,strokeLinecap:`round`,strokeWidth:`1.8`})]})})),ce=(e,t,n)=>re(e,t,`h-[52px] w-[52px]`,(0,z.jsxs)(`svg`,{viewBox:`0 0 52 52`,width:`52`,height:`52`,"aria-hidden":!0,style:T,children:[(0,z.jsx)(`circle`,{cx:`26`,cy:`26`,r:`22.5`,strokeWidth:`1.5`,...E(ee(t))}),(0,z.jsx)(`g`,{fill:`none`,stroke:`#fff`,strokeWidth:`1.8`,strokeLinejoin:`round`,strokeLinecap:`round`,children:n})]})),le=(e,t)=>re(e,t,`h-[44px] min-w-[64px] px-[4px]`,(0,z.jsx)(`span`,{className:`flex h-[24px] items-center rounded-full px-[10px] text-[10px] font-semibold uppercase tracking-wider ${w} ${C(ee(t))}`,children:e})),ue=(e,t)=>re(e,t,`h-[44px] w-[44px]`,(0,z.jsx)(`span`,{className:`flex h-[36px] w-[36px] items-center justify-center rounded-full text-[11px] font-bold ${w} ${C(ee(t))}`,children:e})),de=e=>{let{dx:t,dy:n}=Es(e===`l`?l.lx:l.rx,e===`l`?l.ly:l.ry,34),r=d[e];return(0,z.jsx)(`div`,{"aria-label":e===`l`?o(`rp_touch_left_stick`,void 0,`Left stick`):o(`rp_touch_right_stick`,void 0,`Right stick`),onPointerDown:t=>v(t,t=>{let n=t.getBoundingClientRect();return{kind:`stick`,which:e,cx:n.left+n.width/2,cy:n.top+n.height/2,radius:n.width/2}}),...S,className:`pointer-events-auto relative h-[124px] w-[124px] touch-none rounded-full border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.3)] transition-colors duration-75 ${r?`border-white/80 bg-white/[0.12]`:`border-white/45 bg-white/[0.05]`}`,children:(0,z.jsx)(`div`,{className:`absolute left-1/2 top-1/2 h-[54px] w-[54px] rounded-full ${C(r)}`,style:{transform:`translate(calc(-50% + ${t}px), calc(-50% + ${n}px))`}})})},O=t===`deck`,fe=Cs(r,m.width,m.height,O),pe=e=>`${e}px * var(--k)`,k=`max(12px, env(safe-area-inset-left))`,me=`max(12px, env(safe-area-inset-right))`,he=`max(12px, env(safe-area-inset-bottom))`,ge=O?`8px`:t===`overlay-bar`?`3.5rem`:`max(10px, env(safe-area-inset-top))`,_e=(e,t,n=0)=>t?n?`calc(${e} + max(${pe(t)}, ${n}px))`:`calc(${e} + ${pe(t)})`:e,ye=(e,t)=>({position:`absolute`,...t,transform:`scale(var(--k))`,transformOrigin:e}),be=O&&Ts(fe,m.height),A=O?void 0:`58%`,j=e=>O?{top:_e(ge,be?96:112,be?72:90),[e]:e===`left`?k:me}:{top:A,translate:`0 -50%`,[e]:e===`left`?k:me},xe=e=>({bottom:be?he:_e(he,O?56:0,44),[e]:be?`calc(${e===`left`?k:me} + 8px + max(${pe(80)}, 44px))`:_e(e===`left`?k:me,O?40:168)}),Se=!!a&&!O;return(0,z.jsxs)(`div`,{ref:p,className:`pointer-events-none absolute z-10 select-none [-webkit-touch-callout:none] ${O?`inset-x-0 bottom-0`:`inset-0`}`,style:{top:O?i:void 0,"--k":fe},"data-testid":`rp-touch`,"data-layout":t,"data-scale":fe,onContextMenu:e=>e.preventDefault(),children:[(0,z.jsxs)(`div`,{className:`absolute inset-0`,style:{opacity:ys(n)},children:[(0,z.jsx)(`div`,{style:ye(`top left`,{top:ge,left:k}),children:(0,z.jsxs)(`div`,{className:`ms-[8px] flex flex-col`,style:{rotate:O?void 0:`6deg`,transformOrigin:`top left`},children:[oe(`L2`,`l2`,`l`),ae(`L1`,R.L1,`l`,!1)]})}),(0,z.jsx)(`div`,{style:ye(`top right`,{top:ge,right:me}),children:(0,z.jsxs)(`div`,{className:`me-[8px] flex flex-col items-end`,style:{rotate:O?void 0:`-6deg`,transformOrigin:`top right`},children:[oe(`R2`,`r2`,`r`),ae(`R1`,R.R1,`r`,!1)]})}),(0,z.jsx)(`div`,{"aria-label":o(`rp_touch_touchpad`,void 0,`Touchpad`),onPointerDown:e=>v(e,t=>({kind:`touchpad`,rect:t.getBoundingClientRect(),x0:e.clientX,y0:e.clientY,pressed:!0})),...S,className:`pointer-events-auto absolute touch-none rounded-2xl border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.3)] transition-colors duration-75 ${d.touchpad?`border-white/80 bg-white/25`:`border-white/40 bg-white/[0.05]`}`,style:O?{top:_e(ge,6),left:_e(k,104),right:_e(me,104),height:`max(44px, calc(${pe(64)}))`}:{top:ge,left:`50%`,translate:`-50% 0`,width:`min(calc(${pe(250)}), 34vw)`,height:`max(44px, calc(${pe(56)}))`}}),(0,z.jsxs)(`div`,{className:`grid grid-cols-3 grid-rows-3`,style:ye(O?`top left`:`left center`,j(`left`)),children:[(0,z.jsx)(`span`,{}),se(`↑`,R.UP,0),(0,z.jsx)(`span`,{}),se(`←`,R.LEFT,-90),(0,z.jsx)(`span`,{}),se(`→`,R.RIGHT,90),(0,z.jsx)(`span`,{}),se(`↓`,R.DOWN,180),(0,z.jsx)(`span`,{})]}),(0,z.jsxs)(`div`,{className:`grid grid-cols-3 grid-rows-3`,style:ye(O?`top right`:`right center`,j(`right`)),children:[(0,z.jsx)(`span`,{}),ce(`△`,R.TRIANGLE,(0,z.jsx)(`path`,{d:`M26 16.5 L35 32 L17 32 Z`})),(0,z.jsx)(`span`,{}),ce(`□`,R.SQUARE,(0,z.jsx)(`rect`,{x:`18`,y:`18`,width:`16`,height:`16`,rx:`1`})),(0,z.jsx)(`span`,{}),ce(`○`,R.CIRCLE,(0,z.jsx)(`circle`,{cx:`26`,cy:`26`,r:`8.5`})),(0,z.jsx)(`span`,{}),ce(`✕`,R.CROSS,(0,z.jsx)(`path`,{d:`M19 19 L33 33 M33 19 L19 33`})),(0,z.jsx)(`span`,{})]}),(0,z.jsx)(`div`,{style:ye(`bottom left`,xe(`left`)),children:de(`l`)}),(0,z.jsx)(`div`,{style:ye(`bottom right`,xe(`right`)),children:de(`r`)}),(0,z.jsx)(`div`,{style:ye(`bottom left`,{bottom:he,left:k}),children:le(`Create`,R.SHARE)}),(0,z.jsx)(`div`,{style:ye(`bottom right`,{bottom:he,right:me}),children:le(`Options`,R.OPTIONS)}),(0,z.jsx)(`div`,{style:ye(`bottom center`,{bottom:be?_e(he,124,88):_e(he,Se?48:0,48),left:Ds,translate:`-50% 0`}),children:ue(`PS`,R.PS)})]}),Se&&(0,z.jsx)(`div`,{style:{...ye(`bottom center`,{bottom:he,left:`calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2)`,translate:`-50% 0`}),opacity:Math.max(.7,ys(n))},children:(0,z.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),a?.()},onDoubleClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),"aria-label":o(`rp_menu`,void 0,`Menu`),"aria-haspopup":`dialog`,className:`${te} h-[44px] w-[56px]`,style:ne,"data-testid":`rp-menu-handle`,children:(0,z.jsx)(`span`,{className:`flex h-[26px] w-[44px] items-center justify-center rounded-full ${w} ${C(!1)}`,children:(0,z.jsx)(ve,{size:15,strokeWidth:2,"aria-hidden":!0})})})})]})}var js=`data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAYZbW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAfQAAAfQAAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAmt0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAfQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAABAAAAAQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAH0AAAAAAAABAAAAAAHjbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAABAAAABAABVxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAABjm1pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAU5zdGJsAAAAunN0c2QAAAAAAAAAAQAAAKphdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABAAEABIAAAASAAAAAAAAAABFExhdmM2My4xLjEwMiBsaWJ4MjY0AAAAAAAAAAAAAAAAGP//AAAAMGF2Y0MBQsAK/+EAF2dCwAqmEXsBEAAAAwAQAAADACDxImEYAQAGaMhCAZSyAAAAEHBhc3AAAAABAAAAAQAAABRidHJ0AAAAAAAABUAAAAAAAAAAGHN0dHMAAAAAAAAAAQAAAAQAAEAAAAAAFHN0c3MAAAAAAAAAAQAAAAEAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAJHN0c3oAAAAAAAAAAAAAAAQAAAKCAAAACgAAAAoAAAAKAAAAIHN0Y28AAAAAAAAABAAABlwAAAj+AAAJKAAACVIAAALZdHJhawAAAFx0a2hkAAAAAwAAAAAAAAAAAAAAAgAAAAAAAH0AAAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAB9AAAABAAAAQAAAAACUW1kaWEAAAAgbWRoZAAAAAAAAAAAAAAAAAAAH0AAAIEAVcQAAAAAAC1oZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU291bmRIYW5kbGVyAAAAAfxtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAcBzdGJsAAAAfnN0c2QAAAAAAAAAAQAAAG5tcDRhAAAAAAAAAAEAAAAAAAAAAAABABAAAAAAH0AAAAAAADZlc2RzAAAAAAOAgIAlAAIABICAgBdAFQAAAAAAH0AAAAEcBYCAgAUViFblAAaAgIABAgAAABRidHJ0AAAAAAAAH0AAAAEcAAAAIHN0dHMAAAAAAAAAAgAAACAAAAQAAAAAAQAAAQAAAAAoc3RzYwAAAAAAAAACAAAAAQAAAAEAAAABAAAAAgAAAAgAAAABAAAAmHN0c3oAAAAAAAAAAAAAACEAAAATAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAkc3RjbwAAAAAAAAAFAAAGSQAACN4AAAkIAAAJMgAACVwAAAAac2dwZAEAAAByb2xsAAAAAgAAAAH//wAAABxzYmdwAAAAAHJvbGwAAAABAAAAIQAAAAEAAABhdWR0YQAAAFltZXRhAAAAAAAAACFoZGxyAAAAAAAAAABtZGlyYXBwbAAAAAAAAAAAAAAAACxpbHN0AAAAJKl0b28AAAAcZGF0YQAAAAEAAAAATGF2ZjYzLjEuMTAyAAAACGZyZWUAAAM7bWRhdNwATGF2YzYzLjEuMTAyAAIwQA4AAAJvBgX//2vcRem95tlIt5Ys2CDZI+7veDI2NCAtIGNvcmUgMTY1IHIzMjIyIGIzNTYwNWEgLSBILjI2NC9NUEVHLTQgQVZDIGNvZGVjIC0gQ29weWxlZnQgMjAwMy0yMDI1IC0gaHR0cDovL3d3dy52aWRlb2xhbi5vcmcveDI2NC5odG1sIC0gb3B0aW9uczogY2FiYWM9MCByZWY9MTYgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDEzMSBtZT11bWggc3VibWU9MTAgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0yNCBjaHJvbWFfbWU9MSB0cmVsbGlzPTIgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz0xIGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTQga2V5aW50X21pbj0xIHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NCByYz1jcmYgbWJ0cmVlPTEgY3JmPTUxLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IGlwX3JhdGlvPTEuNDAgYXE9MToxLjAwAIAAAAALZYiCAv5MUAAQv8ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmhwF/UABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmioBb1ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmjsBX1ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBw==`,Ms=null,Ns=null;function Ps(e){e.play().catch(()=>{if(Ns||Ms!==e)return;let t=()=>{Fs(),Ms===e&&e.play().catch(()=>{})};window.addEventListener(`pointerdown`,t,{capture:!0}),Ns=()=>window.removeEventListener(`pointerdown`,t,{capture:!0})})}function Fs(){Ns?.(),Ns=null}function Is(){if(typeof document<`u`){if(!Ms){let e=document.createElement(`video`);e.muted=!0,e.loop=!0,e.playsInline=!0,e.setAttribute(`playsinline`,``),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`data-testid`,`keep-screen-video`),e.style.cssText=`position:fixed;left:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none`,e.src=js,document.body.appendChild(e),Ms=e}Ps(Ms)}}function Ls(){Fs(),Ms&&=(Ms.pause(),Ms.removeAttribute(`src`),Ms.remove(),null)}function Rs(){return typeof navigator>`u`?null:navigator.wakeLock??null}function zs(){return dt()||!Pn()}var Bs=new Set,Vs=null,Hs=Promise.resolve(),Us=!1;async function Ws(){if(Bs.size===0||Vs&&!Vs.released)return;let e=Rs();if(!e)dt()&&Is();else try{let t=await e.request(`screen`);t.addEventListener(`release`,()=>{Vs===t&&(Vs=null)}),Vs=t}catch{}}async function Gs(){Ls();let e=Vs;if(Vs=null,e&&!e.released)try{await e.release()}catch{}}function Ks(){Us||typeof document>`u`||(Us=!0,document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&Bs.size>0&&(Hs=Hs.then(Ws))}))}function qs(e,t){if(!zs())return;Ks();let n=Bs.size>0;t?Bs.add(e):Bs.delete(e);let r=Bs.size>0;n!==r&&(Hs=Hs.then(r?Ws:Gs))}var Js=new Set;function Ys(){if(typeof window<`u`)return window.PS5UploadPad}function Xs(e,t){let n=Js.size>0;t?Js.add(e):Js.delete(e);let r=Js.size>0;if(n!==r)try{Ys()?.setActive(r)}catch{}}var Zs=class e{constructor(e){this.receiver=e,this.last=null,this.was={}}get frames(){return Number(this.last?.frames??0)}static report(e,t){let n=t=>e[t]??0,r=e=>n(e)-(t[e]??0),i=(e,t)=>r(t)>0?Math.round(r(e)/r(t)*1e4)/10:0;return{frames:n(`framesDecoded`),dropped:n(`framesDropped`),stalls:n(`freezeCount`),stall_ms:Math.round(n(`totalFreezesDuration`)*1e3),decode_ms:i(`totalDecodeTime`,`framesDecoded`),jitter_ms:i(`jitterBufferDelay`,`jitterBufferEmittedCount`),nacks:n(`nackCount`),plis:n(`pliCount`),decoder:`track`}}snapshot(){return this.receiver.getStats().then(t=>{t.forEach(t=>{t.type===`inbound-rtp`&&t.kind===`video`&&(this.last=e.report(t,this.was),this.was={...t})})}).catch(()=>{}),this.last}},Qs=class{constructor(e){this.inner=e,this.video=document.createElement(`video`),this.wrap=document.createElement(`div`),this.media=null,this.trackStats=null,this.audio=!1,this.soundOn=!1,this.muted=!1;let t=this.video;t.muted=t.autoplay=t.playsInline=!0,t.className=`block h-full w-full object-contain`,t.dataset.testid=`track-video`,this.wrap.className=`h-full w-full`,this.wrap.append(t,e.element),this.setTrack(null)}get element(){return this.wrap}get stats(){return this.trackStats??this.inner.stats}setTrack(e,t=!1){this.media=e,this.audio=!!e&&t,this.applySound(),this.trackStats=e?new Zs(e.receiver):null,this.video.style.display=e?``:`none`,this.inner.element.style.display=e?`none`:``,this.video.srcObject!==(e?.stream??null)&&(this.video.srcObject=e?.stream??null),e&&this.play()}play(){try{this.video.play()?.catch?.(()=>{})}catch{}}onMessage(e){let t=new Uint8Array(e)[0];this.media&&t<=1||(!this.audio||t!==3&&t!==4)&&this.inner.onMessage(e)}applySound(){this.video.muted=!(this.audio&&this.soundOn&&!this.muted)}setHevc(e){this.inner.setHevc(e)}set onSoundFail(e){this.inner.onSoundFail=e}soundReport(){return this.inner.soundReport()}startSound(){this.inner.startSound(),this.soundOn=!0,this.applySound(),this.media&&this.play()}setMuted(e){this.inner.setMuted(e),this.muted=e,this.applySound()}resumeSound(){this.inner.resumeSound(),this.media&&this.video.paused&&this.play()}stop(){this.inner.stop(),this.video.srcObject=null}},$s=`ps5upload.join.muted`,ec=5e3,tc=Object.fromEntries(Object.entries(Na).filter(([e])=>e!==`Escape`)),nc=new Set;function rc(e){if(!(e.code in tc)||e.ctrlKey||e.metaKey||e.altKey)return!1;let t=e.target;if(e.code===`Tab`&&(e.shiftKey||ic(t)))return!1;let n=t?.tagName;return!(n===`INPUT`||n===`TEXTAREA`||n===`SELECT`||t?.isContentEditable||ic(t))}function ic(e){let t=e?.tagName;if(t===`BUTTON`||t===`A`)return!0;let n=e?.getAttribute?.(`role`);return n===`button`||n===`link`||n===`menuitem`||n===`tab`||n===`switch`}var ac=!1;function oc(e){ac=e}function sc(e,t,n=null){if(!e||e.frames===0&&!t)return null;let r=e.snapshot();return r&&{...r,...t?{problem:t}:{},...n??{}}}function cc(){if(ac)return{...ja};let e=Ga(Xa(typeof navigator>`u`?void 0:navigator),So),t=gs.touchPad;return{...Ka(Ka(e,Fa(nc,tc)),t),touch:t.touch??null,motion:gs.motion??null}}var lc=class{constructor(e){this.opts=e,this.player=null,this.listeners=new Set,this.cleanups=[],this.subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e)),this.snap={stage:{kind:`connecting`},status:null,rttMs:null,light:null,problem:null,sound:!1,noSound:!1,host:e.host,muted:dc(),path:null},this.client=new zo({url:e.url,invite:e.invite,code:e.code??null,name:e.name,WebSocketImpl:e.transport,readPad:cc,onStage:e=>{this.set({stage:e}),e.kind===`joined`&&this.readPath(),(e.kind===`refused`||e.kind===`ended`)&&this.teardown()},onStatus:e=>this.set({status:e,host:e.host??this.snap.host}),onRtt:e=>this.set({rttMs:e}),onFrame:e=>this.picture().onMessage(e),readStats:()=>sc(this.player?.stats??null,this.snap.problem,this.player?.soundReport()??null),onCodec:(e,t,n)=>{let r=this.picture();r.setHevc(e),r instanceof Qs&&(r.setTrack(t,!!n),t&&this.snap.problem&&this.set({problem:null}))},onRumble:(e,t)=>{let n=Xa(typeof navigator>`u`?void 0:navigator);qa(n,e,t),n.some(e=>e?.connected)||navigator.vibrate?.(e||t?200:0)},onLight:e=>this.set({light:e})})}picture(){if(!this.player){let e=oa(e=>this.set({problem:e}),`player`,()=>this.client.askKeyframe());this.player=this.opts.transport?new Qs(e):e,this.player.onSoundFail=()=>this.set({noSound:!0}),this.player.setMuted(this.snap.muted)}return this.player}async readPath(){let e=this.client.socket,t=this.opts.path??null;if(e?.netPath)try{t=await e.netPath()??this.opts.path??null}catch{t=null}t!==this.snap.path&&this.set({path:t})}get element(){return this.picture().element}start(){let e=()=>{document.visibilityState===`hidden`?nc.clear():this.player?.resumeSound(),this.client.setNeutral(document.visibilityState===`hidden`)},t=()=>{nc.clear(),this.client.setNeutral(!0)},n=e=>{this.client.current.kind===`joined`&&rc(e)&&(!this.opts.keysLive||this.opts.keysLive())&&(e.preventDefault(),nc.add(e.code))},r=e=>{nc.delete(e.code)&&rc(e)&&e.preventDefault()};window.addEventListener(`keydown`,n),window.addEventListener(`keyup`,r);let i=()=>{this.client.setNeutral(document.visibilityState===`hidden`),document.visibilityState!==`hidden`&&this.player?.resumeSound()};document.addEventListener(`visibilitychange`,e),window.addEventListener(`blur`,t),window.addEventListener(`focus`,i);let a=setInterval(()=>{this.client.current.kind===`joined`&&this.readPath()},ec);this.cleanups.push(()=>{clearInterval(a),document.removeEventListener(`visibilitychange`,e),window.removeEventListener(`blur`,t),window.removeEventListener(`focus`,i),window.removeEventListener(`keydown`,n),window.removeEventListener(`keyup`,r),nc.clear()}),this.client.start()}setMuted(e){this.player?.setMuted(e);try{localStorage.setItem($s,e?`1`:`0`)}catch{}this.set({muted:e})}startSound(){this.snap.sound||(this.picture().startSound(),this.set({sound:!0}))}leave(){this.client.leave(),this.teardown()}stop(){this.client.stop(),this.teardown()}teardown(){for(let e of this.cleanups.splice(0))e();gs.touchPad={buttons:0,l2:0,r2:0,lx:0,ly:0,rx:0,ry:0};let e=this.player;this.player=null,e&&(e.stop(),e.element.remove())}sendPad(){this.client.sendPad(!1)}get snapshot(){return this.snap}set(e){this.snap={...this.snap,...e};for(let e of this.listeners)e()}};function uc(e){return(0,D.useSyncExternalStore)(e.subscribe,()=>e.snapshot)}function dc(){try{return typeof localStorage<`u`&&localStorage.getItem($s)===`1`}catch{return!1}}function fc(e){let t=()=>{let t=e.snapshot.stage.kind,n=t!==`refused`&&t!==`ended`;qs(`play-together`,n),Xs(`play-together`,n)};t();let n=e.subscribe(t);return()=>{n(),qs(`play-together`,!1),Xs(`play-together`,!1)}}var pc=3e3,mc=class{constructor(e,t=pc){this.onChange=e,this.delay=t,this.enabled=!1,this.pinned=!1,this.sticky=!1,this.shown=!0,this.timer=null}get visible(){return!this.enabled||this.pinned||this.shown}set(e,t,n=!1){let r=this.enabled&&!this.pinned,i=this.enabled,a=this.sticky;this.enabled=e,this.pinned=t,this.sticky=n,!e||t?(this.stop(),this.show(!0)):n?(this.stop(),!i||!a?this.show(!1):r||this.show(!0)):(!r||a)&&(this.show(!0),this.arm())}poke(){this.show(!0),this.enabled&&!this.pinned&&!this.sticky&&this.arm()}toggle(){this.visible?this.hide():this.poke()}hide(){this.enabled&&!this.pinned&&(this.stop(),this.show(!1))}dispose(){this.stop()}arm(){this.stop(),this.timer=setTimeout(()=>{this.timer=null,this.show(!1)},this.delay)}stop(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}show(e){this.shown!==e&&(this.shown=e,this.onChange(e))}};function hc(e,t,n=!1){let[r,i]=(0,D.useState)(!0),a=(0,D.useRef)(null);(0,D.useEffect)(()=>{let e=new mc(i);return a.current=e,()=>{e.dispose(),a.current=null}},[]),(0,D.useEffect)(()=>{a.current?.set(e,t,n)},[e,t,n]);let o=(0,D.useCallback)(()=>a.current?.poke(),[]),s=(0,D.useCallback)(()=>a.current?.hide(),[]),c=(0,D.useCallback)(()=>a.current?.toggle(),[]);return{shown:!e||t||r,poke:o,hide:s,toggle:c}}var gc=3e4,_c=class{constructor(e,t=gc){this.onChange=e,this.ms=t,this.picking=!1,this.over=!1,this.timer=null}get shown(){return this.picking&&!this.over}set(e){e!==this.picking&&(this.picking=e,this.over=!1,this.stop(),e&&(this.timer=setTimeout(()=>{this.timer=null,this.over=!0,this.onChange()},this.ms)))}stop(){this.timer&&clearTimeout(this.timer),this.timer=null}reset(){this.stop(),this.picking=!1,this.over=!1}};function vc(e){let[,t]=(0,D.useState)(0),[n]=(0,D.useState)(()=>new _c(()=>t(e=>e+1)));return(0,D.useEffect)(()=>{n.set(e),t(e=>e+1)},[n,e]),(0,D.useEffect)(()=>()=>n.reset(),[n]),n.shown}var yc=()=>Xa(typeof navigator>`u`?void 0:navigator).filter(e=>!!e?.connected);function bc(e,t){if(t.kind===`axis`)return t.which===`lx`?e(`rp_pad_step_lx`,void 0,`Push the left stick right`):t.which===`ly`?e(`rp_pad_step_ly`,void 0,`Push the left stick down`):t.which===`rx`?e(`rp_pad_step_rx`,void 0,`Push the right stick right`):e(`rp_pad_step_ry`,void 0,`Push the right stick down`);if(t.kind===`button`){if(t.bit===R.CROSS)return e(`join_check_bottom`,void 0,`Press the bottom face button (✕)`);if(t.bit===R.CIRCLE)return e(`join_check_right`,void 0,`Press the right face button (○)`);if(t.bit===R.SQUARE)return e(`join_check_left`,void 0,`Press the left face button (□)`);if(t.bit===R.TRIANGLE)return e(`join_check_top`,void 0,`Press the top face button (△)`)}return e(`rp_pad_press`,{name:t.name},`Press ${t.name}`)}function xc(e,t){let n=(0,D.useRef)(t);(0,D.useEffect)(()=>{n.current=t}),(0,D.useEffect)(()=>{if(e===null)return;let t=0,r=()=>{n.current(yc().find(t=>t.index===e)??null),t=window.requestAnimationFrame(r)};return t=window.requestAnimationFrame(r),()=>window.cancelAnimationFrame(t)},[e])}var Sc=[[R.CROSS,`✕`],[R.CIRCLE,`○`],[R.SQUARE,`□`],[R.TRIANGLE,`△`],[R.UP,`↑`],[R.DOWN,`↓`],[R.LEFT,`←`],[R.RIGHT,`→`],[R.L1,`L1`],[R.R1,`R1`],[R.L3,`L3`],[R.R3,`R3`],[R.SHARE,`Create`],[R.OPTIONS,`Options`],[R.PS,`PS`],[R.TOUCHPAD,`Touchpad`]];function Cc({pad:e}){let t=e=>`flex h-8 min-w-8 items-center justify-center rounded-md px-1.5 text-xs font-medium ${e?`bg-white text-black`:`bg-white/10 text-white/70`}`,n=(e,t,n)=>(0,z.jsxs)(`span`,{className:`relative flex h-12 w-12 items-center justify-center rounded-full bg-white/10 text-[10px] text-white/50`,children:[n,(0,z.jsx)(`span`,{className:`absolute h-3 w-3 rounded-full bg-white`,style:{left:`calc(50% + ${e/32767*18}px - 6px)`,top:`calc(50% + ${t/32767*18}px - 6px)`}})]});return(0,z.jsxs)(`div`,{className:`space-y-2`,"data-testid":`join-pad-test`,"data-buttons":e.buttons,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[Sc.map(([n,r])=>(0,z.jsx)(`span`,{className:t((e.buttons&n)!==0),"data-on":(e.buttons&n)===0?`0`:`1`,children:r},n)),(0,z.jsx)(`span`,{className:t(e.l2>30),children:`L2`}),(0,z.jsx)(`span`,{className:t(e.r2>30),children:`R2`})]}),(0,z.jsxs)(`div`,{className:`flex gap-3`,children:[n(e.lx,e.ly,`L`),n(e.rx,e.ry,`R`)]})]})}function wc({onClose:e}){let t=Ie(),[n,r]=(0,D.useState)(()=>yc().map(e=>({index:e.index,id:e.id}))),[i,a]=(0,D.useState)(()=>yc()[0]?.index??null),[o,s]=(0,D.useState)(ja),[c,l]=(0,D.useState)(null),[u,d]=(0,D.useState)(0),[f,p]=(0,D.useState)(yo),[m,h]=(0,D.useState)(null),[g,_]=(0,D.useState)(null),v=(0,D.useRef)(null);(0,D.useEffect)(()=>(oc(!0),()=>oc(!1)),[]),(0,D.useEffect)(()=>{(v.current?.querySelector(`[data-testid="join-pad-learn-start"]`)??v.current?.querySelector(`[data-testid="join-pad-check-close"]`))?.focus({preventScroll:!0})},[]),(0,D.useEffect)(()=>{let e=document.activeElement;e&&e!==document.body||v.current?.querySelector(`button:not([disabled])`)?.focus({preventScroll:!0})},[c,u]),(0,D.useEffect)(()=>{let e=()=>{let e=yc();r(t=>t.length===e.length&&t.every((t,n)=>t.id===e[n].id&&t.index===e[n].index)?t:e.map(e=>({index:e.index,id:e.id}))),a(t=>t!==null&&e.some(e=>e.index===t)?t:e[0]?.index??null)},t=window.setInterval(e,500);return window.addEventListener(`gamepadconnected`,e),window.addEventListener(`gamepaddisconnected`,e),()=>{window.clearInterval(t),window.removeEventListener(`gamepadconnected`,e),window.removeEventListener(`gamepaddisconnected`,e)}},[]),xc(i,e=>{if(_(t=>t?.id===e?.id?t:e),!e)return;if(c){c.feed(Eo(e))&&y(c,e);return}let t=Ga([e],So);s(e=>e.buttons===t.buttons&&e.l2===t.l2&&e.r2===t.r2&&e.lx===t.lx&&e.ly===t.ly&&e.rx===t.rx&&e.ry===t.ry?e:t)});let y=(e,n)=>{if(!e.done)return d(e.step);let r=n?.id??g?.id;l(null),r&&(p(bo(r,e.profile(n?wo(n):void 0))),h(t(`join_check_saved`,void 0,`Saved for this controller on this device. Try it below.`)))},b=()=>{h(null),d(0),l(new Fo(No))},x=g,S=x?Co(x):null,ee=!!(x&&f[x.id]);return(0,z.jsx)(`div`,{ref:v,role:`dialog`,"aria-modal":`true`,"aria-label":t(`join_check_title`,void 0,`Check your controller`),className:`absolute inset-0 z-40 flex items-center justify-center bg-black/70 p-4 backdrop-blur-sm`,"data-testid":`join-pad-check`,onPointerDown:e=>e.stopPropagation(),children:(0,z.jsxs)(`div`,{className:`w-[min(26rem,100%)] space-y-3 rounded-2xl border border-white/10 bg-neutral-900/95 p-4 text-sm text-white shadow-2xl`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(me,{size:16,className:`text-white/70`}),(0,z.jsx)(`p`,{className:`flex-1 font-semibold`,children:t(`join_check_title`,void 0,`Check your controller`)}),(0,z.jsx)(`button`,{type:`button`,onClick:e,"aria-label":t(`join_done`,void 0,`Done`),className:`flex h-8 w-8 items-center justify-center rounded-full bg-white/10 hover:bg-white/20`,"data-testid":`join-pad-check-close`,children:(0,z.jsx)(De,{size:15})})]}),x?(0,z.jsxs)(z.Fragment,{children:[n.length>1&&(0,z.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:n.map(e=>(0,z.jsx)(`button`,{type:`button`,disabled:!!c,onClick:()=>a(e.index),className:`rounded-full px-2.5 py-1 text-xs ${e.index===i?`bg-white text-black`:`bg-white/10`}`,children:to(e.id)},`${e.index}-${e.id}`))}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`truncate font-medium`,"data-testid":`join-pad-check-name`,children:to(x.id)}),(0,z.jsx)(`p`,{className:`text-xs text-white/60`,"data-testid":`join-pad-check-kind`,"data-kind":S??``,children:S===`saved`?t(`rp_pad_mapped`,void 0,`Plays with your mapping`):S===`guess`?t(`join_check_unknown`,void 0,`This controller isn't on our list, so its buttons may be mixed up. Setting it up takes a few seconds.`):t(`rp_pad_standard`,void 0,`Recognized`)}),io(x)&&(0,z.jsx)(ms,{id:x.id,className:`mt-1 block text-xs text-amber-200/90`})]}),c?(0,z.jsxs)(`div`,{className:`space-y-3`,"data-testid":`join-pad-learn`,children:[(0,z.jsx)(`p`,{className:`text-xs text-white/60`,children:t(`rp_pad_progress`,{n:u+1,total:c.steps.length},`${u+1} of ${c.steps.length}`)}),(0,z.jsx)(`p`,{className:`text-lg font-semibold`,"data-testid":`join-pad-learn-step`,children:c.current?bc(t,c.current):``}),(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:()=>{c.skip(),y(c,x)},className:`rounded-full bg-white/15 px-3 py-1.5 text-xs hover:bg-white/25`,"data-testid":`join-pad-learn-skip`,children:t(`rp_pad_skip`,void 0,`Skip`)}),u>0&&(0,z.jsx)(`button`,{type:`button`,onClick:()=>{c.back(),d(c.step)},className:`rounded-full bg-white/15 px-3 py-1.5 text-xs hover:bg-white/25`,children:t(`rp_pad_back`,void 0,`Back`)}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>l(null),className:`rounded-full px-3 py-1.5 text-xs text-white/70 hover:bg-white/10`,children:t(`rp_pad_cancel`,void 0,`Cancel`)})]})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`text-xs text-white/60`,children:t(`join_check_try`,void 0,`Press buttons and move the sticks: what you press lights up.`)}),(0,z.jsx)(Cc,{pad:o}),m&&(0,z.jsx)(`p`,{className:`text-xs text-emerald-300`,role:`status`,children:m}),(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:b,className:`rounded-full bg-white px-3 py-1.5 text-xs font-medium text-black`,"data-testid":`join-pad-learn-start`,children:ee?t(`join_check_redo`,void 0,`Redo`):t(`join_check_map`,void 0,`Set up the buttons`)}),ee&&(0,z.jsx)(`button`,{type:`button`,onClick:()=>{p(bo(x.id,null)),h(null)},className:`rounded-full bg-white/15 px-3 py-1.5 text-xs hover:bg-white/25`,"data-testid":`join-pad-reset`,children:t(`rp_pad_reset`,void 0,`Reset`)}),(0,z.jsx)(`button`,{type:`button`,onClick:e,className:`rounded-full bg-white/15 px-3 py-1.5 text-xs hover:bg-white/25`,"data-testid":`join-pad-check-done`,children:t(`join_done`,void 0,`Done`)})]})]})]}):(0,z.jsx)(`p`,{className:`text-white/70`,children:t(`rp_pads_none`,void 0,`No controller seen yet. Connect one and press any button on it.`)})]})})}function Tc(e,t){let[n,r]=(0,D.useState)(!1);return(0,D.useEffect)(()=>{if(!e||!t)return;let n=!0;return Be(e,Le).then(e=>{n&&!e&&r(!0)}),()=>{n=!1}},[e,t]),n}function Ec({href:e}){let t=Ie();return(0,z.jsxs)(`div`,{className:`flex flex-col items-center gap-3 text-center`,"data-testid":`open-on-wifi`,children:[(0,z.jsx)(`p`,{className:`max-w-sm text-sm text-white/60`,children:t(`join_open_lan_body`,void 0,`Can't reach the internet? If you're on the same Wi-Fi as your friend, open the game there.`)}),(0,z.jsx)(`a`,{href:e,rel:`noreferrer`,className:`rounded-full bg-white px-4 py-2 text-sm font-medium text-black`,"data-testid":`open-on-wifi-link`,children:t(`join_open_lan`,void 0,`Open on this Wi-Fi`)})]})}function Dc(e){let t=Math.max(0,Math.ceil(e));return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`}var Oc=`ps5upload.join.guided`,kc=1;function Ac(e){return e.player!==kc&&(!e.guided||e.movedOff)&&!e.reconnecting}function jc(e,t){switch(t){case`lan`:return e(`join_path_lan`,void 0,`Home network`);case`tailscale`:return e(`join_path_tailscale`,void 0,`Tailscale`);default:return e(`join_path_internet`,void 0,`Internet`)}}function Mc(e,t){return e(`join_seat_taken`,{host:t},`${t} needed their controller back and no other controller was free on the PS5, so you're out of the game. Ask ${t} to let you in again.`)}function Nc(e,t,n,r=!1){if(t.kind===`refused`)switch(t.why){case`key`:return e(`join_refused_key`,{host:n},`This invite has expired. Ask ${n} for a new link.`);case`expired`:return e(`join_refused_expired`,{host:n},`Your place in the game was lost. Ask ${n} to let you in again.`);case`full`:return e(`join_refused_full`,void 0,`The game is full: four players already.`);case`denied`:return e(`join_refused_denied`,{host:n},`${n} didn't let you in this time.`);case`no_answer`:return e(`join_refused_no_answer`,{host:n},`${n} didn't answer in time. Tell ${n}, then try again.`);case`closed`:return e(`join_refused_closed`,{host:n},`${n} isn't hosting Play Together right now.`);case`old_helper`:return e(`join_refused_old_helper`,{host:n},`${n}'s PS5 needs an updated helper for Play Together.`);case`not_playing`:return e(`join_refused_not_playing`,{host:n},`${n} isn't playing right now. Ask ${n} to start Play first.`);case`unreachable`:return e(`join_refused_unreachable`,{host:n},`${n}'s computer couldn't reach their PS5. Try again in a moment.`);case`slow_down`:return e(`join_refused_slow_down`,void 0,`Too many wrong codes. Wait a minute, then try again.`);case`address`:return e(`join_refused_address`,{host:n},`This link's address is outside your home network, so the app will not use it. Ask ${n} for a link with their computer's IP address.`);case`seat_taken`:return Mc(e,n);default:return e(`join_refused_other`,{host:n},`${n} didn't let you in.`)}if(t.kind===`ended`)switch(t.why){case`kicked`:return e(`join_ended_kicked`,{host:n},`${n} took you out of the game.`);case`closed`:return e(`join_ended_closed`,{host:n},`${n} closed Play Together.`);case`host_stopped`:return e(`join_ended_host_stopped`,void 0,`The host stopped playing.`);case`replaced`:return e(`join_ended_replaced`,void 0,`This game was opened in another tab or on another device, so it stopped here.`);case`pad_lost`:return e(`join_ended_pad_lost`,{host:n},`The PS5 lost your controller, so you're out of the game. Ask ${n} to let you in again.`);case`gave_up`:return e(`join_ended_gave_up`,{host:n},`The connection to ${n} didn't come back in time.`);case`lost`:return r?e(`join_net_lost`,{host:n},`The connection to ${n} dropped. Check your internet connection, then ask again.`):e(`join_ended_lost`,{host:n},`Couldn't reach ${n}. Check that you're on the same network.`);case`left`:return e(`join_ended_left`,void 0,`You left the game.`);case`seat_taken`:return Mc(e,n);case`mismatch`:return e(`join_net_mismatch`,void 0,`This link doesn't match the host; ask them for a new one.`);case`no_direct`:return e(`join_net_no_direct`,void 0,`A direct connection isn't possible from this network (both sides' routers are strict). Try Wi-Fi instead of mobile data, or ask the host to turn on UPnP.`);case`no_room`:return e(`join_net_no_room`,{host:n},`This invite isn't open any more. Ask ${n} for a new link.`);case`net_full`:return e(`join_net_full`,{host:n},`${n}'s game has no room for another friend right now. Try again in a moment.`);case`no_hub`:return e(`join_net_no_hub`,void 0,`Couldn't reach the PS5Upload invite service. Check your internet connection, then try again.`);case`offer`:return e(`join_net_offer`,{host:n},`${n}'s computer couldn't connect to this browser. Try another browser.`);case`no_webrtc`:return e(`join_net_no_webrtc`,void 0,`This browser can't make direct connections. Try a recent Chrome, Safari or Firefox.`)}return``}function Pc(e){let[t,n]=(0,D.useState)(()=>Date.now());return(0,D.useEffect)(()=>{if(!e)return;n(Date.now());let t=window.setInterval(()=>n(Date.now()),500);return()=>window.clearInterval(t)},[e]),t}function Fc(){let[e,t]=(0,D.useState)({ready:!1,pressed:!1,id:null,kind:null,weak8BitDo:!1});return(0,D.useEffect)(()=>{let e=()=>{let e=Xa(typeof navigator>`u`?void 0:navigator).find(e=>!!e?.connected),n=!!e,r=n?cc():null,i=!!r&&(r.buttons!==0||r.l2>30||r.r2>30),a=e?.id??null,o=e?Co(e):null,s=!!e&&io(e);t(e=>e.ready===n&&e.pressed===i&&e.id===a&&e.kind===o&&e.weak8BitDo===s?e:{ready:n,pressed:i,id:a,kind:o,weak8BitDo:s})};e();let n=window.setInterval(e,120);return window.addEventListener(`gamepadconnected`,e),window.addEventListener(`gamepaddisconnected`,e),()=>{window.clearInterval(n),window.removeEventListener(`gamepadconnected`,e),window.removeEventListener(`gamepaddisconnected`,e)}},[]),e}function Ic(e){return!!e?.closest?.(`[data-testid="rp-touch"]`)}var Lc=14,Rc=()=>typeof window<`u`&&!is()&&!!window.matchMedia?.(`(pointer: coarse)`).matches;function zc(e,t,n){return!e||e===t||e.closest?.(`[data-join-game]`)?`game`:n?.contains(e)?`controls`:`page`}function Bc(e){return e.checking?`close-check`:e.guide?`close-guide`:e.where===`game`?`show-controls`:e.full?`leave-full`:null}var Vc={good:`var(--color-good,#32d074)`,fair:`var(--color-warn,#ffb340)`,slow:`var(--color-bad,#ff6961)`,none:`rgba(255,255,255,.5)`};function Hc({text:e,body:t,onCancel:n}){let r=Ie();return(0,z.jsxs)(`div`,{className:`flex flex-col items-center gap-5 px-6 py-10 text-center`,"data-testid":`join-waiting`,children:[(0,z.jsxs)(`div`,{className:`relative flex h-24 w-24 items-center justify-center`,"aria-hidden":!0,children:[(0,z.jsx)(`span`,{className:`absolute inset-0 animate-ping rounded-full bg-white/10 [animation-duration:2.4s]`}),(0,z.jsx)(`span`,{className:`absolute inset-3 animate-pulse rounded-full bg-white/10 [animation-duration:2.4s]`}),(0,z.jsx)(`span`,{className:`relative flex h-14 w-14 items-center justify-center rounded-full bg-white/15`,children:(0,z.jsx)(Se,{size:26})})]}),(0,z.jsx)(`p`,{className:`max-w-sm text-base font-medium`,"data-testid":`join-stage`,children:e}),t&&(0,z.jsx)(`p`,{className:`max-w-sm text-sm text-white/60`,children:t}),(0,z.jsx)(`button`,{type:`button`,onClick:n,autoFocus:!0,className:`rounded-full bg-white/15 px-4 py-2 text-sm hover:bg-white/25`,"data-testid":`join-cancel`,children:r(`join_cancel`,void 0,`Cancel`)})]})}function Uc({session:e,inApp:t=!1,onLeave:n,onAgain:r,onFullscreen:i,lanUrl:a=null,hubDown:o=!1}){let s=Ie(),c=uc(e),{stage:l,status:u}=c,d=c.host??s(`join_host_fallback`,void 0,`your friend`),f=(0,D.useRef)(null),p=(0,D.useRef)(null),m=(0,D.useRef)(null),[h,g]=(0,D.useState)(!1),[_,v]=(0,D.useState)(()=>Lt(Oc)===`1`),[y,b]=(0,D.useState)(()=>typeof window<`u`&&window.innerHeight>window.innerWidth),x=Fc(),[S,ee]=(0,D.useState)(!1),C=l.kind===`reconnecting`,w=Pc(C),T=l.kind===`joined`||C,E=u?.state===`picking_user`,te=l.kind===`joined`||l.kind===`reconnecting`?l.player:0,[ne,re]=(0,D.useState)(!1),ie=(0,D.useRef)(te);(0,D.useEffect)(()=>{ie.current===kc&&te>kc&&re(!0),te&&(ie.current=te)},[te]);let[ae,oe]=(0,D.useState)(!1),[se,ce]=(0,D.useState)(!1),le=T&&(h||!t),de=Rc(),fe=vc(E),k=hc(le,C||fe&&!de||ae||se,de),{poke:he}=k,_e=(0,D.useRef)(null),ve=()=>{_e.current&&clearTimeout(_e.current.timer),_e.current=null};(0,D.useEffect)(()=>ve,[]);let[ye,A]=(0,D.useState)(!1),xe=(0,D.useRef)(!1);(0,D.useEffect)(()=>{if(!le||!de||k.shown||!_||xe.current)return;xe.current=!0,A(!0);let e=setTimeout(()=>A(!1),6e3);return()=>clearTimeout(e)},[le,de,k.shown,_]),(0,D.useEffect)(()=>{if(!T)return;let t=e.element;return f.current?.appendChild(t),()=>t.remove()},[T,e]),(0,D.useEffect)(()=>{if(!T||c.sound)return;let t=()=>e.startSound(),n=[`pointerup`,`touchend`,`click`,`keydown`];for(let e of n)window.addEventListener(e,t,!0);return()=>{for(let e of n)window.removeEventListener(e,t,!0)}},[T,c.sound,e]),(0,D.useEffect)(()=>{let e=()=>b(window.innerHeight>window.innerWidth);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,D.useEffect)(()=>{if(h)return()=>void i?.(!1)},[h,i]);let Ce=(0,D.useRef)(h);(0,D.useEffect)(()=>{Ce.current=h},[h]),(0,D.useEffect)(()=>{if(!t||!T||!Rc()||typeof window>`u`||!window.matchMedia)return;let e=window.matchMedia(`(orientation: landscape)`),n=()=>{e.matches&&!Ce.current&&(g(!0),i?.(!0))};return n(),e.addEventListener?.(`change`,n),()=>e.removeEventListener?.(`change`,n)},[t,T,i]),(0,D.useEffect)(()=>{t&&T&&is()&&!Ce.current&&(g(!0),i?.(!0))},[t,T,i]),(0,D.useEffect)(()=>{if(!T)return;let e=e=>{if(e.key!==`Escape`)return;if(S)return void Le.current();if(he(),h)return g(!1);let t=zc(document.activeElement,document.body,p.current);t===`game`?Le.current():t===`controls`&&m.current?.focus({preventScroll:!0})};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[T,h,he,S]),(0,D.useEffect)(()=>{if(!h||!Rc())return;window.history.pushState(window.history.state,``);let e=window.location.href,t=!1,n=()=>{t=!0,g(!1)};return window.addEventListener(`popstate`,n),()=>{window.removeEventListener(`popstate`,n),!t&&window.location.href===e&&window.history.back()}},[h]),(0,D.useEffect)(()=>{if(!h||typeof document>`u`)return;let e=()=>{document.fullscreenElement||Rc()||g(!1)};return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[h]);let Te=is(),Ee=T&&Ac({player:te,guided:_,movedOff:ne,reconnecting:C})&&!u?.playsAs,De=async e=>{g(e),await i?.(e)},Oe=()=>m.current?.focus({preventScroll:!0}),ke=()=>{It(Oc,`1`),v(!0),re(!1)},Ae=()=>{he();let e=C?`[data-testid="join-reconnecting-leave"]`:`[data-testid="join-bar"] button`;p.current?.querySelector(e)?.focus({preventScroll:!0})},je=()=>{let e=p.current?.querySelector(`[data-testid="join-check-open"]`);e?e.focus({preventScroll:!0}):Oe(),ee(!1)},Me=()=>zc(document.activeElement,document.body,p.current),[Ne,Pe]=(0,D.useState)(`game`);(0,D.useEffect)(()=>{if(!T)return;let e=()=>Pe(Me()),t=()=>window.setTimeout(e,0);return e(),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t)}},[T]);let Fe=()=>{switch(T?Bc({checking:S,guide:Ee,where:Me(),full:h}):null){case`close-check`:return je(),!0;case`close-guide`:return ke(),Oe(),!0;case`show-controls`:return Ae(),!0;case`leave-full`:return De(!1),!0;default:return!1}},Le=(0,D.useRef)(Fe);(0,D.useEffect)(()=>{Le.current=Fe});let Re=t&&!de&&T&&Bc({checking:S,guide:Ee,where:Ne,full:h})!==null;(0,D.useEffect)(()=>{if(Re)return Xo(()=>void Le.current())},[Re]);let ze=!t&&T&&!de;(0,D.useEffect)(()=>{if(!ze)return;let e=window.location.href;window.history.pushState(window.history.state,``);let t=!0,n=()=>{if(t=!1,!Le.current())return window.history.back();window.history.pushState(window.history.state,``),t=!0};return window.addEventListener(`popstate`,n),()=>{window.removeEventListener(`popstate`,n),t&&window.location.href===e&&window.history.back()}},[ze]);let Be=l.kind===`joined`;(0,D.useEffect)(()=>{if(!Be)return;let e=document.activeElement;if(e&&e!==document.body)return;let t=Te&&Ee?p.current?.querySelector(`[data-testid="join-guide-ok"]`):null;t?t.focus({preventScroll:!0}):Oe()},[Be]),(0,D.useEffect)(()=>{x.pressed&&T&&!S&&Me()===`controls`&&Oe()},[x.pressed]);let Ve=()=>{e.leave(),n()};if(l.kind===`connecting`||l.kind===`asking`)return(0,z.jsxs)(`div`,{className:t?`rounded-[var(--radius-card)] bg-neutral-900 text-white`:`flex min-h-[100dvh] flex-col items-center justify-center gap-4 bg-black text-white`,"data-join-ui":``,children:[l.kind===`connecting`&&o&&a&&(0,z.jsx)(Ec,{href:a}),(0,z.jsx)(Hc,{text:l.kind===`connecting`?s(`join_connecting`,{host:d},`Connecting to ${d}…`):s(`join_waiting`,{host:d},`Waiting for ${d} to let you in`),body:l.kind===`asking`?s(`join_waiting_body`,{host:d},`${d} sees your name on their screen and taps Allow.`):void 0,onCancel:Ve})]});if(l.kind===`refused`||l.kind===`ended`){let i=l.kind===`refused`||l.why!==`left`&&l.why!==`mismatch`;return(0,z.jsxs)(`div`,{className:t?`flex flex-col items-center gap-4 rounded-[var(--radius-card)] bg-neutral-900 px-6 py-10 text-center text-white`:`flex min-h-[100dvh] flex-col items-center justify-center gap-4 bg-black px-6 text-center text-white`,"data-testid":`join-ended`,"data-why":l.why,"data-join-ui":``,children:[(0,z.jsx)(Se,{size:28,className:`text-white/60`}),(0,z.jsx)(`p`,{className:`max-w-sm text-base`,"data-testid":`join-ended-text`,children:Nc(s,l,d,e.opts.internet??!!e.opts.transport)}),a&&l.why===`no_hub`&&(0,z.jsx)(Ec,{href:a}),(0,z.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[i&&(0,z.jsx)(`button`,{type:`button`,onClick:r,autoFocus:!0,className:`rounded-full bg-white px-4 py-2 text-sm font-medium text-black`,"data-testid":`join-again`,children:l.kind===`refused`&&l.why===`not_playing`?s(`join_retry`,void 0,`Try again`):s(`join_again`,void 0,`Ask to join again`)}),(0,z.jsx)(`button`,{type:`button`,onClick:n,autoFocus:!i,className:`rounded-full bg-white/15 px-4 py-2 text-sm`,"data-testid":`join-done`,children:s(`join_done`,void 0,`Done`)})]})]})}let He=l.player,Ue=c.light??at(He),We=c.rttMs??u?.rttMs??null,Ge=it(We),Ke=Rc(),qe=T&&!C&&!x.ready&&Ke&&(!t||h),Je=Ac({player:He,guided:_,movedOff:ne,reconnecting:C}),Ye=He===kc,Xe=u?.playsAs??null,Ze=C?(l.deadline-w)/1e3:0,Qe=()=>De(!h),$e=t&&!h&&Ke&&T,et=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`span`,{className:`flex items-center gap-1.5 rounded-full bg-black/60 px-2.5 py-1 font-medium`,"data-testid":`join-player`,children:[(0,z.jsx)(`span`,{className:`inline-block h-2.5 w-2.5 rounded-full`,style:{background:`rgb(${Ue[0]},${Ue[1]},${Ue[2]})`}}),t&&(0,z.jsxs)(`span`,{className:`text-white/80`,children:[s(`join_playing_at`,{host:d},`Playing at ${d}'s`),` · `]}),s(`join_you_are`,{n:He},`You are Player ${He}`)]}),We!=null&&(0,z.jsxs)(`span`,{className:`rounded-full bg-black/60 px-2 py-1 tabular-nums`,style:{color:Vc[Ge]},"data-testid":`join-delay`,"data-tone":Ge,"data-path":c.path??void 0,children:[c.path&&(0,z.jsxs)(`span`,{className:`text-white/80`,children:[jc(s,c.path),` · `]}),Math.round(We),` ms`]}),Ye&&(0,z.jsx)(`span`,{className:`rounded-full bg-black/60 px-2.5 py-1 text-white/85`,"data-testid":`join-seat-stream`,children:s(`join_seat_stream`,{host:d},`You're playing as ${d}'s PS5 user. No need to pick one.`)}),Xe&&!Ye&&(0,z.jsx)(`span`,{className:`rounded-full bg-black/60 px-2.5 py-1 text-white/85`,"data-testid":`join-plays-as`,children:s(`join_plays_as`,{profile:Xe},`You're playing as ${Xe}. No need to pick one.`)}),E&&!Ye&&u?.seatNote&&(0,z.jsx)(`span`,{className:`rounded-full bg-black/60 px-2.5 py-1 text-white/85`,"data-testid":`join-seat-note`,children:s(`join_seat_tv_asks`,{host:d},`${d} chose a profile for you, but it couldn't be used. The TV will ask who you are.`)}),E&&!Ye&&(0,z.jsx)(`span`,{className:`rounded-full bg-white/90 px-2.5 py-1 font-medium text-black`,"data-testid":`join-picking`,children:s(`join_picking`,void 0,`Press PS, then pick Quick Play on the TV`)})]}),tt=(0,z.jsxs)(z.Fragment,{children:[le&&de&&k.shown&&!C&&(0,z.jsxs)(`button`,{type:`button`,onClick:k.hide,className:`flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 font-medium`,"data-testid":`join-hide-controls`,children:[(0,z.jsx)(pe,{size:13}),s(`join_hide_controls`,void 0,`Hide`)]}),!c.sound&&(0,z.jsxs)(`button`,{type:`button`,onClick:()=>e.startSound(),className:`flex items-center gap-1 rounded-full bg-white/90 px-2.5 py-1 font-medium text-black`,"data-testid":`join-sound`,children:[(0,z.jsx)(we,{size:13}),s(`join_sound`,void 0,`Tap for sound`)]}),c.sound&&!c.noSound&&(0,z.jsxs)(`button`,{type:`button`,onClick:()=>e.setMuted(!c.muted),"aria-pressed":c.muted,className:`flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 hover:bg-white/25`,"data-testid":`join-mute`,children:[c.muted?(0,z.jsx)(M,{size:13}):(0,z.jsx)(we,{size:13}),c.muted?s(`rp_unmute`,void 0,`Sound on`):s(`rp_mute`,void 0,`Mute`)]}),c.noSound&&(0,z.jsxs)(`span`,{className:`flex items-center gap-1 rounded-full bg-black/60 px-2.5 py-1 text-white/80`,"data-testid":`join-no-sound`,children:[(0,z.jsx)(M,{size:13}),s(`join_no_sound`,void 0,`No sound in this browser`)]}),(t||typeof document<`u`&&!!document.documentElement.requestFullscreen)&&(0,z.jsx)(`button`,{type:`button`,onClick:()=>void Qe(),"aria-label":h?s(`join_exit_fullscreen`,void 0,`Leave full screen`):s(`pad_fill`,void 0,`Full screen`),className:`flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 hover:bg-white/25`,"data-testid":`join-full`,children:h?(0,z.jsx)(be,{size:13}):(0,z.jsx)(O,{size:13})}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>ee(!0),"aria-label":s(`join_check_title`,void 0,`Check your controller`),title:s(`join_check_title`,void 0,`Check your controller`),className:`flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 hover:bg-white/25`,"data-testid":`join-check-open`,children:(0,z.jsx)(me,{size:13})}),(0,z.jsxs)(`button`,{type:`button`,onClick:Ve,className:`flex items-center gap-1 rounded-full bg-[var(--color-danger,#dc2626)] px-3 py-1 font-medium`,"data-testid":`join-leave`,children:[(0,z.jsx)(ge,{size:13}),s(`join_leave`,void 0,`Leave`)]})]}),nt=k.shown?`opacity-100`:`pointer-events-none opacity-0`,rt={"data-testid":`join-bar`,"data-shown":k.shown?`1`:`0`,onFocus:e=>{(Te||e.target.matches?.(`:focus-visible`))&&ce(!0)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||ce(!1)},onPointerEnter:e=>{e.pointerType===`mouse`&&oe(!0)},onPointerLeave:()=>oe(!1)},ot=h||!t?`fixed inset-0 z-[200] bg-black`:`relative mx-auto aspect-video w-full max-w-[max(20rem,calc((100dvh_-_22rem)*16/9))] overflow-hidden rounded-[var(--radius-card)] bg-black shadow-[var(--shadow-2)]`,st=t&&h;return(0,z.jsxs)(`div`,{className:`space-y-2`,ref:p,"data-join-ui":``,children:[(0,z.jsxs)(`div`,{className:`${ot} select-none text-white [-webkit-touch-callout:none]`,style:{touchAction:`none`},role:st?`dialog`:void 0,"aria-modal":st?!0:void 0,"aria-label":st?s(`pad_fill`,void 0,`Full screen`):void 0,onPointerMove:e=>{if(e.pointerType===`mouse`)return he();let t=_e.current;t&&t.id===e.pointerId&&Math.hypot(e.clientX-t.x,e.clientY-t.y)>Lc&&ve()},onPointerDown:e=>{if(Ic(e.target))return;if(e.pointerType===`mouse`||!de)return he();if(e.target.closest?.(`[data-testid="join-bar"], button, a, input, [role="button"]`))return;ve();let{pointerId:t,clientX:n,clientY:r}=e;_e.current={id:t,x:n,y:r,timer:setTimeout(()=>{_e.current=null,navigator.vibrate?.(15),k.toggle()},450)}},onPointerUp:ve,onPointerCancel:ve,onPointerLeave:ve,"data-testid":`join-stage-view`,children:[(0,z.jsx)(`div`,{ref:f,className:`pointer-events-none absolute inset-0 z-0 flex items-center justify-center`,"aria-hidden":!0}),le&&!k.shown&&!C&&We!=null&&(0,z.jsxs)(`span`,{className:`pointer-events-none absolute z-10 rounded-full bg-black/40 px-1.5 py-0.5 text-[10px] leading-none tabular-nums`,style:{color:Vc[Ge],top:`max(0.5rem, env(safe-area-inset-top))`,right:`max(0.5rem, env(safe-area-inset-right))`},"data-testid":`join-delay-corner`,children:[Math.round(We),` ms`]}),qe?(0,z.jsxs)(`div`,{className:`absolute left-1/2 top-1/2 z-20 flex w-max max-w-[min(24rem,calc(100%-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col items-center gap-2 rounded-2xl bg-black/70 p-3 text-xs backdrop-blur-sm transition-opacity duration-300 ${nt}`,...rt,children:[(0,z.jsx)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:et}),(0,z.jsx)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:tt})]}):$e?null:(0,z.jsxs)(`div`,{className:`absolute inset-x-0 top-0 z-20 flex flex-wrap items-center gap-2 bg-gradient-to-b from-black/70 to-transparent px-3 pb-5 pt-[max(8px,env(safe-area-inset-top))] text-xs transition-opacity duration-300 ${nt}`,...rt,children:[et,(0,z.jsx)(`span`,{className:`flex-1`}),tt]}),!k.shown&&!qe&&(0,z.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),he()},"aria-label":s(`join_show_controls`,void 0,`Show controls`),className:`absolute left-1/2 top-[max(6px,env(safe-area-inset-top))] z-20 flex h-7 w-11 -translate-x-1/2 items-center justify-center rounded-full bg-black/40 text-white/70 opacity-60 hover:opacity-100 focus-visible:opacity-100`,"data-testid":`join-show-controls`,children:(0,z.jsx)(ue,{size:16,"aria-hidden":!0})}),ye&&!k.shown&&(0,z.jsx)(`p`,{className:`pointer-events-none absolute left-1/2 top-[max(10px,env(safe-area-inset-top))] z-20 -translate-x-1/2 rounded-full bg-black/60 px-3 py-1 text-xs text-white/85`,"data-testid":`join-hold-hint`,children:s(`join_hold_hint`,void 0,`Press and hold the picture to show the buttons`)}),c.problem&&(0,z.jsx)(`p`,{className:`absolute inset-x-4 top-1/2 z-10 -translate-y-1/2 text-center text-sm text-white/85`,"data-testid":`join-problem`,children:c.problem===`no_hevc`?s(`pad_watch_no_hevc`,void 0,`This device can't play this stream's picture: the computer streams HEVC, and this device plays only H.264.`):s(`pad_watch_decode`,void 0,`The picture could not be played here.`)}),S&&(0,z.jsx)(wc,{onClose:je}),qe&&(0,z.jsx)(As,{stream:e,layout:`overlay`,onMenu:()=>k.shown?k.hide():he()}),!qe&&!C&&(0,z.jsxs)(`div`,{className:`absolute bottom-3 left-3 z-20 flex items-center gap-2 rounded-2xl bg-black/70 px-3 py-1.5 text-xs transition-opacity duration-300 ${nt}`,"data-testid":`join-pad`,children:[(0,z.jsx)(me,{size:14,style:{color:x.pressed?`rgb(${Ue[0]},${Ue[1]},${Ue[2]})`:void 0}}),x.ready?(0,z.jsxs)(`span`,{className:`flex flex-col items-start gap-1`,children:[(0,z.jsx)(`span`,{children:s(`join_pad_ready`,void 0,`Your controller is ready`)}),x.weak8BitDo&&x.id&&(0,z.jsx)(ms,{id:x.id,className:`text-amber-200/90`}),x.kind===`guess`&&no()&&(0,z.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2 text-white/75`,"data-testid":`join-pad-unknown`,children:[s(`join_check_unknown_short`,void 0,`Not on our list: buttons may be mixed up.`),(0,z.jsx)(`button`,{type:`button`,onClick:()=>ee(!0),className:`rounded-full bg-white px-2.5 py-0.5 font-medium text-black`,"data-testid":`join-pad-unknown-check`,children:s(`join_check_title`,void 0,`Check your controller`)})]})]}):Ke&&t&&!h?s(`join_full_to_play`,void 0,`Tap full screen to play with the on-screen controller.`):(0,z.jsxs)(`span`,{className:`flex flex-col`,children:[(0,z.jsx)(`span`,{children:s(`join_pad_none`,void 0,`Connect a controller (USB or Bluetooth) and press any button.`)}),(0,z.jsx)(`span`,{className:`text-white/60`,"data-testid":`join-pad-keys`,children:s(`join_pad_keys`,void 0,`Or use the keyboard: WASD move, arrows D-pad, Enter ✕, Backspace ○, Q □, E △, Tab Options.`)})]}),Te&&(0,z.jsx)(`span`,{className:`max-w-[14rem] border-l border-white/20 pl-2 text-white/70`,"data-testid":`join-tv-back`,children:s(`join_tv_back_hint`,void 0,`Press Back on the remote for the buttons.`)})]}),u?.blockSystem&&u.state===`playing`&&!qe&&(0,z.jsx)(`p`,{className:`absolute bottom-3 right-3 z-20 rounded-full bg-black/60 px-3 py-1 text-[11px] text-white/70 transition-opacity duration-300 ${nt}`,"data-testid":`join-blocked`,children:s(`join_block_note`,{host:d},`${d} turned off PS and Create for friends.`)}),fe&&!Ye&&de&&!k.shown&&!C&&(0,z.jsx)(`p`,{className:`pointer-events-none absolute left-1/2 top-2 z-20 -translate-x-1/2 whitespace-nowrap rounded-full bg-white/90 px-2.5 py-1 text-xs font-medium text-black`,"data-testid":`join-picking-note`,children:s(`join_picking`,void 0,`Press PS, then pick Quick Play on the TV`)}),Je&&!Xe&&(0,z.jsxs)(`div`,{className:`absolute bottom-14 left-1/2 z-30 w-[min(22rem,calc(100%-2rem))] -translate-x-1/2 rounded-2xl border border-white/10 bg-neutral-900/90 p-4 text-sm shadow-2xl backdrop-blur-md`,"data-testid":`join-guide`,children:[(0,z.jsx)(`p`,{className:`font-semibold`,children:s(`join_guide_title`,void 0,`One more step on the TV`)}),(0,z.jsx)(`p`,{className:`mt-1 text-white/75`,children:s(`join_guide_body`,void 0,`On your controller, press PS once. The TV asks "Who's using this controller?". Pick Quick Play or your own user. The host doesn't need to do anything.`)}),(0,z.jsx)(`p`,{className:`mt-1 text-white/60`,children:s(`join_guide_menus`,void 0,`On the PS5's home screen only the host controls the menus; your controller plays inside games.`)}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>{ke(),Oe()},className:`mt-3 rounded-full bg-white px-3 py-1 text-xs font-medium text-black`,"data-testid":`join-guide-ok`,children:s(`join_guide_ok`,void 0,`Got it`)})]}),C&&(0,z.jsxs)(`div`,{className:`absolute inset-0 z-30 flex flex-col items-center justify-center gap-3 bg-black/70 px-6 text-center`,"data-testid":`join-reconnecting`,children:[(0,z.jsxs)(`button`,{type:`button`,onClick:Ve,className:`absolute right-3 top-[max(10px,env(safe-area-inset-top))] flex items-center gap-1 rounded-full bg-white/15 px-3 py-1.5 text-sm font-medium hover:bg-white/25`,"data-testid":`join-reconnecting-leave`,children:[(0,z.jsx)(ge,{size:14}),s(`join_leave`,void 0,`Leave`)]}),(0,z.jsx)(`span`,{className:`h-7 w-7 animate-spin rounded-full border-2 border-white/30 border-t-white`,"aria-hidden":!0}),l.hostStopped?(0,z.jsx)(`p`,{className:`max-w-sm text-base font-medium`,"data-testid":`join-host-away`,children:s(`join_host_away`,{time:Dc(Ze)},`The host stopped playing — waiting for them to start again (${Dc(Ze)})`)}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`text-base font-medium`,children:s(`join_reconnecting`,void 0,`Reconnecting…`)}),(0,z.jsx)(`p`,{className:`text-sm text-white/70`,"data-testid":`join-reconnecting-left`,children:s(`join_reconnecting_left`,{time:Dc(Ze)},`Your place is kept for ${Dc(Ze)}.`)})]})]}),!t&&T&&y&&Ke&&(0,z.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-16 z-20 flex justify-center`,children:(0,z.jsxs)(`span`,{className:`flex items-center gap-2 rounded-full bg-black/70 px-3 py-1.5 text-xs text-white/85`,children:[(0,z.jsx)(j,{size:14}),s(`pad_turn`,void 0,`Turn the phone sideways`)]})}),(0,z.jsx)(`div`,{ref:m,tabIndex:0,"data-own-arrows":``,"data-join-game":``,"aria-label":s(`join_game_label`,{host:d},`${d}'s game`),className:`pointer-events-none absolute inset-0 outline-none`,"data-testid":`join-game`})]}),$e&&(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 rounded-[var(--radius-card)] bg-neutral-900 px-3 py-2 text-xs text-white`,"data-testid":`join-bar`,"data-shown":`1`,"data-below":`1`,children:[(0,z.jsx)(`div`,{className:`flex w-full min-w-0 flex-wrap items-center gap-2`,children:et}),(0,z.jsxs)(`button`,{type:`button`,onClick:()=>void Qe(),className:`flex h-11 min-w-0 flex-1 items-center justify-center gap-1.5 rounded-full bg-white/15 px-3 text-sm font-medium hover:bg-white/25`,"data-testid":`join-fullscreen-below`,children:[(0,z.jsx)(O,{size:15}),s(`pad_fill`,void 0,`Full screen`)]}),c.sound&&!c.noSound?(0,z.jsx)(`button`,{type:`button`,onClick:()=>e.setMuted(!c.muted),"aria-pressed":c.muted,"aria-label":c.muted?s(`rp_unmute`,void 0,`Sound on`):s(`rp_mute`,void 0,`Mute`),className:`flex h-11 w-11 items-center justify-center rounded-full bg-white/15 hover:bg-white/25`,children:c.muted?(0,z.jsx)(M,{size:16}):(0,z.jsx)(we,{size:16})}):c.sound?null:(0,z.jsxs)(`button`,{type:`button`,onClick:()=>e.startSound(),className:`flex h-11 items-center justify-center gap-1.5 rounded-full bg-white px-3 text-sm font-medium text-black`,children:[(0,z.jsx)(we,{size:15}),s(`join_sound`,void 0,`Tap for sound`)]}),(0,z.jsxs)(`button`,{type:`button`,onClick:Ve,className:`flex h-11 items-center justify-center gap-1.5 rounded-full bg-[var(--color-danger,#dc2626)] px-4 text-sm font-medium`,"data-testid":`join-leave-below`,children:[(0,z.jsx)(ge,{size:15}),s(`join_leave`,void 0,`Leave`)]})]})]})}var Wc=`ps5upload.join.name`;function Gc(e){return/iPhone/.test(e)?`iPhone`:/iPad/.test(e)?`iPad`:/Android/.test(e)?`Android`:``}function Kc(e){return e.trim().slice(0,32)}function qc(e=``){return Kc(Lt(`ps5upload.join.name`)??``)||e}function Jc(e){let t=Kc(e);return t&&It(Wc,t),t}function Yc(e){try{return!!sessionStorage.getItem(Ro(e))}catch{return!1}}async function Xc(e){try{e?(await document.documentElement.requestFullscreen?.({navigationUI:`hide`}),await screen.orientation.lock?.(`landscape`)):document.fullscreenElement&&await document.exitFullscreen()}catch{}}function Zc({url:e,invite:t,host:n,transport:r,lanUrl:i=null,path:a=null,internet:o}){let s=Ie(),c=Tc(r&&o!==!1?e:null,i),[l,u]=(0,D.useState)(()=>qc(Gc(typeof navigator>`u`?``:navigator.userAgent))),[d,f]=(0,D.useState)(null),[p,m]=(0,D.useState)(0),h=(0,D.useCallback)(e=>{if(!e)return;let t=typeof window<`u`&&!!window.matchMedia?.(`(pointer: coarse)`).matches,n=e.querySelector(`[data-testid="join-name"]`)?.value.trim()?`join-go`:t?null:`join-name`;n&&e.querySelector(`[data-testid="${n}"]`)?.focus({preventScroll:!0})},[]),g=i=>{let s=Jc(i);if(!s)return;let c=new lc({url:e,invite:t,name:s,host:n,transport:r,path:a,...o===void 0?{}:{internet:o}});f(c),m(e=>e+1),c.start()};if((0,D.useEffect)(()=>{!d&&Yc(t)&&l.trim()&&g(l)},[]),(0,D.useEffect)(()=>d?fc(d):void 0,[d]),(0,D.useEffect)(()=>{if(!d)return;let e=()=>d.stop();return window.addEventListener(`pagehide`,e),()=>window.removeEventListener(`pagehide`,e)},[d]),d)return(0,z.jsx)(Uc,{session:d,lanUrl:i,hubDown:c,onLeave:()=>f(null),onAgain:()=>{d.stop(),g(l)},onFullscreen:Xc},p);let _=n??s(`join_host_fallback`,void 0,`your friend`),v=(0,z.jsx)(`div`,{className:`flex min-h-[100dvh] items-center justify-center bg-black px-6 text-white`,"data-testid":`join-name-step`,"data-join-ui":``,children:(0,z.jsxs)(`form`,{ref:h,className:`w-full max-w-sm space-y-4 rounded-2xl border border-white/10 bg-neutral-900 p-6`,onSubmit:e=>{e.preventDefault(),g(l)},children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(`span`,{className:`flex h-10 w-10 items-center justify-center rounded-full bg-white/10`,children:(0,z.jsx)(Se,{size:20})}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h1`,{className:`text-lg font-semibold`,children:s(`join_title`,void 0,`Join a friend's game`)}),(0,z.jsx)(`p`,{className:`text-sm text-white/60`,children:s(`join_title_body`,{host:_},`Play on ${_}'s PS5 as Player 2, 3 or 4.`)})]})]}),(0,z.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,z.jsx)(`span`,{className:`text-sm font-medium`,children:s(`join_name_label`,void 0,`Your name`)}),(0,z.jsx)(`input`,{value:l,onChange:e=>u(e.target.value),maxLength:32,autoComplete:`nickname`,className:`block w-full rounded-lg border border-white/15 bg-black px-3 py-2 text-base outline-none focus:border-white/50`,"data-testid":`join-name`}),(0,z.jsx)(`span`,{className:`block text-xs text-white/50`,children:s(`join_name_hint`,void 0,`Your friend sees this when you ask to join.`)})]}),(0,z.jsx)(`button`,{type:`submit`,disabled:!l.trim(),className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black disabled:opacity-40`,"data-testid":`join-go`,children:s(`join_button`,void 0,`Join`)}),c&&i&&(0,z.jsx)(Ec,{href:i})]})});return t?(0,z.jsx)(Wo,{appLink:rt(location.href),children:v}):v}function Qc(e){let t=(e??``).trim().replace(/^\[|\]$/g,``).toLowerCase(),n=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(t);if(n){let e=n.slice(1).map(Number);if(e.some(e=>e>255))return null;let[t,r]=e;return t===10||t===172&&r>=16&&r<32||t===192&&r===168||t===169&&r===254||t===127?0:t===100&&r>=64&&r<128?1:2}if(!t.includes(`:`)||!/^[0-9a-f:.]+$/.test(t))return null;if(t.startsWith(`fd7a:115c:a1e0:`))return 1;let r=parseInt(t.split(`:`)[0]||`0`,16);return(r&65024)==64512||(r&65472)==65152||t===`::1`?0:2}function $c(e,t){let n=Qc(e),r=Qc(t);return n===1||r===1?`tailscale`:r===0?`lan`:r===2?`internet`:null}function el(e){let t=(e??``).toLowerCase();if(t.endsWith(`.local`))return`lan`;if(t.endsWith(`.ts.net`))return`tailscale`;let n=Qc(t);return n===0?`lan`:n===1?`tailscale`:null}function tl(e){let t=[];if(typeof e.forEach==`function`)e.forEach(e=>t.push(e));else for(let n of e)t.push(n);let n=new Map(t.map(e=>[String(e.id),e])),r=t.filter(e=>e.type===`candidate-pair`),i=t.filter(e=>e.type===`transport`&&typeof e.selectedCandidatePairId==`string`).map(e=>n.get(String(e.selectedCandidatePairId))).find(Boolean)??r.find(e=>e.selected===!0)??r.find(e=>e.nominated===!0&&e.state===`succeeded`);if(!i)return null;let a=e=>{let t=n.get(String(e));if(!t)return null;let r=t.address??t.ip;return typeof r==`string`?r:null};return $c(a(i.localCandidateId),a(i.remoteCandidateId))}function nl(e){let t=e.replace(/:\d+$/,``).replace(/^\[|\]$/g,``);return`${t===`localhost`||t===`127.0.0.1`||t===`::1`?`ws`:`wss`}://${e}/ws`}function rl(e){let t=new Set;for(let n of e.matchAll(/^a=fingerprint:sha-256[ \t]+([0-9A-Fa-f:]+)[ \t]*\r?$/gim))t.add(n[1].toUpperCase());return/^a=fingerprint:(?!sha-256[ \t])/im.test(e)?null:t.size===1?[...t][0]:null}function il(e,t){let n=rl(e);return n!==null&&n===t.toUpperCase()}var al=16777216;function ol(e){let t=16383,n=Math.max(1,Math.ceil(e.length/t)),r=[];for(let i=0;ithis.max)return this.parts=[],this.size=0,{kind:`error`,why:`too_big`};if(this.parts.push(r.slice()),this.size+=r.length,n===1)return{kind:`partial`};let i=new Uint8Array(this.size),a=0;for(let e of this.parts)i.set(e,a),a+=e.length;return this.parts=[],this.size=0,{kind:`message`,data:i.buffer}}};function cl(e){let t=new Uint8Array(9);return t[0]=3,t.set(e.subarray(0,8),1),t}var ll=[`stun:stun.cloudflare.com:3478`,`stun:stun.l.google.com:19302`];function ul(e){let t=e.trim().replace(/^a=/,``).split(/\s+/);return t.length<8||t[6]!==`typ`||t[2].toLowerCase()===`udp`&&!t[4].toLowerCase().endsWith(`.local`)}var dl=1500,fl=2e4;function pl(e){let t=e?.codecs??[],n=e=>t.filter(t=>t.mimeType.toLowerCase()===e);return[...n(`video/h264`),...n(`video/h265`),...n(`video/rtx`)]}var ml=null;function hl(e){e.onopen=e.onmessage=e.onclose=e.onerror=null;try{e.readyState===1&&e.send(JSON.stringify({t:`leave`})),e.close(1e3)}catch{}}function gl(e,t={}){let n=t.WebSocketImpl??(typeof WebSocket>`u`?void 0:WebSocket);if(!n||ml)return;let r=nl(e.hub),i;try{i=new n(r)}catch{return}let a={url:r,room:e.room,ws:i,msgs:[],timer:null};ml=a;let o=()=>{ml===a&&(ml=null,a.timer&&clearTimeout(a.timer),hl(i))};i.onopen=()=>i.send(JSON.stringify({v:1,t:`join`,room:e.room})),i.onmessage=e=>{if(typeof e.data==`string`)try{a.msgs.push(JSON.parse(e.data))}catch{}},i.onclose=o,i.onerror=()=>{},a.timer=setTimeout(o,t.keepMs??6e4)}function _l(e,t){let n=ml;return n?(ml=null,n.timer&&clearTimeout(n.timer),n.url!==e||n.room!==t||n.ws.readyState>1||n.msgs.some(e=>e.t===`error`||e.t===`closed`)?(hl(n.ws),null):{ws:n.ws,msgs:n.msgs}):null}function vl(e,t={}){var n;let r=t.WebSocketImpl??(typeof WebSocket>`u`?void 0:WebSocket),i=t.PeerConnection??(typeof RTCPeerConnection>`u`?void 0:RTCPeerConnection),a=t.iceTimeoutMs??15e3,o=t.log??(()=>{});class s{constructor(e){this.CONNECTING=0,this.OPEN=1,this.CLOSING=2,this.CLOSED=3,this.readyState=0,this.binaryType=`arraybuffer`,this.onopen=null,this.onmessage=null,this.onclose=null,this.onerror=null,this.hub=null,this.pc=null,this.dc=null,this.timer=null,this.rx=new sl,this.answered=!1,this.early=[],this.hubBackUntil=0,this.offerSdp=null,this.offerSent=!1,this.ownEarly=[],this.media=null,setTimeout(()=>this.begin(),0)}begin(){if(this.readyState!==0)return;if(!i||!r){this.fail(`no_webrtc`);return}let n=t.signalUrl??nl(e.hub),a=t.signalUrl||t.lan?null:_l(n,e.room),s;if(a)s=a.ws,o(`hub: joined early`);else try{s=new r(n)}catch{this.fail(`no_hub`);return}if(this.hub=s,this.prepare(),this.readyState===0){s.onopen=()=>s.send(JSON.stringify(t.lan?{v:1,t:`join`,lan:!0}:{v:1,t:`join`,room:e.room})),s.onmessage=e=>{if(typeof e.data!=`string`)return;let t;try{t=JSON.parse(e.data)}catch{return}this.onHub(t)},s.onclose=e=>{this.hub===s&&(this.hub=null,this.readyState===0&&(this.answered||e?.code===1001&&this.hubRestarting()||this.fail(`no_hub`)))},s.onerror=()=>{};for(let e of a?.msgs??[])this.onHub(e)}}signal(e){let t=this.hub;t&&t.readyState===1&&t.send(JSON.stringify({t:`signal`,to:`host`,data:e}))}onHub(e){if(this.readyState===0)switch(e.t){case`joined`:o(`hub: joined room as ${e.gid??`?`}`),this.sendOffer();return;case`signal`:e.from===`host`&&e.data&&typeof e.data==`object`&&this.onSignal(e.data);return;case`closed`:this.fail(`no_room`);return;case`error`:if(o(`hub: error ${e.why??`?`}`),e.why===`no_room`&&this.hubBackUntil&&this.hubRestarting())return;this.fail(e.why===`no_room`?`no_room`:e.why===`room_full`?`net_full`:`no_hub`);return}}prepare(){if(!i)return;this.offerSent=!1,this.ownEarly=[];let e;try{e=new i({iceServers:[{urls:ll}]})}catch{this.fail(`no_webrtc`);return}this.pc=e;let n=e.createDataChannel(t.label??`join`,{ordered:!0});if(n.binaryType=`arraybuffer`,this.dc=n,n.onopen=()=>this.opened(n),n.onmessage=e=>this.fromChannel(e.data),n.onclose=()=>{this.dc===n&&this.dropped()},t.video&&e.addTransceiver){try{let t=e.addTransceiver(`video`,{direction:`recvonly`}),n=pl(globalThis.RTCRtpReceiver?.getCapabilities?.(`video`));n.length&&t.setCodecPreferences&&t.setCodecPreferences(n)}catch{}try{e.addTransceiver(`audio`,{direction:`recvonly`})}catch{}e.ontrack=t=>{if(this.pc!==e)return;let n=this.media?.stream??t.streams[0]??new MediaStream;n.getTracks().includes(t.track)||n.addTrack(t.track),this.media=t.track.kind===`audio`?{stream:n,receiver:this.media?.receiver??t.receiver,audio:t.receiver}:{stream:n,receiver:t.receiver,...this.media?.audio?{audio:this.media.audio}:{}}}}e.onicecandidate=t=>{if(this.pc!==e)return;let n=t.candidate;if(!n||!n.candidate||!ul(n.candidate))return;let r={type:`candidate`,candidate:n.candidate,sdpMid:n.sdpMid??`0`};this.offerSent?this.signal(r):this.ownEarly.push(r)},e.oniceconnectionstatechange=()=>{if(this.pc!==e)return;let t=e.iceConnectionState;o(`ice: ${t}`),t===`failed`&&(this.readyState===0?this.fail(`no_direct`):this.dropped())},this.offerSdp=(async()=>{let t=await e.createOffer();return await e.setLocalDescription(t),e.localDescription?.sdp??t.sdp??``})().catch(()=>(this.pc===e&&this.fail(`no_webrtc`),null))}async sendOffer(){let e=this.pc,t=this.offerSdp;if(!e||!t||this.offerSent)return;this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,this.readyState===0&&this.fail(`no_direct`)},a);let n=await t;if(this.pc===e&&n!==null&&this.readyState===0){this.signal({type:`offer`,sdp:n}),this.offerSent=!0;for(let e of this.ownEarly.splice(0))this.signal(e)}}async onSignal(t){let n=this.pc;if(t.type===`bye`)this.fail(t.why===`full`?`net_full`:`offer`);else if(n){if(t.type===`answer`){if(this.answered||typeof t.sdp!=`string`)return;if(e.fp?!il(t.sdp,e.fp):rl(t.sdp)===null){o(`answer: fingerprint does not match the link`),this.fail(`mismatch`);return}this.answered=!0;try{await n.setRemoteDescription({type:`answer`,sdp:t.sdp});for(let e of this.early.splice(0))await n.addIceCandidate(e).catch(()=>{})}catch{this.fail(`offer`)}}else if(t.type===`candidate`&&typeof t.candidate==`string`&&t.candidate){let e={candidate:t.candidate,sdpMid:typeof t.sdpMid==`string`?t.sdpMid:`0`,sdpMLineIndex:typeof t.sdpMLineIndex==`number`?t.sdpMLineIndex:0};this.answered?await n.addIceCandidate(e).catch(()=>{}):this.early.push(e)}}}opened(e){this.dc===e&&this.readyState===0&&(this.clearTimer(),this.readyState=1,o(`channel open`),this.leaveHub(),this.onopen?.(new Event(`open`)))}fromChannel(e){if(this.readyState!==1)return;if(typeof e==`string`){this.onmessage?.(new MessageEvent(`message`,{data:e}));return}if(!(e instanceof ArrayBuffer))return;let t=this.rx.push(e);switch(t.kind){case`ping`:try{this.dc?.send(cl(t.data))}catch{}return;case`message`:this.onmessage?.(new MessageEvent(`message`,{data:t.data}));return;case`error`:o(`channel: bad binary message (${t.why})`),this.dropped();return;default:return}}async netPath(){let e=this.pc;if(!e||this.readyState!==1||typeof e.getStats!=`function`)return null;try{return tl(await e.getStats())}catch{return null}}send(e){let t=this.dc;if(this.readyState!==1||!t||t.readyState!==`open`)throw Error(`not open`);if(typeof e==`string`){t.send(e);return}let n=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);for(let e of ol(n))t.send(e)}close(){this.readyState!==3&&(this.teardown(),this.emitClose(1e3,``,!0))}clearTimer(){this.timer&&clearTimeout(this.timer),this.timer=null}leaveHub(){let e=this.hub;if(this.hub=null,e)try{e.readyState===1&&e.send(JSON.stringify({t:`leave`})),e.close(1e3)}catch{}}hubRestarting(){let e=Date.now();return this.hubBackUntil||=e+fl,e>=this.hubBackUntil?!1:(o(`hub: restarting, trying again`),this.clearTimer(),this.leaveHub(),this.closePeer(),this.answered=!1,this.early=[],this.timer=setTimeout(()=>{this.timer=null,this.begin()},dl),!0)}teardown(){this.readyState=3,this.clearTimer(),this.leaveHub(),this.closePeer()}closePeer(){let e=this.pc,t=this.dc;this.pc=null,this.dc=null,this.media=null,this.offerSdp=null,this.offerSent=!1,this.ownEarly=[];try{t?.close()}catch{}try{e?.close()}catch{}}dropped(){this.readyState!==3&&(this.teardown(),this.emitClose(1006,``,!1))}fail(e){this.readyState!==3&&(o(`failed: ${e}`),this.teardown(),this.emitClose(He,`net:${e}`,!1))}emitClose(e,t,n){let r=this.onclose;if(!r)return;let i=typeof CloseEvent>`u`?{type:`close`,code:e,reason:t,wasClean:n}:new CloseEvent(`close`,{code:e,reason:t,wasClean:n});setTimeout(()=>r(i),0)}}return n=s,n.CONNECTING=0,n.OPEN=1,n.CLOSING=2,n.CLOSED=3,s}var yl=3e3;function H(e,t){return/^https?:\/\/[^/?#]+(\/[^?#]*)?\/join\/?$/.test(e)?e.replace(/^http/,`ws`).replace(/\/join\/?$/,`/${t}`):null}var bl=e=>H(e,`api/join/signal`);function xl(e){let t=[];if(e.rtc){let n=e.net??{room:``,key:``,fp:e.fp??``,hub:``};for(let[r,i]of[[`lan`,e.lan],[`tailscale`,e.ts]]){let a=i?bl(i):null;if(!a)continue;let o=e.rtcMake(n,{signalUrl:e.reach(a),...e.net?{}:{lan:!0}});t.push({via:r,make:()=>new o(``),pinned:!!n.fp})}if(e.net){let n=e.rtcMake(e.net,{});t.push({via:`hub`,make:()=>new n(``),pinned:!0})}}let n=e.lan?H(e.lan,`api/join/ws`):null;if(n){let r=e.reach(n);t.push({via:`socket`,make:()=>e.socket(r)})}return t}var Sl=new Map;function Cl(e,t,n=300,r=yl){let i=e.some(e=>e===`lan`||e===`tailscale`),a=e.some(e=>e!==`socket`);return e.map(e=>e===t?0:e===`hub`&&i?n:e===`socket`&&a?r:0)}function wl(e){let t=e.find(e=>e.via===`hub`),n=e.find(e=>(e.via===`lan`||e.via===`tailscale`)&&[`no_direct`,`net_full`,`offer`].includes(Ue(e.e)??``));return t&&(Ue(t.e)!==`no_hub`||!n)?t.e:n?n.e:t?.e??e[e.length-1]?.e??null}function Tl(e,t){var n;let r=t.log??(()=>{}),i=t.headStartMs??300,a=t.socketAfterMs??3e3;class o{constructor(e){this.CONNECTING=0,this.OPEN=1,this.CLOSING=2,this.CLOSED=3,this.readyState=0,this.binaryType=`arraybuffer`,this.onopen=null,this.onmessage=null,this.onclose=null,this.onerror=null,this.live=[],this.waiting=[],this.pinned=new Set,this.t0=0,this.closes=[],this.winner=null,setTimeout(()=>this.begin(),0)}get via(){return this.winner?.via??null}get media(){return this.winner?.s?.media??null}async netPath(){let e=this.winner?.s;return e?.netPath?e.netPath():null}begin(){if(this.readyState!==0)return;let n=e();if(!n.length){this.end({type:`close`,code:1006,reason:``,wasClean:!1});return}this.t0=Date.now();for(let e of n)e.pinned&&this.pinned.add(e.via);let r=Cl(n.map(e=>e.via),Sl.get(t.room)??null,i,a);n.forEach((e,t)=>{r[t]===0?this.launch(e.via,e.make):this.waiting.push({via:e.via,make:e.make,timer:setTimeout(()=>this.startWaiting(e.via),r[t])})})}startWaiting(e){let t=this.waiting.findIndex(t=>t.via===e);if(t<0)return;let[n]=this.waiting.splice(t,1);clearTimeout(n.timer),this.launch(n.via,n.make)}launch(e,t){if(this.readyState!==0)return;let n;try{n=t()}catch{this.tryClosed(e,{type:`close`,code:1006,reason:``,wasClean:!1});return}r(`path: trying ${e}`);let i={via:e,s:n};this.live.push(i),n.binaryType=this.binaryType,n.onopen=e=>this.won(i,e),n.onclose=t=>{this.live=this.live.filter(e=>e!==i),this.tryClosed(e,t)},n.onerror=()=>{},n.onmessage=null}tryClosed(e,t){if(this.readyState===0){if(r(`path: ${e} failed after ${Date.now()-this.t0} ms${t?.reason?` (${t.reason})`:``}`),this.closes.push({via:e,e:t}),this.pinned.has(e)&&Ue(t)===`mismatch`){for(let e of this.waiting.filter(e=>e.via===`socket`))clearTimeout(e.timer);this.waiting=this.waiting.filter(e=>e.via!==`socket`)}!this.live.length&&this.waiting.length?this.startWaiting(this.waiting[0].via):!this.live.length&&!this.waiting.length&&this.end(wl(this.closes))}}won(e,n){if(this.readyState!==0)return;this.winner=e,Sl.set(t.room,e.via),r(`path: playing by ${e.via} after ${Date.now()-this.t0} ms`);for(let e of this.waiting.splice(0))clearTimeout(e.timer);for(let t of this.live.splice(0))if(t!==e){t.s.onopen=t.s.onclose=t.s.onmessage=t.s.onerror=null;try{t.s.close()}catch{}}let i=e.s;i.onmessage=e=>this.onmessage?.(e),i.onerror=e=>this.onerror?.(e),i.onclose=e=>{this.readyState!==3&&(this.readyState=3,this.onclose?.(e))},this.readyState=1,t.onWin?.(e.via),this.onopen?.(n)}send(e){if(this.readyState!==1||!this.winner)throw Error(`not open`);this.winner.s.send(e)}close(e,t){if(this.readyState===3)return;let n=this.readyState===1;this.readyState=3;for(let e of this.waiting.splice(0))clearTimeout(e.timer);let r=this.winner?[this.winner,...this.live]:this.live.splice(0);for(let n of r){n.s.onopen=n.s.onclose=n.s.onmessage=n.s.onerror=null;try{n.s.close(e,t)}catch{}}let i=this.onclose;if(i){let r={type:`close`,code:e??1e3,reason:t??``,wasClean:n};setTimeout(()=>i(r),0)}}end(e){if(this.readyState===3)return;this.readyState=3;let t=this.onclose,n=e??{type:`close`,code:1006,reason:``,wasClean:!1};t&&setTimeout(()=>t(n),0)}}return n=o,n.CONNECTING=0,n.OPEN=1,n.CLOSING=2,n.CLOSED=3,o}ps();var El=new URLSearchParams(location.hash.slice(1)),Dl=El.get(`n`)?.trim()||null,U=nt(location.hash);U&&gl(U);var Ol=(0,x.createRoot)(document.getElementById(`root`));if(U){let e=vl(U,{video:!0,log:e=>console.info(`[join] ${e}`)}),t=Re(location.hash,`join`);Ol.render((0,z.jsx)(Zc,{url:nl(U.hub),invite:U.key,host:Dl,transport:e,lanUrl:t?ze(t,{key:U.key}):null}))}else{let e=El.get(`i`)||null,t=location.pathname.replace(/\/join\/?$/,``),n=`${location.protocol===`https:`?`wss`:`ws`}://${location.host}${t}/api/join/ws`,r=e=>console.info(`[join] ${e}`),i=`${location.origin}${t}/join`,a=typeof RTCPeerConnection>`u`?void 0:Tl(()=>xl({net:null,lan:i,ts:null,fp:tt(El.get(`fp`)),rtc:!0,reach:e=>e,rtcMake:(e,t)=>vl(e,{video:!0,log:r,...t}),socket:e=>new WebSocket(e)}),{room:i,log:r});Ol.render((0,z.jsx)(Zc,{url:n,invite:e,host:Dl,path:el(location.hostname),transport:a,internet:!1}))} diff --git a/site/pad/index.html b/site/pad/index.html index 5b9222869..a59aa0aa3 100644 --- a/site/pad/index.html +++ b/site/pad/index.html @@ -268,7 +268,7 @@ ã/¸Äyf"Ÿ5TàyÊ0îEê²Þ—€m6ëÞè6ðÏâ§9ž¬„k=}¼àt<ž‚¦Mdžç6"p_î3, oO3p"pw÷´/(1ñøs.íA/&ÏUÃ_X™ÍpÕ1hÌ80E’Qö„ ow÷!x.™AÜ"¢j+惡¦¶®ä“R–ow÷!xꔊpn…â#ðù z AÍp\Ž0N˜HJê´ªØ^U -I€wu¸öôú!3å6³‹âVq£³¹´RN£%y10º:pŠ#\:J:b9Hµ7h_Ž:¢I9 _¼™µV,þ <`});var w={a:v};this.setModule=t=>{e.setModule(fi,t)},this.getModule=()=>e.getModule(fi),this.instantiate=()=>(this.getModule().then(e=>WebAssembly.instantiate(e,w)).then(e=>{let t=e.exports;y(t),a=t.g,o(),ne(t),n()}),this.ready=new Promise(e=>{n=e}).then(()=>{this.HEAP=a.buffer,this.malloc=x,this.free=te,this.opus_frame_decoder_create=b,this.opus_frame_decode_float_deinterleaved=S,this.opus_frame_decoder_destroy=ee}),this)}var pi=o((()=>{}));function mi(e={}){mi.errors||Object.defineProperties(mi,{errors:{value:new Map([[-1,`OPUS_BAD_ARG: One or more invalid/out of range arguments`],[-2,`OPUS_BUFFER_TOO_SMALL: Not enough bytes allocated in the buffer`],[-3,`OPUS_INTERNAL_ERROR: An internal error was detected`],[-4,`OPUS_INVALID_PACKET: The compressed data passed is corrupted`],[-5,`OPUS_UNIMPLEMENTED: Invalid/unsupported request number`],[-6,`OPUS_INVALID_STATE: An encoder or decoder structure is invalid or already freed`],[-7,`OPUS_ALLOC_FAIL: Memory allocation has failed`]])}}),this._init=()=>new this._WASMAudioDecoderCommon(this).instantiate(this._EmscriptenWASM,this._module).then(e=>{this._common=e,this._inputBytes=0,this._outputSamples=0,this._frameNumber=0,this._input=this._common.allocateTypedArray(this._inputSize,Uint8Array),this._output=this._common.allocateTypedArray(this._outputChannels*this._outputChannelSize,Float32Array);let t=this._common.allocateTypedArray(this._channels,Uint8Array);t.buf.set(this._channelMappingTable),this._decoder=this._common.wasm.opus_frame_decoder_create(this._sampleRate,this._channels,this._streamCount,this._coupledStreamCount,t.ptr,this._preSkip,this._forceStereo)}),Object.defineProperty(this,"ready",{enumerable:!0,get:()=>this._ready}),this.reset=()=>(this.free(),this._init()),this.free=()=>{this._common.free(),this._common.wasm.opus_frame_decoder_destroy(this._decoder),this._common.wasm.free(this._decoder)},this._decode=e=>{if(!(e instanceof Uint8Array))throw Error(`Data to decode must be Uint8Array. Instead got `+typeof e);this._input.buf.set(e);let t=this._common.wasm.opus_frame_decode_float_deinterleaved(this._decoder,this._input.ptr,e.length,this._output.ptr),n;return t<0&&(n=`libopus `+t+` `+(mi.errors.get(t)||`Unknown Error`),console.error(n),t=0),{outputBuffer:this._common.getOutputChannels(this._output.buf,this._outputChannels,t),samplesDecoded:t,error:n}},this.decodeFrame=e=>{let t=[],n=this._decode(e);return n.error&&this._common.addError(t,n.error,e.length,this._frameNumber,this._inputBytes,this._outputSamples),this._frameNumber++,this._inputBytes+=e.length,this._outputSamples+=n.samplesDecoded,this._WASMAudioDecoderCommon.getDecodedAudioMultiChannel(t,[n.outputBuffer],this._outputChannels,n.samplesDecoded,this._sampleRate)},this.decodeFrames=e=>{let t=[],n=[],r=0,i=0;for(;itypeof e==`number`,n=e.sampleRate,r=e.channels,i=e.streamCount,a=e.coupledStreamCount,o=e.channelMappingTable,s=e.preSkip,c=+!!e.forceStereo;if(r>2&&(!t(i)||!t(a)||!Array.isArray(o)))throw Error(`Invalid Opus Decoder Options for multichannel decoding.`);return this._sampleRate=[8e3,12e3,16e3,24e3,48e3].includes(n)?n:48e3,this._channels=t(r)?r:2,this._streamCount=t(i)?i:1,this._coupledStreamCount=t(a)?a:this._channels-1,this._channelMappingTable=o||(this._channels===2?[0,1]:[0]),this._preSkip=s||0,this._forceStereo=r<=8&&r!=2?c:0,this._inputSize=3840*this._channels,this._outputChannelSize=5760,this._outputChannels=this._forceStereo?2:this._channels,this._ready=this._init(),this}var hi=o((()=>{di(),pi()})),gi,_i=o((()=>{di(),pi(),hi(),gi=class extends si{constructor(e){super(e,`opus-decoder`,mi,fi)}async decodeFrame(e){return this.postToDecoder(`decodeFrame`,e)}async decodeFrames(e){return this.postToDecoder(`decodeFrames`,e)}}})),vi=c({OpusDecoder:()=>mi,OpusDecoderWebWorker:()=>gi}),yi=o((()=>{hi(),_i(),di(),li(mi,`OpusDecoder`),li(gi,`OpusDecoderWebWorker`)})),bi=[8e3,12e3,16e3,24e3,48e3],xi=null;function Si(){return xi??=Vn(()=>Promise.resolve().then(()=>(yi(),vi)),__VITE_PRELOAD__,import.meta.url).catch(e=>{throw xi=null,e}),xi}function Ci(){return typeof WebAssembly==`object`&&typeof WebAssembly.instantiate==`function`}function wi(e,t,n,r){return{numberOfFrames:t,numberOfChannels:e.length,sampleRate:n,timestamp:r,format:`f32-planar`,duration:Math.round(t/n*1e6),copyTo(n,r){n.set(e[r.planeIndex].subarray(0,t))},close(){}}}var Ti=class{constructor(e,t=Si){this.init=e,this.load=t,this.state=`unconfigured`,this.dec=null,this.pending=[]}configure(e){if(this.state===`closed`)throw Error(`the decoder is closed`);if(!Ci())throw Error(`no WebAssembly here`);let t=e.sampleRate;if(!bi.includes(t))throw Error(`Opus does not decode at ${t} Hz`);let n=e.numberOfChannels;if(n<1||n>2)throw Error(`${n} channels: only mono and stereo are decoded`);this.state=`configured`,this.load().then(async e=>{if(this.state===`closed`)return;let r=new e.OpusDecoder({channels:n,sampleRate:t});if(await r.ready,this.state!==`configured`){r.free();return}this.dec=r;let i=this.pending;this.pending=[];for(let e of i)this.state===`configured`&&this.run(e)}).catch(e=>this.fail(e))}decode(e){if(this.state!==`configured`)return;let t=e;if(this.dec)return this.run(t);this.pending.push({timestamp:t.timestamp,data:t.data.slice()}),this.pending.length>50&&this.pending.shift()}run(e){let t=this.dec;if(!t)return;let n;try{n=t.decodeFrame(e.data)}catch(e){return this.fail(e)}n.samplesDecoded&&n.channelData.length&&this.init.output(wi(n.channelData,n.samplesDecoded,n.sampleRate,e.timestamp))}fail(e){if(this.state===`closed`)return;this.close();let t=e instanceof Error?e:Error(String(e));queueMicrotask(()=>this.init.error(t))}close(){this.state=`closed`,this.pending=[];let e=this.dec;this.dec=null;try{e?.free()}catch{}}},Ei={makeDecoder:e=>new Ti(e),makeChunk:e=>({type:e.type,timestamp:e.timestamp,data:e.data instanceof Uint8Array?e.data:new Uint8Array(e.data)})};function Di(e,t){for(let n=0;n+3>1&63;if(t>=16&&t<=21)return!0;if(t<16)return!1}else{let t=e[n+3]&31;if(t===5)return!0;if(t===1)return!1}}return!1}function Oi(e){for(let t=0;t+6e.toString(16).padStart(2,`0`);return`avc1.${n(e[t+4])}${n(e[t+5])}${n(e[t+6])}`}return`avc1.4d4028`}var ki=[`hev1.1.6.L153.B0`,`hvc1.1.6.L153.B0`,`hev1.2.4.L153.B0`,`hvc1.2.4.L153.B0`,`hev1.1.6.L150.90`];async function Ai(e,t){if(typeof VideoDecoder>`u`)return null;for(let n of ki)try{if((await VideoDecoder.isConfigSupported({codec:n,codedWidth:e,codedHeight:t})).supported)return n}catch{}return null}function ji(e){let t=[];for(let n=0;n+2{let i=r+1n&&e[i-1]===0;)i--;return e.subarray(n,i)}).filter(e=>e.length>0)}var Mi=(e,t)=>t?e[0]>>1&63:e[0]&31;function j(e,...t){let n=8+t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(n);new DataView(r.buffer).setUint32(0,n);for(let t=0;t<4;t++)r[4+t]=e.charCodeAt(t);let i=8;for(let e of t)r.set(e,i),i+=e.length;return r}function M(...e){let t=new Uint8Array(e.reduce((e,[,t])=>e+t,0)),n=0;for(let[r,i]of e){for(let e=i-1;e>=0;e--)t[n+i-1-e]=Math.floor(r/2**(8*e))&255;n+=i}return t}var Ni=(e,t,n,...r)=>j(e,M([t,1],[n,3]),...r),Pi=M([65536,4],[0,4],[0,4],[0,4],[65536,4],[0,4],[0,4],[0,4],[1073741824,4]);function Fi(e){let t=e.handler===`vide`,n=j(`ftyp`,new TextEncoder().encode(`isom`),M([1,4]),new TextEncoder().encode(`isomiso6mp41`)),r=j(`moov`,Ni(`mvhd`,0,0,M([0,4],[0,4],[e.timescale,4],[0,4],[65536,4],[256,2],[0,2],[0,4],[0,4]),Pi,new Uint8Array(24),M([2,4])),j(`trak`,Ni(`tkhd`,0,3,M([0,4],[0,4],[1,4],[0,4],[0,4],[0,4],[0,4],[0,2],[0,2],[t?0:256,2],[0,2]),Pi,M([(e.width??0)*65536,4],[(e.height??0)*65536,4])),j(`mdia`,Ni(`mdhd`,0,0,M([0,4],[0,4],[e.timescale,4],[0,4],[21956,2],[0,2])),Ni(`hdlr`,0,0,M([0,4]),new TextEncoder().encode(e.handler),new Uint8Array(12),M([0,1])),j(`minf`,t?Ni(`vmhd`,0,1,new Uint8Array(8)):Ni(`smhd`,0,0,M([0,4])),j(`dinf`,Ni(`dref`,0,0,M([1,4]),Ni(`url `,0,1))),j(`stbl`,Ni(`stsd`,0,0,M([1,4]),e.sampleEntry),Ni(`stts`,0,0,M([0,4])),Ni(`stsc`,0,0,M([0,4])),Ni(`stsz`,0,0,M([0,4],[0,4])),Ni(`stco`,0,0,M([0,4])))))),j(`mvex`,Ni(`trex`,0,0,M([1,4],[1,4],[0,4],[0,4],[0,4])))),i=new Uint8Array(n.length+r.length);return i.set(n,0),i.set(r,n.length),i}function Ii(e,t,n,r,i){let a=i?33554432:16842752,o=e=>Ni(`trun`,0,1793,M([1,4],[e,4],[n,4],[r.length,4],[a,4])),s=e=>j(`traf`,Ni(`tfhd`,0,131072,M([1,4])),Ni(`tfdt`,1,0,M([t,8])),o(e)),c=Ni(`mfhd`,0,0,M([e,4])),l=j(`moof`,c,s(0)).length,u=j(`moof`,c,s(l+8)),d=j(`mdat`,r),f=new Uint8Array(u.length+d.length);return f.set(u,0),f.set(d,u.length),f}function Li(e,t,n=!1){let r=t?[35,...n?[32,33,34]:[]]:[9,...n?[7,8]:[]],i=ji(e).filter(e=>!r.includes(Mi(e,t))),a=new Uint8Array(i.reduce((e,t)=>e+4+t.length,0)),o=new DataView(a.buffer),s=0;for(let e of i)o.setUint32(s,e.length),a.set(e,s+4),s+=4+e.length;return a}var Ri=e=>e.toString(16).padStart(2,`0`),zi=e=>{let t=new Uint8Array(2+e.length);return t[0]=e.length>>8,t[1]=e.length&255,t.set(e,2),t},Bi=e=>{let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t};function Vi(e){let t=ji(e),n=t.filter(e=>Mi(e,!1)===7),r=t.filter(e=>Mi(e,!1)===8);return!n.length||!r.length||n[0].length<4?null:Bi([M([1,1],[n[0][1],1],[n[0][2],1],[n[0][3],1],[255,1],[224|n.length,1]),...n.map(zi),M([r.length,1]),...r.map(zi)])}function Hi(e,t,n){let r=ji(e),i=e=>r.filter(n=>Mi(n,t)===e),a=(e,t)=>j(e,new Uint8Array(6),M([1,2],[0,16],[n.w,2],[n.h,2],[4718592,4],[4718592,4],[0,4],[1,2]),new Uint8Array(32),M([24,2],[65535,2]),t);if(!t){let t=i(7),r=Vi(e);return r?{init:Fi({handler:`vide`,timescale:9e4,sampleEntry:a(`avc1`,j(`avcC`,r)),width:n.w,height:n.h}),mime:`video/mp4; codecs="avc1.${Ri(t[0][1])}${Ri(t[0][2])}${Ri(t[0][3])}"`}:null}let o=i(32),s=i(33),c=i(34);if(!o.length||!s.length||!c.length)return null;let l=Vr(s[0]);if(l.length<15)return null;let u=l.subarray(3,15),d=u[0]&31,f=d===2?2:0,p=(e,t)=>Bi([M([128|e,1],[t.length,2]),...t.map(zi)]),m=j(`hvcC`,M([1,1]),u,M([61440,2],[252,1],[253,1],[248|f,1],[248|f,1],[0,2],[15,1],[3,1]),p(32,o),p(33,s),p(34,c)),h=[``,`A`,`B`,`C`][u[0]>>6],g=0,_=(u[1]<<24|u[2]<<16|u[3]<<8|u[4])>>>0;for(let e=0;e<32;e++)_&1<>>0).toString(16),`${u[0]&32?`H`:`L`}${u[11]}`,...v.map(e=>e.toString(16))].join(`.`);return{init:Fi({handler:`vide`,timescale:9e4,sampleEntry:a(`hvc1`,m),width:n.w,height:n.h}),mime:`video/mp4; codecs="${y}"`}}function Ui(e,t,n,r,i,a){return Ii(e,t,n,Li(r,i),a)}function Wi(e,t){let n=j(`dOps`,M([0,1],[e,1],[312,2],[t,4],[0,2],[0,1]));return Fi({handler:`soun`,timescale:48e3,sampleEntry:j(`Opus`,new Uint8Array(6),M([1,2],[0,8],[e,2],[16,2],[0,4],[3145728e3,4]),n)})}function Gi(e){if(!e.length)return 960;let t=e[0]>>3,n=t<12?[480,960,1920,2880][t%4]:t<16?[480,960][t%2]:[120,240,480,960][t%4],r=e[0]&3,i=r===0?1:r===3?(e[1]??1)&63:2;return n*Math.max(1,i)}function Ki(e,t,n){return Ii(e,t,Gi(n),n,!0)}var qi={watch:30,player:4},Ji={watch:{seek:.5,speed:1/0,target:.05},player:{seek:.15,speed:.06,target:.02}},Yi={seek:.8,speed:.25,target:.12};function Xi(e,t,n){let r=typeof n==`string`?Ji[n]:n;return e>r.seek?{seekTo:t-r.target,rate:1}:e>r.speed?{seekTo:null,rate:1.1}:{seekTo:null,rate:1}}function Zi(e,t=`watch`,n){return typeof VideoDecoder<`u`?new ca(e,t,n):new ba(e,t,n)}var Qi=class{constructor(e,t=()=>performance.now()){this.ask=e,this.now=t,this.last=-1/0}waiting(){if(!this.ask)return;let e=this.now();e-this.last<1e3||(this.last=e,this.ask())}};function $i(e){return e.length<3?null:{index:e[0]<<8|e[1],packet:e.subarray(2)}}var ea=class{constructor(){this.last=-1}take(e){if(this.last>=0){let t=e-this.last&65535;if(t===0||t>=32768)return!1}return this.last=e,!0}reset(){this.last=-1}};function ta(e){if(e.length>=10)return e;let t=new Uint8Array(10);t.set(e.subarray(0,6));let n=new DataView(t.buffer);return n.setUint32(6,Math.round(n.getUint32(2)/100)||480),t}function na(e,t){return{snd:e,snd_decoded:t.decoded,snd_concealed:t.concealed,snd_underruns:t.underruns,snd_dropped:t.dropped}}var ra=class{constructor(e,t=.2){this.min=e,this.max=t,this.next=0,this.calmSince=0,this.minLead=1/0,this.windowAt=0,this.underruns=0,this.dropped=0,this.cushion=e}at(e,t){this.next0&&(this.underruns++,this.cushion=Math.min(this.max,this.cushion+.02)),this.calmSince=e,this.next=e+this.cushion,this.minLead=1/0,this.windowAt=e):e-this.calmSince>10&&this.cushion>this.min&&(this.cushion=Math.max(this.min,this.cushion-.01),this.calmSince=e);let n=this.next-e;if(n>this.cushion+.15)return this.dropped++,null;if(this.minLead=Math.min(this.minLead,n),e-this.windowAt>=.25){let t=this.minLead>this.cushion+ia;if(this.minLead=1/0,this.windowAt=e,t)return this.dropped++,null}let r=this.next;return this.next+=t,r}reset(){this.next=0}},ia=.02;async function aa(e,t){try{return typeof AudioDecoder>`u`?!1:!!(await AudioDecoder.isConfigSupported({codec:`opus`,sampleRate:e,numberOfChannels:t})).supported}catch{return!1}}var oa=class{constructor(e,t=()=>performance.now()){this.decoder=e,this.now=t,this.n={frames:0,dropped:0,late:0,stalls:0,stall_ms:0,worst_stall_ms:0,key_waits:0},this.a=0,this.d=0,this.w=!1,this.q=[],this.sum=0,this.cnt=0,this.codec=``}get frames(){return this.n.frames}arrived(){let e=this.now();this.a&&e-this.a>50&&this.n.late++,this.a=e}drop(){this.n.dropped++,this.w||this.n.key_waits++,this.w=!0}decoding(){this.w=!1,this.q.push(this.now())>64&&this.q.shift()}drawn(e=!1){let t=this.now(),n=e?this.q.shift():void 0;n!==void 0&&(this.sum+=t-n,this.cnt++);let r=this.d?t-this.d:0;r>100&&this.stall(r),this.d=t,this.n.frames++}stall(e){this.n.stalls++,this.n.stall_ms+=e,this.n.worst_stall_ms=Math.max(this.n.worst_stall_ms,e)}snapshot(){let e=this.d?this.now()-this.d:0,t={...this.n,decoder:this.decoder};this.codec&&(t.codec=this.codec),e>100&&(t.stalls=this.n.stalls+1,t.stall_ms=this.n.stall_ms+e,t.worst_stall_ms=Math.max(this.n.worst_stall_ms,e));for(let e of[`stall_ms`,`worst_stall_ms`])t[e]=Math.round(t[e]);return t.decode_ms=this.cnt?Math.round(this.sum/this.cnt*10)/10:0,this.sum=this.cnt=0,t}},sa=[`pointerup`,`touchend`,`click`,`keydown`],ca=class{get element(){if(!this.wrap){let e=document.createElement(`div`);e.className=`h-full w-full`,e.append(this.canvas),this.mse&&e.append(this.mse.element),this.wrap=e}return this.wrap}get stats(){return this.mse?.stats??this.ownStats}soundReport(){return this.soundOn?this.mseSound?this.mseSound.report():na(this.soundWasm?`wasm`:`webcodecs`,this.soundStats):null}constructor(e,t=`watch`,n){this.onProblem=e,this.latency=t,this.onNeedKey=n,this.canvas=document.createElement(`canvas`),this.wrap=null,this.mse=null,this.failsNoPicture=0,this.ctx=this.canvas.getContext(`2d`,{alpha:!1}),this.hevc=!1,this.header=null,this.spsRect=null,this.software=!1,this.video=null,this.opening=!1,this.stopped=!1,this.sawKey=!1,this.ownStats=new oa(`webcodecs`),this.problemShown=!1,this.ts=0,this.pipe=null,this.audioGen=0,this.actx=null,this.soundOn=!1,this.unarm=null,this.mseSound=null,this.audioHeader=null,this.soundWasm=!1,this.onSoundFail=null,this.muted=!1,this.keyAsk=new Qi(n),this.clock=new ra(t===`player`?.05:.08),typeof AudioDecoder>`u`&&N()&&(this.mseSound=new P(t,()=>this.mseSoundFailed())),this.canvas.className=`block h-full w-full object-contain`,this.canvas.dataset.testid=`watch-canvas`}setHevc(e){this.hevc=e,this.header&&(this.spsRect=qr(this.header,e)),this.mse?.setHevc(e)}get onMse(){return!!this.mse}decodeFailed(){if(this.mse||this.ownStats.frames>0||++this.failsNoPicture<3||!fa())return!1;let e=new ba(this.onProblem,this.latency,this.onNeedKey);e.setHevc(this.hevc),e.markProblemShown(),this.mse=e;let t=this.video;this.video=null;try{t?.close()}catch{}return this.canvas.style&&(this.canvas.style.display=`none`),this.wrap?.append(e.element),this.header&&e.onMessage(new Uint8Array([0,...this.header]).buffer),this.onNeedKey?.(),!0}startSound(){this.soundOn=!0,la(),this.mseSound?this.mseSound.start():this.openContext()}openContext(){try{if(!this.actx){let e=new AudioContext({latencyHint:`interactive`});this.actx=e,e.onstatechange=()=>{this.actx===e&&e.state!==`running`&&e.state!==`closed`&&this.armResume()}}this.actx.resume().catch(()=>{})}catch{this.onSoundFail?.()}}get sound(){return this.soundOn}setMuted(e){this.muted=e,this.mseSound?.setMuted(e)}resumeSound(){if(!this.soundOn)return;if(this.mseSound)return this.mseSound.resume();let e=this.actx;e&&e.state!==`running`&&e.state!==`closed`&&(this.clock.reset(),e.resume().catch(()=>{}),this.armResume())}get soundStats(){return{decoded:this.pipe?.decoded??0,concealed:this.pipe?.concealed??0,underruns:this.clock.underruns,dropped:this.clock.dropped,cushionMs:Math.round(this.clock.cushion*1e3)}}armResume(){if(this.unarm||typeof window>`u`||!window.addEventListener)return;let e=()=>{let e=this.actx;if(!e||e.state===`closed`)return this.unarm?.();this.clock.reset(),e.resume().then(()=>{e.state===`running`&&this.unarm?.()}).catch(()=>{})};for(let t of sa)window.addEventListener(t,e,!0);this.unarm=()=>{for(let t of sa)window.removeEventListener(t,e,!0);this.unarm=null}}onMessage(e){let t=new Uint8Array(e);if(t.length<1||this.stopped)return;let n=t[0],r=t.subarray(1);if(this.mse&&(n===0||n===1))return n===0&&(this.header=r.slice()),this.mse.onMessage(e);n===0?this.openVideo(r.slice()):n===1?this.onVideo(r):n===3?this.openAudio(r.slice()):n===4&&this.onAudio(r)}async openVideo(e){if(this.header=e,this.spsRect=qr(e,this.hevc),!this.opening){this.opening=!0;try{let t=this.hevc?await xa(e):Oi(e);if(this.mse||this.stopped)return;if(!t){this.problemShown=!0,this.onProblem(`no_hevc`);return}this.ownStats.codec=t;let n=this.hevc?void 0:Vi(e)??void 0;try{this.video?.close()}catch{}let r=new VideoDecoder({output:e=>{let t=this.realVisible(e),n=this.canvas;(n.width!==t.displayWidth||n.height!==t.displayHeight)&&(n.width=t.displayWidth,n.height=t.displayHeight),this.ctx?.drawImage(t,0,0,n.width,n.height),this.ownStats.drawn(!0),t.close(),this.problemShown&&(this.problemShown=!1,this.onProblem(null))},error:()=>{this.video===r&&(this.problemShown=!0,this.onProblem(`decode`),this.decodeFailed()||this.rebuild())}}),i={codec:t,optimizeForLatency:!0};n&&(i.description=n),this.software&&(i.hardwareAcceleration=`prefer-software`),r.configure(i),this.video=r,this.sawKey=!1}catch{this.problemShown=!0,this.onProblem(`decode`),this.decodeFailed()}finally{this.opening=!1}}}realVisible(e){let t=this.spsRect,n=Jr(e,t);if(n)try{let t=new VideoFrame(e,{visibleRect:{x:n.x,y:n.y,width:n.w,height:n.h},displayWidth:n.w,displayHeight:n.h});return e.close(),t}catch{return e}let r=e.visibleRect;if(t&&r&&!this.software&&(r.width{if(this.video===e){try{e?.close()}catch{}this.rebuild(),this.onNeedKey?.()}})}return e}rebuild(){this.mse||this.stopped||(this.video=null,this.sawKey=!1,this.header&&this.openVideo(this.header).then(()=>this.keyAsk.waiting()))}onVideo(e){let t=this.video;if(t?.state===`closed`){this.opening||this.rebuild();return}if(!t||t.state!==`configured`)return;let n=Di(e,this.hevc);if(this.ownStats.arrived(),!this.sawKey&&!n)return this.ownStats.drop(),this.keyAsk.waiting();if(!n&&t.decodeQueueSize>qi[this.latency])return this.sawKey=!1,this.ownStats.drop(),this.keyAsk.waiting();this.sawKey=!0;let r=e;this.hevc?n&&this.header&&(r=new Uint8Array(this.header.length+e.length),r.set(this.header,0),r.set(e,this.header.length)):r=Li(e,!1,!0),this.ts+=16667,this.ownStats.decoding(),t.decode(new EncodedVideoChunk({type:n?`key`:`delta`,timestamp:this.ts,data:r}))}openAudio(e){if(e.length<6)return;let t=++this.audioGen;if(this.pipe?.reset(),this.pipe=null,this.clock.reset(),this.audioHeader=e,this.mseSound)return this.mseSound.setHeader(e);let n=e[0];aa(new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(2),n).then(n=>{if(t!==this.audioGen)return;if(!n)return N()?this.soundThroughMse(e):this.soundThroughWasm(e);let r=new Qr((e,t)=>this.play(e,t,r.sampleRate));try{r.header(ta(e)),this.pipe=r}catch{this.soundThroughMse(e)}})}soundThroughMse(e){this.pipe=null,this.mseSound||(this.mseSound=new P(this.latency,()=>this.mseSoundFailed()),this.soundOn&&this.mseSound.start()),this.mseSound.setHeader(e)}soundThroughWasm(e){this.pipe?.reset(),this.soundWasm=!0;let t=new Qr((e,n)=>this.play(e,n,t.sampleRate),Ei,()=>{this.pipe===t&&(this.pipe=null),this.onSoundFail?.()});this.pipe=t,t.header(ta(e))}mseSoundFailed(){let e=this.mseSound;e&&(this.mseSound=null,e.stop(),this.soundOn&&(this.openContext(),this.actx&&this.actx.state!==`running`&&this.armResume()),this.audioHeader&&this.soundThroughWasm(this.audioHeader))}onAudio(e){if(this.mseSound)return this.mseSound.frame(e);this.soundOn&&this.pipe&&this.pipe.packet(e)}play(e,t,n){let r=this.actx;if(!r||r.state!==`running`||!e.length)return;let i=e[0].length,a=this.clock.at(r.currentTime,i/n);if(a===null)return;let o=r.createBuffer(e.length,i,n),s=this.muted?0:t;e.forEach((e,t)=>o.copyToChannel(s===1?e:e.map(e=>e*s),t));let c=r.createBufferSource();c.buffer=o,c.connect(r.destination),c.start(a)}stop(){this.stopped=!0;try{this.video?.close()}catch{}this.mse?.stop(),this.audioGen++,this.pipe?.reset(),this.pipe=null,this.unarm?.(),this.actx?.close().catch(()=>{}),this.mseSound?.stop()}};function la(){try{let e=navigator.audioSession;e&&e.type!==`playback`&&(e.type=`playback`)}catch{}}function ua(e,t){try{return e.isTypeSupported(t)}catch{return!1}}function N(){let e=typeof window>`u`?null:fa();return!!e&&(ua(e,`audio/mp4; codecs="Opus"`)||ua(e,`audio/mp4; codecs="opus"`))}var P=class{constructor(e,t,n=document.createElement(`audio`)){this.onFail=t,this.header=null,this.time=0,this.on=!1,this.failed=!1,this.order=new ea,this.el=n,this.track=new ga(n,()=>this.fail(),e===`player`?Yi:e)}get playing(){return this.on&&!this.failed}report(){return{snd:`mse`,snd_jumps:this.track.seeks}}setHeader(e){this.header=e,this.on&&this.open()}start(){if(!this.on&&(this.on=!0,this.header&&this.open(),!this.failed))try{this.el.play()?.catch?.(()=>{})}catch{}}frame(e){if(!this.on||this.failed||!this.track.ready&&!this.track.backlog)return;let t=$i(e);if(!t||!this.order.take(t.index))return;let n=Ki(this.track.nextSeq(),this.time,t.packet);this.time+=Gi(t.packet),this.track.push(n)}setMuted(e){this.el.muted=e}resume(){if(this.playing&&this.el.paused)try{this.el.play()?.catch?.(()=>{})}catch{}}stop(){this.on=!1,this.track.close()}open(){let e=this.header;if(!e||e.length<6||this.failed)return;let t=e[0],n=Wi(t,new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(2));this.track.open(`audio/mp4; codecs="Opus"`,n)||this.track.open(`audio/mp4; codecs="opus"`,n)?(this.time=0,this.order.reset()):this.fail()}fail(){this.failed||(this.failed=!0,this.onFail())}},da=class{constructor(e,t,n=Ei){this.onFail=t,this.codecs=n,this.actx=null,this.pipe=null,this.header=null,this.on=!1,this.failed=!1,this.muted=!1,this.unarm=null,this.played=!1,this.clock=new ra(e===`player`?.05:.08)}get playing(){return this.on&&!this.failed}get stats(){return{decoded:this.pipe?.decoded??0,concealed:this.pipe?.concealed??0,underruns:this.clock.underruns,dropped:this.clock.dropped}}start(){if(!this.failed){this.on=!0,la();try{if(!this.actx){let e=new AudioContext({latencyHint:`interactive`});this.actx=e,e.onstatechange=()=>{this.actx===e&&e.state!==`running`&&e.state!==`closed`&&this.armResume()}}this.actx.resume().catch(()=>{}),this.actx.state!==`running`&&this.armResume()}catch{return this.fail()}this.header&&!this.pipe&&this.open()}}setHeader(e){e.length<6||(this.header=e,this.pipe?.reset(),this.pipe=null,this.clock.reset(),this.on&&this.open())}frame(e){this.on&&!this.failed&&this.pipe?.packet(e)}setMuted(e){this.muted=e}resume(){let e=this.actx;this.playing&&e&&e.state!==`running`&&e.state!==`closed`&&(this.clock.reset(),e.resume().catch(()=>{}),this.armResume())}stop(){this.on=!1,this.pipe?.reset(),this.pipe=null,this.unarm?.(),this.actx?.close().catch(()=>{}),this.actx=null}open(){let e=this.header;if(!e||this.failed)return;let t=new Qr((e,n)=>this.play(e,n,t.sampleRate),this.codecs,()=>{this.pipe===t&&this.fail()});this.pipe=t,t.header(ta(e))}play(e,t,n){let r=this.actx;if(!r||r.state!==`running`||!e.length)return;let i=e[0].length,a=this.clock.at(r.currentTime,i/n);if(a===null)return;let o=r.createBuffer(e.length,i,n),s=this.muted?0:t;e.forEach((e,t)=>o.copyToChannel(s===1?e:e.map(e=>e*s),t));let c=r.createBufferSource();c.buffer=o,c.connect(r.destination),c.start(a),this.played=!0}armResume(){if(this.unarm||typeof window>`u`||!window.addEventListener)return;let e=()=>{let e=this.actx;if(!e||e.state===`closed`)return this.unarm?.();this.clock.reset(),e.resume().then(()=>{e.state===`running`&&this.unarm?.()}).catch(()=>{})};for(let t of sa)window.addEventListener(t,e,!0);this.unarm=()=>{for(let t of sa)window.removeEventListener(t,e,!0);this.unarm=null}}fail(){this.failed||(this.failed=!0,this.stop(),this.onFail())}};function fa(){let e=window;return e.ManagedMediaSource??e.MediaSource??null}var pa=10,ma=3;function ha(e,t,n,r=ma){let i=null;for(let a of e)a>t&&a<=n-r&&(i=a);return i}var ga=class{constructor(e,t,n=`watch`,r,i=()=>performance.now()){this.el=e,this.onError=t,this.latency=n,this.onNeedKey=r,this.now=i,this.ms=null,this.sb=null,this.queue=[],this.mime=``,this.seq=1,this.ready=!1,this.dropped=!1,this.keys=null,this.seeks=0,this.maxLagS=0,this.fromZero=0,this.trims=0,this.lastJump=null,this.trimAt=-1,this.trimFrom=-1,this.keyAt=-1,this.attached=null,r&&(this.keys=[])}setEdge(e){this.latency=e}markKey(e){this.keys?.push(e),this.keyAt=this.now()}open(e,t){let n=fa();if(!n||!ua(n,e))return!1;this.close();let r=new n;return this.ms=r,this.mime=e,this.queue=[t],this.seq=1,this.ready=!1,this.keys&&=[],r.addEventListener(`sourceopen`,()=>{if(this.ms===r)try{let e=r.addSourceBuffer(this.mime);e.mode=`segments`,e.addEventListener(`updateend`,()=>this.pump()),e.addEventListener(`error`,()=>this.onError()),this.sb=e,this.ready=!0,this.pump()}catch{this.onError()}}),`ManagedMediaSource`in window&&n===window.ManagedMediaSource&&(this.el.disableRemotePlayback=!0),this.attached=_a(this.el,r),!0}nextSeq(){return this.seq++}get backlog(){return this.queue.length}push(e){this.queue.push(e),this.pump()}pump(){let e=this.sb;if(!e||e.updating||!this.ready)return;let t=this.el;if(e.buffered.length){let n=e.buffered.end(e.buffered.length-1),r=e.buffered.start(0),i=n-t.currentTime,a=Xi(i,n,this.latency);if(a.seekTo!==null){this.seeks++,this.maxLagS=Math.max(this.maxLagS,i);let o=this.now(),s=e=>e<0?-1:Math.round(o-e);t.currentTime<.05&&r>1&&this.fromZero++,this.lastJump={at:t.currentTime,start:r,end:n,ranges:e.buffered.length,readyState:t.readyState,paused:t.paused,seeking:t.seeking,sinceTrimMs:s(this.trimAt),trimFrom:this.trimFrom,sinceKeyMs:s(this.keyAt)},t.currentTime=Math.max(r,a.seekTo)}if(t.playbackRate!==a.rate&&(t.playbackRate=a.rate),t.currentTime-r>pa&&this.trim(e,r))return}let n=this.queue.shift();if(n){try{e.appendBuffer(n)}catch{this.dropped=!0}t.paused&&t.play().catch(()=>{})}}trim(e,t){let n=this.el.currentTime,r=n-ma;if(this.keys){if(r=ha(this.keys,t,n),r===null)return(this.keys[this.keys.length-1]??-1/0)<=n-ma&&this.onNeedKey?.(),!1;let e=r;this.keys=this.keys.filter(t=>t>=e),r-=.001}try{return e.remove(t,r),this.trims++,this.trimAt=this.now(),this.trimFrom=n,!0}catch{return!1}}close(){this.ready=!1,this.sb=null,this.queue=[];let e=this.ms;if(this.ms=null,e&&e.readyState===`open`)try{e.endOfStream()}catch{}if(this.attached===`object`)try{this.el.srcObject=null}catch{}this.attached=null,this.el.src?.startsWith(`blob:`)&&URL.revokeObjectURL(this.el.src),this.el.removeAttribute(`src`)}};function _a(e,t){if(`srcObject`in e)try{return e.srcObject=t,`object`}catch{}return e.src=URL.createObjectURL(t),`url`}var va=1e4,ya=class{constructor(e=3,t=va,n=()=>performance.now()){this.max=e,this.windowMs=t,this.now=n,this.at=[]}fail(){let e=this.now();return this.at=this.at.filter(t=>e-t=this.max}clear(){this.at=[]}},ba=class{constructor(e,t=`watch`,n,r){this.onProblem=e,this.latency=t,this.wasm=null,this.audioHeader=null,this.muted=!1,this.gaveUp=!1,this.reopening=!1,this.failedWhileOpening=!1,this.wrap=document.createElement(`div`),this.hevc=!1,this.header=null,this.sawKey=!1,this.stats=new oa(`mse`),this.problemShown=!1,this.vTime=0,this.vLast=0,this.soundOn=!1,this.onSoundFail=null,this.onGiveUp=null,this.keyAsk=new Qi(n),this.fails=new ya(3,va,r);let i=document.createElement(`video`);i.muted=!0,i.autoplay=!0,i.playsInline=!0,i.className=`block h-full w-full object-contain`,i.dataset.testid=`watch-video`,this.audio=new P(t,()=>this.soundThroughWasm()),this.wrap.className=`h-full w-full`,this.wrap.append(i,this.audio.el),this.video=new ga(i,()=>this.showProblem(),t,()=>this.keyAsk.waiting()),i.addEventListener(`error`,()=>this.restartVideo()),i.addEventListener(`playing`,()=>{this.fails.clear(),this.problemShown&&(this.problemShown=!1,this.onProblem(null))})}markProblemShown(){this.problemShown=!0}showProblem(){this.problemShown||(this.problemShown=!0,this.onProblem(`decode`))}restartVideo(){if(this.gaveUp)return;if(this.reopening){this.failedWhileOpening=!0;return}if(this.showProblem(),this.fails.fail()){this.gaveUp=!0,this.video.close(),this.onGiveUp?.();return}let e=this.header;if(e){this.header=null,this.reopening=!0,this.failedWhileOpening=!1;try{this.openVideo(e)}finally{this.reopening=!1}this.sawKey=!1,this.keyAsk.waiting(),this.failedWhileOpening&&(this.failedWhileOpening=!1,this.restartVideo())}}get failed(){return this.gaveUp}setVideoEdge(e){this.video.setEdge(e)}get videoSeeks(){return{seeks:this.video.seeks,maxLagMs:Math.round(this.video.maxLagS*1e3),fromZero:this.video.fromZero,trims:this.video.trims,lastJump:this.video.lastJump}}get element(){return this.wrap}resume(){let e=this.video.el;e.paused&&e.play()?.catch?.(()=>{})}setHevc(e){this.hevc=e}startSound(){if(this.soundOn=!0,this.wasm)return this.wasm.start();if(!N())return this.soundThroughWasm();this.audio.start()}soundThroughWasm(){if(this.wasm)return;this.audio.stop();let e=new da(this.latency,()=>this.onSoundFail?.());this.wasm=e,e.setMuted(this.muted),this.audioHeader&&e.setHeader(this.audioHeader),this.soundOn&&e.start()}resumeSound(){this.soundOn&&(this.wasm?this.wasm.resume():this.audio.resume())}setMuted(e){this.muted=e,this.audio.setMuted(e),this.wasm?.setMuted(e)}soundReport(){return this.soundOn?this.wasm?na(`wasm`,this.wasm.stats):this.audio.report():null}get soundPlaying(){return this.wasm?this.wasm.played:this.audio.playing}get sound(){return this.soundOn}onMessage(e){let t=new Uint8Array(e);if(t.length<1)return;let n=t[0],r=t.subarray(1);n===0?this.openVideo(r.slice()):n===1?this.onVideo(r):n===3?(this.audioHeader=r.slice(),(this.wasm??this.audio).setHeader(this.audioHeader)):n===4&&(this.wasm??this.audio).frame(r)}openVideo(e){let t=!!this.header&&this.header.length===e.length&&this.header.every((t,n)=>t===e[n]);if(t&&this.video.ready)return;if(this.gaveUp){if(t)return;this.gaveUp=!1,this.fails.clear()}this.header=e;let n=qr(e,this.hevc)??{w:1920,h:1080},r=Hi(e,this.hevc,n);r&&(this.stats.codec=/codecs="([^"]+)"/.exec(r.mime)?.[1]??``,this.video.open(r.mime,r.init)?(this.sawKey=!1,this.vTime=0,this.vLast=0):(this.problemShown=!0,this.onProblem(this.hevc?`no_hevc`:`decode`)))}onVideo(e){if(!this.video.ready&&!this.video.backlog)return;let t=Di(e,this.hevc);if(this.video.dropped&&(this.video.dropped=!1,this.sawKey=!1),this.stats.arrived(),!this.sawKey&&!t)return this.stats.drop(),this.keyAsk.waiting();if(!t&&this.video.backlog>qi[this.latency])return this.sawKey=!1,this.stats.drop(),this.keyAsk.waiting();this.sawKey=!0,this.stats.drawn();let n=performance.now(),r=this.vLast?Math.min(9e3,Math.max(750,Math.round((n-this.vLast)*90))):1500;this.vLast=n,t&&this.video.markKey(this.vTime/9e4),this.video.push(Ui(this.video.nextSeq(),this.vTime,r,e,this.hevc,t)),this.vTime+=r}stop(){this.video.close(),this.audio.stop(),this.wasm?.stop()}};async function xa(e){let t=Yr(e);if(t&&typeof VideoDecoder<`u`)try{if((await VideoDecoder.isConfigSupported({codec:t,codedWidth:1920,codedHeight:1080})).supported)return t}catch{}return Ai(1920,1080)}var F={CROSS:1,CIRCLE:2,SQUARE:4,TRIANGLE:8,LEFT:16,RIGHT:32,UP:64,DOWN:128,L1:256,R1:512,L3:1024,R3:2048,OPTIONS:4096,SHARE:8192,TOUCHPAD:16384,PS:32768},Sa={buttons:0,l2:0,r2:0,lx:0,ly:0,rx:0,ry:0};function Ca(e,t){let n=e=>Math.max(0,Math.min(1,e));return[Math.round(n(e)*1919),Math.round(n(t)*941)]}F.UP,F.DOWN,F.LEFT,F.RIGHT,F.CROSS,F.CROSS,F.CIRCLE,F.CIRCLE,F.SQUARE,F.TRIANGLE,F.L1,F.R1,F.L3,F.R3,F.OPTIONS,F.SHARE,F.PS,F.TOUCHPAD,F.UP,F.DOWN,F.LEFT,F.RIGHT,F.CROSS,F.CIRCLE,F.SQUARE,F.TRIANGLE,F.L1,F.R1,F.L3,F.R3,F.OPTIONS,F.SHARE,F.PS,F.TOUCHPAD;var wa=e=>Math.max(-32768,Math.min(32767,Math.round(e))),Ta=[F.CROSS,F.CIRCLE,F.SQUARE,F.TRIANGLE,F.L1,F.R1,0,0,F.SHARE,F.OPTIONS,F.L3,F.R3,F.UP,F.DOWN,F.LEFT,F.RIGHT,F.PS,F.TOUCHPAD];function Ea(e){return Math.abs(e)<=1.01?Math.round((e+1)*3.5)%8:null}var Da=[0,1,1,1,0,-1,-1,-1],Oa=[-1,-1,0,1,1,1,0,-1];function ka(e,t){let n=e.axes[t.a]??0;if(t.hat){let e=Ea(n);return e===null?0:(t.hat===`x`?Da:Oa)[e]}return t.inv?-n:n}var Aa={buttons:Ta.flatMap((e,t)=>e?[[e,{b:t}]]:[]),l2:{b:6},r2:{b:7},lx:{a:0},ly:{a:1},rx:{a:2},ry:{a:3}};function ja(e,t,n=!1){if(`b`in t){let r=e.buttons[t.b];return r?n&&r.value>0?Math.min(1,r.value):Math.max(+!!r.pressed,r.value):0}if(`h`in t){let n=Ea(e.axes[t.h]??9);if(n===null)return 0;let r=(n-t.at+8)%8;return+(r===0||r===1||r===7)}let r=e.axes[t.a];if(r===void 0)return 0;let i=t.rest??0;return Math.min(1,Math.max(0,(r-i)/(t.d-i)))}function Ma(e){if(e.mapping===`standard`)return Aa;let t=Na.get(e.id);if(t)return t;let n=e.axes.findIndex(e=>Math.abs(e)>1.05);if(n<0)return Aa;let r={...Aa,buttons:[...Aa.buttons,[F.UP,{h:n,at:0}],[F.RIGHT,{h:n,at:2}],[F.DOWN,{h:n,at:4}],[F.LEFT,{h:n,at:6}]]};return Na.set(e.id,r),r}var Na=new Map;function Pa(e,t=Ma){let n={...Sa},r=e=>Math.abs(e)<.08?0:wa(e*32767),i=(e,t)=>Math.abs(t)>Math.abs(e)?t:e,a=(e,t)=>t?r(ka(e,t)):0;for(let r of e){if(!r||!r.connected)continue;let e=t(r);for(let[t,i]of e.buttons)ja(r,i)>.5&&(n.buttons|=t);e.l2&&(n.l2=Math.max(n.l2,Math.round(ja(r,e.l2,!0)*255))),e.r2&&(n.r2=Math.max(n.r2,Math.round(ja(r,e.r2,!0)*255))),n.lx=i(n.lx,a(r,e.lx)),n.ly=i(n.ly,a(r,e.ly)),n.rx=i(n.rx,a(r,e.rx)),n.ry=i(n.ry,a(r,e.ry))}return n}function Fa(e,t){return{buttons:e.buttons|t.buttons,l2:Math.max(e.l2,t.l2),r2:Math.max(e.r2,t.r2),lx:wa(e.lx+t.lx),ly:wa(e.ly+t.ly),rx:wa(e.rx+t.rx),ry:wa(e.ry+t.ry),touch:e.touch??t.touch??null,motion:e.motion??t.motion??null}}var I=e=>e.toLowerCase().padStart(4,`0`);function Ia(e){let t=/^(.*?)\s*\((?:[^()]*?\s)?Vendor:\s*([0-9a-f]{1,4})\s+Product:\s*([0-9a-f]{1,4})\s*\)\s*$/i.exec(e);if(t)return{vendor:I(t[2]),product:I(t[3]),name:t[1].trim()};let n=/^([0-9a-f]{1,4})-([0-9a-f]{1,4})-(.*)$/i.exec(e.trim());return n?{vendor:I(n[1]),product:I(n[2]),name:n[3].trim()}:null}function La(e=globalThis.navigator){let t=e?.userAgent??``;return/Android|iPhone|iPad|iPod/i.test(t)?null:/Macintosh|Mac OS X/i.test(t)?(e?.maxTouchPoints??0)>1?null:`m`:/Windows/i.test(t)?`w`:/Linux|CrOS|X11/i.test(t)?`l`:null}function Ra(e,t){if(!t)return null;let n=t===`l`?[`l`]:[`m`,`w`];for(let t of n){let n=Ge[`${t}${e.vendor}${e.product}`];if(n!==void 0)return We[n]??null}return null}var za={1:0,2:2,4:4,8:6};function Ba(e){let t=0,n=!1;for(let r of e){let e=/a(\d+)/.exec(r);e&&(t=Math.max(t,Number(e[1])+1)),r.startsWith(`h`)&&(n=!0)}return{n:t,hat:n}}function Va(e,t,n){let{n:r,hat:i}=Ba(t),a=Ta.length,o=e.axes.findIndex(e=>Math.abs(e)>1.05),s=e=>e;if(i&&o<0)return n===`l`&&e.axes.length>=r+2?{hat:-1,hatXY:r,axis:s}:null;if(!(i?o>r:n!==`l`&&e.axes.length>=r+2))return{hat:o,hatXY:-1,axis:s};if(r<=4)return{hat:o,hatXY:-1,axis:e=>[0,1,2,5][e]??e};let c=t[a+2]?.replace(`~`,``)===`a2`&&t[a+3]?.replace(`~`,``)===`a3`,l=[t[6],t[7]].every(e=>/^a[45]~?$/.test(e??``));return r===6&&c&&l?{hat:o,hatXY:-1,axis:e=>[0,1,2,5,3,4][e]??e}:{hat:o,hatXY:-1,axis:s}}function Ha(e,t){let n=/^b(\d+)$/.exec(e);if(n)return{b:Number(n[1])};if(n=/^([+-]?)a(\d+)(~?)$/.exec(e),n){let e=t.axis(Number(n[2]));return n[1]===`+`?{a:e,d:1}:n[1]===`-`?{a:e,d:-1}:n[3]?{a:e,d:-1,rest:1}:{a:e,d:1,rest:-1}}if(n=/^h0\.(\d)$/.exec(e),n){let e=za[n[1]];if(e===void 0)return null;if(t.hat>=0)return{h:t.hat,at:e};if(t.hatXY>=0)return e===0?{a:t.hatXY+1,d:-1}:e===4?{a:t.hatXY+1,d:1}:e===6?{a:t.hatXY,d:-1}:{a:t.hatXY,d:1}}return null}function Ua(e,t){let n=/^a(\d+)(~?)$/.exec(e);if(n)return n[2]?{a:t.axis(Number(n[1])),inv:!0}:{a:t.axis(Number(n[1]))};if(e===`hx`||e===`hy`){if(t.hat>=0)return{a:t.hat,hat:e===`hx`?`x`:`y`};if(t.hatXY>=0)return{a:t.hatXY+ +(e===`hy`)}}return null}function Wa(e,t,n){let r=e.split(`,`),i=Va(t,r,n);if(!i)return null;let a={buttons:[],l2:null,r2:null,lx:null,ly:null,rx:null,ry:null};for(let e=0;eArray.isArray(e)&&e.length===2&&typeof e[0]==`number`&&Ja(e[1]))&&[t.l2,t.r2,t.lx,t.ly,t.rx,t.ry].every(Ja)}function Xa(){try{let e=yt(qa),t=e?JSON.parse(e):null;return!t||typeof t!=`object`||Array.isArray(t)?{}:Object.fromEntries(Object.entries(t).filter(e=>Ya(e[1])))}catch{return{}}}function Za(e,t){let n=Xa();return t?n[e]=t:delete n[e],vt(qa,JSON.stringify(n)),Qa=n,n}var Qa=null;function $a(e){return Qa??=Xa(),Qa[e.id]??eo(Qa,e.id)??Ka(e)??Ma(e)}function eo(e,t){if(!t.endsWith(` (app)`))return null;let n=t.slice(0,-6).trim().toLowerCase();if(!n)return null;let r=Object.keys(e).filter(e=>{let t=e.trim().toLowerCase();return t===n||t.includes(n)}),i=r.find(e=>e.trim().toLowerCase()===n)??(r.length===1?r[0]:null);return i?(Qa=Za(t,e[i]),e[i]):null}[{kind:`button`,bit:F.CROSS,name:`✕`},{kind:`button`,bit:F.CIRCLE,name:`○`},{kind:`button`,bit:F.SQUARE,name:`□`},{kind:`button`,bit:F.TRIANGLE,name:`△`},{kind:`button`,bit:F.UP,name:`↑`},{kind:`button`,bit:F.DOWN,name:`↓`},{kind:`button`,bit:F.LEFT,name:`←`},{kind:`button`,bit:F.RIGHT,name:`→`},{kind:`button`,bit:F.L1,name:`L1`},{kind:`button`,bit:F.R1,name:`R1`},{kind:`trigger`,which:`l2`,name:`L2`},{kind:`trigger`,which:`r2`,name:`R2`},{kind:`button`,bit:F.L3,name:`L3`},{kind:`button`,bit:F.R3,name:`R3`},{kind:`button`,bit:F.OPTIONS,name:`Options`},{kind:`button`,bit:F.SHARE,name:`Create`},{kind:`button`,bit:F.PS,name:`PS`},{kind:`button`,bit:F.TOUCHPAD,name:`Touchpad`},{kind:`axis`,which:`lx`,name:`L →`},{kind:`axis`,which:`ly`,name:`L ↓`},{kind:`axis`,which:`rx`,name:`R →`},{kind:`axis`,which:`ry`,name:`R ↓`}].filter(e=>e.kind!==`button`||![F.L3,F.R3,F.OPTIONS,F.SHARE,F.PS,F.TOUCHPAD].includes(e.bit));var to=12e4;function no(e){let t;try{t=JSON.parse(e)}catch{return null}return Array.isArray(t.rumble)?{rumble:[Number(t.rumble[0])||0,Number(t.rumble[1])||0]}:Array.isArray(t.light)?{light:t.light}:t.stage===`asking`?{kind:`asking`}:t.stage===`refused`?{kind:`refused`,why:String(t.why??``)}:t.stage===`joined`?{kind:`joined`,host:t.session?.host??null,playing:!!t.session?.playing,passcode:!!t.session?.passcode}:null}function ro(e,t){return e.buttons===t.buttons&&e.l2===t.l2&&e.r2===t.r2&&e.lx===t.lx&&e.ly===t.ly&&e.rx===t.rx&&e.ry===t.ry&&(e.touch?.[0]??-1)===(t.touch?.[0]??-1)&&(e.touch?.[1]??-1)===(t.touch?.[1]??-1)&&(e.motion?.t??-1)===(t.motion?.t??-1)}var io=class{constructor(e){this.o=e,this.ws=null,this.last={...Sa},this.lastSent=0,this.raf=0,this.keepalive=null,this.watchdog=null,this.retry=null,this.done=!1,this.stage={kind:`connecting`},this.wasIn=!1,this.attempt=0,this.deadline=0,this.lastHeard=0,this.control=!1,this.neutral=!1,this.now=e.now??(()=>Date.now()),this.WS=e.WebSocketImpl??WebSocket}get currentStage(){return this.stage}setStage(e){this.stage=e,this.o.onStage(e)}start(){if(this.done=!1,this.setStage({kind:`connecting`}),this.connect(),this.done)return;let e=this.o.raf??(e=>window.requestAnimationFrame(e)),t=()=>{this.send(!1),this.raf=e(t)};this.raf=e(t),this.keepalive=setInterval(()=>this.send(!1),250),this.watchdog=setInterval(()=>this.checkSilence(),1e3)}connect(){let e;this.lastHeard=this.now();try{e=new this.WS(this.o.url)}catch{this.dropped();return}this.ws=e,e.binaryType=`arraybuffer`,this.control=!this.o.watch,this.o.watch&&this.o.watch.onControl(!1),e.onmessage=t=>{this.ws===e&&(this.lastHeard=this.now(),this.onMessage(t.data))},e.onclose=t=>{if(this.ws!==e)return;this.ws=null;let n=Le(t);n&&!this.wasIn?this.finish({kind:`refused`,why:`net:${n}`}):this.dropped()},e.onopen=()=>{this.ws===e&&(this.lastHeard=this.now(),this.o.hello&&e.send(JSON.stringify({hello:this.o.hello})),this.send(!0))}}onMessage(e){if(typeof e!=`string`){e instanceof ArrayBuffer&&this.o.watch?.onFrame(e);return}if(this.o.hello&&e.startsWith(`{"rt":`))try{let t=JSON.parse(e);if(typeof t.rt==`string`&&/^[0-9a-f]{32}$/.test(t.rt)){this.o.hello.rt=t.rt,this.o.onReconnectToken?.(t.rt);return}}catch{}if(e.includes(`"kbm_caps"`))try{let t=JSON.parse(e);if(t.kbm_caps){let e=t.kbm_caps;this.o.onKbmCaps?.({mouse:e.mouse===!0,keyboard:e.keyboard===!0,reason:typeof e.reason==`string`?e.reason:null});return}}catch{}if(this.o.watch)try{let t=JSON.parse(e);if(t.watch&&this.o.watch.onCodec(!!t.watch.hevc),typeof t.control==`boolean`){this.control=t.control,this.o.watch.onControl(t.control),t.control&&this.send(!0);return}}catch{}let t=no(e);if(t){if(`rumble`in t){let[e,n]=t.rumble;navigator.vibrate?.(e||n?250:0)}else if(`light`in t)this.o.onLight?.(t.light);else if(t.kind===`refused`)this.finish(t);else{if(t.kind===`joined`){let e=this.stage.kind!==`joined`;this.wasIn=!0,this.attempt=0,this.setStage(t),e&&this.send(!0);return}this.setStage(t)}}}dropped(){if(this.done)return;if(!this.wasIn||(this.stage.kind!==`reconnecting`&&(this.deadline=this.now()+to),this.now()>=this.deadline)){this.finish({kind:`lost`});return}let e=Re(this.attempt);this.setStage({kind:`reconnecting`,attempt:this.attempt}),this.attempt+=1,this.retry&&clearTimeout(this.retry),this.retry=setTimeout(()=>{this.retry=null,this.done||this.connect()},e)}checkSilence(){let e=this.ws;if(e&&!this.done&&(this.stage.kind===`joined`||this.stage.kind===`reconnecting`)&&!(this.now()-this.lastHeard<=3500)){this.ws=null;try{e.close()}catch{}this.dropped()}}wake(){this.stage.kind===`lost`&&this.wasIn?(this.attempt=0,this.start()):this.stage.kind===`reconnecting`&&(this.deadline=this.now()+to,this.attempt=0,this.retry&&(clearTimeout(this.retry),this.retry=null,this.connect()))}setNeutral(e){this.neutral!==e&&(this.neutral=e,this.send(!0))}current(){let e=Pa(Ue(typeof navigator>`u`?void 0:navigator),$a),t=this.o.touchPad();return{...Fa(e,t),touch:t.touch??null,motion:this.o.motion?.()??null}}send(e){let t=this.ws;if(!t||t.readyState!==this.WS.OPEN||!this.control)return;let n=this.neutral?{...Sa,touch:null,motion:null}:this.current(),r=this.now();!e&&ro(n,this.last)&&r-this.lastSent<250||(this.last=n,this.lastSent=r,t.send(JSON.stringify({pad:{...n,touch:n.touch??null,motion:n.motion??null},ka:1})))}askKeyframe(){let e=this.ws;e&&e.readyState===this.WS.OPEN&&e.send(JSON.stringify({keyframe:!0}))}sendKbm(e){let t=this.ws;return!t||t.readyState!==this.WS.OPEN||!this.control?!1:(t.send(e instanceof Uint8Array?e:JSON.stringify(e)),!0)}sendPad(){this.send(!1)}clearTimers(){(this.o.cancelRaf??(e=>window.cancelAnimationFrame(e)))(this.raf),this.keepalive&&clearInterval(this.keepalive),this.watchdog&&clearInterval(this.watchdog),this.retry&&clearTimeout(this.retry),this.keepalive=this.watchdog=this.retry=null}finish(e){this.done=!0,this.clearTimers();let t=this.ws;this.ws=null;try{t?.close()}catch{}this.setStage(e)}stop(){this.done=!0,this.clearTimers();let e=this.ws;this.ws=null,e&&e.readyState===this.WS.OPEN&&e.send(JSON.stringify({pad:{...Sa,touch:null}})),e?.close()}},ao=`ps5upload.pad.device`;function oo(e,t=e=>crypto.getRandomValues(e)){let n=e.get(ao);if(n&&/^[0-9a-f]{32}$/.test(n))return n;let r=new Uint8Array(16);t(r);let i=Array.from(r,e=>e.toString(16).padStart(2,`0`)).join(``);return e.set(ao,i),i}var so=new Set,co={held:new Set,touch:null,touchPad:Sa,mapping:!1,get paused(){return so.size>0},motion:null},lo={s:.85,m:1,l:1.15},uo=.25;function fo(e){return typeof e!=`number`||!Number.isFinite(e)?1:Math.min(1,Math.max(uo,e))}var po={overlay:{width:844,height:390},deck:{width:390,height:480}},mo=.7,ho=1.4;function go(e,t,n,r){let i=lo[e]??1;if(!(t>0)||!(n>0))return i;let a=r?po.deck:po.overlay,o=Math.min(ho,Math.max(mo,Math.min(t/a.width,n/a.height)));return Math.round(o*i*1e3)/1e3}var _o=34;function vo(e,t){return t>0&&8+Math.max(112*e,90)+156*e+124*e+Math.max(56*e,44)+_o>t}function yo(e,t,n){let r=e/32767,i=t/32767,a=Math.hypot(r,i),o=a>1?1/a:1;return{dx:r*o*n,dy:i*o*n}}var bo=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),L=s(((e,t)=>{t.exports=bo()}))(),xo=`calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2)`,So=32767,Co=12;function wo({stream:e,layout:t=`overlay`,opacity:n=1,size:r=`m`,deckTop:i=`0px`,onMenu:a}){let o=Tn(),s=(0,T.useRef)(new Map),c=(0,T.useRef)({...Sa}),[l,u]=(0,T.useState)({...Sa}),[d,f]=(0,T.useState)({l:!1,r:!1,touchpad:!1}),p=(0,T.useRef)(null),[m,h]=(0,T.useState)({width:0,height:0});(0,T.useEffect)(()=>{let e=p.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect();h(e=>e.width===t.width&&e.height===t.height?e:{width:t.width,height:t.height})};if(t(),typeof ResizeObserver>`u`)return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t);let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]),(0,T.useEffect)(()=>()=>{co.touchPad={...Sa}},[]);let g=()=>{let t={...Sa,touch:null},n={l:!1,r:!1,touchpad:!1};for(let e of s.current.values())e.kind===`stick`&&(n[e.which]=!0),e.kind===`touchpad`&&(n.touchpad=!0),e.kind===`button`&&(t.buttons|=e.bit),e.kind===`trigger`&&(t[e.which]=255),e.kind===`touchpad`&&e.pressed&&(t.buttons|=F.TOUCHPAD);t.lx=c.current.lx,t.ly=c.current.ly,t.rx=c.current.rx,t.ry=c.current.ry,t.touch=c.current.touch??null,co.touchPad=t,e?.sendPad(),u(t),f(e=>e.l===n.l&&e.r===n.r&&e.touchpad===n.touchpad?e:n)},_=(e,t,n)=>{let r=Math.max(-1,Math.min(1,(t-e.cx)/e.radius)),i=Math.max(-1,Math.min(1,(n-e.cy)/e.radius));c.current[e.which===`l`?`lx`:`rx`]=Math.round(r*So),c.current[e.which===`l`?`ly`:`ry`]=Math.round(i*So)},v=(e,t)=>{e.preventDefault(),e.stopPropagation();let n=e.currentTarget;try{n.setPointerCapture(e.pointerId)}catch{}let r=t(n);s.current.set(e.pointerId,r),r.kind===`stick`&&_(r,e.clientX,e.clientY),r.kind===`touchpad`&&(c.current.touch=Ca((e.clientX-r.rect.left)/r.rect.width,(e.clientY-r.rect.top)/r.rect.height)),navigator.vibrate?.(8),g()},y=e=>{let t=s.current.get(e.pointerId);if(t){if(e.stopPropagation(),t.kind===`stick`)_(t,e.clientX,e.clientY);else if(t.kind===`touchpad`)c.current.touch=Ca((e.clientX-t.rect.left)/t.rect.width,(e.clientY-t.rect.top)/t.rect.height),t.pressed&&Math.hypot(e.clientX-t.x0,e.clientY-t.y0)>Co&&(t.pressed=!1);else return;g()}},b=e=>{let t=s.current.get(e.pointerId);t&&(e.stopPropagation(),s.current.delete(e.pointerId),t.kind===`stick`&&(c.current[t.which===`l`?`lx`:`rx`]=0,c.current[t.which===`l`?`ly`:`ry`]=0),t.kind===`touchpad`&&(c.current.touch=null),g())},x=e=>e.stopPropagation(),S={onPointerMove:y,onPointerUp:b,onPointerCancel:b,onClick:x,onDoubleClick:x},ee=e=>(l.buttons&e)!==0,te=e=>`border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.35)] transition-colors duration-75 ${e?`border-white bg-white/50`:`border-white/70 bg-white/10`}`,C=`text-white [text-shadow:0_1px_2px_rgba(0,0,0,0.6)]`,ne={filter:`drop-shadow(0 0 1.5px rgba(0,0,0,0.5))`},w=e=>({stroke:e?`#fff`:`rgba(255,255,255,0.75)`,fill:e?`rgba(255,255,255,0.5)`:`rgba(255,255,255,0.1)`}),re=`pointer-events-auto flex touch-none select-none items-center justify-center bg-transparent p-0`,ie={minHeight:`calc(44px / var(--k))`,minWidth:`calc(44px / var(--k))`},ae=(e,t,n,r)=>(0,L.jsx)(`button`,{type:`button`,"aria-label":e,onPointerDown:e=>v(e,()=>({kind:`button`,bit:t})),...S,className:`${re} ${n}`,style:ie,children:r}),oe=(e,t,n,r)=>(0,L.jsx)(`span`,{className:`flex h-[32px] w-[76px] items-center justify-center text-[13px] font-semibold tracking-wide ${C} ${te(t)}`,style:{borderRadius:r?n===`l`?`16px 9px 9px 9px`:`9px 16px 9px 9px`:`9px`},children:e}),se=(e,t,n,r)=>ae(e,t,`h-[44px] w-[84px]`,oe(e,ee(t),n,r)),ce=(e,t,n)=>(0,L.jsx)(`button`,{type:`button`,"aria-label":e,onPointerDown:e=>v(e,()=>({kind:`trigger`,which:t})),...S,className:`${re} h-[44px] w-[84px]`,style:ie,children:oe(e,l[t]>0,n,!0)}),le=(e,t,n)=>ae(e,t,`h-[52px] w-[52px]`,(0,L.jsx)(`svg`,{viewBox:`0 0 52 52`,width:`52`,height:`52`,"aria-hidden":!0,style:ne,children:(0,L.jsxs)(`g`,{transform:`rotate(${n} 26 26)`,strokeWidth:`1.5`,strokeLinejoin:`round`,...w(ee(t)),children:[(0,L.jsx)(`path`,{d:`M10 9 Q10 3 16 3 L36 3 Q42 3 42 9 L42 30 Q42 34.5 38.5 38 L29.5 47 Q26 50.5 22.5 47 L13.5 38 Q10 34.5 10 30 Z`}),(0,L.jsx)(`path`,{d:`M20.5 23 L26 17 L31.5 23`,fill:`none`,stroke:`#fff`,strokeLinecap:`round`,strokeWidth:`1.8`})]})})),ue=(e,t,n)=>ae(e,t,`h-[52px] w-[52px]`,(0,L.jsxs)(`svg`,{viewBox:`0 0 52 52`,width:`52`,height:`52`,"aria-hidden":!0,style:ne,children:[(0,L.jsx)(`circle`,{cx:`26`,cy:`26`,r:`22.5`,strokeWidth:`1.5`,...w(ee(t))}),(0,L.jsx)(`g`,{fill:`none`,stroke:`#fff`,strokeWidth:`1.8`,strokeLinejoin:`round`,strokeLinecap:`round`,children:n})]})),de=(e,t)=>ae(e,t,`h-[44px] min-w-[64px] px-[4px]`,(0,L.jsx)(`span`,{className:`flex h-[24px] items-center rounded-full px-[10px] text-[10px] font-semibold uppercase tracking-wider ${C} ${te(ee(t))}`,children:e})),fe=(e,t)=>ae(e,t,`h-[44px] w-[44px]`,(0,L.jsx)(`span`,{className:`flex h-[36px] w-[36px] items-center justify-center rounded-full text-[11px] font-bold ${C} ${te(ee(t))}`,children:e})),pe=e=>{let{dx:t,dy:n}=yo(e===`l`?l.lx:l.rx,e===`l`?l.ly:l.ry,34),r=d[e];return(0,L.jsx)(`div`,{"aria-label":e===`l`?o(`rp_touch_left_stick`,void 0,`Left stick`):o(`rp_touch_right_stick`,void 0,`Right stick`),onPointerDown:t=>v(t,t=>{let n=t.getBoundingClientRect();return{kind:`stick`,which:e,cx:n.left+n.width/2,cy:n.top+n.height/2,radius:n.width/2}}),...S,className:`pointer-events-auto relative h-[124px] w-[124px] touch-none rounded-full border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.3)] transition-colors duration-75 ${r?`border-white/80 bg-white/[0.12]`:`border-white/45 bg-white/[0.05]`}`,children:(0,L.jsx)(`div`,{className:`absolute left-1/2 top-1/2 h-[54px] w-[54px] rounded-full ${te(r)}`,style:{transform:`translate(calc(-50% + ${t}px), calc(-50% + ${n}px))`}})})},E=t===`deck`,me=go(r,m.width,m.height,E),he=e=>`${e}px * var(--k)`,ge=`max(12px, env(safe-area-inset-left))`,ve=`max(12px, env(safe-area-inset-right))`,ye=`max(12px, env(safe-area-inset-bottom))`,be=E?`8px`:t===`overlay-bar`?`3.5rem`:`max(10px, env(safe-area-inset-top))`,xe=(e,t,n=0)=>t?n?`calc(${e} + max(${he(t)}, ${n}px))`:`calc(${e} + ${he(t)})`:e,Se=(e,t)=>({position:`absolute`,...t,transform:`scale(var(--k))`,transformOrigin:e}),Ce=E&&vo(me,m.height),D=E?void 0:`58%`,O=e=>E?{top:xe(be,Ce?96:112,Ce?72:90),[e]:e===`left`?ge:ve}:{top:D,translate:`0 -50%`,[e]:e===`left`?ge:ve},we=e=>({bottom:Ce?ye:xe(ye,E?56:0,44),[e]:Ce?`calc(${e===`left`?ge:ve} + 8px + max(${he(80)}, 44px))`:xe(e===`left`?ge:ve,E?40:168)}),Te=!!a&&!E;return(0,L.jsxs)(`div`,{ref:p,className:`pointer-events-none absolute z-10 select-none [-webkit-touch-callout:none] ${E?`inset-x-0 bottom-0`:`inset-0`}`,style:{top:E?i:void 0,"--k":me},"data-testid":`rp-touch`,"data-layout":t,"data-scale":me,onContextMenu:e=>e.preventDefault(),children:[(0,L.jsxs)(`div`,{className:`absolute inset-0`,style:{opacity:fo(n)},children:[(0,L.jsx)(`div`,{style:Se(`top left`,{top:be,left:ge}),children:(0,L.jsxs)(`div`,{className:`ms-[8px] flex flex-col`,style:{rotate:E?void 0:`6deg`,transformOrigin:`top left`},children:[ce(`L2`,`l2`,`l`),se(`L1`,F.L1,`l`,!1)]})}),(0,L.jsx)(`div`,{style:Se(`top right`,{top:be,right:ve}),children:(0,L.jsxs)(`div`,{className:`me-[8px] flex flex-col items-end`,style:{rotate:E?void 0:`-6deg`,transformOrigin:`top right`},children:[ce(`R2`,`r2`,`r`),se(`R1`,F.R1,`r`,!1)]})}),(0,L.jsx)(`div`,{"aria-label":o(`rp_touch_touchpad`,void 0,`Touchpad`),onPointerDown:e=>v(e,t=>({kind:`touchpad`,rect:t.getBoundingClientRect(),x0:e.clientX,y0:e.clientY,pressed:!0})),...S,className:`pointer-events-auto absolute touch-none rounded-2xl border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.3)] transition-colors duration-75 ${d.touchpad?`border-white/80 bg-white/25`:`border-white/40 bg-white/[0.05]`}`,style:E?{top:xe(be,6),left:xe(ge,104),right:xe(ve,104),height:`max(44px, calc(${he(64)}))`}:{top:be,left:`50%`,translate:`-50% 0`,width:`min(calc(${he(250)}), 34vw)`,height:`max(44px, calc(${he(56)}))`}}),(0,L.jsxs)(`div`,{className:`grid grid-cols-3 grid-rows-3`,style:Se(E?`top left`:`left center`,O(`left`)),children:[(0,L.jsx)(`span`,{}),le(`↑`,F.UP,0),(0,L.jsx)(`span`,{}),le(`←`,F.LEFT,-90),(0,L.jsx)(`span`,{}),le(`→`,F.RIGHT,90),(0,L.jsx)(`span`,{}),le(`↓`,F.DOWN,180),(0,L.jsx)(`span`,{})]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-3 grid-rows-3`,style:Se(E?`top right`:`right center`,O(`right`)),children:[(0,L.jsx)(`span`,{}),ue(`△`,F.TRIANGLE,(0,L.jsx)(`path`,{d:`M26 16.5 L35 32 L17 32 Z`})),(0,L.jsx)(`span`,{}),ue(`□`,F.SQUARE,(0,L.jsx)(`rect`,{x:`18`,y:`18`,width:`16`,height:`16`,rx:`1`})),(0,L.jsx)(`span`,{}),ue(`○`,F.CIRCLE,(0,L.jsx)(`circle`,{cx:`26`,cy:`26`,r:`8.5`})),(0,L.jsx)(`span`,{}),ue(`✕`,F.CROSS,(0,L.jsx)(`path`,{d:`M19 19 L33 33 M33 19 L19 33`})),(0,L.jsx)(`span`,{})]}),(0,L.jsx)(`div`,{style:Se(`bottom left`,we(`left`)),children:pe(`l`)}),(0,L.jsx)(`div`,{style:Se(`bottom right`,we(`right`)),children:pe(`r`)}),(0,L.jsx)(`div`,{style:Se(`bottom left`,{bottom:ye,left:ge}),children:de(`Create`,F.SHARE)}),(0,L.jsx)(`div`,{style:Se(`bottom right`,{bottom:ye,right:ve}),children:de(`Options`,F.OPTIONS)}),(0,L.jsx)(`div`,{style:Se(`bottom center`,{bottom:Ce?xe(ye,124,88):xe(ye,Te?48:0,48),left:xo,translate:`-50% 0`}),children:fe(`PS`,F.PS)})]}),Te&&(0,L.jsx)(`div`,{style:{...Se(`bottom center`,{bottom:ye,left:`calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2)`,translate:`-50% 0`}),opacity:Math.max(.7,fo(n))},children:(0,L.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),a?.()},onDoubleClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),"aria-label":o(`rp_menu`,void 0,`Menu`),"aria-haspopup":`dialog`,className:`${re} h-[44px] w-[56px]`,style:ie,"data-testid":`rp-menu-handle`,children:(0,L.jsx)(`span`,{className:`flex h-[26px] w-[44px] items-center justify-center rounded-full ${C} ${te(!1)}`,children:(0,L.jsx)(_e,{size:15,strokeWidth:2,"aria-hidden":!0})})})})]})}var To=class{constructor(e,t=()=>1){this.sink=e,this.speed=t,this.fingers=new Map,this.most=0,this.moved=!1,this.gestureT0=0,this.lastTap=null,this.dragging=!1}down(e,t,n,r){if(!this.fingers.size){this.most=0,this.moved=!1,this.gestureT0=r;let e=this.lastTap;e&&r-e.t<=300&&Math.hypot(t-e.x,n-e.y)<=40&&(this.dragging=!0,this.sink.button(0,!0)),this.lastTap=null}this.fingers.set(e,{x:t,y:n,x0:t,y0:n,t0:r}),this.most=Math.max(this.most,this.fingers.size)}move(e,t,n){let r=this.fingers.get(e);if(!r)return;let i=t-r.x,a=n-r.y;if(r.x=t,r.y=n,!this.moved&&Math.hypot(t-r.x0,n-r.y0)>10&&(this.moved=!0),!this.moved)return;if(this.fingers.size>=2){if(this.dragging)return;let e=this.fingers.size;this.sink.scroll(-a/e,-i/e);return}if(this.most>=2)return;let o=this.speed();this.sink.move(i*o,a*o)}up(e,t){let n=this.fingers.get(e);if(!n||(this.fingers.delete(e),this.fingers.size))return;if(this.dragging){this.dragging=!1,this.sink.button(0,!1);return}let r=t-this.gestureT0<=250+(this.most>=2?150:0);if(this.moved||!r)return;let i=this.most>=2?2:0;this.sink.button(i,!0),this.sink.button(i,!1),i===0&&(this.lastTap={t,x:n.x,y:n.y})}cancel(){this.fingers.clear(),this.lastTap=null,this.dragging&&(this.dragging=!1,this.sink.button(0,!1))}},Eo={" ":`Space`,"-":`Minus`,"=":`Equal`,"[":`BracketLeft`,"]":`BracketRight`,"\\":`Backslash`,";":`Semicolon`,"'":`Quote`,"`":`Backquote`,",":`Comma`,".":`Period`,"/":`Slash`,"\n":`Enter`,"\r":`Enter`," ":`Tab`},Do={"!":`Digit1`,"@":`Digit2`,"#":`Digit3`,$:`Digit4`,"%":`Digit5`,"^":`Digit6`,"&":`Digit7`,"*":`Digit8`,"(":`Digit9`,")":`Digit0`,_:`Minus`,"+":`Equal`,"{":`BracketLeft`,"}":`BracketRight`,"|":`Backslash`,":":`Semicolon`,'"':`Quote`,"~":`Backquote`,"<":`Comma`,">":`Period`,"?":`Slash`};function Oo(e){return e.length===1?e>=`a`&&e<=`z`?{code:`Key${e.toUpperCase()}`,shift:!1}:e>=`A`&&e<=`Z`?{code:`Key${e}`,shift:!0}:e>=`0`&&e<=`9`?{code:`Digit${e}`,shift:!1}:Eo[e]?{code:Eo[e],shift:!1}:Do[e]?{code:Do[e],shift:!0}:null:null}var ko={Backspace:`Backspace`,Enter:`Enter`,Tab:`Tab`,Escape:`Escape`,Delete:`Delete`,ArrowUp:`ArrowUp`,ArrowDown:`ArrowDown`,ArrowLeft:`ArrowLeft`,ArrowRight:`ArrowRight`,Home:`Home`,End:`End`,PageUp:`PageUp`,PageDown:`PageDown`};function Ao(e){return ko[e]??null}function jo(e,t){let n=``;for(let r of t){let t=Oo(r);t?Mo(e,t.code,t.shift):n+=r}return n}function Mo(e,t,n=!1){let r=n&&!e.shiftHeld?.();r&&e.key(`ShiftLeft`,!0),e.key(t,!0),e.key(t,!1),r&&e.key(`ShiftLeft`,!1)}function No(e,t){let n=[...e],r=[...t],i=0;for(;i{o.current=e,s.current=t});let c=(0,T.useRef)(null),l=()=>c.current??=new To({move:(e,t)=>o.current?.move(e,t),button:(e,t)=>o.current?.button(e,t),scroll:(e,t)=>o.current?.scroll(e,t)},()=>s.current);(0,T.useEffect)(()=>()=>c.current?.cancel(),[]);let u=e=>e.stopPropagation();return(0,L.jsx)(`div`,{className:`touch-none select-none [-webkit-touch-callout:none] ${n}`,style:r,"data-testid":a,onPointerDown:e=>{u(e);try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}l().down(e.pointerId,e.clientX,e.clientY,e.timeStamp)},onPointerMove:e=>{u(e),l().move(e.pointerId,e.clientX,e.clientY)},onPointerUp:e=>{u(e),l().up(e.pointerId,e.timeStamp)},onPointerCancel:e=>{u(e),l().cancel()},onClick:u,onDoubleClick:u,onContextMenu:e=>{e.preventDefault(),u(e)},children:i})}var R=` `,Fo=40;function Io({sink:e,onUntypeable:t,className:n=``}){let r=Tn(),i=(0,T.useRef)(null),a=(0,T.useRef)(R),o=(0,T.useRef)(!1),[s,c]=(0,T.useState)(!1),[l,u]=(0,T.useState)(!1);(0,T.useEffect)(()=>{if(!l)return;let e=window.setTimeout(()=>u(!1),3e3);return()=>window.clearTimeout(e)},[l]);let d=()=>{let e=i.current;e&&!o.current&&(!e.value.startsWith(R)||e.value.length>Fo)&&(e.value=R,a.current=R)},f=()=>{let n=i.current;if(!n||!e)return;let{deleted:r,inserted:o}=No(a.current,n.value);a.current=n.value;for(let t=0;te.stopPropagation(),onClick:e=>{e.stopPropagation();let t=i.current;t&&(s?t.blur():(t.value=R,a.current=R,t.focus({preventScroll:!0}),t.setSelectionRange(t.value.length,t.value.length)))},className:`flex h-11 w-11 items-center justify-center rounded-full border border-white/25 bg-black/45 text-white backdrop-blur-sm disabled:opacity-40 ${s?`bg-white/30`:``} ${n}`,"data-testid":`rp-tp-keyboard`,children:(0,L.jsx)(he,{size:18,"aria-hidden":!0})}),(0,L.jsx)(`input`,{ref:i,type:`text`,defaultValue:R,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:!1,enterKeyHint:`send`,"aria-label":r(`rp_tp_keyboard`,void 0,`Keyboard`),className:`pointer-events-none fixed bottom-0 left-1/2 h-px w-px opacity-0`,"data-testid":`rp-tp-keyboard-input`,"data-rp-typing":``,onFocus:()=>c(!0),onBlur:()=>c(!1),onPointerDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),onKeyDown:t=>{if(t.stopPropagation(),!e||t.nativeEvent.isComposing)return;let n=Ao(t.key);n&&(t.preventDefault(),Mo(e,n))},onKeyUp:e=>e.stopPropagation(),onCompositionStart:()=>{o.current=!0},onCompositionEnd:()=>{o.current=!1,f()},onInput:f}),l&&(0,L.jsx)(`div`,{className:`pointer-events-none fixed bottom-20 left-1/2 z-[300] w-max max-w-[min(22rem,calc(100%-2rem))] -translate-x-1/2 rounded-full bg-black/80 px-3 py-1.5 text-center text-xs text-white`,"data-testid":`rp-tp-untypeable`,children:r(`rp_tp_untypeable`,void 0,`Only English letters, numbers and symbols can be typed here. Use a text field on the PS5 for others.`)})]})}function Lo({mode:e,onChange:t,blocked:n,style:r,touchpadLabel:i,tight:a=!1,hidden:o=!1}){let s=Tn(),c=(r,i,o)=>{let s=r===`touchpad`&&!!n;return(0,L.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":e===r,"aria-disabled":s||void 0,"aria-label":a&&e!==r?o:void 0,title:s?n:o,onClick:e=>{e.stopPropagation(),s||t(r)},onPointerDown:e=>e.stopPropagation(),onDoubleClick:e=>e.stopPropagation(),className:`flex h-8 items-center gap-1 rounded-full px-2.5 text-xs ${e===r?`bg-white text-black`:`text-white`} ${s?`opacity-40`:``}`,"data-testid":`rp-touch-mode-${r}`,children:[i,(!a||e===r)&&(0,L.jsx)(`span`,{children:o})]})};return(0,L.jsxs)(`div`,{role:`radiogroup`,"aria-label":s(`rp_tp_mode`,void 0,`Touch controls`),"aria-hidden":o||void 0,className:`absolute left-1/2 z-30 flex -translate-x-1/2 gap-0.5 rounded-full border border-white/20 bg-black/50 p-0.5 backdrop-blur-sm transition-opacity duration-200 ${o?`pointer-events-none opacity-0`:`pointer-events-auto opacity-100`}`,style:r,"data-testid":`rp-touch-mode`,children:[c(`controller`,(0,L.jsx)(E,{size:14,"aria-hidden":!0}),s(`rp_kbm_controller`,void 0,`Controller`)),c(`touchpad`,(0,L.jsx)(ye,{size:14,"aria-hidden":!0}),i??s(`rp_tp_touchpad`,void 0,`Touchpad`))]})}var Ro={0:1,2:2,1:4,3:8,4:16},zo={ControlLeft:1,ShiftLeft:2,AltLeft:4,MetaLeft:8,OSLeft:8,ControlRight:16,ShiftRight:32,AltRight:64,MetaRight:128,OSRight:128};function Bo(){let e={};for(let t=0;t<26;t++)e[`Key${String.fromCharCode(65+t)}`]=4+t;for(let t=1;t<=9;t++)e[`Digit${t}`]=30+t-1;e.Digit0=39,Object.assign(e,{Enter:40,Escape:41,Backspace:42,Tab:43,Space:44,Minus:45,Equal:46,BracketLeft:47,BracketRight:48,Backslash:49,IntlHash:50,Semicolon:51,Quote:52,Backquote:53,Comma:54,Period:55,Slash:56,CapsLock:57,PrintScreen:70,ScrollLock:71,Pause:72,Insert:73,Home:74,PageUp:75,Delete:76,End:77,PageDown:78,ArrowRight:79,ArrowLeft:80,ArrowDown:81,ArrowUp:82,NumLock:83,NumpadDivide:84,NumpadMultiply:85,NumpadSubtract:86,NumpadAdd:87,NumpadEnter:88,NumpadDecimal:99,IntlBackslash:100,ContextMenu:101,NumpadEqual:103,IntlRo:135,KanaMode:136,IntlYen:137,Convert:138,NonConvert:139,Lang1:144,Lang2:145});for(let t=1;t<=9;t++)e[`Numpad${t}`]=89+t-1;e.Numpad0=98;for(let t=1;t<=12;t++)e[`F${t}`]=58+t-1;for(let t=13;t<=24;t++)e[`F${t}`]=104+t-13;return e}var Vo=Bo(),Ho=(e,t,n)=>Math.max(t,Math.min(n,Math.trunc(e)));function Uo(e,t=0,n=0,r=0,i=0){let a=new Uint8Array(17),o=new DataView(a.buffer);return a[0]=8,a[1]=e.buttons&255,a[2]=e.mods&255,o.setInt16(3,Ho(t,-32768,32767),!0),o.setInt16(5,Ho(n,-32768,32767),!0),o.setInt8(7,Ho(r,-128,127)),o.setInt8(8,Ho(i,-128,127)),e.keys.slice(0,8).forEach((e,t)=>a[9+t]=e&255),a}function Wo(e){let t={buttons:0,mods:0,keys:[]};for(let n of e){t.buttons|=n.buttons,t.mods|=n.mods;for(let e of n.keys)!t.keys.includes(e)&&t.keys.length<8&&t.keys.push(e)}return t}function z(e,t,n){let r=e+t/(n===1?3:n===2?1:100),i=Math.trunc(r);return{notches:-i,carry:r-i}}var B=class{constructor(e){this.st={buttons:0,mods:0,keys:[]},this.dx=0,this.dy=0,this.wheel=0,this.hwheel=0,this.wheelCarry=0,this.hwheelCarry=0,this.moveTimer=null,this.hb=null,this.want={mouse:!1,keyboard:!1},this.guests=new Map,this.d={setTimer:(e,t)=>window.setTimeout(e,t),clearTimer:e=>window.clearTimeout(e),setRepeat:(e,t)=>window.setInterval(e,t),clearRepeat:e=>window.clearInterval(e),...e}}get state(){return this.st}shiftHeld(){return(this.st.mods&(zo.ShiftLeft|zo.ShiftRight))!==0}get holding(){return this.st.buttons!==0||this.st.mods!==0||this.st.keys.length>0}setWant(e){let t=e.mouse||e.keyboard,n=e.mouse!==this.want.mouse||e.keyboard!==this.want.keyboard;this.want={...e},n&&(this.hb!==null&&this.d.clearRepeat(this.hb),this.hb=null,this.beat(),t&&(this.hb=this.d.setRepeat(()=>this.beat(),500)))}get wanted(){return this.want}beat(){let e=this.want.mouse||this.want.keyboard;this.d.send({kbm:e?{on:!0,mouse:this.want.mouse,keyboard:this.want.keyboard}:{on:!1}})}key(e,t){let n=zo[e];if(n){let e=t?this.st.mods|n:this.st.mods&~n;return e!==this.st.mods&&(this.st={...this.st,mods:e},this.flush()),!0}let r=Vo[e];if(!r)return!1;let i=this.st.keys.includes(r);return t&&!i&&this.st.keys.length<8?(this.st={...this.st,keys:[...this.st.keys,r]},this.flush()):!t&&i&&(this.st={...this.st,keys:this.st.keys.filter(e=>e!==r)},this.flush()),!0}button(e,t){let n=Ro[e];if(!n)return;let r=t?this.st.buttons|n:this.st.buttons&~n;r!==this.st.buttons&&(this.st={...this.st,buttons:r},this.flush())}guest(e,t){if(t)this.guests.set(e,{buttons:t.buttons,mods:t.mods,keys:t.keys.slice(0,8)});else if(!this.guests.delete(e))return;this.flush()}guestMotion(e,t,n,r){this.dx+=e,this.dy+=t,this.wheel+=n,this.hwheel+=r,(e||t||n||r)&&this.later()}get guestIds(){return[...this.guests.keys()]}move(e,t){this.dx+=e,this.dy+=t,this.later()}scroll(e,t,n){let r=z(this.wheelCarry,e,n),i=z(this.hwheelCarry,t,n);this.wheelCarry=r.carry,this.hwheelCarry=i.carry,this.wheel+=r.notches,this.hwheel-=i.notches,(this.wheel||this.hwheel)&&this.later()}later(){this.moveTimer===null&&(this.moveTimer=this.d.setTimer(()=>this.flush(),4))}flush(){this.moveTimer!==null&&this.d.clearTimer(this.moveTimer),this.moveTimer=null;let e=this.guests.size?Wo([this.st,...this.guests.values()]):this.st;do{let t=Ho(this.dx,-32768,32767),n=Ho(this.dy,-32768,32767),r=Ho(this.wheel,-128,127),i=Ho(this.hwheel,-128,127);this.dx-=t,this.dy-=n,this.wheel-=r,this.hwheel-=i,this.d.send(Uo(e,t,n,r,i))}while(Math.abs(this.dx)>=1||Math.abs(this.dy)>=1||this.wheel||this.hwheel)}releaseAll(){this.dx=this.dy=this.wheel=this.hwheel=0,this.wheelCarry=this.hwheelCarry=0;let e=this.holding;this.st={buttons:0,mods:0,keys:[]},this.moveTimer!==null&&this.d.clearTimer(this.moveTimer),this.moveTimer=null,e&&this.d.send(Uo(this.guests.size?Wo(this.guests.values()):this.st))}dispose(){this.guests.clear(),this.releaseAll(),this.setWant({mouse:!1,keyboard:!1})}},Go=`data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAYZbW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAfQAAAfQAAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAmt0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAfQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAABAAAAAQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAH0AAAAAAAABAAAAAAHjbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAABAAAABAABVxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAABjm1pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAU5zdGJsAAAAunN0c2QAAAAAAAAAAQAAAKphdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABAAEABIAAAASAAAAAAAAAABFExhdmM2My4xLjEwMiBsaWJ4MjY0AAAAAAAAAAAAAAAAGP//AAAAMGF2Y0MBQsAK/+EAF2dCwAqmEXsBEAAAAwAQAAADACDxImEYAQAGaMhCAZSyAAAAEHBhc3AAAAABAAAAAQAAABRidHJ0AAAAAAAABUAAAAAAAAAAGHN0dHMAAAAAAAAAAQAAAAQAAEAAAAAAFHN0c3MAAAAAAAAAAQAAAAEAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAJHN0c3oAAAAAAAAAAAAAAAQAAAKCAAAACgAAAAoAAAAKAAAAIHN0Y28AAAAAAAAABAAABlwAAAj+AAAJKAAACVIAAALZdHJhawAAAFx0a2hkAAAAAwAAAAAAAAAAAAAAAgAAAAAAAH0AAAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAB9AAAABAAAAQAAAAACUW1kaWEAAAAgbWRoZAAAAAAAAAAAAAAAAAAAH0AAAIEAVcQAAAAAAC1oZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU291bmRIYW5kbGVyAAAAAfxtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAcBzdGJsAAAAfnN0c2QAAAAAAAAAAQAAAG5tcDRhAAAAAAAAAAEAAAAAAAAAAAABABAAAAAAH0AAAAAAADZlc2RzAAAAAAOAgIAlAAIABICAgBdAFQAAAAAAH0AAAAEcBYCAgAUViFblAAaAgIABAgAAABRidHJ0AAAAAAAAH0AAAAEcAAAAIHN0dHMAAAAAAAAAAgAAACAAAAQAAAAAAQAAAQAAAAAoc3RzYwAAAAAAAAACAAAAAQAAAAEAAAABAAAAAgAAAAgAAAABAAAAmHN0c3oAAAAAAAAAAAAAACEAAAATAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAkc3RjbwAAAAAAAAAFAAAGSQAACN4AAAkIAAAJMgAACVwAAAAac2dwZAEAAAByb2xsAAAAAgAAAAH//wAAABxzYmdwAAAAAHJvbGwAAAABAAAAIQAAAAEAAABhdWR0YQAAAFltZXRhAAAAAAAAACFoZGxyAAAAAAAAAABtZGlyYXBwbAAAAAAAAAAAAAAAACxpbHN0AAAAJKl0b28AAAAcZGF0YQAAAAEAAAAATGF2ZjYzLjEuMTAyAAAACGZyZWUAAAM7bWRhdNwATGF2YzYzLjEuMTAyAAIwQA4AAAJvBgX//2vcRem95tlIt5Ys2CDZI+7veDI2NCAtIGNvcmUgMTY1IHIzMjIyIGIzNTYwNWEgLSBILjI2NC9NUEVHLTQgQVZDIGNvZGVjIC0gQ29weWxlZnQgMjAwMy0yMDI1IC0gaHR0cDovL3d3dy52aWRlb2xhbi5vcmcveDI2NC5odG1sIC0gb3B0aW9uczogY2FiYWM9MCByZWY9MTYgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDEzMSBtZT11bWggc3VibWU9MTAgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0yNCBjaHJvbWFfbWU9MSB0cmVsbGlzPTIgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz0xIGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTQga2V5aW50X21pbj0xIHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NCByYz1jcmYgbWJ0cmVlPTEgY3JmPTUxLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IGlwX3JhdGlvPTEuNDAgYXE9MToxLjAwAIAAAAALZYiCAv5MUAAQv8ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmhwF/UABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmioBb1ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmjsBX1ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBw==`,Ko=null,qo=null;function Jo(e){e.play().catch(()=>{if(qo||Ko!==e)return;let t=()=>{Yo(),Ko===e&&e.play().catch(()=>{})};window.addEventListener(`pointerdown`,t,{capture:!0}),qo=()=>window.removeEventListener(`pointerdown`,t,{capture:!0})})}function Yo(){qo?.(),qo=null}function Xo(){if(typeof document<`u`){if(!Ko){let e=document.createElement(`video`);e.muted=!0,e.loop=!0,e.playsInline=!0,e.setAttribute(`playsinline`,``),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`data-testid`,`keep-screen-video`),e.style.cssText=`position:fixed;left:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none`,e.src=Go,document.body.appendChild(e),Ko=e}Jo(Ko)}}function Zo(){Yo(),Ko&&=(Ko.pause(),Ko.removeAttribute(`src`),Ko.remove(),null)}function Qo(){return typeof navigator>`u`?null:navigator.wakeLock??null}function V(){return Te()||!gn()}var $o=new Set,es=null,ts=Promise.resolve(),ns=!1;async function rs(){if($o.size===0||es&&!es.released)return;let e=Qo();if(!e)Te()&&Xo();else try{let t=await e.request(`screen`);t.addEventListener(`release`,()=>{es===t&&(es=null)}),es=t}catch{}}async function is(){Zo();let e=es;if(es=null,e&&!e.released)try{await e.release()}catch{}}function as(){ns||typeof document>`u`||(ns=!0,document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&$o.size>0&&(ts=ts.then(rs))}))}function os(e,t){if(!V())return;as();let n=$o.size>0;t?$o.add(e):$o.delete(e);let r=$o.size>0;n!==r&&(ts=ts.then(r?rs:is))}var ss=new Set;function cs(){if(typeof window<`u`)return window.PS5UploadPad}function ls(e,t){let n=ss.size>0;t?ss.add(e):ss.delete(e);let r=ss.size>0;if(n!==r)try{cs()?.setActive(r)}catch{}}function us(e,t){let[n,r]=(0,T.useState)(!1);return(0,T.useEffect)(()=>{if(!e||!t)return;let n=!0;return Pe(e,je).then(e=>{n&&!e&&r(!0)}),()=>{n=!1}},[e,t]),n}function ds({href:e}){let t=Tn();return(0,L.jsxs)(`div`,{className:`flex flex-col items-center gap-3 text-center`,"data-testid":`open-on-wifi`,children:[(0,L.jsx)(`p`,{className:`max-w-sm text-sm text-white/60`,children:t(`join_open_lan_body`,void 0,`Can't reach the internet? If you're on the same Wi-Fi as your friend, open the game there.`)}),(0,L.jsx)(`a`,{href:e,rel:`noreferrer`,className:`rounded-full bg-white px-4 py-2 text-sm font-medium text-black`,"data-testid":`open-on-wifi-link`,children:t(`join_open_lan`,void 0,`Open on this Wi-Fi`)})]})}function fs(e,t,n){switch(t.kind){case`connecting`:return e(`pad_connecting`,void 0,`Connecting…`);case`asking`:return e(`pad_asking`,{name:n},`Waiting for ${n} to allow this phone…`);case`joined`:return t.host?t.passcode&&!t.playing?e(`pad_wait_passcode`,{name:n},`Waiting for the passcode on ${n}`):t.playing?e(`pad_playing`,{host:t.host},`Controller for ${t.host}`):e(`pad_starting`,void 0,`Connected. The stream is starting…`):e(`pad_no_session`,void 0,`Connected. Waiting for Remote Play to start on the computer.`);case`refused`:return t.why===`denied`?e(`pad_denied`,void 0,`The computer said no.`):t.why===`no_answer`?e(`pad_no_answer`,void 0,`The computer didn't answer in time. Try again.`):t.why===`kicked`?e(`pad_kicked`,void 0,`The computer took this phone out of the game.`):t.why===`closed`?e(`pad_link_closed`,void 0,`The computer closed the link. Scan the new code to play again.`):t.why===`key`?e(`pad_old_code`,void 0,`This code has expired. Scan the new one on the computer.`):t.why===`full`?e(`pad_full`,void 0,`Four phones are playing already.`):t.why===`no_stream`?e(`pad_watch_no_stream`,void 0,`Nothing is streaming on the computer right now.`):t.why.startsWith(`net:`)?ps(e,t.why.slice(4)):e(`pad_refused`,void 0,`The computer did not let this phone in.`);case`reconnecting`:return e(`pad_reconnecting`,void 0,`Connection lost. Reconnecting…`);case`lost`:return e(`pad_lost`,void 0,`Lost the connection to the computer.`)}}function ps(e,t){switch(t){case`mismatch`:return e(`join_net_mismatch`,void 0,`This link doesn't match the host; ask them for a new one.`);case`no_direct`:return e(`join_net_no_direct`,void 0,`A direct connection isn't possible from this network (both sides' routers are strict). Try Wi-Fi instead of mobile data, or ask the host to turn on UPnP.`);case`no_room`:return e(`pad_old_code`,void 0,`This code has expired. Scan the new one on the computer.`);case`net_full`:return e(`pad_full`,void 0,`Four phones are playing already.`);case`no_hub`:return e(`join_net_no_hub`,void 0,`Couldn't reach the PS5Upload invite service. Check your internet connection, then try again.`);case`offer`:case`no_webrtc`:return e(`join_net_no_webrtc`,void 0,`This browser can't make direct connections. Try a recent Chrome, Safari or Firefox.`);default:return e(`pad_lost`,void 0,`Lost the connection to the computer.`)}}function ms(e){return e.kind!==`refused`||e.why!==`kicked`&&e.why!==`closed`}async function hs(){try{await document.documentElement.requestFullscreen?.({navigationUI:`hide`}),await screen.orientation.lock?.(`landscape`)}catch{}}function gs(e,t){return t?.mouse?null:t?.reason===`vinput_helper_old`||t?.reason===`helper_old`?e(`rp_kbm_helper_old`,void 0,`Update the PS5 helper to use a keyboard and mouse.`):t?.reason===`vinput_needs_loader`?e(`rp_kbm_needs_loader`,void 0,`Needs a payload loader on port 9021`):e(`rp_kbm_unavailable`,void 0,`Native keyboard & mouse isn't available on this console yet.`)}function _s({client:e,caps:t}){let n=Tn(),r=(0,T.useMemo)(()=>new B({send:t=>e.sendKbm(t)}),[e]);(0,T.useEffect)(()=>{r.setWant({mouse:!0,keyboard:t.keyboard})},[r,t.keyboard]),(0,T.useEffect)(()=>()=>r.dispose(),[r]);let i=(0,T.useMemo)(()=>({move:(e,t)=>r.move(e,t),button:(e,t)=>r.button(e,t),scroll:(e,t)=>r.scroll(e,t,0),key:(e,t)=>r.key(e,t),shiftHeld:()=>r.shiftHeld()}),[r]);return(0,L.jsxs)(Po,{sink:i,speed:1.5,className:`absolute inset-0 z-10`,testId:`pad-touchpad`,children:[(0,L.jsx)(`p`,{className:`pointer-events-none absolute inset-x-6 top-1/2 -translate-y-1/2 text-center text-xs leading-5 text-white/50`,children:n(`rp_tp_tips`,void 0,`Drag to move. Tap to click. Two fingers: tap to right-click, drag to scroll. Tap, then touch and drag to select.`)}),(0,L.jsx)(`div`,{className:`absolute`,style:{right:`max(12px, env(safe-area-inset-right))`,bottom:`max(12px, env(safe-area-inset-bottom))`},children:(0,L.jsx)(Io,{sink:t.keyboard?i:null})})]})}function vs({url:e,computer:t,onLeave:n,watch:r=!1,transport:i,hello:a,onReconnectToken:o,lanUrl:s=null}){let c=Tn(),l=us(i?e:null,s),u=t??c(`pad_net_computer`,void 0,`the computer`),[d,f]=(0,T.useState)({kind:`connecting`}),[p,m]=(0,T.useState)(0),[h,g]=(0,T.useState)(()=>typeof window<`u`&&window.innerHeight>window.innerWidth),[_,v]=(0,T.useState)(null),[y,b]=(0,T.useState)(null),[x,S]=(0,T.useState)(!1),ee=(0,T.useRef)(null),te=(0,T.useRef)(null),[C,ne]=(0,T.useState)(!r),[w,re]=(0,T.useState)(null),[ie,ae]=(0,T.useState)(!1),[oe,se]=(0,T.useState)(null),[ce,le]=(0,T.useState)(`controller`);(0,T.useEffect)(()=>(os(`pad-remote`,!0),ls(`pad-remote`,!0),()=>{os(`pad-remote`,!1),ls(`pad-remote`,!1)}),[]),(0,T.useEffect)(()=>{if(!x)return;let e=Ae(e=>{co.motion=e});return()=>{e(),co.motion=null}},[x]),(0,T.useEffect)(()=>{let t=r?Zi(re,`watch`,()=>n.askKeyframe()):null;ee.current=t,t&&te.current?.appendChild(t.element),ne(!r),ae(!1);let n=new io({url:e,WebSocketImpl:i,hello:a,onReconnectToken:o,onStage:f,touchPad:()=>co.touchPad,onLight:v,onKbmCaps:se,motion:()=>co.motion,watch:t?{onFrame:e=>t.onMessage(e),onCodec:e=>t.setHevc(e),onControl:ne}:void 0});b(n),n.start();let s=()=>{let e=document.visibilityState===`hidden`;n.setNeutral(e),e||n.wake()},c=()=>n.setNeutral(!0);return document.addEventListener(`visibilitychange`,s),window.addEventListener(`blur`,c),window.addEventListener(`focus`,s),()=>{document.removeEventListener(`visibilitychange`,s),window.removeEventListener(`blur`,c),window.removeEventListener(`focus`,s),n.stop(),t?.stop(),t?.element.remove()}},[e,p,r]),(0,T.useEffect)(()=>{let e=()=>g(window.innerHeight>window.innerWidth);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let ue=d.kind===`refused`||d.kind===`lost`,de=d.kind===`joined`||d.kind===`reconnecting`,pe=!!s&&!de&&(l||d.kind===`refused`&&d.why===`net:no_hub`);return(0,L.jsxs)(`div`,{className:`fixed inset-0 select-none overflow-hidden bg-black text-white [-webkit-touch-callout:none]`,style:{touchAction:`none`},"data-testid":`pad-app`,children:[(0,L.jsxs)(`div`,{className:`absolute inset-x-0 top-0 z-20 flex items-center justify-center gap-2 px-3 pt-[max(6px,env(safe-area-inset-top))] text-xs text-white/80`,children:[(0,L.jsx)(`span`,{className:`inline-block h-2 w-2 shrink-0 rounded-full`,style:{background:d.kind===`joined`?_?`rgb(${_[0]},${_[1]},${_[2]})`:`var(--color-success,#22c55e)`:ue?`var(--color-bad,#ef4444)`:`#eab308`}}),(0,L.jsx)(`span`,{className:`truncate`,"data-testid":`pad-stage`,children:r&&d.kind===`joined`&&d.host&&(!d.passcode||d.playing)?C?c(`pad_watch_control`,void 0,`Watching, and you have the controller`):c(`pad_watch_watching`,{host:d.host},`Watching ${d.host}`):fs(c,d,u)}),de&&typeof document<`u`&&!!document.documentElement.requestFullscreen&&!document.fullscreenElement&&(0,L.jsxs)(`button`,{type:`button`,onClick:()=>void hs(),className:`flex items-center gap-1 rounded-full bg-white/15 px-2 py-1`,"data-testid":`pad-full`,children:[(0,L.jsx)(fe,{size:12}),c(`pad_fill`,void 0,`Full screen`)]}),de&&k()&&(0,L.jsx)(`button`,{type:`button`,onClick:()=>{x?S(!1):ke().then(S)},"aria-pressed":x,className:`rounded-full px-2 py-1 ${x?`bg-white text-black`:`bg-white/15`}`,"data-testid":`pad-motion`,children:c(`pad_motion`,void 0,`Motion`)}),n&&(0,L.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-full bg-white/15 px-2 py-1`,"data-testid":`pad-leave`,children:c(`pad_leave`,void 0,`Stop being a controller`)})]}),(0,L.jsx)(`div`,{ref:te,className:`absolute inset-0 z-0 flex items-center justify-center`,"aria-hidden":!0}),r&&de&&!ie&&(0,L.jsxs)(`button`,{type:`button`,onClick:()=>{ee.current?.startSound(),ae(!0)},className:`absolute bottom-4 left-1/2 z-20 flex -translate-x-1/2 items-center gap-1.5 rounded-full bg-white/90 px-3 py-1.5 text-xs font-medium text-black`,"data-testid":`watch-sound`,children:[(0,L.jsx)(Ce,{size:14}),c(`pad_watch_sound`,void 0,`Sound`)]}),r&&w&&(0,L.jsx)(`p`,{className:`absolute inset-x-4 top-1/2 z-10 -translate-y-1/2 text-center text-sm text-white/85`,"data-testid":`watch-problem`,children:w===`no_hevc`?c(`pad_watch_no_hevc`,void 0,`This device can't play this stream's picture: the computer streams HEVC, and this device plays only H.264.`):c(`pad_watch_decode`,void 0,`The picture could not be played here.`)}),de&&C&&(ce===`touchpad`&&oe?.mouse&&y?(0,L.jsx)(_s,{client:y,caps:oe}):(0,L.jsx)(wo,{stream:y,layout:`overlay`})),de&&C&&(0,L.jsx)(Lo,{mode:ce===`touchpad`&&oe?.mouse?`touchpad`:`controller`,onChange:le,blocked:gs(c,oe),touchpadLabel:c(`pad_touchpad_tab`,void 0,`Touchpad & keyboard`),style:{top:`calc(max(6px, env(safe-area-inset-top)) + 2rem)`}}),de&&h&&(0,L.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-6 z-20 flex justify-center`,children:(0,L.jsxs)(`span`,{className:`flex items-center gap-2 rounded-full bg-black/70 px-3 py-1.5 text-xs text-white/85`,children:[(0,L.jsx)(xe,{size:14}),c(`pad_turn`,void 0,`Turn the phone sideways`)]})}),pe&&!ue&&s&&(0,L.jsx)(`div`,{className:`absolute inset-x-0 bottom-8 z-10 flex justify-center px-6`,children:(0,L.jsx)(ds,{href:s})}),ue&&(0,L.jsxs)(`div`,{className:`absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 px-6 text-center text-sm`,children:[(0,L.jsx)(`p`,{className:`max-w-sm text-white/85`,children:fs(c,d,u)}),pe&&s&&(0,L.jsx)(ds,{href:s}),ms(d)&&(0,L.jsx)(`button`,{type:`button`,onClick:()=>m(e=>e+1),className:`rounded-full bg-white px-4 py-2 text-sm font-medium text-black`,"data-testid":`pad-retry`,children:c(`pad_retry`,void 0,`Try again`)})]})]})}var ys=`ps5upload.openIn`,bs=`ps5upload.openIn.tab`;function xs(){try{return sessionStorage.getItem(bs)===`browser`}catch{return!1}}function Ss(){try{sessionStorage.setItem(bs,`browser`)}catch{}}function Cs(e){return e===`browser`?`browser`:e===`app`?`opening`:`ask`}function ws({appLink:e,children:t}){let n=Tn(),[r,i]=(0,T.useState)(()=>xs()?`browser`:Cs(yt(ys))),[a,o]=(0,T.useState)(!1);if((0,T.useEffect)(()=>{r===`opening`&&yt(`ps5upload.openIn`)===`app`&&(location.href=e)},[]),r===`browser`)return(0,L.jsx)(L.Fragment,{children:t});let s=()=>{a&&vt(ys,`app`),i(`opening`),location.href=e},c=()=>{r===`ask`&&a?vt(ys,`browser`):r===`opening`&&yt(`ps5upload.openIn`)===`app`&&bt(ys),Ss(),i(`browser`)};return(0,L.jsx)(`div`,{className:`flex min-h-[100dvh] items-center justify-center bg-black px-6 text-white`,"data-testid":`open-in-gate`,"data-join-ui":``,children:(0,L.jsx)(`div`,{className:`w-full max-w-sm space-y-4 rounded-2xl border border-white/10 bg-neutral-900 p-6`,children:r===`ask`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsx)(`h1`,{className:`text-lg font-semibold`,children:n(`open_in_title`,void 0,`Open in the PS5Upload app?`)}),(0,L.jsx)(`p`,{className:`text-sm text-white/60`,children:n(`open_in_body`,void 0,`Have the PS5Upload app on this device? Open this there, or carry on in the browser.`)})]}),(0,L.jsx)(`button`,{type:`button`,onClick:s,autoFocus:!0,className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black`,"data-testid":`open-in-app`,children:n(`open_in_app`,void 0,`Open in the app`)}),(0,L.jsx)(`button`,{type:`button`,onClick:c,className:`w-full rounded-full border border-white/20 py-2.5 text-sm font-semibold text-white hover:bg-white/10`,"data-testid":`open-in-browser`,children:n(`open_in_browser`,void 0,`Continue in browser`)}),(0,L.jsxs)(`label`,{className:`flex items-center justify-center gap-2 text-xs text-white/60`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:a,onChange:e=>o(e.target.checked),"data-testid":`open-in-remember`}),n(`open_in_remember`,void 0,`Remember my choice on this device`)]})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsx)(`h1`,{className:`text-lg font-semibold`,children:n(`open_in_opening`,void 0,`Opening the PS5Upload app…`)}),(0,L.jsx)(`p`,{className:`text-sm text-white/60`,children:n(`open_in_not_opened`,void 0,`Nothing happened? The app may not be on this device.`)})]}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>location.href=e,autoFocus:!0,className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black`,"data-testid":`open-in-again`,children:n(`open_in_again`,void 0,`Try again`)}),(0,L.jsx)(`button`,{type:`button`,onClick:c,className:`w-full rounded-full border border-white/20 py-2.5 text-sm font-semibold text-white hover:bg-white/10`,"data-testid":`open-in-browser`,children:n(`open_in_browser`,void 0,`Continue in browser`)})]})})})}function Ts(e){return`ps5upload://pad?link=${encodeURIComponent(e)}`}function Es(e){let t=(e??``).trim().replace(/^\[|\]$/g,``).toLowerCase(),n=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(t);if(n){let e=n.slice(1).map(Number);if(e.some(e=>e>255))return null;let[t,r]=e;return t===10||t===172&&r>=16&&r<32||t===192&&r===168||t===169&&r===254||t===127?0:t===100&&r>=64&&r<128?1:2}if(!t.includes(`:`)||!/^[0-9a-f:.]+$/.test(t))return null;if(t.startsWith(`fd7a:115c:a1e0:`))return 1;let r=parseInt(t.split(`:`)[0]||`0`,16);return(r&65024)==64512||(r&65472)==65152||t===`::1`?0:2}function Ds(e,t){let n=Es(e),r=Es(t);return n===1||r===1?`tailscale`:r===0?`lan`:r===2?`internet`:null}function Os(e){let t=[];if(typeof e.forEach==`function`)e.forEach(e=>t.push(e));else for(let n of e)t.push(n);let n=new Map(t.map(e=>[String(e.id),e])),r=t.filter(e=>e.type===`candidate-pair`),i=t.filter(e=>e.type===`transport`&&typeof e.selectedCandidatePairId==`string`).map(e=>n.get(String(e.selectedCandidatePairId))).find(Boolean)??r.find(e=>e.selected===!0)??r.find(e=>e.nominated===!0&&e.state===`succeeded`);if(!i)return null;let a=e=>{let t=n.get(String(e));if(!t)return null;let r=t.address??t.ip;return typeof r==`string`?r:null};return Ds(a(i.localCandidateId),a(i.remoteCandidateId))}function ks(e){let t=e.replace(/:\d+$/,``).replace(/^\[|\]$/g,``);return`${t===`localhost`||t===`127.0.0.1`||t===`::1`?`ws`:`wss`}://${e}/ws`}function As(e){let t=new Set;for(let n of e.matchAll(/^a=fingerprint:sha-256[ \t]+([0-9A-Fa-f:]+)[ \t]*\r?$/gim))t.add(n[1].toUpperCase());return/^a=fingerprint:(?!sha-256[ \t])/im.test(e)?null:t.size===1?[...t][0]:null}function js(e,t){let n=As(e);return n!==null&&n===t.toUpperCase()}var Ms=16777216;function Ns(e){let t=16383,n=Math.max(1,Math.ceil(e.length/t)),r=[];for(let i=0;ithis.max)return this.parts=[],this.size=0,{kind:`error`,why:`too_big`};if(this.parts.push(r.slice()),this.size+=r.length,n===1)return{kind:`partial`};let i=new Uint8Array(this.size),a=0;for(let e of this.parts)i.set(e,a),a+=e.length;return this.parts=[],this.size=0,{kind:`message`,data:i.buffer}}};function Fs(e){let t=new Uint8Array(9);return t[0]=3,t.set(e.subarray(0,8),1),t}var Is=[`stun:stun.cloudflare.com:3478`,`stun:stun.l.google.com:19302`],Ls=1500,Rs=2e4;function zs(e){let t=e?.codecs??[],n=e=>t.filter(t=>t.mimeType.toLowerCase()===e);return[...n(`video/h264`),...n(`video/h265`),...n(`video/rtx`)]}var Bs=null;function Vs(e){e.onopen=e.onmessage=e.onclose=e.onerror=null;try{e.readyState===1&&e.send(JSON.stringify({t:`leave`})),e.close(1e3)}catch{}}function Hs(e,t){let n=Bs;return n?(Bs=null,n.timer&&clearTimeout(n.timer),n.url!==e||n.room!==t||n.ws.readyState>1||n.msgs.some(e=>e.t===`error`||e.t===`closed`)?(Vs(n.ws),null):{ws:n.ws,msgs:n.msgs}):null}function Us(e,t={}){var n;let r=t.WebSocketImpl??(typeof WebSocket>`u`?void 0:WebSocket),i=t.PeerConnection??(typeof RTCPeerConnection>`u`?void 0:RTCPeerConnection),a=t.iceTimeoutMs??15e3,o=t.log??(()=>{});class s{constructor(e){this.CONNECTING=0,this.OPEN=1,this.CLOSING=2,this.CLOSED=3,this.readyState=0,this.binaryType=`arraybuffer`,this.onopen=null,this.onmessage=null,this.onclose=null,this.onerror=null,this.hub=null,this.pc=null,this.dc=null,this.timer=null,this.rx=new Ps,this.answered=!1,this.early=[],this.hubBackUntil=0,this.offerSdp=null,this.offerSent=!1,this.ownEarly=[],this.media=null,setTimeout(()=>this.begin(),0)}begin(){if(this.readyState!==0)return;if(!i||!r){this.fail(`no_webrtc`);return}let n=t.signalUrl??ks(e.hub),a=t.signalUrl||t.lan?null:Hs(n,e.room),s;if(a)s=a.ws,o(`hub: joined early`);else try{s=new r(n)}catch{this.fail(`no_hub`);return}if(this.hub=s,this.prepare(),this.readyState===0){s.onopen=()=>s.send(JSON.stringify(t.lan?{v:1,t:`join`,lan:!0}:{v:1,t:`join`,room:e.room})),s.onmessage=e=>{if(typeof e.data!=`string`)return;let t;try{t=JSON.parse(e.data)}catch{return}this.onHub(t)},s.onclose=e=>{this.hub===s&&(this.hub=null,this.readyState===0&&(this.answered||e?.code===1001&&this.hubRestarting()||this.fail(`no_hub`)))},s.onerror=()=>{};for(let e of a?.msgs??[])this.onHub(e)}}signal(e){let t=this.hub;t&&t.readyState===1&&t.send(JSON.stringify({t:`signal`,to:`host`,data:e}))}onHub(e){if(this.readyState===0)switch(e.t){case`joined`:o(`hub: joined room as ${e.gid??`?`}`),this.sendOffer();return;case`signal`:e.from===`host`&&e.data&&typeof e.data==`object`&&this.onSignal(e.data);return;case`closed`:this.fail(`no_room`);return;case`error`:if(o(`hub: error ${e.why??`?`}`),e.why===`no_room`&&this.hubBackUntil&&this.hubRestarting())return;this.fail(e.why===`no_room`?`no_room`:e.why===`room_full`?`net_full`:`no_hub`);return}}prepare(){if(!i)return;this.offerSent=!1,this.ownEarly=[];let e;try{e=new i({iceServers:[{urls:Is}]})}catch{this.fail(`no_webrtc`);return}this.pc=e;let n=e.createDataChannel(t.label??`join`,{ordered:!0});if(n.binaryType=`arraybuffer`,this.dc=n,n.onopen=()=>this.opened(n),n.onmessage=e=>this.fromChannel(e.data),n.onclose=()=>{this.dc===n&&this.dropped()},t.video&&e.addTransceiver){try{let t=e.addTransceiver(`video`,{direction:`recvonly`}),n=zs(globalThis.RTCRtpReceiver?.getCapabilities?.(`video`));n.length&&t.setCodecPreferences&&t.setCodecPreferences(n)}catch{}try{e.addTransceiver(`audio`,{direction:`recvonly`})}catch{}e.ontrack=t=>{if(this.pc!==e)return;let n=this.media?.stream??t.streams[0]??new MediaStream;n.getTracks().includes(t.track)||n.addTrack(t.track),this.media=t.track.kind===`audio`?{stream:n,receiver:this.media?.receiver??t.receiver,audio:t.receiver}:{stream:n,receiver:t.receiver,...this.media?.audio?{audio:this.media.audio}:{}}}}e.onicecandidate=t=>{if(this.pc!==e)return;let n=t.candidate;if(!n||!n.candidate)return;let r={type:`candidate`,candidate:n.candidate,sdpMid:n.sdpMid??`0`};this.offerSent?this.signal(r):this.ownEarly.push(r)},e.oniceconnectionstatechange=()=>{if(this.pc!==e)return;let t=e.iceConnectionState;o(`ice: ${t}`),t===`failed`&&(this.readyState===0?this.fail(`no_direct`):this.dropped())},this.offerSdp=(async()=>{let t=await e.createOffer();return await e.setLocalDescription(t),e.localDescription?.sdp??t.sdp??``})().catch(()=>(this.pc===e&&this.fail(`no_webrtc`),null))}async sendOffer(){let e=this.pc,t=this.offerSdp;if(!e||!t||this.offerSent)return;this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,this.readyState===0&&this.fail(`no_direct`)},a);let n=await t;if(this.pc===e&&n!==null&&this.readyState===0){this.signal({type:`offer`,sdp:n}),this.offerSent=!0;for(let e of this.ownEarly.splice(0))this.signal(e)}}async onSignal(t){let n=this.pc;if(t.type===`bye`)this.fail(t.why===`full`?`net_full`:`offer`);else if(n){if(t.type===`answer`){if(this.answered||typeof t.sdp!=`string`)return;if(e.fp?!js(t.sdp,e.fp):As(t.sdp)===null){o(`answer: fingerprint does not match the link`),this.fail(`mismatch`);return}this.answered=!0;try{await n.setRemoteDescription({type:`answer`,sdp:t.sdp});for(let e of this.early.splice(0))await n.addIceCandidate(e).catch(()=>{})}catch{this.fail(`offer`)}}else if(t.type===`candidate`&&typeof t.candidate==`string`&&t.candidate){let e={candidate:t.candidate,sdpMid:typeof t.sdpMid==`string`?t.sdpMid:`0`,sdpMLineIndex:typeof t.sdpMLineIndex==`number`?t.sdpMLineIndex:0};this.answered?await n.addIceCandidate(e).catch(()=>{}):this.early.push(e)}}}opened(e){this.dc===e&&this.readyState===0&&(this.clearTimer(),this.readyState=1,o(`channel open`),this.leaveHub(),this.onopen?.(new Event(`open`)))}fromChannel(e){if(this.readyState!==1)return;if(typeof e==`string`){this.onmessage?.(new MessageEvent(`message`,{data:e}));return}if(!(e instanceof ArrayBuffer))return;let t=this.rx.push(e);switch(t.kind){case`ping`:try{this.dc?.send(Fs(t.data))}catch{}return;case`message`:this.onmessage?.(new MessageEvent(`message`,{data:t.data}));return;case`error`:o(`channel: bad binary message (${t.why})`),this.dropped();return;default:return}}async netPath(){let e=this.pc;if(!e||this.readyState!==1||typeof e.getStats!=`function`)return null;try{return Os(await e.getStats())}catch{return null}}send(e){let t=this.dc;if(this.readyState!==1||!t||t.readyState!==`open`)throw Error(`not open`);if(typeof e==`string`){t.send(e);return}let n=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);for(let e of Ns(n))t.send(e)}close(){this.readyState!==3&&(this.teardown(),this.emitClose(1e3,``,!0))}clearTimer(){this.timer&&clearTimeout(this.timer),this.timer=null}leaveHub(){let e=this.hub;if(this.hub=null,e)try{e.readyState===1&&e.send(JSON.stringify({t:`leave`})),e.close(1e3)}catch{}}hubRestarting(){let e=Date.now();return this.hubBackUntil||=e+Rs,e>=this.hubBackUntil?!1:(o(`hub: restarting, trying again`),this.clearTimer(),this.leaveHub(),this.closePeer(),this.answered=!1,this.early=[],this.timer=setTimeout(()=>{this.timer=null,this.begin()},Ls),!0)}teardown(){this.readyState=3,this.clearTimer(),this.leaveHub(),this.closePeer()}closePeer(){let e=this.pc,t=this.dc;this.pc=null,this.dc=null,this.media=null,this.offerSdp=null,this.offerSent=!1,this.ownEarly=[];try{t?.close()}catch{}try{e?.close()}catch{}}dropped(){this.readyState!==3&&(this.teardown(),this.emitClose(1006,``,!1))}fail(e){this.readyState!==3&&(o(`failed: ${e}`),this.teardown(),this.emitClose(Ie,`net:${e}`,!1))}emitClose(e,t,n){let r=this.onclose;if(!r)return;let i=typeof CloseEvent>`u`?{type:`close`,code:e,reason:t,wasClean:n}:new CloseEvent(`close`,{code:e,reason:t,wasClean:n});setTimeout(()=>r(i),0)}}return n=s,n.CONNECTING=0,n.OPEN=1,n.CLOSING=2,n.CLOSED=3,s}function Ws(e,t=0){return/iPad/.test(e)||/Macintosh/.test(e)&&t>1?`ipad`:/iPhone|iPod/.test(e)?`iphone`:/Android/.test(e)?`android`:`phone`}var Gs=new URLSearchParams(location.hash.slice(1)),Ks=Gs.get(`t`)??``,qs=Gs.get(`w`)===`1`,Js=Ws(navigator.userAgent,navigator.maxTouchPoints),Ys=oo({get:yt,set:vt}),Xs=Be(location.hash),Zs=(0,x.createRoot)(document.getElementById(`root`));if(Xs){let e=Us(Xs,{label:`pad`,log:e=>console.info(`[pad] ${e}`)}),t=`ps5upload.pad.rt.${Xs.room}`,n=yt(t),r={t:Xs.key,name:Js,d:Ys,...qs?{w:1}:{},...n?{rt:n}:{}},i=Me(location.hash,`pad`);Zs.render((0,L.jsx)(vs,{url:ks(Xs.hub),computer:null,watch:qs,transport:e,hello:r,onReconnectToken:e=>vt(t,e),lanUrl:i?Ne(i,{watch:qs}):null}))}else{let e=location.pathname.replace(/\/pad\/?$/,``),t=`${location.protocol===`https:`?`wss`:`ws`}://${location.host}${e}/api/pad/ws?t=${encodeURIComponent(Ks)}&name=${Js}&d=${Ys}${qs?`&w=1`:``}`;Zs.render((0,L.jsx)(ws,{appLink:Ts(location.href),children:(0,L.jsx)(vs,{url:t,computer:location.hostname,watch:qs})}))} +I€wu¸öôú!3å6³‹âVq£³¹´RN£%y10º:pŠ#\:J:b9Hµ7h_Ž:¢I9 _¼™µV,þ <`});var w={a:v};this.setModule=t=>{e.setModule(fi,t)},this.getModule=()=>e.getModule(fi),this.instantiate=()=>(this.getModule().then(e=>WebAssembly.instantiate(e,w)).then(e=>{let t=e.exports;y(t),a=t.g,o(),ne(t),n()}),this.ready=new Promise(e=>{n=e}).then(()=>{this.HEAP=a.buffer,this.malloc=x,this.free=te,this.opus_frame_decoder_create=b,this.opus_frame_decode_float_deinterleaved=S,this.opus_frame_decoder_destroy=ee}),this)}var pi=o((()=>{}));function mi(e={}){mi.errors||Object.defineProperties(mi,{errors:{value:new Map([[-1,`OPUS_BAD_ARG: One or more invalid/out of range arguments`],[-2,`OPUS_BUFFER_TOO_SMALL: Not enough bytes allocated in the buffer`],[-3,`OPUS_INTERNAL_ERROR: An internal error was detected`],[-4,`OPUS_INVALID_PACKET: The compressed data passed is corrupted`],[-5,`OPUS_UNIMPLEMENTED: Invalid/unsupported request number`],[-6,`OPUS_INVALID_STATE: An encoder or decoder structure is invalid or already freed`],[-7,`OPUS_ALLOC_FAIL: Memory allocation has failed`]])}}),this._init=()=>new this._WASMAudioDecoderCommon(this).instantiate(this._EmscriptenWASM,this._module).then(e=>{this._common=e,this._inputBytes=0,this._outputSamples=0,this._frameNumber=0,this._input=this._common.allocateTypedArray(this._inputSize,Uint8Array),this._output=this._common.allocateTypedArray(this._outputChannels*this._outputChannelSize,Float32Array);let t=this._common.allocateTypedArray(this._channels,Uint8Array);t.buf.set(this._channelMappingTable),this._decoder=this._common.wasm.opus_frame_decoder_create(this._sampleRate,this._channels,this._streamCount,this._coupledStreamCount,t.ptr,this._preSkip,this._forceStereo)}),Object.defineProperty(this,"ready",{enumerable:!0,get:()=>this._ready}),this.reset=()=>(this.free(),this._init()),this.free=()=>{this._common.free(),this._common.wasm.opus_frame_decoder_destroy(this._decoder),this._common.wasm.free(this._decoder)},this._decode=e=>{if(!(e instanceof Uint8Array))throw Error(`Data to decode must be Uint8Array. Instead got `+typeof e);this._input.buf.set(e);let t=this._common.wasm.opus_frame_decode_float_deinterleaved(this._decoder,this._input.ptr,e.length,this._output.ptr),n;return t<0&&(n=`libopus `+t+` `+(mi.errors.get(t)||`Unknown Error`),console.error(n),t=0),{outputBuffer:this._common.getOutputChannels(this._output.buf,this._outputChannels,t),samplesDecoded:t,error:n}},this.decodeFrame=e=>{let t=[],n=this._decode(e);return n.error&&this._common.addError(t,n.error,e.length,this._frameNumber,this._inputBytes,this._outputSamples),this._frameNumber++,this._inputBytes+=e.length,this._outputSamples+=n.samplesDecoded,this._WASMAudioDecoderCommon.getDecodedAudioMultiChannel(t,[n.outputBuffer],this._outputChannels,n.samplesDecoded,this._sampleRate)},this.decodeFrames=e=>{let t=[],n=[],r=0,i=0;for(;itypeof e==`number`,n=e.sampleRate,r=e.channels,i=e.streamCount,a=e.coupledStreamCount,o=e.channelMappingTable,s=e.preSkip,c=+!!e.forceStereo;if(r>2&&(!t(i)||!t(a)||!Array.isArray(o)))throw Error(`Invalid Opus Decoder Options for multichannel decoding.`);return this._sampleRate=[8e3,12e3,16e3,24e3,48e3].includes(n)?n:48e3,this._channels=t(r)?r:2,this._streamCount=t(i)?i:1,this._coupledStreamCount=t(a)?a:this._channels-1,this._channelMappingTable=o||(this._channels===2?[0,1]:[0]),this._preSkip=s||0,this._forceStereo=r<=8&&r!=2?c:0,this._inputSize=3840*this._channels,this._outputChannelSize=5760,this._outputChannels=this._forceStereo?2:this._channels,this._ready=this._init(),this}var hi=o((()=>{di(),pi()})),gi,_i=o((()=>{di(),pi(),hi(),gi=class extends si{constructor(e){super(e,`opus-decoder`,mi,fi)}async decodeFrame(e){return this.postToDecoder(`decodeFrame`,e)}async decodeFrames(e){return this.postToDecoder(`decodeFrames`,e)}}})),vi=c({OpusDecoder:()=>mi,OpusDecoderWebWorker:()=>gi}),yi=o((()=>{hi(),_i(),di(),li(mi,`OpusDecoder`),li(gi,`OpusDecoderWebWorker`)})),bi=[8e3,12e3,16e3,24e3,48e3],xi=null;function Si(){return xi??=Vn(()=>Promise.resolve().then(()=>(yi(),vi)),__VITE_PRELOAD__,import.meta.url).catch(e=>{throw xi=null,e}),xi}function Ci(){return typeof WebAssembly==`object`&&typeof WebAssembly.instantiate==`function`}function wi(e,t,n,r){return{numberOfFrames:t,numberOfChannels:e.length,sampleRate:n,timestamp:r,format:`f32-planar`,duration:Math.round(t/n*1e6),copyTo(n,r){n.set(e[r.planeIndex].subarray(0,t))},close(){}}}var Ti=class{constructor(e,t=Si){this.init=e,this.load=t,this.state=`unconfigured`,this.dec=null,this.pending=[]}configure(e){if(this.state===`closed`)throw Error(`the decoder is closed`);if(!Ci())throw Error(`no WebAssembly here`);let t=e.sampleRate;if(!bi.includes(t))throw Error(`Opus does not decode at ${t} Hz`);let n=e.numberOfChannels;if(n<1||n>2)throw Error(`${n} channels: only mono and stereo are decoded`);this.state=`configured`,this.load().then(async e=>{if(this.state===`closed`)return;let r=new e.OpusDecoder({channels:n,sampleRate:t});if(await r.ready,this.state!==`configured`){r.free();return}this.dec=r;let i=this.pending;this.pending=[];for(let e of i)this.state===`configured`&&this.run(e)}).catch(e=>this.fail(e))}decode(e){if(this.state!==`configured`)return;let t=e;if(this.dec)return this.run(t);this.pending.push({timestamp:t.timestamp,data:t.data.slice()}),this.pending.length>50&&this.pending.shift()}run(e){let t=this.dec;if(!t)return;let n;try{n=t.decodeFrame(e.data)}catch(e){return this.fail(e)}n.samplesDecoded&&n.channelData.length&&this.init.output(wi(n.channelData,n.samplesDecoded,n.sampleRate,e.timestamp))}fail(e){if(this.state===`closed`)return;this.close();let t=e instanceof Error?e:Error(String(e));queueMicrotask(()=>this.init.error(t))}close(){this.state=`closed`,this.pending=[];let e=this.dec;this.dec=null;try{e?.free()}catch{}}},Ei={makeDecoder:e=>new Ti(e),makeChunk:e=>({type:e.type,timestamp:e.timestamp,data:e.data instanceof Uint8Array?e.data:new Uint8Array(e.data)})};function Di(e,t){for(let n=0;n+3>1&63;if(t>=16&&t<=21)return!0;if(t<16)return!1}else{let t=e[n+3]&31;if(t===5)return!0;if(t===1)return!1}}return!1}function Oi(e){for(let t=0;t+6e.toString(16).padStart(2,`0`);return`avc1.${n(e[t+4])}${n(e[t+5])}${n(e[t+6])}`}return`avc1.4d4028`}var ki=[`hev1.1.6.L153.B0`,`hvc1.1.6.L153.B0`,`hev1.2.4.L153.B0`,`hvc1.2.4.L153.B0`,`hev1.1.6.L150.90`];async function Ai(e,t){if(typeof VideoDecoder>`u`)return null;for(let n of ki)try{if((await VideoDecoder.isConfigSupported({codec:n,codedWidth:e,codedHeight:t})).supported)return n}catch{}return null}function ji(e){let t=[];for(let n=0;n+2{let i=r+1n&&e[i-1]===0;)i--;return e.subarray(n,i)}).filter(e=>e.length>0)}var Mi=(e,t)=>t?e[0]>>1&63:e[0]&31;function j(e,...t){let n=8+t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(n);new DataView(r.buffer).setUint32(0,n);for(let t=0;t<4;t++)r[4+t]=e.charCodeAt(t);let i=8;for(let e of t)r.set(e,i),i+=e.length;return r}function M(...e){let t=new Uint8Array(e.reduce((e,[,t])=>e+t,0)),n=0;for(let[r,i]of e){for(let e=i-1;e>=0;e--)t[n+i-1-e]=Math.floor(r/2**(8*e))&255;n+=i}return t}var Ni=(e,t,n,...r)=>j(e,M([t,1],[n,3]),...r),Pi=M([65536,4],[0,4],[0,4],[0,4],[65536,4],[0,4],[0,4],[0,4],[1073741824,4]);function Fi(e){let t=e.handler===`vide`,n=j(`ftyp`,new TextEncoder().encode(`isom`),M([1,4]),new TextEncoder().encode(`isomiso6mp41`)),r=j(`moov`,Ni(`mvhd`,0,0,M([0,4],[0,4],[e.timescale,4],[0,4],[65536,4],[256,2],[0,2],[0,4],[0,4]),Pi,new Uint8Array(24),M([2,4])),j(`trak`,Ni(`tkhd`,0,3,M([0,4],[0,4],[1,4],[0,4],[0,4],[0,4],[0,4],[0,2],[0,2],[t?0:256,2],[0,2]),Pi,M([(e.width??0)*65536,4],[(e.height??0)*65536,4])),j(`mdia`,Ni(`mdhd`,0,0,M([0,4],[0,4],[e.timescale,4],[0,4],[21956,2],[0,2])),Ni(`hdlr`,0,0,M([0,4]),new TextEncoder().encode(e.handler),new Uint8Array(12),M([0,1])),j(`minf`,t?Ni(`vmhd`,0,1,new Uint8Array(8)):Ni(`smhd`,0,0,M([0,4])),j(`dinf`,Ni(`dref`,0,0,M([1,4]),Ni(`url `,0,1))),j(`stbl`,Ni(`stsd`,0,0,M([1,4]),e.sampleEntry),Ni(`stts`,0,0,M([0,4])),Ni(`stsc`,0,0,M([0,4])),Ni(`stsz`,0,0,M([0,4],[0,4])),Ni(`stco`,0,0,M([0,4])))))),j(`mvex`,Ni(`trex`,0,0,M([1,4],[1,4],[0,4],[0,4],[0,4])))),i=new Uint8Array(n.length+r.length);return i.set(n,0),i.set(r,n.length),i}function Ii(e,t,n,r,i){let a=i?33554432:16842752,o=e=>Ni(`trun`,0,1793,M([1,4],[e,4],[n,4],[r.length,4],[a,4])),s=e=>j(`traf`,Ni(`tfhd`,0,131072,M([1,4])),Ni(`tfdt`,1,0,M([t,8])),o(e)),c=Ni(`mfhd`,0,0,M([e,4])),l=j(`moof`,c,s(0)).length,u=j(`moof`,c,s(l+8)),d=j(`mdat`,r),f=new Uint8Array(u.length+d.length);return f.set(u,0),f.set(d,u.length),f}function Li(e,t,n=!1){let r=t?[35,...n?[32,33,34]:[]]:[9,...n?[7,8]:[]],i=ji(e).filter(e=>!r.includes(Mi(e,t))),a=new Uint8Array(i.reduce((e,t)=>e+4+t.length,0)),o=new DataView(a.buffer),s=0;for(let e of i)o.setUint32(s,e.length),a.set(e,s+4),s+=4+e.length;return a}var Ri=e=>e.toString(16).padStart(2,`0`),zi=e=>{let t=new Uint8Array(2+e.length);return t[0]=e.length>>8,t[1]=e.length&255,t.set(e,2),t},Bi=e=>{let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t};function Vi(e){let t=ji(e),n=t.filter(e=>Mi(e,!1)===7),r=t.filter(e=>Mi(e,!1)===8);return!n.length||!r.length||n[0].length<4?null:Bi([M([1,1],[n[0][1],1],[n[0][2],1],[n[0][3],1],[255,1],[224|n.length,1]),...n.map(zi),M([r.length,1]),...r.map(zi)])}function Hi(e,t,n){let r=ji(e),i=e=>r.filter(n=>Mi(n,t)===e),a=(e,t)=>j(e,new Uint8Array(6),M([1,2],[0,16],[n.w,2],[n.h,2],[4718592,4],[4718592,4],[0,4],[1,2]),new Uint8Array(32),M([24,2],[65535,2]),t);if(!t){let t=i(7),r=Vi(e);return r?{init:Fi({handler:`vide`,timescale:9e4,sampleEntry:a(`avc1`,j(`avcC`,r)),width:n.w,height:n.h}),mime:`video/mp4; codecs="avc1.${Ri(t[0][1])}${Ri(t[0][2])}${Ri(t[0][3])}"`}:null}let o=i(32),s=i(33),c=i(34);if(!o.length||!s.length||!c.length)return null;let l=Vr(s[0]);if(l.length<15)return null;let u=l.subarray(3,15),d=u[0]&31,f=d===2?2:0,p=(e,t)=>Bi([M([128|e,1],[t.length,2]),...t.map(zi)]),m=j(`hvcC`,M([1,1]),u,M([61440,2],[252,1],[253,1],[248|f,1],[248|f,1],[0,2],[15,1],[3,1]),p(32,o),p(33,s),p(34,c)),h=[``,`A`,`B`,`C`][u[0]>>6],g=0,_=(u[1]<<24|u[2]<<16|u[3]<<8|u[4])>>>0;for(let e=0;e<32;e++)_&1<>>0).toString(16),`${u[0]&32?`H`:`L`}${u[11]}`,...v.map(e=>e.toString(16))].join(`.`);return{init:Fi({handler:`vide`,timescale:9e4,sampleEntry:a(`hvc1`,m),width:n.w,height:n.h}),mime:`video/mp4; codecs="${y}"`}}function Ui(e,t,n,r,i,a){return Ii(e,t,n,Li(r,i),a)}function Wi(e,t){let n=j(`dOps`,M([0,1],[e,1],[312,2],[t,4],[0,2],[0,1]));return Fi({handler:`soun`,timescale:48e3,sampleEntry:j(`Opus`,new Uint8Array(6),M([1,2],[0,8],[e,2],[16,2],[0,4],[3145728e3,4]),n)})}function Gi(e){if(!e.length)return 960;let t=e[0]>>3,n=t<12?[480,960,1920,2880][t%4]:t<16?[480,960][t%2]:[120,240,480,960][t%4],r=e[0]&3,i=r===0?1:r===3?(e[1]??1)&63:2;return n*Math.max(1,i)}function Ki(e,t,n){return Ii(e,t,Gi(n),n,!0)}var qi={watch:30,player:4},Ji={watch:{seek:.5,speed:1/0,target:.05},player:{seek:.15,speed:.06,target:.02}},Yi={seek:.8,speed:.25,target:.12};function Xi(e,t,n){let r=typeof n==`string`?Ji[n]:n;return e>r.seek?{seekTo:t-r.target,rate:1}:e>r.speed?{seekTo:null,rate:1.1}:{seekTo:null,rate:1}}function Zi(e,t=`watch`,n){return typeof VideoDecoder<`u`?new ca(e,t,n):new ba(e,t,n)}var Qi=class{constructor(e,t=()=>performance.now()){this.ask=e,this.now=t,this.last=-1/0}waiting(){if(!this.ask)return;let e=this.now();e-this.last<1e3||(this.last=e,this.ask())}};function $i(e){return e.length<3?null:{index:e[0]<<8|e[1],packet:e.subarray(2)}}var ea=class{constructor(){this.last=-1}take(e){if(this.last>=0){let t=e-this.last&65535;if(t===0||t>=32768)return!1}return this.last=e,!0}reset(){this.last=-1}};function ta(e){if(e.length>=10)return e;let t=new Uint8Array(10);t.set(e.subarray(0,6));let n=new DataView(t.buffer);return n.setUint32(6,Math.round(n.getUint32(2)/100)||480),t}function na(e,t){return{snd:e,snd_decoded:t.decoded,snd_concealed:t.concealed,snd_underruns:t.underruns,snd_dropped:t.dropped}}var ra=class{constructor(e,t=.2){this.min=e,this.max=t,this.next=0,this.calmSince=0,this.minLead=1/0,this.windowAt=0,this.underruns=0,this.dropped=0,this.cushion=e}at(e,t){this.next0&&(this.underruns++,this.cushion=Math.min(this.max,this.cushion+.02)),this.calmSince=e,this.next=e+this.cushion,this.minLead=1/0,this.windowAt=e):e-this.calmSince>10&&this.cushion>this.min&&(this.cushion=Math.max(this.min,this.cushion-.01),this.calmSince=e);let n=this.next-e;if(n>this.cushion+.15)return this.dropped++,null;if(this.minLead=Math.min(this.minLead,n),e-this.windowAt>=.25){let t=this.minLead>this.cushion+ia;if(this.minLead=1/0,this.windowAt=e,t)return this.dropped++,null}let r=this.next;return this.next+=t,r}reset(){this.next=0}},ia=.02;async function aa(e,t){try{return typeof AudioDecoder>`u`?!1:!!(await AudioDecoder.isConfigSupported({codec:`opus`,sampleRate:e,numberOfChannels:t})).supported}catch{return!1}}var oa=class{constructor(e,t=()=>performance.now()){this.decoder=e,this.now=t,this.n={frames:0,dropped:0,late:0,stalls:0,stall_ms:0,worst_stall_ms:0,key_waits:0},this.a=0,this.d=0,this.w=!1,this.q=[],this.sum=0,this.cnt=0,this.codec=``}get frames(){return this.n.frames}arrived(){let e=this.now();this.a&&e-this.a>50&&this.n.late++,this.a=e}drop(){this.n.dropped++,this.w||this.n.key_waits++,this.w=!0}decoding(){this.w=!1,this.q.push(this.now())>64&&this.q.shift()}drawn(e=!1){let t=this.now(),n=e?this.q.shift():void 0;n!==void 0&&(this.sum+=t-n,this.cnt++);let r=this.d?t-this.d:0;r>100&&this.stall(r),this.d=t,this.n.frames++}stall(e){this.n.stalls++,this.n.stall_ms+=e,this.n.worst_stall_ms=Math.max(this.n.worst_stall_ms,e)}snapshot(){let e=this.d?this.now()-this.d:0,t={...this.n,decoder:this.decoder};this.codec&&(t.codec=this.codec),e>100&&(t.stalls=this.n.stalls+1,t.stall_ms=this.n.stall_ms+e,t.worst_stall_ms=Math.max(this.n.worst_stall_ms,e));for(let e of[`stall_ms`,`worst_stall_ms`])t[e]=Math.round(t[e]);return t.decode_ms=this.cnt?Math.round(this.sum/this.cnt*10)/10:0,this.sum=this.cnt=0,t}},sa=[`pointerup`,`touchend`,`click`,`keydown`],ca=class{get element(){if(!this.wrap){let e=document.createElement(`div`);e.className=`h-full w-full`,e.append(this.canvas),this.mse&&e.append(this.mse.element),this.wrap=e}return this.wrap}get stats(){return this.mse?.stats??this.ownStats}soundReport(){return this.soundOn?this.mseSound?this.mseSound.report():na(this.soundWasm?`wasm`:`webcodecs`,this.soundStats):null}constructor(e,t=`watch`,n){this.onProblem=e,this.latency=t,this.onNeedKey=n,this.canvas=document.createElement(`canvas`),this.wrap=null,this.mse=null,this.failsNoPicture=0,this.ctx=this.canvas.getContext(`2d`,{alpha:!1}),this.hevc=!1,this.header=null,this.spsRect=null,this.software=!1,this.video=null,this.opening=!1,this.stopped=!1,this.sawKey=!1,this.ownStats=new oa(`webcodecs`),this.problemShown=!1,this.ts=0,this.pipe=null,this.audioGen=0,this.actx=null,this.soundOn=!1,this.unarm=null,this.mseSound=null,this.audioHeader=null,this.soundWasm=!1,this.onSoundFail=null,this.muted=!1,this.keyAsk=new Qi(n),this.clock=new ra(t===`player`?.05:.08),typeof AudioDecoder>`u`&&N()&&(this.mseSound=new P(t,()=>this.mseSoundFailed())),this.canvas.className=`block h-full w-full object-contain`,this.canvas.dataset.testid=`watch-canvas`}setHevc(e){this.hevc=e,this.header&&(this.spsRect=qr(this.header,e)),this.mse?.setHevc(e)}get onMse(){return!!this.mse}decodeFailed(){if(this.mse||this.ownStats.frames>0||++this.failsNoPicture<3||!fa())return!1;let e=new ba(this.onProblem,this.latency,this.onNeedKey);e.setHevc(this.hevc),e.markProblemShown(),this.mse=e;let t=this.video;this.video=null;try{t?.close()}catch{}return this.canvas.style&&(this.canvas.style.display=`none`),this.wrap?.append(e.element),this.header&&e.onMessage(new Uint8Array([0,...this.header]).buffer),this.onNeedKey?.(),!0}startSound(){this.soundOn=!0,la(),this.mseSound?this.mseSound.start():this.openContext()}openContext(){try{if(!this.actx){let e=new AudioContext({latencyHint:`interactive`});this.actx=e,e.onstatechange=()=>{this.actx===e&&e.state!==`running`&&e.state!==`closed`&&this.armResume()}}this.actx.resume().catch(()=>{})}catch{this.onSoundFail?.()}}get sound(){return this.soundOn}setMuted(e){this.muted=e,this.mseSound?.setMuted(e)}resumeSound(){if(!this.soundOn)return;if(this.mseSound)return this.mseSound.resume();let e=this.actx;e&&e.state!==`running`&&e.state!==`closed`&&(this.clock.reset(),e.resume().catch(()=>{}),this.armResume())}get soundStats(){return{decoded:this.pipe?.decoded??0,concealed:this.pipe?.concealed??0,underruns:this.clock.underruns,dropped:this.clock.dropped,cushionMs:Math.round(this.clock.cushion*1e3)}}armResume(){if(this.unarm||typeof window>`u`||!window.addEventListener)return;let e=()=>{let e=this.actx;if(!e||e.state===`closed`)return this.unarm?.();this.clock.reset(),e.resume().then(()=>{e.state===`running`&&this.unarm?.()}).catch(()=>{})};for(let t of sa)window.addEventListener(t,e,!0);this.unarm=()=>{for(let t of sa)window.removeEventListener(t,e,!0);this.unarm=null}}onMessage(e){let t=new Uint8Array(e);if(t.length<1||this.stopped)return;let n=t[0],r=t.subarray(1);if(this.mse&&(n===0||n===1))return n===0&&(this.header=r.slice()),this.mse.onMessage(e);n===0?this.openVideo(r.slice()):n===1?this.onVideo(r):n===3?this.openAudio(r.slice()):n===4&&this.onAudio(r)}async openVideo(e){if(this.header=e,this.spsRect=qr(e,this.hevc),!this.opening){this.opening=!0;try{let t=this.hevc?await xa(e):Oi(e);if(this.mse||this.stopped)return;if(!t){this.problemShown=!0,this.onProblem(`no_hevc`);return}this.ownStats.codec=t;let n=this.hevc?void 0:Vi(e)??void 0;try{this.video?.close()}catch{}let r=new VideoDecoder({output:e=>{let t=this.realVisible(e),n=this.canvas;(n.width!==t.displayWidth||n.height!==t.displayHeight)&&(n.width=t.displayWidth,n.height=t.displayHeight),this.ctx?.drawImage(t,0,0,n.width,n.height),this.ownStats.drawn(!0),t.close(),this.problemShown&&(this.problemShown=!1,this.onProblem(null))},error:()=>{this.video===r&&(this.problemShown=!0,this.onProblem(`decode`),this.decodeFailed()||this.rebuild())}}),i={codec:t,optimizeForLatency:!0};n&&(i.description=n),this.software&&(i.hardwareAcceleration=`prefer-software`),r.configure(i),this.video=r,this.sawKey=!1}catch{this.problemShown=!0,this.onProblem(`decode`),this.decodeFailed()}finally{this.opening=!1}}}realVisible(e){let t=this.spsRect,n=Jr(e,t);if(n)try{let t=new VideoFrame(e,{visibleRect:{x:n.x,y:n.y,width:n.w,height:n.h},displayWidth:n.w,displayHeight:n.h});return e.close(),t}catch{return e}let r=e.visibleRect;if(t&&r&&!this.software&&(r.width{if(this.video===e){try{e?.close()}catch{}this.rebuild(),this.onNeedKey?.()}})}return e}rebuild(){this.mse||this.stopped||(this.video=null,this.sawKey=!1,this.header&&this.openVideo(this.header).then(()=>this.keyAsk.waiting()))}onVideo(e){let t=this.video;if(t?.state===`closed`){this.opening||this.rebuild();return}if(!t||t.state!==`configured`)return;let n=Di(e,this.hevc);if(this.ownStats.arrived(),!this.sawKey&&!n)return this.ownStats.drop(),this.keyAsk.waiting();if(!n&&t.decodeQueueSize>qi[this.latency])return this.sawKey=!1,this.ownStats.drop(),this.keyAsk.waiting();this.sawKey=!0;let r=e;this.hevc?n&&this.header&&(r=new Uint8Array(this.header.length+e.length),r.set(this.header,0),r.set(e,this.header.length)):r=Li(e,!1,!0),this.ts+=16667,this.ownStats.decoding(),t.decode(new EncodedVideoChunk({type:n?`key`:`delta`,timestamp:this.ts,data:r}))}openAudio(e){if(e.length<6)return;let t=++this.audioGen;if(this.pipe?.reset(),this.pipe=null,this.clock.reset(),this.audioHeader=e,this.mseSound)return this.mseSound.setHeader(e);let n=e[0];aa(new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(2),n).then(n=>{if(t!==this.audioGen)return;if(!n)return N()?this.soundThroughMse(e):this.soundThroughWasm(e);let r=new Qr((e,t)=>this.play(e,t,r.sampleRate));try{r.header(ta(e)),this.pipe=r}catch{this.soundThroughMse(e)}})}soundThroughMse(e){this.pipe=null,this.mseSound||(this.mseSound=new P(this.latency,()=>this.mseSoundFailed()),this.soundOn&&this.mseSound.start()),this.mseSound.setHeader(e)}soundThroughWasm(e){this.pipe?.reset(),this.soundWasm=!0;let t=new Qr((e,n)=>this.play(e,n,t.sampleRate),Ei,()=>{this.pipe===t&&(this.pipe=null),this.onSoundFail?.()});this.pipe=t,t.header(ta(e))}mseSoundFailed(){let e=this.mseSound;e&&(this.mseSound=null,e.stop(),this.soundOn&&(this.openContext(),this.actx&&this.actx.state!==`running`&&this.armResume()),this.audioHeader&&this.soundThroughWasm(this.audioHeader))}onAudio(e){if(this.mseSound)return this.mseSound.frame(e);this.soundOn&&this.pipe&&this.pipe.packet(e)}play(e,t,n){let r=this.actx;if(!r||r.state!==`running`||!e.length)return;let i=e[0].length,a=this.clock.at(r.currentTime,i/n);if(a===null)return;let o=r.createBuffer(e.length,i,n),s=this.muted?0:t;e.forEach((e,t)=>o.copyToChannel(s===1?e:e.map(e=>e*s),t));let c=r.createBufferSource();c.buffer=o,c.connect(r.destination),c.start(a)}stop(){this.stopped=!0;try{this.video?.close()}catch{}this.mse?.stop(),this.audioGen++,this.pipe?.reset(),this.pipe=null,this.unarm?.(),this.actx?.close().catch(()=>{}),this.mseSound?.stop()}};function la(){try{let e=navigator.audioSession;e&&e.type!==`playback`&&(e.type=`playback`)}catch{}}function ua(e,t){try{return e.isTypeSupported(t)}catch{return!1}}function N(){let e=typeof window>`u`?null:fa();return!!e&&(ua(e,`audio/mp4; codecs="Opus"`)||ua(e,`audio/mp4; codecs="opus"`))}var P=class{constructor(e,t,n=document.createElement(`audio`)){this.onFail=t,this.header=null,this.time=0,this.on=!1,this.failed=!1,this.order=new ea,this.el=n,this.track=new ga(n,()=>this.fail(),e===`player`?Yi:e)}get playing(){return this.on&&!this.failed}report(){return{snd:`mse`,snd_jumps:this.track.seeks}}setHeader(e){this.header=e,this.on&&this.open()}start(){if(!this.on&&(this.on=!0,this.header&&this.open(),!this.failed))try{this.el.play()?.catch?.(()=>{})}catch{}}frame(e){if(!this.on||this.failed||!this.track.ready&&!this.track.backlog)return;let t=$i(e);if(!t||!this.order.take(t.index))return;let n=Ki(this.track.nextSeq(),this.time,t.packet);this.time+=Gi(t.packet),this.track.push(n)}setMuted(e){this.el.muted=e}resume(){if(this.playing&&this.el.paused)try{this.el.play()?.catch?.(()=>{})}catch{}}stop(){this.on=!1,this.track.close()}open(){let e=this.header;if(!e||e.length<6||this.failed)return;let t=e[0],n=Wi(t,new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(2));this.track.open(`audio/mp4; codecs="Opus"`,n)||this.track.open(`audio/mp4; codecs="opus"`,n)?(this.time=0,this.order.reset()):this.fail()}fail(){this.failed||(this.failed=!0,this.onFail())}},da=class{constructor(e,t,n=Ei){this.onFail=t,this.codecs=n,this.actx=null,this.pipe=null,this.header=null,this.on=!1,this.failed=!1,this.muted=!1,this.unarm=null,this.played=!1,this.clock=new ra(e===`player`?.05:.08)}get playing(){return this.on&&!this.failed}get stats(){return{decoded:this.pipe?.decoded??0,concealed:this.pipe?.concealed??0,underruns:this.clock.underruns,dropped:this.clock.dropped}}start(){if(!this.failed){this.on=!0,la();try{if(!this.actx){let e=new AudioContext({latencyHint:`interactive`});this.actx=e,e.onstatechange=()=>{this.actx===e&&e.state!==`running`&&e.state!==`closed`&&this.armResume()}}this.actx.resume().catch(()=>{}),this.actx.state!==`running`&&this.armResume()}catch{return this.fail()}this.header&&!this.pipe&&this.open()}}setHeader(e){e.length<6||(this.header=e,this.pipe?.reset(),this.pipe=null,this.clock.reset(),this.on&&this.open())}frame(e){this.on&&!this.failed&&this.pipe?.packet(e)}setMuted(e){this.muted=e}resume(){let e=this.actx;this.playing&&e&&e.state!==`running`&&e.state!==`closed`&&(this.clock.reset(),e.resume().catch(()=>{}),this.armResume())}stop(){this.on=!1,this.pipe?.reset(),this.pipe=null,this.unarm?.(),this.actx?.close().catch(()=>{}),this.actx=null}open(){let e=this.header;if(!e||this.failed)return;let t=new Qr((e,n)=>this.play(e,n,t.sampleRate),this.codecs,()=>{this.pipe===t&&this.fail()});this.pipe=t,t.header(ta(e))}play(e,t,n){let r=this.actx;if(!r||r.state!==`running`||!e.length)return;let i=e[0].length,a=this.clock.at(r.currentTime,i/n);if(a===null)return;let o=r.createBuffer(e.length,i,n),s=this.muted?0:t;e.forEach((e,t)=>o.copyToChannel(s===1?e:e.map(e=>e*s),t));let c=r.createBufferSource();c.buffer=o,c.connect(r.destination),c.start(a),this.played=!0}armResume(){if(this.unarm||typeof window>`u`||!window.addEventListener)return;let e=()=>{let e=this.actx;if(!e||e.state===`closed`)return this.unarm?.();this.clock.reset(),e.resume().then(()=>{e.state===`running`&&this.unarm?.()}).catch(()=>{})};for(let t of sa)window.addEventListener(t,e,!0);this.unarm=()=>{for(let t of sa)window.removeEventListener(t,e,!0);this.unarm=null}}fail(){this.failed||(this.failed=!0,this.stop(),this.onFail())}};function fa(){let e=window;return e.ManagedMediaSource??e.MediaSource??null}var pa=10,ma=3;function ha(e,t,n,r=ma){let i=null;for(let a of e)a>t&&a<=n-r&&(i=a);return i}var ga=class{constructor(e,t,n=`watch`,r,i=()=>performance.now()){this.el=e,this.onError=t,this.latency=n,this.onNeedKey=r,this.now=i,this.ms=null,this.sb=null,this.queue=[],this.mime=``,this.seq=1,this.ready=!1,this.dropped=!1,this.keys=null,this.seeks=0,this.maxLagS=0,this.fromZero=0,this.trims=0,this.lastJump=null,this.trimAt=-1,this.trimFrom=-1,this.keyAt=-1,this.attached=null,r&&(this.keys=[])}setEdge(e){this.latency=e}markKey(e){this.keys?.push(e),this.keyAt=this.now()}open(e,t){let n=fa();if(!n||!ua(n,e))return!1;this.close();let r=new n;return this.ms=r,this.mime=e,this.queue=[t],this.seq=1,this.ready=!1,this.keys&&=[],r.addEventListener(`sourceopen`,()=>{if(this.ms===r)try{let e=r.addSourceBuffer(this.mime);e.mode=`segments`,e.addEventListener(`updateend`,()=>this.pump()),e.addEventListener(`error`,()=>this.onError()),this.sb=e,this.ready=!0,this.pump()}catch{this.onError()}}),`ManagedMediaSource`in window&&n===window.ManagedMediaSource&&(this.el.disableRemotePlayback=!0),this.attached=_a(this.el,r),!0}nextSeq(){return this.seq++}get backlog(){return this.queue.length}push(e){this.queue.push(e),this.pump()}pump(){let e=this.sb;if(!e||e.updating||!this.ready)return;let t=this.el;if(e.buffered.length){let n=e.buffered.end(e.buffered.length-1),r=e.buffered.start(0),i=n-t.currentTime,a=Xi(i,n,this.latency);if(a.seekTo!==null){this.seeks++,this.maxLagS=Math.max(this.maxLagS,i);let o=this.now(),s=e=>e<0?-1:Math.round(o-e);t.currentTime<.05&&r>1&&this.fromZero++,this.lastJump={at:t.currentTime,start:r,end:n,ranges:e.buffered.length,readyState:t.readyState,paused:t.paused,seeking:t.seeking,sinceTrimMs:s(this.trimAt),trimFrom:this.trimFrom,sinceKeyMs:s(this.keyAt)},t.currentTime=Math.max(r,a.seekTo)}if(t.playbackRate!==a.rate&&(t.playbackRate=a.rate),t.currentTime-r>pa&&this.trim(e,r))return}let n=this.queue.shift();if(n){try{e.appendBuffer(n)}catch{this.dropped=!0}t.paused&&t.play().catch(()=>{})}}trim(e,t){let n=this.el.currentTime,r=n-ma;if(this.keys){if(r=ha(this.keys,t,n),r===null)return(this.keys[this.keys.length-1]??-1/0)<=n-ma&&this.onNeedKey?.(),!1;let e=r;this.keys=this.keys.filter(t=>t>=e),r-=.001}try{return e.remove(t,r),this.trims++,this.trimAt=this.now(),this.trimFrom=n,!0}catch{return!1}}close(){this.ready=!1,this.sb=null,this.queue=[];let e=this.ms;if(this.ms=null,e&&e.readyState===`open`)try{e.endOfStream()}catch{}if(this.attached===`object`)try{this.el.srcObject=null}catch{}this.attached=null,this.el.src?.startsWith(`blob:`)&&URL.revokeObjectURL(this.el.src),this.el.removeAttribute(`src`)}};function _a(e,t){if(`srcObject`in e)try{return e.srcObject=t,`object`}catch{}return e.src=URL.createObjectURL(t),`url`}var va=1e4,ya=class{constructor(e=3,t=va,n=()=>performance.now()){this.max=e,this.windowMs=t,this.now=n,this.at=[]}fail(){let e=this.now();return this.at=this.at.filter(t=>e-t=this.max}clear(){this.at=[]}},ba=class{constructor(e,t=`watch`,n,r){this.onProblem=e,this.latency=t,this.wasm=null,this.audioHeader=null,this.muted=!1,this.gaveUp=!1,this.reopening=!1,this.failedWhileOpening=!1,this.wrap=document.createElement(`div`),this.hevc=!1,this.header=null,this.sawKey=!1,this.stats=new oa(`mse`),this.problemShown=!1,this.vTime=0,this.vLast=0,this.soundOn=!1,this.onSoundFail=null,this.onGiveUp=null,this.keyAsk=new Qi(n),this.fails=new ya(3,va,r);let i=document.createElement(`video`);i.muted=!0,i.autoplay=!0,i.playsInline=!0,i.className=`block h-full w-full object-contain`,i.dataset.testid=`watch-video`,this.audio=new P(t,()=>this.soundThroughWasm()),this.wrap.className=`h-full w-full`,this.wrap.append(i,this.audio.el),this.video=new ga(i,()=>this.showProblem(),t,()=>this.keyAsk.waiting()),i.addEventListener(`error`,()=>this.restartVideo()),i.addEventListener(`playing`,()=>{this.fails.clear(),this.problemShown&&(this.problemShown=!1,this.onProblem(null))})}markProblemShown(){this.problemShown=!0}showProblem(){this.problemShown||(this.problemShown=!0,this.onProblem(`decode`))}restartVideo(){if(this.gaveUp)return;if(this.reopening){this.failedWhileOpening=!0;return}if(this.showProblem(),this.fails.fail()){this.gaveUp=!0,this.video.close(),this.onGiveUp?.();return}let e=this.header;if(e){this.header=null,this.reopening=!0,this.failedWhileOpening=!1;try{this.openVideo(e)}finally{this.reopening=!1}this.sawKey=!1,this.keyAsk.waiting(),this.failedWhileOpening&&(this.failedWhileOpening=!1,this.restartVideo())}}get failed(){return this.gaveUp}setVideoEdge(e){this.video.setEdge(e)}get videoSeeks(){return{seeks:this.video.seeks,maxLagMs:Math.round(this.video.maxLagS*1e3),fromZero:this.video.fromZero,trims:this.video.trims,lastJump:this.video.lastJump}}get element(){return this.wrap}resume(){let e=this.video.el;e.paused&&e.play()?.catch?.(()=>{})}setHevc(e){this.hevc=e}startSound(){if(this.soundOn=!0,this.wasm)return this.wasm.start();if(!N())return this.soundThroughWasm();this.audio.start()}soundThroughWasm(){if(this.wasm)return;this.audio.stop();let e=new da(this.latency,()=>this.onSoundFail?.());this.wasm=e,e.setMuted(this.muted),this.audioHeader&&e.setHeader(this.audioHeader),this.soundOn&&e.start()}resumeSound(){this.soundOn&&(this.wasm?this.wasm.resume():this.audio.resume())}setMuted(e){this.muted=e,this.audio.setMuted(e),this.wasm?.setMuted(e)}soundReport(){return this.soundOn?this.wasm?na(`wasm`,this.wasm.stats):this.audio.report():null}get soundPlaying(){return this.wasm?this.wasm.played:this.audio.playing}get sound(){return this.soundOn}onMessage(e){let t=new Uint8Array(e);if(t.length<1)return;let n=t[0],r=t.subarray(1);n===0?this.openVideo(r.slice()):n===1?this.onVideo(r):n===3?(this.audioHeader=r.slice(),(this.wasm??this.audio).setHeader(this.audioHeader)):n===4&&(this.wasm??this.audio).frame(r)}openVideo(e){let t=!!this.header&&this.header.length===e.length&&this.header.every((t,n)=>t===e[n]);if(t&&this.video.ready)return;if(this.gaveUp){if(t)return;this.gaveUp=!1,this.fails.clear()}this.header=e;let n=qr(e,this.hevc)??{w:1920,h:1080},r=Hi(e,this.hevc,n);r&&(this.stats.codec=/codecs="([^"]+)"/.exec(r.mime)?.[1]??``,this.video.open(r.mime,r.init)?(this.sawKey=!1,this.vTime=0,this.vLast=0):(this.problemShown=!0,this.onProblem(this.hevc?`no_hevc`:`decode`)))}onVideo(e){if(!this.video.ready&&!this.video.backlog)return;let t=Di(e,this.hevc);if(this.video.dropped&&(this.video.dropped=!1,this.sawKey=!1),this.stats.arrived(),!this.sawKey&&!t)return this.stats.drop(),this.keyAsk.waiting();if(!t&&this.video.backlog>qi[this.latency])return this.sawKey=!1,this.stats.drop(),this.keyAsk.waiting();this.sawKey=!0,this.stats.drawn();let n=performance.now(),r=this.vLast?Math.min(9e3,Math.max(750,Math.round((n-this.vLast)*90))):1500;this.vLast=n,t&&this.video.markKey(this.vTime/9e4),this.video.push(Ui(this.video.nextSeq(),this.vTime,r,e,this.hevc,t)),this.vTime+=r}stop(){this.video.close(),this.audio.stop(),this.wasm?.stop()}};async function xa(e){let t=Yr(e);if(t&&typeof VideoDecoder<`u`)try{if((await VideoDecoder.isConfigSupported({codec:t,codedWidth:1920,codedHeight:1080})).supported)return t}catch{}return Ai(1920,1080)}var F={CROSS:1,CIRCLE:2,SQUARE:4,TRIANGLE:8,LEFT:16,RIGHT:32,UP:64,DOWN:128,L1:256,R1:512,L3:1024,R3:2048,OPTIONS:4096,SHARE:8192,TOUCHPAD:16384,PS:32768},Sa={buttons:0,l2:0,r2:0,lx:0,ly:0,rx:0,ry:0};function Ca(e,t){let n=e=>Math.max(0,Math.min(1,e));return[Math.round(n(e)*1919),Math.round(n(t)*941)]}F.UP,F.DOWN,F.LEFT,F.RIGHT,F.CROSS,F.CROSS,F.CIRCLE,F.CIRCLE,F.SQUARE,F.TRIANGLE,F.L1,F.R1,F.L3,F.R3,F.OPTIONS,F.SHARE,F.PS,F.TOUCHPAD,F.UP,F.DOWN,F.LEFT,F.RIGHT,F.CROSS,F.CIRCLE,F.SQUARE,F.TRIANGLE,F.L1,F.R1,F.L3,F.R3,F.OPTIONS,F.SHARE,F.PS,F.TOUCHPAD;var wa=e=>Math.max(-32768,Math.min(32767,Math.round(e))),Ta=[F.CROSS,F.CIRCLE,F.SQUARE,F.TRIANGLE,F.L1,F.R1,0,0,F.SHARE,F.OPTIONS,F.L3,F.R3,F.UP,F.DOWN,F.LEFT,F.RIGHT,F.PS,F.TOUCHPAD];function Ea(e){return Math.abs(e)<=1.01?Math.round((e+1)*3.5)%8:null}var Da=[0,1,1,1,0,-1,-1,-1],Oa=[-1,-1,0,1,1,1,0,-1];function ka(e,t){let n=e.axes[t.a]??0;if(t.hat){let e=Ea(n);return e===null?0:(t.hat===`x`?Da:Oa)[e]}return t.inv?-n:n}var Aa={buttons:Ta.flatMap((e,t)=>e?[[e,{b:t}]]:[]),l2:{b:6},r2:{b:7},lx:{a:0},ly:{a:1},rx:{a:2},ry:{a:3}};function ja(e,t,n=!1){if(`b`in t){let r=e.buttons[t.b];return r?n&&r.value>0?Math.min(1,r.value):Math.max(+!!r.pressed,r.value):0}if(`h`in t){let n=Ea(e.axes[t.h]??9);if(n===null)return 0;let r=(n-t.at+8)%8;return+(r===0||r===1||r===7)}let r=e.axes[t.a];if(r===void 0)return 0;let i=t.rest??0;return Math.min(1,Math.max(0,(r-i)/(t.d-i)))}function Ma(e){if(e.mapping===`standard`)return Aa;let t=Na.get(e.id);if(t)return t;let n=e.axes.findIndex(e=>Math.abs(e)>1.05);if(n<0)return Aa;let r={...Aa,buttons:[...Aa.buttons,[F.UP,{h:n,at:0}],[F.RIGHT,{h:n,at:2}],[F.DOWN,{h:n,at:4}],[F.LEFT,{h:n,at:6}]]};return Na.set(e.id,r),r}var Na=new Map;function Pa(e,t=Ma){let n={...Sa},r=e=>Math.abs(e)<.08?0:wa(e*32767),i=(e,t)=>Math.abs(t)>Math.abs(e)?t:e,a=(e,t)=>t?r(ka(e,t)):0;for(let r of e){if(!r||!r.connected)continue;let e=t(r);for(let[t,i]of e.buttons)ja(r,i)>.5&&(n.buttons|=t);e.l2&&(n.l2=Math.max(n.l2,Math.round(ja(r,e.l2,!0)*255))),e.r2&&(n.r2=Math.max(n.r2,Math.round(ja(r,e.r2,!0)*255))),n.lx=i(n.lx,a(r,e.lx)),n.ly=i(n.ly,a(r,e.ly)),n.rx=i(n.rx,a(r,e.rx)),n.ry=i(n.ry,a(r,e.ry))}return n}function Fa(e,t){return{buttons:e.buttons|t.buttons,l2:Math.max(e.l2,t.l2),r2:Math.max(e.r2,t.r2),lx:wa(e.lx+t.lx),ly:wa(e.ly+t.ly),rx:wa(e.rx+t.rx),ry:wa(e.ry+t.ry),touch:e.touch??t.touch??null,motion:e.motion??t.motion??null}}var I=e=>e.toLowerCase().padStart(4,`0`);function Ia(e){let t=/^(.*?)\s*\((?:[^()]*?\s)?Vendor:\s*([0-9a-f]{1,4})\s+Product:\s*([0-9a-f]{1,4})\s*\)\s*$/i.exec(e);if(t)return{vendor:I(t[2]),product:I(t[3]),name:t[1].trim()};let n=/^([0-9a-f]{1,4})-([0-9a-f]{1,4})-(.*)$/i.exec(e.trim());return n?{vendor:I(n[1]),product:I(n[2]),name:n[3].trim()}:null}function La(e=globalThis.navigator){let t=e?.userAgent??``;return/Android|iPhone|iPad|iPod/i.test(t)?null:/Macintosh|Mac OS X/i.test(t)?(e?.maxTouchPoints??0)>1?null:`m`:/Windows/i.test(t)?`w`:/Linux|CrOS|X11/i.test(t)?`l`:null}function Ra(e,t){if(!t)return null;let n=t===`l`?[`l`]:[`m`,`w`];for(let t of n){let n=Ge[`${t}${e.vendor}${e.product}`];if(n!==void 0)return We[n]??null}return null}var za={1:0,2:2,4:4,8:6};function Ba(e){let t=0,n=!1;for(let r of e){let e=/a(\d+)/.exec(r);e&&(t=Math.max(t,Number(e[1])+1)),r.startsWith(`h`)&&(n=!0)}return{n:t,hat:n}}function Va(e,t,n){let{n:r,hat:i}=Ba(t),a=Ta.length,o=e.axes.findIndex(e=>Math.abs(e)>1.05),s=e=>e;if(i&&o<0)return n===`l`&&e.axes.length>=r+2?{hat:-1,hatXY:r,axis:s}:null;if(!(i?o>r:n!==`l`&&e.axes.length>=r+2))return{hat:o,hatXY:-1,axis:s};if(r<=4)return{hat:o,hatXY:-1,axis:e=>[0,1,2,5][e]??e};let c=t[a+2]?.replace(`~`,``)===`a2`&&t[a+3]?.replace(`~`,``)===`a3`,l=[t[6],t[7]].every(e=>/^a[45]~?$/.test(e??``));return r===6&&c&&l?{hat:o,hatXY:-1,axis:e=>[0,1,2,5,3,4][e]??e}:{hat:o,hatXY:-1,axis:s}}function Ha(e,t){let n=/^b(\d+)$/.exec(e);if(n)return{b:Number(n[1])};if(n=/^([+-]?)a(\d+)(~?)$/.exec(e),n){let e=t.axis(Number(n[2]));return n[1]===`+`?{a:e,d:1}:n[1]===`-`?{a:e,d:-1}:n[3]?{a:e,d:-1,rest:1}:{a:e,d:1,rest:-1}}if(n=/^h0\.(\d)$/.exec(e),n){let e=za[n[1]];if(e===void 0)return null;if(t.hat>=0)return{h:t.hat,at:e};if(t.hatXY>=0)return e===0?{a:t.hatXY+1,d:-1}:e===4?{a:t.hatXY+1,d:1}:e===6?{a:t.hatXY,d:-1}:{a:t.hatXY,d:1}}return null}function Ua(e,t){let n=/^a(\d+)(~?)$/.exec(e);if(n)return n[2]?{a:t.axis(Number(n[1])),inv:!0}:{a:t.axis(Number(n[1]))};if(e===`hx`||e===`hy`){if(t.hat>=0)return{a:t.hat,hat:e===`hx`?`x`:`y`};if(t.hatXY>=0)return{a:t.hatXY+ +(e===`hy`)}}return null}function Wa(e,t,n){let r=e.split(`,`),i=Va(t,r,n);if(!i)return null;let a={buttons:[],l2:null,r2:null,lx:null,ly:null,rx:null,ry:null};for(let e=0;eArray.isArray(e)&&e.length===2&&typeof e[0]==`number`&&Ja(e[1]))&&[t.l2,t.r2,t.lx,t.ly,t.rx,t.ry].every(Ja)}function Xa(){try{let e=yt(qa),t=e?JSON.parse(e):null;return!t||typeof t!=`object`||Array.isArray(t)?{}:Object.fromEntries(Object.entries(t).filter(e=>Ya(e[1])))}catch{return{}}}function Za(e,t){let n=Xa();return t?n[e]=t:delete n[e],vt(qa,JSON.stringify(n)),Qa=n,n}var Qa=null;function $a(e){return Qa??=Xa(),Qa[e.id]??eo(Qa,e.id)??Ka(e)??Ma(e)}function eo(e,t){if(!t.endsWith(` (app)`))return null;let n=t.slice(0,-6).trim().toLowerCase();if(!n)return null;let r=Object.keys(e).filter(e=>{let t=e.trim().toLowerCase();return t===n||t.includes(n)}),i=r.find(e=>e.trim().toLowerCase()===n)??(r.length===1?r[0]:null);return i?(Qa=Za(t,e[i]),e[i]):null}[{kind:`button`,bit:F.CROSS,name:`✕`},{kind:`button`,bit:F.CIRCLE,name:`○`},{kind:`button`,bit:F.SQUARE,name:`□`},{kind:`button`,bit:F.TRIANGLE,name:`△`},{kind:`button`,bit:F.UP,name:`↑`},{kind:`button`,bit:F.DOWN,name:`↓`},{kind:`button`,bit:F.LEFT,name:`←`},{kind:`button`,bit:F.RIGHT,name:`→`},{kind:`button`,bit:F.L1,name:`L1`},{kind:`button`,bit:F.R1,name:`R1`},{kind:`trigger`,which:`l2`,name:`L2`},{kind:`trigger`,which:`r2`,name:`R2`},{kind:`button`,bit:F.L3,name:`L3`},{kind:`button`,bit:F.R3,name:`R3`},{kind:`button`,bit:F.OPTIONS,name:`Options`},{kind:`button`,bit:F.SHARE,name:`Create`},{kind:`button`,bit:F.PS,name:`PS`},{kind:`button`,bit:F.TOUCHPAD,name:`Touchpad`},{kind:`axis`,which:`lx`,name:`L →`},{kind:`axis`,which:`ly`,name:`L ↓`},{kind:`axis`,which:`rx`,name:`R →`},{kind:`axis`,which:`ry`,name:`R ↓`}].filter(e=>e.kind!==`button`||![F.L3,F.R3,F.OPTIONS,F.SHARE,F.PS,F.TOUCHPAD].includes(e.bit));var to=12e4;function no(e){let t;try{t=JSON.parse(e)}catch{return null}return Array.isArray(t.rumble)?{rumble:[Number(t.rumble[0])||0,Number(t.rumble[1])||0]}:Array.isArray(t.light)?{light:t.light}:t.stage===`asking`?{kind:`asking`}:t.stage===`refused`?{kind:`refused`,why:String(t.why??``)}:t.stage===`joined`?{kind:`joined`,host:t.session?.host??null,playing:!!t.session?.playing,passcode:!!t.session?.passcode}:null}function ro(e,t){return e.buttons===t.buttons&&e.l2===t.l2&&e.r2===t.r2&&e.lx===t.lx&&e.ly===t.ly&&e.rx===t.rx&&e.ry===t.ry&&(e.touch?.[0]??-1)===(t.touch?.[0]??-1)&&(e.touch?.[1]??-1)===(t.touch?.[1]??-1)&&(e.motion?.t??-1)===(t.motion?.t??-1)}var io=class{constructor(e){this.o=e,this.ws=null,this.last={...Sa},this.lastSent=0,this.raf=0,this.keepalive=null,this.watchdog=null,this.retry=null,this.done=!1,this.stage={kind:`connecting`},this.wasIn=!1,this.attempt=0,this.deadline=0,this.lastHeard=0,this.control=!1,this.neutral=!1,this.now=e.now??(()=>Date.now()),this.WS=e.WebSocketImpl??WebSocket}get currentStage(){return this.stage}setStage(e){this.stage=e,this.o.onStage(e)}start(){if(this.done=!1,this.setStage({kind:`connecting`}),this.connect(),this.done)return;let e=this.o.raf??(e=>window.requestAnimationFrame(e)),t=()=>{this.send(!1),this.raf=e(t)};this.raf=e(t),this.keepalive=setInterval(()=>this.send(!1),250),this.watchdog=setInterval(()=>this.checkSilence(),1e3)}connect(){let e;this.lastHeard=this.now();try{e=new this.WS(this.o.url)}catch{this.dropped();return}this.ws=e,e.binaryType=`arraybuffer`,this.control=!this.o.watch,this.o.watch&&this.o.watch.onControl(!1),e.onmessage=t=>{this.ws===e&&(this.lastHeard=this.now(),this.onMessage(t.data))},e.onclose=t=>{if(this.ws!==e)return;this.ws=null;let n=Le(t);n&&!this.wasIn?this.finish({kind:`refused`,why:`net:${n}`}):this.dropped()},e.onopen=()=>{this.ws===e&&(this.lastHeard=this.now(),this.o.hello&&e.send(JSON.stringify({hello:this.o.hello})),this.send(!0))}}onMessage(e){if(typeof e!=`string`){e instanceof ArrayBuffer&&this.o.watch?.onFrame(e);return}if(this.o.hello&&e.startsWith(`{"rt":`))try{let t=JSON.parse(e);if(typeof t.rt==`string`&&/^[0-9a-f]{32}$/.test(t.rt)){this.o.hello.rt=t.rt,this.o.onReconnectToken?.(t.rt);return}}catch{}if(e.includes(`"kbm_caps"`))try{let t=JSON.parse(e);if(t.kbm_caps){let e=t.kbm_caps;this.o.onKbmCaps?.({mouse:e.mouse===!0,keyboard:e.keyboard===!0,reason:typeof e.reason==`string`?e.reason:null});return}}catch{}if(this.o.watch)try{let t=JSON.parse(e);if(t.watch&&this.o.watch.onCodec(!!t.watch.hevc),typeof t.control==`boolean`){this.control=t.control,this.o.watch.onControl(t.control),t.control&&this.send(!0);return}}catch{}let t=no(e);if(t){if(`rumble`in t){let[e,n]=t.rumble;navigator.vibrate?.(e||n?250:0)}else if(`light`in t)this.o.onLight?.(t.light);else if(t.kind===`refused`)this.finish(t);else{if(t.kind===`joined`){let e=this.stage.kind!==`joined`;this.wasIn=!0,this.attempt=0,this.setStage(t),e&&this.send(!0);return}this.setStage(t)}}}dropped(){if(this.done)return;if(!this.wasIn||(this.stage.kind!==`reconnecting`&&(this.deadline=this.now()+to),this.now()>=this.deadline)){this.finish({kind:`lost`});return}let e=Re(this.attempt);this.setStage({kind:`reconnecting`,attempt:this.attempt}),this.attempt+=1,this.retry&&clearTimeout(this.retry),this.retry=setTimeout(()=>{this.retry=null,this.done||this.connect()},e)}checkSilence(){let e=this.ws;if(e&&!this.done&&(this.stage.kind===`joined`||this.stage.kind===`reconnecting`)&&!(this.now()-this.lastHeard<=3500)){this.ws=null;try{e.close()}catch{}this.dropped()}}wake(){this.stage.kind===`lost`&&this.wasIn?(this.attempt=0,this.start()):this.stage.kind===`reconnecting`&&(this.deadline=this.now()+to,this.attempt=0,this.retry&&(clearTimeout(this.retry),this.retry=null,this.connect()))}setNeutral(e){this.neutral!==e&&(this.neutral=e,this.send(!0))}current(){let e=Pa(Ue(typeof navigator>`u`?void 0:navigator),$a),t=this.o.touchPad();return{...Fa(e,t),touch:t.touch??null,motion:this.o.motion?.()??null}}send(e){let t=this.ws;if(!t||t.readyState!==this.WS.OPEN||!this.control)return;let n=this.neutral?{...Sa,touch:null,motion:null}:this.current(),r=this.now();!e&&ro(n,this.last)&&r-this.lastSent<250||(this.last=n,this.lastSent=r,t.send(JSON.stringify({pad:{...n,touch:n.touch??null,motion:n.motion??null},ka:1})))}askKeyframe(){let e=this.ws;e&&e.readyState===this.WS.OPEN&&e.send(JSON.stringify({keyframe:!0}))}sendKbm(e){let t=this.ws;return!t||t.readyState!==this.WS.OPEN||!this.control?!1:(t.send(e instanceof Uint8Array?e:JSON.stringify(e)),!0)}sendPad(){this.send(!1)}clearTimers(){(this.o.cancelRaf??(e=>window.cancelAnimationFrame(e)))(this.raf),this.keepalive&&clearInterval(this.keepalive),this.watchdog&&clearInterval(this.watchdog),this.retry&&clearTimeout(this.retry),this.keepalive=this.watchdog=this.retry=null}finish(e){this.done=!0,this.clearTimers();let t=this.ws;this.ws=null;try{t?.close()}catch{}this.setStage(e)}stop(){this.done=!0,this.clearTimers();let e=this.ws;this.ws=null,e&&e.readyState===this.WS.OPEN&&e.send(JSON.stringify({pad:{...Sa,touch:null}})),e?.close()}},ao=`ps5upload.pad.device`;function oo(e,t=e=>crypto.getRandomValues(e)){let n=e.get(ao);if(n&&/^[0-9a-f]{32}$/.test(n))return n;let r=new Uint8Array(16);t(r);let i=Array.from(r,e=>e.toString(16).padStart(2,`0`)).join(``);return e.set(ao,i),i}var so=new Set,co={held:new Set,touch:null,touchPad:Sa,mapping:!1,get paused(){return so.size>0},motion:null},lo={s:.85,m:1,l:1.15},uo=.25;function fo(e){return typeof e!=`number`||!Number.isFinite(e)?1:Math.min(1,Math.max(uo,e))}var po={overlay:{width:844,height:390},deck:{width:390,height:480}},mo=.7,ho=1.4;function go(e,t,n,r){let i=lo[e]??1;if(!(t>0)||!(n>0))return i;let a=r?po.deck:po.overlay,o=Math.min(ho,Math.max(mo,Math.min(t/a.width,n/a.height)));return Math.round(o*i*1e3)/1e3}var _o=34;function vo(e,t){return t>0&&8+Math.max(112*e,90)+156*e+124*e+Math.max(56*e,44)+_o>t}function yo(e,t,n){let r=e/32767,i=t/32767,a=Math.hypot(r,i),o=a>1?1/a:1;return{dx:r*o*n,dy:i*o*n}}var bo=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),L=s(((e,t)=>{t.exports=bo()}))(),xo=`calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2)`,So=32767,Co=12;function wo({stream:e,layout:t=`overlay`,opacity:n=1,size:r=`m`,deckTop:i=`0px`,onMenu:a}){let o=Tn(),s=(0,T.useRef)(new Map),c=(0,T.useRef)({...Sa}),[l,u]=(0,T.useState)({...Sa}),[d,f]=(0,T.useState)({l:!1,r:!1,touchpad:!1}),p=(0,T.useRef)(null),[m,h]=(0,T.useState)({width:0,height:0});(0,T.useEffect)(()=>{let e=p.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect();h(e=>e.width===t.width&&e.height===t.height?e:{width:t.width,height:t.height})};if(t(),typeof ResizeObserver>`u`)return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t);let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]),(0,T.useEffect)(()=>()=>{co.touchPad={...Sa}},[]);let g=()=>{let t={...Sa,touch:null},n={l:!1,r:!1,touchpad:!1};for(let e of s.current.values())e.kind===`stick`&&(n[e.which]=!0),e.kind===`touchpad`&&(n.touchpad=!0),e.kind===`button`&&(t.buttons|=e.bit),e.kind===`trigger`&&(t[e.which]=255),e.kind===`touchpad`&&e.pressed&&(t.buttons|=F.TOUCHPAD);t.lx=c.current.lx,t.ly=c.current.ly,t.rx=c.current.rx,t.ry=c.current.ry,t.touch=c.current.touch??null,co.touchPad=t,e?.sendPad(),u(t),f(e=>e.l===n.l&&e.r===n.r&&e.touchpad===n.touchpad?e:n)},_=(e,t,n)=>{let r=Math.max(-1,Math.min(1,(t-e.cx)/e.radius)),i=Math.max(-1,Math.min(1,(n-e.cy)/e.radius));c.current[e.which===`l`?`lx`:`rx`]=Math.round(r*So),c.current[e.which===`l`?`ly`:`ry`]=Math.round(i*So)},v=(e,t)=>{e.preventDefault(),e.stopPropagation();let n=e.currentTarget;try{n.setPointerCapture(e.pointerId)}catch{}let r=t(n);s.current.set(e.pointerId,r),r.kind===`stick`&&_(r,e.clientX,e.clientY),r.kind===`touchpad`&&(c.current.touch=Ca((e.clientX-r.rect.left)/r.rect.width,(e.clientY-r.rect.top)/r.rect.height)),navigator.vibrate?.(8),g()},y=e=>{let t=s.current.get(e.pointerId);if(t){if(e.stopPropagation(),t.kind===`stick`)_(t,e.clientX,e.clientY);else if(t.kind===`touchpad`)c.current.touch=Ca((e.clientX-t.rect.left)/t.rect.width,(e.clientY-t.rect.top)/t.rect.height),t.pressed&&Math.hypot(e.clientX-t.x0,e.clientY-t.y0)>Co&&(t.pressed=!1);else return;g()}},b=e=>{let t=s.current.get(e.pointerId);t&&(e.stopPropagation(),s.current.delete(e.pointerId),t.kind===`stick`&&(c.current[t.which===`l`?`lx`:`rx`]=0,c.current[t.which===`l`?`ly`:`ry`]=0),t.kind===`touchpad`&&(c.current.touch=null),g())},x=e=>e.stopPropagation(),S={onPointerMove:y,onPointerUp:b,onPointerCancel:b,onClick:x,onDoubleClick:x},ee=e=>(l.buttons&e)!==0,te=e=>`border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.35)] transition-colors duration-75 ${e?`border-white bg-white/50`:`border-white/70 bg-white/10`}`,C=`text-white [text-shadow:0_1px_2px_rgba(0,0,0,0.6)]`,ne={filter:`drop-shadow(0 0 1.5px rgba(0,0,0,0.5))`},w=e=>({stroke:e?`#fff`:`rgba(255,255,255,0.75)`,fill:e?`rgba(255,255,255,0.5)`:`rgba(255,255,255,0.1)`}),re=`pointer-events-auto flex touch-none select-none items-center justify-center bg-transparent p-0`,ie={minHeight:`calc(44px / var(--k))`,minWidth:`calc(44px / var(--k))`},ae=(e,t,n,r)=>(0,L.jsx)(`button`,{type:`button`,"aria-label":e,onPointerDown:e=>v(e,()=>({kind:`button`,bit:t})),...S,className:`${re} ${n}`,style:ie,children:r}),oe=(e,t,n,r)=>(0,L.jsx)(`span`,{className:`flex h-[32px] w-[76px] items-center justify-center text-[13px] font-semibold tracking-wide ${C} ${te(t)}`,style:{borderRadius:r?n===`l`?`16px 9px 9px 9px`:`9px 16px 9px 9px`:`9px`},children:e}),se=(e,t,n,r)=>ae(e,t,`h-[44px] w-[84px]`,oe(e,ee(t),n,r)),ce=(e,t,n)=>(0,L.jsx)(`button`,{type:`button`,"aria-label":e,onPointerDown:e=>v(e,()=>({kind:`trigger`,which:t})),...S,className:`${re} h-[44px] w-[84px]`,style:ie,children:oe(e,l[t]>0,n,!0)}),le=(e,t,n)=>ae(e,t,`h-[52px] w-[52px]`,(0,L.jsx)(`svg`,{viewBox:`0 0 52 52`,width:`52`,height:`52`,"aria-hidden":!0,style:ne,children:(0,L.jsxs)(`g`,{transform:`rotate(${n} 26 26)`,strokeWidth:`1.5`,strokeLinejoin:`round`,...w(ee(t)),children:[(0,L.jsx)(`path`,{d:`M10 9 Q10 3 16 3 L36 3 Q42 3 42 9 L42 30 Q42 34.5 38.5 38 L29.5 47 Q26 50.5 22.5 47 L13.5 38 Q10 34.5 10 30 Z`}),(0,L.jsx)(`path`,{d:`M20.5 23 L26 17 L31.5 23`,fill:`none`,stroke:`#fff`,strokeLinecap:`round`,strokeWidth:`1.8`})]})})),ue=(e,t,n)=>ae(e,t,`h-[52px] w-[52px]`,(0,L.jsxs)(`svg`,{viewBox:`0 0 52 52`,width:`52`,height:`52`,"aria-hidden":!0,style:ne,children:[(0,L.jsx)(`circle`,{cx:`26`,cy:`26`,r:`22.5`,strokeWidth:`1.5`,...w(ee(t))}),(0,L.jsx)(`g`,{fill:`none`,stroke:`#fff`,strokeWidth:`1.8`,strokeLinejoin:`round`,strokeLinecap:`round`,children:n})]})),de=(e,t)=>ae(e,t,`h-[44px] min-w-[64px] px-[4px]`,(0,L.jsx)(`span`,{className:`flex h-[24px] items-center rounded-full px-[10px] text-[10px] font-semibold uppercase tracking-wider ${C} ${te(ee(t))}`,children:e})),fe=(e,t)=>ae(e,t,`h-[44px] w-[44px]`,(0,L.jsx)(`span`,{className:`flex h-[36px] w-[36px] items-center justify-center rounded-full text-[11px] font-bold ${C} ${te(ee(t))}`,children:e})),pe=e=>{let{dx:t,dy:n}=yo(e===`l`?l.lx:l.rx,e===`l`?l.ly:l.ry,34),r=d[e];return(0,L.jsx)(`div`,{"aria-label":e===`l`?o(`rp_touch_left_stick`,void 0,`Left stick`):o(`rp_touch_right_stick`,void 0,`Right stick`),onPointerDown:t=>v(t,t=>{let n=t.getBoundingClientRect();return{kind:`stick`,which:e,cx:n.left+n.width/2,cy:n.top+n.height/2,radius:n.width/2}}),...S,className:`pointer-events-auto relative h-[124px] w-[124px] touch-none rounded-full border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.3)] transition-colors duration-75 ${r?`border-white/80 bg-white/[0.12]`:`border-white/45 bg-white/[0.05]`}`,children:(0,L.jsx)(`div`,{className:`absolute left-1/2 top-1/2 h-[54px] w-[54px] rounded-full ${te(r)}`,style:{transform:`translate(calc(-50% + ${t}px), calc(-50% + ${n}px))`}})})},E=t===`deck`,me=go(r,m.width,m.height,E),he=e=>`${e}px * var(--k)`,ge=`max(12px, env(safe-area-inset-left))`,ve=`max(12px, env(safe-area-inset-right))`,ye=`max(12px, env(safe-area-inset-bottom))`,be=E?`8px`:t===`overlay-bar`?`3.5rem`:`max(10px, env(safe-area-inset-top))`,xe=(e,t,n=0)=>t?n?`calc(${e} + max(${he(t)}, ${n}px))`:`calc(${e} + ${he(t)})`:e,Se=(e,t)=>({position:`absolute`,...t,transform:`scale(var(--k))`,transformOrigin:e}),Ce=E&&vo(me,m.height),D=E?void 0:`58%`,O=e=>E?{top:xe(be,Ce?96:112,Ce?72:90),[e]:e===`left`?ge:ve}:{top:D,translate:`0 -50%`,[e]:e===`left`?ge:ve},we=e=>({bottom:Ce?ye:xe(ye,E?56:0,44),[e]:Ce?`calc(${e===`left`?ge:ve} + 8px + max(${he(80)}, 44px))`:xe(e===`left`?ge:ve,E?40:168)}),Te=!!a&&!E;return(0,L.jsxs)(`div`,{ref:p,className:`pointer-events-none absolute z-10 select-none [-webkit-touch-callout:none] ${E?`inset-x-0 bottom-0`:`inset-0`}`,style:{top:E?i:void 0,"--k":me},"data-testid":`rp-touch`,"data-layout":t,"data-scale":me,onContextMenu:e=>e.preventDefault(),children:[(0,L.jsxs)(`div`,{className:`absolute inset-0`,style:{opacity:fo(n)},children:[(0,L.jsx)(`div`,{style:Se(`top left`,{top:be,left:ge}),children:(0,L.jsxs)(`div`,{className:`ms-[8px] flex flex-col`,style:{rotate:E?void 0:`6deg`,transformOrigin:`top left`},children:[ce(`L2`,`l2`,`l`),se(`L1`,F.L1,`l`,!1)]})}),(0,L.jsx)(`div`,{style:Se(`top right`,{top:be,right:ve}),children:(0,L.jsxs)(`div`,{className:`me-[8px] flex flex-col items-end`,style:{rotate:E?void 0:`-6deg`,transformOrigin:`top right`},children:[ce(`R2`,`r2`,`r`),se(`R1`,F.R1,`r`,!1)]})}),(0,L.jsx)(`div`,{"aria-label":o(`rp_touch_touchpad`,void 0,`Touchpad`),onPointerDown:e=>v(e,t=>({kind:`touchpad`,rect:t.getBoundingClientRect(),x0:e.clientX,y0:e.clientY,pressed:!0})),...S,className:`pointer-events-auto absolute touch-none rounded-2xl border-[1.5px] shadow-[0_0_3px_rgba(0,0,0,0.3)] transition-colors duration-75 ${d.touchpad?`border-white/80 bg-white/25`:`border-white/40 bg-white/[0.05]`}`,style:E?{top:xe(be,6),left:xe(ge,104),right:xe(ve,104),height:`max(44px, calc(${he(64)}))`}:{top:be,left:`50%`,translate:`-50% 0`,width:`min(calc(${he(250)}), 34vw)`,height:`max(44px, calc(${he(56)}))`}}),(0,L.jsxs)(`div`,{className:`grid grid-cols-3 grid-rows-3`,style:Se(E?`top left`:`left center`,O(`left`)),children:[(0,L.jsx)(`span`,{}),le(`↑`,F.UP,0),(0,L.jsx)(`span`,{}),le(`←`,F.LEFT,-90),(0,L.jsx)(`span`,{}),le(`→`,F.RIGHT,90),(0,L.jsx)(`span`,{}),le(`↓`,F.DOWN,180),(0,L.jsx)(`span`,{})]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-3 grid-rows-3`,style:Se(E?`top right`:`right center`,O(`right`)),children:[(0,L.jsx)(`span`,{}),ue(`△`,F.TRIANGLE,(0,L.jsx)(`path`,{d:`M26 16.5 L35 32 L17 32 Z`})),(0,L.jsx)(`span`,{}),ue(`□`,F.SQUARE,(0,L.jsx)(`rect`,{x:`18`,y:`18`,width:`16`,height:`16`,rx:`1`})),(0,L.jsx)(`span`,{}),ue(`○`,F.CIRCLE,(0,L.jsx)(`circle`,{cx:`26`,cy:`26`,r:`8.5`})),(0,L.jsx)(`span`,{}),ue(`✕`,F.CROSS,(0,L.jsx)(`path`,{d:`M19 19 L33 33 M33 19 L19 33`})),(0,L.jsx)(`span`,{})]}),(0,L.jsx)(`div`,{style:Se(`bottom left`,we(`left`)),children:pe(`l`)}),(0,L.jsx)(`div`,{style:Se(`bottom right`,we(`right`)),children:pe(`r`)}),(0,L.jsx)(`div`,{style:Se(`bottom left`,{bottom:ye,left:ge}),children:de(`Create`,F.SHARE)}),(0,L.jsx)(`div`,{style:Se(`bottom right`,{bottom:ye,right:ve}),children:de(`Options`,F.OPTIONS)}),(0,L.jsx)(`div`,{style:Se(`bottom center`,{bottom:Ce?xe(ye,124,88):xe(ye,Te?48:0,48),left:xo,translate:`-50% 0`}),children:fe(`PS`,F.PS)})]}),Te&&(0,L.jsx)(`div`,{style:{...Se(`bottom center`,{bottom:ye,left:`calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2)`,translate:`-50% 0`}),opacity:Math.max(.7,fo(n))},children:(0,L.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),a?.()},onDoubleClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),"aria-label":o(`rp_menu`,void 0,`Menu`),"aria-haspopup":`dialog`,className:`${re} h-[44px] w-[56px]`,style:ie,"data-testid":`rp-menu-handle`,children:(0,L.jsx)(`span`,{className:`flex h-[26px] w-[44px] items-center justify-center rounded-full ${C} ${te(!1)}`,children:(0,L.jsx)(_e,{size:15,strokeWidth:2,"aria-hidden":!0})})})})]})}var To=class{constructor(e,t=()=>1){this.sink=e,this.speed=t,this.fingers=new Map,this.most=0,this.moved=!1,this.gestureT0=0,this.lastTap=null,this.dragging=!1}down(e,t,n,r){if(!this.fingers.size){this.most=0,this.moved=!1,this.gestureT0=r;let e=this.lastTap;e&&r-e.t<=300&&Math.hypot(t-e.x,n-e.y)<=40&&(this.dragging=!0,this.sink.button(0,!0)),this.lastTap=null}this.fingers.set(e,{x:t,y:n,x0:t,y0:n,t0:r}),this.most=Math.max(this.most,this.fingers.size)}move(e,t,n){let r=this.fingers.get(e);if(!r)return;let i=t-r.x,a=n-r.y;if(r.x=t,r.y=n,!this.moved&&Math.hypot(t-r.x0,n-r.y0)>10&&(this.moved=!0),!this.moved)return;if(this.fingers.size>=2){if(this.dragging)return;let e=this.fingers.size;this.sink.scroll(-a/e,-i/e);return}if(this.most>=2)return;let o=this.speed();this.sink.move(i*o,a*o)}up(e,t){let n=this.fingers.get(e);if(!n||(this.fingers.delete(e),this.fingers.size))return;if(this.dragging){this.dragging=!1,this.sink.button(0,!1);return}let r=t-this.gestureT0<=250+(this.most>=2?150:0);if(this.moved||!r)return;let i=this.most>=2?2:0;this.sink.button(i,!0),this.sink.button(i,!1),i===0&&(this.lastTap={t,x:n.x,y:n.y})}cancel(){this.fingers.clear(),this.lastTap=null,this.dragging&&(this.dragging=!1,this.sink.button(0,!1))}},Eo={" ":`Space`,"-":`Minus`,"=":`Equal`,"[":`BracketLeft`,"]":`BracketRight`,"\\":`Backslash`,";":`Semicolon`,"'":`Quote`,"`":`Backquote`,",":`Comma`,".":`Period`,"/":`Slash`,"\n":`Enter`,"\r":`Enter`," ":`Tab`},Do={"!":`Digit1`,"@":`Digit2`,"#":`Digit3`,$:`Digit4`,"%":`Digit5`,"^":`Digit6`,"&":`Digit7`,"*":`Digit8`,"(":`Digit9`,")":`Digit0`,_:`Minus`,"+":`Equal`,"{":`BracketLeft`,"}":`BracketRight`,"|":`Backslash`,":":`Semicolon`,'"':`Quote`,"~":`Backquote`,"<":`Comma`,">":`Period`,"?":`Slash`};function Oo(e){return e.length===1?e>=`a`&&e<=`z`?{code:`Key${e.toUpperCase()}`,shift:!1}:e>=`A`&&e<=`Z`?{code:`Key${e}`,shift:!0}:e>=`0`&&e<=`9`?{code:`Digit${e}`,shift:!1}:Eo[e]?{code:Eo[e],shift:!1}:Do[e]?{code:Do[e],shift:!0}:null:null}var ko={Backspace:`Backspace`,Enter:`Enter`,Tab:`Tab`,Escape:`Escape`,Delete:`Delete`,ArrowUp:`ArrowUp`,ArrowDown:`ArrowDown`,ArrowLeft:`ArrowLeft`,ArrowRight:`ArrowRight`,Home:`Home`,End:`End`,PageUp:`PageUp`,PageDown:`PageDown`};function Ao(e){return ko[e]??null}function jo(e,t){let n=``;for(let r of t){let t=Oo(r);t?Mo(e,t.code,t.shift):n+=r}return n}function Mo(e,t,n=!1){let r=n&&!e.shiftHeld?.();r&&e.key(`ShiftLeft`,!0),e.key(t,!0),e.key(t,!1),r&&e.key(`ShiftLeft`,!1)}function No(e,t){let n=[...e],r=[...t],i=0;for(;i{o.current=e,s.current=t});let c=(0,T.useRef)(null),l=()=>c.current??=new To({move:(e,t)=>o.current?.move(e,t),button:(e,t)=>o.current?.button(e,t),scroll:(e,t)=>o.current?.scroll(e,t)},()=>s.current);(0,T.useEffect)(()=>()=>c.current?.cancel(),[]);let u=e=>e.stopPropagation();return(0,L.jsx)(`div`,{className:`touch-none select-none [-webkit-touch-callout:none] ${n}`,style:r,"data-testid":a,onPointerDown:e=>{u(e);try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}l().down(e.pointerId,e.clientX,e.clientY,e.timeStamp)},onPointerMove:e=>{u(e),l().move(e.pointerId,e.clientX,e.clientY)},onPointerUp:e=>{u(e),l().up(e.pointerId,e.timeStamp)},onPointerCancel:e=>{u(e),l().cancel()},onClick:u,onDoubleClick:u,onContextMenu:e=>{e.preventDefault(),u(e)},children:i})}var R=` `,Fo=40;function Io({sink:e,onUntypeable:t,className:n=``}){let r=Tn(),i=(0,T.useRef)(null),a=(0,T.useRef)(R),o=(0,T.useRef)(!1),[s,c]=(0,T.useState)(!1),[l,u]=(0,T.useState)(!1);(0,T.useEffect)(()=>{if(!l)return;let e=window.setTimeout(()=>u(!1),3e3);return()=>window.clearTimeout(e)},[l]);let d=()=>{let e=i.current;e&&!o.current&&(!e.value.startsWith(R)||e.value.length>Fo)&&(e.value=R,a.current=R)},f=()=>{let n=i.current;if(!n||!e)return;let{deleted:r,inserted:o}=No(a.current,n.value);a.current=n.value;for(let t=0;te.stopPropagation(),onClick:e=>{e.stopPropagation();let t=i.current;t&&(s?t.blur():(t.value=R,a.current=R,t.focus({preventScroll:!0}),t.setSelectionRange(t.value.length,t.value.length)))},className:`flex h-11 w-11 items-center justify-center rounded-full border border-white/25 bg-black/45 text-white backdrop-blur-sm disabled:opacity-40 ${s?`bg-white/30`:``} ${n}`,"data-testid":`rp-tp-keyboard`,children:(0,L.jsx)(he,{size:18,"aria-hidden":!0})}),(0,L.jsx)(`input`,{ref:i,type:`text`,defaultValue:R,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:!1,enterKeyHint:`send`,"aria-label":r(`rp_tp_keyboard`,void 0,`Keyboard`),className:`pointer-events-none fixed bottom-0 left-1/2 h-px w-px opacity-0`,"data-testid":`rp-tp-keyboard-input`,"data-rp-typing":``,onFocus:()=>c(!0),onBlur:()=>c(!1),onPointerDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),onKeyDown:t=>{if(t.stopPropagation(),!e||t.nativeEvent.isComposing)return;let n=Ao(t.key);n&&(t.preventDefault(),Mo(e,n))},onKeyUp:e=>e.stopPropagation(),onCompositionStart:()=>{o.current=!0},onCompositionEnd:()=>{o.current=!1,f()},onInput:f}),l&&(0,L.jsx)(`div`,{className:`pointer-events-none fixed bottom-20 left-1/2 z-[300] w-max max-w-[min(22rem,calc(100%-2rem))] -translate-x-1/2 rounded-full bg-black/80 px-3 py-1.5 text-center text-xs text-white`,"data-testid":`rp-tp-untypeable`,children:r(`rp_tp_untypeable`,void 0,`Only English letters, numbers and symbols can be typed here. Use a text field on the PS5 for others.`)})]})}function Lo({mode:e,onChange:t,blocked:n,style:r,touchpadLabel:i,tight:a=!1,hidden:o=!1}){let s=Tn(),c=(r,i,o)=>{let s=r===`touchpad`&&!!n;return(0,L.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":e===r,"aria-disabled":s||void 0,"aria-label":a&&e!==r?o:void 0,title:s?n:o,onClick:e=>{e.stopPropagation(),s||t(r)},onPointerDown:e=>e.stopPropagation(),onDoubleClick:e=>e.stopPropagation(),className:`flex h-8 items-center gap-1 rounded-full px-2.5 text-xs ${e===r?`bg-white text-black`:`text-white`} ${s?`opacity-40`:``}`,"data-testid":`rp-touch-mode-${r}`,children:[i,(!a||e===r)&&(0,L.jsx)(`span`,{children:o})]})};return(0,L.jsxs)(`div`,{role:`radiogroup`,"aria-label":s(`rp_tp_mode`,void 0,`Touch controls`),"aria-hidden":o||void 0,className:`absolute left-1/2 z-30 flex -translate-x-1/2 gap-0.5 rounded-full border border-white/20 bg-black/50 p-0.5 backdrop-blur-sm transition-opacity duration-200 ${o?`pointer-events-none opacity-0`:`pointer-events-auto opacity-100`}`,style:r,"data-testid":`rp-touch-mode`,children:[c(`controller`,(0,L.jsx)(E,{size:14,"aria-hidden":!0}),s(`rp_kbm_controller`,void 0,`Controller`)),c(`touchpad`,(0,L.jsx)(ye,{size:14,"aria-hidden":!0}),i??s(`rp_tp_touchpad`,void 0,`Touchpad`))]})}var Ro={0:1,2:2,1:4,3:8,4:16},zo={ControlLeft:1,ShiftLeft:2,AltLeft:4,MetaLeft:8,OSLeft:8,ControlRight:16,ShiftRight:32,AltRight:64,MetaRight:128,OSRight:128};function Bo(){let e={};for(let t=0;t<26;t++)e[`Key${String.fromCharCode(65+t)}`]=4+t;for(let t=1;t<=9;t++)e[`Digit${t}`]=30+t-1;e.Digit0=39,Object.assign(e,{Enter:40,Escape:41,Backspace:42,Tab:43,Space:44,Minus:45,Equal:46,BracketLeft:47,BracketRight:48,Backslash:49,IntlHash:50,Semicolon:51,Quote:52,Backquote:53,Comma:54,Period:55,Slash:56,CapsLock:57,PrintScreen:70,ScrollLock:71,Pause:72,Insert:73,Home:74,PageUp:75,Delete:76,End:77,PageDown:78,ArrowRight:79,ArrowLeft:80,ArrowDown:81,ArrowUp:82,NumLock:83,NumpadDivide:84,NumpadMultiply:85,NumpadSubtract:86,NumpadAdd:87,NumpadEnter:88,NumpadDecimal:99,IntlBackslash:100,ContextMenu:101,NumpadEqual:103,IntlRo:135,KanaMode:136,IntlYen:137,Convert:138,NonConvert:139,Lang1:144,Lang2:145});for(let t=1;t<=9;t++)e[`Numpad${t}`]=89+t-1;e.Numpad0=98;for(let t=1;t<=12;t++)e[`F${t}`]=58+t-1;for(let t=13;t<=24;t++)e[`F${t}`]=104+t-13;return e}var Vo=Bo(),Ho=(e,t,n)=>Math.max(t,Math.min(n,Math.trunc(e)));function Uo(e,t=0,n=0,r=0,i=0){let a=new Uint8Array(17),o=new DataView(a.buffer);return a[0]=8,a[1]=e.buttons&255,a[2]=e.mods&255,o.setInt16(3,Ho(t,-32768,32767),!0),o.setInt16(5,Ho(n,-32768,32767),!0),o.setInt8(7,Ho(r,-128,127)),o.setInt8(8,Ho(i,-128,127)),e.keys.slice(0,8).forEach((e,t)=>a[9+t]=e&255),a}function Wo(e){let t={buttons:0,mods:0,keys:[]};for(let n of e){t.buttons|=n.buttons,t.mods|=n.mods;for(let e of n.keys)!t.keys.includes(e)&&t.keys.length<8&&t.keys.push(e)}return t}function z(e,t,n){let r=e+t/(n===1?3:n===2?1:100),i=Math.trunc(r);return{notches:-i,carry:r-i}}var B=class{constructor(e){this.st={buttons:0,mods:0,keys:[]},this.dx=0,this.dy=0,this.wheel=0,this.hwheel=0,this.wheelCarry=0,this.hwheelCarry=0,this.moveTimer=null,this.hb=null,this.want={mouse:!1,keyboard:!1},this.guests=new Map,this.d={setTimer:(e,t)=>window.setTimeout(e,t),clearTimer:e=>window.clearTimeout(e),setRepeat:(e,t)=>window.setInterval(e,t),clearRepeat:e=>window.clearInterval(e),...e}}get state(){return this.st}shiftHeld(){return(this.st.mods&(zo.ShiftLeft|zo.ShiftRight))!==0}get holding(){return this.st.buttons!==0||this.st.mods!==0||this.st.keys.length>0}setWant(e){let t=e.mouse||e.keyboard,n=e.mouse!==this.want.mouse||e.keyboard!==this.want.keyboard;this.want={...e},n&&(this.hb!==null&&this.d.clearRepeat(this.hb),this.hb=null,this.beat(),t&&(this.hb=this.d.setRepeat(()=>this.beat(),500)))}get wanted(){return this.want}beat(){let e=this.want.mouse||this.want.keyboard;this.d.send({kbm:e?{on:!0,mouse:this.want.mouse,keyboard:this.want.keyboard}:{on:!1}})}key(e,t){let n=zo[e];if(n){let e=t?this.st.mods|n:this.st.mods&~n;return e!==this.st.mods&&(this.st={...this.st,mods:e},this.flush()),!0}let r=Vo[e];if(!r)return!1;let i=this.st.keys.includes(r);return t&&!i&&this.st.keys.length<8?(this.st={...this.st,keys:[...this.st.keys,r]},this.flush()):!t&&i&&(this.st={...this.st,keys:this.st.keys.filter(e=>e!==r)},this.flush()),!0}button(e,t){let n=Ro[e];if(!n)return;let r=t?this.st.buttons|n:this.st.buttons&~n;r!==this.st.buttons&&(this.st={...this.st,buttons:r},this.flush())}guest(e,t){if(t)this.guests.set(e,{buttons:t.buttons,mods:t.mods,keys:t.keys.slice(0,8)});else if(!this.guests.delete(e))return;this.flush()}guestMotion(e,t,n,r){this.dx+=e,this.dy+=t,this.wheel+=n,this.hwheel+=r,(e||t||n||r)&&this.later()}get guestIds(){return[...this.guests.keys()]}move(e,t){this.dx+=e,this.dy+=t,this.later()}scroll(e,t,n){let r=z(this.wheelCarry,e,n),i=z(this.hwheelCarry,t,n);this.wheelCarry=r.carry,this.hwheelCarry=i.carry,this.wheel+=r.notches,this.hwheel-=i.notches,(this.wheel||this.hwheel)&&this.later()}later(){this.moveTimer===null&&(this.moveTimer=this.d.setTimer(()=>this.flush(),4))}flush(){this.moveTimer!==null&&this.d.clearTimer(this.moveTimer),this.moveTimer=null;let e=this.guests.size?Wo([this.st,...this.guests.values()]):this.st;do{let t=Ho(this.dx,-32768,32767),n=Ho(this.dy,-32768,32767),r=Ho(this.wheel,-128,127),i=Ho(this.hwheel,-128,127);this.dx-=t,this.dy-=n,this.wheel-=r,this.hwheel-=i,this.d.send(Uo(e,t,n,r,i))}while(Math.abs(this.dx)>=1||Math.abs(this.dy)>=1||this.wheel||this.hwheel)}releaseAll(){this.dx=this.dy=this.wheel=this.hwheel=0,this.wheelCarry=this.hwheelCarry=0;let e=this.holding;this.st={buttons:0,mods:0,keys:[]},this.moveTimer!==null&&this.d.clearTimer(this.moveTimer),this.moveTimer=null,e&&this.d.send(Uo(this.guests.size?Wo(this.guests.values()):this.st))}dispose(){this.guests.clear(),this.releaseAll(),this.setWant({mouse:!1,keyboard:!1})}},Go=`data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAYZbW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAfQAAAfQAAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAmt0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAfQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAABAAAAAQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAH0AAAAAAAABAAAAAAHjbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAABAAAABAABVxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAABjm1pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAU5zdGJsAAAAunN0c2QAAAAAAAAAAQAAAKphdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABAAEABIAAAASAAAAAAAAAABFExhdmM2My4xLjEwMiBsaWJ4MjY0AAAAAAAAAAAAAAAAGP//AAAAMGF2Y0MBQsAK/+EAF2dCwAqmEXsBEAAAAwAQAAADACDxImEYAQAGaMhCAZSyAAAAEHBhc3AAAAABAAAAAQAAABRidHJ0AAAAAAAABUAAAAAAAAAAGHN0dHMAAAAAAAAAAQAAAAQAAEAAAAAAFHN0c3MAAAAAAAAAAQAAAAEAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAJHN0c3oAAAAAAAAAAAAAAAQAAAKCAAAACgAAAAoAAAAKAAAAIHN0Y28AAAAAAAAABAAABlwAAAj+AAAJKAAACVIAAALZdHJhawAAAFx0a2hkAAAAAwAAAAAAAAAAAAAAAgAAAAAAAH0AAAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAB9AAAABAAAAQAAAAACUW1kaWEAAAAgbWRoZAAAAAAAAAAAAAAAAAAAH0AAAIEAVcQAAAAAAC1oZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU291bmRIYW5kbGVyAAAAAfxtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAcBzdGJsAAAAfnN0c2QAAAAAAAAAAQAAAG5tcDRhAAAAAAAAAAEAAAAAAAAAAAABABAAAAAAH0AAAAAAADZlc2RzAAAAAAOAgIAlAAIABICAgBdAFQAAAAAAH0AAAAEcBYCAgAUViFblAAaAgIABAgAAABRidHJ0AAAAAAAAH0AAAAEcAAAAIHN0dHMAAAAAAAAAAgAAACAAAAQAAAAAAQAAAQAAAAAoc3RzYwAAAAAAAAACAAAAAQAAAAEAAAABAAAAAgAAAAgAAAABAAAAmHN0c3oAAAAAAAAAAAAAACEAAAATAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAkc3RjbwAAAAAAAAAFAAAGSQAACN4AAAkIAAAJMgAACVwAAAAac2dwZAEAAAByb2xsAAAAAgAAAAH//wAAABxzYmdwAAAAAHJvbGwAAAABAAAAIQAAAAEAAABhdWR0YQAAAFltZXRhAAAAAAAAACFoZGxyAAAAAAAAAABtZGlyYXBwbAAAAAAAAAAAAAAAACxpbHN0AAAAJKl0b28AAAAcZGF0YQAAAAEAAAAATGF2ZjYzLjEuMTAyAAAACGZyZWUAAAM7bWRhdNwATGF2YzYzLjEuMTAyAAIwQA4AAAJvBgX//2vcRem95tlIt5Ys2CDZI+7veDI2NCAtIGNvcmUgMTY1IHIzMjIyIGIzNTYwNWEgLSBILjI2NC9NUEVHLTQgQVZDIGNvZGVjIC0gQ29weWxlZnQgMjAwMy0yMDI1IC0gaHR0cDovL3d3dy52aWRlb2xhbi5vcmcveDI2NC5odG1sIC0gb3B0aW9uczogY2FiYWM9MCByZWY9MTYgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDEzMSBtZT11bWggc3VibWU9MTAgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0yNCBjaHJvbWFfbWU9MSB0cmVsbGlzPTIgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz0xIGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTQga2V5aW50X21pbj0xIHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NCByYz1jcmYgbWJ0cmVlPTEgY3JmPTUxLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IGlwX3JhdGlvPTEuNDAgYXE9MToxLjAwAIAAAAALZYiCAv5MUAAQv8ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmhwF/UABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmioBb1ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBwAAAAZBmjsBX1ABGCAHARggBwEYIAcBGCAHARggBwEYIAcBGCAHARggBw==`,Ko=null,qo=null;function Jo(e){e.play().catch(()=>{if(qo||Ko!==e)return;let t=()=>{Yo(),Ko===e&&e.play().catch(()=>{})};window.addEventListener(`pointerdown`,t,{capture:!0}),qo=()=>window.removeEventListener(`pointerdown`,t,{capture:!0})})}function Yo(){qo?.(),qo=null}function Xo(){if(typeof document<`u`){if(!Ko){let e=document.createElement(`video`);e.muted=!0,e.loop=!0,e.playsInline=!0,e.setAttribute(`playsinline`,``),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`data-testid`,`keep-screen-video`),e.style.cssText=`position:fixed;left:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none`,e.src=Go,document.body.appendChild(e),Ko=e}Jo(Ko)}}function Zo(){Yo(),Ko&&=(Ko.pause(),Ko.removeAttribute(`src`),Ko.remove(),null)}function Qo(){return typeof navigator>`u`?null:navigator.wakeLock??null}function V(){return Te()||!gn()}var $o=new Set,es=null,ts=Promise.resolve(),ns=!1;async function rs(){if($o.size===0||es&&!es.released)return;let e=Qo();if(!e)Te()&&Xo();else try{let t=await e.request(`screen`);t.addEventListener(`release`,()=>{es===t&&(es=null)}),es=t}catch{}}async function is(){Zo();let e=es;if(es=null,e&&!e.released)try{await e.release()}catch{}}function as(){ns||typeof document>`u`||(ns=!0,document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&$o.size>0&&(ts=ts.then(rs))}))}function os(e,t){if(!V())return;as();let n=$o.size>0;t?$o.add(e):$o.delete(e);let r=$o.size>0;n!==r&&(ts=ts.then(r?rs:is))}var ss=new Set;function cs(){if(typeof window<`u`)return window.PS5UploadPad}function ls(e,t){let n=ss.size>0;t?ss.add(e):ss.delete(e);let r=ss.size>0;if(n!==r)try{cs()?.setActive(r)}catch{}}function us(e,t){let[n,r]=(0,T.useState)(!1);return(0,T.useEffect)(()=>{if(!e||!t)return;let n=!0;return Pe(e,je).then(e=>{n&&!e&&r(!0)}),()=>{n=!1}},[e,t]),n}function ds({href:e}){let t=Tn();return(0,L.jsxs)(`div`,{className:`flex flex-col items-center gap-3 text-center`,"data-testid":`open-on-wifi`,children:[(0,L.jsx)(`p`,{className:`max-w-sm text-sm text-white/60`,children:t(`join_open_lan_body`,void 0,`Can't reach the internet? If you're on the same Wi-Fi as your friend, open the game there.`)}),(0,L.jsx)(`a`,{href:e,rel:`noreferrer`,className:`rounded-full bg-white px-4 py-2 text-sm font-medium text-black`,"data-testid":`open-on-wifi-link`,children:t(`join_open_lan`,void 0,`Open on this Wi-Fi`)})]})}function fs(e,t,n){switch(t.kind){case`connecting`:return e(`pad_connecting`,void 0,`Connecting…`);case`asking`:return e(`pad_asking`,{name:n},`Waiting for ${n} to allow this phone…`);case`joined`:return t.host?t.passcode&&!t.playing?e(`pad_wait_passcode`,{name:n},`Waiting for the passcode on ${n}`):t.playing?e(`pad_playing`,{host:t.host},`Controller for ${t.host}`):e(`pad_starting`,void 0,`Connected. The stream is starting…`):e(`pad_no_session`,void 0,`Connected. Waiting for Remote Play to start on the computer.`);case`refused`:return t.why===`denied`?e(`pad_denied`,void 0,`The computer said no.`):t.why===`no_answer`?e(`pad_no_answer`,void 0,`The computer didn't answer in time. Try again.`):t.why===`kicked`?e(`pad_kicked`,void 0,`The computer took this phone out of the game.`):t.why===`closed`?e(`pad_link_closed`,void 0,`The computer closed the link. Scan the new code to play again.`):t.why===`key`?e(`pad_old_code`,void 0,`This code has expired. Scan the new one on the computer.`):t.why===`full`?e(`pad_full`,void 0,`Four phones are playing already.`):t.why===`no_stream`?e(`pad_watch_no_stream`,void 0,`Nothing is streaming on the computer right now.`):t.why.startsWith(`net:`)?ps(e,t.why.slice(4)):e(`pad_refused`,void 0,`The computer did not let this phone in.`);case`reconnecting`:return e(`pad_reconnecting`,void 0,`Connection lost. Reconnecting…`);case`lost`:return e(`pad_lost`,void 0,`Lost the connection to the computer.`)}}function ps(e,t){switch(t){case`mismatch`:return e(`join_net_mismatch`,void 0,`This link doesn't match the host; ask them for a new one.`);case`no_direct`:return e(`join_net_no_direct`,void 0,`A direct connection isn't possible from this network (both sides' routers are strict). Try Wi-Fi instead of mobile data, or ask the host to turn on UPnP.`);case`no_room`:return e(`pad_old_code`,void 0,`This code has expired. Scan the new one on the computer.`);case`net_full`:return e(`pad_full`,void 0,`Four phones are playing already.`);case`no_hub`:return e(`join_net_no_hub`,void 0,`Couldn't reach the PS5Upload invite service. Check your internet connection, then try again.`);case`offer`:case`no_webrtc`:return e(`join_net_no_webrtc`,void 0,`This browser can't make direct connections. Try a recent Chrome, Safari or Firefox.`);default:return e(`pad_lost`,void 0,`Lost the connection to the computer.`)}}function ms(e){return e.kind!==`refused`||e.why!==`kicked`&&e.why!==`closed`}async function hs(){try{await document.documentElement.requestFullscreen?.({navigationUI:`hide`}),await screen.orientation.lock?.(`landscape`)}catch{}}function gs(e,t){return t?.mouse?null:t?.reason===`vinput_helper_old`||t?.reason===`helper_old`?e(`rp_kbm_helper_old`,void 0,`Update the PS5 helper to use a keyboard and mouse.`):t?.reason===`vinput_needs_loader`?e(`rp_kbm_needs_loader`,void 0,`Needs a payload loader on port 9021`):e(`rp_kbm_unavailable`,void 0,`Native keyboard & mouse isn't available on this console yet.`)}function _s({client:e,caps:t}){let n=Tn(),r=(0,T.useMemo)(()=>new B({send:t=>e.sendKbm(t)}),[e]);(0,T.useEffect)(()=>{r.setWant({mouse:!0,keyboard:t.keyboard})},[r,t.keyboard]),(0,T.useEffect)(()=>()=>r.dispose(),[r]);let i=(0,T.useMemo)(()=>({move:(e,t)=>r.move(e,t),button:(e,t)=>r.button(e,t),scroll:(e,t)=>r.scroll(e,t,0),key:(e,t)=>r.key(e,t),shiftHeld:()=>r.shiftHeld()}),[r]);return(0,L.jsxs)(Po,{sink:i,speed:1.5,className:`absolute inset-0 z-10`,testId:`pad-touchpad`,children:[(0,L.jsx)(`p`,{className:`pointer-events-none absolute inset-x-6 top-1/2 -translate-y-1/2 text-center text-xs leading-5 text-white/50`,children:n(`rp_tp_tips`,void 0,`Drag to move. Tap to click. Two fingers: tap to right-click, drag to scroll. Tap, then touch and drag to select.`)}),(0,L.jsx)(`div`,{className:`absolute`,style:{right:`max(12px, env(safe-area-inset-right))`,bottom:`max(12px, env(safe-area-inset-bottom))`},children:(0,L.jsx)(Io,{sink:t.keyboard?i:null})})]})}function vs({url:e,computer:t,onLeave:n,watch:r=!1,transport:i,hello:a,onReconnectToken:o,lanUrl:s=null}){let c=Tn(),l=us(i?e:null,s),u=t??c(`pad_net_computer`,void 0,`the computer`),[d,f]=(0,T.useState)({kind:`connecting`}),[p,m]=(0,T.useState)(0),[h,g]=(0,T.useState)(()=>typeof window<`u`&&window.innerHeight>window.innerWidth),[_,v]=(0,T.useState)(null),[y,b]=(0,T.useState)(null),[x,S]=(0,T.useState)(!1),ee=(0,T.useRef)(null),te=(0,T.useRef)(null),[C,ne]=(0,T.useState)(!r),[w,re]=(0,T.useState)(null),[ie,ae]=(0,T.useState)(!1),[oe,se]=(0,T.useState)(null),[ce,le]=(0,T.useState)(`controller`);(0,T.useEffect)(()=>(os(`pad-remote`,!0),ls(`pad-remote`,!0),()=>{os(`pad-remote`,!1),ls(`pad-remote`,!1)}),[]),(0,T.useEffect)(()=>{if(!x)return;let e=Ae(e=>{co.motion=e});return()=>{e(),co.motion=null}},[x]),(0,T.useEffect)(()=>{let t=r?Zi(re,`watch`,()=>n.askKeyframe()):null;ee.current=t,t&&te.current?.appendChild(t.element),ne(!r),ae(!1);let n=new io({url:e,WebSocketImpl:i,hello:a,onReconnectToken:o,onStage:f,touchPad:()=>co.touchPad,onLight:v,onKbmCaps:se,motion:()=>co.motion,watch:t?{onFrame:e=>t.onMessage(e),onCodec:e=>t.setHevc(e),onControl:ne}:void 0});b(n),n.start();let s=()=>{let e=document.visibilityState===`hidden`;n.setNeutral(e),e||n.wake()},c=()=>n.setNeutral(!0);return document.addEventListener(`visibilitychange`,s),window.addEventListener(`blur`,c),window.addEventListener(`focus`,s),()=>{document.removeEventListener(`visibilitychange`,s),window.removeEventListener(`blur`,c),window.removeEventListener(`focus`,s),n.stop(),t?.stop(),t?.element.remove()}},[e,p,r]),(0,T.useEffect)(()=>{let e=()=>g(window.innerHeight>window.innerWidth);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let ue=d.kind===`refused`||d.kind===`lost`,de=d.kind===`joined`||d.kind===`reconnecting`,pe=!!s&&!de&&(l||d.kind===`refused`&&d.why===`net:no_hub`);return(0,L.jsxs)(`div`,{className:`fixed inset-0 select-none overflow-hidden bg-black text-white [-webkit-touch-callout:none]`,style:{touchAction:`none`},"data-testid":`pad-app`,children:[(0,L.jsxs)(`div`,{className:`absolute inset-x-0 top-0 z-20 flex items-center justify-center gap-2 px-3 pt-[max(6px,env(safe-area-inset-top))] text-xs text-white/80`,children:[(0,L.jsx)(`span`,{className:`inline-block h-2 w-2 shrink-0 rounded-full`,style:{background:d.kind===`joined`?_?`rgb(${_[0]},${_[1]},${_[2]})`:`var(--color-success,#22c55e)`:ue?`var(--color-bad,#ef4444)`:`#eab308`}}),(0,L.jsx)(`span`,{className:`truncate`,"data-testid":`pad-stage`,children:r&&d.kind===`joined`&&d.host&&(!d.passcode||d.playing)?C?c(`pad_watch_control`,void 0,`Watching, and you have the controller`):c(`pad_watch_watching`,{host:d.host},`Watching ${d.host}`):fs(c,d,u)}),de&&typeof document<`u`&&!!document.documentElement.requestFullscreen&&!document.fullscreenElement&&(0,L.jsxs)(`button`,{type:`button`,onClick:()=>void hs(),className:`flex items-center gap-1 rounded-full bg-white/15 px-2 py-1`,"data-testid":`pad-full`,children:[(0,L.jsx)(fe,{size:12}),c(`pad_fill`,void 0,`Full screen`)]}),de&&k()&&(0,L.jsx)(`button`,{type:`button`,onClick:()=>{x?S(!1):ke().then(S)},"aria-pressed":x,className:`rounded-full px-2 py-1 ${x?`bg-white text-black`:`bg-white/15`}`,"data-testid":`pad-motion`,children:c(`pad_motion`,void 0,`Motion`)}),n&&(0,L.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-full bg-white/15 px-2 py-1`,"data-testid":`pad-leave`,children:c(`pad_leave`,void 0,`Stop being a controller`)})]}),(0,L.jsx)(`div`,{ref:te,className:`absolute inset-0 z-0 flex items-center justify-center`,"aria-hidden":!0}),r&&de&&!ie&&(0,L.jsxs)(`button`,{type:`button`,onClick:()=>{ee.current?.startSound(),ae(!0)},className:`absolute bottom-4 left-1/2 z-20 flex -translate-x-1/2 items-center gap-1.5 rounded-full bg-white/90 px-3 py-1.5 text-xs font-medium text-black`,"data-testid":`watch-sound`,children:[(0,L.jsx)(Ce,{size:14}),c(`pad_watch_sound`,void 0,`Sound`)]}),r&&w&&(0,L.jsx)(`p`,{className:`absolute inset-x-4 top-1/2 z-10 -translate-y-1/2 text-center text-sm text-white/85`,"data-testid":`watch-problem`,children:w===`no_hevc`?c(`pad_watch_no_hevc`,void 0,`This device can't play this stream's picture: the computer streams HEVC, and this device plays only H.264.`):c(`pad_watch_decode`,void 0,`The picture could not be played here.`)}),de&&C&&(ce===`touchpad`&&oe?.mouse&&y?(0,L.jsx)(_s,{client:y,caps:oe}):(0,L.jsx)(wo,{stream:y,layout:`overlay`})),de&&C&&(0,L.jsx)(Lo,{mode:ce===`touchpad`&&oe?.mouse?`touchpad`:`controller`,onChange:le,blocked:gs(c,oe),touchpadLabel:c(`pad_touchpad_tab`,void 0,`Touchpad & keyboard`),style:{top:`calc(max(6px, env(safe-area-inset-top)) + 2rem)`}}),de&&h&&(0,L.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-6 z-20 flex justify-center`,children:(0,L.jsxs)(`span`,{className:`flex items-center gap-2 rounded-full bg-black/70 px-3 py-1.5 text-xs text-white/85`,children:[(0,L.jsx)(xe,{size:14}),c(`pad_turn`,void 0,`Turn the phone sideways`)]})}),pe&&!ue&&s&&(0,L.jsx)(`div`,{className:`absolute inset-x-0 bottom-8 z-10 flex justify-center px-6`,children:(0,L.jsx)(ds,{href:s})}),ue&&(0,L.jsxs)(`div`,{className:`absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 px-6 text-center text-sm`,children:[(0,L.jsx)(`p`,{className:`max-w-sm text-white/85`,children:fs(c,d,u)}),pe&&s&&(0,L.jsx)(ds,{href:s}),ms(d)&&(0,L.jsx)(`button`,{type:`button`,onClick:()=>m(e=>e+1),className:`rounded-full bg-white px-4 py-2 text-sm font-medium text-black`,"data-testid":`pad-retry`,children:c(`pad_retry`,void 0,`Try again`)})]})]})}var ys=`ps5upload.openIn`,bs=`ps5upload.openIn.tab`;function xs(){try{return sessionStorage.getItem(bs)===`browser`}catch{return!1}}function Ss(){try{sessionStorage.setItem(bs,`browser`)}catch{}}function Cs(e){return e===`browser`?`browser`:e===`app`?`opening`:`ask`}function ws({appLink:e,children:t}){let n=Tn(),[r,i]=(0,T.useState)(()=>xs()?`browser`:Cs(yt(ys))),[a,o]=(0,T.useState)(!1);if((0,T.useEffect)(()=>{r===`opening`&&yt(`ps5upload.openIn`)===`app`&&(location.href=e)},[]),r===`browser`)return(0,L.jsx)(L.Fragment,{children:t});let s=()=>{a&&vt(ys,`app`),i(`opening`),location.href=e},c=()=>{r===`ask`&&a?vt(ys,`browser`):r===`opening`&&yt(`ps5upload.openIn`)===`app`&&bt(ys),Ss(),i(`browser`)};return(0,L.jsx)(`div`,{className:`flex min-h-[100dvh] items-center justify-center bg-black px-6 text-white`,"data-testid":`open-in-gate`,"data-join-ui":``,children:(0,L.jsx)(`div`,{className:`w-full max-w-sm space-y-4 rounded-2xl border border-white/10 bg-neutral-900 p-6`,children:r===`ask`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsx)(`h1`,{className:`text-lg font-semibold`,children:n(`open_in_title`,void 0,`Open in the PS5Upload app?`)}),(0,L.jsx)(`p`,{className:`text-sm text-white/60`,children:n(`open_in_body`,void 0,`Have the PS5Upload app on this device? Open this there, or carry on in the browser.`)})]}),(0,L.jsx)(`button`,{type:`button`,onClick:s,autoFocus:!0,className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black`,"data-testid":`open-in-app`,children:n(`open_in_app`,void 0,`Open in the app`)}),(0,L.jsx)(`button`,{type:`button`,onClick:c,className:`w-full rounded-full border border-white/20 py-2.5 text-sm font-semibold text-white hover:bg-white/10`,"data-testid":`open-in-browser`,children:n(`open_in_browser`,void 0,`Continue in browser`)}),(0,L.jsxs)(`label`,{className:`flex items-center justify-center gap-2 text-xs text-white/60`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:a,onChange:e=>o(e.target.checked),"data-testid":`open-in-remember`}),n(`open_in_remember`,void 0,`Remember my choice on this device`)]})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsx)(`h1`,{className:`text-lg font-semibold`,children:n(`open_in_opening`,void 0,`Opening the PS5Upload app…`)}),(0,L.jsx)(`p`,{className:`text-sm text-white/60`,children:n(`open_in_not_opened`,void 0,`Nothing happened? The app may not be on this device.`)})]}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>location.href=e,autoFocus:!0,className:`w-full rounded-full bg-white py-2.5 text-sm font-semibold text-black`,"data-testid":`open-in-again`,children:n(`open_in_again`,void 0,`Try again`)}),(0,L.jsx)(`button`,{type:`button`,onClick:c,className:`w-full rounded-full border border-white/20 py-2.5 text-sm font-semibold text-white hover:bg-white/10`,"data-testid":`open-in-browser`,children:n(`open_in_browser`,void 0,`Continue in browser`)})]})})})}function Ts(e){return`ps5upload://pad?link=${encodeURIComponent(e)}`}function Es(e){let t=(e??``).trim().replace(/^\[|\]$/g,``).toLowerCase(),n=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(t);if(n){let e=n.slice(1).map(Number);if(e.some(e=>e>255))return null;let[t,r]=e;return t===10||t===172&&r>=16&&r<32||t===192&&r===168||t===169&&r===254||t===127?0:t===100&&r>=64&&r<128?1:2}if(!t.includes(`:`)||!/^[0-9a-f:.]+$/.test(t))return null;if(t.startsWith(`fd7a:115c:a1e0:`))return 1;let r=parseInt(t.split(`:`)[0]||`0`,16);return(r&65024)==64512||(r&65472)==65152||t===`::1`?0:2}function Ds(e,t){let n=Es(e),r=Es(t);return n===1||r===1?`tailscale`:r===0?`lan`:r===2?`internet`:null}function Os(e){let t=[];if(typeof e.forEach==`function`)e.forEach(e=>t.push(e));else for(let n of e)t.push(n);let n=new Map(t.map(e=>[String(e.id),e])),r=t.filter(e=>e.type===`candidate-pair`),i=t.filter(e=>e.type===`transport`&&typeof e.selectedCandidatePairId==`string`).map(e=>n.get(String(e.selectedCandidatePairId))).find(Boolean)??r.find(e=>e.selected===!0)??r.find(e=>e.nominated===!0&&e.state===`succeeded`);if(!i)return null;let a=e=>{let t=n.get(String(e));if(!t)return null;let r=t.address??t.ip;return typeof r==`string`?r:null};return Ds(a(i.localCandidateId),a(i.remoteCandidateId))}function ks(e){let t=e.replace(/:\d+$/,``).replace(/^\[|\]$/g,``);return`${t===`localhost`||t===`127.0.0.1`||t===`::1`?`ws`:`wss`}://${e}/ws`}function As(e){let t=new Set;for(let n of e.matchAll(/^a=fingerprint:sha-256[ \t]+([0-9A-Fa-f:]+)[ \t]*\r?$/gim))t.add(n[1].toUpperCase());return/^a=fingerprint:(?!sha-256[ \t])/im.test(e)?null:t.size===1?[...t][0]:null}function js(e,t){let n=As(e);return n!==null&&n===t.toUpperCase()}var Ms=16777216;function Ns(e){let t=16383,n=Math.max(1,Math.ceil(e.length/t)),r=[];for(let i=0;ithis.max)return this.parts=[],this.size=0,{kind:`error`,why:`too_big`};if(this.parts.push(r.slice()),this.size+=r.length,n===1)return{kind:`partial`};let i=new Uint8Array(this.size),a=0;for(let e of this.parts)i.set(e,a),a+=e.length;return this.parts=[],this.size=0,{kind:`message`,data:i.buffer}}};function Fs(e){let t=new Uint8Array(9);return t[0]=3,t.set(e.subarray(0,8),1),t}var Is=[`stun:stun.cloudflare.com:3478`,`stun:stun.l.google.com:19302`];function Ls(e){let t=e.trim().replace(/^a=/,``).split(/\s+/);return t.length<8||t[6]!==`typ`||t[2].toLowerCase()===`udp`&&!t[4].toLowerCase().endsWith(`.local`)}var Rs=1500,zs=2e4;function Bs(e){let t=e?.codecs??[],n=e=>t.filter(t=>t.mimeType.toLowerCase()===e);return[...n(`video/h264`),...n(`video/h265`),...n(`video/rtx`)]}var Vs=null;function Hs(e){e.onopen=e.onmessage=e.onclose=e.onerror=null;try{e.readyState===1&&e.send(JSON.stringify({t:`leave`})),e.close(1e3)}catch{}}function Us(e,t){let n=Vs;return n?(Vs=null,n.timer&&clearTimeout(n.timer),n.url!==e||n.room!==t||n.ws.readyState>1||n.msgs.some(e=>e.t===`error`||e.t===`closed`)?(Hs(n.ws),null):{ws:n.ws,msgs:n.msgs}):null}function Ws(e,t={}){var n;let r=t.WebSocketImpl??(typeof WebSocket>`u`?void 0:WebSocket),i=t.PeerConnection??(typeof RTCPeerConnection>`u`?void 0:RTCPeerConnection),a=t.iceTimeoutMs??15e3,o=t.log??(()=>{});class s{constructor(e){this.CONNECTING=0,this.OPEN=1,this.CLOSING=2,this.CLOSED=3,this.readyState=0,this.binaryType=`arraybuffer`,this.onopen=null,this.onmessage=null,this.onclose=null,this.onerror=null,this.hub=null,this.pc=null,this.dc=null,this.timer=null,this.rx=new Ps,this.answered=!1,this.early=[],this.hubBackUntil=0,this.offerSdp=null,this.offerSent=!1,this.ownEarly=[],this.media=null,setTimeout(()=>this.begin(),0)}begin(){if(this.readyState!==0)return;if(!i||!r){this.fail(`no_webrtc`);return}let n=t.signalUrl??ks(e.hub),a=t.signalUrl||t.lan?null:Us(n,e.room),s;if(a)s=a.ws,o(`hub: joined early`);else try{s=new r(n)}catch{this.fail(`no_hub`);return}if(this.hub=s,this.prepare(),this.readyState===0){s.onopen=()=>s.send(JSON.stringify(t.lan?{v:1,t:`join`,lan:!0}:{v:1,t:`join`,room:e.room})),s.onmessage=e=>{if(typeof e.data!=`string`)return;let t;try{t=JSON.parse(e.data)}catch{return}this.onHub(t)},s.onclose=e=>{this.hub===s&&(this.hub=null,this.readyState===0&&(this.answered||e?.code===1001&&this.hubRestarting()||this.fail(`no_hub`)))},s.onerror=()=>{};for(let e of a?.msgs??[])this.onHub(e)}}signal(e){let t=this.hub;t&&t.readyState===1&&t.send(JSON.stringify({t:`signal`,to:`host`,data:e}))}onHub(e){if(this.readyState===0)switch(e.t){case`joined`:o(`hub: joined room as ${e.gid??`?`}`),this.sendOffer();return;case`signal`:e.from===`host`&&e.data&&typeof e.data==`object`&&this.onSignal(e.data);return;case`closed`:this.fail(`no_room`);return;case`error`:if(o(`hub: error ${e.why??`?`}`),e.why===`no_room`&&this.hubBackUntil&&this.hubRestarting())return;this.fail(e.why===`no_room`?`no_room`:e.why===`room_full`?`net_full`:`no_hub`);return}}prepare(){if(!i)return;this.offerSent=!1,this.ownEarly=[];let e;try{e=new i({iceServers:[{urls:Is}]})}catch{this.fail(`no_webrtc`);return}this.pc=e;let n=e.createDataChannel(t.label??`join`,{ordered:!0});if(n.binaryType=`arraybuffer`,this.dc=n,n.onopen=()=>this.opened(n),n.onmessage=e=>this.fromChannel(e.data),n.onclose=()=>{this.dc===n&&this.dropped()},t.video&&e.addTransceiver){try{let t=e.addTransceiver(`video`,{direction:`recvonly`}),n=Bs(globalThis.RTCRtpReceiver?.getCapabilities?.(`video`));n.length&&t.setCodecPreferences&&t.setCodecPreferences(n)}catch{}try{e.addTransceiver(`audio`,{direction:`recvonly`})}catch{}e.ontrack=t=>{if(this.pc!==e)return;let n=this.media?.stream??t.streams[0]??new MediaStream;n.getTracks().includes(t.track)||n.addTrack(t.track),this.media=t.track.kind===`audio`?{stream:n,receiver:this.media?.receiver??t.receiver,audio:t.receiver}:{stream:n,receiver:t.receiver,...this.media?.audio?{audio:this.media.audio}:{}}}}e.onicecandidate=t=>{if(this.pc!==e)return;let n=t.candidate;if(!n||!n.candidate||!Ls(n.candidate))return;let r={type:`candidate`,candidate:n.candidate,sdpMid:n.sdpMid??`0`};this.offerSent?this.signal(r):this.ownEarly.push(r)},e.oniceconnectionstatechange=()=>{if(this.pc!==e)return;let t=e.iceConnectionState;o(`ice: ${t}`),t===`failed`&&(this.readyState===0?this.fail(`no_direct`):this.dropped())},this.offerSdp=(async()=>{let t=await e.createOffer();return await e.setLocalDescription(t),e.localDescription?.sdp??t.sdp??``})().catch(()=>(this.pc===e&&this.fail(`no_webrtc`),null))}async sendOffer(){let e=this.pc,t=this.offerSdp;if(!e||!t||this.offerSent)return;this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,this.readyState===0&&this.fail(`no_direct`)},a);let n=await t;if(this.pc===e&&n!==null&&this.readyState===0){this.signal({type:`offer`,sdp:n}),this.offerSent=!0;for(let e of this.ownEarly.splice(0))this.signal(e)}}async onSignal(t){let n=this.pc;if(t.type===`bye`)this.fail(t.why===`full`?`net_full`:`offer`);else if(n){if(t.type===`answer`){if(this.answered||typeof t.sdp!=`string`)return;if(e.fp?!js(t.sdp,e.fp):As(t.sdp)===null){o(`answer: fingerprint does not match the link`),this.fail(`mismatch`);return}this.answered=!0;try{await n.setRemoteDescription({type:`answer`,sdp:t.sdp});for(let e of this.early.splice(0))await n.addIceCandidate(e).catch(()=>{})}catch{this.fail(`offer`)}}else if(t.type===`candidate`&&typeof t.candidate==`string`&&t.candidate){let e={candidate:t.candidate,sdpMid:typeof t.sdpMid==`string`?t.sdpMid:`0`,sdpMLineIndex:typeof t.sdpMLineIndex==`number`?t.sdpMLineIndex:0};this.answered?await n.addIceCandidate(e).catch(()=>{}):this.early.push(e)}}}opened(e){this.dc===e&&this.readyState===0&&(this.clearTimer(),this.readyState=1,o(`channel open`),this.leaveHub(),this.onopen?.(new Event(`open`)))}fromChannel(e){if(this.readyState!==1)return;if(typeof e==`string`){this.onmessage?.(new MessageEvent(`message`,{data:e}));return}if(!(e instanceof ArrayBuffer))return;let t=this.rx.push(e);switch(t.kind){case`ping`:try{this.dc?.send(Fs(t.data))}catch{}return;case`message`:this.onmessage?.(new MessageEvent(`message`,{data:t.data}));return;case`error`:o(`channel: bad binary message (${t.why})`),this.dropped();return;default:return}}async netPath(){let e=this.pc;if(!e||this.readyState!==1||typeof e.getStats!=`function`)return null;try{return Os(await e.getStats())}catch{return null}}send(e){let t=this.dc;if(this.readyState!==1||!t||t.readyState!==`open`)throw Error(`not open`);if(typeof e==`string`){t.send(e);return}let n=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);for(let e of Ns(n))t.send(e)}close(){this.readyState!==3&&(this.teardown(),this.emitClose(1e3,``,!0))}clearTimer(){this.timer&&clearTimeout(this.timer),this.timer=null}leaveHub(){let e=this.hub;if(this.hub=null,e)try{e.readyState===1&&e.send(JSON.stringify({t:`leave`})),e.close(1e3)}catch{}}hubRestarting(){let e=Date.now();return this.hubBackUntil||=e+zs,e>=this.hubBackUntil?!1:(o(`hub: restarting, trying again`),this.clearTimer(),this.leaveHub(),this.closePeer(),this.answered=!1,this.early=[],this.timer=setTimeout(()=>{this.timer=null,this.begin()},Rs),!0)}teardown(){this.readyState=3,this.clearTimer(),this.leaveHub(),this.closePeer()}closePeer(){let e=this.pc,t=this.dc;this.pc=null,this.dc=null,this.media=null,this.offerSdp=null,this.offerSent=!1,this.ownEarly=[];try{t?.close()}catch{}try{e?.close()}catch{}}dropped(){this.readyState!==3&&(this.teardown(),this.emitClose(1006,``,!1))}fail(e){this.readyState!==3&&(o(`failed: ${e}`),this.teardown(),this.emitClose(Ie,`net:${e}`,!1))}emitClose(e,t,n){let r=this.onclose;if(!r)return;let i=typeof CloseEvent>`u`?{type:`close`,code:e,reason:t,wasClean:n}:new CloseEvent(`close`,{code:e,reason:t,wasClean:n});setTimeout(()=>r(i),0)}}return n=s,n.CONNECTING=0,n.OPEN=1,n.CLOSING=2,n.CLOSED=3,s}function Gs(e,t=0){return/iPad/.test(e)||/Macintosh/.test(e)&&t>1?`ipad`:/iPhone|iPod/.test(e)?`iphone`:/Android/.test(e)?`android`:`phone`}var Ks=new URLSearchParams(location.hash.slice(1)),qs=Ks.get(`t`)??``,Js=Ks.get(`w`)===`1`,Ys=Gs(navigator.userAgent,navigator.maxTouchPoints),Xs=oo({get:yt,set:vt}),Zs=Be(location.hash),Qs=(0,x.createRoot)(document.getElementById(`root`));if(Zs){let e=Ws(Zs,{label:`pad`,log:e=>console.info(`[pad] ${e}`)}),t=`ps5upload.pad.rt.${Zs.room}`,n=yt(t),r={t:Zs.key,name:Ys,d:Xs,...Js?{w:1}:{},...n?{rt:n}:{}},i=Me(location.hash,`pad`);Qs.render((0,L.jsx)(vs,{url:ks(Zs.hub),computer:null,watch:Js,transport:e,hello:r,onReconnectToken:e=>vt(t,e),lanUrl:i?Ne(i,{watch:Js}):null}))}else{let e=location.pathname.replace(/\/pad\/?$/,``),t=`${location.protocol===`https:`?`wss`:`ws`}://${location.host}${e}/api/pad/ws?t=${encodeURIComponent(qs)}&name=${Ys}&d=${Xs}${Js?`&w=1`:``}`;Qs.render((0,L.jsx)(ws,{appLink:Ts(location.href),children:(0,L.jsx)(vs,{url:t,computer:location.hostname,watch:Js})}))} From 637d0e71e400986d55db3253f46384510076787e Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 16:16:15 -0800 Subject: [PATCH 4/4] 12.6.36 release notes; catch up to 12.6.35 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- CHANGELOG.md | 6 +++++ VERSION | 2 +- client/package-lock.json | 4 ++-- client/package.json | 2 +- client/src-tauri/Cargo.lock | 30 ++++++++++++------------ client/src-tauri/Cargo.toml | 2 +- client/src-tauri/tauri.conf.json | 2 +- engine/Cargo.lock | 40 ++++++++++++++++---------------- engine/Cargo.toml | 2 +- payload/include/config.h | 2 +- 10 files changed, 49 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c63ca0e76..18d5b47c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ What's new in ps5upload, written for humans. ## Unreleased +**Play Together over the internet** +- **Friends joining from Firefox, a VPN or IPv6 are no longer turned away.** Their browser sends more connection details than the hub allowed per minute, so the hub closed the join and the page said it couldn't reach the hub. The hub now allows a realistic amount for every browser and for several devices behind one home connection, and the join page sends only the details the app can use. +- The hub answers its address with a trailing slash too, tells search crawlers to stay away, and counts which limit stopped a connection, so problems like this show up straight away. + +## 12.6.35 + **Files on a phone** - **Name and path fields get the full width (#936).** New folder, New file, Rename, Download from a link and Go to path no longer squeeze the text box: on a phone the field takes the width of the card and its buttons sit on their own line, so you can see what you type and the buttons never break mid-word. Tablets and computers look as before. diff --git a/VERSION b/VERSION index 0f9ba074b..5b60c4bec 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -12.6.34 +12.6.35 diff --git a/client/package-lock.json b/client/package-lock.json index a440f7f2e..157970fc8 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,12 +1,12 @@ { "name": "ps5upload-client", - "version": "12.6.34", + "version": "12.6.35", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ps5upload-client", - "version": "12.6.34", + "version": "12.6.35", "dependencies": { "@tauri-apps/api": "^2.12.5", "@tauri-apps/plugin-dialog": "^2.8.4", diff --git a/client/package.json b/client/package.json index c6fc7b50f..70532e381 100644 --- a/client/package.json +++ b/client/package.json @@ -2,7 +2,7 @@ "name": "ps5upload-client", "private": true, "type": "module", - "version": "12.6.34", + "version": "12.6.35", "description": "The all-in-one PS5 companion app.", "homepage": "https://github.com/phantomptr/ps5upload", "author": "PhantomPtr ", diff --git a/client/src-tauri/Cargo.lock b/client/src-tauri/Cargo.lock index 2ec260fcb..bdc273f99 100644 --- a/client/src-tauri/Cargo.lock +++ b/client/src-tauri/Cargo.lock @@ -4743,7 +4743,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-exfat" -version = "12.6.34" +version = "12.6.35" dependencies = [ "ps5-dump-forge-patch", "ps5upload-fpkg", @@ -4752,14 +4752,14 @@ dependencies = [ [[package]] name = "ps5-dump-forge-patch" -version = "12.6.34" +version = "12.6.35" dependencies = [ "crc32fast", ] [[package]] name = "ps5-dump-forge-pfs" -version = "12.6.34" +version = "12.6.35" dependencies = [ "flate2", "ps5-dump-forge-patch", @@ -4768,7 +4768,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-ufs2" -version = "12.6.34" +version = "12.6.35" dependencies = [ "ps5-dump-forge-patch", "ps5upload-fpkg", @@ -4777,7 +4777,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-zstd" -version = "12.6.34" +version = "12.6.35" dependencies = [ "crc32fast", "getrandom 0.4.3", @@ -4788,7 +4788,7 @@ dependencies = [ [[package]] name = "ps5upload-archive" -version = "12.6.34" +version = "12.6.35" dependencies = [ "anyhow", "crc32fast", @@ -4798,7 +4798,7 @@ dependencies = [ [[package]] name = "ps5upload-ava1" -version = "12.6.34" +version = "12.6.35" dependencies = [ "anyhow", "ava1", @@ -4817,7 +4817,7 @@ dependencies = [ [[package]] name = "ps5upload-convert-core" -version = "12.6.34" +version = "12.6.35" dependencies = [ "blake3", "libc", @@ -4834,7 +4834,7 @@ dependencies = [ [[package]] name = "ps5upload-core" -version = "12.6.34" +version = "12.6.35" dependencies = [ "aes 0.9.2", "aes-gcm 0.11.0", @@ -4868,7 +4868,7 @@ dependencies = [ [[package]] name = "ps5upload-desktop" -version = "12.6.34" +version = "12.6.35" dependencies = [ "anyhow", "ava1", @@ -4910,7 +4910,7 @@ dependencies = [ [[package]] name = "ps5upload-engine" -version = "12.6.34" +version = "12.6.35" dependencies = [ "aes 0.9.2", "aes-gcm 0.11.0", @@ -4974,7 +4974,7 @@ dependencies = [ [[package]] name = "ps5upload-fpkg" -version = "12.6.34" +version = "12.6.35" dependencies = [ "aes 0.9.2", "crc32fast", @@ -4997,7 +4997,7 @@ dependencies = [ [[package]] name = "ps5upload-hub" -version = "12.6.34" +version = "12.6.35" dependencies = [ "axum", "base64 0.23.1", @@ -5011,7 +5011,7 @@ dependencies = [ [[package]] name = "ps5upload-pkg" -version = "12.6.34" +version = "12.6.35" dependencies = [ "aes 0.9.2", "blake3", @@ -5023,7 +5023,7 @@ dependencies = [ [[package]] name = "ps5upload-tailnet" -version = "12.6.34" +version = "12.6.35" dependencies = [ "cc", ] diff --git a/client/src-tauri/Cargo.toml b/client/src-tauri/Cargo.toml index e3a66f809..18c5f2df1 100644 --- a/client/src-tauri/Cargo.toml +++ b/client/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ps5upload-desktop" -version = "12.6.34" +version = "12.6.35" description = "The all-in-one PS5 companion app." license = "GPL-3.0-or-later" edition = "2021" diff --git a/client/src-tauri/tauri.conf.json b/client/src-tauri/tauri.conf.json index ecd6c3154..bee7b670d 100644 --- a/client/src-tauri/tauri.conf.json +++ b/client/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "PS5Upload", - "version": "12.6.34", + "version": "12.6.35", "identifier": "com.phantomptr.ps5upload", "build": { "beforeDevCommand": "npm run dev:vite", diff --git a/engine/Cargo.lock b/engine/Cargo.lock index af264e011..2d75b584d 100644 --- a/engine/Cargo.lock +++ b/engine/Cargo.lock @@ -2561,7 +2561,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-exfat" -version = "12.6.34" +version = "12.6.35" dependencies = [ "ps5-dump-forge-patch", "ps5upload-fpkg", @@ -2570,14 +2570,14 @@ dependencies = [ [[package]] name = "ps5-dump-forge-patch" -version = "12.6.34" +version = "12.6.35" dependencies = [ "crc32fast", ] [[package]] name = "ps5-dump-forge-pfs" -version = "12.6.34" +version = "12.6.35" dependencies = [ "flate2", "ps5-dump-forge-patch", @@ -2587,7 +2587,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-ufs2" -version = "12.6.34" +version = "12.6.35" dependencies = [ "ps5-dump-forge-patch", "ps5upload-fpkg", @@ -2597,7 +2597,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-zstd" -version = "12.6.34" +version = "12.6.35" dependencies = [ "crc32fast", "getrandom 0.4.3", @@ -2608,7 +2608,7 @@ dependencies = [ [[package]] name = "ps5upload-apidoc" -version = "12.6.34" +version = "12.6.35" dependencies = [ "proc-macro2", "quote", @@ -2618,7 +2618,7 @@ dependencies = [ [[package]] name = "ps5upload-archive" -version = "12.6.34" +version = "12.6.35" dependencies = [ "anyhow", "crc32fast", @@ -2628,7 +2628,7 @@ dependencies = [ [[package]] name = "ps5upload-ava1" -version = "12.6.34" +version = "12.6.35" dependencies = [ "anyhow", "ava1", @@ -2651,7 +2651,7 @@ dependencies = [ [[package]] name = "ps5upload-convert" -version = "12.6.34" +version = "12.6.35" dependencies = [ "libc", "ps5upload-archive", @@ -2666,7 +2666,7 @@ dependencies = [ [[package]] name = "ps5upload-convert-core" -version = "12.6.34" +version = "12.6.35" dependencies = [ "blake3", "flate2", @@ -2686,7 +2686,7 @@ dependencies = [ [[package]] name = "ps5upload-core" -version = "12.6.34" +version = "12.6.35" dependencies = [ "aes 0.9.4", "aes-gcm 0.11.1", @@ -2720,7 +2720,7 @@ dependencies = [ [[package]] name = "ps5upload-ctest" -version = "12.6.34" +version = "12.6.35" dependencies = [ "anyhow", "ava1", @@ -2736,7 +2736,7 @@ dependencies = [ [[package]] name = "ps5upload-engine" -version = "12.6.34" +version = "12.6.35" dependencies = [ "aes 0.9.4", "aes-gcm 0.11.1", @@ -2804,7 +2804,7 @@ dependencies = [ [[package]] name = "ps5upload-fpkg" -version = "12.6.34" +version = "12.6.35" dependencies = [ "aes 0.9.4", "blake3", @@ -2828,7 +2828,7 @@ dependencies = [ [[package]] name = "ps5upload-hub" -version = "12.6.34" +version = "12.6.35" dependencies = [ "axum", "base64 0.23.1", @@ -2843,7 +2843,7 @@ dependencies = [ [[package]] name = "ps5upload-lab" -version = "12.6.34" +version = "12.6.35" dependencies = [ "anyhow", "ava1", @@ -2861,7 +2861,7 @@ dependencies = [ [[package]] name = "ps5upload-pkg" -version = "12.6.34" +version = "12.6.35" dependencies = [ "aes 0.9.4", "blake3", @@ -2873,14 +2873,14 @@ dependencies = [ [[package]] name = "ps5upload-tailnet" -version = "12.6.34" +version = "12.6.35" dependencies = [ "cc", ] [[package]] name = "ps5upload-tests" -version = "12.6.34" +version = "12.6.35" dependencies = [ "anyhow", "ava1", @@ -2898,7 +2898,7 @@ dependencies = [ [[package]] name = "ps5upload-unrar" -version = "12.6.34" +version = "12.6.35" dependencies = [ "serde", "serde_json", diff --git a/engine/Cargo.toml b/engine/Cargo.toml index 4055fcf16..a7290f0af 100644 --- a/engine/Cargo.toml +++ b/engine/Cargo.toml @@ -32,7 +32,7 @@ resolver = "2" [workspace.package] edition = "2021" license = "GPL-3.0-or-later" -version = "12.6.34" +version = "12.6.35" [workspace.dependencies] # AVA1 (github.com/phantomptr/ava1): the Rust crate from crates.io; the payload builds the C side diff --git a/payload/include/config.h b/payload/include/config.h index 17f3c0dd9..ce852bf08 100644 --- a/payload/include/config.h +++ b/payload/include/config.h @@ -5,7 +5,7 @@ * UI tell apart an old payload still running from a build that includes * a particular fix, without having to boot the console. Keep in sync * with the desktop app's package.json during releases. */ -#define PS5UPLOAD2_VERSION "12.6.34" +#define PS5UPLOAD2_VERSION "12.6.35" /* Author credit — embedded in the startup toast so anyone looking at * the console screen knows who wrote the software that just loaded. * Kept separate from VERSION so release scripts can bump the version