Ghidra 12.1.2 headless decompilation of Steam client version 1788652215: - decomp/linux64_steamclient.so, ubuntu12_32_steamclient.so, ubuntu12_32_steam: per-class pseudo-C (RTTI class recovery + Class::Method string naming), functions.tsv and strings.tsv - decomp/protos: 107 .proto files and descriptors.pb extracted from steamclient.so - decomp/steamui: prettified Library UI JS; steamclient_js_api.txt lists the SteamClient.* backend API it calls - tools/: decompile/recover/export scripts and proto extractor GCC exception-handler analysis is disabled: it truncated ~47% of function bodies on these binaries. Co-Authored-By: Claude Opus 5.5 <[email protected]>
2021 lines
75 KiB
JavaScript
Executable File
2021 lines
75 KiB
JavaScript
Executable File
(self.webpackChunksteamui = self.webpackChunksteamui || []).push([
|
|
[9672],
|
|
{
|
|
72403: (e) => {
|
|
e.exports = {
|
|
"duration-app-launch": "800ms",
|
|
AppCarouselTrailerCtn: "_2O2oGi6d4q3fJxsg-26cll",
|
|
AutoplayCheckbox: "_1sEIT3Bh71g9JRzpjKvlIo",
|
|
AppVideo: "_2YG6k4pQ2z4jwoRGrdPhbv",
|
|
Microtrailer: "_2HvnbxzEFWWLlYvdP-FWFN",
|
|
PlayFullTrailer: "_1yr-ANb75ms4sc2qaXuCYM",
|
|
"microtrailer-trans-out": "_23fHbTINXOIsUypCFWMSTa",
|
|
PlayMicrotrailer: "_2X47xgnvmgTDpH69RCBkZ7",
|
|
"microtrailer-trans-in": "_25FSUgigrr0CQ9eVFmOuId",
|
|
NoTrailer: "c42wWAo7Lp6uTn6LjeaO1",
|
|
Trailer: "_27Hm281QxYE24wJqONIP0p",
|
|
"trailer-trans-in": "_1nwjQUxY2CTD6YmThf7xQG",
|
|
AppMainCap: "_1S2WeY58fI6yRef-8ArnWh",
|
|
AppMainCapFadeIn: "_3fHap4fl2kZ5StUjb1DwDJ",
|
|
PlayButton: "OsRdwk7Q3-sApCo2CDxtN",
|
|
PlayButtonCapFadeIn: "_2o5mPh-Zx9EWF_H-KforbU",
|
|
AutoplayCheckboxCtn: "_2J3J__8l3sk6LI4mpUfWDT",
|
|
AOWarning: "_2IxWvaCkHcMl0aL8NM8v6T",
|
|
Text: "_1r5F1Fy8uG639opEIjyS5Z",
|
|
BackgroundAnimation: "_1G9QIfwsMh2XRR-bMBE97j",
|
|
"ItemFocusAnim-darkerGrey-nocolor": "_2bun2taA5e3StPJT3cs6jH",
|
|
"ItemFocusAnim-darkerGrey": "_39J4X61tugDHvSmGBzKD7p",
|
|
"ItemFocusAnim-darkGreySettings": "_13-B6AE59KUQ-ABnyKYXkP",
|
|
"ItemFocusAnim-darkGrey": "_2xXdz148UoxpJlfyVlUo0D",
|
|
"ItemFocusAnim-grey": "_3-Rh6nRz4sRZLRVEQKPefw",
|
|
"ItemFocusAnim-translucent-white-10": "_1b0mYc5KheDLRLQoHqAqhU",
|
|
"ItemFocusAnim-translucent-white-20": "_3WVHjFeBrJOv0Xsqd7X2Vp",
|
|
"ItemFocusAnimBorder-darkGrey": "_1TaBFa6F_r2oTJvni2yNqQ",
|
|
"ItemFocusAnim-green": "_1dPdL7c_2dvq8gAaWTSq04",
|
|
focusAnimation: "_3BX0kUvHLGH3mZJG4BP4cc",
|
|
hoverAnimation: "_1om-YMcnj-8DLjL_ek0CxW",
|
|
"capsule-trans-out": "YvTbl9XD-HkAs9W3pcEgp",
|
|
};
|
|
},
|
|
18728: (e) => {
|
|
e.exports = {
|
|
"duration-app-launch": "800ms",
|
|
AppVideoCtn: "_3ASFJGw8T9-hDikhxRScDI",
|
|
WishlistBadge: "_2LOILpLspWCbXnRmFuUbwx",
|
|
Active: "-iU7fWthqJgfmhzrdV74K",
|
|
DeckVerifiedLogo: "_2EVzMYr528F1dVAm4e88Sy",
|
|
VideoArea: "_1otwTolVlX9PfKD2myNigb",
|
|
IgnoredCtn: "_35ODHCvm13mJ5gOunwQzs9",
|
|
IgnoredInfo: "_2SriIWC_6CHPZkjggKoxjb",
|
|
IgnoredTitle: "_1D4RHomSRy25j1Qxl-dDPw",
|
|
IgnoredDescription: "_29zcmLd8LJQ2FR33D1_Ph6",
|
|
UndoIgnoreButton: "_1rPGVQftqLzqjH04tebuaT",
|
|
UndoButton: "_1nz7pkRvV4rRrybZrUZu0R",
|
|
Disabled: "_2JvEs3_qRtYncXG7WCALur",
|
|
BackgroundAnimation: "_64dUS3S7fOwtNFhEALHhx",
|
|
"ItemFocusAnim-darkerGrey-nocolor": "UXmjEpq-9pbtC7T5d0MPv",
|
|
"ItemFocusAnim-darkerGrey": "_1olTI2tKYS6IUSkIpca3Qo",
|
|
"ItemFocusAnim-darkGreySettings": "_3JjCik6ZoOCqrb2F2DUuI1",
|
|
"ItemFocusAnim-darkGrey": "_37RRjG54p7sk3Yvb-5BDVv",
|
|
"ItemFocusAnim-grey": "yOH4BAo3sriSZckG9yR1g",
|
|
"ItemFocusAnim-translucent-white-10": "_1USieHqb4yVt2P3Okqs7hF",
|
|
"ItemFocusAnim-translucent-white-20": "_2MtHgIAnILIt8d4PMuS5mi",
|
|
"ItemFocusAnimBorder-darkGrey": "_dHmntK-X7hqNpoiZplVM",
|
|
"ItemFocusAnim-green": "_3CT6dHnuA3SYWZrgk1Sf1Y",
|
|
focusAnimation: "_34YOI6hVEDmEAWHAHlUXon",
|
|
hoverAnimation: "_1UXiQtSunyxlP1LxWHXACi",
|
|
};
|
|
},
|
|
36111: (e) => {
|
|
e.exports = {
|
|
TrailerTitle: "_2jWguvQbMj3mHe0ytRpzNm",
|
|
Category: "_3oxiEsdJdYRkKvYSWGAfih",
|
|
Visible: "_3afqMxr7HnEfdxJwBg6GRd",
|
|
};
|
|
},
|
|
79840: (e) => {
|
|
e.exports = {
|
|
"duration-app-launch": "800ms",
|
|
DiscoveryQueueCarouselCtn: "_2u0N2gUX44_tavazJJb_QP",
|
|
TextLink: "_3ZdNCUMz9KZMkwPZlO8zmi",
|
|
DiscoveryQueueApp: "_1xJSMubUWBlahkrtb4IFTc",
|
|
DiscoveryQueueWrapper: "_2BYaxM7mBfooJbZYzhEv4D",
|
|
revealDiscoveryQueueWrapper: "brzQbY6Z8TH8Ww-rFL4E0",
|
|
DiscoveryQueueItemsCtn: "_3q6eNRFBrPSFSGEn8uRFZ3",
|
|
DiscoveryQueueItemPositioner: "_16tdfw6vxg9Hdy0KfCutXn",
|
|
Selected: "_2aeAhZ2Y99YIR2-zD6l27U",
|
|
InRange: "_1XPIeNMxObbkYolTEj0Bwh",
|
|
Dragging: "_3fTO0TgoWEAo4zdaHOCTh0",
|
|
FarLeft: "vkLp1smRjDnZg7XQcMqjk",
|
|
Left: "_3gBoKuhIxMBjlxU7FZ2L3a",
|
|
Current: "_2CgJDPFhM9rbjsq9n0c9I_",
|
|
Right: "_1AGP_wKeaN9phzlq_2K9H7",
|
|
FarRight: "hBGRzfrW2Obp7QpzYCi2L",
|
|
AppDetailsCtn: "_2Zwt2P5vy4W9Ha5ePOv54U",
|
|
AppDetailsCtnTop: "_3TkhdqIi1gqwMzexQDS8Ab",
|
|
CapsuleLink: "_2m8YEKXvKa2bcFNjqXdJu7",
|
|
AppLibraryHero: "_uGgOnTsOzgIVK9BHMTUV",
|
|
AppHeader: "Vwr5XZLr5tOEaVLYbj1mZ",
|
|
RightColumn: "VVNgZo2T-rubrTvNMPSoh",
|
|
AppName: "_3lk6f1XI_loCIhBevOddHP",
|
|
AppTagsCtn: "xXcRKEuacDG8kYtDXu6OH",
|
|
TagEntry: "xmqBa8sZa4Xhgktfr43Uh",
|
|
AppReviews: "_2alBMAZOarIyf-vIiNazRg",
|
|
RelevantCtn: "_3sfhS6SCV1q8dTaRIpWCHB",
|
|
RelevantColumn: "Ne2AhbYmPfTxwJVmj1FZP",
|
|
RelevantItem: "_2OUHZGUrr0FugrwCwIm6dF",
|
|
RelevantCheck: "_1BOH1zFTOxtlgKkeEANpYO",
|
|
IgnoreLink: "fir3UBZYT6EAmdYWAdr3a",
|
|
AppActionButtonsCtn: "_2IQHDn5ZvlB1ThhSb_lhX",
|
|
AppActionJustButtonsCtn: "duAyQ1rUX78lMmmZY1V0n",
|
|
QueueButton: "_22Bfzcdg2l-RQEn-qKSIol",
|
|
ButtonsRowWrap: "_1plvU4aLu4hq22gYwThZnH",
|
|
IgnoredCtn: "_3G1MYmgXVcweTUK5jtU_Ft",
|
|
Active: "_2D_EZlAEopCvqU0_w21FdH",
|
|
IgnoredInfo: "_2j-elz350f4ndxI9CBUbyW",
|
|
IgnoredTitle: "_18alvCecAAMAsyM_6zCY2T",
|
|
IgnoredDescription: "CmI-HxKbBH8PjoSk7IVPC",
|
|
UndoIgnoreButton: "_2E3PfDDIiiKoy4iDQV7Ewl",
|
|
AppDesc: "_3-6CubUJWYN2tbKvwS2N9n",
|
|
YGlyph: "_3ncywKLa2mgKgbsj-g2wJi",
|
|
SummaryContentCtn: "Tvu6zAI3kbdYjGQGbypuQ",
|
|
SummaryTitle: "_2o4_HDWD3bRMkoJT4RfiMv",
|
|
YourStats: "_3-iD7yn2dCmqp9AL5xuwLX",
|
|
SummaryGrid: "_3vRcTzxpTSFxcxVm9BKrlQ",
|
|
GridItem: "_2w3xjuBZIgZJPO9HAa5Hb0",
|
|
GridTitle: "_7HEa84jCz03LkGTjIZa7c",
|
|
GridNumber: "jM11lU9OD9-2Hlu3Akwtj",
|
|
GridSubTitle: "_2n8wa2hMCjKHhvMsS0v3_k",
|
|
SummaryActionButtonsCtn: "nqmYD9sGBA3BEmNjp6qYF",
|
|
TopBarCtn: "_1ewUwegRciiNydBWSQRCX-",
|
|
LearnMoreLink: "CiFk6OuYAQSbv_DGXoBSX",
|
|
ControlsCtn: "_2Gy72TJcKqY9gqP5-TAmSk",
|
|
Disabled: "_2xsPifNspMLcbkoUSA5Ujl",
|
|
Primary: "_3o2jhEGrGiVndMjUbNpOw-",
|
|
Launch: "_3SOZx68qVakLwDvAYBOPMG",
|
|
Wide: "_1tFfTbcTKjlfSGsMOJvdf_",
|
|
QueueNavArrow: "_2sZ7DAljYV5Xd-nbhtlmyM",
|
|
Enable: "_2CTzbHZ-C-FfnXEtLZPv9q",
|
|
RightArrow: "_30_0NBq3DkV-qL7Eyqva-t",
|
|
LeftArrow: "_36Cln2gIYtwR3sPPcOi9bT",
|
|
ReleventSimilarAppsCtn: "_2akaWEht7jMXdxPJFmf3WN",
|
|
RecommendingCuratorsCtn: "_RZQ6JnUY6lQGmRcgHFNA",
|
|
AppRelevanceCtn: "_367qBdIRU4xAYHt5cqhPVa",
|
|
WhyRelevant: "_29ReJunMtLbnxbnixF6VdE",
|
|
SimilarAppCtn: "_2fNR47HGs7tI_v1HC2-N1h",
|
|
SimilarAppImg: "_1q8mEyt8Rp7JweHMRGm6hq",
|
|
SimilarAppText: "YWLoeGgBPsjUtXywol3_O",
|
|
FriendAvatarsCtn: "_2hxko0SvUWCZ30U4JH4TNn",
|
|
RelevantTextBold: "_1Z_ek2XNBZbkZqyR-QSwlo",
|
|
AppDescription: "_2mksBeuafFs1CMp0t5Z9gX",
|
|
TradingCardCtn: "_13ZcoCKc8H09LSHp4C197Z",
|
|
TradingCardImage: "_2ZB_x5Jq7JGDapJVPsCZTo",
|
|
Bold: "_2P6WAN13LnRVRmRb-VNu_L",
|
|
FriendBlockCtn: "_34aoCP80lDRK3cq6_V0YQ_",
|
|
PersonaStatus: "_1AYnL3n86EbaOCKf18KKV8",
|
|
ProgressHidden: "UdYhfFDOguxduU7c3PVpv",
|
|
DiscoveryQueueName: "D7yeVCEwaFr6qNo_bPGCr",
|
|
SaleRewardsCtn: "u42zSEWdGrvBDimhV4QNI",
|
|
RewardStatusCtn: "_2C1i6xEuF431h_KHPB53zS",
|
|
SaleRewardAppTitle: "_1-pK3SWEOk30eo-q0EKyH7",
|
|
BackgroundAnimation: "_3tn052OQVu3Bbdx7lAg8v3",
|
|
"ItemFocusAnim-darkerGrey-nocolor": "WFiTs9SPGUObvgDncLEFm",
|
|
"ItemFocusAnim-darkerGrey": "_18LH9gSLwgTgUzIl1C0-pq",
|
|
"ItemFocusAnim-darkGreySettings": "_3bomS6MjDv4c5XbYu2Caqu",
|
|
"ItemFocusAnim-darkGrey": "_3BW-wlgbU7_7zOW8-2d7OI",
|
|
"ItemFocusAnim-grey": "_2PCW9DVf1EkOJw0pwtlWSj",
|
|
"ItemFocusAnim-translucent-white-10": "A-_kb_s9v8pLyRrldCupj",
|
|
"ItemFocusAnim-translucent-white-20": "_1fugsBQAve_CPDYfcK5fou",
|
|
"ItemFocusAnimBorder-darkGrey": "_1X5xeHixS4XJusrPGRQ4nL",
|
|
"ItemFocusAnim-green": "guH2fAOEkfwuIvOhn0oHl",
|
|
focusAnimation: "_2XCqyPQ8Leg6L1dwSjpULK",
|
|
hoverAnimation: "zU1NJEk7QqOdsECL2PI2d",
|
|
};
|
|
},
|
|
57585: (e) => {
|
|
e.exports = {
|
|
"duration-app-launch": "800ms",
|
|
ProgressCtn: "_3ed1Al-hFnjq4HQeLo6cIT",
|
|
ProgressDot: "_2R187sMx7MTX5XQ2KN3Xnx",
|
|
ProgressDotActive: "_3z2pS3DFn3MEl5ZPw6lsa9",
|
|
ProgressDotSelected: "_1qJVCZsv51RtfBGao-PV8V",
|
|
ProgressDotClickable: "jKfeFH4S6YhaeZ7RCZ8BN",
|
|
BackgroundAnimation: "_3B8qOyTqC7rzOP_X5kvWK-",
|
|
"ItemFocusAnim-darkerGrey-nocolor": "_2wYIdqvoWTU_8MPGJtV4j",
|
|
"ItemFocusAnim-darkerGrey": "_5noNLXRGVi51cgI8nYBAm",
|
|
"ItemFocusAnim-darkGreySettings": "_3UqXfp4k1blu2wv57exkEd",
|
|
"ItemFocusAnim-darkGrey": "_6iLF1QqShrpEW0UiF0x2o",
|
|
"ItemFocusAnim-grey": "PuZXrV7q9vI7p-jK9x2pN",
|
|
"ItemFocusAnim-translucent-white-10": "_2RwwslrDVdOXePDy6QCEkZ",
|
|
"ItemFocusAnim-translucent-white-20": "_1VijReQZ-moslCOSkJYKIt",
|
|
"ItemFocusAnimBorder-darkGrey": "_1HaTvS9ANJY56lTVTb35I3",
|
|
"ItemFocusAnim-green": "_3mF4OtweD7vY2bcN6piLTq",
|
|
focusAnimation: "rpa_zF1YXxbH3-m1-AI6Q",
|
|
hoverAnimation: "_2WTZTfL3dbXnfZM3Ly10Jo",
|
|
};
|
|
},
|
|
69159: (e, t, n) => {
|
|
"use strict";
|
|
(n.r(t), n.d(t, { default: () => Nt }));
|
|
var a = n(63696),
|
|
s = n(62540),
|
|
r = n(90242),
|
|
i = n(69164),
|
|
o = n(72655),
|
|
l = n(90695),
|
|
c = n(8309),
|
|
u = n(61110),
|
|
d = n(46382),
|
|
m = n(59750),
|
|
p = n(92059),
|
|
h = n(11131),
|
|
f = n(83591),
|
|
g = n(47338),
|
|
A = n(52492),
|
|
y = n(82594),
|
|
v = n(50376),
|
|
_ = n(72905),
|
|
S = n(39039),
|
|
x = n(90765),
|
|
I = n(46108),
|
|
C = n(83599),
|
|
D = n(49412),
|
|
b = n(52922),
|
|
w = n(72476),
|
|
T = n(2137),
|
|
j = n(48130),
|
|
P = n(26853),
|
|
N = n(38837),
|
|
R = n(62221),
|
|
F = n(43691),
|
|
k = n(51579);
|
|
function L(e) {
|
|
const { tagid: t, language: n = F.TS.LANGUAGE } = e;
|
|
return (0, R.MB)(t, n) || String(t);
|
|
}
|
|
function B(e) {
|
|
const { tagID: t, className: n } = e,
|
|
a = (0, p.aL)(
|
|
(function (e, t = F.TS.LANGUAGE) {
|
|
const n = (0, R.MB)(e, t);
|
|
return `${F.TS.STORE_BASE_URL}tags/${(0, k.ut)(t)}/${n}`;
|
|
})(t),
|
|
);
|
|
return (0, s.jsx)(r.Ii, { className: n, href: a, role: "listitem", children: (0, s.jsx)(L, { tagid: t }) });
|
|
}
|
|
var Q = n(39257),
|
|
G = n(28165),
|
|
E = n(13743),
|
|
M = n(98995),
|
|
V = n(53807),
|
|
W = n(43014),
|
|
O = n(54303),
|
|
q = n(61416),
|
|
H = n(44846),
|
|
U = n(17231),
|
|
Z = n(68608),
|
|
Y = n(8573),
|
|
z = n(78771),
|
|
K = n(823),
|
|
X = n(8620),
|
|
J = n(71723),
|
|
$ = n(35198),
|
|
ee = n(12176),
|
|
te = n(7766),
|
|
ne = n(74110),
|
|
ae = n(83957),
|
|
se = n.n(ae),
|
|
re = n(10593);
|
|
class ie {
|
|
static async LoadFriendsRecommendedApp(e, t) {
|
|
const n = ee.w.Init(ne.KV);
|
|
n.Body().set_appid(t);
|
|
const a = await ne.YK.GetFriendsRecommendedApp(e, n),
|
|
s = a.GetEResult();
|
|
if (s == $.R) return a.Body().toObject();
|
|
throw `Error ${s} failed to call GetFriendsRecommendedApp ${t}`;
|
|
}
|
|
static async LoadStoreRelevanceData(e) {
|
|
let t = { appid: e },
|
|
n = { arrSimilarPlayedApps: [], bRecommendedByIR: !1 };
|
|
const a = (
|
|
await se().get(`${w.TS.STORE_BASE_URL}explore/ajaxgetstorerelevancedata`, {
|
|
params: t,
|
|
withCredentials: !0,
|
|
timeout: 1e4,
|
|
})
|
|
).data;
|
|
return (
|
|
a &&
|
|
a.success == $.R &&
|
|
(a.results.similar_played_apps &&
|
|
(n.arrSimilarPlayedApps = a.results.similar_played_apps.map((e) => ({
|
|
appid: e.appid,
|
|
playtimeForever: e.playtime_forever,
|
|
}))),
|
|
a.results.recommended_by_ir && (n.bRecommendedByIR = !0)),
|
|
n
|
|
);
|
|
}
|
|
}
|
|
var oe = n(79840),
|
|
le = n.n(oe),
|
|
ce = n(17613),
|
|
ue = n(15918),
|
|
de = n(54340);
|
|
const me = new C.wd("AppRelevance").Debug;
|
|
function pe(e) {
|
|
const {
|
|
appID: t,
|
|
bShowAvatars: n,
|
|
storeItem: r,
|
|
bHideDescription: i,
|
|
bShowCuratorInfo: o,
|
|
bShowCreatorInfo: l,
|
|
} = e,
|
|
c = (0, ue.Nd)(t),
|
|
u = (function (e) {
|
|
const t = (0, d.KV)();
|
|
return (0, q.I)({
|
|
queryKey: ["AppRelevanceStore", "FriendsRecommended", e],
|
|
queryFn: () => ie.LoadFriendsRecommendedApp(t, e),
|
|
enabled: w.iA.logged_in,
|
|
});
|
|
})(t),
|
|
m = (function (e) {
|
|
return (0, q.I)({
|
|
queryKey: ["AppRelevanceStore", "StoreRelevance", e],
|
|
queryFn: () => ie.LoadStoreRelevanceData(e),
|
|
enabled: w.iA.logged_in,
|
|
});
|
|
})(t),
|
|
p = (function () {
|
|
const { data: e } = (0, re.PG)("App Relevance Store Top Sellers", { sort: te.Dq.Rm, start: 0, count: 100 });
|
|
return e;
|
|
})(),
|
|
h = (0, q.I)({
|
|
queryKey: ["SimilarPlayedAppsLoad", t],
|
|
queryFn: () =>
|
|
A.A.Get().QueueMultipleAppRequests(
|
|
m.data.arrSimilarPlayedApps?.map((e) => e.appid),
|
|
{ include_basic_info: !0, include_assets: !0 },
|
|
),
|
|
enabled: m.isSuccess,
|
|
}),
|
|
g = (function (e, t) {
|
|
const n = (0, a.useMemo)(() => f.Fm.Get().GetRecommendingCuratorsForApp(e) || [], [e]);
|
|
return (0, q.I)({
|
|
queryKey: ["RecommendingCurators", e],
|
|
queryFn: () => Promise.all(n?.map((e) => z.ac.LoadClanInfoForClanAccountID(e))),
|
|
enabled: !!t && n && n.length > 0,
|
|
});
|
|
})(t, o),
|
|
y = (0, a.useMemo)(() => {
|
|
let e = [];
|
|
return (
|
|
r &&
|
|
((e = e.concat(r.GetAllFranchiseCreatorClans().map((e) => ({ nAccountID: e, type: "franchise" })))),
|
|
(e = e.concat(r.GetAllDeveloperCreatorClans().map((e) => ({ nAccountID: e, type: "developer" })))),
|
|
(e = e.concat(r.GetAllPublisherCreatorClans().map((e) => ({ nAccountID: e, type: "publisher" })))),
|
|
(e = e.filter((e) => f.Fm.Get().BIsFollowingCurator(e.nAccountID)))),
|
|
e
|
|
);
|
|
}, [r]),
|
|
v = (0, q.I)({
|
|
queryKey: ["FollowedCreators", t],
|
|
queryFn: () =>
|
|
z.ac.LoadClanInfoForClanAccountID(y[0].nAccountID).then((e) => ({ clanInfo: e, type: y[0].type })),
|
|
enabled: !!l && y && y.length > 0,
|
|
}),
|
|
_ = (0, q.I)({
|
|
queryKey: ["PlayerSummaries", t, n],
|
|
queryFn: async () => {
|
|
let e = [],
|
|
t = [],
|
|
a = [];
|
|
const s = n ? 10 : 1;
|
|
for (let t = 0; t < u.data.accountids_recommended?.length && t < s; t++) {
|
|
const n = Y.b.InitFromAccountID(u.data.accountids_recommended[t]);
|
|
e.push(n.ConvertTo64BitString());
|
|
}
|
|
for (let e = 0; e < c.data.in_wishlist?.length && e < s; e++) {
|
|
const n = new Y.b(c.data.in_wishlist[e].steamid);
|
|
t.push(n.ConvertTo64BitString());
|
|
}
|
|
for (let e = 0; e < c.data.owns?.length && e < s; e++) {
|
|
const t = new Y.b(c.data.owns[e].steamid);
|
|
a.push(t.ConvertTo64BitString());
|
|
}
|
|
return { rgRecommendedFriends: e, rgWishlistFriends: t, rgOwnedFriends: a };
|
|
},
|
|
enabled: u.isSuccess && c.isSuccess,
|
|
});
|
|
if (!p || h.isLoading || m.isLoading || u.isLoading || c.isLoading || g.isLoading || v.isLoading || _.isLoading)
|
|
return (0, s.jsx)(P.t, { size: "medium", position: "center" });
|
|
let S = [];
|
|
m.isSuccess &&
|
|
m.data.arrSimilarPlayedApps &&
|
|
m.data.arrSimilarPlayedApps.forEach((e) => {
|
|
const n = A.A.Get().GetApp(e.appid);
|
|
n
|
|
? S.push((0, s.jsx)(ge, { lifetimePlaytime: e.playtimeForever, storeItem: n }, e.appid))
|
|
: console.error("Failed to load store data ", t);
|
|
});
|
|
const C = p.GetItemIDs().findIndex((e) => e.appid === t),
|
|
D = m.data?.bRecommendedByIR,
|
|
b = S.length > 0,
|
|
T = c.data?.owns?.length,
|
|
j = c.data?.in_wishlist?.length,
|
|
N = u.data?.accountids_recommended?.length;
|
|
let R = 0;
|
|
return (
|
|
T > 0 && R++,
|
|
j > 0 && R++,
|
|
N > 0 && R++,
|
|
D && R++,
|
|
C >= 0 && R++,
|
|
S.length > 0 && R++,
|
|
o && g?.data?.length > 0 && R++,
|
|
l && Boolean(v.data) && R++,
|
|
me("FriendsOwned: ", T, " FriendsWishlisted: ", j, "cRecommended: ", N),
|
|
(0, s.jsxs)(s.Fragment, {
|
|
children: [
|
|
R > 0 &&
|
|
(0, s.jsxs)(s.Fragment, {
|
|
children: [
|
|
(0, s.jsx)("div", {
|
|
className: le().WhyRelevant,
|
|
children: (0, I.we)("#DiscoveryQueue_WhyRelevant"),
|
|
}),
|
|
(0, s.jsxs)("div", {
|
|
role: "list",
|
|
className: le().RelevantCtn,
|
|
children: [
|
|
b &&
|
|
(0, s.jsx)(Se, {
|
|
header: (0, I.we)("#DiscoveryQueue_SimilarGames"),
|
|
children: (0, s.jsx)("div", { className: le().ReleventSimilarAppsCtn, children: S }),
|
|
}),
|
|
o &&
|
|
g?.data?.length > 0 &&
|
|
(0, s.jsx)(Se, {
|
|
header: (0, I.we)("#ContentHub_Recommendation_Curators"),
|
|
children: (0, s.jsx)("div", {
|
|
className: (0, x.A)(le().ReleventSimilarAppsCtn, le().RecommendingCuratorsCtn),
|
|
children: g.data
|
|
.filter(Boolean)
|
|
.map((e) => (0, s.jsx)(fe, { curator: e }, "curator_" + e.clanAccountID)),
|
|
}),
|
|
}),
|
|
l && Boolean(v.data) && (0, s.jsx)(he, { creatorInfo: v.data }),
|
|
C >= 0 &&
|
|
(0, s.jsx)(Se, {
|
|
header: (0, I.um)(
|
|
"#DiscoveryQueue_TopSellers",
|
|
(0, de.D)(C + 1),
|
|
(0, s.jsx)("span", { className: le().RelevantTextBold }),
|
|
),
|
|
}),
|
|
D && !b && (0, s.jsx)(Se, { header: (0, I.we)("#DiscoveryQueue_RecommendedByIR") }),
|
|
(0, s.jsx)(Ae, {
|
|
bShowAvatars: n,
|
|
count: u.data?.accountids_recommended?.length,
|
|
locToken: "#DiscoveryQueue_FriendsRecommended",
|
|
arrSteamIDs: _.data?.rgRecommendedFriends,
|
|
}),
|
|
(0, s.jsx)(Ae, {
|
|
bShowAvatars: n,
|
|
count: c.data?.owns?.length,
|
|
locToken: "#DiscoveryQueue_FriendsOwned",
|
|
arrSteamIDs: _.data?.rgOwnedFriends,
|
|
}),
|
|
(0, s.jsx)(Ae, {
|
|
bShowAvatars: n,
|
|
count: c.data?.in_wishlist?.length,
|
|
locToken: "#DiscoveryQueue_FriendsWishlisted",
|
|
arrSteamIDs: _.data?.rgWishlistFriends,
|
|
}),
|
|
],
|
|
}),
|
|
],
|
|
}),
|
|
i && 0 != R
|
|
? (0, s.jsx)("div", { "aria-label": r.GetShortDescription() })
|
|
: (0, s.jsx)("div", {
|
|
className: (0, x.A)(le().AppDescription, R && le().Divider),
|
|
children: r.GetShortDescription(),
|
|
}),
|
|
],
|
|
})
|
|
);
|
|
}
|
|
function he(e) {
|
|
const { creatorInfo: t } = e;
|
|
if (!t) return null;
|
|
let n;
|
|
switch (t.type) {
|
|
case "publisher":
|
|
n = "#ContentHub_Recommendation_FollowedPublisher";
|
|
break;
|
|
case "developer":
|
|
n = "#ContentHub_Recommendation_FollowedDeveloper";
|
|
break;
|
|
case "franchise":
|
|
n = "#ContentHub_Recommendation_FollowedFranchise";
|
|
}
|
|
return n
|
|
? (0, s.jsx)(Se, {
|
|
header: (0, I.PP)(
|
|
n,
|
|
(0, s.jsx)("span", { className: le().RelevantTextBold, children: t.clanInfo?.group_name }),
|
|
),
|
|
})
|
|
: null;
|
|
}
|
|
function fe(e) {
|
|
const { curator: t } = e,
|
|
{ creatorHome: n } = (0, K.FV)(t?.clanAccountID);
|
|
return t && n
|
|
? (0, s.jsx)(r.Ii, {
|
|
href: n.GetCreatorHomeURL(null),
|
|
children: (0, s.jsx)("img", { src: t.avatar_medium_url }),
|
|
})
|
|
: null;
|
|
}
|
|
function ge(e) {
|
|
const { lifetimePlaytime: t, storeItem: n } = e,
|
|
a = (0, X.DJ)(n);
|
|
return (0, s.jsx)("div", {
|
|
className: le().SimilarAppCtn,
|
|
children: (0, s.jsx)(J.Q, {
|
|
id: a,
|
|
bHidePrice: !0,
|
|
hoverProps: { direction: "overlay", nBodyAlignment: 1, style: { minWidth: "320px", zIndex: 5e3 } },
|
|
children: (0, s.jsx)("img", {
|
|
className: le().SimilarAppImg,
|
|
alt: n.GetName(),
|
|
src: n.GetAssets().GetSmallCapsuleURL(),
|
|
}),
|
|
}),
|
|
});
|
|
}
|
|
function Ae(e) {
|
|
const { arrSteamIDs: t, count: n, locToken: a, bShowAvatars: r } = e;
|
|
return n
|
|
? 1 != n || r
|
|
? (0, s.jsx)(Se, {
|
|
header: (0, I.um)(a, n, (0, s.jsx)("span", { className: le().RelevantTextBold })),
|
|
children:
|
|
r &&
|
|
t.length > 0 &&
|
|
(0, s.jsx)("div", {
|
|
className: le().FriendAvatarsCtn,
|
|
children: 1 == n ? (0, s.jsx)(_e, { steamid: t[0] }) : (0, s.jsx)(ve, { arrSteamIDs: t }),
|
|
}),
|
|
})
|
|
: (0, s.jsx)(Se, { header: (0, I.PP)(a + "_Single", (0, s.jsx)(ye, { steamid: t[0] })) })
|
|
: null;
|
|
}
|
|
function ye(e) {
|
|
const { steamid: t } = e,
|
|
{ data: n } = (0, ce.js)(t);
|
|
return n && n.m_bInitialized
|
|
? (0, s.jsx)("span", {
|
|
"data-miniprofile": "s" + n.m_steamid.ConvertTo64BitString(),
|
|
className: le().RelevantTextBold,
|
|
children: n.m_strPlayerName,
|
|
})
|
|
: null;
|
|
}
|
|
function ve(e) {
|
|
const { arrSteamIDs: t } = e,
|
|
n = (0, ce.DW)(t);
|
|
return (0, s.jsx)(s.Fragment, {
|
|
children: n.map(
|
|
({ data: e }) =>
|
|
e &&
|
|
(0, s.jsx)(
|
|
U.i8,
|
|
{
|
|
"data-miniprofile": "s" + e.m_steamid.ConvertTo64BitString(),
|
|
persona: e,
|
|
size: "Small",
|
|
statusPosition: "right",
|
|
},
|
|
e.m_steamid.ConvertTo64BitString(),
|
|
),
|
|
),
|
|
});
|
|
}
|
|
function _e(e) {
|
|
const { steamid: t } = e,
|
|
{ data: n } = (0, ce.js)(t);
|
|
return n
|
|
? (0, s.jsxs)(i.Z, {
|
|
className: le().FriendBlockCtn,
|
|
"data-miniprofile": "s" + t,
|
|
children: [
|
|
(0, s.jsx)(U.i8, { persona: n, size: "Small", statusPosition: "right" }),
|
|
(0, s.jsx)(Z.D, {
|
|
className: le().PersonaStatus,
|
|
persona: n,
|
|
eFriendRelationship: H._UC,
|
|
bIsSelf: !1,
|
|
strNickname: null,
|
|
bParenthesizeNicknames: !1,
|
|
bCompactView: !1,
|
|
bNoMask: !0,
|
|
}),
|
|
],
|
|
})
|
|
: null;
|
|
}
|
|
function Se(e) {
|
|
const { children: t, header: n } = e;
|
|
return (0, s.jsxs)("div", {
|
|
className: le().RelevantItem,
|
|
children: [
|
|
(0, s.jsx)("div", { className: le().RelevantCheck, children: (0, s.jsx)(v.Jlk, {}) }),
|
|
(0, s.jsxs)("div", {
|
|
className: le().RelevantColumn,
|
|
children: [(0, s.jsx)("div", { className: le().ReleventText, children: n }), t],
|
|
}),
|
|
],
|
|
});
|
|
}
|
|
var xe = n(90076),
|
|
Ie = n(10343),
|
|
Ce = n(73998),
|
|
De = n(88875);
|
|
function be() {
|
|
(0, d.KV)();
|
|
const e = F.iA.accountid;
|
|
return (0, q.I)(
|
|
(function (e, t) {
|
|
return {
|
|
queryKey: we(t),
|
|
queryFn: async () => {
|
|
if (!t) return [];
|
|
const e = await (async function (e, t) {
|
|
const n = (0, De.Am)(F.TS.STORE_BASE_URL, t, F.iA.country_code),
|
|
a = await fetch(n);
|
|
return (await a.json()).rgRecommendedTags || [];
|
|
})(0, t);
|
|
return e;
|
|
},
|
|
staleTime: 6e5,
|
|
};
|
|
})(0, e),
|
|
);
|
|
}
|
|
function we(e) {
|
|
return ["RecommendedTag", e ?? 0];
|
|
}
|
|
var Te = n(94995),
|
|
je = n(81140),
|
|
Pe = n(71820),
|
|
Ne = n(18728),
|
|
Re = n.n(Ne),
|
|
Fe = n(20445),
|
|
ke = n(27343),
|
|
Le = n(97988);
|
|
const Be = {
|
|
name: "trailerPrefs",
|
|
options: { path: "/", secure: !0, maxAge: 2592e6 },
|
|
preferenceControls: { isTechnicallyNecessary: !0 },
|
|
},
|
|
Qe = { flVolume: 0.8, bMuted: !0 };
|
|
function Ge(e) {
|
|
!(function (e) {
|
|
return e.flVolume === Qe.flVolume && e.bMuted === Qe.bMuted;
|
|
})(e) && 0 != Object.keys(e).length
|
|
? (0, Le.eV)(Be, JSON.stringify(e))
|
|
: (0, Le.Y1)(Be);
|
|
}
|
|
function Ee(e) {
|
|
let { children: t } = e;
|
|
const [n, r] = (0, a.useState)(() =>
|
|
(function () {
|
|
try {
|
|
const e = (0, Le.j_)(Be);
|
|
if (!e) return Qe;
|
|
const t = JSON.parse(e);
|
|
return {
|
|
flVolume: "number" == typeof t.flVolume ? t.flVolume : Qe.flVolume,
|
|
bMuted: "boolean" == typeof t.bMuted ? t.bMuted : Qe.bMuted,
|
|
};
|
|
} catch (e) {
|
|
return Qe;
|
|
}
|
|
})(),
|
|
);
|
|
return (
|
|
(0, a.useEffect)(() => {
|
|
Ge(n);
|
|
}, [n]),
|
|
(0, s.jsx)(ke.v, {
|
|
playerVolume: n.flVolume,
|
|
setPlayerVolume: (e) => r((t) => ({ ...t, flVolume: e })),
|
|
audioMuted: n.bMuted,
|
|
setAudioMuted: (e) => r((t) => ({ ...t, bMuted: e })),
|
|
children: t,
|
|
})
|
|
);
|
|
}
|
|
var Me = n(79119),
|
|
Ve = n(82396),
|
|
We = n(94611),
|
|
Oe = n(36111),
|
|
qe = n.n(Oe),
|
|
He = n(44521),
|
|
Ue = n(92487);
|
|
const Ze = 0,
|
|
Ye = 1,
|
|
ze = 2;
|
|
function Ke(e) {
|
|
const { name: t, trailerCategory: n, trailerDisplay: r, mouseOver: i } = e,
|
|
[o, l] = a.useState(!1);
|
|
if (
|
|
(a.useEffect(() => {
|
|
r != Ze && l(!0);
|
|
}, [r]),
|
|
a.useEffect(() => {
|
|
if (i) return void l(!0);
|
|
if (!o) return;
|
|
const e = setTimeout(() => l(!1), 3e3);
|
|
return () => clearTimeout(e);
|
|
}, [o, i]),
|
|
null == n || r == Ze)
|
|
)
|
|
return;
|
|
const c = r == Ye ? Ue.Z.Localize("#StoreTrailer_Title_TrailerPreview") : (0, He.e)(n);
|
|
return (0, s.jsx)("div", {
|
|
className: (0, x.A)({ [qe().TrailerTitle]: !0, [qe().Visible]: o }),
|
|
children: Ue.Z.LocalizeReact(
|
|
"#StoreTrailer_Title_Combiner",
|
|
(0, s.jsx)("span", { className: qe().Category, children: c }),
|
|
t,
|
|
),
|
|
});
|
|
}
|
|
var Xe = n(59578),
|
|
Je = n(52050),
|
|
$e = n(64608),
|
|
et = n(9626),
|
|
tt = n(72403),
|
|
nt = n.n(tt);
|
|
var at = n(80656);
|
|
const st = new C.wd("TrailerAppVideo"),
|
|
rt = "bGameHighlightAutoplayDisabled";
|
|
function it(e) {
|
|
const {
|
|
id: t,
|
|
bCurrentlyActive: n,
|
|
autoPlayCookieName: r,
|
|
trailerBaseID: o,
|
|
showScreenshotInsteadOfMainCap: l,
|
|
autoplayCheckboxPosition: c,
|
|
refTogglePlayPause: u,
|
|
bShowAOAutoPlayWarning: d,
|
|
...m
|
|
} = e,
|
|
[p, h] = a.useState(!1),
|
|
[f, g] = a.useState(!1),
|
|
A = (0, Xe.$9)(),
|
|
y = (0, Ve.BF)(t, o, !0, d),
|
|
{ data: v } = (0, xe.J$)(t),
|
|
{ data: _ } = (0, xe.lv)(t),
|
|
S = (0, Me.DT)(t),
|
|
C = (d ?? !0) && y && !y.all_ages && "masked" == A,
|
|
D = (0, Xe.AS)(),
|
|
[b, w] = a.useState(!1),
|
|
[T, j] = a.useState(Ze),
|
|
[P, N] = (0, a.useState)(null),
|
|
[R, F] = (0, a.useState)(null),
|
|
{ bCookieLoaded: k } = (function (e, t, n) {
|
|
const s = a.useCallback(() => {
|
|
const t = (0, et.VY)(e ?? rt),
|
|
a = !(!t || "true" !== t.toLowerCase());
|
|
n(!a);
|
|
}, [e, n]);
|
|
return (function (e, t) {
|
|
const [n, s] = a.useState(!1);
|
|
return (a.useEffect(() => (e && (t(), s(!0)), () => s(!1)), [e, t]), { bCookieLoaded: n });
|
|
})(t, s);
|
|
})(r, n, h),
|
|
L = k;
|
|
(a.useEffect(() => {
|
|
n && L && p && !C && g(!0);
|
|
}, [p, L, n, C]),
|
|
a.useEffect(() => {
|
|
C && f && p && D();
|
|
}, [f, C, p, D]));
|
|
const B = (function (e, t, n, s) {
|
|
return a.useCallback(() => {
|
|
e == Ze
|
|
? t(!0)
|
|
: e == Ye && n
|
|
? n.paused
|
|
? n.play()
|
|
: n.pause()
|
|
: e == ze && s && (s.IsPaused() ? s.Play() : s.Pause());
|
|
}, [e, n, s, t]);
|
|
})(T, g, R, P);
|
|
a.useEffect(() => {
|
|
u && (u.current = B);
|
|
}, [B, u]);
|
|
const Q = l && S && S.length > 0 ? (0, Me.bu)(S[0], "600x338") : _ ? (0, Me.b0)(_, "main_capsule") : void 0;
|
|
return (0, s.jsxs)(i.Z, {
|
|
className: nt().AppCarouselTrailerCtn,
|
|
onMouseEnter: () => w(!0),
|
|
onMouseLeave: () => w(!1),
|
|
children: [
|
|
(0, s.jsx)("button", {
|
|
onClick: B,
|
|
"aria-label": Ue.Z.Localize("#SaleTrailerCarousel_PlayPause"),
|
|
children: (0, s.jsx)("img", {
|
|
className: (0, x.A)(nt().AppMainCap, T != Ze && nt().Hidden),
|
|
src: Q,
|
|
alt: "",
|
|
}),
|
|
}),
|
|
v &&
|
|
(0, s.jsx)(ut, {
|
|
appID: v.appid,
|
|
bAutoplayVideos: p,
|
|
autoplayCheckboxPosition: c,
|
|
fnSetAutoPlayVideos: (e) => {
|
|
((0, et.lc)(r ?? rt, String(!e), 3650), h(e), g(e));
|
|
},
|
|
}),
|
|
(0, s.jsx)(Ke, {
|
|
name: v?.name ?? "",
|
|
trailerCategory: y?.trailer_category,
|
|
trailerDisplay: T,
|
|
mouseOver: b,
|
|
}),
|
|
(0, s.jsx)(ot, {
|
|
eTrailerDisplay: T,
|
|
setTrailerDisplay: j,
|
|
featuredTrailer: y,
|
|
fnSetMainTrailer: N,
|
|
fnSetMicroTrailer: F,
|
|
loadedAndActive: L && n,
|
|
setVideoShouldStart: g,
|
|
bMouseOverVideo: b,
|
|
id: t,
|
|
fnTogglePlayPause: B,
|
|
bAutoplayVideos: p,
|
|
bVideoShouldStart: f,
|
|
...m,
|
|
}),
|
|
C &&
|
|
p &&
|
|
(0, s.jsxs)("div", {
|
|
className: nt().AOWarning,
|
|
children: [
|
|
(0, s.jsx)("div", { className: nt().Text, children: (0, I.we)("#StoreTrailer_AOWarning_1") }),
|
|
(0, s.jsx)("div", { className: nt().Text, children: (0, I.we)("#StoreTrailer_AOWarning_2") }),
|
|
],
|
|
}),
|
|
],
|
|
});
|
|
}
|
|
function ot(e) {
|
|
const {
|
|
id: t,
|
|
featuredTrailer: n,
|
|
bSkipMicroTrailer: r,
|
|
nFadeRatio: o,
|
|
fnPlayPause: l,
|
|
bRequestPause: c,
|
|
fnComplete: u,
|
|
eTrailerDisplay: d,
|
|
setTrailerDisplay: m,
|
|
fnSetMainTrailer: p,
|
|
fnSetMicroTrailer: h,
|
|
loadedAndActive: f,
|
|
setVideoShouldStart: g,
|
|
fnTogglePlayPause: A,
|
|
bAutoplayVideos: y,
|
|
bVideoShouldStart: _,
|
|
} = e,
|
|
[S, x] = a.useState(!1),
|
|
[I, C] = a.useState(!1),
|
|
[D, b] = a.useState(!1),
|
|
[w, T] = a.useState(!1),
|
|
[j, P] = (0, a.useState)(null),
|
|
[N, R] = (0, a.useState)(null),
|
|
{ data: F } = (0, xe.J$)(t),
|
|
k = !!n;
|
|
(a.useEffect(() => {
|
|
let e = !1;
|
|
(f && I && k && (e = d === Ze || (d === Ye && !D) || (d === ze && !w)), x(e), l?.(y && e));
|
|
}, [l, d, w, D, f, y, I, k]),
|
|
(function (e, t) {
|
|
a.useEffect(() => {
|
|
if (!e) return;
|
|
const n = () => t(!0),
|
|
a = () => t(!1);
|
|
return (
|
|
e.addEventListener("play", n),
|
|
e.addEventListener("pause", a),
|
|
() => {
|
|
(e.removeEventListener("play", n), e.removeEventListener("pause", a));
|
|
}
|
|
);
|
|
}, [t, e]);
|
|
})(N, b),
|
|
a.useEffect(() => {
|
|
_ || (m(Ze), x(!1), C(!1), N && (N.pause(), (N.currentTime = 0)), j && (j.Pause(), j.SeekToStart()));
|
|
}, [_, j, N, m]));
|
|
const L = a.useRef(!1);
|
|
(a.useEffect(() => {
|
|
if (f && d === Ze)
|
|
if ((C(!0), _)) {
|
|
if (j) {
|
|
(st.Debug("Starting microtrailer"), m(Ye));
|
|
const n = () =>
|
|
(function (e, t, n) {
|
|
if (e.current) return;
|
|
((e.current = !0), st.Debug("Starting main trailer"), t(ze), n.Play());
|
|
})(L, m, j);
|
|
r || !N
|
|
? n()
|
|
: (b(!0),
|
|
(N.onended = n),
|
|
(e = "microtrailer"),
|
|
(t = () => b(!1)),
|
|
N.play().catch((n) => {
|
|
(t(), st.Warning(`Failed to play ${e}: `, n));
|
|
}));
|
|
}
|
|
} else st.Debug("Showing image");
|
|
var e, t;
|
|
}, [f, d, r, _, u, m, j, N]),
|
|
(function (e, t) {
|
|
a.useEffect(() => {
|
|
if (!t || !t.onended) return;
|
|
if (!e) return;
|
|
let n = t.onended,
|
|
a = setTimeout(() => {
|
|
n();
|
|
}, 6e3);
|
|
return () => clearTimeout(a);
|
|
}, [e, t]);
|
|
})(D, N),
|
|
a.useEffect(() => {
|
|
f || g(!1);
|
|
}, [f, g]),
|
|
(function (e, t, n, s, r, i) {
|
|
const [o, l] = a.useState(!1);
|
|
a.useEffect(() => {
|
|
e && !o
|
|
? t == Ye && n && s
|
|
? (n.pause(), l(!0))
|
|
: t == ze && r && i && (r.Pause(), l(!0))
|
|
: !e && o && (t == Ye && n ? n.play() : t == ze && r && r.Play(), l(!1));
|
|
}, [t, e, o, s, i, n, r]);
|
|
})(!!c, d, N, D, j, w));
|
|
const B = (0, a.useCallback)((e) => {
|
|
(h(e), R(e));
|
|
}, []);
|
|
return F && F.visible && n
|
|
? (0, s.jsxs)(s.Fragment, {
|
|
children: [
|
|
S &&
|
|
(0, s.jsx)(i.Z, {
|
|
focusable: !0,
|
|
onClick: A,
|
|
className: nt().PlayButton,
|
|
children: (0, s.jsx)(v.IOc, {}),
|
|
}),
|
|
n.microtrailer &&
|
|
(0, s.jsx)("video", {
|
|
className: ct(!0, d),
|
|
ref: B,
|
|
preload: "auto",
|
|
playsInline: !0,
|
|
muted: !0,
|
|
onClick: A,
|
|
children: (0, s.jsx)(We.Ck, { trailer: n }),
|
|
}),
|
|
(0, s.jsx)(lt, {
|
|
trailer: n,
|
|
onRefChange: (e) => {
|
|
(P(e), p(e));
|
|
},
|
|
eTrailerDisplay: d,
|
|
fadeRatio: o,
|
|
onPlayPauseChange: T,
|
|
onPlaybackEnd: u,
|
|
}),
|
|
],
|
|
})
|
|
: null;
|
|
}
|
|
function lt(e) {
|
|
let {
|
|
trailer: t,
|
|
eTrailerDisplay: n,
|
|
fadeRatio: r,
|
|
onPlayPauseChange: i,
|
|
onPlaybackEnd: o,
|
|
onRefChange: l,
|
|
} = e;
|
|
const [c, u] = (0, a.useState)(null);
|
|
(0, a.useEffect)(() => {
|
|
if (void 0 !== r && c) {
|
|
let e = c.GetVolume() * r;
|
|
const t = !0;
|
|
c.SetVolume(e, t);
|
|
}
|
|
}, [r, c]);
|
|
let d = n != ze,
|
|
m = ct(!1, n);
|
|
const p = (0, a.useMemo)(() => (0, Ve.hg)(t), [t]),
|
|
h = (0, a.useCallback)((e) => {
|
|
(u(e), l(e));
|
|
}, []),
|
|
f = (0, a.useCallback)(() => {
|
|
i(!0);
|
|
}, [i]);
|
|
return (0, s.jsx)(Ee, {
|
|
children: (0, s.jsx)("div", {
|
|
className: m,
|
|
children: (0, s.jsx)(at.P, {
|
|
ref: h,
|
|
dashManifests: p.rgDashTrailers,
|
|
hlsManifest: p.rgHlsTrailers[0],
|
|
captionManifest: (0, Ve.Wv)(t),
|
|
screenshot: "",
|
|
altText: t.trailer_name,
|
|
forcePause: d,
|
|
muteWhenAutoplayBlocked: !0,
|
|
onPlaybackEnd: o,
|
|
onPlaybackStart: f,
|
|
onPlayPauseChange: i,
|
|
}),
|
|
}),
|
|
});
|
|
}
|
|
function ct(e, t) {
|
|
return (0, x.A)({
|
|
[nt().AppVideo]: !0,
|
|
[nt().PlayFullTrailer]: t == ze,
|
|
[nt().PlayMicrotrailer]: t == Ye,
|
|
[nt().NoTrailer]: t == Ze,
|
|
[nt().Microtrailer]: e,
|
|
[nt().Trailer]: !e,
|
|
});
|
|
}
|
|
function ut(e) {
|
|
const { appID: t, bAutoplayVideos: n, fnSetAutoPlayVideos: a, autoplayCheckboxPosition: r } = e,
|
|
i = { [r || "top"]: 0 };
|
|
return (0, s.jsx)(s.Fragment, {
|
|
children: (0, s.jsx)("div", {
|
|
onClick: (e) => {
|
|
(e.preventDefault(), e.stopPropagation());
|
|
},
|
|
className: nt().AutoplayCheckboxCtn,
|
|
children: (0, s.jsx)(
|
|
$e.Yh,
|
|
{
|
|
controlled: !0,
|
|
checked: n,
|
|
className: nt().AutoplayCheckbox,
|
|
style: i,
|
|
label: Je.n.Localize("#StoreTrailer_AutoPlayVideos"),
|
|
onChange: a,
|
|
},
|
|
t,
|
|
),
|
|
}),
|
|
});
|
|
}
|
|
function dt(e) {
|
|
const {
|
|
appID: t,
|
|
trailerBaseID: n,
|
|
focused: a,
|
|
skipMicroTrailer: r,
|
|
autoPlayCookieName: o,
|
|
showAOAutoPlayWarning: l,
|
|
showScreenshotInsteadOfMainCap: c,
|
|
fadeRatio: u,
|
|
fnPlayPause: d,
|
|
refTogglePlayPause: m,
|
|
bRequestPause: p,
|
|
fnComplete: h,
|
|
} = e,
|
|
f = (0, Fe.$5)(t),
|
|
{ data: g } = (0, xe.J$)(f),
|
|
{ data: A } = (0, xe.qI)(f),
|
|
{ bIsIgnored: y } = mt(t),
|
|
{ bIsWishlisted: v } = ht(t),
|
|
{ bIsWishlisted: _ } = ht(g?.related_items?.parent_appid),
|
|
[S, C] = (0, Pe.FD)();
|
|
return (0, s.jsxs)(i.Z, {
|
|
className: (0, x.A)(Re().AppVideoCtn, "AppVideoCtn"),
|
|
children: [
|
|
(0, s.jsx)("div", {
|
|
className: (0, x.A)(Re().WishlistBadge, (v || _) && Re().Active),
|
|
children: (0, I.we)("#Sale_OnWishlist"),
|
|
}),
|
|
S && (0, s.jsx)(Pe.Ff, { eDisplay: C, className: Re().DeckVerifiedLogo, storeItemPlatform: A }),
|
|
(0, s.jsxs)("div", {
|
|
className: Re().VideoArea,
|
|
children: [
|
|
(0, s.jsx)(pt, { appID: t }),
|
|
(0, s.jsx)(
|
|
it,
|
|
{
|
|
id: f,
|
|
trailerBaseID: n,
|
|
bCurrentlyActive: a && !y,
|
|
autoplayCheckboxPosition: "top",
|
|
autoPlayCookieName: o,
|
|
bShowAOAutoPlayWarning: l,
|
|
bSkipMicroTrailer: r,
|
|
nFadeRatio: u,
|
|
showScreenshotInsteadOfMainCap: c,
|
|
fnPlayPause: d,
|
|
refTogglePlayPause: m,
|
|
bRequestPause: p,
|
|
fnComplete: h,
|
|
},
|
|
t,
|
|
),
|
|
],
|
|
}),
|
|
],
|
|
});
|
|
}
|
|
function mt(e) {
|
|
const t = (0, Ie.BD)(e),
|
|
n = (0, p.ru)(),
|
|
{ mutateAsync: a } = (0, Ce.Q)(e, !t, n);
|
|
return { bIsIgnored: t, fnUpdateIgnored: a };
|
|
}
|
|
function pt(e) {
|
|
const { appID: t } = e,
|
|
n = (0, w.Qn)(),
|
|
{ bIsIgnored: a, fnUpdateIgnored: r } = mt(t);
|
|
return (0, s.jsx)("div", {
|
|
className: (0, x.A)(Re().IgnoredCtn, a && Re().Active),
|
|
children: (0, s.jsxs)("div", {
|
|
className: (0, x.A)(Re().IgnoredInfo, a && Re().Active),
|
|
children: [
|
|
(0, s.jsx)("div", { className: Re().IgnoredTitle, children: (0, I.we)("#SaleTrailerCarousel_Ignored") }),
|
|
(0, s.jsx)("div", {
|
|
className: Re().IgnoredDescription,
|
|
children: (0, I.we)("#SaleTrailerCarousel_IgnoredConfirmation"),
|
|
}),
|
|
(0, s.jsxs)(i.Z, {
|
|
className: (0, x.A)(Re().UndoButton, Re().UndoIgnoreButton),
|
|
onClick: r,
|
|
children: [
|
|
n && (0, s.jsx)(E.$m, { button: W.g4.X, type: E.wt.Light, size: E.xY.Medium }),
|
|
(0, I.we)("#SaleTrailerCarousel_Undo"),
|
|
],
|
|
}),
|
|
],
|
|
}),
|
|
});
|
|
}
|
|
function ht(e) {
|
|
const t = Boolean((0, Te.bB)(e)),
|
|
n = (0, p.ru)(),
|
|
{ mutate: a } = (0, je.s)(e, !t, n);
|
|
return { bIsWishlisted: t, fnUpdateWishlist: a };
|
|
}
|
|
var ft = n(47550);
|
|
const gt = {
|
|
include_assets: !0,
|
|
include_trailers: !0,
|
|
include_basic_info: !0,
|
|
include_tag_count: 20,
|
|
include_release: !0,
|
|
include_platforms: !0,
|
|
include_screenshots: !0,
|
|
include_reviews: !0,
|
|
};
|
|
new C.wd("DiscoveryQueueApp").Debug;
|
|
function At(e) {
|
|
const {
|
|
appID: t,
|
|
nItemHeight: n,
|
|
nItemWidth: r,
|
|
selected: o,
|
|
fnFocused: l,
|
|
eStoreDiscoveryQueueType: c,
|
|
storePageFilter: u,
|
|
bPreferDemoStorePage: d,
|
|
elVideo: m,
|
|
elDetails: p,
|
|
appAriaIDs: f,
|
|
} = e,
|
|
[g] = (0, y.t7)(t, gt),
|
|
A = (0, w.Qn)(),
|
|
v = (0, h.R7)(),
|
|
_ = v?.ownerWindow || window,
|
|
S = yt(g, c, u, d),
|
|
{ bIsIgnored: C, fnUpdateIgnored: D } = mt(t),
|
|
{ bIsWishlisted: b, fnUpdateWishlist: T } = ht(t),
|
|
j = a.useRef(void 0);
|
|
if (
|
|
(a.useEffect(() => {
|
|
o && j.current && j.current.focus({ preventScroll: !0 });
|
|
}, [o]),
|
|
!g)
|
|
)
|
|
return (console.warn("Error: missing store item for appid ", t), null);
|
|
const P = { width: r || void 0, height: n || void 0 };
|
|
return (0, s.jsxs)(i.Z, {
|
|
"aria-labelledby": (0, Q.q)(f.nameId, f.tagsId, f.reviewId, f.relevanceId, f.buttonsId),
|
|
ref: j,
|
|
style: P,
|
|
className: (0, x.A)(le().DiscoveryQueueApp, o && le().Selected),
|
|
onOptionsActionDescription: b
|
|
? (0, I.we)("#DiscoveryQueue_RemoveFromWishlist")
|
|
: (0, I.we)("#DiscoveryQueue_AddToWishlist"),
|
|
onOptionsButton: T,
|
|
onOKActionDescription: (0, I.we)("#DiscoveryQueue_ViewStorePage"),
|
|
onOKButton: () => {
|
|
_.location.href = S;
|
|
},
|
|
onSecondaryActionDescription: C ? (0, I.we)("#DiscoveryQueue_Undo") : (0, I.we)("#DiscoveryQueue_IgnoreLink"),
|
|
onSecondaryButton: D,
|
|
fnScrollIntoViewHandler: () => (l(), !0),
|
|
children: [
|
|
(0, s.jsx)("div", {
|
|
className: (0, x.A)(le().IgnoredCtn, C && le().Active),
|
|
children: (0, s.jsxs)("div", {
|
|
className: (0, x.A)(le().IgnoredInfo, C && le().Active),
|
|
children: [
|
|
(0, s.jsx)("div", { className: le().IgnoredTitle, children: (0, I.we)("#DiscoveryQueue_Ignored") }),
|
|
(0, s.jsx)("div", {
|
|
className: le().IgnoredDescription,
|
|
children: (0, I.we)("#DiscoveryQueue_IgnoredConfirmation"),
|
|
}),
|
|
(0, s.jsxs)(i.Z, {
|
|
className: (0, x.A)(le().QueueButton, le().UndoIgnoreButton),
|
|
onClick: D,
|
|
children: [
|
|
A && (0, s.jsx)(E.$m, { button: W.g4.X, type: E.wt.Light, size: E.xY.Medium }),
|
|
(0, I.we)("#DiscoveryQueue_Undo"),
|
|
],
|
|
}),
|
|
],
|
|
}),
|
|
}),
|
|
m,
|
|
p,
|
|
],
|
|
});
|
|
}
|
|
function yt(e, t, n, s) {
|
|
const r = (0, p.n9)();
|
|
return a.useMemo(() => {
|
|
if (!e) return;
|
|
const a = (0, T.Bk)(n),
|
|
i = t >= u.QV.qy ? "?inqueue=" + t + (n ? "_" + a : "") : "",
|
|
o = (0, p.bV)(r, e.GetStorePageURL(s) + i);
|
|
return (0, V.NT)(o);
|
|
}, [s, t, r, e, n]);
|
|
}
|
|
function vt(e) {
|
|
const {
|
|
appID: t,
|
|
bShowMinimizedDisplay: n,
|
|
eStoreDiscoveryQueueType: a,
|
|
storePageFilter: r,
|
|
bPreferDemoStorePage: o,
|
|
appAriaIDs: l,
|
|
} = e,
|
|
[c] = (0, y.t7)(t, gt),
|
|
u = (0, Fe.$5)(t),
|
|
{ bIsIgnored: d, fnUpdateIgnored: m } = mt(t),
|
|
{ bIsWishlisted: p, fnUpdateWishlist: h } = ht(t),
|
|
f = yt(c, a, r, o),
|
|
g = (0, w.Qn)(),
|
|
A = g;
|
|
if (!c) return;
|
|
const _ = c.GetAssets().GetLibraryCapsuleURL(),
|
|
S = c.GetAssets().GetHeaderURL();
|
|
return (0, s.jsxs)(i.Z, {
|
|
className: le().AppDetailsCtn,
|
|
children: [
|
|
(0, s.jsxs)("div", {
|
|
className: le().AppDetailsCtnTop,
|
|
children: [
|
|
_ &&
|
|
(0, s.jsxs)("a", {
|
|
className: (0, x.A)(le().CapsuleLink),
|
|
href: f,
|
|
children: [
|
|
(0, s.jsx)("img", { className: le().AppLibraryHero, src: _ }),
|
|
S && (0, s.jsx)("img", { className: le().AppHeader, src: S }),
|
|
],
|
|
}),
|
|
(0, s.jsxs)("div", {
|
|
id: l.nameId,
|
|
className: le().RightColumn,
|
|
children: [
|
|
(0, s.jsx)("a", { className: (0, x.A)(le().AppName), href: f, children: c.GetName() }),
|
|
(0, s.jsx)(G.NF, { bSingleLineMode: !0, id: u }),
|
|
],
|
|
}),
|
|
(0, s.jsx)(_t, { rgTagIDs: c.GetTagIDs(), ariaLabelID: l.tagsId }),
|
|
(0, s.jsx)("div", {
|
|
className: le().AppReviews,
|
|
id: l.reviewId,
|
|
children: (0, s.jsx)(ft.J, { bShowTooltip: !0, bTruncateTotalReviews: n, id: u }),
|
|
}),
|
|
(0, s.jsx)("div", {
|
|
id: l.relevanceId,
|
|
className: le().AppRelevanceCtn,
|
|
children: (0, s.jsx)(pe, { bHideDescription: g, bShowAvatars: !n, storeItem: c, appID: t }),
|
|
}),
|
|
],
|
|
}),
|
|
!g &&
|
|
(0, s.jsx)("div", {
|
|
className: le().AppActionButtonsCtn,
|
|
children: (0, s.jsx)("div", {
|
|
id: l.buttonsId,
|
|
className: le().AppActionJustButtonsCtn,
|
|
children: (0, s.jsxs)("div", {
|
|
className: le().ButtonsRowWrap,
|
|
children: [
|
|
c.BHasDemo() &&
|
|
(0, s.jsx)(O.j, { id: u, className: (0, x.A)(le().QueueButton, le().Primary, le().Launch) }),
|
|
(0, s.jsxs)("a", {
|
|
className: (0, x.A)(le().QueueButton, le().Primary),
|
|
href: f,
|
|
children: [
|
|
A &&
|
|
(0, s.jsx)(E.$m, {
|
|
button: W.g4.Y,
|
|
type: E.wt.Light,
|
|
size: E.xY.Medium,
|
|
additionalClassName: le().YGlyph,
|
|
}),
|
|
" ",
|
|
(0, I.we)("#DiscoveryQueue_ViewStorePage"),
|
|
],
|
|
}),
|
|
(0, s.jsx)(M.he, {
|
|
toolTipContent: p ? (0, I.we)("#RemoveFromWishlist_ttip") : (0, I.we)("#AddToWishlist_ttip"),
|
|
children: (0, s.jsxs)(i.Z, {
|
|
"aria-label": p ? (0, I.we)("#Sale_RemoveFromWishlist") : (0, I.we)("#Sale_AddToWishlist"),
|
|
focusable: !0,
|
|
className: (0, x.A)(le().QueueButton, p && le().Active),
|
|
onClick: h,
|
|
children: [
|
|
A &&
|
|
(0, s.jsx)(E.$m, {
|
|
button: W.g4.Y,
|
|
type: E.wt.Light,
|
|
size: E.xY.Medium,
|
|
additionalClassName: le().YGlyph,
|
|
}),
|
|
p ? (0, s.jsx)(v.qnF, {}) : (0, s.jsx)(v.T4m, {}),
|
|
],
|
|
}),
|
|
}),
|
|
(0, s.jsx)(M.he, {
|
|
toolTipContent: (0, I.we)("#SaleTrailerCarousel_IgnoreLink_ttip"),
|
|
children: (0, s.jsx)(i.Z, {
|
|
"aria-label": (0, I.we)("#DiscoveryQueue_IgnoreLink"),
|
|
focusable: !0,
|
|
className: (0, x.A)(le().QueueButton, d && le().Active),
|
|
onClick: m,
|
|
children: (0, s.jsx)(v.NtH, {}),
|
|
}),
|
|
}),
|
|
],
|
|
}),
|
|
}),
|
|
}),
|
|
],
|
|
});
|
|
}
|
|
function _t(e) {
|
|
const { rgTagIDs: t, ariaLabelID: n } = e,
|
|
r = (function (e) {
|
|
const { data: t } = be(),
|
|
n = a.useMemo(() => new Map((t || []).map((e) => e.tagid).map((e, t) => [e, t])), [t]),
|
|
s = a.useMemo(() => new Map(e.map((e, t) => [e, t])), [e]);
|
|
return a.useMemo(
|
|
() =>
|
|
e
|
|
.slice()
|
|
.sort((e, t) =>
|
|
n.has(e) && !n.has(t)
|
|
? -1
|
|
: !n.has(e) && n.has(t)
|
|
? 1
|
|
: n.has(e)
|
|
? n.get(e) - (n.get(t) ?? 0)
|
|
: s.get(e) - s.get(t),
|
|
),
|
|
[s, n, e],
|
|
);
|
|
})(t),
|
|
i = [...r].slice(0, 8);
|
|
return (0, s.jsx)("div", {
|
|
id: n,
|
|
role: "list",
|
|
className: le().AppTagsCtn,
|
|
children: i.map((e) => (0, s.jsx)(B, { className: le().TagEntry, tagID: e }, e)),
|
|
});
|
|
}
|
|
var St = n(57585),
|
|
xt = n.n(St);
|
|
function It(e) {
|
|
const { className: t, showPriorAsActive: n, count: a, selectedIndex: r, fnNavigate: o } = e;
|
|
return (0, s.jsx)(i.Z, {
|
|
"flow-children": "row",
|
|
className: (0, x.A)(xt().ProgressCtn, t),
|
|
children: Array.from({ length: a }).map((e, t) =>
|
|
(0, s.jsx)(
|
|
"div",
|
|
{
|
|
className: (0, x.A)({
|
|
[xt().ProgressDot]: !0,
|
|
[xt().ProgressDotActive]: n && t < r,
|
|
[xt().ProgressDotSelected]: t == r,
|
|
[xt().ProgressDotClickable]: !!o,
|
|
}),
|
|
onClick: o ? () => o(t) : void 0,
|
|
},
|
|
"dot_" + t,
|
|
),
|
|
),
|
|
});
|
|
}
|
|
var Ct = n(6760),
|
|
Dt = n(67784);
|
|
const bt = new C.wd("DiscoveryQueueWizard").Debug,
|
|
wt = 1,
|
|
Tt = 1400,
|
|
jt = "discoveryqueue2022";
|
|
async function Pt(e, t, n, a) {
|
|
let s = [],
|
|
r = !1;
|
|
try {
|
|
const { appids: i, exhausted: o } = await T.aI.Get().GetDiscoveryQueueAppsOfType(e, t, a);
|
|
((s = [...i]),
|
|
(r = o),
|
|
n && -1 === s.findIndex((e) => e === n) && s.unshift(n),
|
|
await A.A.Get().QueueMultipleAppRequests(s, { ...gt, ...Ct.LB }));
|
|
} catch (e) {
|
|
console.error("Failed getting discovery queue apps", e);
|
|
}
|
|
return { appids: s, exhausted: r };
|
|
}
|
|
function Nt(e) {
|
|
const [t, n] = a.useState(!1),
|
|
r = (0, d.KV)();
|
|
return (
|
|
(0, a.useEffect)(() => {
|
|
(T.aI.Init(r), n(!0));
|
|
}, [r]),
|
|
t ? (0, s.jsx)(Rt, { ...e }) : null
|
|
);
|
|
}
|
|
function Rt(e) {
|
|
const {
|
|
eStoreDiscoveryQueueType: t,
|
|
fnCloseModal: n,
|
|
includeAppID: o,
|
|
storePageFilter: c,
|
|
bPreferDemoStorePage: d,
|
|
bShowAOAutoPlayWarning: g,
|
|
} = e,
|
|
[A, y] = a.useState(0),
|
|
[C, j] = a.useState(void 0),
|
|
[P, R] = a.useState(0),
|
|
F = (0, h.R7)(),
|
|
k = F?.ownerWindow || window,
|
|
L = (0, p.ru)(jt),
|
|
[B, Q] = a.useState(0),
|
|
G = (0, m.b)();
|
|
((0, b.E)("ArrowLeft", () => O(!1), !0, !0),
|
|
(0, b.E)("Left", () => O(!1), !0, !0),
|
|
(0, b.E)("ArrowRight", () => O(!0), !0, !0),
|
|
(0, b.E)("Right", () => O(!0), !0, !0),
|
|
(0, b.E)("Escape", () => n?.(), !0, !0),
|
|
(0, b.E)("Esc", () => n?.(), !0, !0));
|
|
const E = a.useMemo(() => Boolean(k.innerWidth < Tt), [k]),
|
|
{ fnGetDiscoveryQueue: M, rgAppIDs: W } = (function (e, t, n) {
|
|
const [s, r] = a.useState([]),
|
|
i = (0, S.m)("DiscoveryQueueWizard"),
|
|
o = async (a) => {
|
|
let { appids: o } = await Pt(e, !a, a && n, t);
|
|
if (a && !o.length) {
|
|
let { appids: n } = await Pt(e, !0, void 0, t);
|
|
o = n;
|
|
}
|
|
if (!i?.token?.reason) {
|
|
const e = [...(s ?? []), ...o, wt];
|
|
r(e);
|
|
}
|
|
bt("Loaded new discovery queue apps: ", o);
|
|
};
|
|
return { fnGetDiscoveryQueue: o, rgAppIDs: s };
|
|
})(t, c, o);
|
|
(a.useEffect(() => {
|
|
(M(!0), f.Fm.Get().HintLoad());
|
|
}, []),
|
|
a.useEffect(() => {
|
|
const e = W[A];
|
|
e != C && (e && e != wt && G.AddImpression(e, L), j(e));
|
|
}, [G, A, C, W, L]));
|
|
const O = (e) => {
|
|
const t = D.OQ(A + (e ? 1 : -1), 0, W.length - 1);
|
|
t != A && (y(t), bt("New selected index: ", t, " Prev selected index: ", A));
|
|
};
|
|
(a.useEffect(() => {
|
|
W?.length &&
|
|
W[A] !== wt &&
|
|
(Q((e) => e + 1),
|
|
T.aI
|
|
.Get()
|
|
.SkipDiscoveryQueueItem(W[A], t, c)
|
|
.then(() => Q((e) => e - 1)));
|
|
}, [t, A, W, c]),
|
|
a.useEffect(() => {
|
|
W.length != P && (R(W.length), W.length > P && W[A] == wt && y(A + 1));
|
|
}, [P, A, W]));
|
|
const [q] = a.useState(new Map()),
|
|
H = (0, T.WX)(t, c),
|
|
U = !(0, N.c5)() && A > 0,
|
|
Z = !(0, N.c5)() && A < W.length - 1,
|
|
{
|
|
refContainer: Y,
|
|
bIsDragging: z,
|
|
nDragOffset: K,
|
|
nDragSelectedOffsetIndex: X,
|
|
handleTouchStart: J,
|
|
handleTouchMove: $,
|
|
handleTouchEnd: ee,
|
|
} = (function (e, t) {
|
|
const n = a.useRef(null),
|
|
[s, r] = a.useState(0),
|
|
[i, o] = a.useState(!1),
|
|
[l, c] = a.useState(0),
|
|
u = a.useRef(0),
|
|
d = 50,
|
|
m = (e) => {
|
|
(o(!0), (u.current = e.touches[0].clientX), r(0), c(0));
|
|
},
|
|
p = (e) => {
|
|
if (!i) return;
|
|
const t = e.touches[0].clientX - u.current;
|
|
(r(t), c(s > d ? 1 : s < -d ? -1 : 0));
|
|
},
|
|
h = () => {
|
|
i &&
|
|
(o(!1),
|
|
s > d ? e((e) => Math.max(e - 1, 0)) : s < -d && e((e) => Math.min(e + 1, t - 1)),
|
|
r(0),
|
|
c(0));
|
|
};
|
|
return {
|
|
refContainer: n,
|
|
bIsDragging: i,
|
|
nDragOffset: s,
|
|
nDragSelectedOffsetIndex: l,
|
|
handleTouchStart: m,
|
|
handleTouchMove: p,
|
|
handleTouchEnd: h,
|
|
};
|
|
})((e) => y(e), W.length),
|
|
te = (e) => D.W(A + e, W) && (D.LA(e, -1, 1) || z),
|
|
ne = (0, p.aL)(w.TS.STORE_BASE_URL + "explore?dq=widget"),
|
|
ae = !(0, w.Qn)() && !(0, Dt.$W)() && t === u.QV.qy,
|
|
se = (0, p.aL)(w.TS.STORE_BASE_URL + "explore/next/" + u.QV.qy),
|
|
re = W[A] !== wt,
|
|
{ nQueueStart: ie, nCount: oe } = (function (e, t) {
|
|
let n = 0;
|
|
for (let a = 0; a < e; a++) t[a] == wt && (n = a + 1);
|
|
let a = 0;
|
|
for (let n = e; n < t.length; n++) {
|
|
if (t[n] == wt) {
|
|
a = n;
|
|
break;
|
|
}
|
|
n == t.length - 1 && (a = t.length);
|
|
}
|
|
const s = a - n;
|
|
return { nQueueStart: n, nQueueEnd: a, nCount: s };
|
|
})(A, W);
|
|
return (0, s.jsx)(_.Ay, {
|
|
feature: jt,
|
|
children: (0, s.jsx)(i.Z, {
|
|
role: "dialog",
|
|
focusable: !1,
|
|
"flow-children": "column",
|
|
className: le().DiscoveryQueueCarouselCtn,
|
|
navEntryPreferPosition: l.iU.LAST,
|
|
onCancelButton: () => n?.(),
|
|
onCancelActionDescription: (0, I.we)("#Button_Close"),
|
|
children: (0, s.jsxs)("div", {
|
|
className: le().DiscoveryQueueWrapper,
|
|
onClick: (e) => {
|
|
e.target == e.currentTarget && (n?.(), e.stopPropagation());
|
|
},
|
|
children: [
|
|
H.length > 0 &&
|
|
(0, s.jsx)(i.Z, { "flow-children": "row", className: le().DiscoveryQueueName, children: H }),
|
|
(0, s.jsxs)(i.Z, {
|
|
"flow-children": "row",
|
|
className: le().TopBarCtn,
|
|
children: [
|
|
(0, s.jsx)(i.Z, {
|
|
className: le().LearnMore,
|
|
children: (0, I.oW)(
|
|
"#DiscoveryQueue_LearnMore_Default",
|
|
(0, s.jsx)(r.Ii, { className: le().LearnMoreLink, href: (0, V.NT)(ne) }),
|
|
),
|
|
}),
|
|
ae &&
|
|
(0, s.jsx)(i.Z, {
|
|
className: le().ClassicQueueLink,
|
|
children: (0, I.oW)(
|
|
"#DiscoveryQueue_ClassicQueue_Link",
|
|
(0, s.jsx)(r.Ii, { className: le().LearnMoreLink, href: (0, V.NT)(se) }),
|
|
),
|
|
}),
|
|
(0, s.jsx)(i.Z, {
|
|
className: le().ControlsCtn,
|
|
children: (0, s.jsx)(i.Z, {
|
|
focusable: !0,
|
|
className: le().QueueButton,
|
|
onClick: n,
|
|
"aria-label": (0, I.we)("#Button_Close"),
|
|
onActivate: () => n && n(),
|
|
children: (0, s.jsx)(v.X, {}),
|
|
}),
|
|
}),
|
|
],
|
|
}),
|
|
(0, s.jsx)(i.Z, {
|
|
role: "button",
|
|
"aria-label": (0, I.we)("#Carousel_Next"),
|
|
onClick: () => O(!1),
|
|
className: (0, x.A)(le().QueueNavArrow, le().LeftArrow, U && le().Enable),
|
|
children: (0, s.jsx)(v.l8x, { angle: 180 }),
|
|
}),
|
|
(0, s.jsx)(i.Z, {
|
|
role: "button",
|
|
"aria-label": (0, I.we)("#Carousel_Prev"),
|
|
onClick: () => O(!0),
|
|
className: (0, x.A)(le().QueueNavArrow, le().RightArrow, Z && le().Enable),
|
|
children: (0, s.jsx)(v.l8x, { angle: 0 }),
|
|
}),
|
|
(0, s.jsx)(i.Z, {
|
|
ref: Y,
|
|
className: le().DiscoveryQueueItemsCtn,
|
|
focusable: !1,
|
|
onTouchStart: J,
|
|
onTouchMove: $,
|
|
onTouchEnd: ee,
|
|
children: [-2, -1, 0, 1, 2].map((e) =>
|
|
(0, s.jsx)(
|
|
"div",
|
|
{
|
|
className: (0, x.A)({
|
|
[le().DiscoveryQueueItemPositioner]: !0,
|
|
[le().Dragging]: z,
|
|
[le().InRange]: te(e),
|
|
[le().FarLeft]: -2 == e,
|
|
[le().Left]: -1 == e,
|
|
[le().Current]: 0 == e,
|
|
[le().Right]: 1 == e,
|
|
[le().FarRight]: 2 == e,
|
|
[le().Selected]: e + X == 0,
|
|
}),
|
|
style: { "--dragOffsetX": `${K}px` },
|
|
children:
|
|
te(e) &&
|
|
(0, s.jsx)(Ft, {
|
|
eStoreDiscoveryQueueType: t,
|
|
storePageFilter: c,
|
|
rgAppIDs: W,
|
|
index: A + e,
|
|
bShowMinimizedDisplay: E,
|
|
selectedIndex: A,
|
|
bPreferDemoStorePage: Boolean(d),
|
|
mapViewedAppCount: q,
|
|
fnCloseModal: n,
|
|
fnLoadNextQueue: () => M(!1),
|
|
fnAdvance: O,
|
|
bSkipAppRequestPending: Boolean(0 != B),
|
|
showAOAutoPlayWarning: Boolean(g),
|
|
}),
|
|
},
|
|
A + e,
|
|
),
|
|
),
|
|
}),
|
|
(0, s.jsx)(It, {
|
|
className: (0, x.A)(!re && le().ProgressHidden),
|
|
showPriorAsActive: !0,
|
|
count: oe,
|
|
selectedIndex: A - ie,
|
|
}),
|
|
],
|
|
}),
|
|
}),
|
|
});
|
|
}
|
|
function Ft(e) {
|
|
const {
|
|
eStoreDiscoveryQueueType: t,
|
|
storePageFilter: n,
|
|
rgAppIDs: r,
|
|
index: i,
|
|
bShowMinimizedDisplay: o,
|
|
selectedIndex: l,
|
|
bPreferDemoStorePage: c,
|
|
mapViewedAppCount: u,
|
|
fnCloseModal: d,
|
|
fnLoadNextQueue: m,
|
|
fnAdvance: p,
|
|
bSkipAppRequestPending: h,
|
|
showAOAutoPlayWarning: f,
|
|
} = e,
|
|
[g, A] = a.useState(!1),
|
|
y = {
|
|
nameId: a.useId(),
|
|
tagsId: a.useId(),
|
|
reviewId: a.useId(),
|
|
relevanceId: a.useId(),
|
|
buttonsId: a.useId(),
|
|
},
|
|
v = () => {
|
|
l != i && p(i > l);
|
|
},
|
|
_ = l === i,
|
|
S = a.useRef(_);
|
|
if (
|
|
(a.useEffect(() => {
|
|
const e = S.current;
|
|
if (((S.current = _), e && !_)) {
|
|
A(!0);
|
|
const e = setTimeout(() => A(!1), 500);
|
|
return () => {
|
|
clearTimeout(e);
|
|
};
|
|
}
|
|
}, [_]),
|
|
r[i] == wt)
|
|
) {
|
|
let s = 0;
|
|
for (let e = i - 1; e >= 0; e--) r[e] == wt && (s += 1);
|
|
let o = 0;
|
|
for (let e = i - 1; e >= 0 && r[e] !== wt; e--) o++;
|
|
return (
|
|
u.has(s) || u.set(s, T.aI.Get().GetTotalSkippedAppsForDiscoveryQueue(t, n)),
|
|
(0, a.createElement)(kt, {
|
|
...e,
|
|
key: l,
|
|
selected: _,
|
|
lastCard: l == r.length - 1,
|
|
fnLoadNextQueue: m,
|
|
fnCloseModal: d,
|
|
summaryCardIndex: s,
|
|
eStoreDiscoveryQueueType: t,
|
|
viewedAppCount: (u.get(s) || 0) + o,
|
|
fnFocused: v,
|
|
fnAdvance: () => p(!0),
|
|
bSkipAppRequestPending: h,
|
|
})
|
|
);
|
|
}
|
|
const x = _ || S.current || g;
|
|
return (0, s.jsx)(At, {
|
|
appAriaIDs: y,
|
|
eStoreDiscoveryQueueType: t,
|
|
storePageFilter: n,
|
|
selected: _,
|
|
appID: r[i],
|
|
bPreferDemoStorePage: c,
|
|
fnFocused: v,
|
|
elVideo: (0, s.jsx)(dt, { appID: r[i], focused: x, showAOAutoPlayWarning: f, fnComplete: void 0 }),
|
|
elDetails: (0, s.jsx)(vt, {
|
|
appID: r[i],
|
|
bShowMinimizedDisplay: o,
|
|
eStoreDiscoveryQueueType: t,
|
|
storePageFilter: n,
|
|
bPreferDemoStorePage: c,
|
|
appAriaIDs: y,
|
|
}),
|
|
});
|
|
}
|
|
function kt(e) {
|
|
const {
|
|
eStoreDiscoveryQueueType: t,
|
|
fnCloseModal: n,
|
|
summaryCardIndex: r,
|
|
lastCard: o,
|
|
selected: l,
|
|
fnLoadNextQueue: u,
|
|
storePageFilter: d,
|
|
fnDisplaySummaryReward: m,
|
|
viewedAppCount: h,
|
|
fnFocused: A,
|
|
fnAdvance: y,
|
|
bSkipAppRequestPending: v,
|
|
} = e,
|
|
[_, C] = a.useState(!1),
|
|
D = (0, w.Qn)(),
|
|
b = (0, g.Qt)(c.L6.Jz, w.TS.LANGUAGE, !1),
|
|
[j, P] = a.useState(0),
|
|
[N, R] = a.useState(0),
|
|
{ data: F } = (0, Te.F0)();
|
|
a.useEffect(() => {
|
|
l &&
|
|
!_ &&
|
|
F &&
|
|
f.Fm.Get()
|
|
.HintLoad()
|
|
.then(() => {
|
|
T.aI
|
|
.Get()
|
|
.LoadSkippedApps(t, d)
|
|
.then((e) => {
|
|
(P(e.reduce((e, t) => (F.has(t) ? e + 1 : e), 0)),
|
|
R(e.reduce((e, t) => (f.Fm.Get().BIsGameIgnored(t) ? e + 1 : e), 0)),
|
|
C(!0));
|
|
});
|
|
});
|
|
}, [_, t, l, d, F]);
|
|
const [k, L] = a.useState(!1),
|
|
B = (0, T.IH)(t, d),
|
|
Q = (0, S.m)("DiscoveryQueueSummary"),
|
|
G = async () => {
|
|
o ? k || (L(!0), await u(), Q?.token?.reason || L(!1)) : y();
|
|
};
|
|
return (0, s.jsxs)(Lt, {
|
|
selected: l,
|
|
fnFocused: A,
|
|
fnOnContinue: G,
|
|
fnCloseModal: n,
|
|
bLoaded: _,
|
|
children: [
|
|
(0, s.jsxs)("div", {
|
|
className: le().SummaryContentCtn,
|
|
children: [
|
|
(0, s.jsx)("div", {
|
|
className: le().SummaryTitle,
|
|
children: (0, I.we)("#DiscoveryQueue_SummaryTitle"),
|
|
}),
|
|
!B && l && b.data?.definition && (0, s.jsx)(Qt, { bSkipAppRequestPending: v, summaryCardIdx: r }),
|
|
(0, s.jsx)("div", { className: le().YourStats, children: (0, I.we)("#DiscoveryQueue_YourStats") }),
|
|
(0, s.jsxs)(i.Z, {
|
|
"flow-children": "row",
|
|
className: le().SummaryGrid,
|
|
children: [
|
|
(0, s.jsxs)("div", {
|
|
className: le().GridItem,
|
|
children: [
|
|
(0, s.jsx)("div", {
|
|
className: le().GridTitle,
|
|
children: (0, I.we)("#DiscoveryQueue_ViewedCaps"),
|
|
}),
|
|
(0, s.jsx)("div", { className: le().GridNumber, children: (0, de.D)(h) }),
|
|
(0, s.jsx)("div", {
|
|
className: le().GridSubTitle,
|
|
children: (0, I.we)("#DiscoveryQueue_Titles"),
|
|
}),
|
|
],
|
|
}),
|
|
(0, s.jsxs)("div", {
|
|
className: le().GridItem,
|
|
children: [
|
|
(0, s.jsx)("div", {
|
|
className: le().GridTitle,
|
|
children: (0, I.we)("#DiscoveryQueue_WishlistedCaps"),
|
|
}),
|
|
(0, s.jsx)("div", { className: le().GridNumber, children: (0, de.D)(j) }),
|
|
(0, s.jsx)(p.Fh, {
|
|
className: (0, x.A)(le().GridSubTitle, le().TextLink),
|
|
href: (0, V.NT)(w.TS.STORE_BASE_URL + "wishlist"),
|
|
children: (0, I.we)("#DiscoveryQueue_ViewWishlist"),
|
|
}),
|
|
],
|
|
}),
|
|
(0, s.jsxs)("div", {
|
|
className: le().GridItem,
|
|
children: [
|
|
(0, s.jsx)("div", {
|
|
className: le().GridTitle,
|
|
children: (0, I.we)("#DiscoveryQueue_IgnoredCaps"),
|
|
}),
|
|
(0, s.jsx)("div", { className: le().GridNumber, children: (0, de.D)(N) }),
|
|
(0, s.jsx)(p.Fh, {
|
|
className: (0, x.A)(le().GridSubTitle, le().TextLink),
|
|
href: (0, V.NT)(w.TS.STORE_BASE_URL + "account/notinterested"),
|
|
children: (0, I.we)("#DiscoveryQueue_ViewIgnored"),
|
|
}),
|
|
],
|
|
}),
|
|
],
|
|
}),
|
|
!D &&
|
|
(0, s.jsxs)(i.Z, {
|
|
className: le().SummaryActionButtonsCtn,
|
|
children: [
|
|
(0, s.jsx)(i.Z, {
|
|
className: (0, x.A)(le().QueueButton, le().Wide),
|
|
onClick: n,
|
|
children: (0, I.we)("#ActionButtonLabelDone"),
|
|
}),
|
|
!B &&
|
|
(0, s.jsx)(i.Z, {
|
|
className: (0, x.A)(k && le().Disabled, le().QueueButton, le().Primary, le().Wide),
|
|
onClick: G,
|
|
children: k ? (0, I.we)("#Loading") : (0, I.we)("#Button_Continue"),
|
|
}),
|
|
],
|
|
}),
|
|
],
|
|
}),
|
|
Boolean(!B) && (0, s.jsx)(s.Fragment, { children: Boolean(m) && m(r + 1) }),
|
|
],
|
|
});
|
|
}
|
|
function Lt(e) {
|
|
const { children: t, selected: n, fnOnContinue: r, fnCloseModal: i, fnFocused: l, bLoaded: c } = e,
|
|
u = (0, p.aL)(w.TS.STORE_BASE_URL + "wishlist"),
|
|
d = (0, h.R7)(),
|
|
m = d?.ownerWindow || window,
|
|
f = a.useRef(void 0);
|
|
return (
|
|
a.useEffect(() => {
|
|
n && f.current && f.current.focus({ preventScroll: !0 });
|
|
}, [n]),
|
|
(0, s.jsx)(o.YZ, {
|
|
ref: f,
|
|
"aria-live": "polite",
|
|
className: (0, x.A)(le().SummaryCtn, le().DiscoveryQueueApp, n && le().Selected),
|
|
onOptionsActionDescription: (0, I.we)("#DiscoveryQueue_ViewWishlist"),
|
|
onOptionsButton: () => {
|
|
m.location.href = (0, V.NT)(u);
|
|
},
|
|
onOKActionDescription: (0, I.we)("#Button_Continue"),
|
|
onOKButton: () => {
|
|
r();
|
|
},
|
|
onCancelActionDescription: (0, I.we)("#ActionButtonLabelDone"),
|
|
onCancelButton: () => i && i(),
|
|
fnScrollIntoViewHandler: () => (l(), !0),
|
|
children: c
|
|
? t
|
|
: (0, s.jsx)(P.t, {
|
|
className: le().DiscoveryQueueThrobber,
|
|
msDelayAppear: 200,
|
|
size: "large",
|
|
position: "center",
|
|
}),
|
|
})
|
|
);
|
|
}
|
|
function Bt() {
|
|
return (0, s.jsx)(i.Z, {
|
|
className: le().SaleRewardsCtn,
|
|
children: (0, s.jsx)(P.t, { size: "large", position: "center" }),
|
|
});
|
|
}
|
|
function Qt(e) {
|
|
const { bSkipAppRequestPending: t, summaryCardIdx: n } = e;
|
|
return t ? (0, s.jsx)(Bt, {}) : (0, s.jsx)(Gt, { summaryCardIdx: n });
|
|
}
|
|
function Gt(e) {
|
|
const { summaryCardIdx: t } = e,
|
|
n = (0, g.os)(c.L6.Jz, w.TS.LANGUAGE, !1, t.toString()),
|
|
[a] = (0, y.t7)(n?.data?.current_def?.appid, {}),
|
|
r = (0, w.Qn)();
|
|
if (!n?.data?.current_def || !a?.GetName().length) return (0, s.jsx)(Bt, {});
|
|
const o = n.data.num_items_earned,
|
|
l = n.data.current_def.num_items_per_def,
|
|
u = l - o,
|
|
d = (o / l) * 100;
|
|
return (0, s.jsxs)(i.Z, {
|
|
className: le().SaleRewardsCtn,
|
|
children: [
|
|
(0, s.jsx)(j.A, { nPercent: d, size: 70, strokeWidth: 12 }),
|
|
(0, s.jsxs)(i.Z, {
|
|
className: le().RewardStatusCtn,
|
|
children: [
|
|
(0, s.jsx)("div", {
|
|
className: le().SaleRewardAppTitle,
|
|
children: (0, I.we)(
|
|
"#DiscoveryQueue_SaleStatus_Title" + (u ? "" : "_Complete"),
|
|
(0, de.D)(o),
|
|
a.GetName(),
|
|
),
|
|
}),
|
|
u > 0 &&
|
|
(0, s.jsx)("div", {
|
|
className: le().SaleRewardAppTitle,
|
|
children: (0, I.we)("#DiscoveryQueue_SaleStatus_Desc", (0, de.D)(u), a.GetName()),
|
|
}),
|
|
!r &&
|
|
(0, s.jsx)("a", {
|
|
href: (0, V.NT)(w.TS.COMMUNITY_BASE_URL + "my/itemcollection"),
|
|
children: (0, I.we)("#DiscoveryQueue_SaleStatus_Link"),
|
|
}),
|
|
],
|
|
}),
|
|
],
|
|
});
|
|
}
|
|
},
|
|
},
|
|
]); //# sourceMappingURL=file:///home/buildbot/buildslave/npm-coordinator-hotfix-steamui/build/client/steamui/sourcemaps/discoveryqueue.js.map
|