@pitvox/partner-react 0.7.1 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,97 +1,97 @@
1
- import { jsx as e, jsxs as c, Fragment as F } from "react/jsx-runtime";
2
- import { createContext as Re, useMemo as w, useContext as Te, useState as D, useCallback as H, useRef as Se, useEffect as $e } from "react";
3
- import { useQueryClient as _, QueryClient as Me, QueryClientProvider as De, useQuery as L, useMutation as W, useQueries as se } from "@tanstack/react-query";
4
- const J = Re(null), Ie = "https://cdn.pitvox.com", Be = "https://pitvox.com";
1
+ import { jsx as n, jsxs as c, Fragment as F } from "react/jsx-runtime";
2
+ import { createContext as $e, useMemo as L, useContext as Me, useState as D, useCallback as H, useRef as De, useEffect as Ie } from "react";
3
+ import { useQueryClient as _, QueryClient as Be, QueryClientProvider as Pe, useQuery as R, useMutation as O, useQueries as ie } from "@tanstack/react-query";
4
+ const J = $e(null), Ae = "https://cdn.pitvox.com", Ue = "https://pitvox.com";
5
5
  let Q = null;
6
- function jn({
7
- partnerSlug: n = null,
8
- cdnUrl: r = Ie,
9
- pitvoxUrl: s = Be,
10
- getSteamId: t,
6
+ function zn({
7
+ partnerSlug: e = null,
8
+ cdnUrl: t = Ae,
9
+ pitvoxUrl: s = Ue,
10
+ getSteamId: r,
11
11
  onRegister: a,
12
12
  onWithdraw: i,
13
13
  onFetchNotifications: o,
14
14
  onMarkNotificationRead: d,
15
- onMarkAllNotificationsRead: h,
15
+ onMarkAllNotificationsRead: v,
16
16
  onFetchServerPassword: l,
17
- children: v
17
+ children: m
18
18
  }) {
19
- const f = w(() => ({
20
- partnerSlug: n,
21
- cdnUrl: r.replace(/\/$/, ""),
19
+ const f = L(() => ({
20
+ partnerSlug: e,
21
+ cdnUrl: t.replace(/\/$/, ""),
22
22
  pitvoxUrl: s.replace(/\/$/, ""),
23
- getSteamId: t || (() => null),
23
+ getSteamId: r || (() => null),
24
24
  onRegister: a || null,
25
25
  onWithdraw: i || null,
26
26
  onFetchNotifications: o || null,
27
27
  onMarkNotificationRead: d || null,
28
- onMarkAllNotificationsRead: h || null,
28
+ onMarkAllNotificationsRead: v || null,
29
29
  onFetchServerPassword: l || null
30
- }), [n, r, s, t, a, i, o, d, h, l]);
30
+ }), [e, t, s, r, a, i, o, d, v, l]);
31
31
  let g = !1;
32
32
  try {
33
33
  _(), g = !0;
34
34
  } catch {
35
35
  g = !1;
36
36
  }
37
- return g ? /* @__PURE__ */ e(J.Provider, { value: f, children: v }) : (Q || (Q = new Me({
37
+ return g ? /* @__PURE__ */ n(J.Provider, { value: f, children: m }) : (Q || (Q = new Be({
38
38
  defaultOptions: {
39
39
  queries: { staleTime: 6e4 }
40
40
  }
41
- })), /* @__PURE__ */ e(De, { client: Q, children: /* @__PURE__ */ e(J.Provider, { value: f, children: v }) }));
41
+ })), /* @__PURE__ */ n(Pe, { client: Q, children: /* @__PURE__ */ n(J.Provider, { value: f, children: m }) }));
42
42
  }
43
43
  function k() {
44
- const n = Te(J);
45
- if (!n)
44
+ const e = Me(J);
45
+ if (!e)
46
46
  throw new Error("usePitVox must be used within a <PitVoxPartnerProvider>");
47
- return n;
47
+ return e;
48
48
  }
49
- async function T(n, r) {
50
- const s = await fetch(`${n}/${r}`);
49
+ async function S(e, t) {
50
+ const s = await fetch(`${e}/${t}`);
51
51
  if (!s.ok) {
52
52
  if (s.status === 404 || s.status === 403) return null;
53
53
  throw new Error(`CDN fetch failed: ${s.status}`);
54
54
  }
55
55
  return s.json();
56
56
  }
57
- function Z(n, r, s, ...t) {
57
+ function Z(e, t, s, ...r) {
58
58
  const a = ["leaderboards"];
59
- return n && a.push(`partners/${n}`), r && a.push(r), s && a.push(`v/${s}`), [...a, ...t].join("/");
59
+ return e && a.push(`partners/${e}`), t && a.push(t), s && a.push(`v/${s}`), [...a, ...r].join("/");
60
60
  }
61
- function Pe(n, r, s, t) {
62
- const a = t || "default";
63
- return n ? `laps/partners/${n}/${r}/${s}/${a}.json` : `laps/${r}/${s}/${a}.json`;
61
+ function Ee(e, t, s, r) {
62
+ const a = r || "default";
63
+ return e ? `laps/partners/${e}/${t}/${s}/${a}.json` : `laps/${t}/${s}/${a}.json`;
64
64
  }
65
- function Ae(n, r) {
66
- return n ? `laps/partners/${n}/${r}/index.json` : `laps/${r}/index.json`;
65
+ function Fe(e, t) {
66
+ return e ? `laps/partners/${e}/${t}/index.json` : `laps/${t}/index.json`;
67
67
  }
68
- function Ue(n) {
69
- return n ? `recent-laps/partners/${n}.json` : "recent-laps.json";
68
+ function _e(e) {
69
+ return e ? `recent-laps/partners/${e}.json` : "recent-laps.json";
70
70
  }
71
- function A(n) {
72
- if (!n && n !== 0) return "-";
73
- const r = Math.floor(n / 1e3), s = Math.floor(r / 60), t = r % 60, a = n % 1e3;
74
- return `${s}:${String(t).padStart(2, "0")}.${String(a).padStart(3, "0")}`;
71
+ function A(e) {
72
+ if (!e && e !== 0) return "-";
73
+ const t = Math.floor(e / 1e3), s = Math.floor(t / 60), r = t % 60, a = e % 1e3;
74
+ return `${s}:${String(r).padStart(2, "0")}.${String(a).padStart(3, "0")}`;
75
75
  }
76
- function B(n) {
77
- return !n && n !== 0 ? "-" : n >= 6e4 ? A(n) : (n / 1e3).toFixed(3);
76
+ function B(e) {
77
+ return !e && e !== 0 ? "-" : e >= 6e4 ? A(e) : (e / 1e3).toFixed(3);
78
78
  }
79
- function I(n) {
80
- if (!n) return "";
81
- let r = n;
82
- return r.startsWith("ks_") && (r = r.slice(3)), r.split("_").map((s) => s.charAt(0).toUpperCase() + s.slice(1)).join(" ");
79
+ function I(e) {
80
+ if (!e) return "";
81
+ let t = e;
82
+ return t.startsWith("ks_") && (t = t.slice(3)), t.split("_").map((s) => s.charAt(0).toUpperCase() + s.slice(1)).join(" ");
83
83
  }
84
- function q(n, r, s) {
85
- if (!n) return "";
86
- const t = n.split("_").map((o) => o.charAt(0).toUpperCase() + o.slice(1)).join(" "), a = s === "acc" || !s && (r == null ? void 0 : r.toLowerCase()) === "track config";
87
- if (!r || r === "default" || a) return t;
88
- const i = r.split("_").map((o) => o.charAt(0).toUpperCase() + o.slice(1)).join(" ");
89
- return `${t} ${i}`;
84
+ function q(e, t, s) {
85
+ if (!e) return "";
86
+ const r = e.split("_").map((o) => o.charAt(0).toUpperCase() + o.slice(1)).join(" "), a = s === "acc" || !s && (t == null ? void 0 : t.toLowerCase()) === "track config";
87
+ if (!t || t === "default" || a) return r;
88
+ const i = t.split("_").map((o) => o.charAt(0).toUpperCase() + o.slice(1)).join(" ");
89
+ return `${r} ${i}`;
90
90
  }
91
- function j(n) {
92
- if (!n) return "-";
91
+ function j(e) {
92
+ if (!e) return "-";
93
93
  try {
94
- return new Date(n).toLocaleDateString("en-GB", {
94
+ return new Date(e).toLocaleDateString("en-GB", {
95
95
  day: "numeric",
96
96
  month: "short",
97
97
  year: "numeric"
@@ -100,26 +100,26 @@ function j(n) {
100
100
  return "-";
101
101
  }
102
102
  }
103
- function oe(n) {
104
- if (!n) return "";
105
- const r = Date.now() - new Date(n).getTime(), s = Math.floor(r / 1e3);
103
+ function le(e) {
104
+ if (!e) return "";
105
+ const t = Date.now() - new Date(e).getTime(), s = Math.floor(t / 1e3);
106
106
  if (s < 60) return "Just now";
107
- const t = Math.floor(s / 60);
108
- if (t < 60) return `${t}m ago`;
109
- const a = Math.floor(t / 60);
107
+ const r = Math.floor(s / 60);
108
+ if (r < 60) return `${r}m ago`;
109
+ const a = Math.floor(r / 60);
110
110
  if (a < 24) return `${a}h ago`;
111
111
  const i = Math.floor(a / 24);
112
- return i < 30 ? `${i}d ago` : j(n);
112
+ return i < 30 ? `${i}d ago` : j(e);
113
113
  }
114
- function Vn(n) {
115
- return n == null ? "" : `${n >= 0 ? "+" : "-"}${(Math.abs(n) / 1e3).toFixed(3)}`;
114
+ function Gn(e) {
115
+ return e == null ? "" : `${e >= 0 ? "+" : "-"}${(Math.abs(e) / 1e3).toFixed(3)}`;
116
116
  }
117
- function Ee(n, r) {
118
- const { type: s, title: t, trackId: a, trackLayout: i, carId: o, game: d, data: h } = n, l = typeof h == "string" ? JSON.parse(h) : h, v = a ? q(a, i, d) : null, f = o ? I(o) : null, g = [v, f].filter(Boolean).join(" — ");
119
- return s === "RECORD_BEATEN" && g ? `${l != null && l.beatenBySteamId && r ? r(l.beatenBySteamId).displayName : "Someone"} beat your record on ${g}` : s === "RECORD_SET" && g ? `You set a new record on ${g}` : t || "New notification";
117
+ function qe(e, t) {
118
+ const { type: s, title: r, trackId: a, trackLayout: i, carId: o, game: d, data: v } = e, l = typeof v == "string" ? JSON.parse(v) : v, m = a ? q(a, i, d) : null, f = o ? I(o) : null, g = [m, f].filter(Boolean).join(" — ");
119
+ return s === "RECORD_BEATEN" && g ? `${l != null && l.beatenBySteamId && t ? t(l.beatenBySteamId).displayName : "Someone"} beat your record on ${g}` : s === "RECORD_SET" && g ? `You set a new record on ${g}` : r || "New notification";
120
120
  }
121
- function ce(n) {
122
- return n ? {
121
+ function de(e) {
122
+ return e ? {
123
123
  E: "Eco",
124
124
  RD: "Road",
125
125
  SC: "SuperCar",
@@ -130,20 +130,20 @@ function ce(n) {
130
130
  MR: "Medium Race",
131
131
  SR: "Soft Race",
132
132
  S: "Soft"
133
- }[n] || n : "Unknown";
133
+ }[e] || e : "Unknown";
134
134
  }
135
- function Kn(n = {}) {
136
- var h, l, v, f, g, p;
137
- const { cdnUrl: r, partnerSlug: s } = k(), { game: t, gameVersion: a } = n, i = Z(s, null, null, "index.json"), o = L({
135
+ function Qn(e = {}) {
136
+ var v, l, m, f, g, p;
137
+ const { cdnUrl: t, partnerSlug: s } = k(), { game: r, gameVersion: a } = e, i = Z(s, null, null, "index.json"), o = R({
138
138
  queryKey: ["pitvox", "leaderboards", s, "index"],
139
- queryFn: () => T(r, i),
139
+ queryFn: () => S(t, i),
140
140
  staleTime: 3e4,
141
141
  refetchInterval: 3e4
142
- }), d = w(() => {
142
+ }), d = L(() => {
143
143
  var x;
144
144
  if (!((x = o.data) != null && x.tracks)) return [];
145
145
  let b = o.data.tracks;
146
- return t && (b = b.filter((u) => u.game === t)), a && (b = b.filter((u) => u.gameVersion === a)), b.map((u) => ({
146
+ return r && (b = b.filter((u) => u.game === r)), a && (b = b.filter((u) => u.gameVersion === a)), b.map((u) => ({
147
147
  id: u.trackId,
148
148
  layout: u.layout,
149
149
  game: u.game,
@@ -160,58 +160,58 @@ function Kn(n = {}) {
160
160
  } : null,
161
161
  recordByTag: u.recordByTag || null
162
162
  }));
163
- }, [(h = o.data) == null ? void 0 : h.tracks, t, a]);
163
+ }, [(v = o.data) == null ? void 0 : v.tracks, r, a]);
164
164
  return {
165
165
  ...o,
166
166
  data: d,
167
167
  partner: ((l = o.data) == null ? void 0 : l.partner) || null,
168
- generatedAt: (v = o.data) == null ? void 0 : v.generatedAt,
168
+ generatedAt: (m = o.data) == null ? void 0 : m.generatedAt,
169
169
  totalLaps: ((f = o.data) == null ? void 0 : f.totalLaps) || 0,
170
170
  totalUsers: ((g = o.data) == null ? void 0 : g.totalUsers) || 0,
171
171
  versions: ((p = o.data) == null ? void 0 : p.versions) || {}
172
172
  };
173
173
  }
174
- function Fe(n, r, s = {}) {
175
- const { cdnUrl: t, partnerSlug: a } = k(), { carId: i, game: o, gameVersion: d } = s, h = r || "default", l = Z(a, o, d, `tracks/${n}/${h}.json`), { data: v, isLoading: f, error: g } = L({
176
- queryKey: ["pitvox", "leaderboards", a, "track", n, h, o, d],
177
- queryFn: () => T(t, l),
178
- enabled: !!n,
174
+ function je(e, t, s = {}) {
175
+ const { cdnUrl: r, partnerSlug: a } = k(), { carId: i, game: o, gameVersion: d } = s, v = t || "default", l = Z(a, o, d, `tracks/${e}/${v}.json`), { data: m, isLoading: f, error: g } = R({
176
+ queryKey: ["pitvox", "leaderboards", a, "track", e, v, o, d],
177
+ queryFn: () => S(r, l),
178
+ enabled: !!e,
179
179
  staleTime: 3e4,
180
180
  refetchInterval: 3e4
181
181
  });
182
- return { data: w(() => {
183
- if (!(v != null && v.entries)) return [];
184
- let b = v.entries;
182
+ return { data: L(() => {
183
+ if (!(m != null && m.entries)) return [];
184
+ let b = m.entries;
185
185
  if (o && (b = b.filter((x) => x.game === o)), !i) {
186
186
  const x = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
187
187
  for (const N of b) {
188
- const m = N.steamId || N.userId;
189
- u.has(N.carId) || u.set(N.carId, /* @__PURE__ */ new Set()), u.get(N.carId).add(m), (!x.has(N.carId) || N.lapTimeMs < x.get(N.carId).lapTimeMs) && x.set(N.carId, N);
188
+ const h = N.steamId || N.userId;
189
+ u.has(N.carId) || u.set(N.carId, /* @__PURE__ */ new Set()), u.get(N.carId).add(h), (!x.has(N.carId) || N.lapTimeMs < x.get(N.carId).lapTimeMs) && x.set(N.carId, N);
190
190
  }
191
191
  return Array.from(x.values()).map((N) => {
192
- var m;
193
- return { ...N, driverCount: ((m = u.get(N.carId)) == null ? void 0 : m.size) || 0 };
194
- }).sort((N, m) => N.lapTimeMs - m.lapTimeMs);
192
+ var h;
193
+ return { ...N, driverCount: ((h = u.get(N.carId)) == null ? void 0 : h.size) || 0 };
194
+ }).sort((N, h) => N.lapTimeMs - h.lapTimeMs);
195
195
  }
196
196
  return b.filter((x) => x.carId === i).sort((x, u) => x.lapTimeMs - u.lapTimeMs);
197
- }, [v == null ? void 0 : v.entries, i, o]), isLoading: f, error: g };
197
+ }, [m == null ? void 0 : m.entries, i, o]), isLoading: f, error: g };
198
198
  }
199
- function _e(n, r, s, t, a = {}) {
199
+ function Ve(e, t, s, r, a = {}) {
200
200
  var x, u;
201
- const { cdnUrl: i, partnerSlug: o } = k(), { showInvalid: d = !1, game: h, gameVersion: l } = a, v = n && r ? Pe(o, n, r, s) : null, g = L({
202
- queryKey: ["pitvox", "laps", o, n, r, s || "default"],
203
- queryFn: () => T(i, v),
204
- enabled: !!n && !!r,
201
+ const { cdnUrl: i, partnerSlug: o } = k(), { showInvalid: d = !1, game: v, gameVersion: l } = a, m = e && t ? Ee(o, e, t, s) : null, g = R({
202
+ queryKey: ["pitvox", "laps", o, e, t, s || "default"],
203
+ queryFn: () => S(i, m),
204
+ enabled: !!e && !!t,
205
205
  staleTime: 3e4,
206
206
  refetchInterval: 3e4
207
- }), p = w(() => {
207
+ }), p = L(() => {
208
208
  var N;
209
- return (N = g.data) != null && N.laps ? g.data.laps.filter((m) => !(m.carId !== t || h && m.game !== h || l && m.gameVersion !== l || !d && !m.isValid)).sort((m, y) => m.lapTimeMs - y.lapTimeMs) : [];
210
- }, [(x = g.data) == null ? void 0 : x.laps, t, h, l, d]), b = w(() => {
211
- const N = p.filter((S) => S.isValid && S.sector1Ms && S.sector2Ms && S.sector3Ms);
209
+ return (N = g.data) != null && N.laps ? g.data.laps.filter((h) => !(h.carId !== r || v && h.game !== v || l && h.gameVersion !== l || !d && !h.isValid)).sort((h, y) => h.lapTimeMs - y.lapTimeMs) : [];
210
+ }, [(x = g.data) == null ? void 0 : x.laps, r, v, l, d]), b = L(() => {
211
+ const N = p.filter(($) => $.isValid && $.sector1Ms && $.sector2Ms && $.sector3Ms);
212
212
  if (N.length < 2) return null;
213
- const m = Math.min(...N.map((S) => S.sector1Ms)), y = Math.min(...N.map((S) => S.sector2Ms)), C = Math.min(...N.map((S) => S.sector3Ms)), M = m + y + C, R = Math.min(...N.map((S) => S.lapTimeMs));
214
- return M >= R ? null : { lapTimeMs: M, sector1Ms: m, sector2Ms: y, sector3Ms: C };
213
+ const h = Math.min(...N.map(($) => $.sector1Ms)), y = Math.min(...N.map(($) => $.sector2Ms)), C = Math.min(...N.map(($) => $.sector3Ms)), w = h + y + C, T = Math.min(...N.map(($) => $.lapTimeMs));
214
+ return w >= T ? null : { lapTimeMs: w, sector1Ms: h, sector2Ms: y, sector3Ms: C };
215
215
  }, [p]);
216
216
  return {
217
217
  ...g,
@@ -220,192 +220,192 @@ function _e(n, r, s, t, a = {}) {
220
220
  theoreticalBest: b
221
221
  };
222
222
  }
223
- function le() {
224
- const { cdnUrl: n } = k(), { data: r } = L({
223
+ function pe() {
224
+ const { cdnUrl: e } = k(), { data: t } = R({
225
225
  queryKey: ["pitvox", "users", "index"],
226
- queryFn: () => T(n, "users/index.json"),
226
+ queryFn: () => S(e, "users/index.json"),
227
227
  staleTime: 5 * 6e4,
228
228
  gcTime: 30 * 6e4
229
- }), s = (r == null ? void 0 : r.users) || {};
230
- return (t, a) => {
231
- const i = s[t];
229
+ }), s = (t == null ? void 0 : t.users) || {};
230
+ return (r, a) => {
231
+ const i = s[r];
232
232
  return {
233
- displayName: (i == null ? void 0 : i.displayName) || a || t || "Unknown",
233
+ displayName: (i == null ? void 0 : i.displayName) || a || r || "Unknown",
234
234
  avatarUrl: (i == null ? void 0 : i.avatarUrl) || null,
235
235
  affiliations: (i == null ? void 0 : i.affiliations) || []
236
236
  };
237
237
  };
238
238
  }
239
- function Hn() {
240
- const { cdnUrl: n } = k(), { data: r } = L({
239
+ function Yn() {
240
+ const { cdnUrl: e } = k(), { data: t } = R({
241
241
  queryKey: ["pitvox", "cars", "evo"],
242
- queryFn: () => T(n, "cars/evo.json"),
242
+ queryFn: () => S(e, "cars/evo.json"),
243
243
  staleTime: 5 * 6e4,
244
244
  gcTime: 30 * 6e4
245
245
  });
246
246
  return {
247
- tags: (r == null ? void 0 : r.tags) || [],
248
- cars: (r == null ? void 0 : r.cars) || {}
247
+ tags: (t == null ? void 0 : t.tags) || [],
248
+ cars: (t == null ? void 0 : t.cars) || {}
249
249
  };
250
250
  }
251
- function Wn() {
251
+ function Jn() {
252
252
  var a, i;
253
- const { cdnUrl: n, partnerSlug: r } = k(), s = Ue(r), t = L({
254
- queryKey: ["pitvox", "recentLaps", r],
255
- queryFn: () => T(n, s),
253
+ const { cdnUrl: e, partnerSlug: t } = k(), s = _e(t), r = R({
254
+ queryKey: ["pitvox", "recentLaps", t],
255
+ queryFn: () => S(e, s),
256
256
  staleTime: 3e4,
257
257
  refetchInterval: 3e4,
258
258
  gcTime: 10 * 6e4
259
259
  });
260
260
  return {
261
- groups: ((a = t.data) == null ? void 0 : a.groups) || [],
262
- generatedAt: ((i = t.data) == null ? void 0 : i.generatedAt) || null,
263
- isLoading: t.isLoading
261
+ groups: ((a = r.data) == null ? void 0 : a.groups) || [],
262
+ generatedAt: ((i = r.data) == null ? void 0 : i.generatedAt) || null,
263
+ isLoading: r.isLoading
264
264
  };
265
265
  }
266
- function On(n, r) {
267
- return Fe(n, null, { carId: r });
266
+ function Zn(e, t) {
267
+ return je(e, null, { carId: t });
268
268
  }
269
- function zn() {
270
- const { cdnUrl: n, partnerSlug: r } = k();
271
- return L({
272
- queryKey: ["pitvox", "competitions", r],
269
+ function Xn() {
270
+ const { cdnUrl: e, partnerSlug: t } = k();
271
+ return R({
272
+ queryKey: ["pitvox", "competitions", t],
273
273
  queryFn: async () => {
274
- const s = await T(n, "competitions/index.json");
275
- return s != null && s.competitions ? r ? s.competitions.filter((t) => t.partnerSlug === r) : s.competitions : [];
274
+ const s = await S(e, "competitions/index.json");
275
+ return s != null && s.competitions ? t ? s.competitions.filter((r) => r.partnerSlug === t) : s.competitions : [];
276
276
  },
277
277
  staleTime: 6e4
278
278
  });
279
279
  }
280
- function de(n, r = {}) {
281
- const s = k(), t = r.partnerSlug || s.partnerSlug;
282
- return L({
283
- queryKey: ["pitvox", "competition", t, n, "config"],
284
- queryFn: () => T(s.cdnUrl, `competitions/${t}/${n}/config.json`),
285
- enabled: !!t && !!n,
280
+ function ue(e, t = {}) {
281
+ const s = k(), r = t.partnerSlug || s.partnerSlug;
282
+ return R({
283
+ queryKey: ["pitvox", "competition", r, e, "config"],
284
+ queryFn: () => S(s.cdnUrl, `competitions/${r}/${e}/config.json`),
285
+ enabled: !!r && !!e,
286
286
  staleTime: 6e4
287
287
  });
288
288
  }
289
- function qe(n, r = {}) {
290
- const s = k(), t = r.partnerSlug || s.partnerSlug;
291
- return L({
292
- queryKey: ["pitvox", "competition", t, n, "standings"],
293
- queryFn: () => T(s.cdnUrl, `competitions/${t}/${n}/standings.json`),
294
- enabled: !!t && !!n,
289
+ function me(e, t = {}) {
290
+ const s = k(), r = t.partnerSlug || s.partnerSlug;
291
+ return R({
292
+ queryKey: ["pitvox", "competition", r, e, "standings"],
293
+ queryFn: () => S(s.cdnUrl, `competitions/${r}/${e}/standings.json`),
294
+ enabled: !!r && !!e,
295
295
  staleTime: 6e4
296
296
  });
297
297
  }
298
- function je(n, r, s = {}) {
299
- const t = k(), a = s.partnerSlug || t.partnerSlug;
300
- return L({
301
- queryKey: ["pitvox", "competition", a, n, "round", r],
302
- queryFn: () => T(t.cdnUrl, `competitions/${a}/${n}/rounds/${r}.json`),
303
- enabled: !!a && !!n && r != null,
298
+ function Ke(e, t, s = {}) {
299
+ const r = k(), a = s.partnerSlug || r.partnerSlug;
300
+ return R({
301
+ queryKey: ["pitvox", "competition", a, e, "round", t],
302
+ queryFn: () => S(r.cdnUrl, `competitions/${a}/${e}/rounds/${t}.json`),
303
+ enabled: !!a && !!e && t != null,
304
304
  staleTime: 6e4
305
305
  });
306
306
  }
307
- function Ve(n, r = [], s = {}) {
308
- const t = k(), a = s.partnerSlug || t.partnerSlug;
309
- return L({
310
- queryKey: ["pitvox", "competition", a, n, "allRounds", r],
307
+ function He(e, t = [], s = {}) {
308
+ const r = k(), a = s.partnerSlug || r.partnerSlug;
309
+ return R({
310
+ queryKey: ["pitvox", "competition", a, e, "allRounds", t],
311
311
  queryFn: async () => (await Promise.all(
312
- r.map(
313
- (o) => T(t.cdnUrl, `competitions/${a}/${n}/rounds/${o}.json`).catch(() => null)
312
+ t.map(
313
+ (o) => S(r.cdnUrl, `competitions/${a}/${e}/rounds/${o}.json`).catch(() => null)
314
314
  )
315
315
  )).filter(Boolean),
316
- enabled: !!a && !!n && r.length > 0,
316
+ enabled: !!a && !!e && t.length > 0,
317
317
  staleTime: 6e4
318
318
  });
319
319
  }
320
- function pe(n, r = {}) {
321
- const s = k(), t = r.partnerSlug || s.partnerSlug;
322
- return L({
323
- queryKey: ["pitvox", "competition", t, n, "entrylist"],
324
- queryFn: () => T(s.cdnUrl, `competitions/${t}/${n}/entrylist.json`),
325
- enabled: !!t && !!n,
320
+ function ve(e, t = {}) {
321
+ const s = k(), r = t.partnerSlug || s.partnerSlug;
322
+ return R({
323
+ queryKey: ["pitvox", "competition", r, e, "entrylist"],
324
+ queryFn: () => S(s.cdnUrl, `competitions/${r}/${e}/entrylist.json`),
325
+ enabled: !!r && !!e,
326
326
  staleTime: 6e4
327
327
  });
328
328
  }
329
- function X(n) {
330
- const { cdnUrl: r, partnerSlug: s, getSteamId: t } = k(), a = t();
331
- return L({
332
- queryKey: ["pitvox", "registration", s, n, a],
329
+ function X(e) {
330
+ const { cdnUrl: t, partnerSlug: s, getSteamId: r } = k(), a = r();
331
+ return R({
332
+ queryKey: ["pitvox", "registration", s, e, a],
333
333
  queryFn: async () => {
334
- var h;
335
- const i = await fetch(`${r}/competitions/${s}/${n}/entrylist.json`);
334
+ var v;
335
+ const i = await fetch(`${t}/competitions/${s}/${e}/entrylist.json`);
336
336
  if (!i.ok) return { isRegistered: !1, entryList: null };
337
337
  const o = await i.json();
338
- return { isRegistered: !!a && ((h = o.drivers) == null ? void 0 : h.some((l) => l.steamId === a)), entryList: o };
338
+ return { isRegistered: !!a && ((v = o.drivers) == null ? void 0 : v.some((l) => l.steamId === a)), entryList: o };
339
339
  },
340
- enabled: !!n,
340
+ enabled: !!e,
341
341
  staleTime: 6e4
342
342
  });
343
343
  }
344
- function ue(n) {
345
- const { onRegister: r, partnerSlug: s, getSteamId: t } = k(), a = _(), i = le();
346
- return W({
344
+ function he(e) {
345
+ const { onRegister: t, partnerSlug: s, getSteamId: r } = k(), a = _(), i = pe();
346
+ return O({
347
347
  mutationFn: (o) => {
348
- if (!r)
348
+ if (!t)
349
349
  throw new Error(
350
350
  "No onRegister callback provided to PitVoxPartnerProvider. Provide onRegister for in-app registration, or use useRegistrationUrl() to link to pitvox.com."
351
351
  );
352
- return r(n, o);
352
+ return t(e, o);
353
353
  },
354
354
  onSuccess: () => {
355
- const o = t();
355
+ const o = r();
356
356
  if (a.setQueriesData(
357
- { queryKey: ["pitvox", "registration", s, n] },
357
+ { queryKey: ["pitvox", "registration", s, e] },
358
358
  (d) => d ? { ...d, isRegistered: !0 } : { isRegistered: !0, entryList: null }
359
359
  ), o) {
360
- const d = i(o), h = {
360
+ const d = i(o), v = {
361
361
  steamId: o,
362
362
  displayName: d.displayName,
363
363
  avatarUrl: d.avatarUrl
364
364
  };
365
365
  a.setQueriesData(
366
- { queryKey: ["pitvox", "competition", s, n, "entrylist"] },
366
+ { queryKey: ["pitvox", "competition", s, e, "entrylist"] },
367
367
  (l) => {
368
368
  var f;
369
- return l ? ((f = l.drivers) == null ? void 0 : f.some((g) => g.steamId === o)) ? l : { ...l, drivers: [...l.drivers || [], h] } : { drivers: [h] };
369
+ return l ? ((f = l.drivers) == null ? void 0 : f.some((g) => g.steamId === o)) ? l : { ...l, drivers: [...l.drivers || [], v] } : { drivers: [v] };
370
370
  }
371
371
  );
372
372
  }
373
373
  }
374
374
  });
375
375
  }
376
- function me(n) {
377
- const { onWithdraw: r, partnerSlug: s, getSteamId: t } = k(), a = _();
378
- return W({
376
+ function xe(e) {
377
+ const { onWithdraw: t, partnerSlug: s, getSteamId: r } = k(), a = _();
378
+ return O({
379
379
  mutationFn: (i) => {
380
- if (!r)
380
+ if (!t)
381
381
  throw new Error(
382
382
  "No onWithdraw callback provided to PitVoxPartnerProvider. Provide onWithdraw for in-app withdrawal, or use useRegistrationUrl() to link to pitvox.com."
383
383
  );
384
- const o = i || t();
384
+ const o = i || r();
385
385
  if (!o) throw new Error("No Steam ID available");
386
- return r(n, o);
386
+ return t(e, o);
387
387
  },
388
388
  onSuccess: () => {
389
- const i = t();
389
+ const i = r();
390
390
  a.setQueriesData(
391
- { queryKey: ["pitvox", "registration", s, n] },
391
+ { queryKey: ["pitvox", "registration", s, e] },
392
392
  (o) => o ? { ...o, isRegistered: !1 } : { isRegistered: !1, entryList: null }
393
393
  ), i && a.setQueriesData(
394
- { queryKey: ["pitvox", "competition", s, n, "entrylist"] },
394
+ { queryKey: ["pitvox", "competition", s, e, "entrylist"] },
395
395
  (o) => o != null && o.drivers ? { ...o, drivers: o.drivers.filter((d) => d.steamId !== i) } : o
396
396
  );
397
397
  }
398
398
  });
399
399
  }
400
400
  function ee() {
401
- const { onRegister: n, onWithdraw: r } = k(), s = !!(n && r);
401
+ const { onRegister: e, onWithdraw: t } = k(), s = !!(e && t);
402
402
  return { isPowerMode: s, isBasicMode: !s };
403
403
  }
404
- function ne(n) {
405
- const { pitvoxUrl: r, partnerSlug: s } = k();
406
- return `${r}/p/${s}/competitions/${n}/register`;
404
+ function ne(e) {
405
+ const { pitvoxUrl: t, partnerSlug: s } = k();
406
+ return `${t}/p/${s}/competitions/${e}/register`;
407
407
  }
408
- const Ke = {
408
+ const Oe = {
409
409
  formula: "Formula",
410
410
  gt3: "GT3",
411
411
  gt2: "GT2",
@@ -425,156 +425,156 @@ const Ke = {
425
425
  "2000s": "2000s",
426
426
  "2010s": "2010s",
427
427
  "2020s": "2020s"
428
- }, ve = [
428
+ }, ge = [
429
429
  { id: "class", tags: ["formula", "gt3", "gt2", "gt4", "cup", "prototype", "rally"] },
430
430
  { id: "tier", tags: ["hypercar", "supercar", "sports_car", "hot_hatch", "lightweight"] },
431
431
  { id: "era", tags: ["1960s", "1970s", "1980s", "1990s", "2000s", "2010s", "2020s"] }
432
432
  ];
433
- function He(n) {
434
- for (const r of ve)
435
- if (r.tags.includes(n)) return r.id;
433
+ function We(e) {
434
+ for (const t of ge)
435
+ if (t.tags.includes(e)) return t.id;
436
436
  return "other";
437
437
  }
438
- function he(n, r) {
439
- if (r.size === 0) return !0;
438
+ function fe(e, t) {
439
+ if (t.size === 0) return !0;
440
440
  const s = {};
441
- for (const t of r) {
442
- const a = He(t);
443
- s[a] || (s[a] = []), s[a].push(t);
441
+ for (const r of t) {
442
+ const a = We(r);
443
+ s[a] || (s[a] = []), s[a].push(r);
444
444
  }
445
- for (const t of Object.values(s))
446
- if (!t.some((a) => n.includes(a))) return !1;
445
+ for (const r of Object.values(s))
446
+ if (!r.some((a) => e.includes(a))) return !1;
447
447
  return !0;
448
448
  }
449
- function xe(n, r) {
450
- const [s, t] = D(/* @__PURE__ */ new Set()), a = n !== void 0, i = a ? n : s, o = H((h) => {
449
+ function Ne(e, t) {
450
+ const [s, r] = D(/* @__PURE__ */ new Set()), a = e !== void 0, i = a ? e : s, o = H((v) => {
451
451
  const l = new Set(i);
452
- l.has(h) ? l.delete(h) : l.add(h), a && r ? r(l) : t(l);
453
- }, [i, a, r]), d = H(() => {
454
- a && r ? r(/* @__PURE__ */ new Set()) : t(/* @__PURE__ */ new Set());
455
- }, [a, r]);
452
+ l.has(v) ? l.delete(v) : l.add(v), a && t ? t(l) : r(l);
453
+ }, [i, a, t]), d = H(() => {
454
+ a && t ? t(/* @__PURE__ */ new Set()) : r(/* @__PURE__ */ new Set());
455
+ }, [a, t]);
456
456
  return { activeTags: i, toggle: o, clear: d };
457
457
  }
458
- function O(n) {
459
- const [r, s] = D(n), t = H((a) => {
458
+ function W(e) {
459
+ const [t, s] = D(e), r = H((a) => {
460
460
  s(
461
461
  (i) => i.key === a ? { key: a, dir: i.dir === "asc" ? "desc" : "asc" } : { key: a, dir: a.includes("timestamp") || a.includes("Date") ? "desc" : "asc" }
462
462
  );
463
463
  }, []);
464
- return [r, t];
464
+ return [t, r];
465
465
  }
466
- function z(n, r, s) {
467
- return [...n].sort((t, a) => {
468
- const i = s(t, r.key), o = s(a, r.key);
466
+ function z(e, t, s) {
467
+ return [...e].sort((r, a) => {
468
+ const i = s(r, t.key), o = s(a, t.key);
469
469
  if (i == null && o == null) return 0;
470
470
  if (i == null) return 1;
471
471
  if (o == null) return -1;
472
472
  const d = typeof i == "string" ? i.localeCompare(o) : i - o;
473
- return r.dir === "desc" ? -d : d;
473
+ return t.dir === "desc" ? -d : d;
474
474
  });
475
475
  }
476
- function ge(n, r = !1) {
477
- const s = r ? n == null ? void 0 : n.filter((t) => t.isValid) : n;
476
+ function be(e, t = !1) {
477
+ const s = t ? e == null ? void 0 : e.filter((r) => r.isValid) : e;
478
478
  return s != null && s.length ? {
479
- s1: Math.min(...s.map((t) => t.sector1Ms).filter(Boolean)),
480
- s2: Math.min(...s.map((t) => t.sector2Ms).filter(Boolean)),
481
- s3: Math.min(...s.map((t) => t.sector3Ms).filter(Boolean))
479
+ s1: Math.min(...s.map((r) => r.sector1Ms).filter(Boolean)),
480
+ s2: Math.min(...s.map((r) => r.sector2Ms).filter(Boolean)),
481
+ s3: Math.min(...s.map((r) => r.sector3Ms).filter(Boolean))
482
482
  } : null;
483
483
  }
484
- function We({ active: n, dir: r }) {
485
- return n ? r === "asc" ? /* @__PURE__ */ e("svg", { className: "pvx-sort-icon", fill: "none", viewBox: "0 0 24 24", strokeWidth: 2, stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) }) : /* @__PURE__ */ e("svg", { className: "pvx-sort-icon", fill: "none", viewBox: "0 0 24 24", strokeWidth: 2, stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) }) : /* @__PURE__ */ e("svg", { className: "pvx-sort-icon pvx-sort-icon--inactive", fill: "none", viewBox: "0 0 24 24", strokeWidth: 2, stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 9l4-4 4 4M16 15l-4 4-4-4" }) });
484
+ function ze({ active: e, dir: t }) {
485
+ return e ? t === "asc" ? /* @__PURE__ */ n("svg", { className: "pvx-sort-icon", fill: "none", viewBox: "0 0 24 24", strokeWidth: 2, stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) }) : /* @__PURE__ */ n("svg", { className: "pvx-sort-icon", fill: "none", viewBox: "0 0 24 24", strokeWidth: 2, stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) }) : /* @__PURE__ */ n("svg", { className: "pvx-sort-icon pvx-sort-icon--inactive", fill: "none", viewBox: "0 0 24 24", strokeWidth: 2, stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 9l4-4 4 4M16 15l-4 4-4-4" }) });
486
486
  }
487
- function $({ label: n, sortKey: r, config: s, onSort: t, className: a = "" }) {
488
- return /* @__PURE__ */ e(
487
+ function M({ label: e, sortKey: t, config: s, onSort: r, className: a = "" }) {
488
+ return /* @__PURE__ */ n(
489
489
  "th",
490
490
  {
491
491
  className: `pvx-th pvx-th--sortable ${a}`,
492
- onClick: () => t(r),
492
+ onClick: () => r(t),
493
493
  children: /* @__PURE__ */ c("span", { className: "pvx-th-inner", children: [
494
- n,
495
- /* @__PURE__ */ e(We, { active: s.key === r, dir: s.dir })
494
+ e,
495
+ /* @__PURE__ */ n(ze, { active: s.key === t, dir: s.dir })
496
496
  ] })
497
497
  }
498
498
  );
499
499
  }
500
- function G({ userId: n, getUserDisplay: r }) {
501
- const { displayName: s, avatarUrl: t } = r(n);
500
+ function G({ userId: e, getUserDisplay: t }) {
501
+ const { displayName: s, avatarUrl: r } = t(e);
502
502
  return /* @__PURE__ */ c("span", { className: "pvx-driver", children: [
503
- t ? /* @__PURE__ */ e("img", { src: t, alt: "", className: "pvx-driver-avatar" }) : /* @__PURE__ */ e("span", { className: "pvx-driver-avatar pvx-driver-avatar--placeholder" }),
504
- /* @__PURE__ */ e("span", { className: "pvx-driver-name", children: s })
503
+ r ? /* @__PURE__ */ n("img", { src: r, alt: "", className: "pvx-driver-avatar" }) : /* @__PURE__ */ n("span", { className: "pvx-driver-avatar pvx-driver-avatar--placeholder" }),
504
+ /* @__PURE__ */ n("span", { className: "pvx-driver-name", children: s })
505
505
  ] });
506
506
  }
507
- function re({ rank: n, podium: r = !1 }) {
508
- return /* @__PURE__ */ e("span", { className: r ? n === 1 ? "pvx-rank pvx-rank--gold" : n === 2 ? "pvx-rank pvx-rank--silver" : n === 3 ? "pvx-rank pvx-rank--bronze" : "pvx-rank" : "pvx-rank", children: n });
507
+ function te({ rank: e, podium: t = !1 }) {
508
+ return /* @__PURE__ */ n("span", { className: t ? e === 1 ? "pvx-rank pvx-rank--gold" : e === 2 ? "pvx-rank pvx-rank--silver" : e === 3 ? "pvx-rank pvx-rank--bronze" : "pvx-rank" : "pvx-rank", children: e });
509
509
  }
510
- function fe({ availableTags: n, activeTags: r, onToggle: s, onClear: t }) {
511
- if (!n || n.length < 2) return null;
512
- const a = ve.map((i) => ({ id: i.id, tags: i.tags.filter((o) => n.includes(o)) })).filter((i) => i.tags.length > 0);
510
+ function ye({ availableTags: e, activeTags: t, onToggle: s, onClear: r }) {
511
+ if (!e || e.length < 2) return null;
512
+ const a = ge.map((i) => ({ id: i.id, tags: i.tags.filter((o) => e.includes(o)) })).filter((i) => i.tags.length > 0);
513
513
  return /* @__PURE__ */ c("div", { className: "pvx-tag-bar", children: [
514
- /* @__PURE__ */ e(
514
+ /* @__PURE__ */ n(
515
515
  "button",
516
516
  {
517
- onClick: t,
518
- className: `pvx-tag ${r.size === 0 ? "pvx-tag--active" : ""}`,
517
+ onClick: r,
518
+ className: `pvx-tag ${t.size === 0 ? "pvx-tag--active" : ""}`,
519
519
  children: "All"
520
520
  }
521
521
  ),
522
522
  a.map((i, o) => /* @__PURE__ */ c("span", { className: "contents", children: [
523
- o > 0 && /* @__PURE__ */ e("span", { className: "pvx-tag-separator" }),
524
- i.tags.map((d) => /* @__PURE__ */ e(
523
+ o > 0 && /* @__PURE__ */ n("span", { className: "pvx-tag-separator" }),
524
+ i.tags.map((d) => /* @__PURE__ */ n(
525
525
  "button",
526
526
  {
527
527
  onClick: () => s(d),
528
- className: `pvx-tag ${r.has(d) ? "pvx-tag--active" : ""}`,
529
- children: Ke[d] || d
528
+ className: `pvx-tag ${t.has(d) ? "pvx-tag--active" : ""}`,
529
+ children: Oe[d] || d
530
530
  },
531
531
  d
532
532
  ))
533
533
  ] }, i.id))
534
534
  ] });
535
535
  }
536
- function te({ segments: n }) {
537
- return /* @__PURE__ */ e("nav", { className: "pvx-breadcrumb", "aria-label": "Breadcrumb", children: /* @__PURE__ */ e("ol", { className: "pvx-breadcrumb-list", children: n.map((r, s) => {
538
- const t = s === n.length - 1;
536
+ function re({ segments: e }) {
537
+ return /* @__PURE__ */ n("nav", { className: "pvx-breadcrumb", "aria-label": "Breadcrumb", children: /* @__PURE__ */ n("ol", { className: "pvx-breadcrumb-list", children: e.map((t, s) => {
538
+ const r = s === e.length - 1;
539
539
  return /* @__PURE__ */ c("li", { className: "pvx-breadcrumb-item", children: [
540
- s > 0 && /* @__PURE__ */ e("svg", { className: "pvx-breadcrumb-chevron", fill: "none", viewBox: "0 0 24 24", strokeWidth: 2, stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" }) }),
541
- !t && r.onClick ? /* @__PURE__ */ e("button", { onClick: r.onClick, className: "pvx-breadcrumb-link", children: r.label }) : /* @__PURE__ */ e("span", { className: "pvx-breadcrumb-current", children: r.label })
542
- ] }, r.key);
540
+ s > 0 && /* @__PURE__ */ n("svg", { className: "pvx-breadcrumb-chevron", fill: "none", viewBox: "0 0 24 24", strokeWidth: 2, stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" }) }),
541
+ !r && t.onClick ? /* @__PURE__ */ n("button", { onClick: t.onClick, className: "pvx-breadcrumb-link", children: t.label }) : /* @__PURE__ */ n("span", { className: "pvx-breadcrumb-current", children: t.label })
542
+ ] }, t.key);
543
543
  }) }) });
544
544
  }
545
- function V({ message: n }) {
545
+ function V({ message: e }) {
546
546
  return /* @__PURE__ */ c("div", { className: "pvx-empty", children: [
547
- /* @__PURE__ */ e("svg", { className: "pvx-empty-icon", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M16.5 18.75h-9m9 0a3 3 0 013 3h-15a3 3 0 013-3m9 0v-4.5A3.375 3.375 0 0013.125 10.875h-2.25A3.375 3.375 0 007.5 14.25v4.5" }) }),
548
- /* @__PURE__ */ e("p", { children: n })
547
+ /* @__PURE__ */ n("svg", { className: "pvx-empty-icon", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M16.5 18.75h-9m9 0a3 3 0 013 3h-15a3 3 0 013-3m9 0v-4.5A3.375 3.375 0 0013.125 10.875h-2.25A3.375 3.375 0 007.5 14.25v4.5" }) }),
548
+ /* @__PURE__ */ n("p", { children: e })
549
549
  ] });
550
550
  }
551
551
  function K() {
552
- return /* @__PURE__ */ e("div", { className: "pvx-loading", children: "Loading..." });
552
+ return /* @__PURE__ */ n("div", { className: "pvx-loading", children: "Loading..." });
553
553
  }
554
- function Oe() {
555
- return /* @__PURE__ */ e("svg", { className: "pvx-icon pvx-icon--valid", fill: "none", viewBox: "0 0 24 24", strokeWidth: 2, stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 12.75l6 6 9-13.5" }) });
554
+ function Ge() {
555
+ return /* @__PURE__ */ n("svg", { className: "pvx-icon pvx-icon--valid", fill: "none", viewBox: "0 0 24 24", strokeWidth: 2, stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 12.75l6 6 9-13.5" }) });
556
556
  }
557
- function ze() {
558
- return /* @__PURE__ */ e("svg", { className: "pvx-icon pvx-icon--invalid", fill: "none", viewBox: "0 0 24 24", strokeWidth: 2, stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) });
557
+ function Qe() {
558
+ return /* @__PURE__ */ n("svg", { className: "pvx-icon pvx-icon--invalid", fill: "none", viewBox: "0 0 24 24", strokeWidth: 2, stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) });
559
559
  }
560
- function Gn({ tracks: n, isLoading: r, carMetadata: s, getUserDisplay: t, onTrackSelect: a, tags: i, onTagChange: o }) {
561
- const [d, h] = O({ key: "record.timestamp", dir: "desc" }), { activeTags: l, toggle: v, clear: f } = xe(i, o), g = w(() => {
560
+ function et({ tracks: e, isLoading: t, carMetadata: s, getUserDisplay: r, onTrackSelect: a, tags: i, onTagChange: o }) {
561
+ const [d, v] = W({ key: "record.timestamp", dir: "desc" }), { activeTags: l, toggle: m, clear: f } = Ne(i, o), g = L(() => {
562
562
  var u;
563
563
  if (!((u = s == null ? void 0 : s.tags) != null && u.length)) return [];
564
564
  const x = /* @__PURE__ */ new Set();
565
- for (const N of n || [])
566
- N.recordByTag && Object.keys(N.recordByTag).forEach((m) => x.add(m));
565
+ for (const N of e || [])
566
+ N.recordByTag && Object.keys(N.recordByTag).forEach((h) => x.add(h));
567
567
  return s.tags.filter((N) => x.has(N));
568
- }, [n, s]), p = w(() => n ? l.size === 0 ? n : n.map((x) => {
569
- var m, y;
568
+ }, [e, s]), p = L(() => e ? l.size === 0 ? e : e.map((x) => {
569
+ var h, y;
570
570
  if (!x.recordByTag) return null;
571
571
  let u = null;
572
572
  const N = /* @__PURE__ */ new Set();
573
573
  for (const C of Object.values(x.recordByTag)) {
574
574
  if (N.has(C.carId)) continue;
575
575
  N.add(C.carId);
576
- const M = ((y = (m = s == null ? void 0 : s.cars) == null ? void 0 : m[C.carId]) == null ? void 0 : y.tags) || ["sports_car"];
577
- he(M, l) && (!u || C.lapTimeMs < u.lapTimeMs) && (u = C);
576
+ const w = ((y = (h = s == null ? void 0 : s.cars) == null ? void 0 : h[C.carId]) == null ? void 0 : y.tags) || ["sports_car"];
577
+ fe(w, l) && (!u || C.lapTimeMs < u.lapTimeMs) && (u = C);
578
578
  }
579
579
  return u ? {
580
580
  ...x,
@@ -586,8 +586,8 @@ function Gn({ tracks: n, isLoading: r, carMetadata: s, getUserDisplay: t, onTrac
586
586
  timestamp: u.recordedAt
587
587
  }
588
588
  } : null;
589
- }).filter(Boolean) : [], [n, l, s]), b = w(() => z(p, d, (x, u) => {
590
- var N, m;
589
+ }).filter(Boolean) : [], [e, l, s]), b = L(() => z(p, d, (x, u) => {
590
+ var N, h;
591
591
  switch (u) {
592
592
  case "displayName":
593
593
  return x.displayName;
@@ -599,104 +599,104 @@ function Gn({ tracks: n, isLoading: r, carMetadata: s, getUserDisplay: t, onTrac
599
599
  return x.carCount || 0;
600
600
  case "record.timestamp":
601
601
  default:
602
- return (m = x.record) != null && m.timestamp ? new Date(x.record.timestamp).getTime() : 0;
602
+ return (h = x.record) != null && h.timestamp ? new Date(x.record.timestamp).getTime() : 0;
603
603
  }
604
604
  }), [p, d]);
605
- return r ? /* @__PURE__ */ e(K, {}) : n != null && n.length ? /* @__PURE__ */ c("div", { className: "pvx-card", children: [
606
- /* @__PURE__ */ e("div", { className: "pvx-card-header", children: /* @__PURE__ */ e("h2", { className: "pvx-card-title", children: "Track Records" }) }),
607
- /* @__PURE__ */ e(fe, { availableTags: g, activeTags: l, onToggle: v, onClear: f }),
608
- /* @__PURE__ */ e("div", { className: "pvx-table-scroll", children: /* @__PURE__ */ c("table", { className: "pvx-table", children: [
609
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ c("tr", { className: "pvx-thead-row", children: [
610
- /* @__PURE__ */ e($, { label: "Track", sortKey: "displayName", config: d, onSort: h }),
611
- /* @__PURE__ */ e("th", { className: "pvx-th", children: "Record Holder" }),
612
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-lg", children: "Car" }),
613
- /* @__PURE__ */ e($, { label: "Lap Time", sortKey: "record.lapTimeMs", config: d, onSort: h }),
614
- /* @__PURE__ */ e($, { label: "Drivers", sortKey: "driverCount", config: d, onSort: h, className: "pvx-hidden-below-md" }),
615
- /* @__PURE__ */ e($, { label: "Cars", sortKey: "carCount", config: d, onSort: h, className: "pvx-hidden-below-lg" }),
616
- /* @__PURE__ */ e($, { label: "Date", sortKey: "record.timestamp", config: d, onSort: h, className: "pvx-hidden-below-xl" })
605
+ return t ? /* @__PURE__ */ n(K, {}) : e != null && e.length ? /* @__PURE__ */ c("div", { className: "pvx-card", children: [
606
+ /* @__PURE__ */ n("div", { className: "pvx-card-header", children: /* @__PURE__ */ n("h2", { className: "pvx-card-title", children: "Track Records" }) }),
607
+ /* @__PURE__ */ n(ye, { availableTags: g, activeTags: l, onToggle: m, onClear: f }),
608
+ /* @__PURE__ */ n("div", { className: "pvx-table-scroll", children: /* @__PURE__ */ c("table", { className: "pvx-table", children: [
609
+ /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ c("tr", { className: "pvx-thead-row", children: [
610
+ /* @__PURE__ */ n(M, { label: "Track", sortKey: "displayName", config: d, onSort: v }),
611
+ /* @__PURE__ */ n("th", { className: "pvx-th", children: "Record Holder" }),
612
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-lg", children: "Car" }),
613
+ /* @__PURE__ */ n(M, { label: "Lap Time", sortKey: "record.lapTimeMs", config: d, onSort: v }),
614
+ /* @__PURE__ */ n(M, { label: "Drivers", sortKey: "driverCount", config: d, onSort: v, className: "pvx-hidden-below-md" }),
615
+ /* @__PURE__ */ n(M, { label: "Cars", sortKey: "carCount", config: d, onSort: v, className: "pvx-hidden-below-lg" }),
616
+ /* @__PURE__ */ n(M, { label: "Date", sortKey: "record.timestamp", config: d, onSort: v, className: "pvx-hidden-below-xl" })
617
617
  ] }) }),
618
- /* @__PURE__ */ e("tbody", { className: "pvx-tbody", children: b.map((x) => {
619
- var u, N, m;
618
+ /* @__PURE__ */ n("tbody", { className: "pvx-tbody", children: b.map((x) => {
619
+ var u, N, h;
620
620
  return /* @__PURE__ */ c(
621
621
  "tr",
622
622
  {
623
623
  className: "pvx-row pvx-row--clickable",
624
624
  onClick: () => a(x.id, x.layout),
625
625
  children: [
626
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--primary", children: x.displayName }),
627
- /* @__PURE__ */ e("td", { className: "pvx-td", children: (u = x.record) != null && u.visibleId ? /* @__PURE__ */ e(G, { userId: x.record.visibleId, getUserDisplay: t }) : "-" }),
628
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-hidden-below-lg", children: ((N = x.record) == null ? void 0 : N.carDisplayName) || "-" }),
629
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--primary pvx-td--mono", children: x.record ? A(x.record.lapTimeMs) : "-" }),
630
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--center pvx-hidden-below-md", children: x.driverCount || "-" }),
631
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--center pvx-hidden-below-lg", children: x.carCount || "-" }),
632
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--muted pvx-hidden-below-xl", children: (m = x.record) != null && m.timestamp ? j(x.record.timestamp) : "-" })
626
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--primary", children: x.displayName }),
627
+ /* @__PURE__ */ n("td", { className: "pvx-td", children: (u = x.record) != null && u.visibleId ? /* @__PURE__ */ n(G, { userId: x.record.visibleId, getUserDisplay: r }) : "-" }),
628
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-hidden-below-lg", children: ((N = x.record) == null ? void 0 : N.carDisplayName) || "-" }),
629
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--primary pvx-td--mono", children: x.record ? A(x.record.lapTimeMs) : "-" }),
630
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--center pvx-hidden-below-md", children: x.driverCount || "-" }),
631
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--center pvx-hidden-below-lg", children: x.carCount || "-" }),
632
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--muted pvx-hidden-below-xl", children: (h = x.record) != null && h.timestamp ? j(x.record.timestamp) : "-" })
633
633
  ]
634
634
  },
635
635
  `${x.id}|${x.layout || ""}`
636
636
  );
637
637
  }) })
638
638
  ] }) })
639
- ] }) : /* @__PURE__ */ e(V, { message: "No lap times recorded yet." });
640
- }
641
- function Qn({ entries: n, isLoading: r, track: s, carMetadata: t, getUserDisplay: a, onCarSelect: i, onNavigate: o, tags: d, onTagChange: h }) {
642
- const [l, v] = O({ key: "lapTimeMs", dir: "asc" }), { activeTags: f, toggle: g, clear: p } = xe(d, h), b = w(() => {
643
- var y, C, M;
644
- if (!n || !((y = t == null ? void 0 : t.tags) != null && y.length)) return [];
645
- const m = /* @__PURE__ */ new Set();
646
- for (const R of n)
647
- (((M = (C = t.cars) == null ? void 0 : C[R.carId]) == null ? void 0 : M.tags) || ["sports_car"]).forEach((E) => m.add(E));
648
- return t.tags.filter((R) => m.has(R));
649
- }, [n, t]), x = w(() => n ? f.size === 0 ? n : n.filter((m) => {
650
- var C, M;
651
- const y = ((M = (C = t == null ? void 0 : t.cars) == null ? void 0 : C[m.carId]) == null ? void 0 : M.tags) || ["sports_car"];
652
- return he(y, f);
653
- }) : [], [n, f, t]), u = w(() => z(x, l, (m, y) => {
639
+ ] }) : /* @__PURE__ */ n(V, { message: "No lap times recorded yet." });
640
+ }
641
+ function nt({ entries: e, isLoading: t, track: s, carMetadata: r, getUserDisplay: a, onCarSelect: i, onNavigate: o, tags: d, onTagChange: v }) {
642
+ const [l, m] = W({ key: "lapTimeMs", dir: "asc" }), { activeTags: f, toggle: g, clear: p } = Ne(d, v), b = L(() => {
643
+ var y, C, w;
644
+ if (!e || !((y = r == null ? void 0 : r.tags) != null && y.length)) return [];
645
+ const h = /* @__PURE__ */ new Set();
646
+ for (const T of e)
647
+ (((w = (C = r.cars) == null ? void 0 : C[T.carId]) == null ? void 0 : w.tags) || ["sports_car"]).forEach((E) => h.add(E));
648
+ return r.tags.filter((T) => h.has(T));
649
+ }, [e, r]), x = L(() => e ? f.size === 0 ? e : e.filter((h) => {
650
+ var C, w;
651
+ const y = ((w = (C = r == null ? void 0 : r.cars) == null ? void 0 : C[h.carId]) == null ? void 0 : w.tags) || ["sports_car"];
652
+ return fe(y, f);
653
+ }) : [], [e, f, r]), u = L(() => z(x, l, (h, y) => {
654
654
  switch (y) {
655
655
  case "carId":
656
- return I(m.carId);
656
+ return I(h.carId);
657
657
  case "driverCount":
658
- return m.driverCount || 0;
658
+ return h.driverCount || 0;
659
659
  case "lapTimeMs":
660
660
  default:
661
- return m.lapTimeMs;
661
+ return h.lapTimeMs;
662
662
  }
663
663
  }), [x, l]), N = [
664
664
  { key: "tracks", label: "Tracks", onClick: () => o("tracks") },
665
665
  { key: "track", label: s.displayName }
666
666
  ];
667
- return r ? /* @__PURE__ */ e(K, {}) : /* @__PURE__ */ c("div", { className: "pvx-card", children: [
668
- /* @__PURE__ */ e("div", { className: "pvx-card-header", children: /* @__PURE__ */ e(te, { segments: N }) }),
669
- /* @__PURE__ */ e(fe, { availableTags: b, activeTags: f, onToggle: g, onClear: p }),
670
- n != null && n.length ? /* @__PURE__ */ e("div", { className: "pvx-table-scroll", children: /* @__PURE__ */ c("table", { className: "pvx-table", children: [
671
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ c("tr", { className: "pvx-thead-row", children: [
672
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-th--narrow", children: "#" }),
673
- /* @__PURE__ */ e($, { label: "Car", sortKey: "carId", config: l, onSort: v }),
674
- /* @__PURE__ */ e("th", { className: "pvx-th", children: "Record Holder" }),
675
- /* @__PURE__ */ e($, { label: "Lap Time", sortKey: "lapTimeMs", config: l, onSort: v }),
676
- /* @__PURE__ */ e($, { label: "Drivers", sortKey: "driverCount", config: l, onSort: v, className: "pvx-hidden-below-md" }),
677
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-lg", children: "Date" })
667
+ return t ? /* @__PURE__ */ n(K, {}) : /* @__PURE__ */ c("div", { className: "pvx-card", children: [
668
+ /* @__PURE__ */ n("div", { className: "pvx-card-header", children: /* @__PURE__ */ n(re, { segments: N }) }),
669
+ /* @__PURE__ */ n(ye, { availableTags: b, activeTags: f, onToggle: g, onClear: p }),
670
+ e != null && e.length ? /* @__PURE__ */ n("div", { className: "pvx-table-scroll", children: /* @__PURE__ */ c("table", { className: "pvx-table", children: [
671
+ /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ c("tr", { className: "pvx-thead-row", children: [
672
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-th--narrow", children: "#" }),
673
+ /* @__PURE__ */ n(M, { label: "Car", sortKey: "carId", config: l, onSort: m }),
674
+ /* @__PURE__ */ n("th", { className: "pvx-th", children: "Record Holder" }),
675
+ /* @__PURE__ */ n(M, { label: "Lap Time", sortKey: "lapTimeMs", config: l, onSort: m }),
676
+ /* @__PURE__ */ n(M, { label: "Drivers", sortKey: "driverCount", config: l, onSort: m, className: "pvx-hidden-below-md" }),
677
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-lg", children: "Date" })
678
678
  ] }) }),
679
- /* @__PURE__ */ e("tbody", { className: "pvx-tbody", children: u.map((m, y) => /* @__PURE__ */ c(
679
+ /* @__PURE__ */ n("tbody", { className: "pvx-tbody", children: u.map((h, y) => /* @__PURE__ */ c(
680
680
  "tr",
681
681
  {
682
682
  className: "pvx-row pvx-row--clickable",
683
- onClick: () => i(m.carId),
683
+ onClick: () => i(h.carId),
684
684
  children: [
685
- /* @__PURE__ */ e("td", { className: "pvx-td", children: /* @__PURE__ */ e(re, { rank: y + 1, podium: !0 }) }),
686
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--primary", children: I(m.carId) }),
687
- /* @__PURE__ */ e("td", { className: "pvx-td", children: /* @__PURE__ */ e(G, { userId: m.steamId || m.userId, getUserDisplay: a }) }),
688
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--primary pvx-td--mono", children: A(m.lapTimeMs) }),
689
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--center pvx-hidden-below-md", children: m.driverCount || "-" }),
690
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--muted pvx-hidden-below-lg", children: m.recordedAt ? j(m.recordedAt) : "-" })
685
+ /* @__PURE__ */ n("td", { className: "pvx-td", children: /* @__PURE__ */ n(te, { rank: y + 1, podium: !0 }) }),
686
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--primary", children: I(h.carId) }),
687
+ /* @__PURE__ */ n("td", { className: "pvx-td", children: /* @__PURE__ */ n(G, { userId: h.steamId || h.userId, getUserDisplay: a }) }),
688
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--primary pvx-td--mono", children: A(h.lapTimeMs) }),
689
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--center pvx-hidden-below-md", children: h.driverCount || "-" }),
690
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--muted pvx-hidden-below-lg", children: h.recordedAt ? j(h.recordedAt) : "-" })
691
691
  ]
692
692
  },
693
- m.carId
693
+ h.carId
694
694
  )) })
695
- ] }) }) : /* @__PURE__ */ e(V, { message: "No lap times for this track yet." })
695
+ ] }) }) : /* @__PURE__ */ n(V, { message: "No lap times for this track yet." })
696
696
  ] });
697
697
  }
698
- function Yn({ entries: n, isLoading: r, track: s, carId: t, getUserDisplay: a, onDriverSelect: i, onNavigate: o, highlightId: d }) {
699
- const [h, l] = O({ key: "lapTimeMs", dir: "asc" }), v = w(() => ge(n), [n]), f = w(() => z(n || [], h, (p, b) => {
698
+ function tt({ entries: e, isLoading: t, track: s, carId: r, getUserDisplay: a, onDriverSelect: i, onNavigate: o, highlightId: d }) {
699
+ const [v, l] = W({ key: "lapTimeMs", dir: "asc" }), m = L(() => be(e), [e]), f = L(() => z(e || [], v, (p, b) => {
700
700
  switch (b) {
701
701
  case "userId":
702
702
  return a(p.steamId || p.userId).displayName;
@@ -706,70 +706,70 @@ function Yn({ entries: n, isLoading: r, track: s, carId: t, getUserDisplay: a, o
706
706
  default:
707
707
  return p.lapTimeMs;
708
708
  }
709
- }), [n, h, a]), g = [
709
+ }), [e, v, a]), g = [
710
710
  { key: "tracks", label: "Tracks", onClick: () => o("tracks") },
711
711
  { key: "track", label: s.displayName, onClick: () => o("track") },
712
- { key: "car", label: I(t) }
712
+ { key: "car", label: I(r) }
713
713
  ];
714
- return r ? /* @__PURE__ */ e(K, {}) : /* @__PURE__ */ c("div", { className: "pvx-card", children: [
715
- /* @__PURE__ */ e("div", { className: "pvx-card-header", children: /* @__PURE__ */ e(te, { segments: g }) }),
716
- n != null && n.length ? /* @__PURE__ */ e("div", { className: "pvx-table-scroll", children: /* @__PURE__ */ c("table", { className: "pvx-table", children: [
717
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ c("tr", { className: "pvx-thead-row", children: [
718
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-th--narrow", children: "#" }),
719
- /* @__PURE__ */ e($, { label: "Driver", sortKey: "userId", config: h, onSort: l }),
720
- /* @__PURE__ */ e($, { label: "Lap Time", sortKey: "lapTimeMs", config: h, onSort: l }),
721
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-sm", children: "S1" }),
722
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-sm", children: "S2" }),
723
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-sm", children: "S3" }),
724
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-lg", children: "Tyre" }),
725
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-xl", children: "Fuel" }),
726
- /* @__PURE__ */ e($, { label: "Laps", sortKey: "lapCount", config: h, onSort: l, className: "pvx-hidden-below-lg" }),
727
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-xl", children: "Date" })
714
+ return t ? /* @__PURE__ */ n(K, {}) : /* @__PURE__ */ c("div", { className: "pvx-card", children: [
715
+ /* @__PURE__ */ n("div", { className: "pvx-card-header", children: /* @__PURE__ */ n(re, { segments: g }) }),
716
+ e != null && e.length ? /* @__PURE__ */ n("div", { className: "pvx-table-scroll", children: /* @__PURE__ */ c("table", { className: "pvx-table", children: [
717
+ /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ c("tr", { className: "pvx-thead-row", children: [
718
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-th--narrow", children: "#" }),
719
+ /* @__PURE__ */ n(M, { label: "Driver", sortKey: "userId", config: v, onSort: l }),
720
+ /* @__PURE__ */ n(M, { label: "Lap Time", sortKey: "lapTimeMs", config: v, onSort: l }),
721
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-sm", children: "S1" }),
722
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-sm", children: "S2" }),
723
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-sm", children: "S3" }),
724
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-lg", children: "Tyre" }),
725
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-xl", children: "Fuel" }),
726
+ /* @__PURE__ */ n(M, { label: "Laps", sortKey: "lapCount", config: v, onSort: l, className: "pvx-hidden-below-lg" }),
727
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-xl", children: "Date" })
728
728
  ] }) }),
729
- /* @__PURE__ */ e("tbody", { className: "pvx-tbody", children: f.map((p, b) => {
730
- const x = b + 1, u = p.steamId || p.userId, N = v && p.sector1Ms === v.s1, m = v && p.sector2Ms === v.s2, y = v && p.sector3Ms === v.s3;
729
+ /* @__PURE__ */ n("tbody", { className: "pvx-tbody", children: f.map((p, b) => {
730
+ const x = b + 1, u = p.steamId || p.userId, N = m && p.sector1Ms === m.s1, h = m && p.sector2Ms === m.s2, y = m && p.sector3Ms === m.s3;
731
731
  return /* @__PURE__ */ c(
732
732
  "tr",
733
733
  {
734
734
  className: `pvx-row pvx-row--clickable ${d && u === d ? "pvx-row--highlight" : x <= 3 ? "pvx-row--podium" : ""}`,
735
735
  onClick: () => i(u),
736
736
  children: [
737
- /* @__PURE__ */ e("td", { className: "pvx-td", children: /* @__PURE__ */ e(re, { rank: x, podium: !0 }) }),
738
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--primary", children: /* @__PURE__ */ e(G, { userId: u, getUserDisplay: a }) }),
739
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--primary pvx-td--mono", children: A(p.lapTimeMs) }),
740
- /* @__PURE__ */ e("td", { className: `pvx-td pvx-td--mono pvx-td--sector pvx-hidden-below-sm ${N ? "pvx-td--best-sector" : ""}`, children: B(p.sector1Ms) }),
741
- /* @__PURE__ */ e("td", { className: `pvx-td pvx-td--mono pvx-td--sector pvx-hidden-below-sm ${m ? "pvx-td--best-sector" : ""}`, children: B(p.sector2Ms) }),
742
- /* @__PURE__ */ e("td", { className: `pvx-td pvx-td--mono pvx-td--sector pvx-hidden-below-sm ${y ? "pvx-td--best-sector" : ""}`, children: B(p.sector3Ms) }),
743
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--center pvx-hidden-below-lg", title: ce(p.tyreCompound), children: p.tyreCompound || "-" }),
744
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--center pvx-hidden-below-xl", children: p.startingFuelL ? `${p.startingFuelL}L` : "-" }),
745
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--center pvx-hidden-below-lg", children: p.lapCount || "-" }),
746
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--muted pvx-hidden-below-xl", children: p.recordedAt ? j(p.recordedAt) : "-" })
737
+ /* @__PURE__ */ n("td", { className: "pvx-td", children: /* @__PURE__ */ n(te, { rank: x, podium: !0 }) }),
738
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--primary", children: /* @__PURE__ */ n(G, { userId: u, getUserDisplay: a }) }),
739
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--primary pvx-td--mono", children: A(p.lapTimeMs) }),
740
+ /* @__PURE__ */ n("td", { className: `pvx-td pvx-td--mono pvx-td--sector pvx-hidden-below-sm ${N ? "pvx-td--best-sector" : ""}`, children: B(p.sector1Ms) }),
741
+ /* @__PURE__ */ n("td", { className: `pvx-td pvx-td--mono pvx-td--sector pvx-hidden-below-sm ${h ? "pvx-td--best-sector" : ""}`, children: B(p.sector2Ms) }),
742
+ /* @__PURE__ */ n("td", { className: `pvx-td pvx-td--mono pvx-td--sector pvx-hidden-below-sm ${y ? "pvx-td--best-sector" : ""}`, children: B(p.sector3Ms) }),
743
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--center pvx-hidden-below-lg", title: de(p.tyreCompound), children: p.tyreCompound || "-" }),
744
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--center pvx-hidden-below-xl", children: p.startingFuelL ? `${p.startingFuelL}L` : "-" }),
745
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--center pvx-hidden-below-lg", children: p.lapCount || "-" }),
746
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--muted pvx-hidden-below-xl", children: p.recordedAt ? j(p.recordedAt) : "-" })
747
747
  ]
748
748
  },
749
749
  u
750
750
  );
751
751
  }) })
752
- ] }) }) : /* @__PURE__ */ e(V, { message: "No lap times for this car yet." })
752
+ ] }) }) : /* @__PURE__ */ n(V, { message: "No lap times for this car yet." })
753
753
  ] });
754
754
  }
755
- function Jn({ userId: n, track: r, carId: s, game: t, gameVersion: a, showInvalid: i, getUserDisplay: o, onToggleInvalid: d, onNavigate: h }) {
756
- const { data: l, driverName: v, theoreticalBest: f, isLoading: g } = _e(n, r.id, r.layout, s, { showInvalid: i, game: t, gameVersion: a }), { displayName: p, avatarUrl: b } = o(n, v), x = w(() => ge(l, !0), [l]), u = w(() => {
757
- const m = (l == null ? void 0 : l.filter((y) => y.isValid)) || [];
758
- return m.length ? Math.min(...m.map((y) => y.lapTimeMs)) : null;
755
+ function rt({ userId: e, track: t, carId: s, game: r, gameVersion: a, showInvalid: i, getUserDisplay: o, onToggleInvalid: d, onNavigate: v }) {
756
+ const { data: l, driverName: m, theoreticalBest: f, isLoading: g } = Ve(e, t.id, t.layout, s, { showInvalid: i, game: r, gameVersion: a }), { displayName: p, avatarUrl: b } = o(e, m), x = L(() => be(l, !0), [l]), u = L(() => {
757
+ const h = (l == null ? void 0 : l.filter((y) => y.isValid)) || [];
758
+ return h.length ? Math.min(...h.map((y) => y.lapTimeMs)) : null;
759
759
  }, [l]), N = [
760
- { key: "tracks", label: "Tracks", onClick: () => h("tracks") },
761
- { key: "track", label: r.displayName, onClick: () => h("track") },
762
- { key: "car", label: I(s), onClick: () => h("car") },
760
+ { key: "tracks", label: "Tracks", onClick: () => v("tracks") },
761
+ { key: "track", label: t.displayName, onClick: () => v("track") },
762
+ { key: "car", label: I(s), onClick: () => v("car") },
763
763
  { key: "driver", label: p }
764
764
  ];
765
- return g ? /* @__PURE__ */ e(K, {}) : /* @__PURE__ */ c("div", { className: "pvx-card", children: [
765
+ return g ? /* @__PURE__ */ n(K, {}) : /* @__PURE__ */ c("div", { className: "pvx-card", children: [
766
766
  /* @__PURE__ */ c("div", { className: "pvx-card-header pvx-card-header--split", children: [
767
767
  /* @__PURE__ */ c("div", { className: "pvx-card-header-left", children: [
768
- /* @__PURE__ */ e(te, { segments: N }),
769
- b ? /* @__PURE__ */ e("img", { src: b, alt: "", className: "pvx-driver-avatar pvx-driver-avatar--lg" }) : /* @__PURE__ */ e("span", { className: "pvx-driver-avatar pvx-driver-avatar--lg pvx-driver-avatar--placeholder" })
768
+ /* @__PURE__ */ n(re, { segments: N }),
769
+ b ? /* @__PURE__ */ n("img", { src: b, alt: "", className: "pvx-driver-avatar pvx-driver-avatar--lg" }) : /* @__PURE__ */ n("span", { className: "pvx-driver-avatar pvx-driver-avatar--lg pvx-driver-avatar--placeholder" })
770
770
  ] }),
771
771
  /* @__PURE__ */ c("label", { className: "pvx-checkbox-label", children: [
772
- /* @__PURE__ */ e(
772
+ /* @__PURE__ */ n(
773
773
  "input",
774
774
  {
775
775
  type: "checkbox",
@@ -778,12 +778,12 @@ function Jn({ userId: n, track: r, carId: s, game: t, gameVersion: a, showInvali
778
778
  className: "pvx-checkbox"
779
779
  }
780
780
  ),
781
- /* @__PURE__ */ e("span", { children: "Show invalid laps" })
781
+ /* @__PURE__ */ n("span", { children: "Show invalid laps" })
782
782
  ] })
783
783
  ] }),
784
784
  f && /* @__PURE__ */ c("div", { className: "pvx-theoretical-best", children: [
785
- /* @__PURE__ */ e("span", { className: "pvx-theoretical-best-label", children: "Theoretical Best:" }),
786
- /* @__PURE__ */ e("span", { className: "pvx-theoretical-best-time", children: A(f.lapTimeMs) }),
785
+ /* @__PURE__ */ n("span", { className: "pvx-theoretical-best-label", children: "Theoretical Best:" }),
786
+ /* @__PURE__ */ n("span", { className: "pvx-theoretical-best-time", children: A(f.lapTimeMs) }),
787
787
  /* @__PURE__ */ c("span", { className: "pvx-theoretical-best-sectors", children: [
788
788
  "(",
789
789
  B(f.sector1Ms),
@@ -794,40 +794,40 @@ function Jn({ userId: n, track: r, carId: s, game: t, gameVersion: a, showInvali
794
794
  ")"
795
795
  ] })
796
796
  ] }),
797
- l != null && l.length ? /* @__PURE__ */ e("div", { className: "pvx-table-scroll", children: /* @__PURE__ */ c("table", { className: "pvx-table", children: [
798
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ c("tr", { className: "pvx-thead-row", children: [
799
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-th--narrow", children: "#" }),
800
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-md", children: "Lap" }),
801
- /* @__PURE__ */ e("th", { className: "pvx-th", children: "Lap Time" }),
802
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-sm", children: "S1" }),
803
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-sm", children: "S2" }),
804
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-sm", children: "S3" }),
805
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-th--narrow", children: "Valid" }),
806
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-lg", children: "Tyre" }),
807
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-lg", children: "Fuel" }),
808
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-xl", children: "Date" })
797
+ l != null && l.length ? /* @__PURE__ */ n("div", { className: "pvx-table-scroll", children: /* @__PURE__ */ c("table", { className: "pvx-table", children: [
798
+ /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ c("tr", { className: "pvx-thead-row", children: [
799
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-th--narrow", children: "#" }),
800
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-md", children: "Lap" }),
801
+ /* @__PURE__ */ n("th", { className: "pvx-th", children: "Lap Time" }),
802
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-sm", children: "S1" }),
803
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-sm", children: "S2" }),
804
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-sm", children: "S3" }),
805
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-th--narrow", children: "Valid" }),
806
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-lg", children: "Tyre" }),
807
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-lg", children: "Fuel" }),
808
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-xl", children: "Date" })
809
809
  ] }) }),
810
- /* @__PURE__ */ e("tbody", { className: "pvx-tbody", children: l.map((m, y) => {
811
- const C = m.isValid && m.lapTimeMs === u, M = x && m.isValid && m.sector1Ms === x.s1, R = x && m.isValid && m.sector2Ms === x.s2, S = x && m.isValid && m.sector3Ms === x.s3;
810
+ /* @__PURE__ */ n("tbody", { className: "pvx-tbody", children: l.map((h, y) => {
811
+ const C = h.isValid && h.lapTimeMs === u, w = x && h.isValid && h.sector1Ms === x.s1, T = x && h.isValid && h.sector2Ms === x.s2, $ = x && h.isValid && h.sector3Ms === x.s3;
812
812
  let E = "pvx-row";
813
- return m.isValid || (E += " pvx-row--invalid"), C && (E += " pvx-row--personal-best"), /* @__PURE__ */ c("tr", { className: E, children: [
814
- /* @__PURE__ */ e("td", { className: "pvx-td", children: /* @__PURE__ */ e("span", { className: `pvx-rank ${C ? "pvx-rank--gold" : ""}`, children: y + 1 }) }),
815
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--muted pvx-hidden-below-md", children: m.lapNumber || "-" }),
816
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--primary pvx-td--mono", children: A(m.lapTimeMs) }),
817
- /* @__PURE__ */ e("td", { className: `pvx-td pvx-td--mono pvx-td--sector pvx-hidden-below-sm ${M ? "pvx-td--best-sector" : ""}`, children: B(m.sector1Ms) }),
818
- /* @__PURE__ */ e("td", { className: `pvx-td pvx-td--mono pvx-td--sector pvx-hidden-below-sm ${R ? "pvx-td--best-sector" : ""}`, children: B(m.sector2Ms) }),
819
- /* @__PURE__ */ e("td", { className: `pvx-td pvx-td--mono pvx-td--sector pvx-hidden-below-sm ${S ? "pvx-td--best-sector" : ""}`, children: B(m.sector3Ms) }),
820
- /* @__PURE__ */ e("td", { className: "pvx-td", title: m.isValid ? void 0 : m.invalidReason || "Invalid", children: m.isValid ? /* @__PURE__ */ e(Oe, {}) : /* @__PURE__ */ e(ze, {}) }),
821
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--center pvx-hidden-below-lg", title: ce(m.tyreCompound), children: m.tyreCompound || "-" }),
822
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--center pvx-hidden-below-lg", children: m.startingFuelL ? `${m.startingFuelL}L` : "-" }),
823
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--muted pvx-hidden-below-xl", children: j(m.timestamp) })
824
- ] }, m.id);
813
+ return h.isValid || (E += " pvx-row--invalid"), C && (E += " pvx-row--personal-best"), /* @__PURE__ */ c("tr", { className: E, children: [
814
+ /* @__PURE__ */ n("td", { className: "pvx-td", children: /* @__PURE__ */ n("span", { className: `pvx-rank ${C ? "pvx-rank--gold" : ""}`, children: y + 1 }) }),
815
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--muted pvx-hidden-below-md", children: h.lapNumber || "-" }),
816
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--primary pvx-td--mono", children: A(h.lapTimeMs) }),
817
+ /* @__PURE__ */ n("td", { className: `pvx-td pvx-td--mono pvx-td--sector pvx-hidden-below-sm ${w ? "pvx-td--best-sector" : ""}`, children: B(h.sector1Ms) }),
818
+ /* @__PURE__ */ n("td", { className: `pvx-td pvx-td--mono pvx-td--sector pvx-hidden-below-sm ${T ? "pvx-td--best-sector" : ""}`, children: B(h.sector2Ms) }),
819
+ /* @__PURE__ */ n("td", { className: `pvx-td pvx-td--mono pvx-td--sector pvx-hidden-below-sm ${$ ? "pvx-td--best-sector" : ""}`, children: B(h.sector3Ms) }),
820
+ /* @__PURE__ */ n("td", { className: "pvx-td", title: h.isValid ? void 0 : h.invalidReason || "Invalid", children: h.isValid ? /* @__PURE__ */ n(Ge, {}) : /* @__PURE__ */ n(Qe, {}) }),
821
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--center pvx-hidden-below-lg", title: de(h.tyreCompound), children: h.tyreCompound || "-" }),
822
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--center pvx-hidden-below-lg", children: h.startingFuelL ? `${h.startingFuelL}L` : "-" }),
823
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--muted pvx-hidden-below-xl", children: j(h.timestamp) })
824
+ ] }, h.id);
825
825
  }) })
826
- ] }) }) : /* @__PURE__ */ e(V, { message: i ? "No laps recorded for this combination." : 'No valid laps. Try enabling "Show invalid laps".' })
826
+ ] }) }) : /* @__PURE__ */ n(V, { message: i ? "No laps recorded for this combination." : 'No valid laps. Try enabling "Show invalid laps".' })
827
827
  ] });
828
828
  }
829
- function Zn({ drivers: n, isLoading: r, getUserDisplay: s, game: t, gameVersion: a, onComboSelect: i }) {
830
- const [o, d] = O({ key: "rank", dir: "asc" }), [h, l] = D(null), v = w(() => n ? z(n, o, (g, p) => {
829
+ function st({ drivers: e, isLoading: t, getUserDisplay: s, game: r, gameVersion: a, onComboSelect: i }) {
830
+ const [o, d] = W({ key: "rank", dir: "asc" }), [v, l] = D(null), m = L(() => e ? z(e, o, (g, p) => {
831
831
  switch (p) {
832
832
  case "rating":
833
833
  return g.rating;
@@ -839,46 +839,46 @@ function Zn({ drivers: n, isLoading: r, getUserDisplay: s, game: t, gameVersion:
839
839
  default:
840
840
  return g.rank;
841
841
  }
842
- }) : [], [n, o]);
843
- if (r) return /* @__PURE__ */ e(K, {});
844
- if (!(n != null && n.length))
845
- return /* @__PURE__ */ e("div", { className: "pvx-card", children: /* @__PURE__ */ e(V, { message: "Not enough data for rankings yet." }) });
842
+ }) : [], [e, o]);
843
+ if (t) return /* @__PURE__ */ n(K, {});
844
+ if (!(e != null && e.length))
845
+ return /* @__PURE__ */ n("div", { className: "pvx-card", children: /* @__PURE__ */ n(V, { message: "Not enough data for rankings yet." }) });
846
846
  const f = 5;
847
847
  return /* @__PURE__ */ c("div", { className: "pvx-card", children: [
848
848
  /* @__PURE__ */ c("div", { className: "pvx-card-header pvx-rankings-header", children: [
849
- /* @__PURE__ */ e("h2", { className: "pvx-card-title", children: "Driver Rankings" }),
849
+ /* @__PURE__ */ n("h2", { className: "pvx-card-title", children: "Driver Rankings" }),
850
850
  /* @__PURE__ */ c("div", { className: "pvx-rankings-info-trigger", children: [
851
- /* @__PURE__ */ e("svg", { className: "pvx-rankings-info-icon", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" }) }),
851
+ /* @__PURE__ */ n("svg", { className: "pvx-rankings-info-icon", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" }) }),
852
852
  /* @__PURE__ */ c("div", { className: "pvx-rankings-info-tooltip", children: [
853
- /* @__PURE__ */ e("p", { className: "pvx-rankings-info-title", children: "How ratings work" }),
853
+ /* @__PURE__ */ n("p", { className: "pvx-rankings-info-title", children: "How ratings work" }),
854
854
  /* @__PURE__ */ c("ul", { className: "pvx-rankings-info-list", children: [
855
- /* @__PURE__ */ e("li", { children: "For each car/track combo with 3+ drivers, you're ranked by lap time and given a percentile (100 = fastest, 0 = slowest)" }),
856
- /* @__PURE__ */ e("li", { children: "Your rating is a weighted average across all your combos — bigger fields count more" }),
857
- /* @__PURE__ */ e("li", { children: "A confidence adjustment rewards car diversity: the more different cars you drive competitively, the closer your rating reflects your true score" }),
858
- /* @__PURE__ */ e("li", { children: "Minimum 2 qualifying combos required" })
855
+ /* @__PURE__ */ n("li", { children: "For each car/track combo with 3+ drivers, you're ranked by lap time and given a percentile (100 = fastest, 0 = slowest)" }),
856
+ /* @__PURE__ */ n("li", { children: "Your rating is a weighted average across all your combos — bigger fields count more" }),
857
+ /* @__PURE__ */ n("li", { children: "A confidence adjustment rewards car diversity: the more different cars you drive competitively, the closer your rating reflects your true score" }),
858
+ /* @__PURE__ */ n("li", { children: "Minimum 2 qualifying combos required" })
859
859
  ] })
860
860
  ] })
861
861
  ] })
862
862
  ] }),
863
- /* @__PURE__ */ e("div", { className: "pvx-table-scroll", children: /* @__PURE__ */ c("table", { className: "pvx-table", children: [
864
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ c("tr", { className: "pvx-thead-row", children: [
865
- /* @__PURE__ */ e($, { label: "#", sortKey: "rank", config: o, onSort: d, className: "pvx-th--narrow" }),
866
- /* @__PURE__ */ e("th", { className: "pvx-th", children: "Driver" }),
867
- /* @__PURE__ */ e($, { label: "Rating", sortKey: "rating", config: o, onSort: d }),
868
- /* @__PURE__ */ e($, { label: "Cars", sortKey: "distinctCars", config: o, onSort: d, className: "pvx-hidden-below-sm" }),
869
- /* @__PURE__ */ e($, { label: "Combos", sortKey: "comboCount", config: o, onSort: d, className: "pvx-hidden-below-sm" })
863
+ /* @__PURE__ */ n("div", { className: "pvx-table-scroll", children: /* @__PURE__ */ c("table", { className: "pvx-table", children: [
864
+ /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ c("tr", { className: "pvx-thead-row", children: [
865
+ /* @__PURE__ */ n(M, { label: "#", sortKey: "rank", config: o, onSort: d, className: "pvx-th--narrow" }),
866
+ /* @__PURE__ */ n("th", { className: "pvx-th", children: "Driver" }),
867
+ /* @__PURE__ */ n(M, { label: "Rating", sortKey: "rating", config: o, onSort: d }),
868
+ /* @__PURE__ */ n(M, { label: "Cars", sortKey: "distinctCars", config: o, onSort: d, className: "pvx-hidden-below-sm" }),
869
+ /* @__PURE__ */ n(M, { label: "Combos", sortKey: "comboCount", config: o, onSort: d, className: "pvx-hidden-below-sm" })
870
870
  ] }) }),
871
- /* @__PURE__ */ e("tbody", { className: "pvx-tbody", children: v.map((g) => {
872
- const p = h === g.identifier;
873
- return /* @__PURE__ */ e(
874
- Ge,
871
+ /* @__PURE__ */ n("tbody", { className: "pvx-tbody", children: m.map((g) => {
872
+ const p = v === g.identifier;
873
+ return /* @__PURE__ */ n(
874
+ Ye,
875
875
  {
876
876
  driver: g,
877
877
  getUserDisplay: s,
878
878
  isExpanded: p,
879
879
  onToggle: () => l(p ? null : g.identifier),
880
880
  colCount: f,
881
- game: t,
881
+ game: r,
882
882
  gameVersion: a,
883
883
  onComboSelect: i
884
884
  },
@@ -888,28 +888,28 @@ function Zn({ drivers: n, isLoading: r, getUserDisplay: s, game: t, gameVersion:
888
888
  ] }) })
889
889
  ] });
890
890
  }
891
- function Ge({ driver: n, getUserDisplay: r, isExpanded: s, onToggle: t, colCount: a, game: i, gameVersion: o, onComboSelect: d }) {
892
- const h = n.identifier;
891
+ function Ye({ driver: e, getUserDisplay: t, isExpanded: s, onToggle: r, colCount: a, game: i, gameVersion: o, onComboSelect: d }) {
892
+ const v = e.identifier;
893
893
  return /* @__PURE__ */ c(F, { children: [
894
894
  /* @__PURE__ */ c(
895
895
  "tr",
896
896
  {
897
- className: `pvx-row pvx-row--clickable ${n.rank <= 3 ? "pvx-row--podium" : ""}`,
898
- onClick: t,
897
+ className: `pvx-row pvx-row--clickable ${e.rank <= 3 ? "pvx-row--podium" : ""}`,
898
+ onClick: r,
899
899
  children: [
900
- /* @__PURE__ */ e("td", { className: "pvx-td", children: /* @__PURE__ */ e(re, { rank: n.rank, podium: !0 }) }),
901
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--primary", children: /* @__PURE__ */ e(G, { userId: h, getUserDisplay: r }) }),
902
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--primary pvx-td--mono", children: n.rating.toFixed(1) }),
903
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--center pvx-hidden-below-sm", children: n.distinctCars || "-" }),
904
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--center pvx-hidden-below-sm", children: /* @__PURE__ */ c("span", { className: "pvx-rankings-combo-count", children: [
905
- n.comboCount,
906
- /* @__PURE__ */ e("svg", { className: `pvx-rankings-chevron ${s ? "pvx-rankings-chevron--open" : ""}`, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "m6 9 6 6 6-6" }) })
900
+ /* @__PURE__ */ n("td", { className: "pvx-td", children: /* @__PURE__ */ n(te, { rank: e.rank, podium: !0 }) }),
901
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--primary", children: /* @__PURE__ */ n(G, { userId: v, getUserDisplay: t }) }),
902
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--primary pvx-td--mono", children: e.rating.toFixed(1) }),
903
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--center pvx-hidden-below-sm", children: e.distinctCars || "-" }),
904
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--center pvx-hidden-below-sm", children: /* @__PURE__ */ c("span", { className: "pvx-rankings-combo-count", children: [
905
+ e.comboCount,
906
+ /* @__PURE__ */ n("svg", { className: `pvx-rankings-chevron ${s ? "pvx-rankings-chevron--open" : ""}`, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ n("path", { d: "m6 9 6 6 6-6" }) })
907
907
  ] }) })
908
908
  ]
909
909
  }
910
910
  ),
911
- s && n.combos && /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: a, className: "pvx-rankings-combos-cell", children: /* @__PURE__ */ e("div", { className: "pvx-rankings-combos", children: n.combos.map((l, v) => {
912
- const f = l.layout ? `${l.trackId}|${l.layout}` : l.trackId, g = d ? () => d({ track: f, car: l.carId, highlight: h, game: i, gameVersion: o }) : void 0;
911
+ s && e.combos && /* @__PURE__ */ n("tr", { children: /* @__PURE__ */ n("td", { colSpan: a, className: "pvx-rankings-combos-cell", children: /* @__PURE__ */ n("div", { className: "pvx-rankings-combos", children: e.combos.map((l, m) => {
912
+ const f = l.layout ? `${l.trackId}|${l.layout}` : l.trackId, g = d ? () => d({ track: f, car: l.carId, highlight: v, game: i, gameVersion: o }) : void 0;
913
913
  return /* @__PURE__ */ c(
914
914
  "div",
915
915
  {
@@ -918,11 +918,11 @@ function Ge({ driver: n, getUserDisplay: r, isExpanded: s, onToggle: t, colCount
918
918
  role: g ? "button" : void 0,
919
919
  children: [
920
920
  /* @__PURE__ */ c("div", { className: "pvx-rankings-combo-info", children: [
921
- /* @__PURE__ */ e("p", { className: "pvx-rankings-combo-track", children: q(l.trackId, l.layout, i) }),
922
- /* @__PURE__ */ e("p", { className: "pvx-rankings-combo-car", children: I(l.carId) })
921
+ /* @__PURE__ */ n("p", { className: "pvx-rankings-combo-track", children: q(l.trackId, l.layout, i) }),
922
+ /* @__PURE__ */ n("p", { className: "pvx-rankings-combo-car", children: I(l.carId) })
923
923
  ] }),
924
924
  /* @__PURE__ */ c("div", { className: "pvx-rankings-combo-stats", children: [
925
- /* @__PURE__ */ e("p", { className: "pvx-rankings-combo-time", children: A(l.lapTimeMs) }),
925
+ /* @__PURE__ */ n("p", { className: "pvx-rankings-combo-time", children: A(l.lapTimeMs) }),
926
926
  /* @__PURE__ */ c("p", { className: `pvx-rankings-combo-pct ${l.percentile >= 75 ? "pvx-rankings-combo-pct--high" : l.percentile >= 50 ? "pvx-rankings-combo-pct--mid" : l.percentile >= 25 ? "pvx-rankings-combo-pct--low" : "pvx-rankings-combo-pct--bottom"}`, children: [
927
927
  l.percentile.toFixed(0),
928
928
  "%",
@@ -937,12 +937,12 @@ function Ge({ driver: n, getUserDisplay: r, isExpanded: s, onToggle: t, colCount
937
937
  ] })
938
938
  ]
939
939
  },
940
- v
940
+ m
941
941
  );
942
942
  }) }) }) })
943
943
  ] });
944
944
  }
945
- const Qe = {
945
+ const Je = {
946
946
  GBR: "🇬🇧",
947
947
  DEU: "🇩🇪",
948
948
  NLD: "🇳🇱",
@@ -973,98 +973,141 @@ const Qe = {
973
973
  RUS: "🇷🇺",
974
974
  TUR: "🇹🇷",
975
975
  KOR: "🇰🇷"
976
- }, Ne = ["🥇", "🥈", "🥉"], Ye = {
976
+ }, se = ["🥇", "🥈", "🥉"], Ze = {
977
977
  championship: "Championship",
978
978
  series: "Series",
979
979
  event: "Event"
980
- }, ae = ["PRACTICE", "QUALIFYING", "RACE"];
981
- function be({ position: n }) {
982
- return /* @__PURE__ */ e("span", { className: n === 1 ? "pvx-rank pvx-rank--gold" : n === 2 ? "pvx-rank pvx-rank--silver" : n === 3 ? "pvx-rank pvx-rank--bronze" : "pvx-rank", children: n });
983
- }
984
- function ye({ nation: n }) {
985
- const r = n && Qe[n];
986
- return r ? /* @__PURE__ */ e("span", { className: "pvx-nation-flag", title: n, children: r }) : null;
987
- }
988
- function Je({ sessions: n, activeSession: r, onSelect: s }) {
989
- if (!n || n.length <= 1) return null;
990
- const t = [...n].sort(
991
- (a, i) => ae.indexOf(a.type) - ae.indexOf(i.type)
980
+ }, oe = ["PRACTICE", "QUALIFYING", "RACE"];
981
+ function ke({ position: e }) {
982
+ return /* @__PURE__ */ n("span", { className: e === 1 ? "pvx-rank pvx-rank--gold" : e === 2 ? "pvx-rank pvx-rank--silver" : e === 3 ? "pvx-rank pvx-rank--bronze" : "pvx-rank", children: e });
983
+ }
984
+ function ae({ nation: e }) {
985
+ const t = e && Je[e];
986
+ return t ? /* @__PURE__ */ n("span", { className: "pvx-nation-flag", title: e, children: t }) : null;
987
+ }
988
+ function Xe({ sessions: e, activeSession: t, onSelect: s }) {
989
+ if (!e || e.length <= 1) return null;
990
+ const r = [...e].sort(
991
+ (a, i) => oe.indexOf(a.type) - oe.indexOf(i.type)
992
992
  );
993
- return /* @__PURE__ */ e("div", { className: "pvx-session-tabs", children: t.map((a) => /* @__PURE__ */ e(
993
+ return /* @__PURE__ */ n("div", { className: "pvx-session-tabs", children: r.map((a) => /* @__PURE__ */ n(
994
994
  "button",
995
995
  {
996
996
  onClick: () => s(a.type),
997
- className: `pvx-session-tab ${r === a.type ? "pvx-session-tab--active" : ""}`,
997
+ className: `pvx-session-tab ${t === a.type ? "pvx-session-tab--active" : ""}`,
998
998
  children: a.type
999
999
  },
1000
1000
  a.type
1001
1001
  )) });
1002
1002
  }
1003
- function Ze({ type: n }) {
1004
- return /* @__PURE__ */ e("span", { className: `pvx-comp-badge pvx-comp-badge--${n}`, children: Ye[n] || n });
1003
+ function en({ type: e }) {
1004
+ return /* @__PURE__ */ n("span", { className: `pvx-comp-badge pvx-comp-badge--${e}`, children: Ze[e] || e });
1005
1005
  }
1006
- function Y({ children: n, variant: r = "default" }) {
1007
- return /* @__PURE__ */ e("span", { className: `pvx-info-pill ${r !== "default" ? `pvx-info-pill--${r}` : ""}`, children: n });
1006
+ function Y({ children: e, variant: t = "default" }) {
1007
+ return /* @__PURE__ */ n("span", { className: `pvx-info-pill ${t !== "default" ? `pvx-info-pill--${t}` : ""}`, children: e });
1008
1008
  }
1009
- function Xe(n) {
1010
- if (!n) return "TBD";
1011
- const r = new Date(n);
1012
- if (isNaN(r)) return "TBD";
1013
- const s = r.toLocaleDateString("en-GB", { weekday: "short", day: "numeric", month: "short" }), t = r.toLocaleTimeString("en-GB", { hour: "2-digit", minute: "2-digit" });
1014
- return `${s} • ${t}`;
1009
+ function nn(e) {
1010
+ if (!e) return "TBD";
1011
+ const t = new Date(e);
1012
+ if (isNaN(t)) return "TBD";
1013
+ const s = t.toLocaleDateString("en-GB", { weekday: "short", day: "numeric", month: "short" }), r = t.toLocaleTimeString("en-GB", { hour: "2-digit", minute: "2-digit" });
1014
+ return `${s} • ${r}`;
1015
1015
  }
1016
- function en(n) {
1017
- return n.reduce((r, s) => {
1018
- var t;
1019
- return (t = s.splits) != null && t.length ? r ? r.map((a, i) => {
1016
+ function tn(e) {
1017
+ return e.reduce((t, s) => {
1018
+ var r;
1019
+ return (r = s.splits) != null && r.length ? t ? t.map((a, i) => {
1020
1020
  const o = s.splits[i];
1021
1021
  return o && o < a ? o : a;
1022
- }) : [...s.splits] : r;
1022
+ }) : [...s.splits] : t;
1023
1023
  }, null);
1024
1024
  }
1025
- function U({ message: n = "Loading..." }) {
1026
- return /* @__PURE__ */ e("div", { className: "pvx-loading", children: n });
1027
- }
1028
- function P({ message: n = "No data available." }) {
1029
- return /* @__PURE__ */ e("div", { className: "pvx-empty", children: /* @__PURE__ */ e("p", { children: n }) });
1025
+ function U({ message: e = "Loading..." }) {
1026
+ return /* @__PURE__ */ n("div", { className: "pvx-loading", children: e });
1027
+ }
1028
+ function P({ message: e = "No data available." }) {
1029
+ return /* @__PURE__ */ n("div", { className: "pvx-empty", children: /* @__PURE__ */ n("p", { children: e }) });
1030
+ }
1031
+ const we = 3;
1032
+ function rn(e) {
1033
+ const t = e == null ? void 0 : e.rounds;
1034
+ return t != null && t.length ? t.every((s) => s.isFinalized) : !1;
1035
+ }
1036
+ function sn(e) {
1037
+ const t = e == null ? void 0 : e.rounds;
1038
+ if (!(t != null && t.length)) return null;
1039
+ let s = null;
1040
+ for (const r of t) {
1041
+ if (!r.startTime) continue;
1042
+ const a = new Date(r.startTime);
1043
+ isNaN(a) || (!s || a > s) && (s = a);
1044
+ }
1045
+ return s;
1046
+ }
1047
+ function Ce(e, t = we) {
1048
+ if (!rn(e)) return "active";
1049
+ const s = sn(e);
1050
+ if (!s) return "recently-completed";
1051
+ const r = t * 24 * 60 * 60 * 1e3;
1052
+ return Date.now() - s.getTime() <= r ? "recently-completed" : "archived";
1053
+ }
1054
+ function at(e, t, s = we) {
1055
+ if (!(e != null && e.length)) return [];
1056
+ const r = new Set(Array.isArray(t) ? t : [t]);
1057
+ return e.filter((a) => r.has(Ce(a, s)));
1058
+ }
1059
+ function an(e, t = 3) {
1060
+ const s = e == null ? void 0 : e.standings;
1061
+ return Array.isArray(s) ? [...s].sort((r, a) => (r.position ?? 999) - (a.position ?? 999)).slice(0, t) : [];
1062
+ }
1063
+ function on({ competitionId: e, topN: t = 3, label: s = "Completed", className: r }) {
1064
+ const { data: a } = me(e), i = an(a, t);
1065
+ return /* @__PURE__ */ c("div", { className: `pvx-comp-completed-badge ${r || ""}`, children: [
1066
+ /* @__PURE__ */ n("span", { className: "pvx-comp-completed-badge-label", children: s }),
1067
+ i.length > 0 && /* @__PURE__ */ n("ol", { className: "pvx-comp-completed-badge-podium", children: i.map((o, d) => /* @__PURE__ */ c("li", { className: "pvx-comp-completed-badge-driver", children: [
1068
+ /* @__PURE__ */ n("span", { className: "pvx-comp-completed-badge-medal", "aria-hidden": "true", children: se[d] || "" }),
1069
+ /* @__PURE__ */ n(ae, { nation: o.nation }),
1070
+ /* @__PURE__ */ n("span", { className: "pvx-comp-completed-badge-name", children: o.driverName })
1071
+ ] }, o.driverId || d)) })
1072
+ ] });
1030
1073
  }
1031
- function Xn({ competitions: n, isLoading: r, onSelect: s, onRegister: t, className: a }) {
1032
- return r ? /* @__PURE__ */ e(U, { message: "Loading competitions..." }) : n != null && n.length ? /* @__PURE__ */ e("div", { className: `pvx-comp-grid ${a || ""}`, children: n.map((i) => /* @__PURE__ */ e(nn, { comp: i, onSelect: s, onRegister: t || s }, i.id)) }) : /* @__PURE__ */ e(P, { message: "No competitions available." });
1074
+ function it({ competitions: e, isLoading: t, onSelect: s, onRegister: r, className: a }) {
1075
+ return t ? /* @__PURE__ */ n(U, { message: "Loading competitions..." }) : e != null && e.length ? /* @__PURE__ */ n("div", { className: `pvx-comp-grid ${a || ""}`, children: e.map((i) => /* @__PURE__ */ n(cn, { comp: i, onSelect: s, onRegister: r || s }, i.id)) }) : /* @__PURE__ */ n(P, { message: "No competitions available." });
1033
1076
  }
1034
- function nn({ comp: n, onSelect: r, onRegister: s }) {
1035
- var x, u, N;
1036
- const { cdnUrl: t } = k(), a = n.posterCdnPath ? `${t}/${n.posterCdnPath}` : null, i = n.registration, o = (i == null ? void 0 : i.currentCount) || 0, d = i == null ? void 0 : i.maxParticipants, h = d && o >= d, l = (i == null ? void 0 : i.deadline) && new Date(i.deadline) < /* @__PURE__ */ new Date(), v = (i == null ? void 0 : i.isOpen) && !l && !h, f = /* @__PURE__ */ new Date(), g = (x = n.rounds) == null ? void 0 : x.find((m) => m.startTime && new Date(m.startTime) >= f), p = ((u = n.rounds) == null ? void 0 : u.length) || 0, b = ((N = n.rounds) == null ? void 0 : N.filter((m) => m.isFinalized).length) || 0;
1077
+ function cn({ comp: e, onSelect: t, onRegister: s }) {
1078
+ var h, y, C;
1079
+ const { cdnUrl: r } = k(), a = e.posterCdnPath ? `${r}/${e.posterCdnPath}` : null, i = e.registration, o = (i == null ? void 0 : i.currentCount) || 0, d = i == null ? void 0 : i.maxParticipants, v = d && o >= d, l = (i == null ? void 0 : i.deadline) && new Date(i.deadline) < /* @__PURE__ */ new Date(), m = (i == null ? void 0 : i.isOpen) && !l && !v, f = /* @__PURE__ */ new Date(), g = (h = e.rounds) == null ? void 0 : h.find((w) => w.startTime && new Date(w.startTime) >= f), p = ((y = e.rounds) == null ? void 0 : y.length) || 0, b = ((C = e.rounds) == null ? void 0 : C.filter((w) => w.isFinalized).length) || 0, x = Ce(e), u = x === "recently-completed" || x === "archived", N = e.type === "championship";
1037
1080
  return /* @__PURE__ */ c(
1038
1081
  "div",
1039
1082
  {
1040
1083
  className: "pvx-comp-card",
1041
- onClick: () => r(n.id),
1084
+ onClick: () => t(e.id),
1042
1085
  role: "button",
1043
1086
  tabIndex: 0,
1044
- onKeyDown: (m) => {
1045
- (m.key === "Enter" || m.key === " ") && (m.preventDefault(), r(n.id));
1087
+ onKeyDown: (w) => {
1088
+ (w.key === "Enter" || w.key === " ") && (w.preventDefault(), t(e.id));
1046
1089
  },
1047
1090
  children: [
1048
- /* @__PURE__ */ e("div", { className: "pvx-comp-card-poster", children: a ? /* @__PURE__ */ e("img", { src: a, alt: n.name, className: "pvx-comp-card-poster-img" }) : /* @__PURE__ */ e("div", { className: "pvx-comp-card-poster-placeholder", children: /* @__PURE__ */ e(tn, {}) }) }),
1091
+ /* @__PURE__ */ n("div", { className: "pvx-comp-card-poster", children: a ? /* @__PURE__ */ n("img", { src: a, alt: e.name, className: "pvx-comp-card-poster-img" }) : /* @__PURE__ */ n("div", { className: "pvx-comp-card-poster-placeholder", children: /* @__PURE__ */ n(dn, {}) }) }),
1049
1092
  /* @__PURE__ */ c("div", { className: "pvx-comp-card-body", children: [
1050
- /* @__PURE__ */ e("h3", { className: "pvx-comp-card-title", children: n.name }),
1051
- n.description && /* @__PURE__ */ e("p", { className: "pvx-comp-card-desc", children: n.description }),
1093
+ /* @__PURE__ */ n("h3", { className: "pvx-comp-card-title", children: e.name }),
1094
+ e.description && /* @__PURE__ */ n("p", { className: "pvx-comp-card-desc", children: e.description }),
1052
1095
  /* @__PURE__ */ c("div", { className: "pvx-comp-card-pills", children: [
1053
- /* @__PURE__ */ e(Ze, { type: n.type }),
1054
- n.game && /* @__PURE__ */ e(Y, { children: n.game.toUpperCase() }),
1055
- n.formatDescription && n.formatDescription.split(", ").map((m, y) => /* @__PURE__ */ e(Y, { variant: "format", children: m }, y))
1096
+ /* @__PURE__ */ n(en, { type: e.type }),
1097
+ e.game && /* @__PURE__ */ n(Y, { children: e.game.toUpperCase() }),
1098
+ e.formatDescription && e.formatDescription.split(", ").map((w, T) => /* @__PURE__ */ n(Y, { variant: "format", children: w }, T))
1056
1099
  ] }),
1057
- n.carsDescription && /* @__PURE__ */ e("div", { className: "pvx-comp-card-pills", children: n.carsDescription.split(", ").map((m, y) => /* @__PURE__ */ e(Y, { children: m }, y)) }),
1100
+ e.carsDescription && /* @__PURE__ */ n("div", { className: "pvx-comp-card-pills", children: e.carsDescription.split(", ").map((w, T) => /* @__PURE__ */ n(Y, { children: w }, T)) }),
1058
1101
  /* @__PURE__ */ c("div", { className: "pvx-comp-card-schedule", children: [
1059
1102
  g ? /* @__PURE__ */ c("span", { className: "pvx-comp-card-schedule-next", children: [
1060
- /* @__PURE__ */ e("span", { className: "pvx-comp-card-schedule-label", children: "Next:" }),
1103
+ /* @__PURE__ */ n("span", { className: "pvx-comp-card-schedule-label", children: "Next:" }),
1061
1104
  " ",
1062
1105
  "R",
1063
1106
  g.roundNumber,
1064
1107
  " ",
1065
1108
  g.track || "TBD",
1066
1109
  " — ",
1067
- Xe(g.startTime)
1110
+ nn(g.startTime)
1068
1111
  ] }) : p > 0 ? /* @__PURE__ */ c("span", { className: "pvx-comp-card-schedule-next", children: [
1069
1112
  b,
1070
1113
  "/",
@@ -1077,12 +1120,13 @@ function nn({ comp: n, onSelect: r, onRegister: s }) {
1077
1120
  p !== 1 ? "s" : ""
1078
1121
  ] })
1079
1122
  ] }),
1080
- i && /* @__PURE__ */ e(
1081
- rn,
1123
+ u && N && /* @__PURE__ */ n(on, { competitionId: e.id }),
1124
+ i && !u && /* @__PURE__ */ n(
1125
+ ln,
1082
1126
  {
1083
- competitionId: n.id,
1084
- regOpen: v,
1085
- isFull: h,
1127
+ competitionId: e.id,
1128
+ regOpen: m,
1129
+ isFull: v,
1086
1130
  deadlinePassed: l,
1087
1131
  regCount: o,
1088
1132
  regMax: d,
@@ -1094,67 +1138,67 @@ function nn({ comp: n, onSelect: r, onRegister: s }) {
1094
1138
  }
1095
1139
  );
1096
1140
  }
1097
- function rn({ competitionId: n, regOpen: r, isFull: s, deadlinePassed: t, regCount: a, regMax: i, onRegister: o }) {
1098
- const { isPowerMode: d } = ee(), h = ne(n), { data: l } = X(n), v = (l == null ? void 0 : l.isRegistered) || !1, f = i ? a / i * 100 : 0, g = f >= 100 ? "full" : f >= 75 ? "warning" : "ok";
1141
+ function ln({ competitionId: e, regOpen: t, isFull: s, deadlinePassed: r, regCount: a, regMax: i, onRegister: o }) {
1142
+ const { isPowerMode: d } = ee(), v = ne(e), { data: l } = X(e), m = (l == null ? void 0 : l.isRegistered) || !1, f = i ? a / i * 100 : 0, g = f >= 100 ? "full" : f >= 75 ? "warning" : "ok";
1099
1143
  return /* @__PURE__ */ c("div", { className: "pvx-comp-card-reg", children: [
1100
- /* @__PURE__ */ e("div", { className: "pvx-comp-card-reg-info", children: /* @__PURE__ */ c("span", { className: `pvx-reg-capacity pvx-reg-capacity--${g}`, children: [
1144
+ /* @__PURE__ */ n("div", { className: "pvx-comp-card-reg-info", children: /* @__PURE__ */ c("span", { className: `pvx-reg-capacity pvx-reg-capacity--${g}`, children: [
1101
1145
  a,
1102
1146
  "/",
1103
1147
  i || "∞",
1104
1148
  " drivers"
1105
1149
  ] }) }),
1106
- /* @__PURE__ */ e("div", { className: "pvx-comp-card-reg-action", children: v ? /* @__PURE__ */ e(
1150
+ /* @__PURE__ */ n("div", { className: "pvx-comp-card-reg-action", children: m ? /* @__PURE__ */ n(
1107
1151
  "button",
1108
1152
  {
1109
1153
  className: "pvx-comp-card-reg-btn pvx-comp-card-reg-btn--registered",
1110
1154
  onClick: (p) => {
1111
- p.stopPropagation(), o(n);
1155
+ p.stopPropagation(), o(e);
1112
1156
  },
1113
1157
  children: "✓ Registered"
1114
1158
  }
1115
- ) : r ? d ? /* @__PURE__ */ e(
1159
+ ) : t ? d ? /* @__PURE__ */ n(
1116
1160
  "button",
1117
1161
  {
1118
1162
  className: "pvx-comp-card-reg-btn pvx-comp-card-reg-btn--open",
1119
1163
  onClick: (p) => {
1120
- p.stopPropagation(), o(n);
1164
+ p.stopPropagation(), o(e);
1121
1165
  },
1122
1166
  children: "Register"
1123
1167
  }
1124
- ) : /* @__PURE__ */ e(
1168
+ ) : /* @__PURE__ */ n(
1125
1169
  "a",
1126
1170
  {
1127
- href: h,
1171
+ href: v,
1128
1172
  target: "_blank",
1129
1173
  rel: "noopener noreferrer",
1130
1174
  className: "pvx-comp-card-reg-btn pvx-comp-card-reg-btn--open",
1131
1175
  onClick: (p) => p.stopPropagation(),
1132
1176
  children: "Register"
1133
1177
  }
1134
- ) : /* @__PURE__ */ e("span", { className: "pvx-comp-card-reg-btn pvx-comp-card-reg-btn--closed", children: s ? "Full" : "Closed" }) })
1178
+ ) : /* @__PURE__ */ n("span", { className: "pvx-comp-card-reg-btn pvx-comp-card-reg-btn--closed", children: s ? "Full" : "Closed" }) })
1135
1179
  ] });
1136
1180
  }
1137
- function tn() {
1181
+ function dn() {
1138
1182
  return /* @__PURE__ */ c("svg", { className: "pvx-comp-trophy-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
1139
- /* @__PURE__ */ e("path", { d: "M6 9H4.5a2.5 2.5 0 0 1 0-5H6" }),
1140
- /* @__PURE__ */ e("path", { d: "M18 9h1.5a2.5 2.5 0 0 0 0-5H18" }),
1141
- /* @__PURE__ */ e("path", { d: "M4 22h16" }),
1142
- /* @__PURE__ */ e("path", { d: "M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22" }),
1143
- /* @__PURE__ */ e("path", { d: "M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22" }),
1144
- /* @__PURE__ */ e("path", { d: "M18 2H6v7a6 6 0 0 0 12 0V2Z" })
1183
+ /* @__PURE__ */ n("path", { d: "M6 9H4.5a2.5 2.5 0 0 1 0-5H6" }),
1184
+ /* @__PURE__ */ n("path", { d: "M18 9h1.5a2.5 2.5 0 0 0 0-5H18" }),
1185
+ /* @__PURE__ */ n("path", { d: "M4 22h16" }),
1186
+ /* @__PURE__ */ n("path", { d: "M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22" }),
1187
+ /* @__PURE__ */ n("path", { d: "M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22" }),
1188
+ /* @__PURE__ */ n("path", { d: "M18 2H6v7a6 6 0 0 0 12 0V2Z" })
1145
1189
  ] });
1146
1190
  }
1147
- function sn({ competitionId: n, className: r }) {
1148
- var d, h;
1149
- const { data: s, isLoading: t } = qe(n), { data: a, isLoading: i } = de(n);
1150
- if (t || i)
1151
- return /* @__PURE__ */ e(U, { message: "Loading standings..." });
1191
+ function pn({ competitionId: e, className: t }) {
1192
+ var d, v;
1193
+ const { data: s, isLoading: r } = me(e), { data: a, isLoading: i } = ue(e);
1194
+ if (r || i)
1195
+ return /* @__PURE__ */ n(U, { message: "Loading standings..." });
1152
1196
  if (!((d = s == null ? void 0 : s.standings) != null && d.length))
1153
- return /* @__PURE__ */ e(P, { message: "No standings data yet. Results will appear once rounds are finalised." });
1154
- const o = ((h = a == null ? void 0 : a.rounds) == null ? void 0 : h.filter((l) => l.isFinalized)) || [];
1155
- return /* @__PURE__ */ c("div", { className: `pvx-card ${r || ""}`, children: [
1156
- /* @__PURE__ */ e("div", { className: "pvx-card-header--split", children: /* @__PURE__ */ c("div", { className: "pvx-card-header-left", children: [
1157
- /* @__PURE__ */ e("h3", { className: "pvx-card-title", children: "Championship Standings" }),
1197
+ return /* @__PURE__ */ n(P, { message: "No standings data yet. Results will appear once rounds are finalised." });
1198
+ const o = ((v = a == null ? void 0 : a.rounds) == null ? void 0 : v.filter((l) => l.isFinalized)) || [];
1199
+ return /* @__PURE__ */ c("div", { className: `pvx-card ${t || ""}`, children: [
1200
+ /* @__PURE__ */ n("div", { className: "pvx-card-header--split", children: /* @__PURE__ */ c("div", { className: "pvx-card-header-left", children: [
1201
+ /* @__PURE__ */ n("h3", { className: "pvx-card-title", children: "Championship Standings" }),
1158
1202
  /* @__PURE__ */ c("span", { className: "pvx-standings-subtitle", children: [
1159
1203
  "After ",
1160
1204
  s.roundsCompleted,
@@ -1163,13 +1207,13 @@ function sn({ competitionId: n, className: r }) {
1163
1207
  s.countingRounds > 0 && ` (best ${s.countingRounds} count)`
1164
1208
  ] })
1165
1209
  ] }) }),
1166
- /* @__PURE__ */ e("div", { className: "pvx-table-scroll", children: /* @__PURE__ */ c("table", { className: "pvx-table", children: [
1167
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ c("tr", { className: "pvx-thead-row", children: [
1168
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-th--narrow", children: "Pos" }),
1169
- /* @__PURE__ */ e("th", { className: "pvx-th", children: "Driver" }),
1170
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-th--center pvx-hidden-below-sm", children: "W" }),
1171
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-th--center pvx-hidden-below-sm", children: "Pod" }),
1172
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-th--center", children: "Points" }),
1210
+ /* @__PURE__ */ n("div", { className: "pvx-table-scroll", children: /* @__PURE__ */ c("table", { className: "pvx-table", children: [
1211
+ /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ c("tr", { className: "pvx-thead-row", children: [
1212
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-th--narrow", children: "Pos" }),
1213
+ /* @__PURE__ */ n("th", { className: "pvx-th", children: "Driver" }),
1214
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-th--center pvx-hidden-below-sm", children: "W" }),
1215
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-th--center pvx-hidden-below-sm", children: "Pod" }),
1216
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-th--center", children: "Points" }),
1173
1217
  o.map((l) => /* @__PURE__ */ c(
1174
1218
  "th",
1175
1219
  {
@@ -1183,8 +1227,8 @@ function sn({ competitionId: n, className: r }) {
1183
1227
  l.roundNumber
1184
1228
  ))
1185
1229
  ] }) }),
1186
- /* @__PURE__ */ e("tbody", { className: "pvx-tbody", children: s.standings.map((l) => /* @__PURE__ */ e(
1187
- an,
1230
+ /* @__PURE__ */ n("tbody", { className: "pvx-tbody", children: s.standings.map((l) => /* @__PURE__ */ n(
1231
+ un,
1188
1232
  {
1189
1233
  driver: l,
1190
1234
  finalizedRounds: o
@@ -1194,110 +1238,110 @@ function sn({ competitionId: n, className: r }) {
1194
1238
  ] }) })
1195
1239
  ] });
1196
1240
  }
1197
- function an({ driver: n, finalizedRounds: r }) {
1198
- var o, d, h;
1199
- const s = n.position <= 3, t = new Map(
1200
- ((o = n.roundResults) == null ? void 0 : o.map((l) => [l.roundNumber, l])) || []
1201
- ), a = ((d = n.roundResults) == null ? void 0 : d.filter((l) => l.position === 1).length) || 0, i = ((h = n.roundResults) == null ? void 0 : h.filter((l) => l.position <= 3).length) || 0;
1241
+ function un({ driver: e, finalizedRounds: t }) {
1242
+ var o, d, v;
1243
+ const s = e.position <= 3, r = new Map(
1244
+ ((o = e.roundResults) == null ? void 0 : o.map((l) => [l.roundNumber, l])) || []
1245
+ ), a = ((d = e.roundResults) == null ? void 0 : d.filter((l) => l.position === 1).length) || 0, i = ((v = e.roundResults) == null ? void 0 : v.filter((l) => l.position <= 3).length) || 0;
1202
1246
  return /* @__PURE__ */ c("tr", { className: `pvx-row ${s ? "pvx-row--podium" : ""}`, children: [
1203
- /* @__PURE__ */ e("td", { className: "pvx-td", children: /* @__PURE__ */ e(be, { position: n.position }) }),
1247
+ /* @__PURE__ */ n("td", { className: "pvx-td", children: /* @__PURE__ */ n(ke, { position: e.position }) }),
1204
1248
  /* @__PURE__ */ c("td", { className: "pvx-td pvx-td--primary", children: [
1205
- /* @__PURE__ */ e(ye, { nation: n.nation }),
1206
- n.driverName
1249
+ /* @__PURE__ */ n(ae, { nation: e.nation }),
1250
+ e.driverName
1207
1251
  ] }),
1208
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--center pvx-hidden-below-sm", children: a || "-" }),
1209
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--center pvx-hidden-below-sm", children: i || "-" }),
1210
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--center pvx-standings-total", children: n.totalPoints }),
1211
- r.map((l) => {
1212
- const v = t.get(l.roundNumber), f = v == null ? void 0 : v.dropped;
1213
- return /* @__PURE__ */ e(
1252
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--center pvx-hidden-below-sm", children: a || "-" }),
1253
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--center pvx-hidden-below-sm", children: i || "-" }),
1254
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--center pvx-standings-total", children: e.totalPoints }),
1255
+ t.map((l) => {
1256
+ const m = r.get(l.roundNumber), f = m == null ? void 0 : m.dropped;
1257
+ return /* @__PURE__ */ n(
1214
1258
  "td",
1215
1259
  {
1216
- className: `pvx-td pvx-td--center pvx-hidden-below-md ${!f && (v == null ? void 0 : v.position) === 1 ? "pvx-standings-cell--p1" : !f && (v == null ? void 0 : v.position) === 2 ? "pvx-standings-cell--p2" : !f && (v == null ? void 0 : v.position) === 3 ? "pvx-standings-cell--p3" : ""}`,
1217
- children: v ? /* @__PURE__ */ c("div", { className: `pvx-standings-round-cell ${f ? "pvx-standings-round-cell--dropped" : ""}`, children: [
1260
+ className: `pvx-td pvx-td--center pvx-hidden-below-md ${!f && (m == null ? void 0 : m.position) === 1 ? "pvx-standings-cell--p1" : !f && (m == null ? void 0 : m.position) === 2 ? "pvx-standings-cell--p2" : !f && (m == null ? void 0 : m.position) === 3 ? "pvx-standings-cell--p3" : ""}`,
1261
+ children: m ? /* @__PURE__ */ c("div", { className: `pvx-standings-round-cell ${f ? "pvx-standings-round-cell--dropped" : ""}`, children: [
1218
1262
  /* @__PURE__ */ c("span", { className: "pvx-standings-round-pos", children: [
1219
1263
  "P",
1220
- v.position
1264
+ m.position
1221
1265
  ] }),
1222
- /* @__PURE__ */ e("span", { className: "pvx-standings-round-pts", children: v.points })
1223
- ] }) : /* @__PURE__ */ e("span", { className: "pvx-td--muted", children: "-" })
1266
+ /* @__PURE__ */ n("span", { className: "pvx-standings-round-pts", children: m.points })
1267
+ ] }) : /* @__PURE__ */ n("span", { className: "pvx-td--muted", children: "-" })
1224
1268
  },
1225
1269
  l.roundNumber
1226
1270
  );
1227
1271
  })
1228
1272
  ] });
1229
1273
  }
1230
- function er({ competitionId: n, roundNumber: r, className: s }) {
1231
- var h;
1232
- const { data: t, isLoading: a } = je(n, r);
1274
+ function ot({ competitionId: e, roundNumber: t, className: s }) {
1275
+ var v;
1276
+ const { data: r, isLoading: a } = Ke(e, t);
1233
1277
  if (a)
1234
- return /* @__PURE__ */ e(U, { message: "Loading results..." });
1235
- if (!t)
1236
- return /* @__PURE__ */ e(P, { message: "No results for this round." });
1237
- const o = (t.sessions || []).find((l) => l.type === "RACE"), d = (h = o == null ? void 0 : o.results) == null ? void 0 : h.filter((l) => l.position <= 3).sort((l, v) => l.position - v.position);
1278
+ return /* @__PURE__ */ n(U, { message: "Loading results..." });
1279
+ if (!r)
1280
+ return /* @__PURE__ */ n(P, { message: "No results for this round." });
1281
+ const o = (r.sessions || []).find((l) => l.type === "RACE"), d = (v = o == null ? void 0 : o.results) == null ? void 0 : v.filter((l) => l.position <= 3).sort((l, m) => l.position - m.position);
1238
1282
  return /* @__PURE__ */ c("div", { className: `pvx-round-results ${s || ""}`, children: [
1239
1283
  /* @__PURE__ */ c("div", { className: "pvx-round-results-header", children: [
1240
1284
  /* @__PURE__ */ c("div", { children: [
1241
1285
  /* @__PURE__ */ c("h4", { className: "pvx-round-results-title", children: [
1242
1286
  "Round ",
1243
- t.roundNumber,
1244
- t.track ? `: ${t.track}` : ""
1287
+ r.roundNumber,
1288
+ r.track ? `: ${r.track}` : ""
1245
1289
  ] }),
1246
- t.startTime && /* @__PURE__ */ e("p", { className: "pvx-round-results-date", children: new Date(t.startTime).toLocaleDateString("en-GB", {
1290
+ r.startTime && /* @__PURE__ */ n("p", { className: "pvx-round-results-date", children: new Date(r.startTime).toLocaleDateString("en-GB", {
1247
1291
  day: "numeric",
1248
1292
  month: "long",
1249
1293
  year: "numeric"
1250
1294
  }) })
1251
1295
  ] }),
1252
- (d == null ? void 0 : d.length) > 0 && /* @__PURE__ */ e("div", { className: "pvx-round-podium-summary", children: d.map((l) => /* @__PURE__ */ c("span", { className: "pvx-round-podium-item", children: [
1253
- /* @__PURE__ */ e("span", { children: Ne[l.position - 1] }),
1254
- /* @__PURE__ */ e("span", { children: l.driverName })
1296
+ (d == null ? void 0 : d.length) > 0 && /* @__PURE__ */ n("div", { className: "pvx-round-podium-summary", children: d.map((l) => /* @__PURE__ */ c("span", { className: "pvx-round-podium-item", children: [
1297
+ /* @__PURE__ */ n("span", { children: se[l.position - 1] }),
1298
+ /* @__PURE__ */ n("span", { children: l.driverName })
1255
1299
  ] }, l.driverId)) })
1256
1300
  ] }),
1257
- /* @__PURE__ */ e(ke, { round: t })
1301
+ /* @__PURE__ */ n(Le, { round: r })
1258
1302
  ] });
1259
1303
  }
1260
- function ke({ round: n, className: r }) {
1261
- var d, h;
1262
- const [s, t] = D(null), a = (n == null ? void 0 : n.sessions) || [];
1304
+ function Le({ round: e, className: t }) {
1305
+ var d, v;
1306
+ const [s, r] = D(null), a = (e == null ? void 0 : e.sessions) || [];
1263
1307
  if (!a.length)
1264
- return /* @__PURE__ */ e(P, { message: "No session data for this round." });
1265
- const i = s || ((d = a.find((l) => l.type === "RACE")) == null ? void 0 : d.type) || ((h = a[0]) == null ? void 0 : h.type), o = a.find((l) => l.type === i) || a[0];
1266
- return /* @__PURE__ */ c("div", { className: r || "", children: [
1267
- /* @__PURE__ */ e(
1268
- Je,
1308
+ return /* @__PURE__ */ n(P, { message: "No session data for this round." });
1309
+ const i = s || ((d = a.find((l) => l.type === "RACE")) == null ? void 0 : d.type) || ((v = a[0]) == null ? void 0 : v.type), o = a.find((l) => l.type === i) || a[0];
1310
+ return /* @__PURE__ */ c("div", { className: t || "", children: [
1311
+ /* @__PURE__ */ n(
1312
+ Xe,
1269
1313
  {
1270
1314
  sessions: a,
1271
1315
  activeSession: i,
1272
- onSelect: t
1316
+ onSelect: r
1273
1317
  }
1274
1318
  ),
1275
- /* @__PURE__ */ e(on, { session: o })
1319
+ /* @__PURE__ */ n(mn, { session: o })
1276
1320
  ] });
1277
1321
  }
1278
- function on({ session: n }) {
1279
- var t;
1280
- const r = n.type === "RACE";
1281
- if (!((t = n.results) != null && t.length))
1282
- return /* @__PURE__ */ e(P, { message: `No results for ${n.type}.` });
1283
- const s = en(n.results);
1284
- return /* @__PURE__ */ e("div", { className: "pvx-table-scroll", children: /* @__PURE__ */ c("table", { className: "pvx-table", children: [
1285
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ c("tr", { className: "pvx-thead-row", children: [
1286
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-th--narrow", children: "Pos" }),
1287
- /* @__PURE__ */ e("th", { className: "pvx-th", children: "Driver" }),
1288
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-sm", children: "Car" }),
1289
- /* @__PURE__ */ e("th", { className: "pvx-th", children: "Best Lap" }),
1290
- r && /* @__PURE__ */ c(F, { children: [
1291
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-sm", children: "Laps" }),
1292
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-hidden-below-sm", children: "Time / Gap" }),
1293
- /* @__PURE__ */ e("th", { className: "pvx-th pvx-th--center", children: "Points" })
1322
+ function mn({ session: e }) {
1323
+ var r;
1324
+ const t = e.type === "RACE";
1325
+ if (!((r = e.results) != null && r.length))
1326
+ return /* @__PURE__ */ n(P, { message: `No results for ${e.type}.` });
1327
+ const s = tn(e.results);
1328
+ return /* @__PURE__ */ n("div", { className: "pvx-table-scroll", children: /* @__PURE__ */ c("table", { className: "pvx-table", children: [
1329
+ /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ c("tr", { className: "pvx-thead-row", children: [
1330
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-th--narrow", children: "Pos" }),
1331
+ /* @__PURE__ */ n("th", { className: "pvx-th", children: "Driver" }),
1332
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-sm", children: "Car" }),
1333
+ /* @__PURE__ */ n("th", { className: "pvx-th", children: "Best Lap" }),
1334
+ t && /* @__PURE__ */ c(F, { children: [
1335
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-sm", children: "Laps" }),
1336
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-hidden-below-sm", children: "Time / Gap" }),
1337
+ /* @__PURE__ */ n("th", { className: "pvx-th pvx-th--center", children: "Points" })
1294
1338
  ] })
1295
1339
  ] }) }),
1296
- /* @__PURE__ */ e("tbody", { className: "pvx-tbody", children: n.results.map((a, i) => /* @__PURE__ */ e(
1297
- cn,
1340
+ /* @__PURE__ */ n("tbody", { className: "pvx-tbody", children: e.results.map((a, i) => /* @__PURE__ */ n(
1341
+ vn,
1298
1342
  {
1299
1343
  result: a,
1300
- isRace: r,
1344
+ isRace: t,
1301
1345
  fastestSplits: s,
1302
1346
  rowIndex: i
1303
1347
  },
@@ -1305,120 +1349,120 @@ function on({ session: n }) {
1305
1349
  )) })
1306
1350
  ] }) });
1307
1351
  }
1308
- function cn({ result: n, isRace: r, fastestSplits: s, rowIndex: t }) {
1309
- const a = n.position <= 3;
1352
+ function vn({ result: e, isRace: t, fastestSplits: s, rowIndex: r }) {
1353
+ const a = e.position <= 3;
1310
1354
  return /* @__PURE__ */ c("tr", { className: `pvx-row ${a ? "pvx-row--podium" : ""}`, children: [
1311
- /* @__PURE__ */ e("td", { className: "pvx-td", children: /* @__PURE__ */ e(be, { position: n.position }) }),
1355
+ /* @__PURE__ */ n("td", { className: "pvx-td", children: /* @__PURE__ */ n(ke, { position: e.position }) }),
1312
1356
  /* @__PURE__ */ c("td", { className: "pvx-td pvx-td--primary", children: [
1313
- /* @__PURE__ */ e(ye, { nation: n.nation }),
1314
- n.driverName,
1315
- n.carNumber != null && /* @__PURE__ */ c("span", { className: "pvx-car-number", children: [
1357
+ /* @__PURE__ */ n(ae, { nation: e.nation }),
1358
+ e.driverName,
1359
+ e.carNumber != null && /* @__PURE__ */ c("span", { className: "pvx-car-number", children: [
1316
1360
  "#",
1317
- n.carNumber
1361
+ e.carNumber
1318
1362
  ] }),
1319
- n.penalty && /* @__PURE__ */ e("span", { className: "pvx-penalty", children: n.penalty })
1363
+ e.penalty && /* @__PURE__ */ n("span", { className: "pvx-penalty", children: e.penalty })
1320
1364
  ] }),
1321
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-hidden-below-sm", children: I(n.carId) }),
1322
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--mono", children: /* @__PURE__ */ e(
1323
- ln,
1365
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-hidden-below-sm", children: I(e.carId) }),
1366
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--mono", children: /* @__PURE__ */ n(
1367
+ hn,
1324
1368
  {
1325
- bestLap: n.bestLapFormatted,
1326
- hasBestLap: n.hasBestLap,
1327
- splits: n.splits,
1369
+ bestLap: e.bestLapFormatted,
1370
+ hasBestLap: e.hasBestLap,
1371
+ splits: e.splits,
1328
1372
  fastestSplits: s,
1329
- showAbove: t <= 1
1373
+ showAbove: r <= 1
1330
1374
  }
1331
1375
  ) }),
1332
- r && /* @__PURE__ */ c(F, { children: [
1333
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-hidden-below-sm", children: n.lapsCompleted }),
1334
- /* @__PURE__ */ e("td", { className: "pvx-td pvx-td--mono pvx-td--muted pvx-hidden-below-sm", children: n.position === 1 ? n.totalTime || "-" : n.gap || "-" }),
1376
+ t && /* @__PURE__ */ c(F, { children: [
1377
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-hidden-below-sm", children: e.lapsCompleted }),
1378
+ /* @__PURE__ */ n("td", { className: "pvx-td pvx-td--mono pvx-td--muted pvx-hidden-below-sm", children: e.position === 1 ? e.totalTime || "-" : e.gap || "-" }),
1335
1379
  /* @__PURE__ */ c("td", { className: "pvx-td pvx-td--center", children: [
1336
- /* @__PURE__ */ e("span", { className: "pvx-session-points", children: n.points }),
1337
- n.pointsOverride !== 0 && n.pointsOverride && /* @__PURE__ */ c("span", { className: "pvx-points-override", children: [
1380
+ /* @__PURE__ */ n("span", { className: "pvx-session-points", children: e.points }),
1381
+ e.pointsOverride !== 0 && e.pointsOverride && /* @__PURE__ */ c("span", { className: "pvx-points-override", children: [
1338
1382
  "(",
1339
- n.pointsOverride > 0 ? "+" : "",
1340
- n.pointsOverride,
1383
+ e.pointsOverride > 0 ? "+" : "",
1384
+ e.pointsOverride,
1341
1385
  ")"
1342
1386
  ] })
1343
1387
  ] })
1344
1388
  ] })
1345
1389
  ] });
1346
1390
  }
1347
- function ln({ bestLap: n, hasBestLap: r, splits: s, fastestSplits: t, showAbove: a }) {
1348
- return n ? /* @__PURE__ */ c("span", { className: `pvx-best-lap-cell ${r ? "pvx-best-lap-cell--fastest" : ""}`, children: [
1349
- /* @__PURE__ */ e("span", { className: "pvx-best-lap-time", children: n }),
1350
- (s == null ? void 0 : s.length) > 0 && /* @__PURE__ */ e("span", { className: "pvx-splits-tooltip-anchor", children: /* @__PURE__ */ e("span", { className: `pvx-splits-tooltip ${a ? "" : "pvx-splits-tooltip--above"}`, children: s.map((i, o) => {
1351
- const d = t && i === t[o];
1391
+ function hn({ bestLap: e, hasBestLap: t, splits: s, fastestSplits: r, showAbove: a }) {
1392
+ return e ? /* @__PURE__ */ c("span", { className: `pvx-best-lap-cell ${t ? "pvx-best-lap-cell--fastest" : ""}`, children: [
1393
+ /* @__PURE__ */ n("span", { className: "pvx-best-lap-time", children: e }),
1394
+ (s == null ? void 0 : s.length) > 0 && /* @__PURE__ */ n("span", { className: "pvx-splits-tooltip-anchor", children: /* @__PURE__ */ n("span", { className: `pvx-splits-tooltip ${a ? "" : "pvx-splits-tooltip--above"}`, children: s.map((i, o) => {
1395
+ const d = r && i === r[o];
1352
1396
  return /* @__PURE__ */ c("span", { className: "pvx-splits-tooltip-row", children: [
1353
1397
  /* @__PURE__ */ c("span", { className: "pvx-splits-tooltip-label", children: [
1354
1398
  "S",
1355
1399
  o + 1
1356
1400
  ] }),
1357
- /* @__PURE__ */ e("span", { className: d ? "pvx-splits-tooltip-best" : "", children: i })
1401
+ /* @__PURE__ */ n("span", { className: d ? "pvx-splits-tooltip-best" : "", children: i })
1358
1402
  ] }, o);
1359
1403
  }) }) })
1360
- ] }) : /* @__PURE__ */ e("span", { className: "pvx-td--muted", children: "-" });
1404
+ ] }) : /* @__PURE__ */ n("span", { className: "pvx-td--muted", children: "-" });
1361
1405
  }
1362
- function nr({ competitionId: n, className: r }) {
1363
- const { getSteamId: s } = k(), { data: t, isLoading: a } = pe(n), i = s();
1406
+ function ct({ competitionId: e, className: t }) {
1407
+ const { getSteamId: s } = k(), { data: r, isLoading: a } = ve(e), i = s();
1364
1408
  if (a)
1365
- return /* @__PURE__ */ e(U, { message: "Loading drivers..." });
1366
- const o = (t == null ? void 0 : t.drivers) || (t == null ? void 0 : t.entries) || [];
1367
- return o.length ? /* @__PURE__ */ e("div", { className: `pvx-entry-grid ${r || ""}`, children: o.map((d) => {
1368
- var l, v;
1369
- const h = i && d.steamId === i;
1370
- return /* @__PURE__ */ c("div", { className: `pvx-entry-card ${h ? "pvx-entry-card--you" : ""}`, children: [
1371
- d.avatarUrl ? /* @__PURE__ */ e(
1409
+ return /* @__PURE__ */ n(U, { message: "Loading drivers..." });
1410
+ const o = (r == null ? void 0 : r.drivers) || (r == null ? void 0 : r.entries) || [];
1411
+ return o.length ? /* @__PURE__ */ n("div", { className: `pvx-entry-grid ${t || ""}`, children: o.map((d) => {
1412
+ var l, m;
1413
+ const v = i && d.steamId === i;
1414
+ return /* @__PURE__ */ c("div", { className: `pvx-entry-card ${v ? "pvx-entry-card--you" : ""}`, children: [
1415
+ d.avatarUrl ? /* @__PURE__ */ n(
1372
1416
  "img",
1373
1417
  {
1374
1418
  src: d.avatarUrl,
1375
1419
  alt: "",
1376
1420
  className: "pvx-entry-avatar"
1377
1421
  }
1378
- ) : /* @__PURE__ */ e("div", { className: "pvx-entry-avatar pvx-entry-avatar--placeholder", children: ((v = (l = d.displayName) == null ? void 0 : l.charAt(0)) == null ? void 0 : v.toUpperCase()) || "?" }),
1422
+ ) : /* @__PURE__ */ n("div", { className: "pvx-entry-avatar pvx-entry-avatar--placeholder", children: ((m = (l = d.displayName) == null ? void 0 : l.charAt(0)) == null ? void 0 : m.toUpperCase()) || "?" }),
1379
1423
  /* @__PURE__ */ c("span", { className: "pvx-entry-name", children: [
1380
1424
  d.displayName,
1381
- h && /* @__PURE__ */ e("span", { className: "pvx-entry-you", children: " (you)" })
1425
+ v && /* @__PURE__ */ n("span", { className: "pvx-entry-you", children: " (you)" })
1382
1426
  ] })
1383
1427
  ] }, d.steamId || d.driverId);
1384
- }) }) : /* @__PURE__ */ e(P, { message: "No drivers registered yet." });
1428
+ }) }) : /* @__PURE__ */ n(P, { message: "No drivers registered yet." });
1385
1429
  }
1386
- function rr({
1387
- competitionId: n,
1388
- driverData: r,
1430
+ function lt({
1431
+ competitionId: e,
1432
+ driverData: t,
1389
1433
  className: s,
1390
- children: t
1434
+ children: r
1391
1435
  }) {
1392
- const { data: a, isLoading: i } = X(n), { isPowerMode: o } = ee(), d = ne(n), h = ue(n), l = me(n), v = (a == null ? void 0 : a.isRegistered) || !1, f = i || h.isPending || l.isPending, g = h.error || l.error || null, p = () => {
1393
- o && h.mutate(r || {});
1436
+ const { data: a, isLoading: i } = X(e), { isPowerMode: o } = ee(), d = ne(e), v = he(e), l = xe(e), m = (a == null ? void 0 : a.isRegistered) || !1, f = i || v.isPending || l.isPending, g = v.error || l.error || null, p = () => {
1437
+ o && v.mutate(t || {});
1394
1438
  }, b = () => {
1395
1439
  o && l.mutate();
1396
1440
  };
1397
- return typeof t == "function" ? t({ isRegistered: v, isLoading: f, register: p, withdraw: b, error: g, isPowerMode: o, registrationUrl: d }) : o ? /* @__PURE__ */ e(
1441
+ return typeof r == "function" ? r({ isRegistered: m, isLoading: f, register: p, withdraw: b, error: g, isPowerMode: o, registrationUrl: d }) : o ? /* @__PURE__ */ n(
1398
1442
  "button",
1399
1443
  {
1400
1444
  className: `pvx-comp-register-btn ${s || ""}`,
1401
- onClick: v ? b : p,
1445
+ onClick: m ? b : p,
1402
1446
  disabled: f,
1403
- children: f ? "Loading..." : v ? "Withdraw" : "Register"
1447
+ children: f ? "Loading..." : m ? "Withdraw" : "Register"
1404
1448
  }
1405
- ) : /* @__PURE__ */ e(
1449
+ ) : /* @__PURE__ */ n(
1406
1450
  "a",
1407
1451
  {
1408
1452
  href: d,
1409
1453
  target: "_blank",
1410
1454
  rel: "noopener noreferrer",
1411
1455
  className: `pvx-comp-register-link ${s || ""}`,
1412
- children: v ? "View Registration" : "Register on PitVox"
1456
+ children: m ? "View Registration" : "Register on PitVox"
1413
1457
  }
1414
1458
  );
1415
1459
  }
1416
- function tr({ competitionId: n, registration: r, onWithdrawSuccess: s, className: t }) {
1417
- const { getSteamId: a } = k(), { isPowerMode: i } = ee(), o = ne(n), { data: d, isLoading: h } = X(n), { data: l, isLoading: v } = pe(n), f = ue(n), g = me(n), p = a(), b = (d == null ? void 0 : d.isRegistered) || !1, x = (l == null ? void 0 : l.drivers) || (l == null ? void 0 : l.entries) || [], u = r || {}, N = x.length || u.currentCount || 0, m = u.maxParticipants && N >= u.maxParticipants, y = u.deadline && new Date(u.deadline) < /* @__PURE__ */ new Date(), C = u.isOpen && !y && !m;
1418
- return h || v ? /* @__PURE__ */ e(U, { message: "Loading registration..." }) : b ? /* @__PURE__ */ e("div", { className: `pvx-reg-panel ${t || ""}`, children: /* @__PURE__ */ e(
1419
- pn,
1460
+ function dt({ competitionId: e, registration: t, onWithdrawSuccess: s, className: r }) {
1461
+ const { getSteamId: a } = k(), { isPowerMode: i } = ee(), o = ne(e), { data: d, isLoading: v } = X(e), { data: l, isLoading: m } = ve(e), f = he(e), g = xe(e), p = a(), b = (d == null ? void 0 : d.isRegistered) || !1, x = (l == null ? void 0 : l.drivers) || (l == null ? void 0 : l.entries) || [], u = t || {}, N = x.length || u.currentCount || 0, h = u.maxParticipants && N >= u.maxParticipants, y = u.deadline && new Date(u.deadline) < /* @__PURE__ */ new Date(), C = u.isOpen && !y && !h;
1462
+ return v || m ? /* @__PURE__ */ n(U, { message: "Loading registration..." }) : b ? /* @__PURE__ */ n("div", { className: `pvx-reg-panel ${r || ""}`, children: /* @__PURE__ */ n(
1463
+ gn,
1420
1464
  {
1421
- competitionId: n,
1465
+ competitionId: e,
1422
1466
  drivers: x,
1423
1467
  steamId: p,
1424
1468
  isPowerMode: i,
@@ -1427,113 +1471,113 @@ function tr({ competitionId: n, registration: r, onWithdrawSuccess: s, className
1427
1471
  onWithdrawSuccess: s,
1428
1472
  registration: u
1429
1473
  }
1430
- ) }) : C ? p ? i ? /* @__PURE__ */ e("div", { className: `pvx-reg-panel ${t || ""}`, children: /* @__PURE__ */ e(
1431
- dn,
1474
+ ) }) : C ? p ? i ? /* @__PURE__ */ n("div", { className: `pvx-reg-panel ${r || ""}`, children: /* @__PURE__ */ n(
1475
+ xn,
1432
1476
  {
1433
- competitionId: n,
1477
+ competitionId: e,
1434
1478
  registerMutation: f,
1435
1479
  registration: u
1436
1480
  }
1437
- ) }) : /* @__PURE__ */ e("div", { className: `pvx-reg-panel ${t || ""}`, children: /* @__PURE__ */ e("a", { href: o, target: "_blank", rel: "noopener noreferrer", className: "pvx-comp-register-link", children: "Register on PitVox" }) }) : /* @__PURE__ */ e("div", { className: `pvx-reg-panel ${t || ""}`, children: i ? /* @__PURE__ */ e("div", { className: "pvx-reg-status-msg", children: "Sign in to register for this competition." }) : /* @__PURE__ */ e("div", { className: "pvx-reg-status-msg", children: /* @__PURE__ */ e("a", { href: o, target: "_blank", rel: "noopener noreferrer", className: "pvx-comp-register-link", children: "Register on PitVox" }) }) }) : /* @__PURE__ */ c("div", { className: `pvx-reg-panel ${t || ""}`, children: [
1438
- /* @__PURE__ */ e("div", { className: "pvx-reg-status-msg", children: m ? "Registration is full." : y ? "Registration deadline has passed." : "Registration is closed." }),
1439
- x.length > 0 && /* @__PURE__ */ e(we, { drivers: x, steamId: p })
1481
+ ) }) : /* @__PURE__ */ n("div", { className: `pvx-reg-panel ${r || ""}`, children: /* @__PURE__ */ n("a", { href: o, target: "_blank", rel: "noopener noreferrer", className: "pvx-comp-register-link", children: "Register on PitVox" }) }) : /* @__PURE__ */ n("div", { className: `pvx-reg-panel ${r || ""}`, children: i ? /* @__PURE__ */ n("div", { className: "pvx-reg-status-msg", children: "Sign in to register for this competition." }) : /* @__PURE__ */ n("div", { className: "pvx-reg-status-msg", children: /* @__PURE__ */ n("a", { href: o, target: "_blank", rel: "noopener noreferrer", className: "pvx-comp-register-link", children: "Register on PitVox" }) }) }) : /* @__PURE__ */ c("div", { className: `pvx-reg-panel ${r || ""}`, children: [
1482
+ /* @__PURE__ */ n("div", { className: "pvx-reg-status-msg", children: h ? "Registration is full." : y ? "Registration deadline has passed." : "Registration is closed." }),
1483
+ x.length > 0 && /* @__PURE__ */ n(Te, { drivers: x, steamId: p })
1440
1484
  ] });
1441
1485
  }
1442
- function dn({ competitionId: n, registerMutation: r, registration: s }) {
1443
- const [t, a] = D(""), [i, o] = D("intermediate"), [d, h] = D(""), l = (p) => {
1444
- p.preventDefault(), r.mutate({
1445
- discordUsername: t || void 0,
1486
+ function xn({ competitionId: e, registerMutation: t, registration: s }) {
1487
+ const [r, a] = D(""), [i, o] = D("intermediate"), [d, v] = D(""), l = (p) => {
1488
+ p.preventDefault(), t.mutate({
1489
+ discordUsername: r || void 0,
1446
1490
  experience: i,
1447
1491
  comments: d || void 0
1448
1492
  });
1449
- }, v = s || {}, f = v.currentCount || 0, g = v.maxParticipants;
1493
+ }, m = s || {}, f = m.currentCount || 0, g = m.maxParticipants;
1450
1494
  return /* @__PURE__ */ c("form", { className: "pvx-reg-form", onSubmit: l, children: [
1451
1495
  /* @__PURE__ */ c("div", { className: "pvx-reg-form-header", children: [
1452
- /* @__PURE__ */ e("h3", { className: "pvx-reg-form-title", children: "Register" }),
1453
- g && /* @__PURE__ */ e(Ce, { count: f, max: g })
1496
+ /* @__PURE__ */ n("h3", { className: "pvx-reg-form-title", children: "Register" }),
1497
+ g && /* @__PURE__ */ n(Re, { count: f, max: g })
1454
1498
  ] }),
1455
- r.error && /* @__PURE__ */ e("div", { className: "pvx-reg-error", children: r.error.message || "Registration failed" }),
1499
+ t.error && /* @__PURE__ */ n("div", { className: "pvx-reg-error", children: t.error.message || "Registration failed" }),
1456
1500
  /* @__PURE__ */ c("div", { className: "pvx-reg-field", children: [
1457
- /* @__PURE__ */ c("label", { className: "pvx-reg-label", htmlFor: `pvx-discord-${n}`, children: [
1501
+ /* @__PURE__ */ c("label", { className: "pvx-reg-label", htmlFor: `pvx-discord-${e}`, children: [
1458
1502
  "Discord Username ",
1459
- /* @__PURE__ */ e("span", { className: "pvx-reg-optional", children: "(optional)" })
1503
+ /* @__PURE__ */ n("span", { className: "pvx-reg-optional", children: "(optional)" })
1460
1504
  ] }),
1461
- /* @__PURE__ */ e(
1505
+ /* @__PURE__ */ n(
1462
1506
  "input",
1463
1507
  {
1464
- id: `pvx-discord-${n}`,
1508
+ id: `pvx-discord-${e}`,
1465
1509
  type: "text",
1466
1510
  className: "pvx-reg-input",
1467
1511
  placeholder: "e.g. username",
1468
- value: t,
1512
+ value: r,
1469
1513
  onChange: (p) => a(p.target.value)
1470
1514
  }
1471
1515
  )
1472
1516
  ] }),
1473
1517
  /* @__PURE__ */ c("div", { className: "pvx-reg-field", children: [
1474
- /* @__PURE__ */ e("label", { className: "pvx-reg-label", htmlFor: `pvx-exp-${n}`, children: "Experience Level" }),
1518
+ /* @__PURE__ */ n("label", { className: "pvx-reg-label", htmlFor: `pvx-exp-${e}`, children: "Experience Level" }),
1475
1519
  /* @__PURE__ */ c(
1476
1520
  "select",
1477
1521
  {
1478
- id: `pvx-exp-${n}`,
1522
+ id: `pvx-exp-${e}`,
1479
1523
  className: "pvx-reg-select",
1480
1524
  value: i,
1481
1525
  onChange: (p) => o(p.target.value),
1482
1526
  children: [
1483
- /* @__PURE__ */ e("option", { value: "beginner", children: "Beginner" }),
1484
- /* @__PURE__ */ e("option", { value: "intermediate", children: "Intermediate" }),
1485
- /* @__PURE__ */ e("option", { value: "advanced", children: "Advanced" })
1527
+ /* @__PURE__ */ n("option", { value: "beginner", children: "Beginner" }),
1528
+ /* @__PURE__ */ n("option", { value: "intermediate", children: "Intermediate" }),
1529
+ /* @__PURE__ */ n("option", { value: "advanced", children: "Advanced" })
1486
1530
  ]
1487
1531
  }
1488
1532
  )
1489
1533
  ] }),
1490
1534
  /* @__PURE__ */ c("div", { className: "pvx-reg-field", children: [
1491
- /* @__PURE__ */ c("label", { className: "pvx-reg-label", htmlFor: `pvx-comments-${n}`, children: [
1535
+ /* @__PURE__ */ c("label", { className: "pvx-reg-label", htmlFor: `pvx-comments-${e}`, children: [
1492
1536
  "Comments ",
1493
- /* @__PURE__ */ e("span", { className: "pvx-reg-optional", children: "(optional)" })
1537
+ /* @__PURE__ */ n("span", { className: "pvx-reg-optional", children: "(optional)" })
1494
1538
  ] }),
1495
- /* @__PURE__ */ e(
1539
+ /* @__PURE__ */ n(
1496
1540
  "textarea",
1497
1541
  {
1498
- id: `pvx-comments-${n}`,
1542
+ id: `pvx-comments-${e}`,
1499
1543
  className: "pvx-reg-textarea",
1500
1544
  rows: 3,
1501
1545
  placeholder: "Anything the organisers should know?",
1502
1546
  value: d,
1503
- onChange: (p) => h(p.target.value)
1547
+ onChange: (p) => v(p.target.value)
1504
1548
  }
1505
1549
  )
1506
1550
  ] }),
1507
- /* @__PURE__ */ e("div", { className: "pvx-reg-actions", children: /* @__PURE__ */ e(
1551
+ /* @__PURE__ */ n("div", { className: "pvx-reg-actions", children: /* @__PURE__ */ n(
1508
1552
  "button",
1509
1553
  {
1510
1554
  type: "submit",
1511
1555
  className: "pvx-comp-register-btn",
1512
- disabled: r.isPending,
1513
- children: r.isPending ? "Registering..." : "Register"
1556
+ disabled: t.isPending,
1557
+ children: t.isPending ? "Registering..." : "Register"
1514
1558
  }
1515
1559
  ) })
1516
1560
  ] });
1517
1561
  }
1518
- function pn({ competitionId: n, drivers: r, steamId: s, isPowerMode: t, registrationUrl: a, withdrawMutation: i, onWithdrawSuccess: o, registration: d }) {
1519
- const [h, l] = D(!1), v = () => {
1562
+ function gn({ competitionId: e, drivers: t, steamId: s, isPowerMode: r, registrationUrl: a, withdrawMutation: i, onWithdrawSuccess: o, registration: d }) {
1563
+ const [v, l] = D(!1), m = () => {
1520
1564
  i.mutate(void 0, {
1521
1565
  onSuccess: () => {
1522
1566
  l(!1), o && o();
1523
1567
  }
1524
1568
  });
1525
- }, f = d || {}, g = r.length || f.currentCount || 0, p = f.maxParticipants;
1569
+ }, f = d || {}, g = t.length || f.currentCount || 0, p = f.maxParticipants;
1526
1570
  return /* @__PURE__ */ c(F, { children: [
1527
1571
  /* @__PURE__ */ c("div", { className: "pvx-reg-form-header", children: [
1528
- /* @__PURE__ */ e("h3", { className: "pvx-reg-form-title", children: "Registered Drivers" }),
1529
- p && /* @__PURE__ */ e(Ce, { count: g, max: p })
1572
+ /* @__PURE__ */ n("h3", { className: "pvx-reg-form-title", children: "Registered Drivers" }),
1573
+ p && /* @__PURE__ */ n(Re, { count: g, max: p })
1530
1574
  ] }),
1531
- /* @__PURE__ */ e(we, { drivers: r, steamId: s }),
1532
- i.error && /* @__PURE__ */ e("div", { className: "pvx-reg-error", children: i.error.message || "Withdrawal failed" }),
1533
- t ? /* @__PURE__ */ e("div", { className: "pvx-reg-actions", children: h ? /* @__PURE__ */ c("div", { className: "pvx-reg-confirm", children: [
1534
- /* @__PURE__ */ e("p", { className: "pvx-reg-confirm-text", children: "Are you sure you want to unregister?" }),
1575
+ /* @__PURE__ */ n(Te, { drivers: t, steamId: s }),
1576
+ i.error && /* @__PURE__ */ n("div", { className: "pvx-reg-error", children: i.error.message || "Withdrawal failed" }),
1577
+ r ? /* @__PURE__ */ n("div", { className: "pvx-reg-actions", children: v ? /* @__PURE__ */ c("div", { className: "pvx-reg-confirm", children: [
1578
+ /* @__PURE__ */ n("p", { className: "pvx-reg-confirm-text", children: "Are you sure you want to unregister?" }),
1535
1579
  /* @__PURE__ */ c("div", { className: "pvx-reg-confirm-actions", children: [
1536
- /* @__PURE__ */ e(
1580
+ /* @__PURE__ */ n(
1537
1581
  "button",
1538
1582
  {
1539
1583
  type: "button",
@@ -1542,18 +1586,18 @@ function pn({ competitionId: n, drivers: r, steamId: s, isPowerMode: t, registra
1542
1586
  children: "Cancel"
1543
1587
  }
1544
1588
  ),
1545
- /* @__PURE__ */ e(
1589
+ /* @__PURE__ */ n(
1546
1590
  "button",
1547
1591
  {
1548
1592
  type: "button",
1549
1593
  className: "pvx-reg-danger-btn",
1550
- onClick: v,
1594
+ onClick: m,
1551
1595
  disabled: i.isPending,
1552
1596
  children: i.isPending ? "Unregistering..." : "Yes, Unregister"
1553
1597
  }
1554
1598
  )
1555
1599
  ] })
1556
- ] }) : /* @__PURE__ */ e(
1600
+ ] }) : /* @__PURE__ */ n(
1557
1601
  "button",
1558
1602
  {
1559
1603
  type: "button",
@@ -1561,64 +1605,64 @@ function pn({ competitionId: n, drivers: r, steamId: s, isPowerMode: t, registra
1561
1605
  onClick: () => l(!0),
1562
1606
  children: "Unregister"
1563
1607
  }
1564
- ) }) : /* @__PURE__ */ e("div", { className: "pvx-reg-actions", children: /* @__PURE__ */ e("a", { href: a, target: "_blank", rel: "noopener noreferrer", className: "pvx-comp-register-link", children: "Manage on PitVox" }) })
1608
+ ) }) : /* @__PURE__ */ n("div", { className: "pvx-reg-actions", children: /* @__PURE__ */ n("a", { href: a, target: "_blank", rel: "noopener noreferrer", className: "pvx-comp-register-link", children: "Manage on PitVox" }) })
1565
1609
  ] });
1566
1610
  }
1567
- function we({ drivers: n, steamId: r }) {
1568
- if (!n.length)
1569
- return /* @__PURE__ */ e("div", { className: "pvx-reg-no-drivers", children: "No drivers registered yet." });
1570
- const s = [...n].sort((t, a) => {
1571
- const i = r && t.steamId === r ? -1 : 0, o = r && a.steamId === r ? -1 : 0;
1611
+ function Te({ drivers: e, steamId: t }) {
1612
+ if (!e.length)
1613
+ return /* @__PURE__ */ n("div", { className: "pvx-reg-no-drivers", children: "No drivers registered yet." });
1614
+ const s = [...e].sort((r, a) => {
1615
+ const i = t && r.steamId === t ? -1 : 0, o = t && a.steamId === t ? -1 : 0;
1572
1616
  return i - o;
1573
1617
  });
1574
- return /* @__PURE__ */ e("div", { className: "pvx-reg-driver-list", children: s.map((t) => {
1618
+ return /* @__PURE__ */ n("div", { className: "pvx-reg-driver-list", children: s.map((r) => {
1575
1619
  var i, o;
1576
- const a = r && t.steamId === r;
1620
+ const a = t && r.steamId === t;
1577
1621
  return /* @__PURE__ */ c(
1578
1622
  "div",
1579
1623
  {
1580
1624
  className: `pvx-reg-driver-row ${a ? "pvx-reg-driver-row--you" : ""}`,
1581
1625
  children: [
1582
- t.avatarUrl ? /* @__PURE__ */ e("img", { src: t.avatarUrl, alt: "", className: "pvx-reg-driver-avatar" }) : /* @__PURE__ */ e("div", { className: "pvx-reg-driver-avatar pvx-reg-driver-avatar--placeholder", children: ((o = (i = t.displayName) == null ? void 0 : i.charAt(0)) == null ? void 0 : o.toUpperCase()) || "?" }),
1626
+ r.avatarUrl ? /* @__PURE__ */ n("img", { src: r.avatarUrl, alt: "", className: "pvx-reg-driver-avatar" }) : /* @__PURE__ */ n("div", { className: "pvx-reg-driver-avatar pvx-reg-driver-avatar--placeholder", children: ((o = (i = r.displayName) == null ? void 0 : i.charAt(0)) == null ? void 0 : o.toUpperCase()) || "?" }),
1583
1627
  /* @__PURE__ */ c("span", { className: "pvx-reg-driver-name", children: [
1584
- t.displayName,
1585
- a && /* @__PURE__ */ e("span", { className: "pvx-entry-you", children: " (you)" })
1628
+ r.displayName,
1629
+ a && /* @__PURE__ */ n("span", { className: "pvx-entry-you", children: " (you)" })
1586
1630
  ] })
1587
1631
  ]
1588
1632
  },
1589
- t.steamId || t.driverId
1633
+ r.steamId || r.driverId
1590
1634
  );
1591
1635
  }) });
1592
1636
  }
1593
- function Ce({ count: n, max: r }) {
1594
- const s = r ? n / r * 100 : 0, t = s >= 100 ? "full" : s >= 75 ? "warning" : "ok";
1595
- return /* @__PURE__ */ c("span", { className: `pvx-reg-capacity pvx-reg-capacity--${t}`, children: [
1596
- n,
1637
+ function Re({ count: e, max: t }) {
1638
+ const s = t ? e / t * 100 : 0, r = s >= 100 ? "full" : s >= 75 ? "warning" : "ok";
1639
+ return /* @__PURE__ */ c("span", { className: `pvx-reg-capacity pvx-reg-capacity--${r}`, children: [
1640
+ e,
1597
1641
  "/",
1598
- r,
1642
+ t,
1599
1643
  " drivers"
1600
1644
  ] });
1601
1645
  }
1602
- function sr({ competitionId: n, className: r }) {
1603
- const { data: s, isLoading: t } = de(n), a = (s == null ? void 0 : s.type) === "championship", i = w(
1646
+ function pt({ competitionId: e, className: t }) {
1647
+ const { data: s, isLoading: r } = ue(e), a = (s == null ? void 0 : s.type) === "championship", i = L(
1604
1648
  () => {
1605
1649
  var u;
1606
1650
  return ((u = s == null ? void 0 : s.rounds) == null ? void 0 : u.filter((N) => N.isFinalized)) || [];
1607
1651
  },
1608
1652
  [s]
1609
- ), o = w(
1653
+ ), o = L(
1610
1654
  () => i.map((u) => u.roundNumber),
1611
1655
  [i]
1612
- ), { data: d = [], isLoading: h } = Ve(
1613
- n,
1656
+ ), { data: d = [], isLoading: v } = He(
1657
+ e,
1614
1658
  o
1615
- ), l = a ? "standings" : o.length > 0 ? `round-${o[o.length - 1]}` : null, [v, f] = D(null), g = v || l;
1616
- if (t || h)
1617
- return /* @__PURE__ */ e(U, { message: "Loading results..." });
1659
+ ), l = a ? "standings" : o.length > 0 ? `round-${o[o.length - 1]}` : null, [m, f] = D(null), g = m || l;
1660
+ if (r || v)
1661
+ return /* @__PURE__ */ n(U, { message: "Loading results..." });
1618
1662
  if (!s)
1619
- return /* @__PURE__ */ e(P, { message: "Competition not found." });
1663
+ return /* @__PURE__ */ n(P, { message: "Competition not found." });
1620
1664
  if (!i.length)
1621
- return /* @__PURE__ */ e(P, { message: "No results available yet. Results will appear here once rounds are finalised." });
1665
+ return /* @__PURE__ */ n(P, { message: "No results available yet. Results will appear here once rounds are finalised." });
1622
1666
  const p = new Map(d.map((u) => [`round-${u.roundNumber}`, u])), b = [];
1623
1667
  a && b.push({ id: "standings", label: "Standings" });
1624
1668
  for (const u of i)
@@ -1628,158 +1672,158 @@ function sr({ competitionId: n, className: r }) {
1628
1672
  track: null
1629
1673
  });
1630
1674
  const x = p.get(g);
1631
- return /* @__PURE__ */ c("div", { className: r || "", children: [
1632
- /* @__PURE__ */ e("div", { className: "pvx-results-tabs", children: b.map((u) => /* @__PURE__ */ c(
1675
+ return /* @__PURE__ */ c("div", { className: t || "", children: [
1676
+ /* @__PURE__ */ n("div", { className: "pvx-results-tabs", children: b.map((u) => /* @__PURE__ */ c(
1633
1677
  "button",
1634
1678
  {
1635
1679
  className: `pvx-results-tab ${g === u.id ? "pvx-results-tab--active" : ""}`,
1636
1680
  onClick: () => f(u.id),
1637
1681
  title: u.track || void 0,
1638
1682
  children: [
1639
- /* @__PURE__ */ e("span", { className: "pvx-results-tab-label", children: u.label }),
1640
- u.track && /* @__PURE__ */ e("span", { className: "pvx-results-tab-track", children: u.track })
1683
+ /* @__PURE__ */ n("span", { className: "pvx-results-tab-label", children: u.label }),
1684
+ u.track && /* @__PURE__ */ n("span", { className: "pvx-results-tab-track", children: u.track })
1641
1685
  ]
1642
1686
  },
1643
1687
  u.id
1644
1688
  )) }),
1645
- g === "standings" ? /* @__PURE__ */ e(sn, { competitionId: n }) : x ? /* @__PURE__ */ e(un, { round: x }) : /* @__PURE__ */ e(P, { message: "No results for this round." })
1689
+ g === "standings" ? /* @__PURE__ */ n(pn, { competitionId: e }) : x ? /* @__PURE__ */ n(fn, { round: x }) : /* @__PURE__ */ n(P, { message: "No results for this round." })
1646
1690
  ] });
1647
1691
  }
1648
- function un({ round: n }) {
1692
+ function fn({ round: e }) {
1649
1693
  var a;
1650
- const s = (n.sessions || []).find((i) => i.type === "RACE"), t = (a = s == null ? void 0 : s.results) == null ? void 0 : a.filter((i) => i.position <= 3).sort((i, o) => i.position - o.position);
1694
+ const s = (e.sessions || []).find((i) => i.type === "RACE"), r = (a = s == null ? void 0 : s.results) == null ? void 0 : a.filter((i) => i.position <= 3).sort((i, o) => i.position - o.position);
1651
1695
  return /* @__PURE__ */ c("div", { className: "pvx-card", children: [
1652
1696
  /* @__PURE__ */ c("div", { className: "pvx-card-header--split", children: [
1653
1697
  /* @__PURE__ */ c("div", { children: [
1654
1698
  /* @__PURE__ */ c("h4", { className: "pvx-card-title", children: [
1655
1699
  "Round ",
1656
- n.roundNumber,
1657
- n.track ? `: ${n.track}` : ""
1700
+ e.roundNumber,
1701
+ e.track ? `: ${e.track}` : ""
1658
1702
  ] }),
1659
- n.startTime && /* @__PURE__ */ e("span", { className: "pvx-standings-subtitle", children: new Date(n.startTime).toLocaleDateString("en-GB", {
1703
+ e.startTime && /* @__PURE__ */ n("span", { className: "pvx-standings-subtitle", children: new Date(e.startTime).toLocaleDateString("en-GB", {
1660
1704
  day: "numeric",
1661
1705
  month: "long",
1662
1706
  year: "numeric"
1663
1707
  }) })
1664
1708
  ] }),
1665
- (t == null ? void 0 : t.length) > 0 && /* @__PURE__ */ e("div", { className: "pvx-round-podium-summary", children: t.map((i) => /* @__PURE__ */ c("span", { className: "pvx-round-podium-item", children: [
1666
- /* @__PURE__ */ e("span", { children: Ne[i.position - 1] }),
1667
- /* @__PURE__ */ e("span", { children: i.driverName })
1709
+ (r == null ? void 0 : r.length) > 0 && /* @__PURE__ */ n("div", { className: "pvx-round-podium-summary", children: r.map((i) => /* @__PURE__ */ c("span", { className: "pvx-round-podium-item", children: [
1710
+ /* @__PURE__ */ n("span", { children: se[i.position - 1] }),
1711
+ /* @__PURE__ */ n("span", { children: i.driverName })
1668
1712
  ] }, i.driverId)) })
1669
1713
  ] }),
1670
- /* @__PURE__ */ e(ke, { round: n })
1714
+ /* @__PURE__ */ n(Le, { round: e })
1671
1715
  ] });
1672
1716
  }
1673
- function mn(n) {
1674
- const { cdnUrl: r } = k(), s = L({
1675
- queryKey: ["pitvox", "laps", "global", n, "index"],
1676
- queryFn: () => T(r, Ae(null, n)),
1677
- enabled: !!n,
1717
+ function Nn(e) {
1718
+ const { cdnUrl: t } = k(), s = R({
1719
+ queryKey: ["pitvox", "laps", "global", e, "index"],
1720
+ queryFn: () => S(t, Fe(null, e)),
1721
+ enabled: !!e,
1678
1722
  staleTime: 3e4,
1679
1723
  refetchInterval: 3e4
1680
- }), t = s.data;
1724
+ }), r = s.data;
1681
1725
  return {
1682
1726
  isLoading: s.isLoading,
1683
1727
  error: s.error,
1684
- data: t ? {
1685
- driverName: t.driverName || "Driver",
1686
- lapCount: t.lapCount || 0,
1687
- trackBreakdown: t.trackBreakdown || [],
1688
- carBreakdown: t.carBreakdown || [],
1689
- recordsHeld: t.recordsHeld || 0,
1690
- currentRecords: t.currentRecords || [],
1691
- bestRanking: t.bestRanking ?? null,
1692
- bestRankingTrackId: t.bestRankingTrackId ?? null,
1693
- bestRankingLayout: t.bestRankingLayout ?? null,
1694
- bestRankingCarId: t.bestRankingCarId ?? null,
1695
- generatedAt: t.generatedAt
1728
+ data: r ? {
1729
+ driverName: r.driverName || "Driver",
1730
+ lapCount: r.lapCount || 0,
1731
+ trackBreakdown: r.trackBreakdown || [],
1732
+ carBreakdown: r.carBreakdown || [],
1733
+ recordsHeld: r.recordsHeld || 0,
1734
+ currentRecords: r.currentRecords || [],
1735
+ bestRanking: r.bestRanking ?? null,
1736
+ bestRankingTrackId: r.bestRankingTrackId ?? null,
1737
+ bestRankingLayout: r.bestRankingLayout ?? null,
1738
+ bestRankingCarId: r.bestRankingCarId ?? null,
1739
+ generatedAt: r.generatedAt
1696
1740
  } : null
1697
1741
  };
1698
1742
  }
1699
- function Le(n = {}) {
1700
- const { cdnUrl: r, partnerSlug: s } = k(), { game: t, gameVersion: a, enabled: i = !0 } = n, o = Z(s, t, a, "ratings.json");
1701
- return L({
1702
- queryKey: ["pitvox", "ratings", s, t || null, a || null],
1703
- queryFn: () => T(r, o),
1743
+ function Se(e = {}) {
1744
+ const { cdnUrl: t, partnerSlug: s } = k(), { game: r, gameVersion: a, enabled: i = !0 } = e, o = Z(s, r, a, "ratings.json");
1745
+ return R({
1746
+ queryKey: ["pitvox", "ratings", s, r || null, a || null],
1747
+ queryFn: () => S(t, o),
1704
1748
  staleTime: 3e4,
1705
1749
  refetchInterval: 3e4,
1706
1750
  enabled: i
1707
1751
  });
1708
1752
  }
1709
- function vn(n) {
1710
- var t;
1711
- const r = Le(), s = w(() => {
1753
+ function bn(e) {
1754
+ var r;
1755
+ const t = Se(), s = L(() => {
1712
1756
  var a;
1713
- return !((a = r.data) != null && a.drivers) || !n ? null : r.data.drivers.find(
1714
- (i) => i.identifier === n
1757
+ return !((a = t.data) != null && a.drivers) || !e ? null : t.data.drivers.find(
1758
+ (i) => i.identifier === e
1715
1759
  ) || null;
1716
- }, [(t = r.data) == null ? void 0 : t.drivers, n]);
1760
+ }, [(r = t.data) == null ? void 0 : r.drivers, e]);
1717
1761
  return {
1718
- isLoading: r.isLoading,
1719
- error: r.error,
1762
+ isLoading: t.isLoading,
1763
+ error: t.error,
1720
1764
  data: s ? {
1721
1765
  rating: s.rating,
1722
1766
  rank: s.rank,
1723
- totalDrivers: r.data.driverCount || r.data.drivers.length,
1767
+ totalDrivers: t.data.driverCount || t.data.drivers.length,
1724
1768
  comboCount: s.comboCount || 0,
1725
1769
  distinctCars: s.distinctCars || 0,
1726
1770
  combos: s.combos || []
1727
1771
  } : null
1728
1772
  };
1729
1773
  }
1730
- function ar(n = {}) {
1731
- const r = Le(n);
1774
+ function ut(e = {}) {
1775
+ const t = Se(e);
1732
1776
  return {
1733
- data: r.data || null,
1734
- isLoading: r.isLoading,
1735
- error: r.error
1777
+ data: t.data || null,
1778
+ isLoading: t.isLoading,
1779
+ error: t.error
1736
1780
  };
1737
1781
  }
1738
- function hn() {
1739
- const { cdnUrl: n, partnerSlug: r, getSteamId: s, onFetchServerPassword: t } = k(), a = s(), { data: i, isLoading: o } = L({
1740
- queryKey: ["pitvox", "competitions", r],
1782
+ function yn() {
1783
+ const { cdnUrl: e, partnerSlug: t, getSteamId: s, onFetchServerPassword: r } = k(), a = s(), { data: i, isLoading: o } = R({
1784
+ queryKey: ["pitvox", "competitions", t],
1741
1785
  queryFn: async () => {
1742
- const p = await T(n, "competitions/index.json");
1743
- return p != null && p.competitions ? p.competitions.filter((b) => b.partnerSlug === r) : [];
1786
+ const p = await S(e, "competitions/index.json");
1787
+ return p != null && p.competitions ? p.competitions.filter((b) => b.partnerSlug === t) : [];
1744
1788
  },
1745
1789
  staleTime: 6e4
1746
- }), d = (i == null ? void 0 : i.map((p) => p.id)) || [], h = se({
1790
+ }), d = (i == null ? void 0 : i.map((p) => p.id)) || [], v = ie({
1747
1791
  queries: d.map((p) => ({
1748
- queryKey: ["pitvox", "competition", r, p, "entrylist"],
1749
- queryFn: () => T(n, `competitions/${r}/${p}/entrylist.json`),
1792
+ queryKey: ["pitvox", "competition", t, p, "entrylist"],
1793
+ queryFn: () => S(e, `competitions/${t}/${p}/entrylist.json`),
1750
1794
  enabled: !!a && d.length > 0,
1751
1795
  staleTime: 6e4
1752
1796
  }))
1753
- }), l = h.some((p) => p.isLoading), v = w(() => {
1797
+ }), l = v.some((p) => p.isLoading), m = L(() => {
1754
1798
  var x, u;
1755
1799
  if (!i || !a || l) return [];
1756
1800
  const p = /* @__PURE__ */ new Date(), b = [];
1757
1801
  for (let N = 0; N < i.length; N++) {
1758
- const m = i[N], y = (x = h[N]) == null ? void 0 : x.data;
1759
- if (!((u = y == null ? void 0 : y.drivers) == null ? void 0 : u.some((R) => R.steamId === a))) continue;
1760
- const M = m.rounds || [];
1761
- for (const R of M)
1762
- R.isFinalized || !R.startTime || new Date(R.startTime) <= p || b.push({
1763
- competitionId: m.id,
1764
- competitionName: m.name,
1765
- roundNumber: R.roundNumber,
1766
- track: R.track || "TBD",
1767
- startTime: R.startTime
1802
+ const h = i[N], y = (x = v[N]) == null ? void 0 : x.data;
1803
+ if (!((u = y == null ? void 0 : y.drivers) == null ? void 0 : u.some((T) => T.steamId === a))) continue;
1804
+ const w = h.rounds || [];
1805
+ for (const T of w)
1806
+ T.isFinalized || !T.startTime || new Date(T.startTime) <= p || b.push({
1807
+ competitionId: h.id,
1808
+ competitionName: h.name,
1809
+ roundNumber: T.roundNumber,
1810
+ track: T.track || "TBD",
1811
+ startTime: T.startTime
1768
1812
  });
1769
1813
  }
1770
- return b.sort((N, m) => new Date(N.startTime) - new Date(m.startTime)), b.length > 0 && (b[0].isNext = !0), b;
1771
- }, [i, a, l, h]), f = se({
1772
- queries: v.map((p) => ({
1814
+ return b.sort((N, h) => new Date(N.startTime) - new Date(h.startTime)), b.length > 0 && (b[0].isNext = !0), b;
1815
+ }, [i, a, l, v]), f = ie({
1816
+ queries: m.map((p) => ({
1773
1817
  queryKey: ["pitvox", "serverInfo", p.competitionId, p.roundNumber],
1774
- queryFn: () => t(p.competitionId, p.roundNumber),
1775
- enabled: !!t && v.length > 0,
1818
+ queryFn: () => r(p.competitionId, p.roundNumber),
1819
+ enabled: !!r && m.length > 0,
1776
1820
  staleTime: 5 * 6e4,
1777
1821
  // 5 minutes
1778
1822
  retry: !1
1779
1823
  }))
1780
1824
  });
1781
1825
  return {
1782
- data: w(() => v.length ? t ? v.map((p, b) => {
1826
+ data: L(() => m.length ? r ? m.map((p, b) => {
1783
1827
  var u;
1784
1828
  const x = (u = f[b]) == null ? void 0 : u.data;
1785
1829
  return x != null && x.success ? {
@@ -1787,46 +1831,46 @@ function hn() {
1787
1831
  serverAddress: x.serverAddress || null,
1788
1832
  serverPassword: x.serverPassword || null
1789
1833
  } : p;
1790
- }) : v : [], [v, t, f]),
1834
+ }) : m : [], [m, r, f]),
1791
1835
  isLoading: o || !!a && l
1792
1836
  };
1793
1837
  }
1794
- function xn() {
1795
- const { onFetchNotifications: n } = k();
1796
- return !!n;
1797
- }
1798
- function gn(n = {}) {
1799
- const { onFetchNotifications: r, partnerSlug: s } = k(), { limit: t = 20, unreadOnly: a = !1 } = n;
1800
- return L({
1801
- queryKey: ["pitvox", "notifications", s, { limit: t, unreadOnly: a }],
1802
- queryFn: () => r({ limit: t, unreadOnly: a }),
1803
- enabled: !!r,
1838
+ function kn() {
1839
+ const { onFetchNotifications: e } = k();
1840
+ return !!e;
1841
+ }
1842
+ function wn(e = {}) {
1843
+ const { onFetchNotifications: t, partnerSlug: s } = k(), { limit: r = 20, unreadOnly: a = !1 } = e;
1844
+ return R({
1845
+ queryKey: ["pitvox", "notifications", s, { limit: r, unreadOnly: a }],
1846
+ queryFn: () => t({ limit: r, unreadOnly: a }),
1847
+ enabled: !!t,
1804
1848
  staleTime: 3e4,
1805
1849
  refetchInterval: 3e4
1806
1850
  });
1807
1851
  }
1808
- function ir() {
1809
- const { onFetchNotifications: n, partnerSlug: r } = k(), { data: s, isLoading: t } = L({
1810
- queryKey: ["pitvox", "notifications", r, { limit: 1, unreadOnly: !1 }],
1811
- queryFn: () => n({ limit: 1 }),
1812
- enabled: !!n,
1852
+ function mt() {
1853
+ const { onFetchNotifications: e, partnerSlug: t } = k(), { data: s, isLoading: r } = R({
1854
+ queryKey: ["pitvox", "notifications", t, { limit: 1, unreadOnly: !1 }],
1855
+ queryFn: () => e({ limit: 1 }),
1856
+ enabled: !!e,
1813
1857
  staleTime: 3e4,
1814
1858
  refetchInterval: 3e4,
1815
1859
  select: (a) => (a == null ? void 0 : a.unreadCount) ?? 0
1816
1860
  });
1817
- return { count: s ?? 0, isLoading: t };
1861
+ return { count: s ?? 0, isLoading: r };
1818
1862
  }
1819
- function fn() {
1820
- const { onMarkNotificationRead: n, partnerSlug: r } = k(), s = _();
1821
- return W({
1822
- mutationFn: (t) => {
1823
- if (!n)
1863
+ function Cn() {
1864
+ const { onMarkNotificationRead: e, partnerSlug: t } = k(), s = _();
1865
+ return O({
1866
+ mutationFn: (r) => {
1867
+ if (!e)
1824
1868
  throw new Error("No onMarkNotificationRead callback provided to PitVoxPartnerProvider.");
1825
- return n(t);
1869
+ return e(r);
1826
1870
  },
1827
- onSuccess: (t, a) => {
1871
+ onSuccess: (r, a) => {
1828
1872
  s.setQueriesData(
1829
- { queryKey: ["pitvox", "notifications", r] },
1873
+ { queryKey: ["pitvox", "notifications", t] },
1830
1874
  (i) => i != null && i.notifications ? {
1831
1875
  ...i,
1832
1876
  unreadCount: Math.max(0, (i.unreadCount || 0) - 1),
@@ -1838,36 +1882,36 @@ function fn() {
1838
1882
  }
1839
1883
  });
1840
1884
  }
1841
- function Nn() {
1842
- const { onMarkAllNotificationsRead: n, partnerSlug: r } = k(), s = _();
1843
- return W({
1885
+ function Ln() {
1886
+ const { onMarkAllNotificationsRead: e, partnerSlug: t } = k(), s = _();
1887
+ return O({
1844
1888
  mutationFn: () => {
1845
- if (!n)
1889
+ if (!e)
1846
1890
  throw new Error("No onMarkAllNotificationsRead callback provided to PitVoxPartnerProvider.");
1847
- return n();
1891
+ return e();
1848
1892
  },
1849
1893
  onSuccess: () => {
1850
1894
  s.setQueriesData(
1851
- { queryKey: ["pitvox", "notifications", r] },
1852
- (t) => t != null && t.notifications ? {
1853
- ...t,
1895
+ { queryKey: ["pitvox", "notifications", t] },
1896
+ (r) => r != null && r.notifications ? {
1897
+ ...r,
1854
1898
  unreadCount: 0,
1855
- notifications: t.notifications.map((a) => ({
1899
+ notifications: r.notifications.map((a) => ({
1856
1900
  ...a,
1857
1901
  isRead: !0,
1858
1902
  readAt: a.readAt || (/* @__PURE__ */ new Date()).toISOString()
1859
1903
  }))
1860
- } : t
1904
+ } : r
1861
1905
  );
1862
1906
  }
1863
1907
  });
1864
1908
  }
1865
- function bn({ driverName: n, avatarUrl: r, memberSince: s, className: t = "" }) {
1909
+ function Tn({ driverName: e, avatarUrl: t, memberSince: s, className: r = "" }) {
1866
1910
  const a = s ? new Date(s).toLocaleDateString("en-GB", { day: "2-digit", month: "2-digit", year: "numeric" }) : null;
1867
- return /* @__PURE__ */ c("div", { className: `pvx-card pvx-dash-profile ${t}`, children: [
1868
- r ? /* @__PURE__ */ e("img", { src: r, alt: "", className: "pvx-dash-profile-avatar" }) : /* @__PURE__ */ e("div", { className: "pvx-dash-profile-avatar pvx-dash-profile-avatar--placeholder", children: (n || "?")[0].toUpperCase() }),
1911
+ return /* @__PURE__ */ c("div", { className: `pvx-card pvx-dash-profile ${r}`, children: [
1912
+ t ? /* @__PURE__ */ n("img", { src: t, alt: "", className: "pvx-dash-profile-avatar" }) : /* @__PURE__ */ n("div", { className: "pvx-dash-profile-avatar pvx-dash-profile-avatar--placeholder", children: (e || "?")[0].toUpperCase() }),
1869
1913
  /* @__PURE__ */ c("div", { className: "pvx-dash-profile-info", children: [
1870
- /* @__PURE__ */ e("h2", { className: "pvx-dash-profile-name", children: n }),
1914
+ /* @__PURE__ */ n("h2", { className: "pvx-dash-profile-name", children: e }),
1871
1915
  a && /* @__PURE__ */ c("p", { className: "pvx-dash-profile-since", children: [
1872
1916
  "Racing since ",
1873
1917
  a
@@ -1875,117 +1919,117 @@ function bn({ driverName: n, avatarUrl: r, memberSince: s, className: t = "" })
1875
1919
  ] })
1876
1920
  ] });
1877
1921
  }
1878
- function yn() {
1922
+ function Rn() {
1879
1923
  return /* @__PURE__ */ c("svg", { className: "pvx-dash-stat-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1880
- /* @__PURE__ */ e("line", { x1: "4", y1: "9", x2: "20", y2: "9" }),
1881
- /* @__PURE__ */ e("line", { x1: "4", y1: "15", x2: "20", y2: "15" }),
1882
- /* @__PURE__ */ e("line", { x1: "10", y1: "3", x2: "8", y2: "21" }),
1883
- /* @__PURE__ */ e("line", { x1: "16", y1: "3", x2: "14", y2: "21" })
1924
+ /* @__PURE__ */ n("line", { x1: "4", y1: "9", x2: "20", y2: "9" }),
1925
+ /* @__PURE__ */ n("line", { x1: "4", y1: "15", x2: "20", y2: "15" }),
1926
+ /* @__PURE__ */ n("line", { x1: "10", y1: "3", x2: "8", y2: "21" }),
1927
+ /* @__PURE__ */ n("line", { x1: "16", y1: "3", x2: "14", y2: "21" })
1884
1928
  ] });
1885
1929
  }
1886
- function kn() {
1930
+ function Sn() {
1887
1931
  return /* @__PURE__ */ c("svg", { className: "pvx-dash-stat-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1888
- /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10" }),
1889
- /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "2" }),
1890
- /* @__PURE__ */ e("path", { d: "M12 14v4" }),
1891
- /* @__PURE__ */ e("path", { d: "M10.5 12.5l-4 2.5" }),
1892
- /* @__PURE__ */ e("path", { d: "M13.5 12.5l4 2.5" })
1932
+ /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
1933
+ /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "2" }),
1934
+ /* @__PURE__ */ n("path", { d: "M12 14v4" }),
1935
+ /* @__PURE__ */ n("path", { d: "M10.5 12.5l-4 2.5" }),
1936
+ /* @__PURE__ */ n("path", { d: "M13.5 12.5l4 2.5" })
1893
1937
  ] });
1894
1938
  }
1895
- function wn() {
1896
- return /* @__PURE__ */ e("svg", { className: "pvx-dash-stat-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" }) });
1939
+ function $n() {
1940
+ return /* @__PURE__ */ n("svg", { className: "pvx-dash-stat-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ n("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" }) });
1897
1941
  }
1898
- function ie({ icon: n, value: r, label: s, items: t, labelKey: a, countKey: i }) {
1899
- const [o, d] = D(!1), h = Se(null);
1900
- $e(() => {
1942
+ function ce({ icon: e, value: t, label: s, items: r, labelKey: a, countKey: i }) {
1943
+ const [o, d] = D(!1), v = De(null);
1944
+ Ie(() => {
1901
1945
  if (!o) return;
1902
- function v(f) {
1903
- h.current && !h.current.contains(f.target) && d(!1);
1946
+ function m(f) {
1947
+ v.current && !v.current.contains(f.target) && d(!1);
1904
1948
  }
1905
- return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
1949
+ return document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
1906
1950
  }, [o]);
1907
- const l = t != null && t.length ? t.slice().sort((v, f) => f[i] - v[i]) : null;
1951
+ const l = r != null && r.length ? r.slice().sort((m, f) => f[i] - m[i]) : null;
1908
1952
  return /* @__PURE__ */ c(
1909
1953
  "div",
1910
1954
  {
1911
- ref: h,
1955
+ ref: v,
1912
1956
  className: `pvx-dash-stat-card ${l ? "pvx-dash-stat-card--clickable" : ""}`,
1913
- onClick: l ? () => d((v) => !v) : void 0,
1957
+ onClick: l ? () => d((m) => !m) : void 0,
1914
1958
  children: [
1915
- n,
1959
+ e,
1916
1960
  /* @__PURE__ */ c("div", { className: "pvx-dash-stat-content", children: [
1917
- /* @__PURE__ */ e("span", { className: "pvx-dash-stat-value", children: r }),
1918
- /* @__PURE__ */ e("span", { className: "pvx-dash-stat-label", children: s })
1961
+ /* @__PURE__ */ n("span", { className: "pvx-dash-stat-value", children: t }),
1962
+ /* @__PURE__ */ n("span", { className: "pvx-dash-stat-label", children: s })
1919
1963
  ] }),
1920
- l && /* @__PURE__ */ e("div", { className: `pvx-dash-tooltip pvx-dash-tooltip--scrollable ${o ? "pvx-dash-tooltip--open" : ""}`, children: l.map((v, f) => /* @__PURE__ */ c("div", { className: "pvx-dash-tooltip-row", children: [
1921
- /* @__PURE__ */ e("span", { className: "pvx-dash-tooltip-label", children: v[a] }),
1922
- /* @__PURE__ */ e("span", { className: "pvx-dash-tooltip-value", children: v[i] })
1964
+ l && /* @__PURE__ */ n("div", { className: `pvx-dash-tooltip pvx-dash-tooltip--scrollable ${o ? "pvx-dash-tooltip--open" : ""}`, children: l.map((m, f) => /* @__PURE__ */ c("div", { className: "pvx-dash-tooltip-row", children: [
1965
+ /* @__PURE__ */ n("span", { className: "pvx-dash-tooltip-label", children: m[a] }),
1966
+ /* @__PURE__ */ n("span", { className: "pvx-dash-tooltip-value", children: m[i] })
1923
1967
  ] }, f)) })
1924
1968
  ]
1925
1969
  }
1926
1970
  );
1927
1971
  }
1928
- function Cn({ stats: n, rating: r, className: s = "" }) {
1929
- if (!n) return null;
1930
- const t = n.trackBreakdown.map((i) => ({
1972
+ function Mn({ stats: e, rating: t, className: s = "" }) {
1973
+ if (!e) return null;
1974
+ const r = e.trackBreakdown.map((i) => ({
1931
1975
  name: q(i.trackId, i.layout),
1932
1976
  lapCount: i.lapCount
1933
- })), a = n.carBreakdown.map((i) => ({
1977
+ })), a = e.carBreakdown.map((i) => ({
1934
1978
  name: I(i.carId),
1935
1979
  lapCount: i.lapCount
1936
1980
  }));
1937
1981
  return /* @__PURE__ */ c("div", { className: `pvx-dash-stats ${s}`, children: [
1938
- /* @__PURE__ */ e(
1939
- ie,
1982
+ /* @__PURE__ */ n(
1983
+ ce,
1940
1984
  {
1941
- icon: /* @__PURE__ */ e(yn, {}),
1942
- value: n.lapCount.toLocaleString(),
1985
+ icon: /* @__PURE__ */ n(Rn, {}),
1986
+ value: e.lapCount.toLocaleString(),
1943
1987
  label: "Total Laps",
1944
- items: t,
1988
+ items: r,
1945
1989
  labelKey: "name",
1946
1990
  countKey: "lapCount"
1947
1991
  }
1948
1992
  ),
1949
- /* @__PURE__ */ e(
1950
- ie,
1993
+ /* @__PURE__ */ n(
1994
+ ce,
1951
1995
  {
1952
- icon: /* @__PURE__ */ e(kn, {}),
1953
- value: n.carBreakdown.length,
1996
+ icon: /* @__PURE__ */ n(Sn, {}),
1997
+ value: e.carBreakdown.length,
1954
1998
  label: "Cars Used",
1955
1999
  items: a,
1956
2000
  labelKey: "name",
1957
2001
  countKey: "lapCount"
1958
2002
  }
1959
2003
  ),
1960
- r && /* @__PURE__ */ c("div", { className: "pvx-dash-stat-card pvx-dash-stat-card--rating", children: [
1961
- /* @__PURE__ */ e(wn, {}),
2004
+ t && /* @__PURE__ */ c("div", { className: "pvx-dash-stat-card pvx-dash-stat-card--rating", children: [
2005
+ /* @__PURE__ */ n($n, {}),
1962
2006
  /* @__PURE__ */ c("div", { className: "pvx-dash-stat-content", children: [
1963
- /* @__PURE__ */ e("span", { className: "pvx-dash-stat-value", children: r.rating.toFixed(1) }),
1964
- /* @__PURE__ */ e("span", { className: "pvx-dash-stat-label", children: "Driver Rating" }),
2007
+ /* @__PURE__ */ n("span", { className: "pvx-dash-stat-value", children: t.rating.toFixed(1) }),
2008
+ /* @__PURE__ */ n("span", { className: "pvx-dash-stat-label", children: "Driver Rating" }),
1965
2009
  /* @__PURE__ */ c("span", { className: "pvx-dash-stat-sub", children: [
1966
2010
  "#",
1967
- r.rank,
2011
+ t.rank,
1968
2012
  " of ",
1969
- r.totalDrivers
2013
+ t.totalDrivers
1970
2014
  ] })
1971
2015
  ] })
1972
2016
  ] })
1973
2017
  ] });
1974
2018
  }
1975
- function Ln({ records: n, className: r = "" }) {
1976
- const s = w(() => n != null && n.length ? n.slice().sort((t, a) => {
1977
- const i = t.recordedAt ? new Date(t.recordedAt).getTime() : 0;
2019
+ function Dn({ records: e, className: t = "" }) {
2020
+ const s = L(() => e != null && e.length ? e.slice().sort((r, a) => {
2021
+ const i = r.recordedAt ? new Date(r.recordedAt).getTime() : 0;
1978
2022
  return (a.recordedAt ? new Date(a.recordedAt).getTime() : 0) - i;
1979
- }) : [], [n]);
1980
- return s.length ? /* @__PURE__ */ c("div", { className: `pvx-card ${r}`, children: [
1981
- /* @__PURE__ */ e("div", { className: "pvx-card-header", children: /* @__PURE__ */ c("h3", { className: "pvx-card-title", children: [
1982
- /* @__PURE__ */ e("span", { className: "pvx-dash-records-icon", children: /* @__PURE__ */ c("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1983
- /* @__PURE__ */ e("path", { d: "M6 9H4.5a2.5 2.5 0 010-5H6" }),
1984
- /* @__PURE__ */ e("path", { d: "M18 9h1.5a2.5 2.5 0 000-5H18" }),
1985
- /* @__PURE__ */ e("path", { d: "M4 22h16" }),
1986
- /* @__PURE__ */ e("path", { d: "M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20 7 22" }),
1987
- /* @__PURE__ */ e("path", { d: "M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20 17 22" }),
1988
- /* @__PURE__ */ e("path", { d: "M18 2H6v7a6 6 0 0012 0V2z" })
2023
+ }) : [], [e]);
2024
+ return s.length ? /* @__PURE__ */ c("div", { className: `pvx-card ${t}`, children: [
2025
+ /* @__PURE__ */ n("div", { className: "pvx-card-header", children: /* @__PURE__ */ c("h3", { className: "pvx-card-title", children: [
2026
+ /* @__PURE__ */ n("span", { className: "pvx-dash-records-icon", children: /* @__PURE__ */ c("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2027
+ /* @__PURE__ */ n("path", { d: "M6 9H4.5a2.5 2.5 0 010-5H6" }),
2028
+ /* @__PURE__ */ n("path", { d: "M18 9h1.5a2.5 2.5 0 000-5H18" }),
2029
+ /* @__PURE__ */ n("path", { d: "M4 22h16" }),
2030
+ /* @__PURE__ */ n("path", { d: "M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20 7 22" }),
2031
+ /* @__PURE__ */ n("path", { d: "M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20 17 22" }),
2032
+ /* @__PURE__ */ n("path", { d: "M18 2H6v7a6 6 0 0012 0V2z" })
1989
2033
  ] }) }),
1990
2034
  "Current Records",
1991
2035
  /* @__PURE__ */ c("span", { className: "pvx-dash-records-count", children: [
@@ -1994,34 +2038,34 @@ function Ln({ records: n, className: r = "" }) {
1994
2038
  ")"
1995
2039
  ] })
1996
2040
  ] }) }),
1997
- /* @__PURE__ */ e("div", { className: "pvx-dash-records-list", children: s.map((t, a) => /* @__PURE__ */ c("div", { className: "pvx-dash-record-row", children: [
2041
+ /* @__PURE__ */ n("div", { className: "pvx-dash-records-list", children: s.map((r, a) => /* @__PURE__ */ c("div", { className: "pvx-dash-record-row", children: [
1998
2042
  /* @__PURE__ */ c("div", { className: "pvx-dash-record-info", children: [
1999
- /* @__PURE__ */ e("span", { className: "pvx-dash-record-track", children: q(t.trackId, t.layout, t.game) }),
2000
- /* @__PURE__ */ e("span", { className: "pvx-dash-record-car", children: I(t.carId) })
2043
+ /* @__PURE__ */ n("span", { className: "pvx-dash-record-track", children: q(r.trackId, r.layout, r.game) }),
2044
+ /* @__PURE__ */ n("span", { className: "pvx-dash-record-car", children: I(r.carId) })
2001
2045
  ] }),
2002
2046
  /* @__PURE__ */ c("div", { className: "pvx-dash-record-time", children: [
2003
- /* @__PURE__ */ e("span", { className: "pvx-dash-record-lap", children: A(t.lapTimeMs) }),
2004
- /* @__PURE__ */ c("span", { className: `pvx-dash-game-badge pvx-dash-game-badge--${t.game || "evo"}`, children: [
2005
- (t.game || "evo").toUpperCase(),
2006
- t.gameVersion ? ` ${t.gameVersion}` : ""
2047
+ /* @__PURE__ */ n("span", { className: "pvx-dash-record-lap", children: A(r.lapTimeMs) }),
2048
+ /* @__PURE__ */ c("span", { className: `pvx-dash-game-badge pvx-dash-game-badge--${r.game || "evo"}`, children: [
2049
+ (r.game || "evo").toUpperCase(),
2050
+ r.gameVersion ? ` ${r.gameVersion}` : ""
2007
2051
  ] })
2008
2052
  ] })
2009
2053
  ] }, a)) })
2010
2054
  ] }) : null;
2011
2055
  }
2012
- function Rn({ events: n, isLoading: r, className: s, limit: t = 3 }) {
2013
- if (r)
2014
- return /* @__PURE__ */ e("div", { className: "pvx-loading", children: "Loading upcoming events..." });
2015
- if (!(n != null && n.length))
2056
+ function In({ events: e, isLoading: t, className: s, limit: r = 3 }) {
2057
+ if (t)
2058
+ return /* @__PURE__ */ n("div", { className: "pvx-loading", children: "Loading upcoming events..." });
2059
+ if (!(e != null && e.length))
2016
2060
  return null;
2017
- const a = t ? n.slice(0, t) : n, i = n.length - a.length;
2061
+ const a = r ? e.slice(0, r) : e, i = e.length - a.length;
2018
2062
  return /* @__PURE__ */ c("div", { className: `pvx-card ${s || ""}`, children: [
2019
- /* @__PURE__ */ e("div", { className: "pvx-card-header", children: /* @__PURE__ */ c("h3", { className: "pvx-card-title", children: [
2020
- /* @__PURE__ */ e($n, {}),
2063
+ /* @__PURE__ */ n("div", { className: "pvx-card-header", children: /* @__PURE__ */ c("h3", { className: "pvx-card-title", children: [
2064
+ /* @__PURE__ */ n(An, {}),
2021
2065
  "Upcoming Events",
2022
2066
  /* @__PURE__ */ c("span", { className: "pvx-dash-records-count", children: [
2023
2067
  "(",
2024
- n.length,
2068
+ e.length,
2025
2069
  ")"
2026
2070
  ] })
2027
2071
  ] }) }),
@@ -2032,15 +2076,15 @@ function Rn({ events: n, isLoading: r, className: s, limit: t = 3 }) {
2032
2076
  className: `pvx-upcoming-item ${o.isNext ? "pvx-upcoming-item--next" : ""}`,
2033
2077
  children: [
2034
2078
  /* @__PURE__ */ c("div", { className: "pvx-upcoming-info", children: [
2035
- /* @__PURE__ */ e("span", { className: "pvx-upcoming-comp", children: o.competitionName }),
2079
+ /* @__PURE__ */ n("span", { className: "pvx-upcoming-comp", children: o.competitionName }),
2036
2080
  /* @__PURE__ */ c("span", { className: "pvx-upcoming-round", children: [
2037
2081
  "Round ",
2038
2082
  o.roundNumber,
2039
2083
  ": ",
2040
2084
  o.track
2041
2085
  ] }),
2042
- o.serverPassword && /* @__PURE__ */ e(
2043
- Tn,
2086
+ o.serverPassword && /* @__PURE__ */ n(
2087
+ Bn,
2044
2088
  {
2045
2089
  password: o.serverPassword,
2046
2090
  address: o.serverAddress
@@ -2048,13 +2092,13 @@ function Rn({ events: n, isLoading: r, className: s, limit: t = 3 }) {
2048
2092
  )
2049
2093
  ] }),
2050
2094
  /* @__PURE__ */ c("div", { className: "pvx-upcoming-time", children: [
2051
- /* @__PURE__ */ e("span", { className: "pvx-upcoming-date", children: new Date(o.startTime).toLocaleDateString("en-GB", {
2095
+ /* @__PURE__ */ n("span", { className: "pvx-upcoming-date", children: new Date(o.startTime).toLocaleDateString("en-GB", {
2052
2096
  day: "numeric",
2053
2097
  month: "short",
2054
2098
  year: "numeric"
2055
2099
  }) }),
2056
- /* @__PURE__ */ e("span", { className: "pvx-upcoming-relative", children: Sn(o.startTime) }),
2057
- o.isNext && /* @__PURE__ */ e("span", { className: "pvx-upcoming-badge", children: "Next" })
2100
+ /* @__PURE__ */ n("span", { className: "pvx-upcoming-relative", children: Pn(o.startTime) }),
2101
+ o.isNext && /* @__PURE__ */ n("span", { className: "pvx-upcoming-badge", children: "Next" })
2058
2102
  ] })
2059
2103
  ]
2060
2104
  },
@@ -2069,11 +2113,11 @@ function Rn({ events: n, isLoading: r, className: s, limit: t = 3 }) {
2069
2113
  ] })
2070
2114
  ] });
2071
2115
  }
2072
- function Tn({ password: n, address: r }) {
2073
- const [s, t] = D(!1), [a, i] = D(!1), o = r ? n ? `join:${r}|${n}` : `join:${r}` : null, d = H(async () => {
2116
+ function Bn({ password: e, address: t }) {
2117
+ const [s, r] = D(!1), [a, i] = D(!1), o = t ? e ? `join:${t}|${e}` : `join:${t}` : null, d = H(async () => {
2074
2118
  if (o)
2075
2119
  try {
2076
- await navigator.clipboard.writeText(o), t(!0), setTimeout(() => t(!1), 2e3);
2120
+ await navigator.clipboard.writeText(o), r(!0), setTimeout(() => r(!1), 2e3);
2077
2121
  } catch {
2078
2122
  }
2079
2123
  }, [o]);
@@ -2085,153 +2129,153 @@ function Tn({ password: n, address: r }) {
2085
2129
  onClick: d,
2086
2130
  title: "Copy join string to clipboard",
2087
2131
  children: [
2088
- /* @__PURE__ */ e(Dn, {}),
2132
+ /* @__PURE__ */ n(En, {}),
2089
2133
  " ",
2090
2134
  s ? "Copied!" : "Join"
2091
2135
  ]
2092
2136
  }
2093
2137
  ),
2094
- n && /* @__PURE__ */ c(F, { children: [
2095
- /* @__PURE__ */ e(
2138
+ e && /* @__PURE__ */ c(F, { children: [
2139
+ /* @__PURE__ */ n(
2096
2140
  "span",
2097
2141
  {
2098
2142
  className: "pvx-server-detail pvx-server-detail--clickable",
2099
- onClick: () => i((h) => !h),
2143
+ onClick: () => i((v) => !v),
2100
2144
  title: a ? "Hide password" : "Reveal password",
2101
- children: a ? /* @__PURE__ */ e(Bn, {}) : /* @__PURE__ */ e(In, {})
2145
+ children: a ? /* @__PURE__ */ n(_n, {}) : /* @__PURE__ */ n(Fn, {})
2102
2146
  }
2103
2147
  ),
2104
2148
  a && /* @__PURE__ */ c("span", { className: "pvx-server-detail", children: [
2105
- /* @__PURE__ */ e(Mn, {}),
2149
+ /* @__PURE__ */ n(Un, {}),
2106
2150
  " ",
2107
- n
2151
+ e
2108
2152
  ] })
2109
2153
  ] })
2110
2154
  ] });
2111
2155
  }
2112
- function Sn(n) {
2113
- const r = new Date(n).getTime() - Date.now();
2114
- if (r <= 0) return "Now";
2115
- const s = Math.floor(r / (1e3 * 60 * 60));
2156
+ function Pn(e) {
2157
+ const t = new Date(e).getTime() - Date.now();
2158
+ if (t <= 0) return "Now";
2159
+ const s = Math.floor(t / (1e3 * 60 * 60));
2116
2160
  if (s < 1) return "Less than 1 hour";
2117
2161
  if (s < 24) return `in ${s}h`;
2118
- const t = Math.floor(s / 24);
2119
- if (t === 1) return "Tomorrow";
2120
- if (t < 7) return `in ${t} days`;
2121
- if (t < 30) {
2122
- const a = Math.floor(t / 7);
2162
+ const r = Math.floor(s / 24);
2163
+ if (r === 1) return "Tomorrow";
2164
+ if (r < 7) return `in ${r} days`;
2165
+ if (r < 30) {
2166
+ const a = Math.floor(r / 7);
2123
2167
  return `in ${a} week${a !== 1 ? "s" : ""}`;
2124
2168
  }
2125
- return oe(n);
2169
+ return le(e);
2126
2170
  }
2127
- function $n() {
2171
+ function An() {
2128
2172
  return /* @__PURE__ */ c("svg", { className: "pvx-dash-records-icon", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2129
- /* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
2130
- /* @__PURE__ */ e("path", { d: "M16 2v4M8 2v4M3 10h18" })
2173
+ /* @__PURE__ */ n("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
2174
+ /* @__PURE__ */ n("path", { d: "M16 2v4M8 2v4M3 10h18" })
2131
2175
  ] });
2132
2176
  }
2133
- function Mn() {
2177
+ function Un() {
2134
2178
  return /* @__PURE__ */ c("svg", { className: "pvx-server-icon", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2135
- /* @__PURE__ */ e("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2" }),
2136
- /* @__PURE__ */ e("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
2179
+ /* @__PURE__ */ n("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2" }),
2180
+ /* @__PURE__ */ n("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
2137
2181
  ] });
2138
2182
  }
2139
- function Dn() {
2183
+ function En() {
2140
2184
  return /* @__PURE__ */ c("svg", { className: "pvx-server-icon pvx-server-icon--action", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2141
- /* @__PURE__ */ e("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
2142
- /* @__PURE__ */ e("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
2185
+ /* @__PURE__ */ n("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
2186
+ /* @__PURE__ */ n("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
2143
2187
  ] });
2144
2188
  }
2145
- function In() {
2189
+ function Fn() {
2146
2190
  return /* @__PURE__ */ c("svg", { className: "pvx-server-icon pvx-server-icon--action", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2147
- /* @__PURE__ */ e("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
2148
- /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" })
2191
+ /* @__PURE__ */ n("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
2192
+ /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "3" })
2149
2193
  ] });
2150
2194
  }
2151
- function Bn() {
2195
+ function _n() {
2152
2196
  return /* @__PURE__ */ c("svg", { className: "pvx-server-icon pvx-server-icon--action", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2153
- /* @__PURE__ */ e("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" }),
2154
- /* @__PURE__ */ e("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
2197
+ /* @__PURE__ */ n("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" }),
2198
+ /* @__PURE__ */ n("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
2155
2199
  ] });
2156
2200
  }
2157
- function Pn({ notifications: n, unreadCount: r = 0, onMarkRead: s, onMarkAllRead: t, isLoading: a, className: i }) {
2158
- const o = le();
2159
- return a ? /* @__PURE__ */ e("div", { className: "pvx-loading", children: "Loading notifications..." }) : /* @__PURE__ */ c("div", { className: `pvx-card ${i || ""}`, children: [
2201
+ function qn({ notifications: e, unreadCount: t = 0, onMarkRead: s, onMarkAllRead: r, isLoading: a, className: i }) {
2202
+ const o = pe();
2203
+ return a ? /* @__PURE__ */ n("div", { className: "pvx-loading", children: "Loading notifications..." }) : /* @__PURE__ */ c("div", { className: `pvx-card ${i || ""}`, children: [
2160
2204
  /* @__PURE__ */ c("div", { className: "pvx-card-header", children: [
2161
2205
  /* @__PURE__ */ c("h3", { className: "pvx-card-title", children: [
2162
- /* @__PURE__ */ e(En, {}),
2206
+ /* @__PURE__ */ n(Kn, {}),
2163
2207
  "Notifications",
2164
- r > 0 && /* @__PURE__ */ e("span", { className: "pvx-notif-badge", children: r > 99 ? "99+" : r })
2208
+ t > 0 && /* @__PURE__ */ n("span", { className: "pvx-notif-badge", children: t > 99 ? "99+" : t })
2165
2209
  ] }),
2166
- r > 0 && t && /* @__PURE__ */ e("button", { className: "pvx-notif-mark-all", onClick: t, children: "Mark all read" })
2210
+ t > 0 && r && /* @__PURE__ */ n("button", { className: "pvx-notif-mark-all", onClick: r, children: "Mark all read" })
2167
2211
  ] }),
2168
- n != null && n.length ? /* @__PURE__ */ e("div", { className: "pvx-notif-list", children: n.map((d) => /* @__PURE__ */ e(
2169
- An,
2212
+ e != null && e.length ? /* @__PURE__ */ n("div", { className: "pvx-notif-list", children: e.map((d) => /* @__PURE__ */ n(
2213
+ jn,
2170
2214
  {
2171
2215
  notification: d,
2172
2216
  getUserDisplay: o,
2173
2217
  onMarkRead: s
2174
2218
  },
2175
2219
  d.id
2176
- )) }) : /* @__PURE__ */ e("div", { className: "pvx-notif-empty", children: "No notifications" })
2220
+ )) }) : /* @__PURE__ */ n("div", { className: "pvx-notif-empty", children: "No notifications" })
2177
2221
  ] });
2178
2222
  }
2179
- function An({ notification: n, getUserDisplay: r, onMarkRead: s }) {
2180
- const t = () => {
2181
- !n.isRead && s && s(n.id);
2223
+ function jn({ notification: e, getUserDisplay: t, onMarkRead: s }) {
2224
+ const r = () => {
2225
+ !e.isRead && s && s(e.id);
2182
2226
  };
2183
2227
  return /* @__PURE__ */ c(
2184
2228
  "button",
2185
2229
  {
2186
- className: `pvx-notif-item ${n.isRead ? "" : "pvx-notif-item--unread"}`,
2187
- onClick: t,
2230
+ className: `pvx-notif-item ${e.isRead ? "" : "pvx-notif-item--unread"}`,
2231
+ onClick: r,
2188
2232
  children: [
2189
- /* @__PURE__ */ e(Un, { type: n.type }),
2233
+ /* @__PURE__ */ n(Vn, { type: e.type }),
2190
2234
  /* @__PURE__ */ c("div", { className: "pvx-notif-content", children: [
2191
- /* @__PURE__ */ e("span", { className: "pvx-notif-message", children: Ee(n, r) }),
2192
- /* @__PURE__ */ e("span", { className: "pvx-notif-time", children: oe(n.createdAt) })
2235
+ /* @__PURE__ */ n("span", { className: "pvx-notif-message", children: qe(e, t) }),
2236
+ /* @__PURE__ */ n("span", { className: "pvx-notif-time", children: le(e.createdAt) })
2193
2237
  ] }),
2194
- !n.isRead && /* @__PURE__ */ e("span", { className: "pvx-notif-dot" })
2238
+ !e.isRead && /* @__PURE__ */ n("span", { className: "pvx-notif-dot" })
2195
2239
  ]
2196
2240
  }
2197
2241
  );
2198
2242
  }
2199
- function Un({ type: n }) {
2200
- return n === "RECORD_BEATEN" ? /* @__PURE__ */ e("span", { className: "pvx-notif-icon pvx-notif-icon--beaten", children: /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "m7 7 10 10M17 7v10H7" }) }) }) : n === "ADMIN_MESSAGE" ? /* @__PURE__ */ e("span", { className: "pvx-notif-icon pvx-notif-icon--admin", children: /* @__PURE__ */ c("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2201
- /* @__PURE__ */ e("path", { d: "m3 11 18-5v12L3 13v-2z" }),
2202
- /* @__PURE__ */ e("path", { d: "M11.6 16.8a3 3 0 1 1-5.8-1.6" })
2203
- ] }) }) : /* @__PURE__ */ e("span", { className: "pvx-notif-icon pvx-notif-icon--record", children: /* @__PURE__ */ c("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2204
- /* @__PURE__ */ e("path", { d: "M6 9H4.5a2.5 2.5 0 0 1 0-5H6" }),
2205
- /* @__PURE__ */ e("path", { d: "M18 9h1.5a2.5 2.5 0 0 0 0-5H18" }),
2206
- /* @__PURE__ */ e("path", { d: "M4 22h16" }),
2207
- /* @__PURE__ */ e("path", { d: "M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22" }),
2208
- /* @__PURE__ */ e("path", { d: "M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22" }),
2209
- /* @__PURE__ */ e("path", { d: "M18 2H6v7a6 6 0 0 0 12 0V2Z" })
2243
+ function Vn({ type: e }) {
2244
+ return e === "RECORD_BEATEN" ? /* @__PURE__ */ n("span", { className: "pvx-notif-icon pvx-notif-icon--beaten", children: /* @__PURE__ */ n("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ n("path", { d: "m7 7 10 10M17 7v10H7" }) }) }) : e === "ADMIN_MESSAGE" ? /* @__PURE__ */ n("span", { className: "pvx-notif-icon pvx-notif-icon--admin", children: /* @__PURE__ */ c("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2245
+ /* @__PURE__ */ n("path", { d: "m3 11 18-5v12L3 13v-2z" }),
2246
+ /* @__PURE__ */ n("path", { d: "M11.6 16.8a3 3 0 1 1-5.8-1.6" })
2247
+ ] }) }) : /* @__PURE__ */ n("span", { className: "pvx-notif-icon pvx-notif-icon--record", children: /* @__PURE__ */ c("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2248
+ /* @__PURE__ */ n("path", { d: "M6 9H4.5a2.5 2.5 0 0 1 0-5H6" }),
2249
+ /* @__PURE__ */ n("path", { d: "M18 9h1.5a2.5 2.5 0 0 0 0-5H18" }),
2250
+ /* @__PURE__ */ n("path", { d: "M4 22h16" }),
2251
+ /* @__PURE__ */ n("path", { d: "M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22" }),
2252
+ /* @__PURE__ */ n("path", { d: "M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22" }),
2253
+ /* @__PURE__ */ n("path", { d: "M18 2H6v7a6 6 0 0 0 12 0V2Z" })
2210
2254
  ] }) });
2211
2255
  }
2212
- function En() {
2256
+ function Kn() {
2213
2257
  return /* @__PURE__ */ c("svg", { className: "pvx-dash-records-icon", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2214
- /* @__PURE__ */ e("path", { d: "M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9" }),
2215
- /* @__PURE__ */ e("path", { d: "M10.3 21a1.94 1.94 0 0 0 3.4 0" })
2258
+ /* @__PURE__ */ n("path", { d: "M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9" }),
2259
+ /* @__PURE__ */ n("path", { d: "M10.3 21a1.94 1.94 0 0 0 3.4 0" })
2216
2260
  ] });
2217
2261
  }
2218
- function or({ steamId: n, avatarUrl: r, memberSince: s, className: t = "" }) {
2219
- const { data: a, isLoading: i, error: o } = mn(n), { data: d, isLoading: h } = vn(n), { data: l, isLoading: v } = hn(), f = xn(), { data: g, isLoading: p } = gn({ limit: 10 }), b = fn(), x = Nn();
2220
- return i || h ? /* @__PURE__ */ e("div", { className: "pvx-loading", children: "Loading dashboard..." }) : o ? /* @__PURE__ */ e("div", { className: "pvx-empty", children: "Failed to load dashboard data." }) : a ? /* @__PURE__ */ c("div", { className: `pvx-dash ${t}`, children: [
2221
- /* @__PURE__ */ e(
2222
- bn,
2262
+ function vt({ steamId: e, avatarUrl: t, memberSince: s, className: r = "" }) {
2263
+ const { data: a, isLoading: i, error: o } = Nn(e), { data: d, isLoading: v } = bn(e), { data: l, isLoading: m } = yn(), f = kn(), { data: g, isLoading: p } = wn({ limit: 10 }), b = Cn(), x = Ln();
2264
+ return i || v ? /* @__PURE__ */ n("div", { className: "pvx-loading", children: "Loading dashboard..." }) : o ? /* @__PURE__ */ n("div", { className: "pvx-empty", children: "Failed to load dashboard data." }) : a ? /* @__PURE__ */ c("div", { className: `pvx-dash ${r}`, children: [
2265
+ /* @__PURE__ */ n(
2266
+ Tn,
2223
2267
  {
2224
2268
  driverName: a.driverName,
2225
- avatarUrl: r,
2269
+ avatarUrl: t,
2226
2270
  memberSince: s
2227
2271
  }
2228
2272
  ),
2229
- /* @__PURE__ */ e(Cn, { stats: a, rating: d }),
2230
- n && /* @__PURE__ */ e(Rn, { events: l, isLoading: v }),
2273
+ /* @__PURE__ */ n(Mn, { stats: a, rating: d }),
2274
+ e && /* @__PURE__ */ n(In, { events: l, isLoading: m }),
2231
2275
  /* @__PURE__ */ c("div", { className: `pvx-dash-row ${f ? "pvx-dash-row--2col" : ""}`, children: [
2232
- /* @__PURE__ */ e(Ln, { records: a.currentRecords }),
2233
- f && /* @__PURE__ */ e(
2234
- Pn,
2276
+ /* @__PURE__ */ n(Dn, { records: a.currentRecords }),
2277
+ f && /* @__PURE__ */ n(
2278
+ qn,
2235
2279
  {
2236
2280
  notifications: g == null ? void 0 : g.notifications,
2237
2281
  unreadCount: (g == null ? void 0 : g.unreadCount) || 0,
@@ -2241,75 +2285,82 @@ function or({ steamId: n, avatarUrl: r, memberSince: s, className: t = "" }) {
2241
2285
  }
2242
2286
  )
2243
2287
  ] })
2244
- ] }) : /* @__PURE__ */ e("div", { className: "pvx-empty", children: "No data available yet. Start driving to see your stats!" });
2288
+ ] }) : /* @__PURE__ */ n("div", { className: "pvx-empty", children: "No data available yet. Start driving to see your stats!" });
2245
2289
  }
2246
2290
  export {
2247
- Qn as CarsTable,
2291
+ nt as CarsTable,
2248
2292
  P as CompEmptyState,
2249
2293
  U as CompLoadingState,
2250
- nn as CompetitionCard,
2251
- Xn as CompetitionCards,
2252
- sr as CompetitionResultsTabs,
2253
- or as DriverDashboard,
2254
- bn as DriverProfile,
2255
- Yn as DriversTable,
2256
- nr as EntryList,
2294
+ cn as CompetitionCard,
2295
+ it as CompetitionCards,
2296
+ pt as CompetitionResultsTabs,
2297
+ on as CompletedBadge,
2298
+ we as DEFAULT_COMPLETION_GRACE_DAYS,
2299
+ vt as DriverDashboard,
2300
+ Tn as DriverProfile,
2301
+ tt as DriversTable,
2302
+ ct as EntryList,
2257
2303
  Y as InfoPill,
2258
- Jn as LapHistoryTable,
2259
- Pn as NotificationsCard,
2260
- Ne as PODIUM_MEDALS,
2261
- jn as PitVoxPartnerProvider,
2262
- Zn as RankingsTable,
2263
- Ln as RecordsTable,
2264
- rr as RegisterButton,
2265
- tr as RegistrationPanel,
2266
- er as RoundResults,
2267
- ke as RoundSessionResults,
2268
- sn as StandingsTable,
2269
- Cn as StatsCards,
2270
- Gn as TracksTable,
2271
- Ze as TypeBadge,
2272
- Rn as UpcomingEvents,
2273
- Ae as buildDriverIndexPath,
2274
- Pe as buildLapsPath,
2304
+ rt as LapHistoryTable,
2305
+ qn as NotificationsCard,
2306
+ se as PODIUM_MEDALS,
2307
+ zn as PitVoxPartnerProvider,
2308
+ st as RankingsTable,
2309
+ Dn as RecordsTable,
2310
+ lt as RegisterButton,
2311
+ dt as RegistrationPanel,
2312
+ ot as RoundResults,
2313
+ Le as RoundSessionResults,
2314
+ pn as StandingsTable,
2315
+ Mn as StatsCards,
2316
+ et as TracksTable,
2317
+ en as TypeBadge,
2318
+ In as UpcomingEvents,
2319
+ Fe as buildDriverIndexPath,
2320
+ Ee as buildLapsPath,
2275
2321
  Z as buildLeaderboardPath,
2276
- Ue as buildRecentLapsPath,
2277
- T as fetchCdnJson,
2322
+ _e as buildRecentLapsPath,
2323
+ S as fetchCdnJson,
2324
+ at as filterCompetitionsByStatus,
2278
2325
  I as formatCarName,
2279
2326
  j as formatDate,
2280
- Vn as formatDelta,
2327
+ Gn as formatDelta,
2281
2328
  A as formatLapTime,
2282
- Ee as formatNotificationMessage,
2283
- oe as formatRelativeTime,
2329
+ qe as formatNotificationMessage,
2330
+ le as formatRelativeTime,
2284
2331
  B as formatSectorTime,
2285
2332
  q as formatTrackName,
2286
- ce as formatTyreCompound,
2287
- On as useCarLeaderboard,
2288
- Hn as useCarMetadata,
2289
- Ve as useCompetitionAllRounds,
2290
- de as useCompetitionConfig,
2291
- pe as useCompetitionEntryList,
2292
- je as useCompetitionRound,
2293
- qe as useCompetitionStandings,
2294
- zn as useCompetitions,
2295
- _e as useDriverLaps,
2296
- vn as useDriverRating,
2297
- ar as useDriverRatings,
2298
- mn as useDriverStats,
2299
- Kn as useLeaderboardIndex,
2300
- Nn as useMarkAllNotificationsRead,
2301
- fn as useMarkNotificationRead,
2302
- gn as useNotifications,
2303
- xn as useNotificationsEnabled,
2333
+ de as formatTyreCompound,
2334
+ an as getCompetitionPodium,
2335
+ Ce as getCompetitionStatus,
2336
+ sn as getCompletionDate,
2337
+ rn as isCompetitionComplete,
2338
+ Zn as useCarLeaderboard,
2339
+ Yn as useCarMetadata,
2340
+ He as useCompetitionAllRounds,
2341
+ ue as useCompetitionConfig,
2342
+ ve as useCompetitionEntryList,
2343
+ Ke as useCompetitionRound,
2344
+ me as useCompetitionStandings,
2345
+ Xn as useCompetitions,
2346
+ Ve as useDriverLaps,
2347
+ bn as useDriverRating,
2348
+ ut as useDriverRatings,
2349
+ Nn as useDriverStats,
2350
+ Qn as useLeaderboardIndex,
2351
+ Ln as useMarkAllNotificationsRead,
2352
+ Cn as useMarkNotificationRead,
2353
+ wn as useNotifications,
2354
+ kn as useNotificationsEnabled,
2304
2355
  k as usePitVox,
2305
- Wn as useRecentLaps,
2306
- ue as useRegister,
2356
+ Jn as useRecentLaps,
2357
+ he as useRegister,
2307
2358
  ee as useRegistrationMode,
2308
2359
  X as useRegistrationStatus,
2309
2360
  ne as useRegistrationUrl,
2310
- Fe as useTrackLeaderboard,
2311
- ir as useUnreadCount,
2312
- hn as useUpcomingEvents,
2313
- le as useUserLookup,
2314
- me as useWithdraw
2361
+ je as useTrackLeaderboard,
2362
+ mt as useUnreadCount,
2363
+ yn as useUpcomingEvents,
2364
+ pe as useUserLookup,
2365
+ xe as useWithdraw
2315
2366
  };