'+al+""}),f=bw=0,p=t.length;f',Iv)&&y(c.setID,"mod")&&(d=!0);if(o.fragments)for(h=0,_=o.fragments.length;h<_;h++)(u=o.fragments[h]).emote?r+=oee(tee(u.emote.emoteID)):(r+=Zy([u.text],0,0),!n&&jv&&wb[0].test(u.text)?n=!0:!s&&Pv&&fb.test(u.text)&&(s=!0));Cv&&wk(t[f].commenter.displayName.toLowerCase(),Zv[0])?l=!0:Mv&&wk(t[f].commenter.displayName.toLowerCase(),v[0].display_name.toLowerCase())&&(s=!0),m=n||d||l?bb:s?yb:!hb&&o.userColor?'style="color: '+o.userColor+';"':'style="color: '+Aw[t[f].commenter.displayName.charCodeAt(0)%Sw]+';"',i=(i+=""+t[f].commenter.displayName+u2(t[f].commenter.displayName,t[f].commenter.login)+""+(o.is_action?"":":")+" ")+'"+r+"",m={chat_number:0,time:t[f].contentOffsetSeconds,message:i,atstreamer:n,atuser:s,mod:d,fromstreamer:l,hasbits:!1},g?f2(m):""!==vw&&p2(m)}g&&b[0]===a&&(Pw=!1,h2(a),""!==vw)&&v2(a)}}function u2(e,a){return e&&Dw.test(e)?" ("+a+")":""}function f2(e){mw.push(e)}function p2(e){gw.push(e)}function h2(e){Pw||Cw||b[0]!==e||r.Play_ChatForceDisable||(g2(e),fw=Qk(function(){g2(e)},1e3,fw),_)||qw()}function _2(){o(pw),o(hw),Xk(fw),Xk(_w)}function m2(){Cw=!1,_2(),b[0]=0,$4(kw[0]),$4(kw[1]),vw=null,mw=[],gw=[],Mw={},dw(jw=0),dw(1),Eb(0)}function g2(e){var a,t=mw.length;if(jw'+u+u+Qt+u+u+""}),Cw=!0,Xk(fw))}function v2(e){Cw||b[0]!==e||b2(e)}function b2(e){""!==vw&&WS(iC,XO,y2,V,e,0,"POST",Tw.replace("%v",r.ChannelVod_vodId).replace("%c",vw))}function y2(e,a){Cw||b[0]!==a||(200===e.status?c2(e.responseText,a):w2(a))}function w2(e){b[0]===e&&(hw=A(function(){b2(e,0)},2500,hw))}function x2(){m2(),S2(Ot+u+Tt),_||Lw()}function A2(){m2(),S2(ki)}function S2(e){var a=" ",a=(a+='')+e+"";(e=document.createElement("div")).className="chat_line",e.innerHTML=a,kw[0].appendChild(e),kw[1].appendChild(e.cloneNode(!0))}function k2(e){for(var a=kw[e].getElementsByClassName("chat_line_holder"),t=0,i=a.length-Iw;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",Rn),c("dialog_hist_setting_name_2",Fn),c("dialog_hist_setting_name_3",Qu),c("dialog_hist_setting_summary_3",Xu),c("dialog_hist_val_2",Zn),c("dialog_opt_text",os),c("dialog_thumb_opt_setting_name_-1",fs),c("dialog_thumb_opt_val_-1",Zn),c("dialog_thumb_opt_setting_name_0",rs),c("dialog_thumb_opt_setting_name_1",ds),c("dialog_thumb_opt_setting_name_3",pp),c("dialog_thumb_opt_setting_name_4",hp),c("dialog_thumb_opt_setting_name_5",gp),c("dialog_thumb_opt_setting_name_6",ns),c("dialog_thumb_opt_setting_name_7",mi),c("dialog_thumb_opt_setting_name_8",K),d("dialog_multi_help_text",ks),c("chat_send_button0",od),c("chat_send_button1",vl),c("chat_send_button2",Dl),c("chat_send_button3",yl),c("chat_send_button4",xl),c("chat_send_button5",Sl),c("chat_send_button6",Il),c("chat_send_button7",jl),c("chat_send_button8",bl),c("chat_send_button9",wl),c("chat_send_button10",Al),c("chat_send_button11",kl),c("chat_result",Cl),pv(),c("update_dialog_changebutton",Oc),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+qn),d("feed_end_7",W+f+"VOD"),d("feed_end_8","VOD "+qn),d("icon_feed_back",f)}function wA(e,a,t,i){d(e,'
'+f+t+"
")}function t(e){xA(m(e))}function xA(e){e&&e.classList.add("hide")}function l(e){AA(m(e))}function AA(e){e&&e.classList.remove("hide")}function SA(e){return kA(m(e))}function kA(e){return!y(e?e.className:"","hide")}function h(e,a){jA(m(e),a)}function jA(e,a){e.classList.add(a)}function n(e,a){CA(m(e),a)}function CA(e,a){e&&e.classList.remove(a)}function d(e,a){IA(m(e),a)}function IA(e,a){e&&(e.innerHTML=a)}function c(e,a){PA(m(e),a)}function PA(e,a){e&&(e.textContent=a)}function MA(e){e&&e.remove()}function VA(e){var a=m(e).getElementsByClassName("emoji");if(a){for(var t=0,i=a.length;t"+u+Aa+u+u+Sa+u+u+wn+u+u+Vp+(e=V2?e:_?Lp+xn+""+u+An+u+u:Lp+yf+""+u+wf+u+u)+Lp+ca+""),l("welcome_dialog")}function KA(){t("welcome_dialog")}function WA(){return SA("welcome_dialog")}function ZA(e,a){x("keydown",e),w("keydown",a),JA(),l("dialog_controls"),aj("Controls")}function $A(){t("dialog_controls")}function e4(){return SA("dialog_controls")}function a4(e){return e&&(e+"").replace(/\B(?=(\d{3})+(?!\d))/g,",")}function t4(e){return 1===e?Ie:Pe}function i4(e){return 1===e?je:Ce}function o4(e){return!y(e+"","live")}function n4(e,a,t){return null!==m(t+e+"_"+a)}function s4(e){kX()?(w("keydown",AY),dX||zX(),gT&&W3(),xX(!0)):l4(!1,e)}function l4(e,a){FA(),r.Main_Go!==X2&&(r.Main_BeforeChannelisSet=!1),r.Main_Go!==Z2&&(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 d4(){dA=r.Search_isSearching?r.Main_Go:(r.Main_BeforeSearch=r.Main_Go,null),p4(r.Main_Go),r.Main_Go=D2,FA(),zA(),kF()}function r4(){mH=GU,p4(r.Main_Go),r.Main_Go=ox,FA(),zA(),k7()}function c4(){rA=A(u4,500,rA)}function u4(){g("Main_values",JSON.stringify(r)),g("Play_data",JSON.stringify(k))}function f4(){r=NL(r,LS("Main_values",{})),k=NL(k,LS("Play_data",{}))}function p4(e){M[e]&&M[e].exit_fun&&M[e].exit_fun(),SA("settings_holder")&&nH()}function h4(){wA("label_refresh","icon-refresh",L+":"+vt),wA("label_thumb","icon-options",hs)}function _4(){wA("label_thumb","icon-return",ue)}function m4(e){return e=new Date(e),yx?e.getDate()+" "+bt[e.getMonth()]+" "+e.getFullYear():bt[e.getMonth()]+" "+e.getDate()+" "+e.getFullYear()}function g4(e){return m4(e)+" "+(e=new Date(e)).getHours()+":"+AD(e.getMinutes())}var v4=!0,b4,y4,w4,x4,A4,S4;function k4(e){var a,t,i,o,n,s;v4&&(_?(t=g3(),i=I3(),o=v3(),n=b3(),Hk("Webviewversion "+i),a="Apk: "+Yx+" Web: "+p_.WebVersion+(i?" Webview: "+i:"")+" Device: "+o+" - "+t+" Sdk: "+n,s=M4(Yx),O.update_background.defaultValue||(s?P4(!(w4=!0)):e||j4()),cj(Yx,p_.WebVersion,i,t,n,o)):(a=p_.VersionBase+"."+p_.publishVersionCode+" - "+p_.WebVersion,cj(Yx,p_.WebVersion,navigator.appVersion,navigator.platform,"Browser","Browser")),d("dialog_about_text",Yp+a+u+zp+F_+""+u+''+Kp),Mx=(new Date).getTime())}function j4(e){!v4||w4&&K4()&&O.update_background.defaultValue&&!e||(y(window.location.href,"https://fgl27.github.io")?RS("https://fgl27.github.io/SmartTwitchTV/release/githubio/version/version.json",I4,C4):A(function(){x4=!1,H4(),O4()},1e3))}function C4(){K4()&&l7(Gc)}function I4(e){x4=!1,N4=OS();var a=(e=JSON.parse(e)).WebTag>p_.WebTag,t=_&&p_.publishVersionCode'+f+(e?Uc:Fc)+Jc+"
"),K4()?H4():O.update_show.defaultValue||a?Xx||1!==O.update_show.defaultValue||(a=(e?Uc:Fc)+Jc,_?l7(a):(cS()?RA:ED)(a,3e3),Xx=!0):X4()}function M4(e){var a=(e=e.split("."))[0]+"."+e[1],e=parseInt(e[2]),t=parseFloat(a)"+(w4?A4?Uc:Fc:Ec)+u+(!w4&&N4?Hc+N4:f)+""+u+Lp+Nc+f+""+u,a=p_.changelog,t=(e+=Lp+a[0].title+""+u+qp,a[0].changes.length),i=0;i")}function J4(){Q4(),X4()}function Q4(){x4=!0,m("update_dialog_upbutton").style.width="30%",d("update_dialog_upbutton",zc),j4(!0)}function X4(){H4(),Vk(!0,F4,!0),V4(),kX()?(AX(),VX()):fK()&&mS()?RK(N):lG()&&Dq(r.Main_Go),l("update_dialog"),L4=!0,aj("UpdateDialog")}function Y4(e){E4=0,t("update_dialog"),L4=!1,e||(Vk(!1,F4),kX()?xX(!0):fK()?IK(!0,N):cS()&&!nY()&&M[r.Main_Go].init_fun())}function K4(){return L4}function W4(){for(var e,a,t=Lp+Vc+""+Tc+zp+"https://tinyurl.com/sttvchanges
",i=p_.changelog,o=0,n=i.length;o"+qp,a=i[o].changes.length,e=0;e
"}d("dialog_changelod_text",t+Lp+fa+"")}function Z4(e){$4(m(e))}function $4(e){if(e)for(;e.firstChild;)e.removeChild(e.firstChild)}function eS(e){T2=e}function aS(e){var a=0;return T2'+e+""}):""}function ik(e,a,t){var i;!Lm()||!a||!a[0]||"live"===e&&M[ax].histPosX[1]||"vod"===e&&M[tx].histPosX[1]||"clip"===e&&M[ix].histPosX[1]||((i=uk(e,a[7]))?(i.data=bk(a),i.date=t?i.date:(new Date).getTime(),i.game=a[3],i.views=a[13]):(1999a.id?-1:e.ida[t]?-1:e[t] '),AA(BV),zY=!1,IC(),UP(),iP(3),UK(),R7=!(EO=!1),(gT?(vC(bT),kT):Y7?xC:hC)(),K7?-1!==XG&&(bw=XG,Ew()):x2(),Y7=!1,K7?dC():(c("end_vod_name_text_2",""),d("end_vod_title_text_2",""),S[kM].setLabel("")),NT(r.Main_selectedChannel_id),HD(3),S[xM].setLabel(r.Main_selectedChannelDisplayname),nI(r.Main_selectedChannel_id)}function lC(){wN=!1,bN((JO=Z7)[fE=0])}function dC(){r.ChannelVod_vodId&&RS(zx+"videos?id="+r.ChannelVod_vodId,rC,V,null,null,!0)}function rC(e){(e=JSON.parse(e)).data&&e.data.length&&(e=e.data[0],d("end_vod_title_text_2",ZG=tk(e.title)),S[kM].setLabel(ZG,r.Main_selectedChannelDisplayname),PC(fM,e.thumbnail_url.replace("%{width}x%{height}",hx)+Wx))}function cC(){q7=(new Date).getTime(),WS(iC,QO,uC,V,0,q7,"POST",nC.replace("%x",FG))}function uC(e,a,t){R7&&q7===t&&(200===e.status&&(t=JSON.parse(e.responseText)).data&&t.data.clip&&(t.data.clip.videoOffsetSeconds||0===t.data.clip.videoOffsetSeconds)?(XG=t.data.clip.videoOffsetSeconds||1,WC()):KC(If))}function fC(){z7=(new Date).getTime(),WS(iC,QO,pC,V,0,z7,"POST",nC.replace("%x",FG))}function pC(e,a,t){R7&&z7===t&&200===e.status&&(t=JSON.parse(e.responseText)).data&&t.data.clip&&(e=t.data.clip,-1===XG&&(e.videoOffsetSeconds?(bw=XG=e.videoOffsetSeconds,Ew):x2)(),e.game&&e.game.displayName&&(d("stream_info_game",ee+e.game.displayName),zG=e.game.displayName,k.data[3]=zG,S[AM].setLabel(k.data[3])),e.broadcaster)&&(d("stream_info_name",RI(e.broadcaster.displayName,e.broadcaster.roles&&e.broadcaster.roles.isPartner,2,HG)),KT(m("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 hC(){G7=(new Date).getTime(),WS(iC,QO,_C,V,0,G7,"POST",oC.replace("%x",FG))}function _C(e,a,t){R7&&G7===t&&(200===e.status&&(t=gC(e.responseText)).length?vC(t):mC())}function mC(){BD(),ED(cn,2e3),A(function(){j8(3)},2e3)}function gC(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 bI(){(!b5[0]&&b5[1]||!v5[0]&&v5[1])&&yI(0)}function yI(e,a){b5[e]=1,v5[e]=a?T("screen_preview_volume")*XU:100,_7(),h7(),m7()}function wI(){var e,a;if(xO){for(e=WM,a=oV+1;e
')}function SI(e,a,t){v5[e]+=a*XU,v5[e]<0?v5[e]=0:100