1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2763,4490],{74626:(t,e,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/channel/[id]/[[...date]]",function(){return s(56325)}])},62763:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>d});var i=s(74848),n=s(96540),a=s(74368),l=s(68850),o=s(41817),r=s(47819),c=s(85858),_=s(69500),h=s(41364);let d=t=>{var e,s,d,u;let{blockIdx:p,arrowClick:m,getAllCards:v,onAllCardsShowed:g,onAllCardsToggled:y,lineTitle:b,apiMethodField:T,channelData:S,lineUrl:P,archiveData:f,isExpanded:x,type:C,idx:I,main:k,...w}=t,j=(0,a.wA)(),N=(0,a.d4)(t=>t.catalog.homeArchiveConfigMovie),D=(0,a.d4)(t=>t.catalog.homeArchiveConfigSeries),A=(0,a.d4)(t=>t.catalog.isHomePopStated),H=h.Ay.useApiUrl(),R=h.Ay.useApiKey(),E=(0,l.A)(),U=I&&I.includes("catchups_genres"),[M,L]=(0,n.useState)(A&&N&&!U?N:f),[B,O]=(0,n.useState)(A&&D?D:f),V=(0,o.A)(),W=(0,n.useRef)(null),F=(0,n.useRef)([]),q=(0,n.useRef)([]),K=(0,n.useRef)([]);return((0,n.useEffect)(()=>{if((!A||("movie"!==C||!N)&&("series"!==C||!D)||"catchups"!==T)&&!f)return fetch("catchups"===T?"".concat(H).concat(r.PI[T]).concat(C?"?category=".concat(C):"").concat(R.replace("?","&"),"&limit=").concat(20,"&for_kids=false"):"".concat(H).concat(r.PI[T]).concat(S.id,"/catchups").concat(R,"&sort=default&limit=").concat(20,"&for_kids=false"),{method:"GET",credentials:"include"}).then(t=>{t.status<400&&t.json().then(e=>{if(V.current&&e&&e.items&&e.items.length){if("tvchannel"===T){var s,i;"movie"===C?L((null==e?void 0:null===(s=e.items)||void 0===s?void 0:s.length)>=5?e:null):O((null==e?void 0:null===(i=e.items)||void 0===i?void 0:i.length)>=5?e:null)}else"movie"===C?(L(e),j((0,_._G)(e))):(O(e),j((0,_.Zc)(e)))}else console.error("API ERROR: url:".concat(H).concat(r.PI[T]).concat(R,", response =>"),t)})}),()=>{W.current&&clearTimeout(W.current)}}
1,[]),("movie"!==C||M)&&("series"!==C||B))?(0,i.jsx)(c.A,{cardType:c.S.ARCHIVE,idx:I,blockIdx:p,lineUrl:P,lineAlias:I,lineTitle:b,channelLogoUrl:"movie"===C?null==M?void 0:null===(e=M.channel)||void 0===e?void 0:e.logo:null==B?void 0:null===(s=B.channel)||void 0===s?void 0:s.logo,lineContent:"movie"===C?null==M?void 0:M.items:null==B?void 0:B.items,lineTotalCount:"movie"===C?null==M?void 0:null===(d=M.items)||void 0===d?void 0:d.length:null==B?void 0:null===(u=B.items)||void 0===u?void 0:u.length,tvChannels:!1,catchups:!0,tvChannelsAlias:I,arrowClick:(t,e)=>{E({action_id:"click",screen_type:"tvchannel"===T?"tv_channels":"main",screen_attributes_id:"tvchannel"===T?null==S?void 0:S.alias:"main",block_type:"collection",block_attributes_id:e,block_attributes_index:p,element_attributes_id:t?"arrow_right":"arrow_left",element_type:"button"})},getAllCards:v,onAllCardsShowed:g,onAllCardsToggled:y,onVisibleItemsAdd:(t,e)=>{q.current.includes(t)||(F.current.includes(t)||F.current.push(t),K.current.includes(e)||K.current.push(e)),W.current&&clearTimeout(W.current),W.current=setTimeout(()=>{F.current.length&&E({action_id:"collection_view",action_result:K.current,action_attributes_str:F.current,screen_type:"tvchannel"===T?"tv_channels":"main",screen_attributes_id:"tvchannel"===T?null==S?void 0:S.alias:"main",block_type:"collection",block_attributes_id:I||("movie"===C?"catchups_movies":"catchups_series"),action_attributes_num:p,block_attributes_index:p}),q.current=[...q.current,...F.current],F.current=[],K.current=[]},2e3)},screenType:"tvchannel"===T?"tv_channels":"main",isExpanded:x,main:k,...w},I):null}},56325:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>tZ});var i=s(74848),n=s(13368),a=s.n(n),l=s(96540),o=s(30291),r=s(74368),c=s(27116),_=s(46942),h=s.n(_),d=s(64945),u=s(14953),p=s.n(u),m=s(86715),v=s.n(m),g=s(63480),y=s(83386),b=s.n(y),T=s(97093),S=s(60025),P=s(54532),f=s(62763),x=s(35296),C=s(47819),I=s(98047),k=s(744),w=s(80364),j=s(68850),N=s(97461),D=s(24801),A=s.n(D),H=s(48398);let R={WITHOUT_TRIAL:"WITHOUT_TRIAL",WITH_TRIAL:"WITH_TRIAL",UNAUTHORIZED:"UNAUTHORIZED",UNAUTHORIZED_WITH_TRIAL:"UNAUTHORIZED_WITH_TRIAL"},E=(t,e)=>t%1?parseFloat(t)?"RUB"!==e?parseFloat(t).toFixed(2):parseFloat(t).toFixed(0):t:parseInt(t),U=(0,l.memo)(t=>{let{userType:e,currentChannel:s,chanelAlias:n,chanelUuid:a}=t,o=(0,r.wA)(),_=(0,w.A)(),h=(0,H.A)(),d=(0,j.A)(),u=(0,r.d4)(t=>t.systemInformation.windowInnerWidth),p=(0,r.d4)(t=>{var e;return null===(e=t.registration)||void 0===e?void 0:e.authData}),m=(0,r.d4)(t=>{var e;return null===(e=t.registration)||void 0===e?void 0:e.tariffs}),g=(0,r.d4)(t=>{var e;return null===(e=t.profile)||void 0===e?void 0:e.pendingSubscription}),y=(0,l.useMemo)(()=>(0,k.ZI)(u),[u]),b=(0,x.pK)(m),T=(0,x.k4)(m),S=E(null==T?void 0:T.price,null==T?void 0:T.currency)||c.WU,f=null==T?void 0:T.url,D=()=>{d({action_id:"click",event_version:"1.0",screen_type:"tv_player",screen_attributes_id:n,product_id:a,element_type:"try_free"}),v().push("/auth")},U=()=>{d({action_id:"click",event_version:"1.0",screen_type:"tv_player",screen_attributes_id:n,product_id:a,element_type:"show_more"});let{show:t,type:e}=(0,P.g5)(p,g);t?o((0,I.gb)({visible:!0,type:e})):f?(0,C.BA)({url:"".concat(_).concat(f).concat(h)}):console.error("There is no tariff for payment")},M="",L="";switch(e){case R.UNAUTHORIZED:M="ÐаÑегиÑÑÑиÑÑйÑеÑÑ Ð¸ ÑмоÑÑиÑе беÑплаÑно. Ðли оÑоÑмиÑе подпиÑÐºÑ START, ÑÑобÑ:",L="ÐаÑегиÑÑÑиÑÑйÑеÑÑ Ð¸ ÑмоÑÑиÑе беÑплаÑно";break;case R.UNAUTHORIZED_WITH_TRIAL:M=s.is_free?"ÐаÑегиÑÑÑиÑÑйÑеÑÑ Ð¸ ÑмоÑÑиÑе беÑплаÑно. Ðли оÑоÑмиÑе подпиÑÐºÑ START, ÑÑобÑ:":"СмоÑÑиÑе в подпиÑке START. ".concat(b," ").concat((0,x.jQ)(["денÑ","днÑ","дней"],b)," беÑплаÑно, поÑле â Ð¾Ñ 249 â½/меÑ. С подпиÑкой можно:"),L="ÐаÑегиÑÑÑиÑÑйÑеÑÑ Ð¸ ÑмоÑÑиÑе беÑплаÑно";break;case R.WITH_TRIAL:M=c._.TABLET===y?"СмоÑÑиÑе в подпиÑке START.<br />".concat(b," ").concat((0,x.jQ)(["денÑ","днÑ","дней"],b)," беÑплаÑно, поÑле â Ð¾Ñ ").concat(S," â½/меÑ.<br />С подпиÑкой можно:"):"СмоÑÑиÑе в подпиÑке START. ".concat(b," ").concat((0,x.jQ)(["денÑ","днÑ","дней"],b)," беÑплаÑно, поÑле â Ð¾Ñ ").concat(S," â½/меÑ. С подпиÑкой можно:"),L="СмоÑÑиÑе в подпиÑке START.<br />".concat(b," ").concat((0,x.jQ)(["денÑ","днÑ","дней"],b)," беÑплаÑно,<br />поÑле â Ð¾Ñ ").concat(S," â½/меÑ");break;case R.WITHOUT_TRIAL:M="Ðанал доÑÑÑпен в подпиÑке START. ÐÑоÑмиÑе по Ñене Ð¾Ñ ".concat(S," â½/меÑ. С подпиÑкой можно:"),L="Ðанал доÑÑÑпен в подпиÑке START.<br />ÐÑоÑмиÑе по Ñене Ð¾Ñ ".concat(S," â½/меÑ.")}let B=e===R.UNAUTHORIZED||e===R.UNAUTHORIZED_WITH_TRIAL?"/static/images/tv/stab-bg1.png":"/static/images/tv/stab-bg2.png";return(0,i.jsxs)("div",{className:A().container,style:{backgroundImage:'url("'.concat(B,'")')},children:[(0,i.jsx)("div",{className:A().title,dangerouslySetInnerHTML:{__html:e?M:""}}),(0,i.jsx)("div",{className:A().titleShort,dangerouslySetInnerHTML:{__html:e?L:""}}),e?(0,i.jsxs)("ul",{className:A().list,children:[(0,i.jsxs)("li",{className:A().item,children:[(0,i.jsx)("img",{src:"/static/images/tv/done.png",alt:"icon",className:A().icon}),(0,i.jsx)("span",{children:"ÑмоÑÑеÑÑ Ð²Ñе каналÑ: оÑ\xa0новоÑÑей до\xa0кино, ÑпоÑÑа и\xa0мод"})]}),(0,i.jsxs)("li",{className:A().item,children:[(0,i.jsx)("img",{src:"/static/images/tv/done.png",alt:"icon",className:A().icon}),(0,i.jsx)("span",{children:"полÑÑиÑÑ Ð´Ð¾ÑÑÑп к\xa0аÑÑ
Ð¸Ð²Ñ ÑÑиÑа и\xa0ÑилÑмам в\xa0запиÑи"})]}),(0,i.jsxs)("li",{className:A().item,children:[(0,i.jsx)("img",{src:"/static/images/tv/done.png",alt:"icon",className:A().icon}),(0,i.jsx)("span",{children:"ÑмоÑÑеÑÑ Ð²ÐµÑÑ ÐºÐ°Ñалог START: ÑеÑиалÑ, кино и\xa0мÑлÑÑÑилÑмÑ"})]})]}):null,e===R.UNAUTHORIZED?(0,i.jsx)(N.$n,{autoHeight:!0,title:"ÐÑоÑмиÑÑ Ð¿Ð¾Ð´Ð¿Ð¸ÑкÑ",onClick:D,testid:"watch_free_button"}):null,e===R.UNAUTHORIZED_WITH_TRIAL?(0,i.jsx)(N.$n,{autoHeight:!0,title:"ÐопÑобоваÑÑ ".concat(b," ").concat((0,x.jQ)(["денÑ","днÑ","дней"],b)," беÑплаÑно"),onClick:D,testid:"watch_free_button"}):null,e===R.WITHOUT_TRIAL?(0,i.jsx)(N.$n,{autoHeight:!0,title:"ÐÑоÑмиÑÑ Ð¿Ð¾Ð´Ð¿Ð¸ÑкÑ",onClick:U,testid:"more_button"}):null,e===R.WITH_TRIAL?(0,i.jsx)(N.$n,{autoHeight:!0,title:"ÐопÑобоваÑÑ ".concat(b," ").concat((0,x.jQ)(["денÑ","днÑ","дней"],b)," беÑплаÑно"),onClick:U,testid:"more_button"}):null]})});var M=s(41817),L=s(72202),B=s(37367),O=s.n(B);let V=t=>{let{isTipHidden:e=!0,children:s,text:n,tipClassName:a,triangleClassName:l}=t;return(0,i.jsxs)("div",{className:O().container,children:[s,e&&n&&(0,i.jsxs)("div",{className:h()(a,O().tip),children:[(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",className:h()(l,O().tip__triangle),viewBox:"0 0 20 8",children:(0,i.jsx)("path",{fill:"#1D1F23",d:"M20 8a4.697 4.697 0 0 1-3.55-1.618L11.8.837a2.352 2.352 0 0 0-3.599 0L3.598 6.325A4.696 4.696 0 0 1 0 8h20Z"})}),(0,i.jsx)("div",{className:O().tip__text,children:n})]})]})};var W=s(6321),F=s.n(W);let q={INLINE:"INLINE",INLINE_BIG:"INLINE_BIG",BUTTON:"BUTTON"},K={SUCCESS:"SUCCESS"},G=t=>{let{isActive:e,onClick:s}=t;return(0,i.jsx)(V,{tipClassName:F().tooltip,triangleClassName:F().tooltip__triangle,children:(0,i.jsx)("button",{className:F()["favorite-inline"],onClick:s,children:(0,i.jsx)("img",{src:"/static/images/icons/favorite".concat(e?"_active":"",".svg"),alt:"favorite",className:h()(F()["favorite-inline__icon"],{[F()["favorite-inline__icon_active"]]:e})})})})},z=t=>{let{isActive:e,onClick:s}=t;return(0,i.jsx)(V,{tipClassName:F()["tooltip-big"],triangleClassName:F()["tooltip-big__triangle"],children:(0,i.jsx)("button",{className:F()["favorite-inline-big"],onClick:s,children:(0,i.jsx)("img",{src:"/static/images/icons/favorite".concat(e?"_active":"",".svg"),className:h()(F()["favorite-inline-big__icon"],{[F()["favorite-inline-big__icon_active"]]:e}),alt:"favorite"})})})},Z=t=>{let{onClick:e,isActive:s}=t;return(0,i.jsx)(V,{text:s?"Ðз избÑанного":"РизбÑанное",children:(0,i.jsx)("button",{className:F().favorite,onClick:e,children:(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:h()(F().favorite__icon,{[F().favorite__icon_active]:s}),children:(0,i.jsx)("path",{stroke:"#f2f2f2",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.6",d:"M13.33 4.17H6.67C5.75 4.17 5 4.9 5 5.83v10.11a.83.83 0 0 0 1.3.7l3.24-2.17a.83.83 0 0 1 .92 0l3.24 2.17a.83.83 0 0 0 1.3-.7V5.84c0-.93-.75-1.67-1.67-1.67Z"})})})})},Y=t=>{let{type:e,channelId:s,clickHouseData:n}=t,a=(0,j.A)(),o=(0,r.wA)(),_=(0,w.A)(),h=(0,H.A)(),d=(0,M.A)(),u=(0,r.d4)(t=>{var e,s;return null===(s=t.profile)||void 0===s?void 0:null===(e=s.currentProfile)||void 0===e?void 0:e._id}),p=(0,r.d4)(t=>{var e;return null===(e=t.profile)||void 0===e?void 0:e.favoritesChanelIds}),m=(0,r.d4)(t=>{var e,s;return!(null===(s=t.registration)||void 0===s?void 0:null===(e=s.authData)||void 0===e?void 0:e.virtual)}),v=(0,l.useMemo)(()=>p.includes(s),[p,s]),g=async()=>{let t="".concat(_).concat(C.PI.profileFavoritesChannel).concat(u).
1concat(h,"&locale=").concat("ru","&content_lang=").concat("ru","&device_type=web"),e=await fetch(t,{credentials:"include"}),s=await e.json();if(e.ok&&d){var i;o((0,L.O5)(null==s?void 0:null===(i=s.data)||void 0===i?void 0:i.items))}},y=async()=>{if(u&&m){a({action_id:"click",action_result:"add",action_attributes_str:s,event_version:"1.0",element_type:"button",element_attributes_id:"add_favorites",...n}),o((0,L.k$)(s));let t="".concat(_).concat(C.PI.profileFavoritesChannel).concat(u).concat(h,"&locale=").concat("ru","&content_lang=").concat("ru","&device_type=web"),e=await fetch(t,{credentials:"include",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({profile_id:u,channel_id:s})}),i=await e.json();e.ok&&i.code===K.SUCCESS&&g()}else o((0,I.t0)({visible:!0,uid:s,background:!1,logotype:!1,badges:[]}))},b=async()=>{if(u&&m){o((0,L.xh)(s));let t="".concat(_).concat(C.PI.profileFavoritesChannel).concat(u).concat(h,"&locale=").concat("ru","&content_lang=").concat("ru","&device_type=web"),e=await fetch(t,{credentials:"include",method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({profile_id:u,channels:[s]})}),i=await e.json();e.ok&&i.code===K.SUCCESS&&g()}};if(!e)return null;let T={[q.INLINE_BIG]:z,[q.INLINE]:G,[q.BUTTON]:Z}[e];return(0,i.jsx)(T,{onClick:t=>{t.preventDefault(),t.stopPropagation(),v?(a({action_id:"click",action_result:"remove",action_attributes_str:s,event_version:"1.0",element_type:"button",element_attributes_id:"delete_favorites",...n}),b()):(y(),setTimeout(()=>{(0,c.RZ)("channel_to_favourite")},3e3))},isActive:v})};var Q=s(99221),X=s.n(Q);let J=t=>{let{poster:e,userAuthDataType:s}=t;return(0,i.jsxs)("div",{className:X().root,style:{backgroundImage:"url(".concat(e,")")},children:[(0,i.jsx)("div",{className:X().cover}),(0,i.jsxs)("div",{className:X().content,children:[(0,i.jsx)("img",{src:"/static/images/tv/no_geo.svg",alt:"no geo",className:X().icon}),(0,i.jsx)("div",{className:X().title,children:"Ð¢ÐµÐ»ÐµÐºÐ°Ð½Ð°Ð»Ñ Ð´Ð¾ÑÑÑÐ¿Ð½Ñ ÑолÑко в РоÑÑии"}),(0,i.jsx)("div",{className:X().description,children:"ÐÑли вклÑÑен\xa0VPN, оÑклÑÑиÑе\xa0его и\xa0обновиÑе ÑÑÑаниÑÑ."})]})]})};var $=s(58137),tt=s(9515),te=s(67265),ts=s(75756),ti=s(98126),tn=s(56673),ta=s(31083),tl=s(25091),to=s(61948),tr=s(65136),tc=s(76423),t_=s(4507),th=s(85299),td=s(91106),tu=s.n(td),tp=s(59465),tm=s.n(tp);class tv extends l.Component{componentDidMount(){this.handleActiveProgramProgress()}render(){var t,e,s,n,a,l,o,r,c,_,d,u,p,m,v,g,y,b,T;let{card:S,cardIdx:P,lineAlias:f,category:C,alias:I,cardsCount:k,noHover:w}=this.props,{activeLineWitdh:j,hoverSide:N}=this.state;return(0,i.jsx)(tu(),{prefetch:!1,href:"/channel/".concat(S.alias),id:"".concat(S.id,"_").concat(f),ref:this.cardRef,className:h()(tm().tvchannels__card,{[tm()["tvchannels__list-item"]]:this.props.inList,[tm().tvchannels__c]:C,[tm().tvchannels__selected]:I===S.alias,[tm().tvchannels__card__no_hover]:w}),onClick:t=>this.handleChannelClick(t,S),onMouseOver:this.setHoverSide,children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:tm().tvchannels__head,children:[(0,i.jsx)("img",{src:(null===(t=S.current_programs[0])||void 0===t?void 0:t.poster)?null===(e=S.current_programs[0])||void 0===e?void 0:e.poster:S.poster||S.poster_logo||"/static/images/tv/no_poster.svg",alt:""}),(0,i.jsx)("div",{className:tm().tvchannels__age,children:(null===(s=S.current_programs[0])||void 0===s?void 0:s.rating_age)?null===(n=S.current_programs[0])||void 0===n?void 0:n.rating_age:(null==S?void 0:S.rating_age)?null==S?void 0:S.rating_age:"18+"})]}),(0,i.jsx)("div",{className:tm().tvchannels__footer,children:(0,i.jsxs)("div",{className:tm().tvchannels__fTop,children:[(0,i.jsx)("div",{className:tm().tvchannels__logo,children:(0,i.jsx)("img",{src:S.logo||"/static/images/tv/no_logo.svg",alt:""})}),(0,i.jsx)("div",{className:tm().tvchannels__data,children:(null===(a=S.current_programs[0])||void 0===a?void 0:a.title)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:tm().tvchannels__title,children:this.getTitle(S.current_programs[0])}),(0,i.jsx)("div",{className:tm().tvchannels__time,children:(null===(l=S.current_programs)||void 0===l?void 0:l.length)?"".concat(S.current_programs[0].start_time," - ").concat(S.current_programs[0].stop_time):""})]}):(0,i.jsx)("div",{className:tm().tvchannels__title,children:this.getTitle(S)})})]})}),w?null:(0,i.jsxs)("div",{className:h()(tm().tvchannels__hover,{hover_left:"left"===N,hover_right:"right"===N,["".concat(tm().tvchannels__card_hover_left)]:"left"===N,["".concat(tm().tvchannels__card_hover_right)]:"right"===N}),onMouseEnter:this.props.onMouseEnter,onMouseMove:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:[(0,i.jsxs)("div",{className:tm().tvchannels__head,children:[(0,i.jsx)("img",{src:(null===(o=S.current_programs[0])||void 0===o?void 0:o.poster)?null===(r=S.current_programs[0])||void 0===r?void 0:r.poster:S.poster||S.poster_logo||"/static/images/tv/no_poster.svg",alt:""}),(0,i.jsx)("div",{className:tm().tvchannels__logo,children:(0,i.jsx)("img",{src:S.logo||"/static/images/tv/no_logo.svg",alt:""})}),(0,i.jsx)("div",{className:tm().tvchannels__line,children:(0,i.jsx)("div",{className:tm().tvchannels__aline,style:{width:"".concat(j,"%")}})})]}),(0,i.jsxs)("div",{className:tm().tvchannels__footer,children:[(null===(c=S.current_programs[0])||void 0===c?void 0:c.title)?(0,i.jsxs)("div",{className:tm().tvchannels__fTop,children:[(0,i.jsx)("div",{className:tm().tvchannels__fData,children:(0,i.jsxs)("div",{className:tm().tvchannels__data,children:[(0,i.jsx)("div",{className:tm().tvchannels__title,children:(0,x.cS)(this.getTitle(S.current_programs[0]),25)}),(0,i.jsx)("div",{className:tm().tvchannels__time,children:(null===(_=S.current_programs)||void 0===_?void 0:_.length)&&(null===(d=S.current_programs[0])||void 0===d?void 0:d.start_time)&&(null===(u=S.current_programs[0])||void 0===u?void 0:u.stop_time)?"".concat(null===(p=S.current_programs[0])||void 0===p?void 0:p.start_time," - ").concat(null===(m=S.current_programs[0])||void 0===m?void 0:m.stop_time):""})]})}),(0,i.jsx)("div",{className:tm().tvchannels__fData,children:(0,i.jsxs)("div",{className:tm().tvchannels__data,children:[(0,i.jsx)("div",{className:tm().tvchannels__title,children:(0,x.cS)(this.getTitle(S.current_programs[1]),25)}),(0,i.jsx)("div",{className:tm().tvchannels__time,children:(null===(v=S.current_programs)||void 0===v?void 0:v.length)&&(null===(g=S.current_programs[1])||void 0===g?void 0:g.start_time)&&(null===(y=S.current_programs[1])||void 0===y?void 0:y.stop_time)?"".concat(null===(b=S.current_programs[1])||void 0===b?void 0:b.start_time," - ").concat(null===(T=S.current_programs[1])||void 0===T?void 0:T.stop_time):""})]})})]}):(0,i.jsx)("div",{className:tm().tvchannels__fTop,style:{gridTemplateColumns:"auto"},children:(0,i.jsx)("div",{className:tm().tvchannels__fData,children:(0,i.jsx)("div",{className:tm().tvchannels__data,children:(0,i.jsx)("div",{className:"".concat(tm().tvchannels__title," ").concat(tm().tvchannels__title_epg),children:this.getTitle(S)})})})}),(0,i.jsxs)("div",{className:tm()["tvchannels__card-footer"],children:[(0,i.jsxs)("div",{className:tm().tvchannels__fBottom,onClick:this.handleButtonClick,children:[(0,i.jsx)("div",{className:tm().tvchannels__fImage,children:(0,i.jsx)("img",{src:"/static/images/tv/play.svg",alt:""})}),(0,i.jsx)("div",{className:tm().tvchannels__fText,children:S.is_free?"СмоÑÑеÑÑ Ð±ÐµÑплаÑно":"СмоÑÑеÑÑ"})]}),(0,i.jsx)(Y,{type:q.BUTTON,channelId:S.id,cardIdx:P})]})]})]})]})},"".concat(S.alias,"_").concat(P,"_tvchannels"))}constructor(...t){super(...t),this.state={l:!1,r:!1,activeLineWitdh:0,mlk_msisdn:(0,x.Ri)("mlk_msisdn"),hoverSide:""},this.apiUrl=this.props.systemInformation.API_URL||c.H$,this.apiKey=this.props.systemInformation.API_KEY||c.Lq,this.cardRef=l.createRef(),this.handleChannelClick=(t,e)=>{t.preventDefault();let s=()=>{let{card:t,cardIdx:e,lineAlias:s,lineIndex:i,checkTimer:n}=this.props,{clickHouseData:a}=this.props.systemInformation,l={...a,screen_type:"tv_player",screen_attributes_id:s,action_id:"click",block_type:"tv_collection",block_attributes_id:s,block_attributes_index:i+1,element_type:"tv_channel",element_attributes_id:t.alias,element_attributes_text:t.title,element_attributes_index:e+1,event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,l),n(),v().push("/channel/".concat(t.alias))};if(!(0,x.xM)(null==e?void 0:e.subscriptions,this.props.registration.subscriptionType)){s();return}let i=(null==e?void 0:e.rating_age)||"18+";(0,tt.j)({ratingAge:i,parentalControl:this.props.parentalControl,childProfile:this.props.profile.childProfile,dispatch:this.props.dispatch,successCallback:s})},this.handleButtonClick=()=>{let{card:t,cardIdx:e,lineAlias:s,lineIndex:i}=this.props,{clickHouseData:n}=this.props.systemInformation,a={...n,action_id:"click",action_attributes_num:e+1,action_attributes_str:"tv_channel",action_parameter:"hover",content_id:t.id,content_type:t.alias,block_type:"tv_collection",block_attributes_id:s,block_attributes_index:i+1,element_type:"button",element_attributes_id:"to_try_free",element_attributes_text:"СмоÑÑеÑÑ Ð±ÐµÑплаÑно",event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,a)},this.handleRedirect=()=>{var t;let{authData:e}=this.props.registration,{configExps:s}=this.props.systemInformation,i=(null==e?void 0:null===(t=e.ab)||void 0===t?void 0:t.length)&&(null==e?void 0:e.current_country_code)==="RU"&&s.length?(0,x.zS)(e.ab,s):"";fetch("".concat(this.apiUrl).concat(C.PI.getTariffs).concat(this.apiKey).concat(i),{credentials:"include",method:"GET"}).then(t=>{t.status<400&&t.json().then(t=>{this.props.fetchedTariffs(t);let e=t.find(t=>0==t.weight&&t.allow_trial);e&&(0,C.BA)({url:"".concat(this.apiUrl).concat(e.url).concat(this.apiKey)})})})},this.handleActiveProgramProgress=()=>{var t;let{card:e}=this.props;if(null==e?void 0:null===(t=e.current_programs)||void 0===t?void 0:t.length){let{start_time:t,stop_time:s}=e.current_programs[0],i=t.split(":"),n=s.split(":"),a=new Date,l=new Date;l.setHours(i[0],i[1],0);let o=new Date;o.setHours(n[0],n[1],0);let r=o.getTime()-l.getTime(),c=a.getTime()-l.getTime();this.setState({activeLineWitdh:(100*c/r).toFixed(2)})}},this.setHoverSide=()=>{var t;let e=this.cardRef.current.getBoundingClientRect(),s={hoverSide:""};(null==e?void 0:e.left)<(null==e?void 0:e.width)?s.hoverSide="left":(null===(t=window)||void 0===t?void 0:t.innerWidth)-(null==e?void 0:e.right)<(null==e?void 0:e.width)&&(s.hoverSide="right"),this.setState({...s})},this.getTitle=t=>(null==t?void 0:t.season_number)&&(null==t?void 0:t.episode_number)?"".concat(null==t?void 0:t.t
1itle,": ").concat(null==t?void 0:t.season_number," Ñезон, ").concat(null==t?void 0:t.episode_number," ÑеÑиÑ"):(null==t?void 0:t.season_number)&&!(null==t?void 0:t.episode_number)?"".concat(null==t?void 0:t.title,": ").concat(null==t?void 0:t.season_number," Ñезон"):!(null==t?void 0:t.season_number)&&(null==t?void 0:t.episode_number)&&(null==t?void 0:t.episode_number)!=="0"?"".concat(null==t?void 0:t.title,": ").concat(null==t?void 0:t.episode_number," ÑеÑиÑ"):null==t?void 0:t.title}}tv.defaultProps={inList:!1};let tg=(0,r.Ng)(t=>({parentalControl:t.parentalControl,profile:t.profile,registration:t.registration,systemInformation:t.systemInformation}),t=>({dispatch:t,...(0,g.zH)({clickHouseShoot:ti.Y3,fetchedTariffs:ts.ZI,toggleMegafonNoMoneyPopup:I.B9},t)}))(tv),ty={clickHouseShoot:ti.Y3};class tb extends l.Component{componentDidMount(){this.handleScroll(),window.addEventListener("scroll",this.handleScroll),(null===v()||void 0===v()?void 0:v().asPath)==="/tvchannels"&&this.setState({isTvchannelsMain:!0})}componentWillUnmount(){window.removeEventListener("scroll",this.handleScroll)}render(){let{data:t,lineIndex:e,alias:s,noHover:n,main:a,lineAlias:l,checkTimer:o}=this.props,{cardsCount:r}=this.props.tvchannels,{activeLine:c,activeIdx:_,isTvchannelsMain:h}=this.state;return t&&t.channels.length?(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__wrapper," ").concat(a?tm().main:""," ").concat(h?tm().tvchannels__wrapper__main:""),onMouseOver:()=>this.setActiveLine(!0),onMouseOut:()=>this.setActiveLine(!1),onFocus:()=>this.setActiveLine(!0),onBlur:()=>this.setActiveLine(!1),children:[h&&(0,i.jsx)("div",{className:tm().tvchannels__header,children:t.title}),(0,i.jsx)("div",{className:tm().tvchannels__slider,children:(0,i.jsx)(th.A,{widthCard:{desktop:n?242:238,mobile:128},heightCard:{desktop:192,mobile:104},cardIdent:16,active:c,items:t.channels,items_total:t.channels.length,lineIdx:"tv_channels",getMoreCards:this.getMoreCards,v2:!0,alias:l,arrowClick:this.arrowClick,currentChannel:s,channelsCatAlias:l,activeHover:this.state.activeHover,children:t.channels.map((l,c)=>(0,i.jsx)(tg,{card:l,cardIdx:c,cardsCount:r,lineAlias:t.alias,lineIndex:e,activeIdx:_,alias:s,main:a,noHover:n,onMouseEnter:()=>this.setState({activeHover:!0}),onMouseOver:()=>this.setState({activeHover:!0}),onMouseLeave:()=>this.setState({activeHover:!1}),className:tm().tvchannels__slider,checkTimer:o},"Slider_TVChannelsSlider_".concat(c,"_").concat(l.title)))})})]}):null}constructor(...t){super(...t),this.state={activeLine:!1,activeIdx:0,isTvchannelsMain:!1,activeHover:!1},this.apiUrl=this.props.systemInformation.API_URL||c.H$,this.apiKey=this.props.systemInformation.API_KEY||c.Lq,this.scrollTimeout=null,this.alreadyVisibleItemIds=new Set,this.arrowClick=()=>{let{activeIdx:t}=this.state;this.setState({activeIdx:t+1}),this.handleScroll()},this.getMoreCards=()=>{},this.setActiveLine=t=>{let{deviceData:e}=this.props.systemInformation;"desktop_web"===e&&this.setState({activeLine:t})},this.handleScroll=()=>{clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout(()=>{let{cardsCount:t}=this.props.tvchannels,{activeIdx:e}=this.state,s=[],i=[],{clickHouseData:n}=this.props.systemInformation,a=document.getElementById("main_header"),l=(null==a?void 0:a.getBoundingClientRect().height)||0,o=window.innerHeight,{data:r}=this.props,c=r.channels,_=t*e;if(!(c=c.slice(_,_+t))||!c.length)return null;for(let[t,e]of c.entries()){let n=e.id,a=document.getElementById("".concat(n,"_").concat(r.alias));if(!a)continue;let c=(Math.min(a.getBoundingClientRect().bottom,o)-Math.max(a.getBoundingClientRect().top,l))/a.getBoundingClientRect().height;c>.9&&(this.alreadyVisibleItemIds.has(n)||(s.push(e.alias),i.push(_+t+1)),this.alreadyVisibleItemIds.add(n)),c<.1&&this.alreadyVisibleItemIds.delete(n)}if(0!==s.length){let t={...n,action_id:"collection_view",action_result:i,action_attributes_num:this.props.lineIndex+1,action_attributes_str:s,block_type:"tv_collection",block_attributes_id:r.alias,block_attributes_index:this.props.lineIndex+1,event_time:new Date().getTime()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,t)}},2e3)}}}let tT=(0,r.Ng)(t=>({tvchannels:t.tvchannels,systemInformation:t.systemInformation}),ty)(tb);var tS=s(72859),tP=s(81341),tf=s(55918),tx=s(79831),tC=s(9397),tI=s(10318),tk=s.n(tI);let tw=t=>{let{channelAlias:e,onClick:s}=t,n=(0,r.d4)(t=>
1t.registration.tariffs),a=(0,tS.A)(),{paymentRedirect:l}=(0,tx.u)(),o=(0,tP.m)(),_=(0,j.A)(),h=(0,tf.j)(),d=(0,x.g6)(null,n);return(0,i.jsx)("div",{className:tk().root,children:(0,i.jsxs)("div",{className:tk().content,children:[(0,i.jsxs)("div",{className:tk().header,children:[(0,i.jsx)("div",{className:tk().header_title,children:tC.eX[tC.WG.TV]}),(0,i.jsx)("div",{className:tk().header_logo,children:"PREMIUM"})]}),a!==c._.MOBILE&&(0,i.jsxs)("div",{className:tk().price,children:[(0,i.jsxs)("div",{className:tk().price__amount,children:[(0,x.$g)(d),"\xa0⽠в\xa0меÑÑÑ"]}),(0,i.jsxs)("div",{className:tk().price__info,children:["ÐпÑÐ¸Ñ Ð´ÐµÐ¹ÑÑвÑÐµÑ Ñ\xa0паÑÑнÑÑÑкой подпиÑкой. Ðез\xa0подпиÑки Ð²Ñ Ð¿ÐµÑейдÑÑе на\xa0START\xa0PREMIUM за\xa0",(0,x.$g)(o),"\xa0â½\xa0в\xa0меÑÑÑ, ÑоÑ
Ñанив пÑеимÑÑеÑÑва"]})]}),(0,i.jsx)(N.$n,{size:h,variant:N.Vt.PRIMARY,title:a===c._.MOBILE?"СмоÑÑеÑÑ Ñ Premium":"ÐодклÑÑиÑÑ Premium",onClick:t=>{if(_({action_id:"click",screen_type:"tv_player",screen_attributes_id:e,element_type:"button",element_attributes_id:"buy_premium",element_attributes_text:t.currentTarget.textContent}),a===c._.MOBILE)(0,x.vB)({saveBackRoute:!0});else{let{origin:t,pathname:e}=window.location,s=(0,x.HW)(null,n);(0,x.TV)("selectedTariff",s._id),(0,x.TV)("returnUrl","".concat(t).concat(e)),(0,x.wP)(e),l({tariffUrl:s.url})}s&&s()}})]})})};var tj=s(11859),tN=s.n(tj);let tD=async t=>{let{apiUrl:e,apiKey:s,tz:i,body:n}=t,a=new URL("".concat(e).concat(C.PI.tvchannelFavorite).concat(s));a.searchParams.set("tz",i),a.searchParams.set("device_type","web");let l=await fetch(a,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(l.ok){let t=await l.json();if(t)return t}throw Error("fetchChannelsFavorites error")},tA=t=>t.filter(t=>{let{start_time:e,stop_time:s}=t,[i,n]=e.split(":"),[a,l]=s.split(":"),o=new Date;o.setHours(i,n,0,0);let r=new Date;
1return r.setHours(a,l,0,0),s<e&&r.setDate(r.getDate()+1),new Date().getTime()>=o.getTime()&&new Date().getTime()<=r.getTime()}),tH=p()(()=>Promise.all([s.e(7017),s.e(4326)]).then(s.bind(s,84326)),{loadableGenerated:{webpack:()=>[84326]}}),tR=p()(()=>Promise.all([s.e(1223),s.e(4589),s.e(8220)]).then(s.bind(s,18220)),{loadableGenerated:{webpack:()=>[18220]}}),tE=()=>{let{host:t}=window.location;return -1!==t.indexOf("stage.")||t===c.wK||Array.from(Array(10).keys()).some(e=>-1!==t.indexOf("dev".concat(e+1,".")))},tU={[c._.DESKTOP_WIDE]:{default:56,fullscreen:69},[c._.DESKTOP]:{default:56,fullscreen:69},[c._.TABLET]:{default:59,fullscreen:45},[c._.MOBILE]:{default:28,fullscreen:56}},tM={WITH_SUBSCRIPTION:"WITH_SUBSCRIPTION",WITHOUT_TRIAL:"WITHOUT_TRIAL",WITH_TRIAL:"WITH_TRIAL",UNAUTHORIZED:"UNAUTHORIZED",UNAUTHORIZED_WITH_TRIAL:"UNAUTHORIZED_WITH_TRIAL"},tL={Russian:"Ð ÑÑÑкий"},tB="startChannelsContainer",tO=l.memo(t=>{let{program:e,next:s,last:n}=t;return(0,i.jsx)("div",{className:"".concat(tm().tvchannels__tip," ").concat(tm().tvchannels__tipContent),children:(0,i.jsxs)("div",{className:tm().tvchannels__tipWrapper,children:[(0,i.jsxs)("div",{className:tm().tvchannels__tipTitle,children:[s?"СледÑÑÑаÑ":"ÐÑедÑдÑÑаÑ"," пеÑедаÑа"]}),(0,i.jsxs)("div",{className:tm().tvchannels__tipData,children:[(0,i.jsx)("div",{className:tm().tvchannels__tipPoster,children:(0,i.jsx)("img",{src:(null==e?void 0:e.poster)?null==e?void 0:e.poster:"/static/images/tv/empty.svg"})}),(0,i.jsxs)("div",{className:tm().tvchannels__tipInfo,children:[(0,i.jsxs)("div",{className:tm().tvchannels__tipHead,children:[e.is_catchup&&!n?(0,i.jsx)("img",{src:"/static/images/tv-schedule/catchup.svg",alt:"catchup"}):(0,i.jsx)("img",{src:"/static/images/startPlayer/broadcast-active.svg",alt:"current"}),(0,i.jsx)("div",{className:tm().tvchannels__tipName,children:e.title})]}),(0,i.jsx)("div",{className:tm().tvchannels__tipDescr,children:e.description}),(0,i.jsxs)("div",{className:tm().tvchannels__tipTime,children:[e.start_time," - ",e.stop_time]})]})]})]})})});class tV extends l.PureComponent{componentDidMount(){this._mounted=!0;let{router:t,category:e}=this.props,{selectedCategory:s}=this.props.tvchannels,{selectedTVcategory:i}=this.state;if(!i){var n,a;(null===(n=t.query)||void 0===n?void 0:n[to.uC])?this.props.setSelectedCategory(t.query[to.uC]):s?this.setCategoryAlias(s):(null===(a=t.query)||void 0===a?void 0:a[to.uC])||s||!e||this.setCategoryAlias(e)}this.setState({ssr:!1,devEnv:tE()}),document.addEventListener("fullscreenchange",()=>{this.setState({fullscreen:!!(document.fullscreen||document.fullscreenElement),isProgramShow:!1,isPlayerProgramPopupOpen:!1})}),document.addEventListener("webkitfullscreenchange",()=>{this.setState({fullscreen:!!document.webkitIsFullScreen,isProgramShow:!1,isPlayerProgramPopupOpen:!1})}),document.addEventListener("mozfullscreenchange",()=>{this.setState({fullscreen:!!document.mozFullScreen,isProgramShow:!1,isPlayerProgramPopupOpen:!1})}),document.addEventListener("msfullscreenchange",()=>{this.setState({fullscreen:!!document.msFullscreenElement,isProgramShow:!1,isPlayerProgramPopupOpen:!1})}),this.setCurrentDate();let l=window.innerWidth;l>1440&&this.setState({minWidth:"22.92vw"}),this.setState({browserWidth:l}),document.addEventListener("mousedown",this.handleClickOutside),window.addEventListener("resize",this.resizeHandler),window.addEventListener("message",t=>{try{let _=null;try{_=JSON.parse(t.data)}catch(t){}if(_){var e,s,i,n,a,l,o,r;let{captions:t,currentProgram:h,currentChannel:d}=this.state,{clickHouseData:u}=this.props.systemInformation;switch(_.event){case"advertsmodechange":this.setState({blockedControls:_.data.adverts,playing:!_.data.adverts});break;case"play":case"playing":this.setState({playing:!0});break;case"pause":case"paused":this.setState({playing:!1});break;case"volumechange":let p=parseFloat(null==_?void 0:null===(e=_.data)||void 0===e?void 0:e.volume),m=null==_?void 0:null===(s=_.data)||void 0===s?void 0:s.muted;this.setState({volume:p,muted:m,volumeIcon:m?"volume_mute":this.handleVolumeIcon(p),volumeIconControl:m?"mute":p>.7?"volume":p<=.7&&p>.4?"volume_normal":0==p?"mute":"volume_low"});break;case"requestfullscreen":this.setState({fullscreen:!0,isProgramShow:!1});break;case"exitfullscreen":this.setState({fullscreen:!1,isProgramShow:!1});break;case"statechange":switch(_.data.state){case"paused":this.setState({playing:!1});break;case"playing":this.setState({playing:!0})}break;case"playerinitstart":case"playerinitend":this.handleProgress(),this.deltaShooter();break;case"touchstart":case"touchend":case"touchmove":case"touchcancel":case"click":case"mouseover":case"mouseleave":case"mousemove":this.showControls();break;case"availablequalities":if(null==_?void 0:null===(i=_.data)||void 0===i?void 0:i.length){let t=[];null==_||_.data.map(e=>{let s=c.IA[e];t.push(s)}),t.length&&this.setState({qualities:t})}break;case"qualitychange":let{qualities:v}=this.state;if(v.length>1){let t=v.map(t=>({...t,active:t.q===(null==_?void 0:_.data)}));this.setState({qualities:t});let e={...u,action_id:"playback_quality",action_result:null==_?void 0:null===(n=_.data)||void 0===n?void 0:n.q,action_attributes_str:null==_?void 0:null===(a=_.data)||void 0===a?void 0:a.q,action_parameter:"manual",screen_type:"tv_player",screen_attributes_id:null==h?void 0:h.id,product_id:null==d?void 0:d.id,content_id:null==h?void 0:h.id,event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,e),this.setState({qualities:t})}break;case"availablecaptions":if((null==_?void 0:null===(l=_.data)||void 0===l?void 0:l.length)&&!t.length){let e=null==_?void 0:_.data.map(e=>{var s;return{label:tL[e.label]||e.label,track:e.track,active:!!(null===(s=t.find(t=>t.track===e.track))||void 0===s?void 0:s.active)}}),s=[{label:"Ðез ÑÑбÑиÑÑов",track:"off",active:!(null===(o=t.filter(t=>t.active))||void 0===o?void 0:o.length)},...e];this.setState({captions:s})}break;case"captionschange":if(t.length){let e=t.map(t=>({...t,active:t.track===((null==_?void 0:_.data)||"off")})),s=t.find(t=>t.active),i={...u,action_id:"playback_subtitles",action_result:null==_?void 0:null===(r=_.data)||void 0===r?void 0:r.track,action_attributes_str:null==s?void 0:s.track,action_parameter:"manual",screen_type:"tv_player",screen_attributes_id:null==h?void 0:h.id,product_id:null==d?void 0:d.id,content_id:null==h?void 0:h.id,event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,i),this.setState({captions:e})}}}}catch(t){console.error(">>>",t)}}),"visible"!==window.document.visibilityState&&(this.deltaPositionToShoot=0,this.setState({counterInner:1,counterOuter:0})),this.timerVideo=setTimeout(()=>{this.setState({threeMinutesVideoPlays:!0})},18e4),v().events.on("routeChangeStart",this.handleSameRoute)}componentDidUpdate(t,e){var s,i,n,a,l;let{alias:o,prevAlias:r,router:_}=this.props,{pinStatus:h}=this.props.parentalControl,{authData:d,tariffs:u,tariffsStatus:p,subscriptionType:m}=this.props.registration,{tvchannels:g,tvselection:y,selectedCategory:b}=this.props.tvchannels,{router:T}=t,{currentChannel:S,currentProgram:P,isPlayerProgramPopupOpen:f,isProgramShow:C,userAuthDataType:I,isVideoPlayerShow:k,isSuccessParentalControl:w}=this.state,{currentProgram:j,currentChannel:N}=e,D=h||(null==d?void 0:d.profile_for_child);if(d&&(P||S)&&D&&!this.isParentalControlChecked&&(this.isParentalControlChecked=!0,(0,x.xM)(S.subscriptions,m)?(0,tt.j)({ratingAge:(null==S?void 0:S.rating_age)||(null==P?void 0:P.rating_age)||"18+",childProfile:d.profile_for_child,parentalControl:this.props.parentalControl,dispatch:this.props.dispatch,successCallback:()=>{this.setState({isSuccessParentalControl:!0})},closeCallback:()=>{v().push("/channel")}}):this.setState({isSuccessParentalControl:!0})),d&&!this.loadAuth&&p!==c.Gd.IDLE&&p!==c.Gd.LOADING){this.loadAuth=!0;let t=null==d?void 0:d.virtual,e=(0,x.pK)(u),s=(0,x.EE)(null==d?void 0:d.trial_is_available,e),i=!!(null==d?void 0:null===(n=d.subscriptions)||void 0===n?void 0:n.length),a=(0,x.xM)(S.subscriptions,m),l=tM.UNAUTHORIZED;t?l=s?tM.UNAUTHORIZED_WITH_TRIAL:tM.UNAUTHORIZED:t||i?!t&&i&&(l=tM.WITH_SUBSCRIPTION):l=s?tM.WITH_TRIAL:tM.WITHOUT_TRIAL,this.setState({userAuthDataType:l,isGeoRu:"RU"===d.current_country_code,isStabGeoShow:"RU"!==d.current_country_code,isStabShow:"RU"===d.current_country_code&&(l===tM.UNAUTHORIZED||l===tM.UNAUTHORIZED_WITH_TRIAL||l===tM.WITHOUT_TRIAL&&!S.player&&!S.is_free||l===tM.WITH_TRIAL&&!S.player&&!S.is_free),isPremiumStabShow:!a,isVideoPlayerShow:a&&"RU"===d.current_country_code&&(l===tM.WITH_SUBSCRIPTION||(l===tM.WITHOUT_TRIAL||l===tM.WITH_TRIAL)&&S.stream&&S.is_free||l===tM.WITHOUT_TRIAL&&S.player||l===tM.WITH_TRIAL&&S.player)}),"test_tv_channel_in_cw"===(0,x.l3)((null==d?void 0:d.ab)||[],"tv_channel_in_cw")&&(0,$.vL)(null==d?void 0:d.profile_id,this.props.channel.i
1d)}if((null===(s=_.query)||void 0===s?void 0:s[to.uC])&&_.query[to.uC]!==(null===(i=T.query)||void 0===i?void 0:i[to.uC])&&this.props.setSelectedCategory(_.query[to.uC]),r&&r!==o&&this.prevAliasFlag!==r&&(this.prevAliasFlag=r,(null===(a=_.query)||void 0===a?void 0:a[to.uC])||this.setCategoryAlias(b),this.loadTV=!1,this.loadEpg=!1,this.channelLoadStatus=c.M1.IDLE,this.epgLoadStatus=c.M1.IDLE,this.isParentalControlChecked=!1,this.loadData(),this.player&&(this.playPause(),this.player=null),this.hls&&(this.hls.stopLoad(),this.hls.destroy(),this.hls=null),"test_tv_channel_in_cw"===(0,x.l3)((null==d?void 0:d.ab)||[],"tv_channel_in_cw")&&(0,$.vL)(null==d?void 0:d.profile_id,this.props.channel.id),this.makeTnsShoot(0)),document.getElementById("epg")&&!this.loadEpg){this.loadEpg=!0;let{height:t}=document.getElementById("programm").getBoundingClientRect(),{minFrameHeight:e}=this.state;e<t&&this.setState({minFrameHeight:t})}if((null==g?void 0:g.length)&&!(null==y?void 0:y.length)&&!this.loadTV){this.loadTV=!0;let t=[],e=-(new Date().getTimezoneOffset()/60);g.map((s,i)=>{fetch("".concat(this.apiUrl).concat(s.url).concat(this.apiKey,"&tz=").concat(e),{credentials:"include",method:"GET"}).then(e=>{e.status<400&&e.json().then(e=>{t.splice(i,0,e),this.props.fetchedTVSelection(t),this.setState({tvChannelsSliderData:t})})})})}this.player=document.getElementById("startChannels"),S&&(S.stream&&this.player||S.player)&&!this.loadChannel&&"boolean"!=typeof I&&k&&w&&(this.loadChannel=!0,this.wrapper=document.getElementById(tB),this.progress=document.getElementById("progress"),this.volumeBar=document.getElementById("volumeBar"),this.middle=document.getElementById("middle"),null===(l=this.middle)||void 0===l||l.addEventListener("dblclick",this.doubleClick),this.initialTs=(0,x.Ri)("tvChanelStartTs")||void 0,(0,x.Yj)("tvChanelStartTs",""),this.loadChannelFirst||(this.loadChannelFirst=!0,this.loadData())),j&&P&&JSON.stringify(j)!==JSON.stringify(P)&&this.player&&(this.player.currentTime=0),f&&this.checkDesktopDevice()&&this.setState({isPlayerProgramPopupOpen:!1}),C&&!this.checkDesktopDevice()&&this.setState({isProgramShow:!1}),S!==N&&this.setState({isPauseAllowed:(null==S?void 0:S.catchup_days)===0&&(null==S?void 0:S.stream)})}componentWillUnmount(){this.fetchCW(),this._mounted=!1,this.middle&&this.middle.removeEventListener("dblclick",this.doubleClick),clearTimeout(this.deltaTimer),clearTimeout(this.tnsTimer),this.tnsTimer=null,document.removeEventListener("mousedown",this.handleClickOutside),this.clearCategoryAlias(),this.checkTimer(),this.makeTnsShoot(0),v().events.off("routeChangeStart",this.handleSameRoute)}render(){var t,e,s;let{archive:n,breadcrumbs:a,date:o}=this.props,{selectedCategory:r}=this.props.tvchannels,{authData:_}=this.props.registration,{deviceSize:h,windowInnerWidth:d}=this.props.systemInformation,{epg:u,currentChannel:p,activeDate:m,notFound:v,currentProgram:g,broadcast:y,progress:b,userAuthDataType:S,ssr:P,isStabGeoShow:C,isVideoPlayerShow:I,isStabShow:k,isPremiumStabShow:w,selectedTVcategory:j,currentBroadcast:N,isSuccessParentalControl:D,tvChannelsSliderData:A}=this.state,H=this.isCurrentProgram(g);if(v)return(0,i.jsx)(T.A,{});if(!p)return(0,i.jsx)("div",{className:tm().tvchannels,children:(0,i.jsx)(tl.A,{})});let R=(0,x.Ri)("selectedTVcategory")||j||r||(null==p?void 0:null===(t=p.selections[0])||void 0===t?void 0:t.alias)||"",E=null==u?void 0:u.find(t=>t.date===m),M="ÐопÑлÑÑнÑе ÑилÑÐ¼Ñ Ð½Ð° ".concat(p.title),L="Test_tv_channels_line_down"===(0,x.l3)((null==_?void 0:_.ab)||[],"tv_channels_line_down")&&!(null==_?void 0:null===(e=_.subscriptions)||void 0===e?void 0:e.length)&&p.is_free;return(0,i.jsxs)("div",{className:tm().tvchannels,children:[(0,i.jsx)(ta.A,{breadcrumbs:a}),L?null:(0,i.jsxs)(i.Fragment,{children:[(null==_?void 0:_.profile_for_child)||P?null:(0,i.jsx)(t_.A,{alias:R,isChannel:!0,noTitle:!0,baseUrl:"/channel",selectCategory:this.handleCategorySelect}),(null==_?void 0:_.profile_for_child)?(0,i.jsx)("div",{className:tm().tvchannels__emptyPadding}):null,A&&!P?A.map(t=>{if(R===t.alias)return(0,i.jsx)(l.Fragment,{children:(0,i.jsx)(tT,{data:t,lineIndex:0,alias:p.alias,lineAlias:R,noHover:!0,main:!0,checkTimer:this.checkTimer})},"currentChannel_selections_".concat(t.alias))}):null]}),p?(0,i.jsxs)(i.Fragment,{children:[d<=c.xW[c._.TABLET]&&!P?null:(0,i.jsx)("h1",{className:tm().tvchannels__heading,"data-testid":"tv_channel_title",children:"".concat(p.title).concat((null==_?void 0:_.virtual)||!_?" - ÑмоÑÑеÑÑ Ð¾Ð½Ð»Ð°Ð¹Ð½":"").concat(o&&!H?" аÑÑ
ив Ð¾Ñ ".concat(o):"")}),(0,i.jsxs)("div",{className:tm().tvchannels__video,children:[(0,i.jsxs)("div",{children:[I&&D||P?this.renderVideoPlayer():null,w?(0,i.jsx)(tw,{channelAlias:null==p?void 0:p.alias}):null,k?(0,i.jsx)(U,{userType:S,currentChannel:p,chanelAlias:null==p?void 0:p.alias,chanelUuid:null==p?void 0:p.id}):null,C?(0,i.jsx)(J,{userType:S,poster:null==g?void 0:g.poster}):null]}),(0,i.jsx)("div",{className:tm().tvchannels__programm,id:"programm",children:(0,i.jsx)(tc.A,{epg:u,currentProgramTs:null==g?void 0:g.ts,onProgramClick:this.handleInitCatchup,channelRatingAge:p.rating_age,currentDay:y,currentBroadcastMain:N,onChangeCurrentDay:this.onProgramDayClick,type:to.oP.TV_CHANNEL,progress:b,dateString:o,channelAlias:null==p?void 0:p.alias,selectionAlias:r})}),(0,i.jsxs)("div",{className:tm().programmPopup,children:[(0,i.jsxs)("div",{className:tm().programmPopup__btn,onClick:this.onPopupProgramOpenClick,children:[(0,i.jsx)("img",{src:"/static/images/tv/program.svg",alt:"ÐÑогÑамма пеÑедаÑ"}),(0,i.jsx)("span",{children:"ÐÑогÑамма пеÑедаÑ"})]}),this.state.isProgramPopupOpen?(0,i.jsx)(tH,{isOpen:this.state.isProgramPopupOpen,channelAlias:p.alias,chanelTitle:p.title,epg:u,currentProgramTs:null==g?void 0:g.ts,isChannelTvFetching:!1,onProgramClick:this.onPopupProgramClick,onPopupClose:this.onPopupProgramCloseClick,channelRatingAge:p.rating_age,currentDay:E,onChangeCurrentDay:this.onPopupDayClick,progress:b,selectionAlias:r,fromCurrentChannel:!0}):null]}),"desktop_web"===h||P?(null===(s=p.description)||void 0===s?void 0:s.length)>400?this.renderDescription():(0,i.jsx)("span",{className:tm().tvchannels__description_short,children:p.description}):null]})]}):null,(null==n?void 0:n.items_total)&&!(null==_?void 0:_.profile_for_child)&&(null==_?void 0:_.current_country_code)==="RU"?(0,i.jsx)("div",{className:tm().tvarchive_line__wrap,children:(0,i.jsx)(f.default,{apiMethodField:"tvchannelv2",lineTitle:M,channelData:p,blockIdx:3,arrowClick:this.tvArchiveLineArrowClick,isOpenCardInPlayer:!0,onAllCardsShowed:this.tvArchiveLineShowAllCards,archiveData:n})}):null,L?(0,i.jsxs)(i.Fragment,{children:[(null==_?void 0:_.profile_for_child)||P?null:(0,i.jsx)(t_.A,{alias:R,isChannel:!0,isLineDownExp:!0,baseUrl:"/channel",selectCategory:this.handleCategorySelect}),(null==_?void 0:_.profile_for_child)?(0,i.jsx)("div",{className:tm().tvchannels__emptyPadding}):null,A&&!P?A.map(t=>{if(R===t.alias)return(0,i.jsx)(l.Fragment,{children:(0,i.jsx)(tT,{data:t,lineIndex:0,alias:p.alias,lineAlias:R,noHover:!0,main:!0})},"currentChannel_selections_".concat(t.alias))}):null]}):null]})}constructor(...t){var e,s,n;super(...t),e=this,this.state={isActiveLine:!1,cardsCount:0,visibleIndex:0,translateX:0,epg:this.props.epg,activeDate:null,currentProgramDate:null,day:new Date().getDate(),minFrameHeight:470,notFound:!1,minWidth:"320px",playing:!1,muted:!1,volume:1,volumeIcon:"volume_10",volumeIconControl:"volume",volumePosition:140,fullscreen:!1,broadcast:this.props.broadcast,currentBroadcast:null,currentProgram:this.props.currentProgram,currentChannel:this.props.channel,lastAvailable:null,visibleControls:!0,visibleControlsAge:!1,error:!1,selectedProgram:null,progress:null,visibleDescription:!1,devEnv:null,currentDate:null,progressHover:0,progressHoverValue:0,visibleProgressTip:!1,progressActive:0,progressDragging:!1,controlsHover:!1,mlk_msisdn:(0,x.Ri)("mlk_msisdn"),rewindSteps:0,visibleSpinner:!1,somethingWrongSubmitted:!1,isProgramShow:!1,isPlayerProgramPopupOpen:!1,isProgramPopupOpen:!1,browserWidth:0,hoverTvProgramDays:!1,isVolumeSetByUser:!1,tsDuration:0,startTsDuration:0,blockedControls:!1,vtvsdk:null,currentSourceTime:0,userAuthDataType:!0,ssr:!0,qualities:[c.IA.Auto],captions:[],selectedTVcategory:(0,x.Ri)("selectedTVcategory"),counterInner:1,counterOuter:0,threeMinutesVideoPlays:!1,isSuccessParentalControl:!1,isPremiumStabShow:!1,isPauseAllowed:!1,tvChannelsSliderData:(null===(s=this.props.tvchannels.tvselection)||void 0===s?void 0:s.length)?this.props.tvchannels.tvselection:(null===(n=this.props.selection)||void 0===n?void 0:n.length)?this.props.selection:[]},this._mounted=!1,this.apiUrl=this.props.systemInformation.API_URL||c.H$,this.apiKey=this.props.systemInformation.API_KEY||c.Lq,this.loadEpg=!1,this.loadTV=!1,this.loadAuth=!1,this.loadChannel=!1,this.loadChannelFirst=!1,this.volumeIconControl
1="volume",this.deltaTimer=null,this.tnsTimer=null,this.deltaPositionToShoot=0,this.firstRun=!1,this.catchupTimestamp=null,this.controlsTimeoutAge=null,this.volume=1,this.volumeIcon="volume_10",this.player=null,this.initialTs=(0,x.Ri)("tvChanelStartTs")||void 0,this.progressThumbAfter=0,this.controlsTimeout=null,this.settingsRef=null,this.prevAliasFlag=null,this.DELTA=3e4,this.ANIMATION_DURATION=600,this.epgLoadStatus=c.M1.IDLE,this.channelLoadStatus=c.M1.IDLE,this.isParentalControlChecked=!1,this.timerVideo=null,this.handleSameRoute=t=>{this.isSameRoute=window.location.pathname===t,this.isSameRoute&&(this.isParentalControlChecked=!1)},this.checkTimer=()=>{this.state.threeMinutesVideoPlays&&setTimeout(()=>{(0,c.RZ)("tv_channel_watch")},3e3),clearTimeout(this.timerVideo)},this.fetchCW=()=>{let{authData:t}=this.props.registration,{channel:e}=this.props,s="".concat(this.apiUrl).concat(C.PI.continueWatching).concat(this.apiKey,"&locale=ru&content_lang=ru");if(t&&(null==t?void 0:t.virtual)===!1){let i="test_tv_channel_in_cw"===(0,x.l3)((null==t?void 0:t.ab)||[],"tv_channel_in_cw");Promise.all([fetch(s,{credentials:"include"}).then(t=>t.json()),i&&(null==e?void 0:e.id)?tD({apiUrl:this.apiUrl,apiKey:this.apiKey,tz:-(new Date().getTimezoneOffset()/60),body:[e.id]}).then(t=>{let e=null==t?void 0:t[0];return e?(e.__cls="Channel",e.current_programs=tA(e.current_programs),e.current_programs.length?e:null):null}):Promise.resolve(null)]).then(t=>{let[e,s]=t;if(i){let t=e.items.filter(t=>(null==t?void 0:t.__cls)!=="Channel");e.items=s?[s,...t]:t}this.props.fetchedContinueWatching(e)}).catch(t=>{this.props.fetchContinueWatchingFail(t)})}},this.applyKeyboard=t=>{if("TEXTAREA"===t.target.tagName)return;let{isPauseAllowed:e}=this.state;if(!e)switch(t.keyCode){case 32:t.preventDefault(),t.stopPropagation(),this.playPause();break;case 39:t.preventDefault(),t.stopPropagation(),this.nexttenClick();break;case 37:t.preventDefault(),t.stopPropagation(),this.prevtenClick()}},this.makeTnsShoot=t=>{let{authData:e}=this.props.registration,{currentChannel:s}=this.state;if(!e||!(null==s?void 0:s.id))return;let i=encodeURIComponent(window.location),n=e._id?b()(e._id):null,a=Date.now(),l="".concat(c.Lp,"&rid=").concat(e.ruid||"","&type=").concat(1,"&idlc=").concat(s.id,"&fts=").concat(a,"&hid=").concat(n,"&urlc=").concat(i,"&view=").concat(t);try{fetch(l,{method:"GET",credentials:"include"}).catch(t=>{console.error("TvChannel::tnsShoot::ERROR",t)})}catch(t){console.error("TvChannel::tnsShoot::ERROR",t)}},this.tnsShooter=()=>{clearTimeout(this.tnsTimer),this.tnsTimer=null;let t=0,e=1,s=3e4,i=new Date().getTime(),n=()=>{clearTimeout(this.tnsTimer),this.tnsTimer=null;let a=50*t,l=new Date().getTime()-i;t+=1,l>=s&&(e+=1,s=3e4*e,this.makeTnsShoot(2)),this.tnsTimer=setTimeout(()=>{n()},50-(l-a))};this.tnsTimer=setTimeout(()=>{n()},50)},this.fetchSource=t=>{if(!this.player)return;let e=t;t&&10===t.toString().length&&(e=1e3*t);let s=new Date().getTime(),i=e&&e>=s?null:e;this.setState({currentSourceTime:e});let n=i?i.toString().length>10?Math.floor(i/1e3):i:null,{authData:a}=this.props.registration,{currentChannel:l}=this.state,o="".concat(this.apiUrl).concat(l.stream).concat(this.apiKey,"&auth_token=").concat(null==a?void 0:a.authentication_token).concat(i&&n?"&ts=".concat(n):"");this.player.currentTime=0,this.hls&&(this.hls.stopLoad(),this.hls.detachMedia(),this.hls.destroy(),this.hls=null),fetch(o,{method:"GET",credentials:"include"}).then(t=>{t.status<400?t.json().then(t=>{if(this.firstRun=!1,d.Ay.isSupported()){if(this.hls=new d.Ay,(t.hls_mbr||t.hls)&&(this.hls.loadSource(t.hls_mbr||t.hls),this.hls.attachMedia(this.player),this.hls.subtitleDisplay=!1,this.player)){let t=this.player.play();void 0!==t&&t.then(()=>{var t;null===this||void 0===this||null===(t=this.player)||void 0===t||t.play(),this.setState({playing:!0,visibleControlsAge:!0},()=>{this.setState({progressDragging:!1}),this.checkControlsTimeoutAge()}),this.tsDuration=n,this.startTsDuration=n,this.deltaPositionToShoot=0,this.deltaShoot(),this.deltaShooter(),this.makeTnsShoot(1),this.tnsShooter(),this.props.tvchannels.isVolumeSetByUser?(this.player.muted=this.state.muted,this.player.volume=this.state.volume):this.setState({muted:!0,volume:0,volumeIcon:"volume_mute",volumeIconControl:"mute",visibleMuteAutoplay:!0},()=>{this.player.muted=!0}
1)}),this.player.ontimeupdate=()=>{var t;this.state.progressDragging||this.handleProgress(),(null===this||void 0===this?void 0:null===(t=this.player)||void 0===t?void 0:t.currentTime)&&(this.tsDuration=this.startTsDuration+Math.floor(this.player.currentTime))},this.player.onerror=()=>{var t;this.setState({error:!0}),(null===(t=window)||void 0===t?void 0:t.plugin)&&window.plugin.fireStop()},this.player.onloadstart=()=>{let{visibleSpinner:t}=this.state;t||this.setState({visibleSpinner:!0})},this.player.onplaying=()=>{this.setState({visibleSpinner:!1})}}}else this.player.src=t.hls_mbr||t.hls}):t.json().then(t=>{switch(t.code){case"DEVICE_COUNT_EXCEEDED":this.props.toggleDevicesPopup(!0);break;case"DEVICE_NOT_REGISTERED":this.props.toggleDeletedDevicePopup(!0);break;case"USER_HAS_NO_SUBSCRIPTION":break;case"USER_HAS_FIN_BLOCK":this.props.toggleMegafonNoMoneyPopup(!0),this.setState({error:!0})}})})},this.getTVCategoryFromSearchParam=()=>new URLSearchParams(window.location.search).get(to.uC),this.setCategoryAlias=t=>{this.props.setSelectedCategory(t),(0,x.TV)("selectedTVcategory",t)},this.clearCategoryAlias=()=>{this.props.setSelectedCategory(null)},this.loadData=()=>{let{authData:t,subscriptionType:e}=this.props.registration,{alias:s}=this.props,{selectedCategory:i}=this.props.tvchannels,{userAuthDataType:n,vtvsdk:a}=this.state,l=-(new Date().getTimezoneOffset()/60),o="".concat(this.apiUrl).concat(C.PI.tvchannel).concat(s).concat(this.apiKey,"&tz=").concat(l);this.channelLoadStatus=c.M1.FETCHING,fetch(o,{credentials:"include",method:"GET"}).then(s=>{s.status<400?s.json().then(s=>{this.setState({currentChannel:s},()=>{if(this.channelLoadStatus=c.M1.FETCHED,-1===s.selections.findIndex(t=>t.alias===i||t.alias===this.getTVCategoryFromSearchParam())){var o;this.setCategoryAlias(null==s?void 0:null===(o=s.selections[0])||void 0===o?void 0:o.alias)}let r=(0,x.xM)(s.subscriptions,e);this.setState({isPremiumStabShow:!r,isVideoPlayerShow:r&&"RU"===t.current_country_code&&(n===tM.WITH_SUBSCRIPTION||(n===tM.WITHOUT_TRIAL||n===tM.WITH_TRIAL)&&s.stream&&s.is_free||(n===tM.WITHOUT_TRIAL||n===tM.WITH_TRIAL)&&s.player),isStabShow:"RU"===t.current_country_code&&(n===tM.UNAUTHORIZED||n===tM.UNAUTHORIZED_WITH_TRIAL||(n===tM.WITHOUT_TRIAL||n===tM.WITH_TRIAL)&&!s.player&&!s.is_free)}),s.player?this.loadVitrinaPlayer(s):(a&&(a.destroy(),this.setState({vtvsdk:null})),this.fetchSource(this.initialTs));let _="".concat(this.apiUrl).concat(s.epg).concat(this.apiKey,"&tz=").concat(l);this.epgLoadStatus=c.M1.FETCHING,fetch(_,{credentials:"include",method:"GET"}).then(t=>{t.status<400?t.json().then(t=>{var e;let s=this.getCurrent(t),i=t.find(t=>t.date===(null==s?void 0:s.date)),n=null==i?void 0:null===(e=i.programs)||void 0===e?void 0:e.filter((t,e,s)=>s.findIndex(e=>e.stop_time===t.stop_time)===e),a=null==n?void 0:n.map((t,e)=>({...t,position:e})).find(t=>{let e=Math.floor(new Date().getTime()/1e3),s=Math.floor(new Date("".concat(i.date,"T").concat(t.start_time,":00")).getTime()/1e3),n=Math.floor(new Date("".concat(i.date,"T").concat(t.stop_time,":00")).getTime()/1e3);return s<e&&e<n}),l={date:null==i?void 0:i.date,programs:n};if(this.setState({epg:t,activeDate:null==s?void 0:s.date,currentPlayDate:null==s?void 0:s.date,visibleIndex:t.findIndex(t=>t.date===(null==s?void 0:s.date)),selectedProgram:null==a?void 0:a.position,currentProgram:a,broadcast:l},()=>{null==n||n.map((t,e)=>this.handleCurrent(t,e)),this.epgLoadStatus=c.M1.FETCHED}),this.loadChannel=!1,this.initialTs){let e=t.reduce((t,e,s)=>t=[...t,...e.programs.map(t=>({...t,date:e.date,position:s}))],[]).find(t=>t.ts===parseInt(this.initialTs,10)||t.actual_start_ts===parseInt(this.initialTs,10));e&&this.setState({activeDate:e.date,currentPlayDate:e.date,visibleIndex:t.findIndex(t=>t.date===e.date),currentProgram:e,selectedProgram:e.position,broadcast:t.find(t=>t.date===e.date)},()=>{this.catchupTimestamp=this.initialTs,this.progressThumbAfter=0}),this.initialTs=void 0}}):this.epgLoadStatus=c.M1.ERROR})})}):(this.channelLoadStatus=c.M1.ERROR,this.setState({notFound:!0}))})},this.loadVitrinaPlayer=t=>{let{authData:e,subscriptionType:s}=this.props.registration,{currentChannel:i,userAuthDataType:n}=this.state,a=(0,x.xM)(t.subscriptions,s);this.setState({isPremiumStabShow:!a,isVideoPlayerShow:a&&"RU"===e.current_country_code&&(n===tM.WITH_SUBSCRIPTION||(n===tM.WITHOUT_TRIAL||n===tM.WITH_TRIAL)&&i.stream&&i.is_free||(n===tM.WITHOUT_TRIAL||n===tM.WITH_TRIAL)&&i.player),isStabShow:"RU"===e.current_country_code&&(n===tM.UNAUTHORIZED||n===tM.UNAUTHORIZED_WITH_TRIAL||(n===tM.WITHOUT_TRIAL||n===tM.WITH_TRIAL)&&!i.player&&!i.is_free)},()=>{if("undefined"!=typeof VitrinaTVSDK&&this.state.isVideoPlayerShow&&this.state.isSuccessParentalControl){var e;this.setState({playing:!0});let s=new VitrinaTVSDK(tB,t.player,null===(e=t.tokens)||void 0===e?void 0:e.web,{useControls:!1});s&&(this.state.vtvsdk&&this.state.vtvsdk.destroy(),window.vtvsdk=s,this.setState({vtvsdk:s},()=>{s.createPlayer(),s.sendMessage("getquality"),s.sendMessage("getavailablequalities"),s.sendMessage("getavailablecaptions")}))}}),setTimeout(()=>{this.deltaShoot(),this.deltaShooter()},5e3)},this.getCurrent=t=>{let e=null,{date:s}=this.props,{day:i}=this.state,n=new Date,a=n.getMonth()+1;a<10&&(a="0".concat(a));let l=n.getFullYear().toString(),o=s||"".concat(l,"-").concat(a,"-").concat(i<10?"0".concat(i):i);return t.map(t=>{o===t.date&&(e=t)}),e},this.fetchTariifs=t=>{if(t)this.handleTariffPay(t);else{var e;let{authData:t}=this.props.registration,{configExps:s}=this.props.systemInformation,i=(null==t?void 0:null===(e=t.ab)||void 0===e?void 0:e.length)&&(null==t?void 0:t.current_country_code)==="RU"&&s.length?(0,x.zS)(null==t?void 0:t.ab,s):"";fetch("".concat(this.apiUrl).concat(C.PI.getTariffs).concat(this.apiKey).concat(i),{credentials:"include",method:"GET"}).then(t=>{t.status<400&&t.json().then(t=>{this.props.fetchedTariffs(t),this.handleTariffPay(t[0].url)})})}},this.handleTariffPay=t=>{(0,C.BA)({url:"".concat(this.apiUrl).concat(t).concat(this.apiKey),errorCallback:()=>{this.setState({error:!0})}})},this.handleDateSelect=(t,e,s)=>{var i;let{epg:n,currentChannel:a}=this.state,{historyReplaced:l}=this.props,o=n.find(e=>e.date===t),r=null==o?void 0:null===(i=o.programs)||void 0===i?void 0:i.filter((t,e,s)=>s.findIndex(e=>e.stop_time===t.stop_time)===e),c={date:null==o?void 0:o.date,programs:r};this.setState({activeDate:t,visibleIndex:s,broadcast:c,currentBroadcast:o});let{clickHouseData:_}
1=this.props.systemInformation,h={..._,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==a?void 0:a.alias,block_type:"tv_schedule",block_attributes_id:e,element_type:"button",element_attributes_id:"tv_schedule_day",element_attributes_text:(0,tr.Z)(t),element_attributes_index:parseInt(s+1),event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,h);let d=(0,x.sq)();window.history.replaceState(window.history.state,document.title,"/channel/".concat(null==a?void 0:a.alias).concat(d===t?"":"/".concat(t))+window.location.search),l&&l()},this.tvArchiveLineArrowClick=(t,e,s,i,n)=>{let{currentChannel:a}=this.state,{clickHouseData:l}=this.props.systemInformation,o={...l,block_type:"collection",block_attributes_id:"catchups",screen_attributes_id:a.alias,screen_type:"tv_channels",element_type:"button",element_attributes_id:t?"arrow_right":"arrow_left",element_attributes_index:n,action_id:"click",event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,o)},this.tvArchiveLineShowAllCards=()=>{let{currentChannel:t}=this.state,{clickHouseData:e}=this.props.systemInformation,s={...e,action_id:"click",screen_type:"tv_channels",screen_attributes_id:t.alias,block_type:"collection",block_attributes_id:"catchups",element_type:"button",element_attributes_id:"show_more",event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,s)},this.handleCurrent=(t,e)=>{if(!t)return;let{activeDate:s,day:i,currentChannel:n,currentProgram:a,selectedProgram:l,lastAvailable:o}=this.state;if((l===e||null===l)&&s){if(i!==parseInt(s.split("-")[2]))return!1;let{start_time:l,stop_time:o}=t,r=l.split(":"),c=o.split(":"),_=new Date,h=new Date(s);h.setHours(r[0],r[1],0);let d=new Date(s);d.setHours(c[0],c[1],0);let{deviceData:u}=this.props.systemInformation;if(_>=h&&_<d){if(JSON.stringify(a)!==JSON.stringify(t)&&"desktop_web"===u){let t=document.getElementById("broadcast"),s=document.getElementById("".concat(n.id,"_").concat(e));if(t&&s){let{height:e}=s&&s.getBoundingClientRect(),i=null==s?void 0:s.offsetTop,n=null==t?void 0:t.offsetTop;t.scrollTo({top:i-n-2*e,behavior:"smooth"})}}return"current"}if(_>d)return"past"}},this.handleProgrammTitle=(t,e)=>{if(!t||!e)return;let{fullscreen:s}=this.state,{deviceSize:i}=this.props.systemInformation,n=tU[i][s?1:0],a="".concat(t.title,": ").concat(e.title);return a.length>n&&(a="".concat(a.substring(0,n),"...")),a},this.checkControlsTimeout=()=>{let{playing:t}=this.state;t&&(clearTimeout(this.controlsTimeout),this.controlsTimeout=setTimeout(()=>{this.state.progressDragging||this.setState({visibleControls:!1})},2500))},this.checkControlsTimeoutAge=()=>{let{playing:t}=this.state;t&&(clearTimeout(this.controlsTimeoutAge),this.controlsTimeoutAge=setTimeout(()=>{this._mounted&&this.setState({visibleControlsAge:!1})},8e3))},this.showControls=t=>{let{vtvsdk:e}=this.state,{renderMobile:s}=this.props.systemInformation;this.controlsTimeout&&!e&&(clearTimeout(this.controlsTimeout),this.controlsTimeout=null,this.setState({visibleControls:!0}),t&&t.target&&this.wrapper&&this.wrapper.contains(t.target)&&this.checkControlsTimeout()),e&&(this.setState({visibleControls:!0}),clearTimeout(this.controlsTimeout),this.controlsTimeout=null,s||this.checkControlsTimeout())},this.handlePrevClick=t=>{let{selectedProgram:e,currentChannel:s}=this.state,{authData:i}=this.props.registration,{clickHouseData:n}=this.props.systemInformation;t&&(0,tt.j)({ratingAge:t.rating_age,childProfile:i.profile_for_child,parentalControl:this.props.parentalControl,dispatch:this.props.dispatch,successCallback:()=>{this.handleInitCatchup(t,e-1,!1,!1,!1);let i={...n,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==s?void 0:s.alias,element_type:"button",element_attributes_id:"previous",event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,i)}})},this.handleNextClick=t=>{let{selectedProgram:e,currentChannel:s}=this.state,{authData:i}=this.props.registration,{clickHouseData:n}=this.props.systemInformation;t&&(0,tt.j)({ratingAge:t.rating_age,childProfile:i.profile_for_child,parentalControl:this.props.parentalControl,dispatch:this.props.dispatch,successCallback:()=>
1{this.handleInitCatchup(t,e+1,!1,!1,!1);let i={...n,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==s?void 0:s.alias,element_type:"button",element_attributes_id:"next",event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,i)}})},this.isFullScreen=()=>!!(document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement),this.isFullscreenAvailable=()=>{if(this.wrapper){if(this.wrapper.requestFullscreen||this.wrapper.mozRequestFullScreen||this.wrapper.webkitRequestFullScreen||this.wrapper.msRequestFullscreen)return!0;this.player&&this.player.webkitSupportsFullscreen}return!1},this.onCrossClick=()=>{let{clickHouseData:t}=this.props.systemInformation,{currentChannel:e,currentProgram:s}=this.state;this.setState({fullscreen:!1,isProgramShow:!1},()=>{document.removeEventListener("keydown",this.applyKeyboard),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen();let i={...t,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==e?void 0:e.alias,product_id:null==e?void 0:e.id,content_id:null==s?void 0:s.ts,element_type:"button",element_attributes_id:"cross",event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,i),this.makeTnsShoot(0)})},this.fullscreenClick=()=>{let{clickHouseData:t}=this.props.systemInformation,{currentChannel:e,currentProgram:s,vtvsdk:i,fullscreen:n}=this.state,a={...t,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==e?void 0:e.alias,product_id:null==e?void 0:e.id,content_id:null==s?void 0:s.ts,element_type:"button",event_time:Date.now()};this.isFullScreen()?(this.setState({fullscreen:!1,isProgramShow:!1},()=>{document.removeEventListener("keydown",this.applyKeyboard),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():i.sendMessage("exitfullscreen"),clearTimeout(this.tnsTimer),this.tnsTimer=null,this.makeTnsShoot(0)}),a.element_attributes_id="exit_full_screen"):(this.setState({fullscreen:this.isFullscreenAvailable(),isProgramShow:!1},()=>{this.wrapper&&(document.addEventListener("keydown",this.applyKeyboard),this.wrapper.requestFullscreen?this.wrapper.requestFullscreen():this.wrapper.mozRequestFullScreen?this.wrapper.mozRequestFullScreen():this.wrapper.webkitRequestFullScreen?this.wrapper.webkitRequestFullScreen():this.wrapper.msRequestFullscreen?this.wrapper.msRequestFullscreen():this.player&&this.player.webkitSupportsFullscreen?this.player.webkitEnterFullscreen():i.sendMessage("requestfullscreen"))}),a.element_attributes_id="full_screen"),this.props.clickHouseShoot(this.apiUrl,this.apiKey,a)},this.playPause=()=>{let{clickHouseData:t}=this.props.systemInformation,{playing:e,currentChannel:s,currentProgram:i,vtvsdk:n,isPauseAllowed:a}=this.state;a||(clearTimeout(this.deltaTimer),clearTimeout(this.tnsTimer),this.setState({playing:!e},()=>{let e={...t,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==s?void 0:s.alias,product_id:null==s?void 0:s.id,content_id:null==i?void 0:i.ts,element_type:"button",element_attributes_id:this.state.playing?"play":"pause",event_time:Date.now()};if(this.props.clickHouseShoot(this.apiUrl,this.apiKey,e),this.state.playing){try{this.player?this.player.play():n&&n.sendMessage("play",{}),this.setState({visibleControlsAge:!0})}catch(t){console.warn(">>> play",t)}this.firstRun||(this.firstRun=!0,this.deltaShoot()),this.makeTnsShoot(1),this.tnsShooter(),this.deltaShooter(),this.checkControlsTimeout(),this.checkControlsTimeoutAge()}else{try{this.player?this.player.pause():n&&n.sendMessage("pause",{})}catch(t){console.warn(">>> pause",t)}this.catchupTimestamp=new Date().getTime(),this.makeTnsShoot(3),this.deltaShoot(),this.showControls()}}))},this.handleInitCatchup=function(t,s,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=!(arguments.length>4)||void 0===arguments[4]||arguments[4],{currentChannel:l,userAuthDataType:o}=e.state,{authData:r}
1=e.props.registration,c=e.props.profile.pendingSubscription;if((null==r?void 0:r.current_country_code)!=="RU")return;let{show:_,type:h}=(0,P.g5)(r,c);if(_&&!l.player){e.props.toggleSubscriptionOfferPopup({visible:!0,type:h});return}if(o===tM.UNAUTHORIZED||o===tM.UNAUTHORIZED_WITH_TRIAL){v().push("/auth");return}if(l.player&&o===tM.WITH_TRIAL||o===tM.WITHOUT_TRIAL)return;if(o===tM.WITH_TRIAL||o===tM.WITHOUT_TRIAL){var d;let{configExps:t}=e.props.systemInformation,s=(null==r?void 0:null===(d=r.ab)||void 0===d?void 0:d.length)&&(null==r?void 0:r.current_country_code)==="RU"&&t.length?(0,x.zS)(null==r?void 0:r.ab,t):"";fetch("".concat(e.apiUrl).concat(C.PI.getTariffs).concat(e.apiKey).concat(s),{credentials:"include",method:"GET"}).then(t=>{t.status<400&&t.json().then(t=>{e.props.fetchedTariffs(t);let s=t.find(t=>0==t.weight&&t.allow_trial);s&&(0,C.BA)({url:"".concat(e.apiUrl).concat(s.url).concat(e.apiKey)})})});return}if(!t.is_catchup)return;let u=t.actual_start_ts||t.ts;10==="".concat(u).length&&(u*=1e3),e.player&&(e.player.pause(),e.makeTnsShoot(0)),e.setState({currentProgram:t,selectedProgram:s},()=>{e.catchupTimestamp=u,e.progressThumbAfter=0,e.fetchSource(u)});let{clickHouseData:p}=e.props.systemInformation,{alias:m}=e.props,g=new Date(1e3*u),y=10>g.getDate()?"0".concat(g.getDate()):g.getDate(),b=g.getMonth()+1<10?"0".concat(g.getMonth()+1):g.getMonth()+1,T=g.getFullYear(),S={...p,action_id:"click",action_result:"".concat(T,"-").concat(b,"-").concat(y),screen_type:"tv_player",screen_attributes_id:m,block_type:"tv_collection",block_attributes_id:m,is_current:i,element_type:"tv_program",element_attributes_id:t.is_catchup?"catchup":"not_catchup",element_attributes_text:t.title,element_attributes_index:s,event_time:Date.now()};n&&(S.action_id="click"),a&&e.props.clickHouseShoot(e.apiUrl,e.apiKey,S)},this.handleProgramClick=(t,e,s,i)=>{if(!e.is_catchup)return;let n=e.actual_start_ts||e.ts;this.player.pause(),this.setState({isProgramShow:!this.state.isProgramShow,currentProgram:e,selectedProgram:s,activeDate:t},()=>{this.catchupTimestamp=n,this.progressThumbAfter=0,this.fetchSource(n)});let{clickHouseData:a}=this.props.systemInformation,{alias:l}=this.props,o=new Date(1e3*n),r=10>o.getDate()?"0".concat(o.getDate()):o.getDate(),c=o.getMonth()+1<10?"0".concat(o.getMonth()+1):o.getMonth()+1,_=o.getFullYear(),h={...a,action_id:"click",action_result:"".concat(_,"-").concat(c,"-").concat(r),screen_type:"tv_player",screen_attributes_id:l,block_type:"tv_schedule",block_attributes_id:l,is_current:i,element_type:"tv_program",element_attributes_id:e.is_catchup?"catchup":"not_catchup",element_attributes_text:e.title,event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,h)},this.volumeThumbGet=()=>{this.setState({volumeDragging:!0})},this.volumeThumbSet=()=>{this.setState({volumeDragging:!1})},this.handleVolumeIcon=t=>{let e=10,s=parseFloat(t);switch(!0){case s>.9:e=10;break;case s>.8&&s<=.9:e=9;break;case s>.7&&s<=.8:e=8;break;case s>.6&&s<=.7:e=7;break;case s>.5&&s<=.6:e=6;break;case s>
1.4&&s<=.5:e=5;break;case s>.3&&s<=.4:e=4;break;case s>.2&&s<=.3:e=3;break;case s>.1&&s<=.2:e=2;break;case s>0&&s<=.1:e=1;break;default:e="mute"}return"volume_".concat(e)},this.volumeThumbMove=t=>{if(this.volumeBar=document.getElementById("volumeBar"),this.state.volumeDragging&&this.volumeBar){t.preventDefault(),t.stopPropagation(),this.showControls();let{top:e,height:s}=this.volumeBar.getBoundingClientRect(),i=window.innerHeight-e-s,n=window.innerHeight-(t.clientY||t.touches[0].clientY)-i;n>s&&(n=s),n<0&&(n=0);let a=n/s;if(this.volume=a,a>0){let{vtvsdk:t}=this.state;this.player&&(this.player.muted=!1),t&&t.sendMessage("setmuted",!1),this.setState({muted:!1})}this.setState({volume:a,volumeIcon:this.handleVolumeIcon(a),volumeIconControl:a>.7?"volume":a<=.7&&a>.4?"volume_normal":0==a?"mute":"volume_low",volumePosition:n},()=>{this.updateVolumeData(!0);let{vtvsdk:t}=this.state;t&&t.sendMessage("setvolume",parseFloat(a))})}},this.volumeBarClick=t=>{t.stopPropagation(),this.volumeBar=document.getElementById("volumeBar");let{top:e,height:s}=this.volumeBar.getBoundingClientRect(),i=window.innerHeight-e-s,n=window.innerHeight-t.clientY-i;n>s&&(n=s),n<0&&(n=0);let a=n/s;if(this.volume=a,a>0){let{vtvsdk:t}=this.state;this.player&&(this.player.muted=!1),t&&t.sendMessage("setmuted",!1)}this.setState({volume:a,volumeIcon:this.handleVolumeIcon(a),volumeIconControl:a>.7?"volume":a<=.7&&a>.4?"volume_normal":0==a?"mute":"volume_low",volumePosition:n},()=>{this.updateVolumeData(!0)})},this.updateVolumeData=t=>{let{vtvsdk:e}=this.state;this.player&&(this.player.volume=this.state.volume),e&&e.sendMessage("setvolume",this.state.volume),this.volumeIcon=this.state.volumeIcon,this.volumePosition=this.state.volumePosition,this.props.setUserTVChannelsVolume(!0),t||(this.animationTimeout=setTimeout(()=>{this.setState({changeVolumeState:!1})},this.ANIMATION_DURATION))},this.muteClick=t=>{let{currentProgram:e,currentChannel:s,vtvsdk:i,volume:n,muted:a}=this.state,{clickHouseData:l}=this.props.systemInformation;if(this.player){let e=this.player.muted;this.setState({muted:!e,volume:e?i?1:this.volume:0,volumeIcon:e?i?"volume_10":this.volumeIcon:"volume_mute",volumeIconControl:e?this.volumeIconControl:"mute",visibleMuteAutoplay:t},()=>{this.player.muted=this.state.muted,this.updateVolumeData(!0)})}i&&(i.sendMessage("setmuted",!a),i.sendMessage("setvolume",a?n||1:0),this.setState({muted:!a,volumePosition:a?140:0}));let o={...l,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==s?void 0:s.alias,product_id:null==s?void 0:s.id,content_id:null==e?void 0:e.ts,element_type:"button",element_attributes_id:a?"unmute":"mute",event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,o)},this.handleProgress=()=>{let{currentProgram:t,selectedProgram:e,broadcast:s,currentPlayDate:i}=this.state;if(!t)return;let{start_time:n,stop_time:a}=t,l=n.split(":"),o=a.split(":"),r=(null==t?void 0:t.actual_start_ts)||(null==t?void 0:t.ts);10==="".concat(r).length&&(r*=1e3);let c=new Date().getTime(),_=r>c,h=new Date(_?c:r);h.setHours(l[0],l[1],0);let d=new Date(r);d.setHours(o[0],o[1],0);let u=(0,x.d4)(h,d)||_,p="";if(u){let t=new Date(i);t.setHours(new Date().getHours()),t.setMinutes(new Date().getMinutes()),t.setSeconds(new Date().getSeconds()),t.setMilliseconds(new Date().getMilliseconds());let e=Math.abs(t.getTime()-h.getTime()),s=Math.abs(d.getTime()-h.getTime());p="".concat(Math.round(t.getTime()>=h.getTime()&&t.getTime()<d.getTime()?e/s*100:0),"%"),this.progressThumbPos=t.getTime()>=h.getTime()&&t.getTime()<d.getTime()?e/s*100:0}else{let t=Math.abs((d.getTime()-h.getTime())/1e3),e=this.progressThumbAfter+this.player.currentTime;p="".concat(Math.round(e/t*100),"%"),this.progressThumbPos=e/t*100}"100%"===p&&this.setState({selectedProgram:e+1,currentProgram:null==s?void 0:s.programs[e+1]},()=>{var t,i;this.progressThumbPos=0,this.progressThumbAfter=0;let n=(null==s?void 0:null===(t=s.programs[e+1])||void 0===t?void 0:t.actual_start_ts)||(null==s?void 0:null===(i=s.programs[e+1])||void 0===i?void 0:i.ts);this.fetchSource(n)}),this.setState({progress:p})},this.doubleClick=()=>{this.fullscreenClick()},this.deltaShooter=()=>{clearTimeout(this.deltaTimer),this.deltaTimer=null;let t=0,e=1,s=this.DELTA,i=new Date().getTime(),n=()=>{clearTimeout(this.deltaTimer),this.deltaTimer=null;let a=50*t;this.deltaPositionToShoot=new Date().getTime()-i,t+=1,this.deltaPositionToShoot>=s&&(e+=1,s=this.DELTA*e,this.deltaPositionToShootTicks=e,this.deltaShoot());let l=this.deltaPositionToShoot-a;this.deltaTimer=setTimeout(()=>{n()},50-l)};this.deltaTimer=setTimeout(()=>{n()},50)},this.deltaShoot=()=>{if((this.channelLoadStatus===c.M1.FETCHED||this.epgLoadStatus===c.M1.FETCHED)&&(this.setState({counterOuter:this.state.counterOuter+1}),this.state.counterOuter===this.state.counterInner)){var t;let{authData:{_id:e,profile_id:s}}
1=this.props.registration,{currentChannel:i,currentProgram:n,selectedProgram:a}=this.state,{clickHouseData:l}=this.props.systemInformation,o=this.handleCurrent(n,a),r=this.deltaPositionToShoot;if(this.deltaPositionToShoot>this.DELTA){let t=this.deltaPositionToShoot%this.DELTA;t>10&&(r=t<1e3?this.DELTA:t),r=r>this.DELTA?this.DELTA:r}let c={...l,profile_id:s,account_id:e,source:(null==i?void 0:i.stream)?"24tv":"vitrina tv",channel_id:null==i?void 0:i.id,programm_id:null==n?void 0:n.source_id,channel_title:null==i?void 0:i.title,programm_title:(null==n?void 0:n.title)||"empty",is_catchup:null==n?void 0:n.is_catchup,is_current:null==i||!i.stream||"current"===o,delta:r};if(n){let{start_time:t}=n,e=t.split(":"),s=new Date().getTime(),i=new Date;i.setHours(e[0],e[1],0),c.position=Math.abs(s-i.getTime())}null===(t=this.props.clickHouseShoot(this.apiUrl,this.apiKey,c,"tv_channels"))||void 0===t||t.finally(()=>{this.setState({counterInner:this.state.counterInner+1})})}},this.renderDescription=()=>{var t;let{visibleDescription:e,currentChannel:s}=this.state;return e?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:tm().tvchannels__description,children:s.description}),(0,i.jsxs)("div",{className:tm().tvchannels__more,onClick:this.handleMoreClick,children:[(0,i.jsx)("span",{children:"СвеÑнÑÑÑ"}),(0,i.jsx)("img",{className:tm().tvchannels__less,src:"/static/images/tv/arrow.svg"})]})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:tm().tvchannels__description,children:"".concat(null===(t=s.description)||void 0===t?void 0:t.substr(0,400),"...")}),(0,i.jsxs)("div",{className:tm().tvchannels__more,onClick:this.handleMoreClick,children:[(0,i.jsx)("span",{children:"ÐоказаÑÑ ÐµÑÑ"})," ",(0,i.jsx)("img",{src:"/static/images/tv/arrow.svg"})]})]})},this.handleMoreClick=()=>{let{visibleDescription:t}=this.state;this.setState({visibleDescription:!t})},this.setCurrentDate=()=>{let t=new Date().toISOString().substring(0,10);this.setState({currentDate:t})},this.addLeadingZero=t=>10>parseInt(t)?"0".concat(t):t,this.parseTime=(t,e)=>{let s=e?t/1e3:t,i=Math.floor(s/60);if(i>59){let t=Math.floor(i/60),e=this.addLeadingZero(t),n=this.addLeadingZero(Math.floor(s-60*i));return"".concat(e,":").concat(this.addLeadingZero(i-60*t),":").concat(n)}let n=this.addLeadingZero(i),a=this.addLeadingZero(Math.floor(s-60*i));return"".concat(n,":").concat(a)},this.progressBarClick=t=>{var e;let{start_time:s,stop_time:i}=this.state.currentProgram,{currentProgram:n}=this.state,a=(null==n?void 0:n.actual_start_ts)||(null==n?void 0:n.ts);10==="".concat(a).length&&(a*=1e3);let l=s.split(":"),o=i.split(":"),r=new Date(a);r.setHours(l[0],l[1],0);let c=new Date(a);c.setHours(o[0],o[1],0);let _=Math.abs(c.getTime()-r.getTime())/1e3;this.progressThumbPos=((t.pageX||(null===(e=t.touches[0])||void 0===e?void 0:e.clientX))-this.progress.getBoundingClientRect().x)/this.progress.getBoundingClientRect().width*100,this.setState({progressHoverValue:this.progressThumbPos/100*_})},this.progressThumbGet=()=>{this.setState({progressDragging:!0})},this.progressThumbSet=()=>{let{start_time:t,stop_time:e}=this.state.currentProgram,{currentPlayDate:s,currentProgram:i,currentSourceTime:n}=this.state,a=(null==i?void 0:i.actual_start_ts)||(null==i?void 0:i.ts)||s;10==="".concat(a).length&&(a*=1e3);let l=t.split(":"),o=new Date(a),r=e.split(":"),c=new Date(a);o.setHours(l[0],l[1],0),c.setHours(r[0],r[1],0);let _=Math.round(o.getTime()/1e3+this.state.progressHoverValue);n!==_&&(this.progressThumbAfter=this.state.progressHoverValue,this.fetchSource(_),this.setState({visibleProgressTip:!1}))},this.progressThumbMove=t=>{if(this.state.progressDragging){var e,s,i;let{start_time:n,stop_time:a}=this.state.currentProgram,{currentProgram:l}=this.state,o=(null==l?void 0:l.actual_start_ts)||(null==l?void 0:l.ts);10==="".concat(o).length&&(o*=1e3);let r=n.split(":"),c=a.split(":"),_=new Date(o);_.setHours(r[0],r[1],0);let h=new Date(o);h.setHours(c[0],c[1],0);let d=Math.abs(h.getTime()-_.getTime())/1e3;t.preventDefault(),t.stopPropagation();let u=((t.pageX||(null===(e=t.touches[0])||void 0===e?void 0:e.clientX)||(null===(i=t.nativeEvent)||void 0===i?void 0:null===(s=i.changedTouches[0])||void 0===s?void 0:s.clientX))-this.progress.getBoundingClientRect().x)/this.progress.getBoundingClientRect().width*100;this.progressThumbPos=u<0?0:u,this.setState({progressActive:Math.round(this.progressThumbPos),progress:"".concat(Math.round(this.progressThumbPos),"%"),progressHover:this.progressThumbPos,progressHoverValue:this.progressThumbPos/100*d,visibleProgressTip:!0})}},this.progressBarOver=t=>{if(this.player&&this.state.currentProgram){var e,s,i;let{start_time:n,stop_time:a}=this.state.currentProgram,{currentProgram:l}=this.state,o=(null==l?void 0:l.actual_start_ts)||(null==l?void 0:l.ts);10==="".concat(o).length&&(o*=1e3);let r=n.split(":"),c=a.split(":"),_=new Date(o);_.setHours(r[0],r[1],0);let h=new Date(o);h.setHours(c[0],c[1],0);let d=Math.abs(h.getTime()-_.getTime())/1e3,u=((t.pageX||(null===(e=t.touches[0])||void 0===e?void 0:e.clientX)||(null===(i=t.nativeEvent)||void 0===i?void 0:null===(s=i.changedTouches[0])||void 0===s?void 0:s.clientX))-this.progress.getBoundingClientRect().x)/this.progress.getBoundingClientRect().width*100;this.progressThumbPos=u<0?0:u,this.setState({progressHover:this.progressThumbPos,progressHoverValue:Math.round(this.progressThumbPos/100*d),visibleProgressTip:!0,controlsHover:!0})}},this.progressBarOut=()=>{this.player&&this.setState({progressHover:0,progressHoverValue:0,visibleProgressTip:!1,controlsHover:!1})},this.setRewindTimeout=t=>{t&&this.setState({rewindSide:t,rewindSteps:this.state.rewindSteps+("right"===t?10:-10)},()=>{if(this.player&&!this.state.progressDragging){let{currentProgram:t,currentPlayDate:e}=this.state,s=(null==t?void 0:t.actual_start_ts)||(null==t?void 0:t.ts),i=null==t?void 0:t.start_time.split(":"),n=new Date(s||e),a=null==t?void 0:t.stop_time.split(":"),l=new Date(s||e);t&&(n.setHours(i[0],i[1],0),l.setHours(a[0],a[1],0));let o=Math.abs(l.getTime()-n.getTime())/1e3,r="".concat(this.tsDuration).length>10?this.tsDuration/1e3:this.tsDuration;this.progressThumbAfter=this.progressThumbPos/100*o+this.state.rewindSteps,this.fetchSource(r+this.state.rewindSteps),this.setState({rewindSteps:0,rewindSide:null})}})},this.prevtenClick=()=>
1{if(!this.state.currentProgram)return;let{currentProgram:t,currentPlayDate:e,currentChannel:s}=this.state,{clickHouseData:i}=this.props.systemInformation,n=(null==t?void 0:t.actual_start_ts)||(null==t?void 0:t.ts);10==="".concat(n).length&&(n*=1e3);let a=null==t?void 0:t.start_time.split(":"),l=new Date(n||e),o=null==t?void 0:t.stop_time.split(":"),r=new Date(n||e);t&&(l.setHours(a[0],a[1],0),r.setHours(o[0],o[1],0));let c=(0,x.d4)(l,r);(t.actual_start_ts||t.start_time)&&!c&&t.is_catchup&&this.setRewindTimeout("left");let _={...i,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==s?void 0:s.alias,product_id:null==s?void 0:s.id,content_id:null==t?void 0:t.ts,element_type:"button",element_attributes_id:"rewind_back",event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,_)},this.nexttenClick=()=>{if(!this.state.currentProgram)return;let{currentProgram:t,currentPlayDate:e,currentChannel:s}=this.state,{clickHouseData:i}=this.props.systemInformation,n=(null==t?void 0:t.actual_start_ts)||(null==t?void 0:t.ts);10==="".concat(n).length&&(n*=1e3);let a=null==t?void 0:t.start_time.split(":"),l=new Date(n),o=null==t?void 0:t.stop_time.split(":"),r=new Date(n);t&&(l.setHours(a[0],a[1],0),r.setHours(o[0],o[1],0));let c=(0,x.d4)(l,r);(t.actual_start_ts||t.start_time)&&!c&&t.is_catchup&&this.setRewindTimeout("right");let _={...i,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==s?void 0:s.alias,product_id:null==s?void 0:s.id,content_id:null==t?void 0:t.ts,element_type:"button",element_attributes_id:"rewind_forward",event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,_)},this.onSomethingWrongClick=()=>{let{clickHouseData:t,deviceSize:e}=this.props.systemInformation,{currentChannel:s}=this.state,i={...t,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==s?void 0:s.alias,element_attributes_text:"mobile_web"===e?"":"ЧÑо ÑлÑÑилоÑÑ",element_attributes_id:"report_error",element_type:"button",event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,i),this.props.toggleSomethingWrongPopup(!0),this.pauseTvPlayer()},this.checkLiveBroadcast=t=>{let e,s,i,n;let{activeDate:a}=this.state,l=new Date(a),o=new Date(a),r=t.start_time.split(":");e=r[0],s=r[1];let c=t.stop_time.split(":");return i=c[0],n=c[1],l.setHours(e,s,0),o.setHours(i,n,0),new Date().getTime()<o.getTime()&&new Date().getTime()>=l},this.checkDesktopDevice=()=>{let{browserWidth:t}=this.state;return t>c.xW[c._.TABLET]},this.somethingWrongShoot=t=>{let{currentChannel:e}=this.state,{clickHouseData:s}=this.props.systemInformation,i={...s,...t,screen_type:"tv_player",screen_attributes_id:null==e?void 0:e.alias,event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,i)},this.handleSomethingWrongSubmit=()=>{let{fullscreen:t}=this.state;this.props.pushStackAddItem({text:"СпаÑибо за оÑвеÑ! Ðн Ð¿Ð¾Ð¼Ð¾Ð¶ÐµÑ ÑлÑÑÑиÑÑ ÑабоÑÑ Ð¿Ð»ÐµÐµÑа",...t&&{containerId:tB}})},this.pauseTvPlayer=()=>{let{isPauseAllowed:t,playing:e,vtvsdk:s}=this.state;this.player&&e&&!s&&!t&&(this.catchupTimestamp=new Date().getTime(),this.player.pause(),this.deltaShoot(),this.showControls(),this.setState({playing:!1})),s&&s.sendMessage("pause",{})},this.onProgramClick=()=>{let{currentProgram:t,currentChannel:e,isProgramShow:s,isPlayerProgramPopupOpen:i}=this.state,{clickHouseData:n}=this.props.systemInformation;this.checkDesktopDevice()?this.setState({isProgramShow:!s},()=>{this.pauseTvPlayer()}):this.setState({isPlayerProgramPopupOpen:!i},()=>{this.pauseTvPlayer()});let a={...n,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==e?void 0:e.alias,product_id:null==e?void 0:e.id,content_id:null==t?void 0:t.ts,element_type:"button",element_attributes_id:"tv_schedule",event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,a)},this.playerScroll=t=>{let{epg:e,isProgramShow:s,fullscreen:i,isPlayerProgramPopupOpen:n,browserWidth:a,isPauseAllowed:l}=this.state;if(!i||!e||!e.length||this.state.hoverTvProgramDays||!(a>767))return!1;{var o=this;let e=function(e,s){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.deltaY||t.detail||t.wheelDelta,a=document.getElementById("startControls").scrollTop;if(!s&&n>0)o.setState({[e]:!0},()=>{let{playing:t,vtvsdk:e}=o.state;o.player&&t&&!l&&o.player.pause(),e&&e.sendMessage("pause",{}),o.catchupTimestamp=new Date().getTime(),o.deltaShoot(),o.showControls(),l||o.setState({playing:!1})});else if(s&&n<0&&a<=0){if(i){let e=document.getElementById(to.G),s=null==e?void 0:e.getBoundingClientRect().height,i=null==e?void 0:e.scrollHeight;if((null==e?void 0:e.contains(t.target))&&i>s)return}o.setState({[e]:!1})}};this.checkDesktopDevice()?e("isProgramShow",s):e("isPlayerProgramPopupOpen",n,!0)}},this.onHoverTvProgramDays=t=>{this.setState({hoverTvProgramDays:t})},this.resizeHandler=()=>{let t=window.innerWidth,{browserWidth:e}=this.state;t!==e&&this.setState({browserWidth:t})},this.getTitle=t=>(null==t?void 0:t.season_number)&&(null==t?void 0:t.episode_number)?"".concat(null==t?void 0:t.t
1itle,": ").concat(null==t?void 0:t.season_number," Ñезон, ").concat(null==t?void 0:t.episode_number," ÑеÑиÑ"):(null==t?void 0:t.season_number)&&!(null==t?void 0:t.episode_number)?"".concat(null==t?void 0:t.title,": ").concat(null==t?void 0:t.season_number," Ñезон"):!(null==t?void 0:t.season_number)&&(null==t?void 0:t.episode_number)&&(null==t?void 0:t.episode_number)!=="0"?"".concat(null==t?void 0:t.title,": ").concat(null==t?void 0:t.episode_number," ÑеÑиÑ"):null==t?void 0:t.title,this.onProgramDayClick=(t,e)=>{let{currentChannel:s}=this.state;this.handleDateSelect(t.date,null==s?void 0:s.alias,e)},this.onPopupDayClick=(t,e,s)=>{this.handleDateSelect(t.date,s,e)},this.onPopupProgramClick=(t,e)=>{let{currentProgram:s}=this.state,i=t.ts===(null==s?void 0:s.ts);this.setState({isProgramPopupOpen:!1},()=>{this.handleInitCatchup(t,e,i,!0)})},this.onPopupProgramOpenClick=()=>{this.setState({isProgramPopupOpen:!0})},this.onPopupProgramCloseClick=()=>{this.setState({isProgramPopupOpen:!1})},this.setSettingsOverTimeout=t=>{let{visibleSettings:e}=this.state,{deviceData:s}=this.props.systemInformation;if("desktop_web"!==s){clearTimeout(this.settingsOverTimeout),this.props.toggleVisiblePopup(!e);return}e||this.setState({visibleSettings:!0}),t?(clearTimeout(this.settingsOverTimeout),this.settingsOverTimeout=setTimeout(()=>{this.setVisibleMobileTabBar(),this.setState({visibleSettings:!1,settingsCategory:null})},1e3)):(clearTimeout(this.settingsOverTimeout),this.setState({visibleSettings:!0}))},this.handleHoverButton=t=>{"settings"===t?this.setState({visibleVolume:!1}):"volume"===t?(this.setVisibleMobileTabBar(),this.setState({visibleSettings:!1,settingsCategory:null})):(this.setVisibleMobileTabBar(),this.setState({visibleVolume:!1,visibleSettings:!1,settingsCategory:null}))},this.handleClickSettingsBtn=()=>{let{visibleSettings:t,settingsCategory:e,currentProgram:s,currentChannel:i}=this.state,{clickHouseData:n}=this.props.systemInformation;clearTimeout(this.settingsOverTimeout),this.setState({visibleSettings:!t,settingsCategory:t?e:null},()=>{t&&this.checkControlsTimeout()});let a={...n,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==s?void 0:s.id,product_id:null==i?void 0:i.id,content_id:null==s?void 0:s.id,element_type:"button",element_attributes_id:"settings",event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,a)},this.checkControlsTimeout=()=>{let{playing:t,pip:e,isShowSpeedOnboarding:s}=this.state;!t||e||s||(clearTimeout(this.controlsTimeout),this.controlsTimeout=setTimeout(()=>{this.setVisibleMobileTabBar(),this.setState({visibleControls:!1,visibleSettings:!1,settingsCategory:null})},2500))},this.handleClickSettingsBack=t=>{let{settingsCategory:e,currentProgram:s,currentChannel:i}=this.state,{clickHouseData:n}=this.props.systemInformation,a={...n,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==s?void 0:s.id,product_id:null==i?void 0:i.id,content_id:null==s?void 0:s.id,block_type:"block",block_attributes_id:"qualities"===e?"video_quality":"subtitles",element_type:"button",element_attributes_id:"back",event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,a),e&&(t.stopPropagation(),this.setState({settingsCategory:null},()=>this.setSettingsOverTimeout(!0)))},this.getSettingsTitle=()=>{let{settingsCategory:t}=this.state;switch(t){case"qualities":return"ÐаÑеÑÑво";case"subtitles":return"СÑбÑиÑÑÑ";case"audio":return"ÐÑдио";case"speed":return"СкоÑоÑÑÑ";default:return"ÐаÑÑÑойки"}},this.getSettingsMenu=()=>{let{settingsCategory:t}=this.state,e=document.getElementById("mobile_tabbar");switch(e&&(e.style.display="none"),t){case"qualities":return this.renderQualitiesMenu();case"subtitles":return this.renderCaptionsMenu();default:return this.renderSettingsCategories()}},this.setVisibleMobileTabBar=()=>{let t=document.getElementById("mobile_tabbar");t&&(t.style.display="flex")},this.handleClickMenuItem=(t,e)=>{t.preventDefault(),t.stopPropagation(),this.setState({settingsCategory:e})},this.handleClickOutside=t=>{this.settingsRef&&!this.settingsRef.contains(t.target)&&(this.setVisibleMobileTabBar(),this.setState({visibleSettings:!1}),this.props.toggleVisiblePopup(!1))},this.renderSettingsCategories=()=>{let{qualities:t,captions:e}=this.state;if(!(null==t?void 0:t.length)&&!(null==e?void 0:e.length))return null;let s=null==t?void 0:t.find(t=>t.active),n=null==e?void 0:e.find(t=>t.active);return(0,i.jsxs)(i.Fragment,{children:[(null==t?void 0:t.length)?(0,i.jsxs)("div",{className:tN().controls__settings__menu__item,onClick:t=>this.handleClickMenuItem(t,"qualities"),children:[(0,i.jsx)("div",{className:tN().controls__settings__menu__item__name,children:(0,i.jsx)("span",{className:tm().tvchannels__settings__text,children:"ÐаÑеÑÑво"})}),(0,i.jsxs)("div",{className:tN().controls__settings__menu__item__value,children:[(0,i.jsx)("img",{src:"/static/images/startPlayer/".concat(null==s?void 0:s.icon,".svg"),className:tN().controls__settings__qual
1ity__icon}),(0,i.jsx)("span",{children:null==s?void 0:s.title}),(0,i.jsx)("img",{src:"/static/images/startPlayer/arrow-right.svg"})]})]}):null,(null==e?void 0:e.length)?(0,i.jsxs)("div",{className:tN().controls__settings__menu__item,onClick:t=>this.handleClickMenuItem(t,"subtitles"),children:[(0,i.jsx)("div",{className:tN().controls__settings__menu__item__name,children:(0,i.jsx)("span",{className:tm().tvchannels__settings__text,children:"СÑбÑиÑÑÑ"})}),(0,i.jsxs)("div",{className:tN().controls__settings__menu__item__value,children:[(0,i.jsx)("span",{children:(null==n?void 0:n.name)||(null==n?void 0:n.label)||"Ðез ÑÑбÑиÑÑов"}),(0,i.jsx)("img",{src:"/static/images/startPlayer/arrow-right.svg"})]})]}):null]})},this.renderCaptionsMenu=()=>{let{captions:t,currentProgram:e,currentChannel:s}=this.state,{clickHouseData:n}=this.props.systemInformation,a={...n,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==e?void 0:e.id,product_id:null==s?void 0:s.id,content_id:null==e?void 0:e.id,block_type:"block",block_attributes_id:"player_settings",element_type:"menu_item",element_attributes_id:"subtitles",element_attributes_text:"CÑбÑиÑÑÑ",event_time:Date.now()};return this.props.clickHouseShoot(this.apiUrl,this.apiKey,a),(0,i.jsx)(i.Fragment,{children:t.length?null==t?void 0:t.map((t,e)=>this.renderCaptionItem(t,e)):(0,i.jsxs)("div",{className:"".concat(tN().controls__settings__menu__item," ").concat(tN().controls__settings__disabled),children:[(0,i.jsx)("div",{className:"".concat(tN().controls__settings__caption," ").concat(tN().controls__settings__menu__item__ones," ").concat(tN().controls__settings__active),children:(0,i.jsx)("span",{children:"Ðез ÑÑбÑиÑÑов"})}),(0,i.jsx)("img",{src:"/static/images/startPlayer/selected.svg",alt:"selected"})]},"caption-default")})},this.renderCaptionItem=(t,e)=>(0,i.jsxs)("div",{className:tN().controls__settings__menu__item,onClick:()=>this.handleClickCaptionItem(t),children:[(0,i.jsx)("div",{className:"".concat(t.active?tN().controls__settings__active:""," ").concat(tN().controls__settings__menu__item__ones),children:(0,i.jsx)("span",{children:t.label})}),t.active?(0,i.jsx)("img",{src:"/static/images/startPlayer/selected.svg",alt:"selected"}):(0,i.jsx)("div",{className:tN().controls__settings__menu__item__space})]},"".concat(t.title,"-").concat(e)),this.handleClickCaptionItem=t=>{let{vtvsdk:e,currentProgram:s,currentChannel:i}=this.state,{clickHouseData:n}=this.props.systemInformation,a={...n,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==s?void 0:s.id,product_id:null==i?void 0:i.id,content_id:null==s?void 0:s.id,block_type:"block",block_attributes_id:"subtitles",element_type:"menu_item",element_attributes_id:"subt_".concat(t.track),element_attributes_text:t.label,event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,a),e&&("off"===t.track?e.sendMessage("setcaptions",!1):e.sendMessage("setcaptions",t.track))},this.renderQualitiesMenu=()=>{let{qualities:t,currentProgram:e,currentChannel:s}=this.state,{clickHouseData:i}=this.props.systemInformation,n={...i,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==e?void 0:e.id,product_id:null==s?void 0:s.id,content_id:null==e?void 0:e.id,block_type:"block",block_attributes_id:"player_settings",element_type:"menu_item",element_attributes_id:"quality",element_attributes_text:"ÐаÑеÑÑво",event_time:Date.now()};return this.props.clickHouseShoot(this.apiUrl,this.apiKey,n),t.map((t,e)=>this.renderQualityItem(t,e))},this.renderQualityItem=(t,e)=>(0,i.jsxs)("div",{className:tN().controls__settings__menu__item,onClick:()=>this.handleClickQualityItem(t),children:[(0,i.jsxs)("div",{className:"".concat(tN().controls__settings__quality," ").concat(tN().controls__settings__menu__item__ones," ").concat(t.active?tN().controls__settings__active:""),children:[(0,i.jsx)("img",{src:"/static/images/startPlayer/".concat(t.icon,".svg")}),(0,i.jsx)("span",{children:t.title})]}),t.active?(0,i.jsx)("img",{src:"/static/images/startPlayer/selected.svg",alt:"selected"}):(0,i.jsx)("div",{className:tN().controls__settings__menu__item__space})]},"".concat(t.title,"-").concat(t.icon,"-").concat(e)),this.handleClickQualityItem=t=>{let{vtvsdk:e,currentProgram:s,currentChannel:i}=this.state,{clickHouseData:n}
1=this.props.systemInformation,a={...n,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==s?void 0:s.id,product_id:null==i?void 0:i.id,content_id:null==s?void 0:s.id,block_type:"block",block_attributes_id:"video_quality",element_type:"menu_item",element_attributes_id:"quality_".concat(t.q),element_attributes_text:t.title,event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,a),e&&e.sendMessage("setquality",t.q)},this.renderPlayBtn=()=>{let{playing:t,fullscreen:e,isPauseAllowed:s}=this.state;return(0,i.jsxs)("button",{type:"button",className:h()(tm().tvchannels__cBottomPlay,tm().tvchannels__button,{[tm().tvchannels__button_fullscreen]:e,[tm().tvchannels__button_disabled]:s}),onClick:this.playPause,disabled:s,children:[(0,i.jsx)("img",{src:"/static/images/startPlayer/".concat(t?"pause":"play",".svg"),alt:t?"Pause":"Play"}),(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__tip," ").concat(tm().tvchannels__tipPlay),children:[(0,i.jsx)("div",{className:tm().tvchannels__tipWrapper,children:(0,i.jsx)("div",{className:tm().tvchannels__tipText,children:t?"ÐаÑза":"СмоÑÑеÑÑ"})}),(0,i.jsx)("div",{className:tm().tvchannels__tipTriangle,children:(0,i.jsx)("img",{src:"/static/images/startPlayer/tip-triangle.svg"})})]})]})},this.renderTenBtn=t=>{let{currentProgram:e,fullscreen:s}=this.state;return(null==e?void 0:e.is_catchup)?t?(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__cBottomRewind," ").concat(tm().tvchannels__button," ").concat(s?tm().tvchannels__button_fullscreen:""),onClick:()=>this.prevtenClick(),children:[(0,i.jsx)("img",{src:"/static/images/startPlayer/prev10.svg"}),(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__tip," ").concat(tm().tvchannels__tipPrevTen),children:[(0,i.jsx)("div",{className:tm().tvchannels__tipWrapper,children:(0,i.jsx)("div",{className:tm().tvchannels__tipText,children:"ÐеÑнÑÑÑÑÑ Ð½Ð° 10 ÑекÑнд назад"})}),(0,i.jsx)("div",{className:tm().tvchannels__tipTriangle,children:(0,i.jsx)("img",{src:"/static/images/startPlayer/tip-triangle.svg"})})]})]}):(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__cBottomRewind," ").concat(tm().tvchannels__button," ").concat(s?tm().tvchannels__button_fullscreen:""),onClick:()=>this.nexttenClick(),children:[(0,i.jsx)("img",{src:"/static/images/startPlayer/next10.svg"}),(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__tip," ").concat(tm().tvchannels__tipNextTen),children:[(0,i.jsx)("div",{className:tm().tvchannels__tipWrapper,children:(0,i.jsx)("div",{className:tm().tvchannels__tipText,children:"ÐеÑемоÑаÑÑ Ð½Ð° 10 ÑекÑнд впеÑед"})}),(0,i.jsx)("div",{className:tm().tvchannels__tipTriangle,children:(0,i.jsx)("img",{src:"/static/images/startPlayer/tip-triangle.svg"})})]})]}):null},this.renderVolumeBtn=()=>{let{fullscreen:t,volumeIconControl:e,volumePosition:s,muted:n}=this.state,{deviceSize:a}=this.props.systemInformation;return(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__cBottomVolume," ").concat(tm().tvchannels__button," ").concat(t?tm().tvchannels__button_fullscreen:""),children:[(0,i.jsx)("img",{src:"/static/images/startPlayer/".concat(e,".svg"),onClick:()=>this.muteClick(!1),className:tm().tvchannels__volumeImage}),"desktop_web"===a||"desktop_web"!==a&&t?(0,i.jsx)("div",{className:tm().tvchannels__volumeWrap,onMouseDown:this.volumeThumbGet,onMouseUp:this.volumeThumbSet,onMouseMove:this.volumeThumbMove,onTouchStart:this.volumeThumbGet,onTouchEnd:this.volumeThumbSet,onTouchMove:this.volumeThumbMove,children:(0,i.jsxs)("div",{className:tm().tvchannels__volume,onClick:this.volumeBarClick,children:[(0,i.jsx)("div",{className:tm().tvchannels__volumeLine,id:"volumeBar"}),(0,i.jsx)("div",{className:tm().tvchannels__volumeActive,style:{height:"".concat(n?0:s,"px")},children:(0,i.jsx)("div",{className:tm().tvchannels__volumeThumb})})]})}):null]})},this.renderSettingsBtn=()=>{let{visibleSettings:t,visiblePlaylist:e,settingsCategory:s,vtvsdk:n,fullscreen:a}=this.state,{deviceSize:l}=this.props.systemInformation;return(0,i.jsxs)("div",{className:"".concat(tN().controls__settings__wrapper," ").concat(t?tN().controls__settings__wrapper__active:""),ref:t=>this.settigsMenu=t,onMouseOver:()=>this.setSettingsOverTimeout(),onMouseMove:()=>this.setSettingsOverTimeout(),onMouseLeave:()=>this.setSettingsOverTimeout(!0),children:[(0,i.jsxs)("div",{className:"".concat(tN().controls__settings," ").concat(tN().controls__button," ").concat(e?tN().unhoveredPlaylist:""," ").concat(tm().tvchannels__buttonTvProgram),onClick:this.handleClickSettingsBtn,onMouseOver:()=>this.handleHoverButton("settings"),children:[(0,i.jsx)("img",{src:"/static/images/startPlayer/settings.svg",className:tm().controls__settings__image}
1),a&&"desktop_web"===l?"ÐаÑÑÑойки":"",t?(0,i.jsx)("div",{className:"".concat(tN().controls__settings__menu__wrapper," ").concat(tm().tvchannels__settings__mobile),style:{pointerEvents:"none"},children:(0,i.jsxs)("div",{className:tN().controls__settings__menu,style:{pointerEvents:"visible"},children:[(0,i.jsxs)("div",{className:"".concat(tN().controls__settings__title," ").concat(s?tN().controls__settings__title__active:""," ").concat(tm().tvchannels__settings__title),onClick:this.handleClickSettingsBack,children:[s?(0,i.jsx)("img",{src:"/static/images/startPlayer/arrow-left.svg"}):null,this.getSettingsTitle()]}),n?(0,i.jsx)("div",{className:tN().controls__settings__menu__content,onWheel:t=>t.stopPropagation(),children:this.getSettingsMenu()}):null]})}):null]}),(0,i.jsx)("div",{className:"".concat(tN().controls__tipTriangle," ").concat(tm().controls__settings__triangle),children:(0,i.jsx)("img",{src:"/static/images/startPlayer/tip-triangle.svg"})})]})},this.renderNextCatchupBtn=t=>{let{authData:e}=this.props.registration,{fullscreen:s,epg:n,currentProgram:a}=this.state,l="Catchups_on_tvScreen_true"===(0,x.l3)((null==e?void 0:e.ab)||[],"Catchups_on_tvScreen"),o=null==n?void 0:n.reduce((t,e)=>[...t,...e.programs],[]),r=null==o?void 0:o.findIndex(t=>t.ts===(null==a?void 0:a.ts)),c=r>-1?o[r-1]:void 0,_=r>-1?o[r+1]:void 0,h=null==c?void 0:c.is_catchup,d=null==_?void 0:_.is_catchup;return t?h?(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__button," ").concat(s?tm().tvchannels__button_fullscreen:""," ").concat(h&&d?tm().tvchannels__both:""),onClick:()=>this.handlePrevClick(o[r-1]),children:[(0,i.jsx)("img",{src:"/static/images/startPlayer/prev_small.svg",alt:"prev_small"}),s?"ÐÑедÑдÑÑÐ°Ñ Ð¿ÐµÑедаÑа":"",s&&c?(0,i.jsx)(tO,{program:c,next:!1,catchupsOnTvExp:l}):(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__tip," ").concat(tm().tvchannels__tipPrev),children:[(0,i.jsx)("div",{className:tm().tvchannels__tipWrapper,children:(0,i.jsx)("div",{className:tm().tvchannels__tipText,children:"ÐÑедÑдÑÑÐ°Ñ Ð¿ÐµÑедаÑа"})}),(0,i.jsx)("div",{className:tm().tvchannels__tipTriangle,children:(0,i.jsx)("img",{src:"/static/images/startPlayer/tip-triangle.svg"})})]})]}):null:d?(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__button," ").concat(s?tm().tvchannels__button_fullscreen:""," ").concat(h&&d?tm().tvchannels__both:""),onClick:()=>this.handleNextClick(o[r+1]),children:[(0,i.jsx)("img",{src:"/static/images/startPlayer/next_small.svg",alt:"next_small"}),s?"СледÑÑÑÐ°Ñ Ð¿ÐµÑедаÑа":"",s&&_?(0,i.jsx)(tO,{program:_,last:this.isCurrentProgram(_),next:!0,prev:d,catchupsOnTvExp:l}):(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__tip," ").concat(tm().tvchannels__tipPrev),children:[(0,i.jsx)("div",{className:tm().tvchannels__tipWrapper,children:(0,i.jsx)("div",{className:tm().tvchannels__tipText,children:"СледÑÑÑÐ°Ñ Ð¿ÐµÑедаÑа"})}),(0,i.jsx)("div",{className:tm().tvchannels__tipTriangle,children:(0,i.jsx)("img",{src:"/static/images/startPlayer/tip-triangle.svg"})})]})]}):null},this.renderProgramBtn=()=>{let{fullscreen:t,epg:e,isProgramShow:s}=this.state;return(null==e?void 0:e.length)&&t?(0,i.jsxs)("div",{className:h()(tm().tvchannels__button,tm().tvchannels__buttonTvProgram,{[tm().tvprogram]:s}),onClick:this.onProgramClick,children:[(0,i.jsx)("img",{src:"/static/images/startPlayer/program.svg",alt:"program"}),"РаÑпиÑание",(0,i.jsxs)("div",{className:tm().programTip,children:[(0,i.jsx)("span",{children:"ÐÑбÑаÑÑ Ð¿ÑогÑаммÑ"}),(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"24",fill:"none",viewBox:"0 0 15 24",className:tm().programTipIcon,children:[(0,i.jsx)("rect",{width:"14",height:"23",x:".5",y:".5",stroke:"#757D8A",rx:"7"}),(0,i.jsx)("rect",{width:"3",height:"6",x:"6",y:"5",fill:"#F2F2F2",rx:"1.5"})]}),(0,i.jsx)("span",{children:"пÑокÑÑÑиÑе ÑкÑан вниз"}),(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"8",fill:"none",viewBox:"0 0 20 8",className:tm().programTipTriangle,children:(0,i.jsx)("path",{fill:"#14161A",d:"M0 0c1.37 0 2.66.6 3.55 1.62L8.2 7.16a2.35 2.35 0 0 0 3.6 0l4.6-5.49A4.7 4.7 0 0 1 20 0H0Z"})})]})]}):null},this.renderFullScreenBtn=()=>{let{fullscreen:t}=this.state,{outerSource:e,userOs:s}=this.props.systemInformation;return"tapp"===e&&s&&"iOS"!==s.os?null:(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__button," ").concat(t?tm().tv
1channels__button_fullscreen:""),onClick:this.fullscreenClick,children:[(0,i.jsx)("img",{src:"/static/images/startPlayer/fullscreen-".concat(t?"off":"on",".svg")}),(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__tip," ").concat(t?tm().tvchannels__tipFullscreenExit:tm().tvchannels__tipFullscreen),children:[(0,i.jsx)("div",{className:tm().tvchannels__tipWrapper,children:(0,i.jsx)("div",{className:tm().tvchannels__tipText,children:t?"ÐÑйÑи из полноÑкÑанного Ñежима":"ÐеÑейÑи в полноÑкÑаннÑй Ñежим"})}),(0,i.jsx)("div",{className:tm().tvchannels__tipTriangle,children:(0,i.jsx)("img",{src:"/static/images/startPlayer/tip-triangle.svg"})})]})]})},this.renderSomethingWrongBtn=()=>{let{fullscreen:t}=this.state;return t?(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__button),onClick:this.onSomethingWrongClick,children:[(0,i.jsx)("img",{src:"/static/images/startPlayer/warning.svg"}),(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__tip," ").concat(tm().tvchannels__tipWarning),children:[(0,i.jsx)("div",{className:tm().tvchannels__tipWrapper,children:(0,i.jsx)("div",{className:tm().tvchannels__tipText,children:"ÐожаловаÑÑÑÑ"})}),(0,i.jsx)("div",{className:tm().tvchannels__tipTriangle,children:(0,i.jsx)("img",{src:"/static/images/startPlayer/tip-triangle.svg"})})]})]}):null},this.renderBroadcastBtn=t=>{let{fullscreen:e}=this.state;return(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__button," ").concat(e||t?"":tm().tvchannels__button_broadcast),onClick:()=>this.handleClickBroadcast(t),children:[(0,i.jsx)("img",{src:"/static/images/startPlayer/broadcast".concat(t?"-active":"",".svg")}),t?"ÐÑÑмой ÑÑиÑ":"ÐеÑнÑÑÑÑÑ Ð² ÑÑиÑ",(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__tip," ").concat(tm().tvchannels__tipBroadcast),children:[(0,i.jsx)("div",{className:tm().tvchannels__tipWrapper,children:(0,i.jsx)("div",{className:tm().tvchannels__tipText,children:t?"ÐбновиÑÑ ÑÑанÑлÑÑиÑ":"ÐеÑнÑÑÑÑÑ Ð² пÑÑмой ÑÑиÑ"})}),(0,i.jsx)("div",{className:tm().tvchannels__tipTriangle,children:(0,i.jsx)("img",{src:"/static/images/startPlayer/tip-triangle.svg"})})]})]})},this.handleClickBroadcast=t=>{let{clickHouseData:e}=this.props.systemInformation,{currentProgram:s,currentChannel:i}=this.state,n={...e,action_id:"click",screen_type:"tv_player",screen_attributes_id:null==s?void 0:s.ts,product_id:null==i?void 0:i.id,content_id:null==s?void 0:s.ts,element_type:"button",element_attributes_id:t?"live":"to_live",event_time:Date.now()};this.props.clickHouseShoot(this.apiUrl,this.apiKey,n),this.fetchSource(),this.loadData()},this.onPlayerPopupProgramClick=(t,e)=>{let{currentProgram:s}=this.state,i=t.ts===(null==s?void 0:s.ts);this.setState({isPlayerProgramPopupOpen:!1},()=>{this.handleInitCatchup(t,e,i,!0)})},this.onPlayerPopupProgramCloseClick=()=>{this.setState({isPlayerProgramPopupOpen:!1})},this.isCurrentProgram=t=>{let{currentPlayDate:e}=this.state,s=null==t?void 0:t.start_time.split(":"),i=null==t?void 0:t.stop_time.split(":"),n=(null==t?void 0:t.actual_start_ts)||(null==t?void 0:t.ts);10==="".concat(n).length&&(n*=1e3);let a=new Date(n||e),l=new Date(n||e);return t&&(a.setHours(s[0],s[1],0),l.setHours(i[0],i[1],0)),new Date().getTime()<l.getTime()&&new Date().getTime()>=a},this.handleCategorySelect=t=>{this.setState({selectedTVcategory:t})},this.renderVideoPlayer=()=>{var t,e,s;let{authData:n}=this.props.registration,{windowInnerWidth:a}=this.props.systemInformation,{somethingWrong:l}=this.props.toggle,{epg:o,currentChannel:r,activeDate:c,fullscreen:_,visibleControls:d,visibleControlsAge:u,currentProgram:p,error:m,progress:v,broadcast:g,progressDragging:y,progressHover:b,progressHoverValue:T,visibleProgressTip:P,rewindSide:f,visibleSpinner:C,isProgramShow:I,browserWidth:k,blockedControls:w,isPlayerProgramPopupOpen:j,vtvsdk:N,visibleSettings:D}=this.state,A=(0,x.ZI)(a),H=this.isCurrentProgram(p),R=(0,x.cS)(this.getTitle(p),_?tU[A].fullscreen-(null==r?void 0:null===(t=r.title)||void 0===t?void 0:t.length)+2:tU[A].default-(null==r?void 0:null===(e=r.title)||void 0===e?void 0:e.length)+2);return(0,i.jsx)("div",{className:tm().tvchannels__source,children:r.player||r.stream?(0,i.jsxs)("figure",{className:h()(tm().tvchannels__figure,{[tm().tvchannels__figure_fullscreen]:_}),id:tB,onMouseEnter:this.showControls,onMouseLeave:this.checkControlsTimeout,onMouseMove:this.showControls,children:[r.stream?(0,i.jsx)("video",{id:"startChannels",preload:"metadata",playsInl
1ine:!0,autoPlay:!0,muted:!0}):null,r.player&&!w||r.stream?(0,i.jsxs)("div",{id:"startControls",className:h()(tm().tvchannels__controls,{[tm().tvchannels__visible]:d,[tm().tvchannels__controlsNoFade]:_,[tm().tvchannels__withTvProgram]:I}),onMouseMove:this.showControls,onMouseDown:this.showControls,onWheel:this.playerScroll,children:[(0,i.jsxs)("div",{className:tm().tvchannels__cTop,children:[(0,i.jsx)("div",{className:"".concat(tm().tvchannels__cTitle),children:_?(0,i.jsxs)("div",{className:"".concat(_?tm().tvchannels__cTitle__fs:""),onClick:this.fullscreenClick,children:[(0,i.jsx)("img",{src:"/static/images/startPlayer/arrow-back.svg"}),(0,i.jsxs)("span",{children:[null==r?void 0:r.title,": ",R]})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("b",{children:[null==r?void 0:r.title,": "]}),(0,i.jsx)("span",{children:R})]})}),(0,i.jsxs)("div",{className:tm().tvchannels__buttons,children:[n&&(null==n?void 0:n.virtual)===!1?(0,i.jsx)(Y,{type:_?q.INLINE_BIG:q.INLINE,channelId:r.id,clickHouseData:{screen_type:"tv_player",screen_attributes_id:null==r?void 0:r.alias}}):null,this.renderSomethingWrongBtn()]})]}),(0,i.jsx)("div",{className:h()(tm().tvchannels__cMiddle,{[tm().tvchannels__cMiddle_playlist]:I}),onClick:this.playPause,id:"middle"}),k<=1024&&_?(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__navigate," ").concat(this.state.visibleControls?"":tm().tvchannels__navigate__hided),onClick:this.checkControlsTimeout,children:[H?null:this.renderTenBtn(!0),this.renderPlayBtn(),H?null:this.renderTenBtn()]}):null,(0,i.jsxs)("div",{className:h()(tm().tvchannels__cBottom),children:[(0,i.jsxs)("div",{className:tm().controls__progressWrap,children:[(0,i.jsxs)("div",{className:tm().tvchannels__cTime,children:["".concat((null==p?void 0:p.start_time)&&(null==p?void 0:p.stop_time)?"".concat(null==p?void 0:p.start_time," â ").concat(null==p?void 0:p.stop_time):"ÐÑÑмой ÑÑиÑ")," "]}),(0,i.jsx)("div",{className:tm().controls__bar,...(null==p?void 0:p.is_catchup)&&!H?{onMouseMove:this.progressThumbMove,onMouseUp:this.progressThumbSet,onMouseDown:this.progressThumbGet,onTouchStart:this.progressThumbGet,onTouchEnd:this.progressThumbSet,onTouchMove:this.progressThumbMove,onMouseOut:this.progressBarOut}:{},children:(0,i.jsxs)("div",{id:"progress",className:"".concat(tm().controls__progress," ").concat(y?tm().visibleThumb:""),onClick:this.progressBarClick,onTouchStart:this.progressBarClick,onMouseOver:this.progressBarOver,onMouseMove:this.progressBarOver,onMouseOut:this.progressBarOut,children:[(0,i.jsx)("div",{className:tm().controls__progressLine}),(0,i.jsx)("div",{className:tm().controls__progressActive,style:{width:v},children:(null==p?void 0:p.is_catchup)&&!H?(0,i.jsx)("div",{className:tm().controls__progressThumb}):null}),(null==p?void 0:p.is_catchup)&&!H&&P&&b&&T?(0,i.jsx)("div",{className:tm().controls__progressHover,style:{left:"".concat(b,"%")},children:this.parseTime(T)}):null]})})]}),(0,i.jsxs)("div",{className:tm().tvchannels__cButtons,children:[(0,i.jsxs)("div",{className:tm().tvchannels__cBottomLeft,children:[!_||_&&k>1024?(0,i.jsxs)(i.Fragment,{children:[this.renderPlayBtn(),H?null:this.renderTenBtn(!0),H?null:this.renderTenBtn()]}):null,this.renderVolumeBtn(),r.stream?this.renderBroadcastBtn(H):null]}),(0,i.jsxs)("div",{className:tm().tvchannels__cBottomRight,children:[(null==g?void 0:null===(s=g.programs)||void 0===s?void 0:s.length)?(0,i.jsxs)("div",{className:"".concat(tm().tvchannels__cBottomArrows),children:[this.renderNextCatchupBtn(!0),this.renderNextCatchupBtn(),this.renderProgramBtn(),N?(0,i.jsx)("div",{className:"".concat(tm().tvchannels__settings," ").concat(tm().tvchannels__button," ").concat(D?tm().noOpacity:""," ").concat(tN().wrapper),style:{width:_?"auto":""},ref:t=>{this.settingsRef=t},children:this.renderSettingsBtn()}):null]}):null,this.renderFullScreenBtn()]})]})]}),I?(0,i.jsx)(tR,{epg:o,currentDate:c,currentChannel:r,currentProgram:p,onHoverDays:this.onHoverTvProgramDays,onDayClick:this.handleDateSelect,onProgramClick:this.handleProgramClick}):null,j?(0,i.jsx)(tH,{isOpen:j,channelAlias:r.alias,chanelTitle:r.title,epg:o,currentProgramTs:null==p?void 0:p.ts,isChannelTvFetching:!1,onProgramClick:this.onPlayerPopupProgramClick,onPopupClose:this.onPlayerPopupProgramCloseClick,channelRatingAge:r.rating_age,currentDay:g,onChangeCurrentDay:this.onPopupDayClick,progress:v,parentSelector:()=>document.querySelector("#".concat(tB)),fromCurrentChannel:!0}):null]}):null,l?(0,i.jsx)(S.A,{type:S.k.TV,somethingWrongShoot:this.somethingWrongShoot,onSubmit:this.handleSomethingWrongSubmit,submitShootData:{element_type:"button",element_attributes_id:"send",element_attributes_text:"ÐÑпÑавиÑÑ"}}):null,m?(0,i.jsxs)("div",{className:tm().tvchannels__error,children:[(0,i.jsx)("img",{src:"/static/images/tv/error.svg"}),(0,i.jsx)("div",{className:tm().tvchannels__eTitle,children:"ÐÑоизоÑла оÑибка."}),(0,i.jsx)("div",{className:tm().tvchannels__eText,children:"ÐожалÑйÑÑа, попÑобÑйÑе позже."})]}):null,f?(0,i.jsx)("div",{className:"".concat(tm().animatedButton," ").concat(f?tm().animatedVisible:""),children:(0,i.jsx)("img",{src:"/static/images/startPlayer/".concat("left"===f?"prev":"next","10-big.svg")})}):null,C?(0,i.jsx)("div",{className:tm().spinner,children:(0,i.jsx)("img",{src:"/static/images/startPlayer/spiner.svg"})}):null,(0,i.jsx)("div",{className:"".concat(tm().tvchannels__cTitle__age," ").concat(u?tm().tv
1channels__visible:""),children:(null==p?void 0:p.rating_age)?null==p?void 0:p.rating_age:(null==r?void 0:r.rating_age)||"18+"})]}):null})}}}let tW=(0,m.withRouter)((0,r.Ng)(t=>({systemInformation:t.systemInformation,tvchannels:t.tvchannels,registration:t.registration,profile:t.profile,toggle:t.toggle,parentalControl:t.parentalControl}),t=>({dispatch:t,...(0,g.zH)({fetchedTVSelection:tn.YU,fetchedTariffs:ts.ZI,toggleDevicesPopup:I.QQ,toggleVisiblePopup:I.TX,toggleDeletedDevicePopup:I.YO,clickHouseShoot:ti.Y3,toggleMegafonNoMoneyPopup:I.B9,toggleSomethingWrongPopup:I.AW,setUserTVChannelsVolume:tn.Gq,setSelectedCategory:tn.Ao,pushStackAddItem:te.nD,toggleSubscriptionOfferPopup:I.gb,fetchContinueWatchingFail:L.tv,fetchedContinueWatching:L.uD},t)}))(tV));var tF=s(58553);let tq={setCardsCount:tn.xE,fetchedTVChannels:tn.cx,fetchedTVSelection:tn.YU};class tK extends l.Component{componentDidMount(){let t=new Date,e=t.getMonth()+1,s="".concat(t.getFullYear(),"-").concat(e>=10?e:"0".concat(e),"-").concat(t.getDate()),{dateString:i}=this.state;i!==s&&this.setState({dateString:s});let n=window.innerWidth>1024,a=window.innerWidth>1440,l=window.innerWidth,o=n?a?(0,c.Ie)(window.innerWidth,242):242:128,r=Math.floor((l-(n?a?(0,c.Ie)(window.innerWidth,56):56:24))/(o+16));this.props.setCardsCount(r)}componentWillUnmount(){this.props.fetchedTVChannels(),this.props.fetchedTVSelection(),this.props.setCardsCount(0)}componentDidUpdate(t){let{authData:e}=this.props.registration;if(e&&!this.loadAuth){this.loadAuth=!0;let t=-(new Date().getTimezoneOffset()/60);3!==t&&fetch("".concat(this.apiUrl).concat(C.PI.tv).concat(this.apiKey,"&tz=").concat(t),{credentials:"include",method:"GET"}).then(t=>{t.status<400?t.json().then(t=>{this.setState({tvData:t},()=>{this.props.fetchedTVChannels(t.selections)})}):this.setState({notFound:!0})})}let{id:s}=this.props,{id:i}=t;i&&i!==s&&this.setState({prevPropsId:i})}render(){var t;let{id:e,channel:s,epg:n,selection:a,archive:l,category:o,broadcast:r,currentProgram:c,breadcrumbs:_,date:h,historyReplaced:d}=this.props,{notFound:u,prevPropsId:p}=this.state,{config:m}=this.props.systemInformation;return u||!e?(0,i.jsx)(T.A,{}):(0,i.jsxs)(i.Fragment,{children:[(null==m?void 0:null===(t=m.popup)||void 0===t?void 0:t.allarmtv)==="on"?(0,i.jsx)(tF.default,{text:"ÐекоÑоÑÑе ÐºÐ°Ð½Ð°Ð»Ñ Ð¸ запиÑи Ñ Ð¢Ð Ð½ÐµÐ´Ð¾ÑÑÑпнÑ. СкоÑо вÑÑ Ð¿Ð¾Ñиним"}):null,(0,i.jsx)(tW,{alias:e,prevAlias:p,channel:s,epg:n,selection:a,archive:l,date:h,category:o,broadcast:r,currentProgram:c,breadcrumbs:_,historyReplaced:d})]})}constructor(...t){super(...t),this.state={tvData:null,notFound:null,dateString:this.props.dateString,prevPropsId:null},this.apiUrl=this.props.systemInformation.API_URL||c.H$,this.apiKey=this.props.systemInformation.API_KEY||c.Lq,this.loadAuth=!1}}let tG=(0,r.Ng)(t=>({systemInformation:t.systemInformation,registration:t.registration}),tq)(tK);class tz extends l.Component{static async getInitialProps(t){var e,s,i,n,a,l,o,r;let{id:_,date:h,category:d}=t.query,u=null==h?void 0:h[0],{asPath:p,req:m}=t,v=(null==m?void 0:m.originalUrl)||p;t.res&&_.toLowerCase()!==_&&t.res.redirect(301,v.replace(_,_.toLowerCase()));let g=t.req&&t.req.cookies&&"True"==t.req.cookies.FOR_KIDS||"True"===(0,x.Ri)("FOR_KIDS"),y=(null===(s=t.reduxStore.getState())||void 0===s?void 0:null===(e=s.systemInformation)||void 0===e?void 0:e.API_URL)||c.H$,b=(null===(n=t.reduxStore.getState())||void 0===n?void 0:null===(i=n.systemInformation)||void 0===i?void 0:i.API_KEY)||c.Lq,T=[],S=d,P=u||(0,x.sq)();await (0,x.Gf)(y,b,_,t,"channel",!0);let f="".concat(y).concat(C.PI.tv).concat(b,"&tz=3"),k=await fetch(f,{credentials:"include",method:"GET"}).then(t=>t.json()),w="".concat(y).concat(C.PI.tvchannel).concat(_).concat(b,"&tz=3&for_kids=").concat(g),j=await fetch(w,{credentials:"include",method:"GET"}).then(e=>{if(e.status<400)return e.json();t.res.statusCode=404,t.reduxStore.dispatch((0,I.GJ)(!0))});if(!d){let t=(0,x.Ri)("selectedTVcategory");t?S=t:(null==j?void 0:null===(r=j.selections)||void 0===r?void 0:r.length)&&(S=j.selections[0].alias)}let N="".concat(y).concat(null==j?void 0:j.epg).concat(b,"&tz=3&for_kids=").concat(g),D=(null==j?void 0:j.epg)&&await fetch(N,{credentials:"include",method:"GET"}).then(t=>t.json()),A=null==D?void 0:D.find(t=>t.date===P),H=null==A?void 0:null===(a=A.programs)||void 0===a?void 0:a.map((t,e)=>({...t,position:e})).find(t=>{let e=Math.floor(new Date().getTime()/1e3),s=Math.floor(new Date("".concat(A.date,"T").concat(t.start_time,":00")).getTime()/1e3),i=Math.floor(new Date("".concat(A.date,"T").concat(t.stop_time,":00")).getTime()/1e3);return s<e&&e<i});(null==k?void 0:null===(l=k.selections)||void 0===l?void 0:l.length)&&k.selections.map((e,s)=>{fetch("".concat(y).concat(e.url).concat(b,"&tz=3&for_kids=").concat(g),{credentials:"include",method:"GET"}).then(e=>{e.status<400&&e.json().then(e=>{T.splice(s,0,e),t.reduxStore.dispatch((0,tn.YU)(T))})})}),t.reduxStore.dispatch((0,tn.Ao)(S)),t.reduxStore.dispatch((0,tn.cx)(k.selections));let R="".concat(y).concat(C.PI.tvchannelv2).concat(null==j?void 0:j.id,"/catchups").concat(b,"&sort=default&skip=0&limit=20&category=movie&for_kids=").concat(g),E=await fetch(R,{credentials:"include",method:"GET"}).then(t=>t.json()),U=[{title:g?"ÐеÑÑкое ТÐ":"ТÐ",name:g?"ÐеÑÑкое ТÐ":"ТÐ",link:"/channel"},{title:null==j?void 0:j.title,name:null==j?void 0:j.title,link:"/channel/".concat(null==j?void 0:j.alias)}];u&&U.push({title:"".concat(P," онлайн"),name:"".concat(P," онлайн")});let M={"@context":"http://schema.org","@type":"ItemList",itemListElement:null==A?void 0:null===(o=A.programs)||void 0===o?void 0:o.map(t=>
1({"@type":"Event",name:t.title,description:t.description,location:{"@type":"VirtualLocation"},startDate:"".concat(P,"T").concat(t.start_time,":00+03:00"),endDate:"".concat(P,"T").concat(t.stop_time,":00+03:00"),performer:{"@type":"Organization",name:j.title},url:"https://start.ru/channel/".concat(null==j?void 0:j.alias)}))};return{id:_,channel:j,epg:D,selection:T,archive:E,categoryQuery:S,broadcast:A,currentProgram:H,breadcrumbs:U,json:M,date:u,category:d}}componentDidUpdate(t){var e;(null==t?void 0:t.channel)&&t.channel.alias!==(null===(e=this.props.channel)||void 0===e?void 0:e.alias)&&this.historyReplaced(this.props.channel)}render(){let{id:t,channel:e,epg:s,selection:n,archive:l,categoryQuery:r,broadcast:c,currentProgram:_,json:h,date:d}=this.props,{selectedDateString:u,breadcrumbs:p}=this.state,m=u?"".concat(e.title," - пÑогÑамма, онлайн ÑÑÐ¸Ñ Ð¢Ð ÐºÐ°Ð½Ð°Ð»Ð° Ð¾Ñ ").concat(u):"".concat(e.title," - пÑогÑамма, онлайн ÑÑÐ¸Ñ Ð¢Ð ÐºÐ°Ð½Ð°Ð»Ð°. ").concat(e.title," пÑÑмой ÑÑиÑ, пÑогÑамма пеÑÐµÐ´Ð°Ñ Ð¸ live на START");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a(),{children:(0,i.jsx)("script",{src:"/static/vitrina_sdk/websdk.js"})}),(0,i.jsx)(o.A,{title:m,description:"ТÑанÑлÑÑÐ¸Ñ Ñелеканала ".concat(e.title," Ð¾Ñ ").concat(u||d||(0,x.sq)()," в Ñ
оÑоÑем каÑеÑÑве. СмоÑÑиÑе пÑогÑÐ°Ð¼Ð¼Ñ Ñелеканала ").concat(e.title),breadCrumbs:p,canonical:"/channel/".concat(e.alias).concat(u?"/".concat(u):""),json:h}),(0,i.jsx)(tG,{id:t,channel:e,epg:s,selection:n,archive:l,date:u,category:r,broadcast:c,currentProgram:_,breadcrumbs:p,historyReplaced:this.historyReplaced})]})}constructor(t){super(t),this.getDateFromUrl=()=>{let t=window.location.pathname.split("/"),e=t[t.length-1];return 4===t.length?null!=e?e:this.props.date:null},this.historyReplaced=t=>{let{breadcrumbs:e}=this.state,s=this.getDateFromUrl();if(s){if(3==e.length){let t=e[e.length-1];t={title:"".concat(s," онлайн"),name:"".concat(s," онлайн")},e[e.length-1]=t}else e.push({title:"".concat(s," онлайн"),name:"".concat(s," онлайн")})}else 3==e.length&&e.pop(),t&&(e[1]={title:t.title,name:t.title,link:"/channel/".concat(t.alias)});this.setState({selectedDateString:s,breadcrumbs:e})},this.state={selectedDateString:t.date&&t.date!==(0,x.sq)()?t.date:null,breadcrumbs:t.breadcrumbs}}}let tZ=tz},11859:t=>{t.exports={"storybook-root":"StartPlayer_storybook-root__VTA0x",stopTransition:"StartPlayer_stopTransition__en3SV",main:"StartPlayer_main__WPuhO",main__pip:"StartPlayer_main__pip__dOKnH",wrapper:"StartPlayer_wrapper__m9SAp",close:"StartPlayer_close__VrBEo",middle:"StartPlayer_middle__L8Woj",middle__fade:"StartPlayer_middle__fade__vDIsh",subtitles:"StartPlayer_subtitles__nrh_r",recommended:"StartPlayer_recommended__Sdha0",controls:"StartPlayer_controls__4EkgO",controls__visible:"StartPlayer_controls__visible__RA5LL",controls__infoGradient:"StartPlayer_controls__infoGradient__eW242",visiblePlaylist:"StartPlayer_visiblePlaylist__8kxBi",playlistInfo:"StartPlayer_playlistInfo__3PXH3",invisiblePlaylistInfo:"StartPlayer_invisiblePlaylistInfo__soWFT",controls__bar:"StartPlayer_controls__bar__7gnyK",controls__barVisbile:"StartPlayer_controls__barVisbile__swuMh",controls__row:"StartPlayer_controls__row__3suNd",bottom:"StartPlayer_bottom__9yz2s",controls__mute:"StartPlayer_controls__mute__GpiUk",controls__fullWidth:"StartPlayer_controls__fullWidth__8xQYh",controls__smallMargin:"StartPlayer_controls__smallMargin__em4s0",controls__skip:"StartPlayer_controls__skip__V16yc",controls__skip__trailer:"StartPlayer_controls__skip__trailer__MEyCK",controls__skip_startOver:"StartPlayer_controls__skip_startOver__kU1tP",controls__skip_recsAtPause:"StartPlayer_controls__skip_recsAtPause__mbJzM",controls__barVisible__skip:"StartPlayer_controls__barVisible__skip__rtRxA",controls__buttonEmptyWrapper:"StartPlayer_controls__buttonEmptyWrapper__6uEUg",controls__buttonEmpty:"StartPlayer_controls__buttonEmpty__rpb_m",controls__buttonEmptyVisible:"StartPlayer_controls__buttonEmptyVisible__mA5lv",play_next:"StartPlayer_play_next__Ixhtw",slideRight:"StartPlayer_slideRight__8zbxO",controls__random:"StartPlayer_controls__random__xGsGy",controls__buttonEmptyLeft:"StartPlayer_controls__buttonEmptyLeft__QzpUk",controls__buttonEmptyRight:"StartPlayer_controls__buttonEmptyRight__cPgIa",controls__column:"StartPlayer_controls__column__mV9YO",controls__bottom:"StartPlayer_controls__bottom__V9UHy",controls__button:"StartPlayer_controls__button__SNs50",controls__button__text:"StartPlayer_controls__button__text__RZ6TD",unhovered:"StartPlayer_unhovered__sdQ9H",unhoveredPlaylist:"StartPlayer_unhoveredPlaylist__l1E51",controls__button__play:"StartPlayer_controls__button__play__N5dax",controls__tip:"StartPlayer_controls__tip__U0DDU",controls__volumeWrap:"StartPlayer_controls__volumeWrap__HtaUM",controls__playNext:"StartPlayer_controls__playNext__hhJkc",controls__button__playlist:"StartPlayer_controls__button__playlist__2Cq8h",controls__text:"StartPlayer_controls__text__IPe1u",controls__duration:"StartPlayer_controls__duration__qduIh",controls__progressWrap:"StartPlayer_controls__progressWrap__RCpCB",controls__progress:"StartPlayer_controls__progress__PWJLX",visibleThumb:"StartPlayer_visibleThumb__rVXTe",controls__progressThumb:"StartPlayer_controls__progressThumb__5hXGH",controls__progressLine:"StartPlayer_controls__progressLine__gZ_cQ",controls__progressActive:"StartPlayer_controls__progressActive__RFoAX",controls__progress_drag:"StartPlayer_controls__progress_drag__IOKeD",controls__progressHover:"StartPlayer_controls__progressHover__fcrfE",controls__volume:"StartPlayer_controls__volume__xlNIl",controls__volumeLine:"StartPlayer_controls__volumeLine__3Dl_P",controls__volumeActive:"StartPlayer_controls__volumeActive__7cUaB",controls__volumeThumb:"StartPlayer_controls__volumeThumb__B0QGH",controls__start:"StartPlayer_controls__start__Pk7Hi",controls__stop:"StartPlayer_controls__stop__3bc6U",controls__top:"StartPlayer_controls__top__LNrkD",controls__topVisbile:"StartPlayer_controls__topVisbile__3CE3Q",controls__video_title:"StartPlayer_controls__video_title__t_eHG",controls__info:"StartPlayer_controls__info__lzaLb",controls__infoVisible:"StartPlayer_controls__infoVisible__3Jeb4",controls__infoVisibleBottom:"StartPlayer_controls__infoVisibleBottom__1tn1G",controls__age:"StartPlayer_controls__age__Pqygf",controls__ageValue:"StartPlayer_controls__ageValue__M_u4E",controls__restrictionText:"StartPlayer_controls__restrictionText__vqVfd",controls__ageData:"StartPlayer_controls__ageData__bF65e",controls__metaInc:"StartPlayer_controls__metaInc__snj4g",controls__close:"StartPlayer_controls__close__qaNJd",controls__favorite:"StartPlayer_controls__favorite__UUe7W",controls__favorite__tip_off:"StartPlayer_controls__favorite__tip_off__roBVn",controls__favorite__off:"StartPlayer_controls__favorite__off__lFJp7",controls__volumeImage:"StartPlayer_controls__volumeImage__CMoMU",controls__volumeImage__active:"StartPlayer_controls__volumeImage__active__YBICv",controls__volumeWrap__close:"StartPlayer_controls__volumeWrap__close__DYQkz",controls__qualities:"StartPlayer_controls__qualities__XnV9H",controls__qualities__visible:"StartPlayer_controls__qualities__visible__Y9CFq",controls__qualitiesBg:"StartPlayer_controls__qualitiesBg__ecq2i",controls__qualitiesImage:"StartPlayer_controls__qualitiesImage__RUTjv",controls__captions:"StartPlayer_controls__captions___GTXT",controls__qualitiesWrapper:"StartPlayer_controls__qualitiesWrapper__NXHO9",controls__qualitiesNoGrid:"StartPlayer_controls__qualitiesNoGrid__sLQ3e",controls__captions__close:"StartPlayer_controls__captions__close__EVo5P",controls__captionsMultiply:"StartPlayer_controls__captionsMultiply__5r_ro",controls__captionsBg:"StartPlayer_controls__captionsBg__fsuo3",controls__captionsWrapper:"StartPlayer_controls__captionsWrapper__rADTT",controls__captionsNoGrid:"StartPlayer_controls__captionsNoGrid__L9o2m",controls__caption:"StartPlayer_controls__caption__oaLTz",controls__captionSelected:"StartPlayer_controls__captionSelected__V2Ery",mobile:"StartPlayer_mobile__TLPBf",mobile__title:"StartPlayer_mobile__title__lZNYS",mobile__captionsWrapper:"StartPlayer_mobile__captionsWrapper__7PYwc",mobile__close:"StartPlayer_mobile__close__PBfwP",controls__title:"StartPlayer_controls__title__PLmj2",controls__quality:"StartPlayer_controls__quality__N9AK
1I",controls__qualitySelected:"StartPlayer_controls__qualitySelected__L9Bsj",controls__tipPrevTen:"StartPlayer_controls__tipPrevTen__5nhao",controls__tipNextTen:"StartPlayer_controls__tipNextTen__b6dP4",controls__tipPip:"StartPlayer_controls__tipPip__mXeZd",controls__tipPip__active:"StartPlayer_controls__tipPip__active__TJrbl",controls__tipTriangle:"StartPlayer_controls__tipTriangle__g1nfO",controls__tipFullscreen:"StartPlayer_controls__tipFullscreen__ovm_k",controls__tipFullscreenOff:"StartPlayer_controls__tipFullscreenOff__8e0Qj",controls__tipPlaylist:"StartPlayer_controls__tipPlaylist__Wzf7X",controls__tipPlaylistLess:"StartPlayer_controls__tipPlaylistLess__gsHDZ",controls__tipVolume:"StartPlayer_controls__tipVolume__0lm5V",controls__tipWrapper:"StartPlayer_controls__tipWrapper__5C8qF",controls__tipIconWrap:"StartPlayer_controls__tipIconWrap__PhUWN",controls__tipIcon:"StartPlayer_controls__tipIcon__AcTTF",controls__tipError:"StartPlayer_controls__tipError__t5b_e",controls__tipClose:"StartPlayer_controls__tipClose__xvi48",controls__series_similar_popup:"StartPlayer_controls__series_similar_popup__K423v",controls__series_similar_popup__active:"StartPlayer_controls__series_similar_popup__active__hAe37",controls__series_similar_popup__hided:"StartPlayer_controls__series_similar_popup__hided__UoPzn",controls__tipText:"StartPlayer_controls__tipText__gxgss",controls__playNextHead:"StartPlayer_controls__playNextHead___GMNp",controls__playNextData:"StartPlayer_controls__playNextData__MmADg",controls__playNextImage:"StartPlayer_controls__playNextImage__P5wUX",controls__playNextContent:"StartPlayer_controls__playNextContent__XoSmL",controls__playNextTitle:"StartPlayer_controls__playNextTitle__98pN_",controls__playNextDuration:"StartPlayer_controls__playNextDuration__AsaIT",controls__settings:"StartPlayer_controls__settings__U3C2G",controls__settings__wrapper:"StartPlayer_controls__settings__wrapper__oEGAb",controls__settings__wrapper__active:"StartPlayer_controls__settings__wrapper__active___HY_X",controls__settings__title:"StartPlayer_controls__settings__title__rl5g8",controls__settings__title__active:"StartPlayer_controls__settings__title__active__1749E",controls__settings__menu:"StartPlayer_controls__settings__menu__UrOUB",controls__settings__menu__wrapper:"StartPlayer_controls__settings__menu__wrapper__Vu2WA",controls__settings__menu__content:"StartPlayer_controls__settings__menu__content__Dd4oK",controls__settings__menu__item:"StartPlayer_controls__settings__menu__item__13jSW",controls__settings__menu__item__selectedIcon:"StartPlayer_controls__settings__menu__item__selectedIcon__RiAfK",controls__settings__menu__item__space:"StartPlayer_controls__settings__menu__item__space__F8Nq7",controls__settings__disabled:"StartPlayer_controls__settings__disabled__XYIwJ",controls__settings__menu__item__name:"StartPlayer_controls__settings__menu__item__name__CVSe6",controls__settings__menu__item__value:"StartPlayer_controls__settings__menu__item__value__sgjLC",controls__settings__menu__item__ones:"StartPlayer_controls__settings__menu__item__ones__AW0ue",controls__settings__quality__icon:"StartPlayer_controls__settings__quality__icon__FHQlk",controls__settings__menu__item__desc:"StartPlayer_controls__settings__menu__item__desc__wWQRT",controls__settings__quality:"StartPlayer_controls__settings__quality__VXNmj",controls__settings__active:"StartPlayer_controls__settings__active__flNyk",controls__settings__group:"StartPlayer_controls__settings__group__2ORLD",title:"StartPlayer_title__4d3nF",controls__disabled:"StartPlayer_controls__disabled__D81za",pip:"StartPlayer_pip__WSwSf",pip__wrapper:"StartPlayer_pip__wrapper__uCLuf",pip__text:"StartPlayer_pip__text___BvGC",onboarding:"StartPlayer_onboarding___RmxF",onboarding__speed:"StartPlayer_onboarding__speed__ZmYcn",promo:"StartPlayer_promo__tlrHy",less:"StartPlayer_less___2pek",promo__cap:"StartPlayer_promo__cap__wuNuu",promo__controls:"StartPlayer_promo__controls__GIWk4",promo__close:"StartPlayer_promo__close__XcHs_",promo__content:"StartPlayer_promo__content__gjL1h",promo__skip:"StartPlayer_promo__skip__zVrKL",promo__skip__preroll:"StartPlayer_promo__skip__preroll__CQr85",promo__info:"StartPlayer_promo__info__u0dxm",promo__logo:"StartPlayer_promo__logo___IScc",promo__data:"StartPlayer_promo__data__JnqK_",promo__hidden:"StartPlayer_promo__hidden__sQpQk",promo__divider:"StartPlayer_promo__divider__IOpKq",promo__age:"StartPlayer_promo__age__rQPGS",promo__buttons:"StartPlayer_promo__buttons__Z_YPi",promo__play:"StartPlayer_promo__play__FvGDY",promo__play__full:"StartPlayer_promo__play__full__YTCZg",promo__mute__with__text:"StartPlayer_promo__mute__with__text__CPJla",promo__mute__without__buttons:"StartPlayer_promo__mute__without__buttons__b_8sn",promo__favorites:"StartPlayer_promo__favorites__zoC3z",spinner:"StartPlayer_spinner__6scFz",minimal:"StartPlayer_minimal__EPm_H",minimal__hide:"StartPlayer_minimal__hide__BWhsS",currentEpisode:"StartPlayer_currentEpisode__A2D8k",episode:"StartPlayer_episode__53IaD",invisible:"StartPlayer_invisible__tRjxw",playlist__title:"StartPlayer_playlist__title__cm9_J",playlist__title_simillar:"StartPlayer_playlist__title_simillar__CqPbG",animatedButton:"StartPlayer_animatedButton___ffdH",animatedVisible:"StartPlayer_animatedVisible__w4YCT",playPauseButton:"StartPlayer_playPauseButton__ef0GG",recommendedPopupWrapper:"StartPlayer_recommendedPopupWrapper__xRVfg",recommendedPopupWrapper_visible:"StartPlayer_recommendedPopupWrapper_visible__coVob",recommendedPopup:"StartPlayer_recommendedPopup__tm251",recommendedPopup__hidden:"StartPlayer_recommendedPopup__hidden__m93_q",controls__navigate:"StartPlayer_controls__navigate__8mBPL",disabled:"StartPlayer_disabled__n7qYU",controls__button__playpause:"StartPlayer_controls__button__playpause__hbbuw",controls__navigate__hided:"StartPlayer_controls__navigate__hided__SeAx5",controls__captions__title:"StartPlayer_controls__captions__title__T0QVF",controls__captions__captionsWrapper:"StartPlayer_controls__captions__captionsWrapper__5f05y",controls__column__right:"StartPlayer_controls__column__right__Y6USG",playlistTitle:"StartPlayer_playlistTitle__B4zIB",small:"StartPlayer_small__uF8e1",controls__hidden:"StartPlayer_controls__hidden__9zpQR",right:"StartPlayer_right__FnMjY",poster:"StartPlayer_poster__NbJsJ",poster__shape:"StartPlayer_poster__shape__mbYx3",promo__trailer:"StartPlayer_promo__trailer__bCtWu",controls__back:"StartPlayer_controls__back__VyioX",promo__buttons__start:"StartPlayer_promo__buttons__start__nTrq0",wrapper__series_similar_popup:"StartPlayer_wrapper__series_similar_popup__3eo4n",promo__mute:"StartPlayer_promo__mute__HSQ1Y",arrows:"StartPlayer_arrows__YMj9x",phone:"StartPlayer_phone__etCvn",rotateArrows:"StartPlayer_rotateArrows__vDyq8",rotatePhone:"StartPlayer_rotatePhone__UCWix"}},6321:t=>{t.exports={"storybook-root":"TVChannelsFavorite_storybook-root__INGVG",container:"TVChannelsFavorite_container__CYHGS",favorite:"TVChannelsFavorite_favorite__BtpxD",favorite__icon:"TVChannelsFavorite_favorite__icon__Yw5UP",favorite__icon_active:"TVChannelsFavorite_favorite__icon_active__DVL1V","favorite-inline":"TVChannelsFavorite_favorite-inline__Fvy0m","favorite-inline__icon":"TVChannelsFavorite_favorite-inline__icon__DbdoI","favorite-inline__icon_active":"TVChannelsFavorite_favorite-inline__icon_active__fCKxA","favorite-inline-big":"TVChannelsFavorite_favorite-inline-big__LyQof","favorite-inline-big__icon":"TVChannelsFavorite_favorite-inline-big__icon__oNY4B","favorite-inline-big__icon_active":"TVChannelsFavorite_favorite-inline-big__icon_active__wWCqe",tooltip:"TVChannelsFavorite_tooltip__nEOA3",tooltip__triangle:"TVChannelsFavorite_tooltip__triangle__m1eOX","tooltip-big":"TVChannelsFavorite_tooltip-big__HDtrP","tooltip-big__triangle":"TVChannelsFavorite_tooltip-big__triangle__Dd4eD"}},99221:t=>{t.exports={"storybook-root":"TVChannelsNotAvailable_storybook-root__PFbmH",root:"TVChannelsNotAvailable_root__zKbSM",cover:"TVChannelsNotAvailable_cover__tiuaB",content:"TVChannelsNotAvailable_content__e7dxl",icon:"TVChannelsNotAvailable_icon__Tvll_",title:"TVChannelsNotAvailable_title__Jjy7Q",description:"TVChannelsNotAvailable_description__ffUir"}}
1,24801:t=>{t.exports={"storybook-root":"TvChanelPlayerStab_storybook-root__TY_jQ",container:"TvChanelPlayerStab_container__PwQ19",title:"TvChanelPlayerStab_title__UiuDd",titleShort:"TvChanelPlayerStab_titleShort__sZ4RZ",list:"TvChanelPlayerStab_list__4U2j7",item:"TvChanelPlayerStab_item__Ik9y1",icon:"TvChanelPlayerStab_icon__iBSw7"}},10318:t=>{t.exports={"storybook-root":"TVChannelPremiumStab_storybook-root__dmX2I",root:"TVChannelPremiumStab_root__YCTM7",content:"TVChannelPremiumStab_content__QztnM",header:"TVChannelPremiumStab_header__QDCAE",header_title:"TVChannelPremiumStab_header_title__hiTLD",header_logo:"TVChannelPremiumStab_header_logo__Lqskl",price:"TVChannelPremiumStab_price__mcHNW",price__amount:"TVChannelPremiumStab_price__amount__1KOqH",price__info:"TVChannelPremiumStab_price__info__TOig0",action_button:"TVChannelPremiumStab_action_button__X69Oq"}},37367:t=>{t.exports={"storybook-root":"Tooltip_storybook-root__JX5cF",container:"Tooltip_container__DzzeJ",tip:"Tooltip_tip__dVgOg",tip__triangle:"Tooltip_tip__triangle__Hzk88",tip__text:"Tooltip_tip__text__Nz0VI"}}},t=>{var e=e=>t(t.s=e);t.O(0,[6722,3386,5299,5858,494,1437,9679,4497,8311,25,636,6593,8792],()=>e(74626)),_N_E=t.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.