@banou/ftube 0.0.0-stage → 0.0.0
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/LICENSE +21 -0
- package/README.md +44 -2
- package/__yt_engine__/engine.html +9 -0
- package/app.webmanifest +31 -0
- package/assets/account-BL8Hv7lS.js +157 -0
- package/assets/account-By94iboj.js +1 -0
- package/assets/account-DfiXzypA-YE6OyKjK.js +1 -0
- package/assets/account-generation-BP_-Qyck-BOth6YQ_.js +1 -0
- package/assets/agent-source-E4g0cDzU.js +1 -0
- package/assets/api-1NDCtwel-CAaxX8P1.js +3 -0
- package/assets/binary-encoding-By5K7InN.js +1 -0
- package/assets/build-CNn3bm6X.js +1 -0
- package/assets/busy-C1JPjoZ_-CJ0641jK.js +1 -0
- package/assets/cards-Csel8naI.js +2334 -0
- package/assets/channel-B5f9YTIf.js +1160 -0
- package/assets/client-version-D9kIz6Gz.js +1 -0
- package/assets/comments-CJp9O808.js +612 -0
- package/assets/dislikes-DH5jCVEY.js +1 -0
- package/assets/dist-7VpLCl1k.js +1 -0
- package/assets/dist-BOrL1gYg.js +2 -0
- package/assets/downloads-CMXDjA_E.js +191 -0
- package/assets/egress.worker-DopXr5uP.js +104 -0
- package/assets/engine-B_kFyW7L.js +2 -0
- package/assets/feed-channels-Dg2mvF5x.js +251 -0
- package/assets/feed-groups-CnyR4sOO.js +160 -0
- package/assets/feed-history-BDAGG9N5.js +368 -0
- package/assets/feed-playlists-DcGR2AL6.js +167 -0
- package/assets/feed-subscriptions-Sm3tKz4P.js +165 -0
- package/assets/feed-you-lxbqknXX.js +110 -0
- package/assets/formats-CDwXfKnr.js +1 -0
- package/assets/frame-BrGNSf3s.js +2 -0
- package/assets/fs-CjRTQ7Nu.js +1 -0
- package/assets/fs-CwRtKje1-CBsYhX2-.js +1 -0
- package/assets/fullscreen-view-BLgosU84.js +269 -0
- package/assets/group-C00s0aT7.js +183 -0
- package/assets/groups-button-CvVnqwlu.js +25 -0
- package/assets/hashtag-CCIhITaL.js +115 -0
- package/assets/icons-DKsqNLSs.js +1 -0
- package/assets/index-A5dHbptn.css +1 -0
- package/assets/index-DwsYJ-bu.js +1328 -0
- package/assets/lib-h0P14ZFl.js +70 -0
- package/assets/linkify-B6hdFhsL.js +1 -0
- package/assets/packages-C3w3tSjj-BCtDk0vj.js +1 -0
- package/assets/party-CUcxsJDF.js +180 -0
- package/assets/playlist-DF7wsidw.js +521 -0
- package/assets/playlist-card-Btoc7D8f.js +91 -0
- package/assets/playlist-panel-D97BwT1f.js +199 -0
- package/assets/post-CQ9mfVos.js +39 -0
- package/assets/post-card-ZUQixO1G.js +76 -0
- package/assets/privacy-hkbqXFeB.js +46 -0
- package/assets/protobuf-BXZ2dCCc.js +1 -0
- package/assets/read-more-BhddUSlS.js +20 -0
- package/assets/rich-text-07paR5O3.js +25 -0
- package/assets/roboto-cyrillic-ext-BCp_3N7R.woff2 +0 -0
- package/assets/roboto-cyrillic-fOt7epNf.woff2 +0 -0
- package/assets/roboto-greek-DlT9XTxE.woff2 +0 -0
- package/assets/roboto-greek-ext-Bgw4czJT.woff2 +0 -0
- package/assets/roboto-latin-ccAYIvAh.woff2 +0 -0
- package/assets/roboto-latin-ext-DYIxWhlt.woff2 +0 -0
- package/assets/roboto-math-4a3xuzGk.woff2 +0 -0
- package/assets/roboto-symbols-B7iHSfaG.woff2 +0 -0
- package/assets/roboto-vietnamese-_f1XEJpo.woff2 +0 -0
- package/assets/rooms-B-AvBY-c-FNDqRDHE.js +1 -0
- package/assets/rooms-B91zuirR.js +1 -0
- package/assets/save-menu-DF1WKqSE.js +462 -0
- package/assets/search-Cx5IpDtZ.js +1026 -0
- package/assets/settings-kESE_uBm.js +99 -0
- package/assets/shaka-BwT9pJcV.js +36 -0
- package/assets/share-dialog-Cp0BJ6bg.js +156 -0
- package/assets/shorts-BxDB7m0c.js +686 -0
- package/assets/shorts-grid-Bgbkl5dP.js +11 -0
- package/assets/sign-in-Bx3zmj-m.js +97 -0
- package/assets/signed-out-prompt-CEAx65kq.js +79 -0
- package/assets/signin-DkI8Ogzz.js +18 -0
- package/assets/social-bXt3vmd4.js +1 -0
- package/assets/video-card-compact-r-K4XyDb.js +190 -0
- package/assets/watch-CkxSP1IA.js +1802 -0
- package/assets/web-BNanCsH5.js +43 -0
- package/favicon.ico +0 -0
- package/favicon.svg +5 -0
- package/icons/icon-192.png +0 -0
- package/icons/icon-512.png +0 -0
- package/index-Bj-Q3X8Q.js +4120 -0
- package/index.html +32 -0
- package/package.json +45 -4
- package/store/background.webp +0 -0
- package/store/channel.webp +0 -0
- package/store/cover.webp +0 -0
- package/store/phone.webp +0 -0
- package/store/search.webp +0 -0
- package/store/watch.webp +0 -0
|
@@ -0,0 +1,1802 @@
|
|
|
1
|
+
import{$ as e,C as t,Gt as n,Ht as r,N as i,Nt as a,Pt as o,U as s,Vt as c,W as l,Z as u,an as d,bt as ee,dt as f,en as p,in as m,jt as h,k as te,kt as ne,ln as g,lt as _,n as v,on as y,ot as b,r as x,rn as re,rt as ie,sn as S,tn as C,u as ae,xt as oe,yt as se}from"./icons-DKsqNLSs.js";import{D as w,O as T,T as ce,a as le,c as E,d as ue,g as D,k as de,o as fe,ot as O,s as k,y as pe}from"./sign-in-Bx3zmj-m.js";import{$ as me,A as he,B as ge,D as A,Gt as _e,H as j,K as ve,N as M,St as N,T as P,U as ye,V as be,W as xe,Y as Se,Z as Ce,Zt as we,_t as F,a as Te,cn as Ee,ct as De,et as Oe,gt as ke,ht as Ae,in as je,k as I,ln as L,lt as Me,mn as R,on as Ne,pt as Pe,q as Fe,rn as z,st as Ie,u as Le,ut as B,vt as Re,wn as ze,wt as Be,xn as V,xt as H,yn as Ve}from"./cards-Csel8naI.js";import{d as He,n as Ue,r as We,u as Ge}from"../index-Bj-Q3X8Q.js";import{n as Ke,r as qe,t as Je}from"./comments-CJp9O808.js";import{t as Ye}from"./rich-text-07paR5O3.js";import{n as Xe,t as Ze}from"./save-menu-DF1WKqSE.js";import{n as U,r as W,t as Qe}from"./share-dialog-Cp0BJ6bg.js";import{n as G,t as K}from"./video-card-compact-r-K4XyDb.js";import{t as $e}from"./playlist-panel-D97BwT1f.js";import{t as q}from"./dislikes-DH5jCVEY.js";S();var et=5e3,J=250,tt=1e3,nt=3e3,rt=2e3,it=500,at=8e3,ot=({playhead:e,fetchPage:t,show:n,onRestart:r,limit:i})=>{let a=[],o=[],s,c=0,l=!1,u=!1,d=0,ee=0,f=0,p,m=e=>{a=e.length>i?e.slice(e.length-i):e,n(a)},h=async e=>{u=!0;let n=f,r=await t(Math.round(e),s).catch(()=>void 0);if(n!==f)return;if(u=!1,!r){s=void 0,d=Date.now()+Math.min(at,it*2**ee),ee+=1;return}ee=0;let i=new Set([...a,...o].map(e=>e.id)),p=r.items.filter(e=>!i.has(e.id));o=[...o,...p].sort((e,t)=>(e.offsetMs??0)-(t.offsetMs??0)),c=Math.max(c,...r.items.map(e=>e.offsetMs??0)),s=r.cursor??void 0,l=s===void 0,p.length===0&&(d=Date.now()+rt)},te=()=>{f+=1,o=[],s=void 0,c=0,l=!1,u=!1,d=0,m([]),r()},ne=()=>{let t=e();if(t===void 0)return;let n=t*1e3;p!==void 0&&(n<p-tt||n>p+nt)&&te(),p=n;let r=o.findIndex(e=>(e.offsetMs??0)>n),i=r===-1?o:o.slice(0,r);i.length>0&&(o=o.slice(i.length),m([...a,...i])),!(u||l||Date.now()<d)&&(s===void 0||c-n<et)&&h(n)};m([]),ne();let g=setInterval(ne,J);return()=>{clearInterval(g),f+=1}},st=/(^|[\s([{"',;:!?])(@[^\s@,;:!?()[\]{}"']+)/g,ct=e=>{if(!e)return[{text:e}];let t=[],n=0;for(st.lastIndex=0;;){let r=st.exec(e);if(!r)break;let i=r[1]??``,a=r[2].replace(/\.+$/,``);if(a.length<=1)continue;let o=r.index+i.length;o>n&&t.push({text:e.slice(n,o)}),t.push({text:a,mention:a}),n=o+a.length}return t.length===0?[{text:e}]:(n<e.length&&t.push({text:e.slice(n)}),t)},lt=/(?:^|[\s([{"',;:!?])@([^\s@,;:!?()[\]{}"']*)$/,ut=(e,t)=>{let n=Math.max(0,Math.min(t,e.length)),r=e.slice(0,n),i=lt.exec(r);if(!i)return;let a=i[1]??``;return{start:n-a.length-1,query:a}},dt=e=>{let t=e.handle?.trim();return t?t.startsWith(`@`)?t.slice(1):t:e.name.trim()},ft=(e,t,n,r)=>{let i=r.startsWith(`@`)?r.slice(1):r,a=Math.max(0,Math.min(t,e.length)),o=Math.max(a,Math.min(n,e.length)),s=`@${i} `;return{value:`${e.slice(0,a)}${s}${e.slice(o)}`,cursor:a+s.length}},pt=(e,t,n=6)=>{let r=t.trim().toLowerCase(),i=[],a=new Set;for(let t=e.length-1;t>=0;--t){let o=e[t],s=dt(o);if(s&&!a.has(o.id)&&(a.add(o.id),(r.length===0||o.name.toLowerCase().includes(r)||s.toLowerCase().includes(r))&&(i.push(o),i.length>=n)))break}return i},Y=e=>{let t=e?.trim().toLowerCase();if(t)return t.startsWith(`@`)?t.slice(1):t},mt=(e,t)=>{let n=Y(e);if(!n||!t)return!1;let r=Y(t.handle),i=Y(t.name);return!!(r&&n===r||i&&n===i)},ht=D(`
|
|
2
|
+
query LiveChat($videoId: ID!, $view: ChatReplayView, $cursor: String) {
|
|
3
|
+
liveChat(videoId: $videoId, view: $view, cursor: $cursor) {
|
|
4
|
+
items {
|
|
5
|
+
id
|
|
6
|
+
kind
|
|
7
|
+
text
|
|
8
|
+
runs { text url videoId startSeconds browseId emojiUrl emojiLabel }
|
|
9
|
+
timestampText
|
|
10
|
+
isOwner
|
|
11
|
+
isModerator
|
|
12
|
+
isMember
|
|
13
|
+
badges { label iconUrl kind backgroundColor textColor }
|
|
14
|
+
purchaseAmountText
|
|
15
|
+
headerBackgroundColor
|
|
16
|
+
bodyBackgroundColor
|
|
17
|
+
headerPrimaryText
|
|
18
|
+
headerSubtext
|
|
19
|
+
stickerUrl
|
|
20
|
+
stickerLabel
|
|
21
|
+
iconType
|
|
22
|
+
author { id name avatar handle }
|
|
23
|
+
}
|
|
24
|
+
cursor
|
|
25
|
+
removedIds
|
|
26
|
+
removedAuthorIds
|
|
27
|
+
disabled
|
|
28
|
+
pinned {
|
|
29
|
+
id
|
|
30
|
+
header
|
|
31
|
+
message {
|
|
32
|
+
id
|
|
33
|
+
kind
|
|
34
|
+
text
|
|
35
|
+
runs { text url videoId startSeconds browseId emojiUrl emojiLabel }
|
|
36
|
+
timestampText
|
|
37
|
+
isOwner
|
|
38
|
+
isModerator
|
|
39
|
+
isMember
|
|
40
|
+
badges { label iconUrl kind backgroundColor textColor }
|
|
41
|
+
purchaseAmountText
|
|
42
|
+
headerBackgroundColor
|
|
43
|
+
bodyBackgroundColor
|
|
44
|
+
headerPrimaryText
|
|
45
|
+
headerSubtext
|
|
46
|
+
stickerUrl
|
|
47
|
+
stickerLabel
|
|
48
|
+
iconType
|
|
49
|
+
author { id name avatar handle }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
pinnedCleared
|
|
53
|
+
customEmojis { id shortcut url }
|
|
54
|
+
inputState {
|
|
55
|
+
status
|
|
56
|
+
restrictionMessage
|
|
57
|
+
restrictionMode
|
|
58
|
+
placeholder
|
|
59
|
+
maxLength
|
|
60
|
+
slowModeSeconds
|
|
61
|
+
}
|
|
62
|
+
leaderboard {
|
|
63
|
+
label
|
|
64
|
+
panelId
|
|
65
|
+
params
|
|
66
|
+
}
|
|
67
|
+
poll {
|
|
68
|
+
id
|
|
69
|
+
question
|
|
70
|
+
questionRuns { text url videoId startSeconds browseId emojiUrl emojiLabel }
|
|
71
|
+
metadataText
|
|
72
|
+
choices {
|
|
73
|
+
id
|
|
74
|
+
text
|
|
75
|
+
runs { text url videoId startSeconds browseId emojiUrl emojiLabel }
|
|
76
|
+
votePercentage
|
|
77
|
+
voteRatio
|
|
78
|
+
selected
|
|
79
|
+
voteParams
|
|
80
|
+
}
|
|
81
|
+
finished
|
|
82
|
+
}
|
|
83
|
+
pollCleared
|
|
84
|
+
tickerItems {
|
|
85
|
+
id
|
|
86
|
+
label
|
|
87
|
+
avatar
|
|
88
|
+
authorName
|
|
89
|
+
backgroundColor
|
|
90
|
+
textColor
|
|
91
|
+
durationSeconds
|
|
92
|
+
detailText
|
|
93
|
+
}
|
|
94
|
+
reactionBurst
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
`),gt=D(`
|
|
98
|
+
query LiveChatLeaderboard($panelId: String!, $params: String!) {
|
|
99
|
+
liveChatLeaderboard(panelId: $panelId, params: $params) {
|
|
100
|
+
title
|
|
101
|
+
items {
|
|
102
|
+
rank
|
|
103
|
+
displayName
|
|
104
|
+
avatar
|
|
105
|
+
points
|
|
106
|
+
badgeLabel
|
|
107
|
+
badgeBackgroundColor
|
|
108
|
+
badgeTextColor
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
`),_t=D(`
|
|
113
|
+
mutation SendLiveChatMessage($videoId: ID!, $text: String!) {
|
|
114
|
+
sendLiveChatMessage(videoId: $videoId, text: $text)
|
|
115
|
+
}
|
|
116
|
+
`),vt=D(`
|
|
117
|
+
mutation VoteLiveChatPoll($videoId: ID!, $pollId: ID!, $voteParams: String!) {
|
|
118
|
+
voteLiveChatPoll(videoId: $videoId, pollId: $pollId, voteParams: $voteParams)
|
|
119
|
+
}
|
|
120
|
+
`),yt=[`❤️`,`😂`,`😮`,`🎉`,`💯`],bt=40,xt=1800,St=[{value:`TOP`,label:`Top chat`},{value:`ALL`,label:`Live chat`}],Ct=O`
|
|
121
|
+
position: relative;
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-direction: column;
|
|
124
|
+
border: 1px solid var(--border);
|
|
125
|
+
border-radius: 1.2rem;
|
|
126
|
+
background: var(--bg-subtle);
|
|
127
|
+
overflow: hidden;
|
|
128
|
+
/* youtube.com's chat panel, live or replay, at any window height (measured 2026-11-10) */
|
|
129
|
+
height: 59.6rem;
|
|
130
|
+
|
|
131
|
+
.head {
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
gap: 0.4rem;
|
|
135
|
+
padding: 0.4rem 0.4rem 0.4rem 0.8rem;
|
|
136
|
+
border-bottom: 1px solid var(--border);
|
|
137
|
+
font-size: 1.4rem;
|
|
138
|
+
font-weight: 500;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.head .view,
|
|
142
|
+
.head .close {
|
|
143
|
+
display: flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
gap: 0.4rem;
|
|
146
|
+
border: none;
|
|
147
|
+
background: none;
|
|
148
|
+
color: var(--text-primary);
|
|
149
|
+
font: inherit;
|
|
150
|
+
cursor: pointer;
|
|
151
|
+
border-radius: 1.8rem;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.head .view {
|
|
155
|
+
padding: 0.6rem 0.8rem;
|
|
156
|
+
font-size: 1.5rem;
|
|
157
|
+
font-weight: 500;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.head .head-actions {
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
gap: 0.4rem;
|
|
164
|
+
margin-left: auto;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.head .top-fans-btn {
|
|
168
|
+
display: inline-flex;
|
|
169
|
+
align-items: center;
|
|
170
|
+
gap: 0.4rem;
|
|
171
|
+
padding: 0.4rem 0.9rem;
|
|
172
|
+
border: 1px solid var(--border);
|
|
173
|
+
border-radius: 1.4rem;
|
|
174
|
+
background: var(--bg-chip);
|
|
175
|
+
color: var(--text-primary);
|
|
176
|
+
font: inherit;
|
|
177
|
+
font-size: 1.2rem;
|
|
178
|
+
font-weight: 500;
|
|
179
|
+
cursor: pointer;
|
|
180
|
+
transition: background 0.15s ease;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.head .top-fans-btn:hover,
|
|
184
|
+
.head .top-fans-btn[aria-expanded='true'] {
|
|
185
|
+
background: var(--bg-hover);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.head .close {
|
|
189
|
+
padding: 0.8rem;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.head .view:hover,
|
|
193
|
+
.head .close:hover {
|
|
194
|
+
background: var(--bg-hover);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.head .ended-badge {
|
|
198
|
+
margin-left: 0.4rem;
|
|
199
|
+
color: var(--text-secondary);
|
|
200
|
+
font-size: 1.2rem;
|
|
201
|
+
font-weight: 400;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.pinned-banner {
|
|
205
|
+
display: flex;
|
|
206
|
+
flex-direction: column;
|
|
207
|
+
gap: 0.4rem;
|
|
208
|
+
padding: 0.8rem 1.2rem;
|
|
209
|
+
border-bottom: 1px solid var(--border);
|
|
210
|
+
background: var(--bg-elevated);
|
|
211
|
+
font-size: 1.3rem;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.pinned-head {
|
|
215
|
+
display: flex;
|
|
216
|
+
align-items: center;
|
|
217
|
+
gap: 0.6rem;
|
|
218
|
+
color: var(--text-secondary);
|
|
219
|
+
font-size: 1.2rem;
|
|
220
|
+
font-weight: 500;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.pinned-head-actions {
|
|
224
|
+
display: flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
gap: 0.2rem;
|
|
227
|
+
margin-left: auto;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.pin-icon-btn {
|
|
231
|
+
display: inline-flex;
|
|
232
|
+
align-items: center;
|
|
233
|
+
justify-content: center;
|
|
234
|
+
width: 2.4rem;
|
|
235
|
+
height: 2.4rem;
|
|
236
|
+
border: none;
|
|
237
|
+
border-radius: 50%;
|
|
238
|
+
background: transparent;
|
|
239
|
+
color: var(--text-secondary);
|
|
240
|
+
cursor: pointer;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.pin-icon-btn:hover {
|
|
244
|
+
background: var(--bg-hover);
|
|
245
|
+
color: var(--text-primary);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.pinned-body {
|
|
249
|
+
display: flex;
|
|
250
|
+
align-items: flex-start;
|
|
251
|
+
gap: 0.8rem;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.pinned-body img.avatar,
|
|
255
|
+
.pinned-body span.avatar {
|
|
256
|
+
width: 2rem;
|
|
257
|
+
height: 2rem;
|
|
258
|
+
border-radius: 50%;
|
|
259
|
+
flex: none;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.pinned-content {
|
|
263
|
+
flex: 1;
|
|
264
|
+
min-width: 0;
|
|
265
|
+
line-height: 1.8rem;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.pinned-content.clamped {
|
|
269
|
+
display: -webkit-box;
|
|
270
|
+
-webkit-line-clamp: 2;
|
|
271
|
+
-webkit-box-orient: vertical;
|
|
272
|
+
overflow: hidden;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.log-wrap {
|
|
276
|
+
position: relative;
|
|
277
|
+
flex: 1;
|
|
278
|
+
min-height: 0;
|
|
279
|
+
display: flex;
|
|
280
|
+
flex-direction: column;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.log {
|
|
284
|
+
flex: 1;
|
|
285
|
+
overflow-y: auto;
|
|
286
|
+
overscroll-behavior: contain;
|
|
287
|
+
padding: 0.6rem 0;
|
|
288
|
+
display: flex;
|
|
289
|
+
flex-direction: column;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/* youtube.com's line: 32 px for a one-line message */
|
|
293
|
+
.row {
|
|
294
|
+
display: grid;
|
|
295
|
+
grid-template-columns: 2.4rem 1fr;
|
|
296
|
+
column-gap: 1.2rem;
|
|
297
|
+
padding: 0.4rem 1.6rem;
|
|
298
|
+
font-size: 1.35rem;
|
|
299
|
+
line-height: 2rem;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.row img.avatar {
|
|
303
|
+
width: 2.4rem;
|
|
304
|
+
height: 2.4rem;
|
|
305
|
+
border-radius: 50%;
|
|
306
|
+
grid-row: 1 / span 2;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.who {
|
|
310
|
+
color: var(--text-secondary);
|
|
311
|
+
font-weight: 500;
|
|
312
|
+
margin-right: 0.6rem;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.who-btn {
|
|
316
|
+
border: none;
|
|
317
|
+
background: none;
|
|
318
|
+
padding: 0;
|
|
319
|
+
font: inherit;
|
|
320
|
+
font-weight: 500;
|
|
321
|
+
cursor: pointer;
|
|
322
|
+
text-align: left;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.who-btn:hover {
|
|
326
|
+
text-decoration: underline;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.who.owner { color: #ffd600; }
|
|
330
|
+
.who.moderator { color: #5e84f1; }
|
|
331
|
+
.who.member { color: #2ba640; }
|
|
332
|
+
|
|
333
|
+
.mention {
|
|
334
|
+
padding: 0.1rem 0.4rem;
|
|
335
|
+
border-radius: 0.4rem;
|
|
336
|
+
background: var(--bg-chip);
|
|
337
|
+
color: var(--text-primary);
|
|
338
|
+
font-weight: 500;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.mention.self {
|
|
342
|
+
background: var(--accent-tint);
|
|
343
|
+
color: var(--accent);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/* A paid message is a coloured card rather than a line, which is the whole
|
|
347
|
+
point of paying for it. */
|
|
348
|
+
.row.paid {
|
|
349
|
+
display: block;
|
|
350
|
+
margin: 0.4rem 1.2rem;
|
|
351
|
+
padding: 0;
|
|
352
|
+
border-radius: 0.8rem;
|
|
353
|
+
overflow: hidden;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.row.paid .paid-head {
|
|
357
|
+
display: flex;
|
|
358
|
+
align-items: center;
|
|
359
|
+
gap: 0.8rem;
|
|
360
|
+
padding: 0.8rem 1rem;
|
|
361
|
+
font-weight: 700;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.row.paid .paid-head .who-btn {
|
|
365
|
+
color: inherit;
|
|
366
|
+
margin-right: 0;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.row.paid .paid-body {
|
|
370
|
+
padding: 0.8rem 1rem;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.row.paid .paid-body:empty { display: none; }
|
|
374
|
+
|
|
375
|
+
.emoji {
|
|
376
|
+
display: inline-block;
|
|
377
|
+
width: 1.8rem;
|
|
378
|
+
height: 1.8rem;
|
|
379
|
+
vertical-align: -0.35rem;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.reaction-stage {
|
|
383
|
+
position: absolute;
|
|
384
|
+
right: 1.2rem;
|
|
385
|
+
bottom: 0.8rem;
|
|
386
|
+
width: 6.4rem;
|
|
387
|
+
height: 14rem;
|
|
388
|
+
pointer-events: none;
|
|
389
|
+
overflow: hidden;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.reaction-particle {
|
|
393
|
+
position: absolute;
|
|
394
|
+
bottom: 0.4rem;
|
|
395
|
+
font-size: 2rem;
|
|
396
|
+
line-height: 1;
|
|
397
|
+
animation: reaction-float 1.7s ease-out forwards;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
@keyframes reaction-float {
|
|
401
|
+
0% {
|
|
402
|
+
opacity: 0;
|
|
403
|
+
transform: translateY(0) scale(0.8);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
15% {
|
|
407
|
+
opacity: 1;
|
|
408
|
+
transform: translateY(-1.8rem) scale(1);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
100% {
|
|
412
|
+
opacity: 0;
|
|
413
|
+
transform: translateY(-11rem) scale(1.05);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
@media (prefers-reduced-motion: reduce) {
|
|
418
|
+
.reaction-particle {
|
|
419
|
+
animation: reaction-fade 1.2s ease-out forwards;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
@keyframes reaction-fade {
|
|
423
|
+
0% { opacity: 1; }
|
|
424
|
+
100% { opacity: 0; }
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.compose-shell {
|
|
429
|
+
position: relative;
|
|
430
|
+
border-top: 1px solid var(--border);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.mention-menu {
|
|
434
|
+
position: absolute;
|
|
435
|
+
left: 0.8rem;
|
|
436
|
+
right: 0.8rem;
|
|
437
|
+
bottom: calc(100% + 0.4rem);
|
|
438
|
+
max-height: 22rem;
|
|
439
|
+
overflow-y: auto;
|
|
440
|
+
padding: 0.4rem;
|
|
441
|
+
border: 1px solid var(--border);
|
|
442
|
+
border-radius: 1rem;
|
|
443
|
+
background: var(--bg-menu);
|
|
444
|
+
box-shadow: var(--shadow-menu);
|
|
445
|
+
z-index: 2;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.mention-option {
|
|
449
|
+
width: 100%;
|
|
450
|
+
display: flex;
|
|
451
|
+
align-items: center;
|
|
452
|
+
gap: 0.8rem;
|
|
453
|
+
padding: 0.6rem 0.8rem;
|
|
454
|
+
border: none;
|
|
455
|
+
border-radius: 0.6rem;
|
|
456
|
+
background: transparent;
|
|
457
|
+
color: var(--text-primary);
|
|
458
|
+
font: inherit;
|
|
459
|
+
font-size: 1.3rem;
|
|
460
|
+
text-align: left;
|
|
461
|
+
cursor: pointer;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.mention-option:hover,
|
|
465
|
+
.mention-option[aria-selected='true'] {
|
|
466
|
+
background: var(--bg-hover);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.mention-option img {
|
|
470
|
+
width: 2.2rem;
|
|
471
|
+
height: 2.2rem;
|
|
472
|
+
border-radius: 50%;
|
|
473
|
+
flex: none;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.mention-option .name {
|
|
477
|
+
font-weight: 500;
|
|
478
|
+
overflow: hidden;
|
|
479
|
+
text-overflow: ellipsis;
|
|
480
|
+
white-space: nowrap;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.mention-option .handle {
|
|
484
|
+
margin-left: auto;
|
|
485
|
+
color: var(--text-secondary);
|
|
486
|
+
font-size: 1.2rem;
|
|
487
|
+
white-space: nowrap;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.reaction-tray {
|
|
491
|
+
display: flex;
|
|
492
|
+
align-items: center;
|
|
493
|
+
justify-content: flex-end;
|
|
494
|
+
gap: 0.4rem;
|
|
495
|
+
padding: 0.6rem 1rem;
|
|
496
|
+
border-top: 1px solid var(--border);
|
|
497
|
+
background: var(--bg-elevated);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
.reaction-pick {
|
|
501
|
+
width: 3.2rem;
|
|
502
|
+
height: 3.2rem;
|
|
503
|
+
display: inline-flex;
|
|
504
|
+
align-items: center;
|
|
505
|
+
justify-content: center;
|
|
506
|
+
border: none;
|
|
507
|
+
border-radius: 50%;
|
|
508
|
+
background: transparent;
|
|
509
|
+
font-size: 1.7rem;
|
|
510
|
+
cursor: pointer;
|
|
511
|
+
transition: background 0.15s ease;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.reaction-pick:hover {
|
|
515
|
+
background: var(--bg-hover);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.compose {
|
|
519
|
+
display: flex;
|
|
520
|
+
gap: 0.4rem;
|
|
521
|
+
align-items: center;
|
|
522
|
+
padding: 0.6rem 0.8rem;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
.compose input {
|
|
526
|
+
flex: 1;
|
|
527
|
+
min-width: 0;
|
|
528
|
+
background: transparent;
|
|
529
|
+
border: none;
|
|
530
|
+
border-bottom: 1px solid var(--border);
|
|
531
|
+
color: inherit;
|
|
532
|
+
font: inherit;
|
|
533
|
+
font-size: 1.3rem;
|
|
534
|
+
padding: 0.4rem 0;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.compose input:focus {
|
|
538
|
+
outline: none;
|
|
539
|
+
border-bottom-color: var(--text-primary);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.compose .send-btn {
|
|
543
|
+
background: none;
|
|
544
|
+
border: none;
|
|
545
|
+
color: var(--text-secondary);
|
|
546
|
+
cursor: pointer;
|
|
547
|
+
font: inherit;
|
|
548
|
+
font-size: 1.3rem;
|
|
549
|
+
font-weight: 500;
|
|
550
|
+
padding: 0.4rem 0.8rem;
|
|
551
|
+
border-radius: 1.6rem;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.compose .send-btn:hover:not(:disabled) {
|
|
555
|
+
background: var(--bg-hover);
|
|
556
|
+
color: var(--text-primary);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.compose .send-btn:disabled { opacity: 0.5; cursor: default; }
|
|
560
|
+
|
|
561
|
+
.reaction-bar {
|
|
562
|
+
display: flex;
|
|
563
|
+
align-items: center;
|
|
564
|
+
justify-content: flex-end;
|
|
565
|
+
padding: 0.4rem 0.8rem;
|
|
566
|
+
border-top: 1px solid var(--border);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.reaction-toggle {
|
|
570
|
+
flex: none;
|
|
571
|
+
width: 3.6rem;
|
|
572
|
+
height: 3.6rem;
|
|
573
|
+
display: inline-flex;
|
|
574
|
+
align-items: center;
|
|
575
|
+
justify-content: center;
|
|
576
|
+
border: none;
|
|
577
|
+
border-radius: 50%;
|
|
578
|
+
background: transparent;
|
|
579
|
+
color: var(--text-secondary);
|
|
580
|
+
cursor: pointer;
|
|
581
|
+
transition: background 0.15s ease, color 0.15s ease;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.reaction-toggle:hover,
|
|
585
|
+
.reaction-toggle[aria-expanded='true'] {
|
|
586
|
+
background: var(--bg-hover);
|
|
587
|
+
color: var(--text-primary);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.badges {
|
|
591
|
+
display: inline-flex;
|
|
592
|
+
align-items: center;
|
|
593
|
+
gap: 0.4rem;
|
|
594
|
+
margin-right: 0.5rem;
|
|
595
|
+
vertical-align: middle;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.badge-chip {
|
|
599
|
+
display: inline-flex;
|
|
600
|
+
align-items: center;
|
|
601
|
+
gap: 0.3rem;
|
|
602
|
+
padding: 0.1rem 0.55rem;
|
|
603
|
+
border: none;
|
|
604
|
+
border-radius: 999px;
|
|
605
|
+
background: var(--bg-chip);
|
|
606
|
+
color: var(--text-primary);
|
|
607
|
+
font: inherit;
|
|
608
|
+
font-size: 1.1rem;
|
|
609
|
+
font-weight: 700;
|
|
610
|
+
line-height: 1.5;
|
|
611
|
+
vertical-align: middle;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
button.badge-chip {
|
|
615
|
+
cursor: pointer;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
button.badge-chip:hover {
|
|
619
|
+
filter: brightness(1.08);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.badge-icon {
|
|
623
|
+
width: 1.5rem;
|
|
624
|
+
height: 1.5rem;
|
|
625
|
+
object-fit: contain;
|
|
626
|
+
vertical-align: -0.25rem;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
.role-icon {
|
|
630
|
+
flex: none;
|
|
631
|
+
vertical-align: -0.15rem;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.role-icon.owner { color: #ffd600; }
|
|
635
|
+
.role-icon.moderator { color: #5e84f1; }
|
|
636
|
+
.role-icon.verified { color: var(--text-secondary); }
|
|
637
|
+
|
|
638
|
+
.row.system {
|
|
639
|
+
display: flex;
|
|
640
|
+
align-items: flex-start;
|
|
641
|
+
gap: 0.8rem;
|
|
642
|
+
margin: 0.3rem 1.2rem;
|
|
643
|
+
padding: 0.6rem 1rem;
|
|
644
|
+
border-radius: 0.8rem;
|
|
645
|
+
background: var(--bg-elevated);
|
|
646
|
+
color: var(--text-secondary);
|
|
647
|
+
font-size: 1.25rem;
|
|
648
|
+
line-height: 1.8rem;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
.row.system svg {
|
|
652
|
+
flex: none;
|
|
653
|
+
margin-top: 0.2rem;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
.row.gift {
|
|
657
|
+
margin: 0.3rem 1.2rem;
|
|
658
|
+
padding: 0.6rem 1rem;
|
|
659
|
+
border-radius: 0.8rem;
|
|
660
|
+
background: var(--bg-elevated);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.row.gift .gift-body {
|
|
664
|
+
display: inline-flex;
|
|
665
|
+
align-items: center;
|
|
666
|
+
gap: 0.5rem;
|
|
667
|
+
flex-wrap: wrap;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.row.gift .gift-icon {
|
|
671
|
+
color: var(--text-secondary);
|
|
672
|
+
vertical-align: -0.2rem;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
.row.paid .paid-head-meta {
|
|
676
|
+
display: flex;
|
|
677
|
+
flex-direction: column;
|
|
678
|
+
min-width: 0;
|
|
679
|
+
gap: 0.1rem;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
.row.paid .paid-sub {
|
|
683
|
+
font-size: 1.2rem;
|
|
684
|
+
font-weight: 400;
|
|
685
|
+
opacity: 0.9;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
.row.paid.sticker .sticker-body {
|
|
689
|
+
display: flex;
|
|
690
|
+
justify-content: center;
|
|
691
|
+
padding: 0.8rem 1rem 1rem;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.sticker-img {
|
|
695
|
+
width: 6.4rem;
|
|
696
|
+
height: 6.4rem;
|
|
697
|
+
object-fit: contain;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
.ticker-strip {
|
|
701
|
+
display: flex;
|
|
702
|
+
align-items: center;
|
|
703
|
+
gap: 0.6rem;
|
|
704
|
+
padding: 0.6rem 1.2rem;
|
|
705
|
+
overflow-x: auto;
|
|
706
|
+
border-bottom: 1px solid var(--border);
|
|
707
|
+
scrollbar-width: none;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
.ticker-strip::-webkit-scrollbar {
|
|
711
|
+
display: none;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.ticker-pill {
|
|
715
|
+
flex: none;
|
|
716
|
+
display: inline-flex;
|
|
717
|
+
align-items: center;
|
|
718
|
+
gap: 0.5rem;
|
|
719
|
+
padding: 0.3rem 0.9rem 0.3rem 0.4rem;
|
|
720
|
+
border: none;
|
|
721
|
+
border-radius: 999px;
|
|
722
|
+
font: inherit;
|
|
723
|
+
font-size: 1.2rem;
|
|
724
|
+
font-weight: 600;
|
|
725
|
+
cursor: pointer;
|
|
726
|
+
transition: transform 0.12s ease, opacity 0.12s ease;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
.ticker-pill:hover {
|
|
730
|
+
opacity: 0.92;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
.ticker-pill img {
|
|
734
|
+
width: 2rem;
|
|
735
|
+
height: 2rem;
|
|
736
|
+
border-radius: 50%;
|
|
737
|
+
object-fit: cover;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
.ticker-detail {
|
|
741
|
+
display: flex;
|
|
742
|
+
align-items: flex-start;
|
|
743
|
+
gap: 0.8rem;
|
|
744
|
+
padding: 0.7rem 1.2rem;
|
|
745
|
+
border-bottom: 1px solid var(--border);
|
|
746
|
+
background: var(--bg-elevated);
|
|
747
|
+
font-size: 1.25rem;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
.ticker-detail-text {
|
|
751
|
+
flex: 1;
|
|
752
|
+
min-width: 0;
|
|
753
|
+
display: flex;
|
|
754
|
+
flex-direction: column;
|
|
755
|
+
gap: 0.2rem;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
.ticker-detail-text strong {
|
|
759
|
+
font-weight: 600;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
.ticker-detail-text span {
|
|
763
|
+
color: var(--text-secondary);
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
.poll-card {
|
|
767
|
+
margin: 0.6rem 1rem 0;
|
|
768
|
+
padding: 0.9rem 1.1rem;
|
|
769
|
+
border: 1px solid var(--border);
|
|
770
|
+
border-radius: 1rem;
|
|
771
|
+
background: var(--bg-elevated);
|
|
772
|
+
display: flex;
|
|
773
|
+
flex-direction: column;
|
|
774
|
+
gap: 0.6rem;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.poll-head {
|
|
778
|
+
display: flex;
|
|
779
|
+
align-items: flex-start;
|
|
780
|
+
gap: 0.6rem;
|
|
781
|
+
font-size: 1.3rem;
|
|
782
|
+
font-weight: 600;
|
|
783
|
+
line-height: 1.8rem;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
.poll-head > svg {
|
|
787
|
+
flex: none;
|
|
788
|
+
margin-top: 0.2rem;
|
|
789
|
+
color: var(--text-secondary);
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
.poll-title {
|
|
793
|
+
flex: 1;
|
|
794
|
+
min-width: 0;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
.poll-meta {
|
|
798
|
+
color: var(--text-secondary);
|
|
799
|
+
font-size: 1.15rem;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
.poll-choices {
|
|
803
|
+
display: flex;
|
|
804
|
+
flex-direction: column;
|
|
805
|
+
gap: 0.45rem;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
.poll-choice {
|
|
809
|
+
position: relative;
|
|
810
|
+
overflow: hidden;
|
|
811
|
+
display: flex;
|
|
812
|
+
align-items: center;
|
|
813
|
+
justify-content: space-between;
|
|
814
|
+
gap: 0.8rem;
|
|
815
|
+
width: 100%;
|
|
816
|
+
padding: 0.6rem 0.9rem;
|
|
817
|
+
border: 1px solid var(--border);
|
|
818
|
+
border-radius: 0.8rem;
|
|
819
|
+
background: var(--bg-subtle);
|
|
820
|
+
color: var(--text-primary);
|
|
821
|
+
font: inherit;
|
|
822
|
+
font-size: 1.25rem;
|
|
823
|
+
text-align: left;
|
|
824
|
+
cursor: pointer;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
.poll-choice:hover:not(:disabled) {
|
|
828
|
+
background: var(--bg-hover);
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
.poll-choice[data-selected='true'] {
|
|
832
|
+
border-color: var(--text-primary);
|
|
833
|
+
font-weight: 600;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
.poll-choice:disabled {
|
|
837
|
+
cursor: default;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
.poll-choice-bar {
|
|
841
|
+
position: absolute;
|
|
842
|
+
inset: 0 auto 0 0;
|
|
843
|
+
background: var(--bg-hover-strong);
|
|
844
|
+
opacity: 0.65;
|
|
845
|
+
pointer-events: none;
|
|
846
|
+
transition: width 0.2s ease;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
.poll-choice-label,
|
|
850
|
+
.poll-choice-pct {
|
|
851
|
+
position: relative;
|
|
852
|
+
z-index: 1;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
.poll-choice-label {
|
|
856
|
+
display: inline-flex;
|
|
857
|
+
align-items: center;
|
|
858
|
+
gap: 0.5rem;
|
|
859
|
+
min-width: 0;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
.poll-choice-pct {
|
|
863
|
+
flex: none;
|
|
864
|
+
font-size: 1.2rem;
|
|
865
|
+
font-weight: 600;
|
|
866
|
+
color: var(--text-secondary);
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
.leaderboard-panel {
|
|
870
|
+
position: absolute;
|
|
871
|
+
inset: 4.5rem 0 0;
|
|
872
|
+
z-index: 3;
|
|
873
|
+
display: flex;
|
|
874
|
+
flex-direction: column;
|
|
875
|
+
background: var(--bg-subtle);
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
.leaderboard-head {
|
|
879
|
+
display: flex;
|
|
880
|
+
align-items: center;
|
|
881
|
+
gap: 0.6rem;
|
|
882
|
+
padding: 0.8rem 1.2rem;
|
|
883
|
+
border-bottom: 1px solid var(--border);
|
|
884
|
+
font-size: 1.4rem;
|
|
885
|
+
font-weight: 600;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
.leaderboard-actions {
|
|
889
|
+
display: flex;
|
|
890
|
+
align-items: center;
|
|
891
|
+
gap: 0.2rem;
|
|
892
|
+
margin-left: auto;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
.leaderboard-list {
|
|
896
|
+
flex: 1;
|
|
897
|
+
overflow-y: auto;
|
|
898
|
+
padding: 0.6rem 0;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
.leaderboard-row {
|
|
902
|
+
display: flex;
|
|
903
|
+
align-items: center;
|
|
904
|
+
gap: 1rem;
|
|
905
|
+
padding: 0.7rem 1.4rem;
|
|
906
|
+
font-size: 1.3rem;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
.leaderboard-rank {
|
|
910
|
+
min-width: 2.4rem;
|
|
911
|
+
color: var(--text-secondary);
|
|
912
|
+
font-weight: 600;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
.leaderboard-avatar {
|
|
916
|
+
width: 2.8rem;
|
|
917
|
+
height: 2.8rem;
|
|
918
|
+
border-radius: 50%;
|
|
919
|
+
object-fit: cover;
|
|
920
|
+
flex: none;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
.leaderboard-name {
|
|
924
|
+
flex: 1;
|
|
925
|
+
min-width: 0;
|
|
926
|
+
display: flex;
|
|
927
|
+
align-items: center;
|
|
928
|
+
gap: 0.6rem;
|
|
929
|
+
overflow: hidden;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
.leaderboard-name > span:first-of-type {
|
|
933
|
+
overflow: hidden;
|
|
934
|
+
text-overflow: ellipsis;
|
|
935
|
+
white-space: nowrap;
|
|
936
|
+
font-weight: 500;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
.leaderboard-points {
|
|
940
|
+
flex: none;
|
|
941
|
+
color: var(--text-secondary);
|
|
942
|
+
font-size: 1.2rem;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
.slow-mode-bar {
|
|
946
|
+
display: flex;
|
|
947
|
+
align-items: center;
|
|
948
|
+
justify-content: space-between;
|
|
949
|
+
padding: 0.4rem 1.2rem 0;
|
|
950
|
+
color: var(--text-secondary);
|
|
951
|
+
font-size: 1.15rem;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
.restricted-bar {
|
|
955
|
+
display: flex;
|
|
956
|
+
align-items: center;
|
|
957
|
+
gap: 0.8rem;
|
|
958
|
+
padding: 0.8rem 1rem;
|
|
959
|
+
border-top: 1px solid var(--border);
|
|
960
|
+
background: var(--bg-elevated);
|
|
961
|
+
color: var(--text-secondary);
|
|
962
|
+
font-size: 1.25rem;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
.restricted-bar > svg {
|
|
966
|
+
flex: none;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
.restricted-text {
|
|
970
|
+
flex: 1;
|
|
971
|
+
min-width: 0;
|
|
972
|
+
line-height: 1.7rem;
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
.refresh-chat-btn,
|
|
976
|
+
.signin-link {
|
|
977
|
+
flex: none;
|
|
978
|
+
display: inline-flex;
|
|
979
|
+
align-items: center;
|
|
980
|
+
gap: 0.4rem;
|
|
981
|
+
padding: 0.5rem 1rem;
|
|
982
|
+
border: 1px solid var(--border);
|
|
983
|
+
border-radius: 1.6rem;
|
|
984
|
+
background: var(--bg-subtle);
|
|
985
|
+
color: var(--text-primary);
|
|
986
|
+
font: inherit;
|
|
987
|
+
font-size: 1.2rem;
|
|
988
|
+
font-weight: 500;
|
|
989
|
+
text-decoration: none;
|
|
990
|
+
cursor: pointer;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
.refresh-chat-btn:hover:not(:disabled),
|
|
994
|
+
.signin-link:hover {
|
|
995
|
+
background: var(--bg-hover);
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
.refresh-chat-btn:disabled {
|
|
999
|
+
opacity: 0.6;
|
|
1000
|
+
cursor: default;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
.notice {
|
|
1004
|
+
padding: 1.6rem 1.2rem;
|
|
1005
|
+
color: var(--text-secondary);
|
|
1006
|
+
font-size: 1.3rem;
|
|
1007
|
+
text-align: center;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
.resume {
|
|
1011
|
+
border: none;
|
|
1012
|
+
background: var(--bg-inverse);
|
|
1013
|
+
color: var(--text-inverse);
|
|
1014
|
+
font: inherit;
|
|
1015
|
+
font-size: 1.2rem;
|
|
1016
|
+
font-weight: 500;
|
|
1017
|
+
padding: 0.5rem 1rem;
|
|
1018
|
+
margin: 0 1.2rem 0.8rem;
|
|
1019
|
+
border-radius: 1.6rem;
|
|
1020
|
+
cursor: pointer;
|
|
1021
|
+
}
|
|
1022
|
+
`,wt=O`
|
|
1023
|
+
@media (max-width: 999px) {
|
|
1024
|
+
height: 48rem;
|
|
1025
|
+
}
|
|
1026
|
+
`,Tt=O`
|
|
1027
|
+
margin-bottom: 0.4rem;
|
|
1028
|
+
|
|
1029
|
+
button {
|
|
1030
|
+
width: 100%;
|
|
1031
|
+
height: 3.8rem;
|
|
1032
|
+
display: flex;
|
|
1033
|
+
align-items: center;
|
|
1034
|
+
justify-content: center;
|
|
1035
|
+
gap: 0.8rem;
|
|
1036
|
+
border: 1px solid var(--border);
|
|
1037
|
+
border-radius: 1.9rem;
|
|
1038
|
+
background: var(--bg-subtle);
|
|
1039
|
+
color: var(--text-primary);
|
|
1040
|
+
font: inherit;
|
|
1041
|
+
font-size: 1.4rem;
|
|
1042
|
+
font-weight: 500;
|
|
1043
|
+
cursor: pointer;
|
|
1044
|
+
transition: background 0.15s ease;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
button:hover {
|
|
1048
|
+
background: var(--bg-hover);
|
|
1049
|
+
}
|
|
1050
|
+
`,Et=({onShow:e})=>k(`div`,{css:Tt,className:`live-chat-teaser`,children:E(`button`,{type:`button`,onClick:e,children:[k(l,{size:18,strokeWidth:1.5,"aria-hidden":`true`}),`Show chat`]})}),Dt=({runs:e,self:t})=>k(Ye,{runs:e,renderRun:(e,n)=>{if(e.emojiUrl)return k(`img`,{className:`emoji`,src:e.emojiUrl,alt:e.emojiLabel??``,loading:`lazy`,referrerpolicy:`no-referrer`},n);if(!e.url&&!e.videoId&&!e.browseId){let r=ct(e.text);if(r.some(e=>!!e.mention))return k(`span`,{children:r.map((e,n)=>e.mention?k(`span`,{className:mt(e.mention,t)?`mention self`:`mention`,children:e.text},n):e.text)},n)}}}),Ot=({badges:e,onTopFanClick:t})=>e?.length?k(`span`,{className:`badges`,children:e.map((e,n)=>{if(e.kind===`top-fan`){let r={...e.backgroundColor?{background:e.backgroundColor}:{},...e.textColor?{color:e.textColor}:{}};return t?E(`button`,{type:`button`,className:`badge-chip top-fan`,style:r,title:`Top fan ${e.label}`,"aria-label":`Top fan ${e.label}`,onClick:t,children:[k(oe,{size:11,strokeWidth:2,"aria-hidden":`true`}),k(`span`,{children:e.label})]},`top-fan-${n}`):E(`span`,{className:`badge-chip top-fan`,style:r,children:[k(oe,{size:11,strokeWidth:2,"aria-hidden":`true`}),k(`span`,{children:e.label})]},`top-fan-${n}`)}if(e.iconUrl)return k(`img`,{className:`badge-icon`,src:e.iconUrl,alt:e.label,title:e.label,loading:`lazy`,referrerpolicy:`no-referrer`},`icon-${n}`);if(e.kind===`owner`)return k(oe,{size:12,strokeWidth:2,className:`role-icon owner`,"aria-label":e.label},`owner-${n}`);if(e.kind===`moderator`)return k(x,{size:12,strokeWidth:2,className:`role-icon moderator`,"aria-label":e.label},`mod-${n}`);if(e.kind===`verified`)return k(c,{size:12,strokeWidth:2,className:`role-icon verified`,"aria-label":e.label},`verified-${n}`)})}):null,kt=({message:e,self:t,onAuthorClick:n,onTopFanClick:r})=>{let i=e.isOwner?`owner`:e.isModerator?`moderator`:e.isMember?`member`:``,a=k(Dt,{runs:e.runs,self:t}),o=k(Ot,{badges:e.badges,onTopFanClick:r}),s=e.author?n?k(`button`,{type:`button`,className:`who who-btn ${i}`,title:e.timestampText??void 0,"aria-label":`Mention ${e.author.name}`,onClick:()=>n(e.author),children:e.author.name}):k(`span`,{className:`who ${i}`,title:e.timestampText??void 0,children:e.author.name}):void 0;if(e.kind===`SYSTEM`){let t=!!(e.iconType&&/LOCK|SLOW|SUBSCRIBER|MEMBER/i.test(e.iconType));return E(`div`,{className:`row system`,"data-chat-kind":`system`,children:[k(t?u:b,{size:14,strokeWidth:1.75,"aria-hidden":`true`}),k(`div`,{children:a})]})}if(e.kind===`STICKER`||e.stickerUrl)return E(`div`,{className:`row paid sticker`,"data-chat-kind":`sticker`,children:[E(`div`,{className:`paid-head`,style:{background:e.headerBackgroundColor??`#1565c0`,color:`#fff`},children:[e.author?.avatar?k(`img`,{className:`avatar`,src:e.author.avatar,alt:``,loading:`lazy`,referrerpolicy:`no-referrer`}):void 0,o,s,e.purchaseAmountText?k(`span`,{style:{marginLeft:`auto`},children:e.purchaseAmountText}):void 0]}),k(`div`,{className:`paid-body sticker-body`,style:{background:e.bodyBackgroundColor??`#1976d2`,color:`#fff`},children:e.stickerUrl?k(`img`,{className:`sticker-img`,src:e.stickerUrl,alt:e.stickerLabel??e.text,loading:`lazy`,referrerpolicy:`no-referrer`}):a})]});if(e.kind===`MEMBERSHIP`||e.kind===`GIFT_MEMBERSHIP`){let t=e.headerPrimaryText||e.headerSubtext,n=!!(t&&t!==e.text);return E(`div`,{className:`row paid membership`,"data-chat-kind":e.kind===`GIFT_MEMBERSHIP`?`gift-membership`:`membership`,children:[E(`div`,{className:`paid-head`,style:{background:e.headerBackgroundColor??`#0f7b3e`,color:`#fff`},children:[e.author?.avatar?k(`img`,{className:`avatar`,src:e.author.avatar,alt:``,loading:`lazy`,referrerpolicy:`no-referrer`}):void 0,E(`div`,{className:`paid-head-meta`,children:[E(`div`,{children:[o,s]}),n?k(`span`,{className:`paid-sub`,children:t}):void 0]})]}),k(`div`,{className:`paid-body`,style:{background:e.bodyBackgroundColor??`#139b4f`,color:`#fff`},children:a})]})}return e.purchaseAmountText||e.kind===`PAID`?E(`div`,{className:`row paid`,"data-chat-kind":`paid`,children:[E(`div`,{className:`paid-head`,style:{background:e.headerBackgroundColor??`#1565c0`,color:`#fff`},children:[e.author?.avatar?k(`img`,{className:`avatar`,src:e.author.avatar,alt:``,loading:`lazy`,referrerpolicy:`no-referrer`}):void 0,o,s,e.purchaseAmountText?k(`span`,{style:{marginLeft:`auto`},children:e.purchaseAmountText}):void 0]}),k(`div`,{className:`paid-body`,style:{background:e.bodyBackgroundColor??`#1976d2`,color:`#fff`},children:a})]}):e.kind===`GIFT`?E(`div`,{className:`row gift`,"data-chat-kind":`gift`,children:[e.author?.avatar?k(`img`,{className:`avatar`,src:e.author.avatar,alt:``,loading:`lazy`,referrerpolicy:`no-referrer`}):k(`span`,{className:`avatar`}),E(`div`,{className:`gift-body`,children:[k(f,{size:14,strokeWidth:1.75,className:`gift-icon`,"aria-hidden":`true`}),o,s,a]})]}):E(`div`,{className:`row`,children:[e.author?.avatar?k(`img`,{className:`avatar`,src:e.author.avatar,alt:``,loading:`lazy`,referrerpolicy:`no-referrer`}):k(`span`,{className:`avatar`}),E(`div`,{children:[o,s,a]})]})},At=e=>{let[t,n]=y(!0),r=C(null);return m(()=>{let e=r.current;e&&t&&(e.scrollTop=e.scrollHeight)},[e,t]),{logRef:r,onScroll:()=>{let e=r.current;e&&n(e.scrollHeight-e.scrollTop-e.clientHeight<=bt)},pinned:t,setPinned:n}},jt=e=>e?.trim().replace(/^@/,``).toLowerCase()||void 0,Mt=e=>e.replace(/\s+/g,` `).trim(),Nt=(e,t)=>{if(!e||!t)return!1;let n=[jt(t.handle),jt(t.name)].filter(e=>!!e),r=[jt(e.handle),jt(e.name)].filter(e=>!!e);return n.some(e=>r.includes(e))},Pt=({poll:e,self:t,collapsed:n,onToggleCollapse:r,disabled:i,voting:s,onVote:c})=>E(`div`,{className:`poll-card`,role:`region`,"aria-label":`Live poll`,children:[E(`div`,{className:`poll-head`,children:[k(o,{size:15,strokeWidth:1.75,"aria-hidden":`true`}),k(`div`,{className:`poll-title`,children:e.questionRuns.length>0?k(Dt,{runs:e.questionRuns,self:t}):e.question}),k(`button`,{type:`button`,className:`pin-icon-btn`,"aria-label":n?`Expand poll`:`Collapse poll`,onClick:r,children:k(n?h:ne,{size:14,strokeWidth:1.75})})]}),n?void 0:E(fe,{children:[e.metadataText?k(`div`,{className:`poll-meta`,children:e.metadataText}):void 0,k(`div`,{className:`poll-choices`,children:e.choices.map(n=>{let r=Math.max(0,Math.min(100,Math.round((n.voteRatio??0)*100))),o=!i&&!s&&!e.finished&&!!n.voteParams;return E(`button`,{type:`button`,className:`poll-choice`,"data-selected":n.selected?`true`:void 0,disabled:!o,onClick:()=>c(n),children:[n.voteRatio!==null&&n.voteRatio!==void 0?k(`span`,{className:`poll-choice-bar`,style:{width:`${r}%`},"aria-hidden":`true`}):void 0,E(`span`,{className:`poll-choice-label`,children:[n.selected?k(a,{size:13,strokeWidth:2.2,"aria-hidden":`true`}):void 0,n.runs.length>0?k(Dt,{runs:n.runs,self:t}):n.text]}),n.votePercentage?k(`span`,{className:`poll-choice-pct`,children:n.votePercentage}):void 0]},n.id)})})]})]}),Ft=({videoId:e,subscribed:t,onHide:n})=>{let{ready:r,signedIn:a,name:o,avatar:s,handle:c}=ue(),l=g(()=>a?{name:o,avatar:s,handle:c}:void 0,[a,o,s,c]),[d,ee]=y(`TOP`),[f,b]=y(void 0),[x,ie]=y([]),[S,se]=y(void 0),[w,ce]=y(void 0),[D,O]=y(!1),[he,ge]=y([]),[A,_e]=y(void 0),[j,ve]=y(void 0),[M,N]=y(!1),[P,ye]=y(void 0),[be,xe]=y(!1),[Se,we]=y(!1),[F,Te]=y([]),[Ee,De]=y(void 0),[ke,Ae]=y(!1),[je,I]=y(0),[L,Me]=y(0),[R,Ne]=y(!1),[Pe,Fe]=y(!1),[z,Ie]=y(``),[Le,B]=y(0),[Re,ze]=y(void 0),[Be,V]=y(0),[H,Ve]=y(!1),[He,Ue]=y([]),{logRef:We,onScroll:Ge,pinned:Je,setPinned:Ye}=At(x),[,Xe]=T(_t),[,Ze]=T(vt),U=C(null),W=re(),Qe=C(0),G=C(new Set),K=C(void 0),$e=C(void 0),q=C([]),et=C(t),J=C(f);J.current=f;let tt=C(x);tt.current=x;let nt=C(null),[{data:rt,error:it},at]=de({query:ht,variables:{videoId:e,view:d,cursor:f},requestPolicy:`network-only`,pause:R}),[{data:ot,fetching:st,error:ct},lt]=de({query:gt,variables:{panelId:j?.panelId??``,params:j?.params??``},requestPolicy:`network-only`,pause:!M||!j}),Y=rt?.liveChat,mt=(e,t)=>{let n=setTimeout(()=>{G.current.delete(n),e()},t);return G.current.add(n),n};p(()=>{if(!M)return;let e=document.activeElement;nt.current?.focus();let t=e=>{e.key===`Escape`&&(e.stopImmediatePropagation(),N(!1))};return document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`keydown`,t),e?.focus()}},[M]),m(()=>()=>{for(let e of G.current)clearTimeout(e);G.current.clear(),K.current!==void 0&&cancelAnimationFrame(K.current)},[]),m(()=>{if(!je){Me(0);return}let e=()=>{let e=Math.ceil((je-Date.now())/1e3);return e<=0?(Me(0),I(0),!1):(Me(e),!0)};if(!e())return;let t=setInterval(()=>{e()||clearInterval(t)},250);return()=>clearInterval(t)},[je]);let bt=C(0);m(()=>{if(!it||R){it||(bt.current=0);return}Ae(!1);let e=Math.min(8e3,500*2**bt.current);bt.current+=1;let t=mt(()=>at({requestPolicy:`network-only`}),e);return()=>{clearTimeout(t),G.current.delete(t)}},[it,R,at]);let Tt=e=>{let t=++Qe.current,n=t*13%36;Ue(r=>[...r.slice(-11),{id:t,emoji:e,leftPx:n}]),mt(()=>{Ue(e=>e.filter(e=>e.id!==t))},xt)};m(()=>{if(!Y)return;Ae(!1);let e=new Set(Y.removedIds??[]),t=new Set(Y.removedAuthorIds??[]);if(Y.items.length||e.size||t.size){let n=Date.now();q.current=q.current.filter(e=>n-e.at<15e3),ie(n=>{let r=n.filter(n=>!(e.has(n.id)||n.author?.id&&t.has(n.author.id)));for(let n of Y.items){if(e.has(n.id)||n.author?.id&&t.has(n.author.id))continue;let i=r.findIndex(e=>e.id===n.id);if(i>=0){r=r.map((e,t)=>t===i?n:e);continue}if(q.current.length>0&&Nt(n.author,l)){let e=Mt(n.text),t=q.current.findIndex(t=>Mt(t.text)===e);if(t>=0){let e=q.current.splice(t,1)[0];if(e){let t=r.findIndex(t=>t.id===e.id);if(t>=0){r=r.map((e,r)=>r===t?n:e);continue}}}}r=[...r,n]}return r.length>250?r.slice(r.length-250):r})}if(Y.pinned?($e.current!==Y.pinned.id&&($e.current=Y.pinned.id,O(!1)),se(Y.pinned)):Y.pinnedCleared&&($e.current=void 0,se(void 0)),Y.customEmojis?.length&&ge(Y.customEmojis),Y.inputState&&(_e(Y.inputState),Y.inputState.slowModeSeconds===0&&I(0)),Y.leaderboard&&ve(Y.leaderboard),Y.poll?ye(Y.poll):Y.pollCleared&&ye(void 0),Y.tickerItems&&Te(Y.tickerItems),(Y.reactionBurst??0)>0){let e=Math.min(6,Y.reactionBurst??0);for(let t=0;t<e;t+=1){let e=yt[(Qe.current+t)%yt.length];t===0?Tt(e):mt(()=>Tt(e),t*180)}}Y.cursor?Y.cursor!==f&&b(Y.cursor):Ne(!0)},[Y]);let Et=()=>{Ae(!0),Ne(!1),J.current===void 0?at({requestPolicy:`network-only`}):b(void 0)};m(()=>{let e=et.current===!1;if(et.current=t,e&&t===!0&&A?.status===`RESTRICTED`){let e=mt(()=>Et(),250);return()=>{clearTimeout(e),G.current.delete(e)}}},[t,A?.status]);let Ot=e=>{e!==d&&($e.current=void 0,q.current=[],ee(e),b(void 0),ie([]),se(void 0),ce(void 0),O(!1),_e(void 0),ve(void 0),N(!1),ye(void 0),xe(!1),Te([]),De(void 0),I(0),Me(0),Ae(!1),Ne(!1),Ye(!0))},jt=()=>{if(!j)return;let e=M;N(!0),e&<({requestPolicy:`network-only`})},Ft=(e,t)=>{Ie(e),B(t),ze(void 0),V(0),K.current!==void 0&&cancelAnimationFrame(K.current),K.current=requestAnimationFrame(()=>{K.current=void 0;let e=U.current;e&&(e.focus(),e.setSelectionRange(t,t))})},It=e=>{let t=U.current,n=t?.selectionStart??Le,r=t?.selectionEnd??n,i=qe(z,n,r,e);Ft(i.value,i.cursor)},Lt=e=>{let t=U.current,n=t?.selectionStart??z.length,r=t?.selectionEnd??n,i=n>0&&!/\s$/.test(z.slice(0,n))?` `:``,a=qe(z,n,r,`${i}@${dt(e)} `);Ft(a.value,a.cursor)},Rt=r&&a&&!R&&A?.status!==`RESTRICTED`&&A?.status!==`SIGN_IN_REQUIRED`,X=Rt?ut(z,Le):void 0,zt=g(()=>{let e=[];S?.message.author&&e.push(S.message.author);for(let t of x)t.author&&e.push(t.author);return e},[x,S]),Z=g(()=>!X||Re===X.start?[]:pt(zt,X.query),[zt,X,Re]),Bt=e=>{if(!X)return;let t=ft(z,X.start,Le,dt(e));Ft(t.value,t.cursor)},Vt=e=>{if(Z.length!==0&&X){if(e.key===`ArrowDown`){e.preventDefault(),V(e=>(e+1)%Z.length);return}if(e.key===`ArrowUp`){e.preventDefault(),V(e=>(e-1+Z.length)%Z.length);return}if(e.key===`Tab`||e.key===`Enter`){e.preventDefault();let t=Z[Math.min(Be,Z.length-1)];t&&Bt(t);return}e.key===`Escape`&&(e.preventDefault(),ze(X.start))}},Ht=async t=>{if(t.preventDefault(),Pe||L>0)return;let n=z.trim();if(!n)return;Fe(!0),Ie(``),B(0);let r=new Set(tt.current.map(e=>e.id));try{let t=await Xe({videoId:e,text:n});if(t.error){le(Ce(t.error)),Ie(n),B(n.length);return}if(l){let e=`local:${crypto.randomUUID()}`;q.current.push({id:e,text:n,at:Date.now()}),ie(t=>{let i=Mt(n);if(t.some(e=>!r.has(e.id)&&!e.id.startsWith(`local:`)&&Mt(e.text)===i&&Nt(e.author,l)))return q.current=q.current.filter(t=>t.id!==e),t;let a={__typename:`LiveChatMessage`,id:e,kind:`TEXT`,text:n,runs:[{__typename:`LiveChatRun`,text:n,url:null,videoId:null,startSeconds:null,browseId:null,emojiUrl:null,emojiLabel:null}],timestampText:null,isOwner:!1,isModerator:!1,isMember:!1,badges:null,purchaseAmountText:null,headerBackgroundColor:null,bodyBackgroundColor:null,headerPrimaryText:null,headerSubtext:null,stickerUrl:null,stickerLabel:null,iconType:null,author:{__typename:`Author`,id:`self`,name:l.name||l.handle||`You`,avatar:l.avatar??null,handle:l.handle??null}},o=[...t,a];return o.length>250?o.slice(o.length-250):o})}(A?.slowModeSeconds??0)>0&&I(Date.now()+A.slowModeSeconds*1e3)}finally{Fe(!1)}},Ut=async t=>{if(!(!P||!t.voteParams||Se||R||P.finished)){if(!a){le(`Sign in to vote in live polls`);return}we(!0);try{let n=await Ze({videoId:e,pollId:P.id,voteParams:t.voteParams});if(n.error){le(Ce(n.error));return}ye(e=>!e||e.id!==P.id?e:{...e,choices:e.choices.map(e=>({...e,selected:e.id===t.id}))})}finally{we(!1)}}},Wt=Z.length>0?Math.min(Be,Z.length-1):-1,Gt=Wt>=0?`${W}-${Wt}`:void 0,Q=S&&w!==S.id?S:void 0,Kt=F.find(e=>e.id===Ee),$=ot?.liveChatLeaderboard,qt=St.find(e=>e.value===d),Jt=R?void 0:k(`button`,{type:`button`,className:`reaction-toggle`,"aria-label":`Reactions`,"aria-expanded":H,onClick:()=>Ve(e=>!e),children:k(_,{size:18,strokeWidth:1.5})});return E(`section`,{css:[Ct,wt],className:`live-chat`,"aria-label":`Live chat`,children:[E(`div`,{className:`head`,children:[k(me,{label:`Live chat view`,align:`start`,trigger:E(`button`,{type:`button`,className:`view`,children:[qt.label,k(h,{size:20,strokeWidth:1.5})]}),children:St.map(e=>k(Oe,{label:e.label,checked:e.value===d,closeOnSelect:!0,onSelect:()=>Ot(e.value)},e.value))}),R?k(`span`,{className:`ended-badge`,children:`Ended`}):void 0,E(`div`,{className:`head-actions`,children:[j&&!Y?.disabled?E(`button`,{type:`button`,className:`top-fans-btn`,"aria-expanded":M,onClick:()=>M?N(!1):jt(),children:[k(ae,{size:13,strokeWidth:1.9,"aria-hidden":`true`}),k(`span`,{children:j.label})]}):void 0,n?k(`button`,{type:`button`,className:`close`,"aria-label":`Hide chat`,onClick:n,children:k(v,{size:20,strokeWidth:1.5})}):void 0]})]}),Y?.disabled?k(`div`,{className:`notice`,children:`Live chat is turned off for this stream.`}):E(fe,{children:[F.length>0?k(`div`,{className:`ticker-strip`,role:`region`,"aria-label":`Chat highlights`,children:F.map(e=>E(`button`,{type:`button`,className:`ticker-pill`,style:{background:e.backgroundColor??`#1565c0`,color:e.textColor??`#fff`},"aria-expanded":Ee===e.id,onClick:()=>De(t=>t===e.id?void 0:e.id),children:[e.avatar?k(`img`,{src:e.avatar,alt:``,loading:`lazy`,referrerpolicy:`no-referrer`}):void 0,k(`span`,{children:e.label})]},e.id))}):void 0,Kt?E(`div`,{className:`ticker-detail`,role:`region`,"aria-label":`Highlight detail`,children:[E(`div`,{className:`ticker-detail-text`,children:[k(`strong`,{children:[Kt.authorName,Kt.label].filter(Boolean).join(` `)}),Kt.detailText?k(`span`,{children:Kt.detailText}):void 0]}),k(`button`,{type:`button`,className:`pin-icon-btn ticker-detail-close`,"aria-label":`Close highlight`,onClick:()=>De(void 0),children:k(v,{size:14,strokeWidth:1.75})})]}):void 0,Q?E(`div`,{className:`pinned-banner`,role:`region`,"aria-label":`Pinned message`,children:[E(`div`,{className:`pinned-head`,children:[k(i,{size:14,strokeWidth:1.75,"aria-hidden":`true`}),k(`span`,{children:Q.header??`Pinned message`}),E(`div`,{className:`pinned-head-actions`,children:[k(`button`,{type:`button`,className:`pin-icon-btn`,"aria-label":D?`Collapse pinned message`:`Expand pinned message`,onClick:()=>O(e=>!e),children:k(D?ne:h,{size:14,strokeWidth:1.75})}),k(`button`,{type:`button`,className:`pin-icon-btn`,"aria-label":`Dismiss pinned message`,onClick:()=>ce(Q.id),children:k(v,{size:14,strokeWidth:1.75})})]})]}),E(`div`,{className:`pinned-body`,children:[Q.message.author?.avatar?k(`img`,{className:`avatar`,src:Q.message.author.avatar,alt:``,loading:`lazy`,referrerpolicy:`no-referrer`}):k(`span`,{className:`avatar`}),E(`div`,{className:D?`pinned-content`:`pinned-content clamped`,children:[Q.message.author?k(`span`,{className:`who`,children:Q.message.author.name}):void 0,k(Dt,{runs:Q.message.runs,self:l})]})]})]}):void 0,P?k(Pt,{poll:P,self:l,collapsed:be,onToggleCollapse:()=>xe(e=>!e),disabled:R,voting:Se,onVote:Ut}):void 0,E(`div`,{className:`log-wrap`,children:[k(`div`,{className:`log`,ref:We,onScroll:Ge,children:x.length===0?k(`div`,{className:`notice`,children:it?`Reconnecting to live chat…`:`Waiting for messages…`}):x.map(e=>k(kt,{message:e,self:l,onAuthorClick:Rt?Lt:void 0,onTopFanClick:j?jt:void 0},e.id))}),He.length>0?k(`div`,{className:`reaction-stage`,"aria-hidden":`true`,children:He.map(e=>k(`span`,{className:`reaction-particle`,style:{left:`${e.leftPx}px`},children:e.emoji},e.id))}):void 0]}),!Je&&x.length>0?k(`button`,{type:`button`,className:`resume`,onClick:()=>Ye(!0),children:`Jump to latest`}):void 0,H&&!R?k(`div`,{className:`reaction-tray`,role:`group`,"aria-label":`Local reactions`,children:yt.map(e=>k(`button`,{type:`button`,className:`reaction-pick`,"aria-label":`React ${e}`,onClick:()=>Tt(e),children:e},e))}):void 0,!R&&r?Rt?E(`div`,{className:`compose-shell`,children:[Z.length>0?k(`div`,{id:W,className:`mention-menu`,role:`listbox`,"aria-label":`Mention suggestions`,children:Z.map((e,t)=>E(`button`,{id:`${W}-${t}`,type:`button`,role:`option`,"aria-selected":t===Wt,className:`mention-option`,onMouseDown:t=>{t.preventDefault(),Bt(e)},children:[e.avatar?k(`img`,{src:e.avatar,alt:``,referrerpolicy:`no-referrer`}):void 0,k(`span`,{className:`name`,children:e.name}),e.handle?k(`span`,{className:`handle`,children:e.handle}):void 0]},e.id))}):void 0,(A?.slowModeSeconds??0)>0||L>0?E(`div`,{className:`slow-mode-bar`,children:[k(`span`,{children:(A?.slowModeSeconds??0)>0?`Slow mode (${A.slowModeSeconds}s)`:`Slow mode`}),L>0?E(`span`,{children:[`Wait `,L,`s`]}):void 0]}):void 0,E(`form`,{className:`compose`,onSubmit:Ht,children:[k(Ke,{customEmojis:he,disabled:Pe,onPick:It}),k(`input`,{ref:U,value:z,maxLength:A?.maxLength??200,placeholder:L>0?`Slow mode: wait ${L}s…`:A?.placeholder||`Chat…`,"aria-autocomplete":`list`,"aria-expanded":Z.length>0,"aria-controls":Z.length>0?W:void 0,"aria-activedescendant":Gt,onKeyDown:Vt,onInput:e=>{let t=e.currentTarget;Ie(t.value),B(t.selectionStart??t.value.length),ze(void 0),V(0)},onClick:e=>{B(e.currentTarget.selectionStart??e.currentTarget.value.length)},onKeyUp:e=>{e.key!==`ArrowDown`&&e.key!==`ArrowUp`&&e.key!==`Escape`&&B(e.currentTarget.selectionStart??e.currentTarget.value.length)}}),k(`button`,{type:`submit`,className:`send-btn`,disabled:Pe||L>0||!z.trim(),children:L>0?`${L}s`:`Send`}),Jt]})]}):!a||A?.status===`SIGN_IN_REQUIRED`?E(`div`,{className:`restricted-bar`,children:[k(u,{size:14,strokeWidth:1.75,"aria-hidden":`true`}),k(`span`,{className:`restricted-text`,children:A?.restrictionMessage||`Sign in to chat`}),k(pe,{href:`/signin`,className:`signin-link`,children:`Sign in`}),Jt]}):E(`div`,{className:`restricted-bar`,role:`status`,children:[k(u,{size:14,strokeWidth:1.75,"aria-hidden":`true`}),k(`span`,{className:`restricted-text`,children:A?.restrictionMessage||`Chat participation is restricted.`}),E(`button`,{type:`button`,className:`refresh-chat-btn`,onClick:Et,disabled:ke,children:[k(te,{size:13,strokeWidth:1.75,"aria-hidden":`true`}),ke?`Checking…`:`Refresh`]}),Jt]}):Jt?k(`div`,{className:`reaction-bar`,children:Jt}):void 0,M&&j?E(`div`,{ref:nt,tabIndex:-1,className:`leaderboard-panel`,role:`dialog`,"aria-label":$?.title??j.label,children:[E(`div`,{className:`leaderboard-head`,children:[k(ae,{size:15,strokeWidth:1.9,"aria-hidden":`true`}),k(`span`,{children:$?.title??j.label}),E(`div`,{className:`leaderboard-actions`,children:[k(`button`,{type:`button`,className:`pin-icon-btn`,"aria-label":`Refresh leaderboard`,onClick:()=>lt({requestPolicy:`network-only`}),children:k(te,{size:14,strokeWidth:1.75})}),k(`button`,{type:`button`,className:`pin-icon-btn`,"aria-label":`Close leaderboard`,onClick:()=>N(!1),children:k(v,{size:15,strokeWidth:1.75})})]})]}),k(`div`,{className:`leaderboard-list`,children:st&&!$?k(`div`,{className:`notice`,children:`Loading top fans…`}):$?.items.length?$.items.map(e=>E(`div`,{className:`leaderboard-row`,children:[k(`span`,{className:`leaderboard-rank`,children:e.rank}),e.avatar?k(`img`,{className:`leaderboard-avatar`,src:e.avatar,alt:``,loading:`lazy`,referrerpolicy:`no-referrer`}):k(`span`,{className:`leaderboard-avatar`}),E(`div`,{className:`leaderboard-name`,children:[k(`span`,{children:e.displayName}),e.badgeLabel?E(`span`,{className:`badge-chip`,style:{...e.badgeBackgroundColor?{background:e.badgeBackgroundColor}:{},...e.badgeTextColor?{color:e.badgeTextColor}:{}},children:[k(oe,{size:11,strokeWidth:2,"aria-hidden":`true`}),k(`span`,{children:e.badgeLabel})]}):void 0]}),e.points?k(`span`,{className:`leaderboard-points`,children:e.points}):void 0]},`${e.rank}-${e.displayName}`)):ct?k(`div`,{className:`notice`,children:Ce(ct)}):k(`div`,{className:`notice`,children:`No top fans ranked yet.`})})]}):void 0]})]})};S();var It=D(`
|
|
1051
|
+
query LiveChatReplay($videoId: ID!, $offsetMs: Int!, $view: ChatReplayView, $cursor: String) {
|
|
1052
|
+
liveChatReplay(videoId: $videoId, offsetMs: $offsetMs, view: $view, cursor: $cursor) {
|
|
1053
|
+
items {
|
|
1054
|
+
id
|
|
1055
|
+
text
|
|
1056
|
+
runs { text url videoId startSeconds browseId emojiUrl emojiLabel }
|
|
1057
|
+
timestampText
|
|
1058
|
+
isOwner
|
|
1059
|
+
isModerator
|
|
1060
|
+
isMember
|
|
1061
|
+
purchaseAmountText
|
|
1062
|
+
headerBackgroundColor
|
|
1063
|
+
bodyBackgroundColor
|
|
1064
|
+
author { id name avatar handle }
|
|
1065
|
+
offsetMs
|
|
1066
|
+
}
|
|
1067
|
+
cursor
|
|
1068
|
+
disabled
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
`),Lt=[{value:`TOP`,label:`Top chat replay`},{value:`ALL`,label:`Live chat replay`}],Rt=O`
|
|
1072
|
+
.head {
|
|
1073
|
+
padding: 0.4rem 0.4rem 0.4rem 0.8rem;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
.view,
|
|
1077
|
+
.close {
|
|
1078
|
+
display: flex;
|
|
1079
|
+
align-items: center;
|
|
1080
|
+
gap: 0.4rem;
|
|
1081
|
+
border: none;
|
|
1082
|
+
background: none;
|
|
1083
|
+
color: var(--text-primary);
|
|
1084
|
+
font: inherit;
|
|
1085
|
+
cursor: pointer;
|
|
1086
|
+
border-radius: 1.8rem;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
.view {
|
|
1090
|
+
padding: 0.6rem 0.8rem;
|
|
1091
|
+
font-size: 1.6rem;
|
|
1092
|
+
font-weight: 400;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
.close {
|
|
1096
|
+
padding: 0.8rem;
|
|
1097
|
+
margin-left: auto;
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
.view:hover,
|
|
1101
|
+
.close:hover {
|
|
1102
|
+
background: var(--bg-hover);
|
|
1103
|
+
}
|
|
1104
|
+
`,X=O`
|
|
1105
|
+
margin-top: 1.2rem;
|
|
1106
|
+
padding: 1.2rem;
|
|
1107
|
+
border-radius: 1.2rem;
|
|
1108
|
+
background: var(--bg-hover);
|
|
1109
|
+
color: var(--text-primary);
|
|
1110
|
+
|
|
1111
|
+
h2 {
|
|
1112
|
+
margin: 0 0 0.8rem;
|
|
1113
|
+
font-size: 1.4rem;
|
|
1114
|
+
font-weight: 500;
|
|
1115
|
+
line-height: 2rem;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
.row {
|
|
1119
|
+
display: flex;
|
|
1120
|
+
align-items: center;
|
|
1121
|
+
justify-content: space-between;
|
|
1122
|
+
gap: 1.2rem;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
button {
|
|
1126
|
+
border: none;
|
|
1127
|
+
border-radius: 1.8rem;
|
|
1128
|
+
padding: 0.6rem 1.2rem;
|
|
1129
|
+
background: var(--bg-hover-strong);
|
|
1130
|
+
color: var(--text-primary);
|
|
1131
|
+
font: inherit;
|
|
1132
|
+
font-size: 1.2rem;
|
|
1133
|
+
font-weight: 500;
|
|
1134
|
+
cursor: pointer;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
button:disabled {
|
|
1138
|
+
color: var(--text-secondary);
|
|
1139
|
+
cursor: default;
|
|
1140
|
+
}
|
|
1141
|
+
`,zt=({open:e,onOpen:t})=>E(`section`,{css:X,"aria-label":`Live chat replay`,children:[k(`h2`,{children:`Live chat replay`}),E(`div`,{className:`row`,children:[k(s,{size:24,strokeWidth:1.5,"aria-hidden":`true`}),k(`button`,{type:`button`,disabled:e,onClick:t,children:`Open panel`})]})]}),Z=({videoId:e,onClose:t})=>{let n=w(),[r,i]=y(`TOP`),[a,o]=y([]),{logRef:s,onScroll:c,pinned:l,setPinned:u}=At(a);m(()=>ot({playhead:()=>Le(e),fetchPage:async(t,i)=>(await n.query(It,{videoId:e,offsetMs:t,view:r,cursor:i},{requestPolicy:`network-only`}).toPromise()).data?.liveChatReplay,show:o,onRestart:()=>u(!0),limit:250}),[n,e,r]);let d=Lt.find(e=>e.value===r);return E(`section`,{css:[Ct,Rt],className:`chat-replay`,"aria-label":`Chat replay`,children:[E(`div`,{className:`head`,children:[k(me,{label:`Chat replay view`,align:`start`,trigger:E(`button`,{type:`button`,className:`view`,children:[d.label,k(h,{size:20,strokeWidth:1.5})]}),children:Lt.map(e=>k(Oe,{label:e.label,checked:e.value===r,closeOnSelect:!0,onSelect:()=>i(e.value)},e.value))}),k(`button`,{type:`button`,className:`close`,"aria-label":`Close`,onClick:t,children:k(v,{size:24,strokeWidth:1.5})})]}),k(`div`,{className:`log`,ref:s,onScroll:c,children:a.map(e=>k(kt,{message:e},e.id))}),!l&&a.length>0?k(`button`,{type:`button`,className:`resume`,onClick:()=>u(!0),children:`Jump to latest`}):void 0]})},Bt=O`
|
|
1142
|
+
display: flex;
|
|
1143
|
+
align-items: stretch;
|
|
1144
|
+
height: var(--action-height, 3.6rem);
|
|
1145
|
+
border-radius: calc(var(--action-height, 3.6rem) / 2);
|
|
1146
|
+
background: var(--bg-chip);
|
|
1147
|
+
overflow: hidden;
|
|
1148
|
+
|
|
1149
|
+
.like,
|
|
1150
|
+
.dislike {
|
|
1151
|
+
display: flex;
|
|
1152
|
+
align-items: center;
|
|
1153
|
+
gap: 0.8rem;
|
|
1154
|
+
border: none;
|
|
1155
|
+
background: transparent;
|
|
1156
|
+
color: var(--text-primary);
|
|
1157
|
+
font-size: 1.4rem;
|
|
1158
|
+
font-weight: 500;
|
|
1159
|
+
cursor: pointer;
|
|
1160
|
+
transition: background 0.15s ease;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
.like {
|
|
1164
|
+
position: relative;
|
|
1165
|
+
padding: 0 1.4rem 0 1.6rem;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
.like::after {
|
|
1169
|
+
content: '';
|
|
1170
|
+
position: absolute;
|
|
1171
|
+
right: 0;
|
|
1172
|
+
top: 50%;
|
|
1173
|
+
transform: translateY(-50%);
|
|
1174
|
+
width: 1px;
|
|
1175
|
+
height: 2.4rem;
|
|
1176
|
+
background: var(--border-subtle);
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
.dislike {
|
|
1180
|
+
padding: 0 1.6rem;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
.like:hover,
|
|
1184
|
+
.dislike:hover {
|
|
1185
|
+
background: var(--bg-chip-hover);
|
|
1186
|
+
}
|
|
1187
|
+
`,Vt=({videoId:e,likeStatus:t,likeCountText:n})=>{let{rate:r,rating:i,presses:a,burst:o}=W(e,t),s=q(e),c=t===`LIKE`,l=t===`DISLIKE`;return E(`div`,{css:Bt,className:`like-pill`,children:[E(`button`,{type:`button`,className:`like`,"aria-label":`Like`,"aria-pressed":c,disabled:i,onClick:()=>r(`LIKE`),children:[k(U,{status:`LIKE`,size:20,on:c,presses:a(`LIKE`),burst:o(`LIKE`)}),n?k(`span`,{children:n}):void 0]}),E(`button`,{type:`button`,className:`dislike`,"aria-label":`Dislike`,"aria-pressed":l,disabled:i,onClick:()=>r(`DISLIKE`),children:[k(U,{status:`DISLIKE`,size:20,on:l,presses:a(`DISLIKE`),burst:o(`DISLIKE`)}),s===void 0?void 0:k(`span`,{children:Ve(s)})]})]})};S();var Ht=O`
|
|
1188
|
+
border: 1px solid var(--border-subtle);
|
|
1189
|
+
border-radius: 1.2rem;
|
|
1190
|
+
overflow: hidden;
|
|
1191
|
+
background: var(--bg-base);
|
|
1192
|
+
|
|
1193
|
+
.panel-header {
|
|
1194
|
+
display: flex;
|
|
1195
|
+
align-items: center;
|
|
1196
|
+
gap: 0.8rem;
|
|
1197
|
+
padding: 1.2rem 1.2rem 1.2rem 1.6rem;
|
|
1198
|
+
background: var(--bg-subtle);
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
.panel-meta {
|
|
1202
|
+
flex: 1;
|
|
1203
|
+
min-width: 0;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
.panel-title {
|
|
1207
|
+
display: flex;
|
|
1208
|
+
align-items: center;
|
|
1209
|
+
gap: 0.8rem;
|
|
1210
|
+
margin: 0;
|
|
1211
|
+
font-size: 1.6rem;
|
|
1212
|
+
font-weight: 700;
|
|
1213
|
+
line-height: 2.2rem;
|
|
1214
|
+
color: var(--text-primary);
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
.panel-sub {
|
|
1218
|
+
margin-top: 0.2rem;
|
|
1219
|
+
font-size: 1.2rem;
|
|
1220
|
+
line-height: 1.6rem;
|
|
1221
|
+
color: var(--text-secondary);
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
.clear,
|
|
1225
|
+
.collapse {
|
|
1226
|
+
flex: none;
|
|
1227
|
+
height: 3.2rem;
|
|
1228
|
+
border: none;
|
|
1229
|
+
border-radius: 1.6rem;
|
|
1230
|
+
background: transparent;
|
|
1231
|
+
color: var(--text-primary);
|
|
1232
|
+
cursor: pointer;
|
|
1233
|
+
transition: background 0.15s ease;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
.clear {
|
|
1237
|
+
padding: 0 1.2rem;
|
|
1238
|
+
font-size: 1.3rem;
|
|
1239
|
+
font-weight: 500;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
.collapse {
|
|
1243
|
+
width: 3.2rem;
|
|
1244
|
+
display: flex;
|
|
1245
|
+
align-items: center;
|
|
1246
|
+
justify-content: center;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
.clear:hover,
|
|
1250
|
+
.collapse:hover {
|
|
1251
|
+
background: var(--bg-hover);
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
.rows {
|
|
1255
|
+
margin: 0;
|
|
1256
|
+
padding: 0.4rem 0;
|
|
1257
|
+
list-style: none;
|
|
1258
|
+
max-height: 40rem;
|
|
1259
|
+
overflow-y: auto;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
.row {
|
|
1263
|
+
display: flex;
|
|
1264
|
+
align-items: center;
|
|
1265
|
+
gap: 0.4rem;
|
|
1266
|
+
padding: 0.4rem 0.8rem 0.4rem 0;
|
|
1267
|
+
transition: background 0.15s ease;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
.row:hover {
|
|
1271
|
+
background: var(--bg-hover);
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
.row[data-active='true'] {
|
|
1275
|
+
background: var(--bg-chip);
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
.item-link {
|
|
1279
|
+
flex: 1;
|
|
1280
|
+
min-width: 0;
|
|
1281
|
+
display: flex;
|
|
1282
|
+
align-items: center;
|
|
1283
|
+
gap: 0.8rem;
|
|
1284
|
+
padding: 0.4rem 0.8rem 0.4rem 1.2rem;
|
|
1285
|
+
color: inherit;
|
|
1286
|
+
text-decoration: none;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
.index {
|
|
1290
|
+
flex: none;
|
|
1291
|
+
width: 2rem;
|
|
1292
|
+
font-size: 1.2rem;
|
|
1293
|
+
color: var(--text-secondary);
|
|
1294
|
+
text-align: center;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
.thumb {
|
|
1298
|
+
position: relative;
|
|
1299
|
+
flex: none;
|
|
1300
|
+
width: 10rem;
|
|
1301
|
+
aspect-ratio: 16 / 9;
|
|
1302
|
+
border-radius: 0.6rem;
|
|
1303
|
+
overflow: hidden;
|
|
1304
|
+
background: var(--bg-elevated);
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
.thumb img {
|
|
1308
|
+
display: block;
|
|
1309
|
+
width: 100%;
|
|
1310
|
+
height: 100%;
|
|
1311
|
+
object-fit: cover;
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
.badge {
|
|
1315
|
+
position: absolute;
|
|
1316
|
+
right: 0.4rem;
|
|
1317
|
+
bottom: 0.4rem;
|
|
1318
|
+
padding: 0.1rem 0.4rem;
|
|
1319
|
+
border-radius: 0.4rem;
|
|
1320
|
+
background: var(--bg-badge);
|
|
1321
|
+
color: var(--text-on-media);
|
|
1322
|
+
font-size: 1.1rem;
|
|
1323
|
+
font-weight: 500;
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
.info {
|
|
1327
|
+
flex: 1;
|
|
1328
|
+
min-width: 0;
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
.video-title {
|
|
1332
|
+
font-size: 1.4rem;
|
|
1333
|
+
font-weight: 500;
|
|
1334
|
+
line-height: 1.8rem;
|
|
1335
|
+
color: var(--text-primary);
|
|
1336
|
+
display: -webkit-box;
|
|
1337
|
+
-webkit-line-clamp: 2;
|
|
1338
|
+
-webkit-box-orient: vertical;
|
|
1339
|
+
overflow: hidden;
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
.channel {
|
|
1343
|
+
margin-top: 0.2rem;
|
|
1344
|
+
font-size: 1.2rem;
|
|
1345
|
+
color: var(--text-secondary);
|
|
1346
|
+
overflow: hidden;
|
|
1347
|
+
text-overflow: ellipsis;
|
|
1348
|
+
white-space: nowrap;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
.row-actions {
|
|
1352
|
+
flex: none;
|
|
1353
|
+
display: flex;
|
|
1354
|
+
align-items: center;
|
|
1355
|
+
gap: 0.2rem;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
.icon-btn {
|
|
1359
|
+
width: 2.8rem;
|
|
1360
|
+
height: 2.8rem;
|
|
1361
|
+
display: flex;
|
|
1362
|
+
align-items: center;
|
|
1363
|
+
justify-content: center;
|
|
1364
|
+
border: none;
|
|
1365
|
+
border-radius: 50%;
|
|
1366
|
+
background: transparent;
|
|
1367
|
+
color: var(--text-secondary);
|
|
1368
|
+
cursor: pointer;
|
|
1369
|
+
transition: background 0.15s ease, color 0.15s ease;
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
.icon-btn:hover:not(:disabled) {
|
|
1373
|
+
background: var(--bg-hover);
|
|
1374
|
+
color: var(--text-primary);
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
.icon-btn:disabled {
|
|
1378
|
+
cursor: default;
|
|
1379
|
+
opacity: 0.35;
|
|
1380
|
+
}
|
|
1381
|
+
`,Ut=()=>{let t=Be(),[i,a]=y(!1);if(t.items.length===0)return null;let o=t.currentIndex>=0?`${t.currentIndex+1} / ${t.items.length}`:`${t.items.length} queued`;return E(`section`,{css:Ht,className:`queue-panel`,"aria-label":`Queue`,children:[E(`header`,{className:`panel-header`,children:[E(`div`,{className:`panel-meta`,children:[E(`h2`,{className:`panel-title`,children:[k(e,{size:18,strokeWidth:1.5,"aria-hidden":`true`}),`Queue`]}),k(`div`,{className:`panel-sub`,children:o})]}),k(`button`,{type:`button`,className:`clear`,"aria-label":`Clear queue`,onClick:F,children:`Clear`}),k(`button`,{type:`button`,className:`collapse`,"aria-label":i?`Expand queue`:`Collapse queue`,"aria-expanded":!i,onClick:()=>a(e=>!e),children:k(i?h:ne,{size:18,strokeWidth:1.5})})]}),i?void 0:k(`ol`,{className:`rows`,children:t.items.map((e,i)=>{let a=V(e.durationSeconds),o=i===t.currentIndex;return E(`li`,{className:`row`,"data-active":o?`true`:void 0,children:[E(pe,{href:I(e.id),className:`item-link`,onClick:()=>N(i),children:[k(`span`,{className:`index`,children:o?`▶`:i+1}),E(`span`,{className:`thumb`,children:[e.thumbnail?k(je,{src:e.thumbnail,sizes:`10rem`}):void 0,a?k(`span`,{className:`badge`,children:a}):void 0]}),E(`span`,{className:`info`,children:[k(`span`,{className:`video-title`,children:e.title}),e.channel?.name?k(`span`,{className:`channel`,children:e.channel.name}):void 0]})]}),E(`div`,{className:`row-actions`,children:[k(`button`,{type:`button`,className:`icon-btn`,"aria-label":`Move ${e.title} up`,disabled:i===0,onClick:()=>Re(i,i-1),children:k(r,{size:14,strokeWidth:1.5})}),k(`button`,{type:`button`,className:`icon-btn`,"aria-label":`Move ${e.title} down`,disabled:i===t.items.length-1,onClick:()=>Re(i,i+1),children:k(n,{size:14,strokeWidth:1.5})}),k(`button`,{type:`button`,className:`icon-btn`,"aria-label":`Remove ${e.title} from queue`,onClick:()=>H(i),children:k(v,{size:14,strokeWidth:1.5})})]})]},e.id)})})]})};S();var Wt=`(max-width: 999px)`,Gt=O`
|
|
1382
|
+
display: grid;
|
|
1383
|
+
/* youtube.com's own proportions, measured at 1000 to 2560 px wide on
|
|
1384
|
+
2026-11-10: a 16 px margin and gap, 12 px above the player, the sidebar
|
|
1385
|
+
27.5% of the window held between 320 px and 35% of the window or 700 px,
|
|
1386
|
+
and the player takes the rest, never under 640 px, up to the width whose
|
|
1387
|
+
16:9 frame still fits under the header with room below it. A short window
|
|
1388
|
+
gives the width the player cannot take to the sidebar, up to that maximum,
|
|
1389
|
+
and only what is left past both centers the two. From 1000 to 1007 px wide
|
|
1390
|
+
the two keep the left margin and run into the right one (theater centers
|
|
1391
|
+
them instead). */
|
|
1392
|
+
--player-max: max(64rem, calc((100vh - var(--header-height) - 6rem) * 16 / 9));
|
|
1393
|
+
--sidebar: clamp(32rem, max(27.5vw, 100% - 1.6rem - var(--player-max)), min(35vw, 70rem));
|
|
1394
|
+
grid-template-columns: minmax(64rem, var(--player-max)) var(--sidebar);
|
|
1395
|
+
justify-content: safe center;
|
|
1396
|
+
/* The sidebar spans BOTH rows, and an auto-sized row absorbs a share of a
|
|
1397
|
+
spanning item that is taller than its own content. So a long sidebar
|
|
1398
|
+
inflated row 1 and pushed the title and description far below the player:
|
|
1399
|
+
measured at 590px below it with 40 related videos, and 1610px once paging
|
|
1400
|
+
had loaded more.
|
|
1401
|
+
|
|
1402
|
+
min-content pins row 1 to the player it actually holds, and the FLEXIBLE
|
|
1403
|
+
second row is what makes it stick: a spanning item's excess height is
|
|
1404
|
+
shared out across intrinsic rows, so a min-content plus auto pair still
|
|
1405
|
+
inflated row 1 (measured: a 2007px gap). A flexible track absorbs that
|
|
1406
|
+
excess instead. */
|
|
1407
|
+
grid-template-rows: min-content min-content 1fr;
|
|
1408
|
+
align-items: start;
|
|
1409
|
+
gap: 0 1.6rem;
|
|
1410
|
+
padding: 1.2rem 1.6rem 2.4rem;
|
|
1411
|
+
overflow-x: clip;
|
|
1412
|
+
isolation: isolate;
|
|
1413
|
+
|
|
1414
|
+
.stage {
|
|
1415
|
+
grid-column: 1;
|
|
1416
|
+
grid-row: 1;
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
/* Reserves the player's box. The player is moved in as a child rather than
|
|
1420
|
+
rendered here, so without a size of its own this slot would collapse and
|
|
1421
|
+
the page would jump as the video arrives. */
|
|
1422
|
+
.player-slot,
|
|
1423
|
+
.player-slot > .player-host {
|
|
1424
|
+
position: relative;
|
|
1425
|
+
display: block;
|
|
1426
|
+
width: 100%;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
.primary {
|
|
1430
|
+
grid-column: 1;
|
|
1431
|
+
grid-row: 2;
|
|
1432
|
+
min-width: 0;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
.comments-slot {
|
|
1436
|
+
grid-column: 1;
|
|
1437
|
+
grid-row: 3;
|
|
1438
|
+
min-width: 0;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
.panel-slot {
|
|
1442
|
+
grid-column: 1;
|
|
1443
|
+
margin-top: 1.2rem;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
.secondary {
|
|
1447
|
+
grid-column: 2;
|
|
1448
|
+
grid-row: 1 / span 3;
|
|
1449
|
+
display: flex;
|
|
1450
|
+
flex-direction: column;
|
|
1451
|
+
gap: 0.8rem;
|
|
1452
|
+
/* youtube.com's 62.5% of the row at every width: 200 of 320, 220 of 352, 330 of 528 */
|
|
1453
|
+
--compact-thumb-width: 62.5%;
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
/* One-column related cards matching youtube.com (measured 2026-11-11):
|
|
1457
|
+
999 px -> 3 cards (311.66 px), 800 px -> 2 cards (376 px), 600 px -> 1 card (568 px). */
|
|
1458
|
+
.related-grid {
|
|
1459
|
+
display: grid;
|
|
1460
|
+
grid-template-columns: repeat(auto-fill, minmax(min(100%, 31rem), 1fr));
|
|
1461
|
+
column-gap: 1.6rem;
|
|
1462
|
+
row-gap: 2.4rem;
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
.show-more-related {
|
|
1466
|
+
width: 100%;
|
|
1467
|
+
height: 3.6rem;
|
|
1468
|
+
margin-top: 1.2rem;
|
|
1469
|
+
border: 1px solid var(--border-strong);
|
|
1470
|
+
border-radius: 1.8rem;
|
|
1471
|
+
background: transparent;
|
|
1472
|
+
color: var(--text-primary);
|
|
1473
|
+
font-size: 1.4rem;
|
|
1474
|
+
font-weight: 500;
|
|
1475
|
+
cursor: pointer;
|
|
1476
|
+
transition: background 0.15s ease;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
.show-more-related:hover:not(:disabled) {
|
|
1480
|
+
background: var(--bg-hover);
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
.show-more-related:disabled {
|
|
1484
|
+
opacity: 0.6;
|
|
1485
|
+
cursor: default;
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
/* The columns join this grid in the default view. youtube.com's theater, measured 2026-11-10, runs the player edge
|
|
1489
|
+
to edge and keeps the default view's column widths and centering under it, so there they take a grid of their
|
|
1490
|
+
own. From 1000 to 1007 px wide the two overflow the margins evenly there. */
|
|
1491
|
+
.columns {
|
|
1492
|
+
display: contents;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
&.theater {
|
|
1496
|
+
grid-template-columns: minmax(0, 1fr);
|
|
1497
|
+
grid-template-rows: auto;
|
|
1498
|
+
padding: 0 0 2.4rem;
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
&.theater .stage {
|
|
1502
|
+
background: transparent;
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
&.theater .columns {
|
|
1506
|
+
display: grid;
|
|
1507
|
+
grid-template-columns: minmax(64rem, var(--player-max)) var(--sidebar);
|
|
1508
|
+
grid-template-rows: min-content 1fr;
|
|
1509
|
+
justify-content: center;
|
|
1510
|
+
align-items: start;
|
|
1511
|
+
gap: 0 1.6rem;
|
|
1512
|
+
padding: 0 1.6rem;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
&.theater .primary {
|
|
1516
|
+
grid-row: 1;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
&.theater .comments-slot {
|
|
1520
|
+
grid-row: 2;
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
/* Keeps a tall window from pushing the title below the fold. Excluded in
|
|
1524
|
+
fullscreen: this selector out-specifies the player's own :fullscreen rule,
|
|
1525
|
+
so without :not() it would cap the height of a fullscreened player and
|
|
1526
|
+
letterbox it inside a correctly sized container.
|
|
1527
|
+
|
|
1528
|
+
Matched on the player's own attribute rather than on a direct child: the
|
|
1529
|
+
player is moved in through a slot and a host node now, so it is two levels
|
|
1530
|
+
down and a child-combinator selector silently stops matching.
|
|
1531
|
+
|
|
1532
|
+
youtube.com's own rule, read 2026-11-10: the window height less 169 px,
|
|
1533
|
+
never under 480 px (240 px in one column). */
|
|
1534
|
+
&.theater .stage [data-player-root]:not(:fullscreen) {
|
|
1535
|
+
max-height: calc(100vh - 169px);
|
|
1536
|
+
min-height: 480px;
|
|
1537
|
+
border-radius: 0;
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
&.theater .secondary {
|
|
1541
|
+
grid-row: 1 / span 2;
|
|
1542
|
+
padding-top: 2.4rem;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
.primary > .chat-replay,
|
|
1546
|
+
.primary > .live-chat,
|
|
1547
|
+
.primary > .live-chat-teaser {
|
|
1548
|
+
margin-top: 1.2rem;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
.about {
|
|
1552
|
+
display: flex;
|
|
1553
|
+
flex-wrap: wrap;
|
|
1554
|
+
align-items: flex-start;
|
|
1555
|
+
column-gap: 1.2rem;
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
.about > * {
|
|
1559
|
+
flex: 1 1 30rem;
|
|
1560
|
+
min-width: 0;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
/* an opened description takes the whole row, as youtube.com's does, and the chat replay card moves under it */
|
|
1564
|
+
.about > div:not(.collapsed) {
|
|
1565
|
+
flex-basis: 100%;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
.title {
|
|
1569
|
+
margin: 1.2rem 0 0;
|
|
1570
|
+
font-size: 2rem;
|
|
1571
|
+
font-weight: 700;
|
|
1572
|
+
line-height: 2.8rem;
|
|
1573
|
+
color: var(--text-primary);
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
.owner-row {
|
|
1577
|
+
--action-height: 4rem;
|
|
1578
|
+
display: flex;
|
|
1579
|
+
align-items: center;
|
|
1580
|
+
flex-wrap: wrap;
|
|
1581
|
+
gap: 1.2rem;
|
|
1582
|
+
margin-top: 1.2rem;
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
.avatars {
|
|
1586
|
+
--avatar-size: 2.8rem;
|
|
1587
|
+
flex: none;
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
.avatar {
|
|
1591
|
+
flex: none;
|
|
1592
|
+
width: 4rem;
|
|
1593
|
+
height: 4rem;
|
|
1594
|
+
border-radius: 50%;
|
|
1595
|
+
overflow: hidden;
|
|
1596
|
+
background: var(--bg-chip);
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
.avatar img {
|
|
1600
|
+
display: block;
|
|
1601
|
+
width: 100%;
|
|
1602
|
+
height: 100%;
|
|
1603
|
+
object-fit: cover;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
.avatar.fallback {
|
|
1607
|
+
display: flex;
|
|
1608
|
+
align-items: center;
|
|
1609
|
+
justify-content: center;
|
|
1610
|
+
color: var(--text-primary);
|
|
1611
|
+
font-size: 1.6rem;
|
|
1612
|
+
font-weight: 500;
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
.owner-text {
|
|
1616
|
+
min-width: 0;
|
|
1617
|
+
margin-right: 1.2rem;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
.channel-name {
|
|
1621
|
+
display: flex;
|
|
1622
|
+
align-items: center;
|
|
1623
|
+
width: fit-content;
|
|
1624
|
+
max-width: 100%;
|
|
1625
|
+
font-size: 1.6rem;
|
|
1626
|
+
font-weight: 500;
|
|
1627
|
+
line-height: 2.2rem;
|
|
1628
|
+
color: var(--text-primary);
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
/* the badge stays after the ellipsis, as on youtube.com */
|
|
1632
|
+
.channel-name .name {
|
|
1633
|
+
min-width: 0;
|
|
1634
|
+
overflow: hidden;
|
|
1635
|
+
text-overflow: ellipsis;
|
|
1636
|
+
white-space: nowrap;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
.sub-count {
|
|
1640
|
+
font-size: 1.2rem;
|
|
1641
|
+
color: var(--text-secondary);
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
.actions {
|
|
1645
|
+
display: flex;
|
|
1646
|
+
flex-wrap: wrap;
|
|
1647
|
+
align-items: center;
|
|
1648
|
+
gap: 0.8rem;
|
|
1649
|
+
margin-left: auto;
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
.pill {
|
|
1653
|
+
display: flex;
|
|
1654
|
+
align-items: center;
|
|
1655
|
+
gap: 0.8rem;
|
|
1656
|
+
height: var(--action-height, 3.6rem);
|
|
1657
|
+
padding: 0 1.6rem;
|
|
1658
|
+
border: none;
|
|
1659
|
+
border-radius: calc(var(--action-height, 3.6rem) / 2);
|
|
1660
|
+
background: var(--bg-chip);
|
|
1661
|
+
color: var(--text-primary);
|
|
1662
|
+
font-size: 1.4rem;
|
|
1663
|
+
font-weight: 500;
|
|
1664
|
+
cursor: pointer;
|
|
1665
|
+
transition: background 0.15s ease;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
.pill:hover {
|
|
1669
|
+
background: var(--bg-chip-hover);
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
.round {
|
|
1673
|
+
flex: none;
|
|
1674
|
+
display: flex;
|
|
1675
|
+
align-items: center;
|
|
1676
|
+
justify-content: center;
|
|
1677
|
+
width: var(--action-height, 3.6rem);
|
|
1678
|
+
height: var(--action-height, 3.6rem);
|
|
1679
|
+
border: none;
|
|
1680
|
+
border-radius: 50%;
|
|
1681
|
+
background: var(--bg-chip);
|
|
1682
|
+
color: var(--text-primary);
|
|
1683
|
+
cursor: pointer;
|
|
1684
|
+
transition: background 0.15s ease;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
.round:hover {
|
|
1688
|
+
background: var(--bg-chip-hover);
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
/* youtube.com's one column is the same in the default view and in theater, measured 2026-11-11 from 999 to 360 px
|
|
1692
|
+
wide: the player runs edge to edge right under the header with square corners, at most the window height less
|
|
1693
|
+
169 px and never under 240 px. The theater selectors only outrank theater's own two column rules. */
|
|
1694
|
+
@media ${Wt} {
|
|
1695
|
+
--margin: 1.6rem;
|
|
1696
|
+
grid-template-columns: minmax(0, 1fr);
|
|
1697
|
+
grid-template-rows: auto;
|
|
1698
|
+
|
|
1699
|
+
&,
|
|
1700
|
+
&.theater {
|
|
1701
|
+
padding: 0 var(--margin) 2.4rem;
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
.stage,
|
|
1705
|
+
.primary,
|
|
1706
|
+
&.theater .primary,
|
|
1707
|
+
.secondary,
|
|
1708
|
+
&.theater .secondary,
|
|
1709
|
+
.comments-slot,
|
|
1710
|
+
&.theater .comments-slot {
|
|
1711
|
+
grid-column: 1;
|
|
1712
|
+
grid-row: auto;
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
&.theater .columns {
|
|
1716
|
+
display: contents;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
.secondary,
|
|
1720
|
+
&.theater .secondary {
|
|
1721
|
+
margin-top: 2.4rem;
|
|
1722
|
+
padding-top: 0;
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
.stage {
|
|
1726
|
+
margin: 0 calc(-1 * var(--margin));
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
.stage [data-player-root]:not(:fullscreen),
|
|
1730
|
+
&.theater .stage [data-player-root]:not(:fullscreen) {
|
|
1731
|
+
max-height: calc(100vh - 169px);
|
|
1732
|
+
min-height: 240px;
|
|
1733
|
+
border-radius: 0;
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
/* youtube.com's title column never goes under 426.667 px, a 240 px tall
|
|
1738
|
+
16:9 player, so below 459 px its margins shrink and its page scrolls
|
|
1739
|
+
sideways. A phone keeps 12 px margins here and no sideways scroll. */
|
|
1740
|
+
@media (max-width: 458px) {
|
|
1741
|
+
--margin: 1.2rem;
|
|
1742
|
+
}
|
|
1743
|
+
`,Q=D(`
|
|
1744
|
+
query RelatedVideos($cursor: String!) {
|
|
1745
|
+
relatedVideos(cursor: $cursor) {
|
|
1746
|
+
items {
|
|
1747
|
+
id
|
|
1748
|
+
title
|
|
1749
|
+
thumbnail
|
|
1750
|
+
thumbnailSrcset
|
|
1751
|
+
animatedThumbnail
|
|
1752
|
+
thumbnailBadge
|
|
1753
|
+
durationSeconds
|
|
1754
|
+
isMusic
|
|
1755
|
+
viewCount
|
|
1756
|
+
viewCountIcon
|
|
1757
|
+
publishedText
|
|
1758
|
+
metaDelimiter
|
|
1759
|
+
isLive
|
|
1760
|
+
isMembersOnly
|
|
1761
|
+
isShort
|
|
1762
|
+
channel { id name isVerified isVerifiedArtist }
|
|
1763
|
+
byline { text isVerified isVerifiedArtist }
|
|
1764
|
+
collaborators { id name avatar handle subscriberCountText isVerified isVerifiedArtist }
|
|
1765
|
+
notInterestedToken
|
|
1766
|
+
dontRecommendToken
|
|
1767
|
+
}
|
|
1768
|
+
cursor
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
`),Kt=O`
|
|
1772
|
+
display: flex;
|
|
1773
|
+
flex-direction: column;
|
|
1774
|
+
align-items: center;
|
|
1775
|
+
padding: 32.5rem 2.4rem 2.4rem;
|
|
1776
|
+
text-align: center;
|
|
1777
|
+
|
|
1778
|
+
h1 {
|
|
1779
|
+
font-size: 2.4rem;
|
|
1780
|
+
font-weight: 700;
|
|
1781
|
+
line-height: 3.2rem;
|
|
1782
|
+
color: var(--text-primary);
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
.home {
|
|
1786
|
+
display: flex;
|
|
1787
|
+
align-items: center;
|
|
1788
|
+
height: 4rem;
|
|
1789
|
+
margin-top: 3.2rem;
|
|
1790
|
+
padding: 0 1.5rem;
|
|
1791
|
+
border: 1px solid var(--border-strong);
|
|
1792
|
+
border-radius: 2rem;
|
|
1793
|
+
color: var(--accent);
|
|
1794
|
+
font-size: 1.4rem;
|
|
1795
|
+
font-weight: 500;
|
|
1796
|
+
text-decoration: none;
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
.home:hover {
|
|
1800
|
+
background: var(--accent-hover);
|
|
1801
|
+
}
|
|
1802
|
+
`,$=[`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`],qt=()=>{let e=new URLSearchParams(ce()),n=e.get(`v`)??``,[r]=y(()=>_e(history.state));R(n,r);let i=e.get(`list`)??void 0,a=ze(e.get(`t`)),o=Number(e.get(`index`)),s=Number.isInteger(o)&&o>0?o-1:void 0,[{data:c,error:l,fetching:u},f]=de({query:Ge,variables:{id:n,playlistId:i,playlistIndex:s},requestPolicy:`cache-and-network`,pause:n===``}),h=ke(),te=h.theater,ne=d(()=>{Ae(Ee({theater:!Ne().theater}).theater)},[]);m(()=>{S([]),x(!1)},[n]),m(()=>F(!1),[n]);let g=c?.watch;Ue(g?.title??void 0);let _=g?.channel,v=g?.unavailableText??void 0;p(()=>{if(n!==``){if(v){Me().videoId===n&&De();return}B({videoId:n,startAt:a,title:g?.title??void 0,list:i,index:s,playerParams:r})}},[n,a,g?.title,i,s,v,r]);let[b,x]=y(!1),[re,S]=y([]),ae=re[re.length-1]?.cursor??g?.relatedCursor,[{data:oe,fetching:w}]=de({query:Q,variables:{cursor:ae??``},pause:!b||!ae}),T=oe?.relatedVideos,le=L(`hideShorts`),ue=be(),D=Be(),O=g?.related?[...g.related,...re.flatMap(e=>e.items)].filter((e,t,n)=>n.findIndex(t=>t.id===e.id)===t).filter(e=>(!le||e.isShort!==!0)&&!ge(ue,e)):void 0,N=i===void 0||g?.playlist?.id!==i?void 0:g.playlist,[Ce,F]=y(!1),[je,I]=y(void 0),[Le,Re]=y(void 0),V=g?.hasChatReplay===!0&&Le===n,H=We(Wt),Ve=V?k(Z,{videoId:n,onClose:()=>Re(void 0)},`replay:${n}`):void 0,Ke=je===n,qe=g?.isLive?Ke?k(Et,{onShow:()=>I(void 0)}):k(Ft,{videoId:n,subscribed:_?.isSubscribed??void 0,onHide:()=>I(n)},`chat:${n}`):void 0,Ye=g?.chapters??[],U=h.videoId===n,W=U?h.chapter:-1,q=C(null),et=g?.transcriptPanel??void 0,J=U?Te({videoId:n,open:h.panel,chapters:Ye,chapter:W,transcript:et,fit:H||te?void 0:q}):void 0;return v?E(`main`,{css:Kt,children:[k(`h1`,{children:v}),k(pe,{href:`/`,className:`home`,children:`GO TO HOME`})]}):E(`main`,{css:Gt,className:te?`theater`:void 0,children:[k(`div`,{className:`stage`,ref:q,children:k(`div`,{className:`player-slot`,ref:Ie})}),H&&J?k(`div`,{className:`panel-slot`,children:J}):void 0,E(`div`,{className:`columns`,children:[E(`div`,{className:`primary`,children:[H?Ve??qe:void 0,g?.title?k(`h1`,{className:`title`,children:g.title}):void 0,g?.isMembersOnly?k(M,{}):void 0,l&&!g&&!u?k(Se,{error:l,reexecute:f}):void 0,g?E(`div`,{className:`owner-row`,children:[g.byline?.length&&g.collaborators?.length?E(fe,{children:[k(xe,{channels:g.collaborators,subscribe:!0,className:`avatars`,label:`Collaboration channels`,children:k(j,{channels:g.collaborators})}),k(`div`,{className:`owner-text`,children:k(xe,{channels:g.collaborators,subscribe:!0,className:`channel-name`,children:k(`span`,{className:`name`,children:k(ye,{parts:g.byline})})})}),k(`div`,{css:Fe,children:k(xe,{channels:g.collaborators,subscribe:!0,className:`subscribe`,children:`Subscribe`})})]}):_?E(fe,{children:[k(pe,{href:`/channel/${_.id}`,className:_.avatar?`avatar`:`avatar fallback`,"aria-label":_.name,children:_.avatar?k(`img`,{src:_.avatar,alt:``,loading:`lazy`}):_.name.slice(0,1).toUpperCase()}),E(`div`,{className:`owner-text`,children:[E(pe,{href:`/channel/${_.id}`,className:`channel-name`,children:[k(`span`,{className:`name`,children:_.name}),k(z,{channel:_})]}),_.subscriberCountText?k(`div`,{className:`sub-count`,children:_.subscriberCountText}):void 0]}),k(ve,{channelId:_.id,subscribed:_.isSubscribed,notificationLevel:_.notificationLevel})]}):void 0,E(`div`,{className:`actions`,children:[k(Vt,{videoId:n,likeStatus:g?.likeStatus,likeCountText:g?.likeCountText}),E(`button`,{type:`button`,className:`pill`,onClick:()=>F(!0),children:[k(t,{size:20,strokeWidth:1.5}),`Share`]}),g.isLive?void 0:E(`button`,{type:`button`,className:`pill`,onClick:()=>we({videoId:n,title:g.title??`Video`,thumbnail:`https://i.ytimg.com/vi/${n}/hqdefault.jpg`,channelName:_?.name??g.byline?.map(e=>e.text).join(` `)}),children:[k(ee,{size:20,strokeWidth:1.5}),`Download`]}),k(Ze,{videoId:n}),E(me,{label:`More actions`,trigger:k(`button`,{type:`button`,className:`round`,"aria-label":`More actions`,children:k(se,{size:20,strokeWidth:1.5})}),children:[k(Oe,{icon:ie,label:`Share`,onSelect:()=>F(!0)}),k(Oe,{label:`Theater mode`,checked:te,closeOnSelect:!0,onSelect:ne})]})]})]}):void 0,E(`div`,{className:`about`,children:[g?.description||g?.viewCountText||g?.publishedDateText?k(Xe,{...He(g),videoId:n,chapters:Ye,currentChapter:W,onViewChapters:()=>Pe(`chapters`),onShowTranscript:et?()=>Pe(`transcript`):void 0},`description:${n}`):void 0,g?.hasChatReplay?k(zt,{open:V,onOpen:()=>Re(n)}):void 0]})]}),u||N||D.items.length>0||g?.isLive&&!H||V||O&&O.length>0||!H&&J?E(`aside`,{className:`secondary`,children:[H?void 0:Ve,H?void 0:qe,H?void 0:J,N?k($e,{playlist:N}):D.items.length>0?k(Ut,{}):void 0,H?k(`div`,{className:`related-grid`,children:O?O.map(e=>k(P,{video:e.isShort?{...e,isShort:void 0}:e,variant:`shelf`,recommendable:!0},e.id)):$.map(e=>k(A,{},e))}):O?O.map(e=>k(K,{video:e,recommendable:!0},e.id)):$.map(e=>k(G,{},e)),ae?H?k(`button`,{type:`button`,className:`show-more-related`,disabled:w,onClick:()=>{b?T&&!w&&S(e=>e[e.length-1]===T?e:[...e,T]):x(!0)},children:w?`Loading…`:`Show more`}):k(he,{onVisible:()=>{b?T&&!w&&S(e=>e[e.length-1]===T?e:[...e,T]):x(!0)},disabled:w}):void 0]}):void 0,k(`div`,{className:`comments-slot`,children:!u&&g&&!g.commentsHidden?k(Je,{videoId:n,commentCountText:g.commentCountText},`comments:${n}`):void 0})]}),Ce?k(Qe,{videoId:n,title:g?.title??void 0,list:i,onClose:()=>F(!1)}):void 0]})};export{qt as default};
|