'+il+""}),f=Lw=0,p=t.length;f',Xv)&&y(c.setID,"mod")&&(d=!0);if(o.fragments)for(h=0,m=o.fragments.length;h"+t[f].commenter.displayName+M2(t[f].commenter.displayName,t[f].commenter.login)+""+(o.is_action?"":":")+" ")+'"+r+"",_={chat_number:0,time:t[f].contentOffsetSeconds,message:i,atstreamer:n,atuser:s,mod:d,fromstreamer:l,hasbits:!1},g?V2(_):""!==Bw&&O2(_)}g&&b[0]===a&&(Qw=!1,T2(a),""!==Bw)&&B2(a)}}function M2(e,a){return e&&$w.test(e)?" ("+a+")":""}function V2(e){Ew.push(e)}function O2(e){Nw.push(e)}function T2(e){Qw||Jw||b[0]!==e||r.Play_ChatForceDisable||(N2(e),Vw=v3(function(){N2(e)},1e3,Vw),m)||o2()}function D2(){o(Ow),o(Tw),b3(Vw),b3(Dw)}function E2(){Jw=!1,D2(),b[0]=0,xS(Fw[0]),xS(Fw[1]),Bw=null,Ew=[],Nw=[],Yw={},Cw(Hw=0),Cw(1),ay(0)}function N2(e){var a,t=Ew.length;if(Hw'+u+u+Qt+u+u+""}),Jw=!0,b3(Vw))}function B2(e){Jw||b[0]!==e||L2(e)}function L2(e){""!==Bw&&yk(VC,AT,q2,V,e,0,"POST",Zw.replace("%v",r.ChannelVod_vodId).replace("%c",Bw))}function q2(e,a){Jw||b[0]!==a||(200===e.status?P2(e.responseText,a):G2(a))}function G2(e){b[0]===e&&(Tw=A(function(){L2(e,0)},2500,Tw))}function z2(){E2(),U2(Ot+u+Tt),m||i2()}function R2(){E2(),U2(ji)}function U2(e){var a=" ",a=(a+='')+e+"";(e=document.createElement("div")).className="chat_line",e.innerHTML=a,Fw[0].appendChild(e),Fw[1].appendChild(e.cloneNode(!0))}function F2(e){for(var a=Fw[e].getElementsByClassName("chat_line_holder"),t=0,i=a.length-Xw;t'+f+f+At),d("channel_content_titley_1",''+f+f+xe),d("channel_content_titley_2",''+f+f+Ka),c("dialog_hist_setting_name_0",Fn),c("dialog_hist_setting_name_2",Hn),c("dialog_hist_setting_name_3",Ku),c("dialog_hist_setting_summary_3",Wu),c("dialog_hist_val_2",es),c("dialog_opt_text",ss),c("dialog_thumb_opt_setting_name_-1",hs),c("dialog_thumb_opt_val_-1",es),c("dialog_thumb_opt_setting_name_0",us),c("dialog_thumb_opt_setting_name_1",cs),c("dialog_thumb_opt_setting_name_3",_p),c("dialog_thumb_opt_setting_name_4",gp),c("dialog_thumb_opt_setting_name_5",yp),c("dialog_thumb_opt_setting_name_6",ls),c("dialog_thumb_opt_setting_name_7",gi),c("dialog_thumb_opt_setting_name_8",K),d("dialog_multi_help_text",Cs),c("chat_send_button0",sd),c("chat_send_button1",yl),c("chat_send_button2",Nl),c("chat_send_button3",xl),c("chat_send_button4",Sl),c("chat_send_button5",jl),c("chat_send_button6",Ml),c("chat_send_button7",Il),c("chat_send_button8",wl),c("chat_send_button9",Al),c("chat_send_button10",kl),c("chat_send_button11",Cl),c("chat_result",Pl),Ov(),c("update_dialog_changebutton",Dc),c("update_dialog_exit",ua),d("feed_end_1",Ct),d("feed_end_3",Z),d("feed_end_4",W+f+Z),d("feed_end_5",Z+f+zn),d("feed_end_7",W+f+"VOD"),d("feed_end_8","VOD "+zn),d("icon_feed_back",f)}function FA(e,a,t,i){d(e,'
'+f+t+"
")}function t(e){HA(_(e))}function HA(e){e&&e.classList.add("hide")}function l(e){JA(_(e))}function JA(e){e&&e.classList.remove("hide")}function XA(e){return QA(_(e))}function QA(e){return!y(e?e.className:"","hide")}function h(e,a){YA(_(e),a)}function YA(e,a){e&&e.classList.add(a)}function n(e,a){KA(_(e),a)}function KA(e,a){e&&e.classList.remove(a)}function d(e,a){WA(_(e),a)}function WA(e,a){e&&(e.innerHTML=a)}function c(e,a){ZA(_(e),a)}function ZA(e,a){e&&(e.textContent=a)}function $A(e){e&&e.remove()}function e4(e){var a=_(e).getElementsByClassName("emoji");if(a){for(var t=0,i=a.length;t"+u+Aa+u+u+Sa+u+u+An+u+u+Qp+(e=K2?e:m?ah+Sn+""+u+kn+u+u:ah+Af+""+u+Sf+u+u)+ah+ca+""),l("welcome_dialog")}function b4(){t("welcome_dialog")}function y4(){return XA("welcome_dialog")}function w4(e,a){x("keydown",e),w("keydown",a),m4(),l("dialog_controls"),j3("Controls")}function x4(){t("dialog_controls")}function A4(){return XA("dialog_controls")}function S4(e){return e&&(e+"").replace(/\B(?=(\d{3})+(?!\d))/g,",")}function k4(e){return 1===e?Ie:Pe}function j4(e){return 1===e?je:Ce}function C4(e){return!y(e+"","live")}function I4(e,a,t){return null!==_(t+e+"_"+a)}function P4(e){vY()?(w("keydown",_K),aY||TY(),JT&&k7(),mY(!0)):M4(!1,e)}function M4(e,a){f4(),r.Main_Go!==px&&(r.Main_BeforeChannelisSet=!1),r.Main_Go!==gx&&(r.Main_BeforeAgameisSet=!1),M[r.Main_Go]?M[r.Main_Go].init_fun(a):M[1].init_fun(),e&&x("keydown",M[r.Main_Go].key_fun)}function V4(){CA=r.Search_isSearching?r.Main_Go:(r.Main_BeforeSearch=r.Main_Go,null),N4(r.Main_Go),r.Main_Go=$2,f4(),r4(),lF()}function O4(){eJ=AH,N4(r.Main_Go),r.Main_Go=Ax,f4(),r4(),$7()}function T4(){IA=A(D4,500,IA)}function D4(){g("Main_values",JSON.stringify(r)),g("Play_data",JSON.stringify(k))}function E4(){r=_9(r,lk("Main_values",{})),k=_9(k,lk("Play_data",{}))}function N4(e){M[e]&&M[e].exit_fun&&M[e].exit_fun(),XA("settings_holder")&&UH()}function B4(){FA("label_refresh","icon-refresh",L+":"+vt),FA("label_thumb","icon-options",_s)}function L4(){FA("label_thumb","icon-return",ue)}function q4(e){return e=new Date(e),qx?e.getDate()+" "+bt[e.getMonth()]+" "+e.getFullYear():bt[e.getMonth()]+" "+e.getDate()+" "+e.getFullYear()}function G4(e){return q4(e)+" "+(e=new Date(e)).getHours()+":"+$8(e.getMinutes())}var z4=!0,R4,U4,F4,H4,J4,X4;function Q4(e){var a,t,i,o,n,s;z4&&(m?(t=Hj(),i=t7(),o=Jj(),n=Xj(),_3("Webviewversion "+i),a="Apk: "+hA+" Web: "+Mm.WebVersion+(i?" Webview: "+i:"")+" Device: "+o+" - "+t+" Sdk: "+n,s=$4(hA),O.update_background.defaultValue||(s?Z4(!(F4=!0)):e||Y4()),E3(hA,Mm.WebVersion,i,t,n,o)):(a=Mm.VersionBase+"."+Mm.publishVersionCode+" - "+Mm.WebVersion,E3(hA,Mm.WebVersion,navigator.appVersion,navigator.platform,"Browser","Browser")),d("dialog_about_text",fh+a+u+ih+s_+""+u+''+ph),Yx=(new Date).getTime())}function Y4(e){!z4||F4&&bS()&&O.update_background.defaultValue&&!e||(y(window.location.href,"https://fgl27.github.io")?uk("https://fgl27.github.io/SmartTwitchTV/release/githubio/version/version.json",W4,K4):A(function(){H4=!1,hS(),aS()},1e3))}function K4(){bS()&&E7(Uc)}function W4(e){H4=!1,sS=ak();var a=(e=JSON.parse(e)).WebTag>Mm.WebTag,t=m&&e.publishVersionCode>Mm.publishVersionCode;Mm.changelog=JSON.parse(JSON.stringify(e.changelog)),Mm.ApkUrl=e.ApkUrl,a||t?(F4=!0,Z4(J4=!t&&a)):bS()&&(hS(),E7(Fc)),aS()}function Z4(e,a){d("label_update",'
'+f+(e?Jc:Hc)+Qc+"
"),bS()?hS():O.update_show.defaultValue||a?pA||1!==O.update_show.defaultValue||(a=(e?Jc:Hc)+Qc,m?E7(a):(TS()?u4:fD)(a,3e3),pA=!0):gS()}function $4(e){var a=(e=e.split("."))[0]+"."+e[1],e=parseInt(e[2]),t=parseFloat(a)"+(F4?J4?Jc:Hc:Lc)+u+(!F4&&sS?Xc+sS:f)+""+u+ah+qc+f+""+u,a=Mm.changelog,t=(e+=ah+a[0].title+""+u+th,a[0].changes.length),i=0;i")}function mS(){_S(),gS()}function _S(){H4=!0,_("update_dialog_upbutton").style.width="30%",d("update_dialog_upbutton",Rc),Y4(!0)}function gS(){hS(),t3(!0,fS,!0),eS(),vY()?(_Y(),SY()):nW()&&qS()?EW(B):Gz()&&pq(r.Main_Go),l("update_dialog"),lS=!0,j3("UpdateDialog")}function vS(e){nS=0,t("update_dialog"),lS=!1,e||(t3(!1,fS),vY()?mY(!0):nW()?wW(!0,B):TS()&&!ZY()&&M[r.Main_Go].init_fun())}function bS(){return lS}function yS(){for(var e,a,t=ah+Tc+""+Ec+ih+"https://tinyurl.com/sttvchanges
",i=Mm.changelog,o=0,n=i.length;o"+th,a=i[o].changes.length,e=0;e
"}d("dialog_changelod_text",t+ah+fa+"")}function wS(e){xS(_(e))}function xS(e){if(e)for(;e.firstChild;)e.removeChild(e.firstChild)}function AS(e){Z2=e}function SS(e){var a=0;return Z2'+e+""}):""}function jk(e,a,t){var i;!a0()||!a||!a[0]||"live"===e&&M[yx].histPosX[1]||"vod"===e&&M[wx].histPosX[1]||"clip"===e&&M[xx].histPosX[1]||((i=Dk(e,a[7]))?(i.data=Fk(a),i.date=t?i.date:(new Date).getTime(),i.game=a[3],i.views=a[13]):(1999a.date?1:0}),"vod"!==e&&"clip"!==e||(Ck[p[v[0].id][e][0].data[7]]=0),p[v[0].id][e].shift()),p[v[0].id][e].push({data:Fk(a),date:(new Date).getTime(),name:a[6]?a[6].toLowerCase():"",game:a[3],id:a[7],views:a[13],created_at:new Date(a[12]).getTime(),watched:0}),"live"===e&&p[v[0].id][e].sort(function(e,a){return e.id>a.id?-1:e.ida[t]?1:0}):e.sort(function(e,a){return e[t]>a[t]?-1:e[t] '),JA(rV),TK=!1,tI(),vM(),VP(3),BW(),_C=!(uT=!1),(JT?(JC(QT),e8):AC?KC:RC)(),SC?-1!==CR&&(Lw=CR,a2()):z2(),AC=!1,SC?NC():(c("end_vod_name_text_2",""),d("end_vod_title_text_2",""),S[$M].setLabel("")),f8(r.Main_selectedChannel_id),wD(3),S[KM].setLabel(r.Main_selectedChannelDisplayname),TI(r.Main_selectedChannel_id)}function EC(){$B=!1,YB((wT=jC)[RN=0])}function NC(){r.ChannelVod_vodId&&uk(nA+"videos?id="+r.ChannelVod_vodId,BC,V,null,null,!0)}function BC(e){(e=JSON.parse(e)).data&&e.data.length&&(e=e.data[0],d("end_vod_title_text_2",VR=kk(e.title)),S[$M].setLabel(VR,r.Main_selectedChannelDisplayname),iI(GM,e.thumbnail_url.replace("%{width}x%{height}",Tx)+_A))}function LC(){pC=(new Date).getTime(),yk(VC,xT,qC,V,0,pC,"POST",TC.replace("%x",xR))}function qC(e,a,t){_C&&pC===t&&(200===e.status&&(t=JSON.parse(e.responseText)).data&&t.data.clip&&(t.data.clip.videoOffsetSeconds||0===t.data.clip.videoOffsetSeconds)?(CR=t.data.clip.videoOffsetSeconds||1,kI()):SI(Vf))}function GC(){hC=(new Date).getTime(),yk(VC,xT,zC,V,0,hC,"POST",TC.replace("%x",xR))}function zC(e,a,t){_C&&hC===t&&200===e.status&&(t=JSON.parse(e.responseText)).data&&t.data.clip&&(e=t.data.clip,-1===CR&&(e.videoOffsetSeconds?(CR=e.videoOffsetSeconds,Lw=CR,a2):z2)(),e.game&&e.game.displayName&&(d("stream_info_game",ee+e.game.displayName),bR=e.game.displayName,k.data[3]=bR,S[WM].setLabel(k.data[3])),e.broadcaster)&&(d("stream_info_name",_P(e.broadcaster.displayName,e.broadcaster.roles&&e.broadcaster.roles.isPartner,2,SR)),k8(_("stream_info_icon"),e.broadcaster.profileImageURL),r.Main_selectedChannelDisplayname=e.broadcaster.displayName,r.Main_selectedChannelPartner=e.broadcaster.roles.isPartner,k.data[5]=e.broadcaster.profileImageURL)}function RC(){mC=(new Date).getTime(),yk(VC,xT,UC,V,0,mC,"POST",OC.replace("%x",xR))}function UC(e,a,t){_C&&mC===t&&(200===e.status&&(t=HC(e.responseText)).length?JC(t):FC())}function FC(){uD(),fD(fn,2e3),A(function(){tE(3)},2e3)}function HC(e){var a,t=[],i=JSON.parse(e);if(i&&i.hasOwnProperty("data")&&i.data.hasOwnProperty("clip")&&i.data.clip){a="?sig="+encodeURIComponent(i.data.clip.playbackAccessToken.signature)+"&token="+encodeURIComponent(i.data.clip.playbackAccessToken.value),(i=i.data.clip.videoQualities).sort(function(e,a){return a.quality-e.quality});for(var o=0,n=i.length;oa.values.length-1&&(a.defaultValue=a.values.length-1),a.bottomArrows(),O[e].defaultValue=a.defaultValue,g(e,a.defaultValue+1)}function XI(){(!XV[0]&&XV[1]||!JV[0]&&JV[1])&&QI(0)}function QI(e,a){XV[e]=1,JV[e]=a?T("screen_preview_volume")*MH:100,U7(),R7(),F7()}function YI(){var e,a;if(WO){for(e=k6,a=O6+1;e
')}function ZI(e,a,t){JV[e]+=a*MH,JV[e]<0?JV[e]=0:100