PageSourceSearch

https://cybershoke.net/assets/Achievements-COedO-L6.js

js cybershoke.net collected 2026-10-04 05:23:45 UTC 16,520 bytes, 529 lines download raw bytes

1import{j as e,r as $}from"./vendor-react-BGN68_Lp.js";import{a as D,u as M,b as H}from"./vendor-redux-D8sX5Eqv.js";import{g as h,q as k,b as W,gI as B,u as K,T as q,a2 as V,N as J,E as Q}from"./index-uear5Vpj.js";import{g as n}from"./vendor-styled-pkIKgjgv.js";import{u as P}from"./vendor-i18n-BWleq_Sd.js";import{L as X}from"./locker-D8MYdao_.js";import"./vendor-socket-DSYo_sTV.js";import"./vendor-router-CYD8mbvC.js";const Y=n.div`
2    position: static;
3
4    h5 {
5        font-weight: 500;
6        font-size: 16px;
7        line-height: 19px;
8        text-align: center;
9        color: #ffffff;
10    }
11`,Z=n.div`
12    display: flex;
13    flex-direction: column;
14    align-items: center;
15    justify-content: flex-start;
16
17    @media (max-width: 650px) {
18        & > h6 {
19            display: none !important;
20        }
21    }
22`,ee=n.span`
23    margin: 16px 0 8px 0;
24    display: block;
25    height: 3px;
26    width: 100%;
27    background: #3f4860;
28    border-radius: 10px;
29
30    &:before {
31        content: '';
32        position: absolute;
33        left: 0;
34        top: 0;
35        height: 100%;
36        background: #3f4860;
37        display: block;
38        width: ${t=>t.width}%;
39    }
40`,te=n.span`
41    font-weight: 500;
42    font-size: 12px;
43    color: #91a8b9;
44    text-align: center;
45`,ie=n.div`
46    display: flex;
47    align-items: center;
48    position: absolute;
49    top: 6px;
50    right: 6px;
51    z-index: 1;
52    cursor: pointer;
53
54    & > div {
55        display: flex;
56        align-items: center;
57        flex-direction: row-reverse;
58    }
59`,ae=n.div`
60    width: 24px;
61    padding: 3px;
62    border-radius: 50%;
63    height: 24px;
64    background: #161c26;
65
66    img {
67        width: 100%;
68        border-radius: 50%;
69    }
70
71    &:nth-of-type(2),
72    &:nth-of-type(1) {
73        margin-left: -8px;
74    }
75`,T=t=>{switch(t){case"none":return"bronze";case"bronze":return"silver";default:return"gold"}},ne=t=>{let{goal:s,medal:r,player:o,friends:c,medalMode:m}=t.i;const d=D(),f=M(i=>i.profilePage.friends.friends_all),{t:a}=P();let l=T(o.medal),x=r[l].task,g=o.result;const y=(i,p)=>`${i}/${p}`,u=()=>{const i=m??t.mode,p=v=>v==="none"?"bronze":v,w=p(o.medal),b=r[w].img,z=t.filtered?i==="Global"?a(i):i:k(s.name,{mode:i}),U=c?Object.entries(c).map(([v,j])=>{const E=f[v],L=p(j.medal),F=T(j.medal),O=r[F].task,A=s.show_progress,I=A?Math.floor(j.result/O*100):100;return{avatar:E?.avatar,name:E?.name,steamid:v,result:j.result,progress:I,progressText:A&&y(j.result,O),progressImg:h(`/img/achievements/${L}/${r[L].img}`)}}):[];d(W("FRIENDS_PROGRESS",{img:h(`/img/achievements/${w}/${b}`),title:z,desc:k(s.info,{value:x}),currentPoints:s.show_progress?g:null,reachPoints:x,mode:i,list:U}))};return e.jsx("li",{className:o.medal,onClick:u,children:e.jsxs(Y,{children:[e.jsx(ie,{children:e.jsx("div",{children:Object.keys(c).slice(0,3).map(i=>e.jsx(ae,{children:e.jsx("img",{loading:"lazy",src:t.allFriends[i]?.avatar,alt:""})},i))})}),e.jsxs(Z,{children:[e.jsx("div",{children:e.jsx("img",{loading:"lazy",src:h(`/img/achievements/${o.medal=="none"?"bronze":o.medal}/${r[o.medal=="none"?"bronze":o.medal].img}`),alt:"",className:"image"})}),e.jsx("h5",{children:k(s.name,{mode:m??t.mode})}),e.jsx("h6",{children:k(s.info,{value:x})}),e.jsx(ee,{className:"progress",width:s.show_progress?g/x*100:100}),s.show_progress&&e.jsxs(te,{className:"date",children:[g,"/",x," ",o.medal!="gold"&&a(`${l}Next`)]})]})]})})},G=["LOUNGE","RUST"],N=n.span`
76    font-weight: 500;
77    font-size: 12px;
78    color: #778597;
79`,C=n.h6`
80    display: block;
81    font-weight: 700;
82    font-size: 16px;
83    color: #c7d3e2;
84`,R=n.img`
85    width: 18px;
86    position: absolute;
87    top: 7px;
88    right: 7px;
89    opacity: 0;
90    transition: all 0.2s ease;
91
92    &.showStar {
93        opacity: 1;
94    }
95
96    &:hover {
97        filter: brightness(130%);
98    }
99`,S=n.div`
100    width: 34px;
101    margin-right: 10px;
102    display: flex;
103    justify-content: center;
104    /* padding: 0 5px; */
105
106    img {
107        width: 100%;
108        filter: invert(37%) sepia(25%) saturate(428%) hue-rotate(181deg)
109            brightness(93%) contrast(91%);
110    }
111`,re=n.div`
112    max-height: 655px;
113    overflow: auto;
114    width: calc(100% + 13px);
115    padding-right: 13px;
116
117    li {
118        padding: 0 17px;
119        border: 1px solid #1a1e2d;
120        border-radius: 8px;
121        height: 68px;
122        display: flex;
123        align-items: center;
124        margin-bottom: 6px;
125        cursor: pointer;
126        transition: all 0.2s ease;
127
128        &:hover {
129            background: #1a1f2b;
130            border-color: #1a1f2b;
131
132            ${R} {
133                opacity: 1;
134            }
135        }
136
137        &.active {
138            background: linear-gradient(
139                83.89deg,
140                #222c50 2.61%,
141                #1c2239 70.26%
142            );
143            border: 1px solid #273360;
144
145            ${N} {
146                color: #a8bbe1;
147            }
148
149            ${C} {
150                color: #ecf1f8;
151            }
152
153            ${S} {
154                img {
155                    filter: invert(57%) sepia(61%) saturate(5586%)
156                        hue-rotate(213deg) brightness(105%) contrast(101%);
157                }
158            }
159        }
160    }
161
162    @media all and (max-width: 840px) {
163        max-height: none;
164        overflow: hidden;
165    }
166`,se=t=>{const{t:s}=P(),{likedModes:r,toggleLikedMode:o}=B(),c=M(({root:a})=>Object.keys(a.modes[a.currentGame])),m=M(a=>Object.values(a.root.modeList[a.root.currentGame])),d=K(),f=(a,l)=>{l.stopPropagation(),o(a)};return e.jsxs(re,{delay:30,className:"grey-scroll",children:[e.jsxs("li",{className:t.currentMode.id==0&&"active",onClick:()=>{t.setWrapped(!0),d(`/${t.basicUrl}/achievements`)},children:[e.jsx(S,{children:e.jsx("img",{loading:"lazy",src:h("/pages/leaderboard/mode-icons/global.svg"),alt:""})}),e.jsxs("div",{children:[e.jsx(C,{children:s("Global")}),e.jsx(N,{children:s("NoCategory")})]})]}),[...r.filter(a=>!G.includes(a)),...m.filter(a=>!r.includes(a)&&c.includes(a)&&!G.includes(a))].map(a=>t.modes[a]&&e.jsxs("li",{className:t.modes[a].id==t.currentMode.id&&"active",onClick:()=>{t.setWrapped(!0),d(`/${t.basicUrl}/achievements/${t.modes[a].mode.toLowerCase()}`)},children:[e.jsx(R,{src:h(`/pages/leaderboard/icons/star2${r.includes(a)?"-fill":""}.svg`),alt:"",className:r.includes(a)?"showStar":void 0,onClick:l=>f(a,l)}),e.jsx(S,{children:e.jsx("img",{loading:"lazy",src:h(`/pages/leaderboard/mode-icons/${a}.svg`),alt:""})}),e.jsxs("div",{children:[e.jsx(C,{children:t.modes[a].name}),e.jsx(N,{children:q.some(l=>l==t.modes[a].mode)?s("TrainingMode"):s("EntertainmentMode")})]})]},a))]})},oe=n.div`
167    font-weight: 700;
168    font-size: 14px;
169    text-transform: uppercase;
170    color: #ecf1f8;
171    display: flex;
172    align-items: center;
173
174    img {
175        height: 14px;
176        margin-right: 9px;
177    }
178`,de=n.div`
179    display: grid;
180    grid-template-columns: 1fr 1fr 1fr;
181    grid-gap: 6px;
182    width: 100%;
183    margin-top: 12px;
184
185    span {
186        width: 6px;
187        height: 6px;
188        display: block;
189        margin-right: 4px;
190        border-radius: 50%;
191        background: #fcc251;
192    }
193
194    a {
195        height: 28px;
196        display: flex;
197        align-items: center;
198        justify-content: center;
199        background: #1a1e2d;
200        border-radius: 8px;
201        font-weight: 500;
202        font-size: 14px;
203        transition:
204            opacity 0.2s ease,
205            background 0.2s ease;
206
207        &:hover {
208            background: #1b1f2e;
209        }
210
211        &.muted {
212            opacity: 0.35;
213        }
214
215        &.active {
216            opacity: 1;
217            background: #202536ff;
218        }
219
220        &.bronze {
221            color: #d48f71;
222
223            span {
224                background: #d48f71;
225            }
226        }
227
228        &.silver {
229            color: #a5c9ff;
230
231            span {
232                background: #a5c9ff;
233            }
234        }
235
236        &.gold {
237            color: #fcc251;
238
239            span {
240                background: #fcc251;
241            }
242        }
243    }
244`,le=n.div`
245    background: #131821;
246    border-radius: 10px;
247    position: sticky;
248    top: 0;
249
250    @media all and (max-width: 840px) {
251        padding: 16px;
252        position: relative;
253    }
254`,ce=n.div`
255    background: #161b25;
256    border-radius: 10px 10px 0px 0px;
257    padding: 24px;
258    display: flex;
259    align-items: center;
260    justify-content: space-between;
261
262    @media all and (max-width: 840px) {
263        padding: 0px;
264        margin-bottom: 20px;
265    }
266`,ge=n.div`
267    display: flex;
268    flex-direction: column;
269    background: #131821;
270    border-radius: 10px;
271
272    @media all and (max-width: 840px) {
273        background: transparent;
274    }
275`,xe=n.div`
276    padding: 0 36px;
277    height: 80px;
278    background: #161b25;
279    display: flex;
280    align-items: center;
281    justify-content: space-between;
282    border-radius: 10px 10px 0 0;
283
284    h1 {
285        font-size: 20px;
286        line-height: 23px;
287        font-weight: 700;
288        color: #d9e3f1;
289        display: flex;
290        align-items: center;
291        text-transform: none;
292    }
293
294    @media all and (max-width: 650px) {
295        flex-direction: column;
296        padding: 36px;
297        align-items: flex-start;
298        height: auto;
299        gap: 12px;
300    }
301`,pe=n.div`
302    padding: 24px 26px 24px 24px;
303
304    @media all and (max-width: 840px) {
305        padding: 0;
306        height: ${t=>t.wrapped?"68px":"100%"};
307        overflow: hidden;
308    }
309`,me=n.div`
310    font-weight: 700;
311    font-size: 16px;
312    line-height: 19px;
313    color: #6080ff;
314    display: flex;
315    align-items: center;
316    letter-spacing: normal;
317    width: 100%;
318
319    span {
320        margin-left: 10px;
321        width: 100%;
322        height: 4px;
323        display: block;
324        background: #1e2533;
325        border-radius: 2px;
326        overflow: hidden;
327
328        &:before {
329            content: '';
330            position: absolute;
331            left: 0;
332            top: 0;
333            height: 100%;
334            width: ${t=>t.width}%;
335            max-width: 100%;
336            display: block;
337            background: #6080ff;
338        }
339    }
340`,he=n.div`
341    display: flex;
342    flex-direction: column;
343    align-items: flex-start;
344    justify-content: flex-start;
345    width: 100%;
346
347    h6 {
348        font-weight: 400;
349        font-size: 14px;
350        margin-bottom: 5px;
351        color: #c7d3e2;
352        text-transform: none;
353        letter-spacing: normal;
354        display: block;
355    }
356`,fe=n.div`
357    flex: 1;
358    min-height: 0;
359    padding: 24px 41px 40px 24px;
360
361    @media all and (max-width: 840px) {
362        padding: 0;
363    }
364`,ue=n.ul`
365    display: grid;
366    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
367    grid-gap: 12px;
368    width: calc(100% + 13px);
369    padding-right: 13px;
370
371    li {
372        background: #161b25;
373        border: 1px solid #1a1e2d;
374        border-radius: 8px;
375        padding: 10px 21.5px 20px;
376        cursor: pointer;
377        transition: all 0.2s ease;
378
379        &:hover {
380            background: #181d27;
381        }
382
383        h6 {
384            font-weight: 500;
385            font-size: 14px;
386            margin-top: 12px;
387            color: #91a8b9;
388            text-align: center;
389            height: 51px;
390            display: flex;
391        }
392
393        .image {
394            width: auto;
395            margin: 16px 0;
396            height: 95px;
397            image-rendering: auto;
398        }
399
400        &.none .image {
401            opacity: 0.3;
402        }
403
404        &.gold {
405            background: linear-gradient(
406                27.76deg,
407                rgba(148, 120, 67, 0.2) 19.12%,
408                rgba(42, 34, 19, 0.2) 65.52%
409            );
410            border: 1px solid rgba(252, 194, 81, 0.1);
411
412            h6 {
413                color: #fcc251;
414            }
415
416            .date {
417                color: #fee5b4;
418            }
419
420            .progress::before {
421                background: #fcc251;
422                max-width: 100%;
423            }
424        }
425
426        &.silver {
427            background: linear-gradient(
428                27.76deg,
429                #222c50 19.12%,
430                #1c2239 65.52%
431            );
432            border: 1px solid rgba(165, 201, 255, 0.2);
433
434            h6 {
435                color: #a5c9ff;
436            }
437
438            .date {
439                color: #d6e7ff;
440            }
441
442            .progress::before {
443                background: #a5c9ff;
444                max-width: 100%;
445            }
446        }
447
448        &.bronze {
449            background: linear-gradient(
450                27.76deg,
451                rgba(119, 78, 55, 0.2) 19.12%,
452                rgba(25, 30, 40, 0.2) 65.52%
453            );
454            border: 1px solid rgba(212, 143, 113, 0.1);
455
456            h6 {
457                color: #d48f71;
458            }
459
460            .date {
461                color: #eccec0;
462            }
463
464            .progress::before {
465                background: #d48f71;
466                max-width: 100%;
467            }
468
469            &:hover {
470                background: linear-gradient(
471                    27.76deg,
472                    rgba(119, 78, 55, 0.2) 30.12%,
473                    rgba(25, 30, 40, 0.2) 65.52%
474                );
475            }
476        }
477
478        &.diamond {
479            background: linear-gradient(
480                27.76deg,
481                #27465e 19.12%,
482                #1c2939 65.52%
483            );
484            border: 1px solid rgba(212, 143, 113, 0.1);
485
486            h6 {
487                color: #52b1e0;
488            }
489
490            .date {
491                color: #34bcff;
492            }
493
494            .progress::before {
495                background: #52b1e0;
496                max-width: 100%;
497            }
498        }
499    }
500`,be=n.div`
501    margin-top: 12px;
502    height: 48px;
503    display: none;
504    align-items: center;
505    justify-content: center;
506    background: rgba(33, 40, 55, 0.85);
507    backdrop-filter: blur(4px);
508    border-radius: 8px;
509    font-weight: 500;
510    font-size: 14px;
511    color: #aab5c6;
512    position: sticky;
513    bottom: 0;
514
515    @media (max-width: 840px) {
516        display: flex;
517    }
518`,ve=n.div`
519    display: grid;
520    padding: 24px;
521    grid-template-columns: 348px 1fr;
522    gap: 24px;
523
524    @media all and (max-width: 840px) {
525        grid-template-columns: 1fr;
526        padding: 16px;
527        gap: 16px;
528    }
529`,_=["bronze","silver","gold"],je=t=>{const{t:s}=P(),[r,o]=$.useState({}),[c,m]=$.useState(!0),d=M(({root:i})=>i.modes[i.currentGame]),f=_.includes(t.subtab)?t.subtab:null,a=i=>[i,f&&f!==i?"muted":null].filter(Boolean).join(" "),l=i=>Object.entries(t.achievements).flatMap(([p,w])=>w.filter(b=>b.player?.medal==i).map(b=>({...b,medalMode:Object.values(d).find(z=>z.id==p)?.name??"Global"})));$.useEffect(()=>{if(t.achievements&&d){let i=d[V(t.subtab)];if(t.subtab=="bronze"||t.subtab=="silver"||t.subtab=="gold")return o({id:null,pins:l(t.subtab),name:t.subtab,filtered:!0});if(i)return o({...i,pins:t.achievements[i.id],filtered:!1});o({id:0,name:"Global",pins:t.achievements[0],filtered:!1})}},[t.subtab,t.lang,t.achievements,d]);const x=Object.values(t.achievements).flat(),g=x.length,y=i=>x.filter(p=>p.player.medal==i).length,u=g-y("none");return e.jsxs(ve,{children:[e.jsx("div",{children:e.jsxs(le,{children:[e.jsx(ce,{children:e.jsxs(he,{children:[e.jsxs("h6",{children:[s("OverallProgress")," (",Math.round(u/g*100),"%)"]}),e.jsxs(me,{width:Math.round(u/g*100),children:[u,"/",g,e.jsx("span",{})]}),u!=0&&e.jsx(de,{children:_.map(i=>e.jsxs(J,{to:`/${t.basicUrl}/achievements/${i}`,className:a(i),children:[e.jsx("span",{}),Math.round(y(i)/g*100),"%"]},i))})]})}),e.jsx(pe,{wrapped:c,children:e.jsx(se,{basicUrl:t.basicUrl,currentMode:r,modes:d,setWrapped:m})}),e.jsx(be,{onClick:()=>m(!c),children:e.jsx("p",{children:s(c?"ShowCategories":"HideCategories")})})]})}),e.jsxs(ge,{children:[e.jsxs(xe,{children:[e.jsx("h1",{children:r.name=="Global"||r.filtered?s(r.name):r.name}),e.jsx(oe,{children:!r.filtered&&e.jsxs(e.Fragment,{children:[e.jsx("img",{loading:"lazy",src:h("/img/achievements/unlock.svg"),alt:""}),t.achievements[r.id]?.filter(i=>i.player?.medal=="gold").length,"/",t.achievements[r.id]?.length]})})]}),e.jsx(fe,{children:r.pins?.length?e.jsx(ue,{className:"grey-scroll",children:r.pins.map(i=>e.jsx(ne,{i,allFriends:t.friends,mode:r.name,filtered:r.filtered}))}):e.jsx(Q,{text:"NoAchievements",subtext:"NoAchievementsDescription",icon:e.jsx(X,{}),variant:"compact",height:"100%"})})]})]})};let ye=t=>({achievements:t.profilePage.achievements,friends:t.profilePage.friends.friends_all,lang:t.root.lang});const Pe=H(ye,null)(je);export{Pe as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.