magcore-app-tv-classic
Version:
Watch digital quality TV shows, movies, TV series, news and educational programs.
1 lines • 103 kB
JavaScript
!function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=20)}([function(e,t,i){"use strict";var n=i(29);n.back=n.backspace,n.channelNext=n.tab,n.channelPrev=n.tab+"s",n.ok=n.enter,n.exit=n.escape,n.volumeUp=107,n.volumeDown=109,n.f1="112c",n.f2="113c",n.f3="114c",n.f4="115c",n.refresh="116c",n.frame="117c",n.phone="119c",n.set="120c",n.tv="121c",n.menu="122c",n.app="123c",n.rewind="66a",n.forward="70a",n.audio="71a",n.standby="74a",n.keyboard="76a",n.usbMounted="80a",n.usbUnmounted="81a",n.playPause="82a",n.play=-1,n.pause=-1,n.stop="83a",n.power="85a",n.record="87a",n.info="89a",n.mute="192a",n.digit0=48,n.digit1=49,n.digit2=50,n.digit3=51,n.digit4=52,n.digit5=53,n.digit6=54,n.digit7=55,n.digit8=56,n.digit9=57,e.exports=n},function(e,t,i){"use strict";var n=i(21);e.exports=n},function(e,t,i){"use strict";var n=i(9),s=i(22).parse,o=new n;o.query=s(document.location.search.substring(1)),o.config=i(23),o.activePage=null,o.route=function(e,t){var i,n=o.activePage;return!(!e||e.active)&&(e.name,e.id,e.name,e.id,(i=o.activePage)&&i.active&&(i.$node.classList.remove("active"),i.active=!1,o.activePage=null,i.name,i.id,i.name,i.id,i.events["hide"]&&i.emit("hide")),function(e,t){!e||e.active||(e.$node.classList.add("active"),e.active=!0,o.activePage=e,e.name,e.id,e.name,e.id,e.events["show"]&&e.emit("show",{data:t}))}(e,t),this.events["route"]&&this.emit("route",{from:n,to:e}),!0)},e.exports=o},function(e,t,i){"use strict";e.exports=i(6)},function(e,t,i){"use strict";var n=i(8),s=i(37);function o(e){var t=this;e=e||{},this.handlers={},this.links={},this.$noData=null,e.propagate=void 0===e.propagate||e.propagate,this.fixedData=e.fixedData||!1,e.$body=document.createElement("div"),e.$body.className="body",this.$noData=document.createElement("div"),this.$noData.className="noData hidden",n.call(this,e),this.$node.appendChild(this.$body),this.$node.appendChild(this.$noData),this.addListener("click:item",function(e){e.$item.layout.children.length&&!e.inner&&e.$item.layout.children[e.$item.layout.focusIndex].focus(),e.inner&&(t.focus(),t.focusItem(e.$item)),t.handlers[e.$item.index]&&t.handlers[e.$item.index](e.$item)})}o.prototype=Object.create(n.prototype),o.prototype.constructor=o,o.prototype.name="mag-component-layout-list",o.prototype.renderItemDefault=function(e,t){var i,n,o,a,c;if(e.ready&&this.fixedData)for(c=0;c<t.items.length;c++)"string"!=typeof(a=t.items[c]).value&&void 0!==a.value||((o=e.layout.$node.childNodes[c]).innerText=a.value||"",o.className=a.className||"");else{for(;e.firstChild;)e.removeChild(e.firstChild);n={focusable:!1,data:t.items},t.className&&(n.className=t.className),i=new s(n),t.name&&(this.links[t.name]=i),e.appendChild(i.$node),e.layout=i,i.parent=this,i.$parentItem=e,i.addListener("click",function(){i.parent.emit("click:item",{$item:e,inner:!0})}),t.click&&(this.handlers[e.index]=t.click),e.ready=!0}e.value=t.value||{}},o.prototype.setData=function(e){this.links={},n.prototype.setData.call(this,e),e.data&&e.data.length?this.$noData.classList.add("hidden"):this.$noData.classList.remove("hidden")},o.prototype.init=function(e){var t;n.prototype.init.call(this,e),e.noData&&(this.$noData.innerHTML="",e.noData instanceof Element?this.$noData.appendChild(e.noData):"string"==typeof e.noData&&((t=document.createElement("div")).innerText=e.noData,this.$noData.appendChild(t))),e.data&&e.data.length?this.$noData.classList.add("hidden"):this.$noData.classList.remove("hidden")},o.prototype.renderItem=o.prototype.renderItemDefault,e.exports=o},function(e,t){e.exports={RC_F1:"theme-icon theme-icon-rc-f1",RC_F2:"theme-icon theme-icon-rc-f2",RC_F3:"theme-icon theme-icon-rc-f3",RC_F4:"theme-icon theme-icon-rc-f4",PLAY:"theme-icon theme-icon-play",PAUSE:"theme-icon theme-icon-pause",PREVIOUS:"theme-icon theme-icon-previous",NEXT:"theme-icon theme-icon-next",REWIND:"theme-icon theme-icon-rewind",FORWARD:"theme-icon theme-icon-forward",EXIT:"theme-icon theme-icon-exit",CHANNEL_MINUS:"theme-icon theme-icon-channel-minus",CHANNEL_PLUS:"theme-icon theme-icon-channel-plus",VOLUME:"theme-icon theme-icon-volume",MUTE:"theme-icon theme-icon-mute",FAVORITE_ACTIVE:"theme-icon theme-icon-favorite-active",FAVORITE:"theme-icon theme-icon-favorite",TIMESHIFT:"theme-icon theme-icon-timeshift",DISPLAY:"theme-icon theme-icon-display",SOUND:"theme-icon theme-icon-sound",PIP:"theme-icon theme-icon-pip",ASPECT:"theme-icon theme-icon-aspect",MENU:"theme-icon theme-icon-menu",CATEGORIES:"theme-icon theme-icon-categories",EQUALIZER:"theme-icon theme-icon-equalizer",SORT_AZ:"theme-icon theme-icon-sort-az",SEARCH:"theme-icon theme-icon-search",SETTINGS:"theme-icon theme-icon-settings",LOCK:"theme-icon theme-icon-lock",DVB_POWER_ON:"theme-icon theme-icon-dvb-power-on",CHECKBOX:"theme-icon theme-icon-checkbox",CHECKBOX_ACTIVE:"theme-icon theme-icon-checkbox-active",RC_OK:"theme-icon theme-icon-rc-ok",RC_INFO:"theme-icon theme-icon-rc-info",RC_MENU:"theme-icon theme-icon-rc-menu",RC_PLAY_PAUSE:"theme-icon theme-icon-rc-play-pause",RADIO:"theme-icon theme-icon-radio",RADIO_ACTIVE:"theme-icon theme-icon-radio-active",RC_BACK:"theme-icon theme-icon-rc-back",RC_HOME:"theme-icon theme-icon-rc-home",RC_STOP:"theme-icon theme-icon-rc-stop",RC_PREVIOUS:"theme-icon theme-icon-rc-previous",RC_NEXT:"theme-icon theme-icon-rc-next",RC_REWIND:"theme-icon theme-icon-rc-rewind",RC_FORWARD:"theme-icon theme-icon-rc-forward",RC_SETTINGS:"theme-icon theme-icon-rc-settings",RC_VOLUME_UP:"theme-icon theme-icon-rc-volume-up",RC_VOLUME_DOWN:"theme-icon theme-icon-rc-volume-down",RC_MUTE:"theme-icon theme-icon-rc-mute",SUN:"theme-icon theme-icon-sun",MOON:"theme-icon theme-icon-moon",CLOUD_SUN:"theme-icon theme-icon-cloud-sun",CLOUD_MOON:"theme-icon theme-icon-cloud-moon",RAIN:"theme-icon theme-icon-rain",HEAVY_RAIN:"theme-icon theme-icon-heavy-rain",SNOW:"theme-icon theme-icon-snow",CLOUD:"theme-icon theme-icon-cloud",CLOUD_SUN_2:"theme-icon theme-icon-cloud-sun-2",RC_ASPECT:"theme-icon theme-icon-rc-aspect",RC_POWER:"theme-icon theme-icon-rc-power",RC_APP:"theme-icon theme-icon-rc-app",RC_TV:"theme-icon theme-icon-rc-tv",EQUALIZER_0:"theme-icon theme-icon-equalizer-0",EQUALIZER_1:"theme-icon theme-icon-equalizer-1",EQUALIZER_2:"theme-icon theme-icon-equalizer-2",EQUALIZER_3:"theme-icon theme-icon-equalizer-3",EQUALIZER_4:"theme-icon theme-icon-equalizer-4",STOP:"theme-icon theme-icon-stop",UP:"theme-icon theme-icon-up",DOWN:"theme-icon theme-icon-down",WARNING:"theme-icon theme-icon-warning",FILTER:"theme-icon theme-icon-filter",CLOCK:"theme-icon theme-icon-clock",OK:"theme-icon theme-icon-ok",CANCEL:"theme-icon theme-icon-cancel",GENRES:"theme-icon theme-icon-genres",TELETEXT:"theme-icon theme-icon-teletext",SUBTITLES:"theme-icon theme-icon-subtitles",RC_VK:"theme-icon theme-icon-rc-vk",RC_REFRESH:"theme-icon theme-icon-rc-refresh",SELECT_ALL:"theme-icon theme-icon-select-all",MOVE:"theme-icon theme-icon-move",EDIT:"theme-icon theme-icon-edit",MORE:"theme-icon theme-icon-more",NOT_ALLOWED:"theme-icon theme-icon-not-allowed",TOGGLE:"theme-icon theme-icon-toggle",TOGGLE_ACTIVE:"theme-icon theme-icon-toggle-active",TELETEXT_RATIO:"theme-icon theme-icon-teletext-ratio",HOME:"theme-icon theme-icon-home",RESET:"theme-icon theme-icon-reset",INTERNET:"theme-icon theme-icon-internet",LAN:"theme-icon theme-icon-lan",SCALE:"theme-icon theme-icon-scale",VIRTUAL_MOUSE:"theme-icon theme-icon-virtual-mouse",REFRESH:"theme-icon theme-icon-refresh",NAVIGATE:"theme-icon theme-icon-navigate",DOWNLOAD:"theme-icon theme-icon-download",AVATAR:"theme-icon theme-icon-avatar",MONITOR:"theme-icon theme-icon-monitor",SUPPORT:"theme-icon theme-icon-support",SLIDESHOW:"theme-icon theme-icon-slideshow",SHUFFLE:"theme-icon theme-icon-shuffle",REPEAT:"theme-icon theme-icon-repeat",ROTATE:"theme-icon theme-icon-rotate",ROTATE_BACK:"theme-icon theme-icon-rotate-back",ZOOM_IN:"theme-icon theme-icon-zoom-in",COLOR:"theme-icon theme-icon-color",CLEAR:"theme-icon theme-icon-clear",OPACITY:"theme-icon theme-icon-opacity",HDMI:"theme-icon theme-icon-hdmi",DVB:"theme-icon theme-icon-DVB",NTP_SERVER:"theme-icon theme-icon-ntp-server",SCREENSAVER:"theme-icon theme-icon-screensaver",INTERFACE:"theme-icon theme-icon-interface",RC:"theme-icon theme-icon-rc",CATEGORIES_ROTATE:"theme-icon theme-icon-categories-rotate",STANDBY:"theme-icon theme-icon-standby",LANGUAGES:"theme-icon theme-icon-languages",BRIGHTNESS:"theme-icon theme-icon-brightness",BRIGHTNESS_STANDBY:"theme-icon theme-icon-brightness-standby",CLOCK_ON_PLAYBACK:"theme-icon theme-icon-clock-on-playback",PORTAL:"theme-icon theme-icon-portal",SCREENSAVER_INTERVAL:"theme-icon theme-icon-screensaver-interval",TIMEZONE:"theme-icon theme-icon-timezone",REBOOT:"theme-icon theme-icon-reboot",LINKED:"theme-icon theme-icon-linked",WIFI:"theme-icon theme-icon-wifi",ETHERNET:"theme-icon theme-icon-ethernet",MULTICAST:"theme-icon theme-icon-multicast",GLOBE:"theme-icon theme-icon-globe",RELOAD:"theme-icon theme-icon-reload",SAND_CLOCK:"theme-icon theme-icon-sand-clock",FONT_SIZE:"theme-icon theme-icon-font-size",BACK:"theme-icon theme-icon-back",SD_CARD:"theme-icon theme-icon-sd-card",HDD:"theme-icon theme-icon-hdd",USB:"theme-icon theme-icon-usb",NETWORK:"theme-icon theme-icon-network",UPNP:"theme-icon theme-icon-upnp",FILE:"theme-icon theme-icon-file",FOLDER:"theme-icon theme-icon-folder",WORKGROUP:"theme-icon theme-icon-workgroup",SERVER:"theme-icon theme-icon-server",SHARED_FOLDER:"theme-icon theme-icon-shared-folder",SHORTCUT:"theme-icon theme-icon-shortcut",CREATE_FOLDER:"theme-icon theme-icon-create-folder",BETA:"theme-icon theme-icon-beta",UPDATE:"theme-icon theme-icon-update",ALARM_CLOCK:"theme-icon theme-icon-alarm-clock",PLUS:"theme-icon theme-icon-plus",AUDIO:"theme-icon theme-icon-audio",IMAGE:"theme-icon theme-icon-image",VIDEO:"theme-icon theme-icon-video",TEXT:"theme-icon theme-icon-text",STREAM:"theme-icon theme-icon-stream",RECORD:"theme-icon theme-icon-record",ISO:"theme-icon theme-icon-iso",CUE:"theme-icon theme-icon-cue",PLAYLIST:"theme-icon theme-icon-playlist",_date:1510737340160}},function(e,t,i){"use strict";var n=i(2),s=i(9),o=0;function a(e){var t,i=this;if(e=e||{},this.visible=!0,this.focusable=!0,this.$node=null,this.$body=null,this.parent=null,this.children=[],this.propagate=!!e.propagate,s.call(this),this.$node=e.$node||document.createElement("div"),this.$body=e.$body||this.$node,this.$node.className=this.name+" "+(e.className||""),this.id=e.id||this.$node.id||"cid"+o++,e.parent&&e.parent.add(this),!1===e.visible&&this.hide(),!1===e.focusable&&(this.focusable=!1),this.defaultEvents)for(t in e.events=e.events||{},this.defaultEvents)e.events[t]=e.events[t]||this.defaultEvents[t];e.events&&Object.keys(e.events).forEach(function(t){i.addListener(t,e.events[t])}),e.children&&this.add.apply(this,e.children),this.$node.addEventListener("click",function(e){i.focus(),i.events["click"]&&i.emit("click",e),e.stopPropagation()}),this.name,this.id,this.name,this.id}a.prototype=Object.create(s.prototype),a.prototype.constructor=a,a.prototype.defaultEvents=null,a.prototype.add=function(e){var t;for(t=0;t<arguments.length;t++)e=arguments[t],this.children.push(e),e.parent=this,e.$node&&null===e.$node.parentNode&&this.$body.appendChild(e.$node),e.name,e.id,this.name,this.id,this.name,this.id,e.name,e.id,this.events["add"]&&this.emit("add",{item:e})},a.prototype.remove=function(){this.parent&&(n.activePage.activeComponent===this&&(this.blur(),this.parent.focus()),this.parent.children.splice(this.parent.children.indexOf(this),1)),this.children.forEach(function(e){e.remove()}),this.$node.parentNode.removeChild(this.$node),this.events["remove"]&&this.emit("remove"),this.events={},this.name,this.id,this.name,this.id},a.prototype.focus=function(e){var t=n.activePage,i=t.activeComponent;return!(!this.focusable||this===i)&&(i&&i.blur(),t.activeComponent=i=this,i.$node.classList.add("focus"),this.name,this.id,this.name,this.id,i.events["focus"]&&i.emit("focus",e),!0)},a.prototype.blur=function(){var e=n.activePage,t=e.activeComponent;return this.$node.classList.remove("focus"),this===t?(e.activeComponent=null,this.name,this.id,this.name,this.id,this.events["blur"]&&this.emit("blur"),!0):(this.name,this.id,this.name,this.id,!1)},a.prototype.show=function(e,t){return!this.visible&&(this.$node.classList.remove("hidden"),this.visible=!0,this.name,this.id,this.name,this.id,this.events["show"]&&this.emit("show",e),"function"==typeof t&&setTimeout(t),!0)},a.prototype.hide=function(e){return!!this.visible&&(this.$node.classList.add("hidden"),this.visible=!1,this.name,this.id,this.name,this.id,this.events["hide"]&&this.emit("hide"),"function"==typeof e&&setTimeout(e),!0)},e.exports=a},function(e,t,i){"use strict";var n=i(35),s=i(3),o=i(0);function a(e){var t,i,s,a=this;(e=e||{}).events=e.events||{},e.focusable=e.focusable||!1,e.visible=e.visible||!1,e.events.click=e.events.click||function(){a.hide()},s=e.events.keydown,e.events.keydown=function(e){s&&s.call(this,e),e.code!==o.back&&e.code!==o.menu||(e.stop=!0,a.hide())},n.call(this,e),this.$node.appendChild(document.createElement("div")),this.$node.firstChild.classList.add("alignBox"),this.$node.firstChild.appendChild(document.createElement("div")),this.$header=document.createElement("div"),this.$header.className="header",this.$text=this.$header.appendChild(document.createElement("div")),this.$text.classList.add("text"),this.$text.innerText=e.title||"",e.icon&&(this.$icon=this.$header.appendChild(document.createElement("div")),this.$icon.className="icon "+e.icon),(t=document.createElement("div")).className="overlay",i=this.$body.parentNode.removeChild(this.$body),this.$node.firstChild.firstChild.appendChild(this.$header),this.$node.firstChild.firstChild.appendChild(i),this.$node.firstChild.firstChild.appendChild(t)}a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.prototype.name="mag-component-modal",a.prototype.focus=function(){this.$node.classList.add("active"),n.prototype.focus.call(this),this.children[0]&&this.children[0]instanceof s&&this.children[0].focus()},a.prototype.blur=function(){this.$node.classList.remove("active"),n.prototype.blur.call(this)},e.exports=a},function(e,t,i){"use strict";var n=i(3),s=i(0);function o(e){e=e||{},this.$focusItem=null,this.viewIndex=null,this.data=[],this.type=this.TYPE_VERTICAL,this.size=5,this.cycle=!1,this.scroll=null,e.type&&(this.type=e.type),this.provider=null,this.type===this.TYPE_HORIZONTAL&&(e.className+=" horizontal"),n.call(this,e),this.init(e)}o.prototype=Object.create(n.prototype),o.prototype.constructor=o,o.prototype.name="mag-component-list",o.prototype.TYPE_VERTICAL=1,o.prototype.TYPE_HORIZONTAL=2,o.prototype.renderItemDefault=function(e,t){e.innerText=t.value},o.prototype.renderItem=o.prototype.renderItemDefault,o.prototype.defaultEvents={mousewheel:function(e){this.type===this.TYPE_VERTICAL&&e.wheelDeltaY&&this.move(e.wheelDeltaY>0?s.up:s.down),this.type===this.TYPE_HORIZONTAL&&e.wheelDeltaX&&this.move(e.wheelDeltaX>0?s.left:s.right)},keydown:function(e){switch(e.code){case s.up:case s.down:case s.right:case s.left:case s.pageUp:case s.pageDown:case s.home:case s.end:this.move(e.code);break;case s.enter:this.events["click:item"]&&this.$focusItem&&this.emit("click:item",{$item:this.$focusItem,event:e})}}},o.prototype.init=function(e){var t,i,n=this,s=this.$body.children.length,o=function(e){this.data&&(n.focusItem(this),n.events["click:item"]&&n.emit("click:item",{$item:this,event:e}))};if(void 0!==e.cycle&&(this.cycle=e.cycle),e.scroll&&(this.scroll=e.scroll),e.provider&&(this.provider=e.provider),e.render&&(this.renderItem=e.render),e.size&&(this.size=e.size),e.events&&Object.keys(e.events).forEach(function(t){n.events[t]=null,n.addListener(t,e.events[t])}),this.size!==s)for(s>0&&(this.$body.innerText=null),i=0;i<this.size;i++)(t=document.createElement("div")).index=i,t.className="item",t.addEventListener("click",o),this.$body.appendChild(t);if(this.provider){if(this.provider.blocked)return;this.provider.get(null,function(t,i){t?n.events["data:error"]&&n.emit("data:error",t):(i&&(e.data=i,n.setData(e),n.scroll&&n.scroll.init({realSize:n.provider.maxCount,viewSize:n.provider.size,value:n.provider.head+n.provider.pos})),n.events["data:get"]&&n.emit("data:get"))})}else e.data&&this.setData(e)},o.prototype.setData=function(e){e.data&&(this.data=function(e){var t;for(t=0;t<e.length;t++)"object"!=typeof e[t]&&(e[t]={value:e[t]});return e}(e.data)),this.viewIndex=null,this.$focusItem&&this.blurItem(this.$focusItem),this.scroll&&(this.provider?this.scroll.realSize!==this.provider.maxCount&&this.scroll.init({realSize:this.provider.maxCount,viewSize:this.provider.size,value:this.provider.head+this.provider.pos}):this.scroll.init({realSize:this.data.length,viewSize:this.size,value:e.viewIndex||0})),void 0!==e.focusIndex&&this.data.length?this.focusIndex(e.focusIndex):this.renderView(e.viewIndex||0)},o.prototype.renderView=function(e){var t,i,n,s,o;if(this.viewIndex!==e){for(s=this.viewIndex,this.viewIndex=o=e,i=0;i<this.size;i++)t=this.$body.children[i],(n=this.data[e])?(t.data=n,t.index=e,this.renderItem(t,n),n.mark?t.classList.add("mark"):t.classList.remove("mark")):(t.data=t.index=void 0,t.innerHTML=" ",t.ready=!1),e++;return this.events["move:view"]&&this.emit("move:view",{prevIndex:s,currIndex:o}),this.events["select:item"]&&this.emit("select:item",{$item:t}),this.scroll&&this.scroll.scrollTo(this.provider?this.provider.head+this.provider.pos:this.viewIndex),!0}return!1},o.prototype.move=function(e){var t=this,i=!1;if(this.data.length)switch(e){case s.left:if(this.type!==this.TYPE_HORIZONTAL)break;i=!0;case s.up:if(i||this.type===this.TYPE_VERTICAL)if(this.$focusItem&&this.$focusItem.index>0)this.$focusItem===this.$body.firstChild?this.renderView(this.viewIndex-1):this.focusItem(this.$focusItem.previousSibling);else if(this.provider){if(this.provider.blocked)return;this.provider.get(e,function(e,i,n){e?t.events["data:error"]&&t.emit("data:error",e):i&&t.setData({data:i,focusIndex:n||0===n?n:t.$focusItem.index})})}else this.cycle&&this.move(s.end),this.events["overflow"]&&this.emit("overflow",{direction:e,cycle:this.cycle});break;case s.right:if(this.type!==this.TYPE_HORIZONTAL)break;i=!0;case s.down:if(i||this.type===this.TYPE_VERTICAL)if(this.$focusItem&&this.$focusItem.index<this.data.length-1)this.$focusItem===this.$body.lastChild?this.renderView(this.viewIndex+1):this.focusItem(this.$focusItem.nextSibling);else if(this.provider){if(this.provider.blocked)return;this.provider.get(e,function(e,i,n){e?t.events["data:error"]&&t.emit("data:error",e):i&&t.setData({data:i,focusIndex:n||0===n?n:t.$focusItem.index})})}else this.cycle&&this.move(s.home),this.events["overflow"]&&this.emit("overflow",{direction:e,cycle:this.cycle});break;case s.pageUp:if(this.provider){if(this.provider.blocked)return;return void this.provider.get(e,function(e,i,n){e?t.events["data:error"]&&t.emit("data:error",e):i&&t.setData({data:i,focusIndex:n||0})})}this.viewIndex<this.size?this.renderView(0):this.renderView(this.viewIndex-this.size+1),this.focusItem(this.$body.firstChild);break;case s.pageDown:if(this.provider){if(this.provider.blocked)return;this.provider.get(e,function(e,i,n){var s;e?t.events["data:error"]&&t.emit("data:error",e):i&&(s=n||0===n?n:i.length<t.size?i.length-1:t.size-1,t.setData({data:i,focusIndex:s}))});break}this.data.length>this.size?(this.viewIndex>this.data.length-2*this.size?this.renderView(this.data.length-this.size):this.renderView(this.viewIndex+this.size-1),this.focusItem(this.$body.lastChild)):this.focusItem(this.$body.children[this.data.length-1]);break;case s.home:if(this.provider){if(this.provider.blocked)return;this.provider.get(e,function(e,i,n){e?t.events["data:error"]&&t.emit("data:error",e):i&&t.setData({data:i,focusIndex:n||0})});break}this.renderView(0),this.focusItem(this.$body.firstChild);break;case s.end:if(this.provider){if(this.provider.blocked)return;this.provider.get(e,function(e,i,n){var s;e?t.events["data:error"]&&t.emit("data:error",e):i&&(s=n||0===n?n:i.length<t.size?i.length-1:t.size-1,t.setData({data:i,focusIndex:s}))});break}this.data.length>this.size?(this.renderView(this.data.length-this.size),this.focusItem(this.$body.lastChild)):this.focusItem(this.$body.children[this.data.length-1])}},o.prototype.focusItem=function(e){var t=this.$focusItem;return!(!e||t===e)&&(null!==t&&(t.classList.remove("focus"),this.events["blur:item"]&&this.emit("blur:item",{$item:t})),this.$focusItem=e,this.$focusItem.data=this.data[this.$focusItem.index],e.classList.add("focus"),this.events["focus:item"]&&this.emit("focus:item",{$prev:t,$curr:e}),this.events["select:item"]&&this.emit("select:item",{$item:e}),!0)},o.prototype.blurItem=function(e){return!!e&&(e===this.$focusItem&&(this.$focusItem=null),e.classList.remove("focus"),this.events["blur:item"]&&this.emit("blur:item",{$item:e}),!0)},o.prototype.focusIndex=function(e){var t=this.viewIndex||0;e>=t+this.size?(e=e<this.data.length-1?e:this.data.length-1,this.renderView(e-this.size+1),this.focusItem(this.$body.lastChild)):e<t?(e=e>0?e:0,this.renderView(e),this.focusItem(this.$body.firstChild)):(null===this.viewIndex&&this.renderView(0),this.focusItem(this.$body.children[e-t]))},o.prototype.markItem=function(e,t){t?e.classList.add("mark"):e.classList.remove("mark"),e.data.mark=t},e.exports=o},function(e,t,i){"use strict";function n(){this.events={}}n.prototype={addListener:function(e,t){this.events[e]=this.events[e]||[],this.events[e].push(t)},once:function(e,t){var i=this;this.events[e]=this.events[e]||[],this.events[e].push(function n(){i.removeListener(e,n),t.apply(i,arguments)})},addListeners:function(e){var t;for(t in e)e.hasOwnProperty(t)&&this.addListener(t,e[t])},removeListener:function(e,t){this.events[e]&&(this.events[e]=this.events[e].filter(function(e){return e!==t}),0===this.events[e].length&&(this.events[e]=void 0))},emit:function(e){var t,i=this.events[e];if(i)for(t=0;t<i.length;t++)i[t].apply(this,Array.prototype.slice.call(arguments,1))}},n.prototype.constructor=n,e.exports=n},function(e,t,i){"use strict";e.exports=i(34),e.exports.prototype.name="stb-component-page"},function(e,t,i){"use strict";var n={tag:function(e,t,i){var n,s,o=null;if(e){if(o=document.createElement(e),t&&"object"==typeof t)for(s in t)o[s]=t[s];for(n=2;n<arguments.length;n++)arguments[n]&&o.appendChild("object"==typeof arguments[n]?arguments[n]:document.createTextNode(arguments[n]))}return o},fragment:function(e){var t,i=document.createDocumentFragment();for(t=0;t<arguments.length;t++)(e=arguments[t])&&i.appendChild("object"==typeof e?e:document.createTextNode(e));return i},add:function(e,t){var i;if(e instanceof Node){for(i=1;i<arguments.length;i++)arguments[i]&&e.appendChild("object"==typeof arguments[i]?arguments[i]:document.createTextNode(arguments[i]));return e}return null},remove:function(e){var t,i=0;for(t=0;t<arguments.length;t++)arguments[t]&&arguments[t].parentNode&&arguments[t].parentNode.removeChild(arguments[t])===arguments[t]&&i++;return arguments.length>0&&i===arguments.length},clear:function(e){for(;e.lastChild;)e.removeChild(e.lastChild)}};e.exports=n},function(e,t,i){"use strict";var n=i(3),s=i(0),o={};function a(e){var t,i=0,s=this;(e=e||{}).focusable=!1,e.visible=e.visible||!1,e.$body=document.createElement("div"),e.$body.className="body",n.call(this,e),this.tabs=[{codes:{}},{codes:{}},{codes:{}},{codes:{}}],this.tab=0,this.$table=this.$node.appendChild(document.createElement("table")),this.$table.insertRow(),this.$table.rows[0].insertCell(-1),this.$table.rows[0].insertCell(-1),this.$table.rows[0].insertCell(-1),this.$left=this.$table.rows[0].cells[0].appendChild(document.createElement("div")),this.$left.className="theme-icon",this.$table.rows[0].cells[1].className="central",(t=this.tabs[i].$body=this.$table.rows[0].cells[1].appendChild(document.createElement("div"))).className="wrapper hidden",t.appendChild(document.createElement("div")),t.lastChild.className="button",t.lastChild.appendChild(document.createElement("div")),t.lastChild.appendChild(document.createElement("div")),t.lastChild.lastChild.className="title",(t=this.tabs[++i].$body=this.$table.rows[0].cells[1].appendChild(document.createElement("div"))).className="wrapper hidden",t.appendChild(document.createElement("div")),t.lastChild.className="button",t.lastChild.appendChild(document.createElement("div")),t.lastChild.appendChild(document.createElement("div")),t.lastChild.lastChild.className="title",t.appendChild(document.createElement("div")),t.lastChild.className="button",t.lastChild.appendChild(document.createElement("div")),t.lastChild.appendChild(document.createElement("div")),t.lastChild.lastChild.className="title",(t=this.tabs[++i].$body=this.$table.rows[0].cells[1].appendChild(document.createElement("div"))).className="wrapper hidden",t.appendChild(document.createElement("div")),t.lastChild.className="button",t.lastChild.appendChild(document.createElement("div")),t.lastChild.appendChild(document.createElement("div")),t.lastChild.lastChild.className="title",t.appendChild(document.createElement("div")),t.lastChild.className="button",t.lastChild.appendChild(document.createElement("div")),t.lastChild.appendChild(document.createElement("div")),t.lastChild.lastChild.className="title",t.appendChild(document.createElement("div")),t.lastChild.className="button",t.lastChild.appendChild(document.createElement("div")),t.lastChild.appendChild(document.createElement("div")),t.lastChild.lastChild.className="title",(t=this.tabs[++i].$body=this.$table.rows[0].cells[1].appendChild(document.createElement("div"))).className="wrapper hidden",t.appendChild(document.createElement("div")),t.lastChild.className="button",t.lastChild.appendChild(document.createElement("div")),t.lastChild.appendChild(document.createElement("div")),t.lastChild.lastChild.className="title",t.appendChild(document.createElement("div")),t.lastChild.className="button",t.lastChild.appendChild(document.createElement("div")),t.lastChild.appendChild(document.createElement("div")),t.lastChild.lastChild.className="title",t.appendChild(document.createElement("div")),t.lastChild.className="button",t.lastChild.appendChild(document.createElement("div")),t.lastChild.appendChild(document.createElement("div")),t.lastChild.lastChild.className="title",t.appendChild(document.createElement("div")),t.lastChild.className="button",t.lastChild.appendChild(document.createElement("div")),t.lastChild.appendChild(document.createElement("div")),t.lastChild.lastChild.className="title",this.$right=this.$table.rows[0].cells[2].appendChild(document.createElement("div")),this.$right.className="theme-icon",this.init(e.data),this.parent.addListener("keydown",function(e){var t=s.tabs[s.tab];s.visible&&t.codes[e.code]&&"function"==typeof t.codes[e.code].action&&t.codes[e.code].action()})}o[s.f1]="theme-icon-rc-f1",o[s.f2]="theme-icon-rc-f2",o[s.f3]="theme-icon-rc-f3",o[s.f4]="theme-icon-rc-f4",o[s.menu]="theme-icon-rc-menu",o[s.ok]="theme-icon-rc-ok",o[s.info]="theme-icon-rc-info",o[s.playPause]="theme-icon-rc-play-pause",o[s.back]="theme-icon-rc-back",o[s.exit]="theme-icon-rc-home",o[s.keyboard]="theme-icon-rc-vk",o[s.refresh]="theme-icon-rc-refresh",o[s.frame]="theme-icon-rc-aspect",a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.prototype.name="mag-component-footer",a.prototype.init=function(e){var t,i,n;function s(t){return function(){"function"==typeof e.middle[t].action&&e.middle[t].action()}}if(e=e||{},this.tabs[this.tab].$body.classList.add("hidden"),this.tab=e.middle&&e.middle.length?e.middle.length-1:0,(i=this.tabs[this.tab]).codes={},e.left?(this.$left.className=e.left.className||"theme-icon "+(o[e.left.code]||"theme-icon-warning"),e.left.disabled?this.$left.classList.add("disabled"):(i.codes[e.left.code]={action:e.left.action},this.$left.style.visibility="inherit",this.$left.onclick=function(){"function"==typeof e.left.action&&e.left.action()})):"hidden"!==this.$left.style.visibility&&(this.$left.style.visibility="hidden"),e.right?(this.$right.className=e.right.className||"theme-icon "+(o[e.right.code]||"theme-icon-warning"),e.right.disabled?this.$right.classList.add("disabled"):(i.codes[e.right.code]={action:e.right.action},this.$right.style.visibility="inherit",this.$right.onclick=function(){"function"==typeof e.right.action&&e.right.action()})):"hidden"!==this.$right.style.visibility&&(this.$right.style.visibility="hidden"),e.middle&&e.middle.length){for(t=0;t<e.middle.length;t++)i.codes[e.middle[t].code]={action:e.middle[t].action},e.middle[t].disabled?i.$body.children[t].classList.add("disabled"):(i.$body.children[t].classList.remove("disabled"),i.$body.children[t].onclick=s(t)),(n=i.$body.children[t].children)[0].className="iconImg "+(e.middle[t].className||"theme-icon "+(o[e.middle[t].code]||"theme-icon-warning")),n[1].innerText=e.middle[t].title||"";i.$body.classList.remove("hidden")}},e.exports=a},function(e,t,i){"use strict";e.exports=i(38),e.exports.prototype.name="stb-component-scrollbar"},function(e,t,i){"use strict";var n;e.exports={notifyError:function(e,t){t=1e3*t||3e3,core.notify({title:e,icon:"alert",type:"warning",timeout:t})},setChannelAsLast:function(e){clearTimeout(n),n=setTimeout(function(){e.setLast()},3e3)},sendOsdInputIntent:function(e,t){void 0===t&&(t={}),core.intent({action:"osd-input",data:{type:"numbers",length:4,startChar:e},events:{done:function(e){return t.callback&&t.callback(e)}}})},sendSearchIntent:function(e,t){window.core.intent({action:"keyboard",data:{type:"text",mode:"qwerty",title:gettext("Search"),description:"",value:e||""},events:{done:function(e){e=e||{},t&&t(e.value)}}},function(e){})},sendRecordIntent:function(e){e&&(e.pvr||e.local_pvr)&&core.intent({action:"record",data:{uri:e.url,name:e.name,id:e.id,pvr:{server:e.pvr,local:e.local_pvr}}})},isCensored:function(e){return e.censored||e.genre&&e.genre.censored},sendOsdTvIntent:function(e,t){return core.intent({action:"osd-tv",data:{name:e.name,number:e.number,favorite:e.favorite,pvr:e.local_pvr||e.pvr,timeshift:e.local_timeshift,censored:e.censored||e.genre&&e.genre.censored,attach:t}},function(){})}}},function(e,t,i){"use strict";var n=i(2);e.exports=function(e){var t=document.createElement("link");t.rel="stylesheet",t.href="css/"+e+"."+n.metrics.height+".css",document.head.appendChild(t)}},function(e,t,i){"use strict";var n=i(3),s=i(0);function o(e){var t=this;e=e||{},this.focusIndex=0,this.data=[],this.links={},n.call(this,e),this.init(e),this.addListener("keydown",function(e){switch(e.code){case s.right:t.children.length&&t.focusIndex<t.children.length-1&&t.children[++t.focusIndex].focus();break;case s.left:t.children.length&&t.focusIndex>0&&t.children[--t.focusIndex].focus();break;case s.back:t.parent&&(t.parent.focus(),t.$parentItem&&t.parent.focusItem(t.$parentItem))}})}o.prototype=Object.create(n.prototype),o.prototype.constructor=o,o.prototype.name="mag-component-layout",o.prototype.init=function(e){for(var t,i,s,o=this,a=function(e){var t,i;for(t=0;t<e.length;t++)"object"==typeof(i=e[t])?i instanceof n||i instanceof HTMLElement?e[t]={value:i,wrap:!1}:e[t].wrap=!0:e[t]={value:e[t],wrap:!0};return e}(e.data);this.$node.firstChild;)this.$node.removeChild(this.$node.firstChild);function c(){o.focusIndex=this.index}for(this.data=a,s=0;s<a.length;s++)"string"==typeof(t=a[s]).value?((i=document.createElement("div")).textContent=t.value,t.className&&(i.className=t.className),this.$node.appendChild(i),t.name&&(this.links[t.name]=i)):t.value instanceof HTMLElement?t.wrap?(i=document.createElement("div"),t.className&&(i.className=t.className),i.appendChild(t.value),this.$node.appendChild(i),t.name&&(this.links[t.name]=i)):(this.$node.appendChild(t.value),t.name&&(this.links[t.name]=t.value)):t.value instanceof n?(t.value.propagate=!0,t.value.index=this.children.length,t.value.addListener("click",c),t.wrap?(i=document.createElement("div"),t.className&&(i.className=t.className),i.appendChild(t.value.$node),this.$node.appendChild(i),this.children.push(t.value),t.value.parent=this,t.name&&(this.links[t.name]=i)):(this.add(t.value),t.name&&(this.links[t.name]=t.value))):(i=document.createElement("div"),t.className&&(i.className=t.className),this.$node.appendChild(i),t.name&&(this.links[t.name]=i))},e.exports=o},function(e,t,i){"use strict";e.exports={480:{epgGrid:6,scheduleWidth:372,timeStep:5400,countOfSteps:3,timeLineMargin:250,itemHeight:38,timeLineTop:2},576:{epgGrid:9,scheduleWidth:372,timeStep:5400,countOfSteps:3,timeLineMargin:250,itemHeight:38,timeLineTop:2},720:{epgGrid:9,scheduleWidth:830,timeStep:9e3,countOfSteps:5,timeLineMargin:350,itemHeight:48,timeLineTop:2},1080:{epgGrid:9,scheduleWidth:1245,timeStep:9e3,countOfSteps:5,timeLineMargin:525,itemHeight:72,timeLineTop:2}}[screen.height]},function(e,t,i){"use strict";e.exports=function(e){var t=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,i){return void 0===t[i]?e:t[i]})}},function(e,t,i){"use strict";e.exports={PLAYER_SET_FULLSCREEN:"set:fullscreen",PLAYER_SET_VIEWPORT:"set:viewport",PLAYER_SEND_EXIT:"exit",CORE_EVENT_HIDE:"hide",CORE_EVENT_SHOW:"show",CORE_EVENT_EXIT:"exit",CORE_EVENT_PLAY_CHANNEL:"play:channel",RIGHT_ARROW_CLICK:"right:arrow:click",LEFT_ARROW_CLICK:"left:arrow:click"}},function(e,t,i){"use strict";var n=i(1);i(0);i(30),n.once("load",function(){i(31).load({name:core.environment.language||"en"},function(){var e=new(i(33))({apiProvider:core.plugins.tvBackend});n.tvBack=core.plugins.tvBackend,n.ui=i(40),n.pages={main:i(42),details:i(48),epg:e},core.addListener("intent",function(e){return e(!1,{})}),n.pages.main.addEpgListeners(e),n.route(n.pages.main)})})},function(e,t,i){"use strict";var n=i(2),s=i(24);window.core=window.parent.getCoreInstance(window,n),i(25),i(26),i(15)("sdk"),i(28),i(15)("app"),n.platform="mag",n.ready=function(){window.core.call("app:ready")},n.exit=function(){n.events["exit"]&&n.emit("exit"),core.call("exit")},s.load=function(e){document.body.setAttribute("platform",n.platform),core.ready?n.events["load"]&&n.emit("load",{}):core.once("load",function(){n.events[e.type]&&n.emit(e.type,e)})},s.contextmenu=function(e){e.preventDefault()},Object.keys(s).forEach(function(e){window.addEventListener(e,s[e])}),e.exports=n},function(e,t,i){"use strict";e.exports={parse:function(e){var t={};return e.split("&").forEach(function(e){2===(e=e.split("=")).length&&(t[e[0]]=decodeURIComponent(e[1]))}),t},stringify:function(e){var t=[];return Object.keys(e).forEach(function(i){t.push(i+"="+encodeURIComponent(e[i]))}),t.join("&")}}},function(e,t,i){"use strict";e.exports={}},function(e,t,i){"use strict";var n=i(2);e.exports={DOMContentLoaded:function(e){n.events["dom"]&&n.emit("dom",e)},load:function(e){n.events[e.type]&&n.emit(e.type,e)},unload:function(e){n.events[e.type]&&n.emit(e.type,e)},error:function(e){},keydown:function(e){var t,i=n.activePage,s={code:e.keyCode,stop:!1};e.ctrlKey&&(s.code+="c"),e.altKey&&(s.code+="a"),e.shiftKey&&(s.code+="s"),(t=i.activeComponent)&&t!==i&&(t.events[e.type]&&t.emit(e.type,s,e),!s.stop&&t.propagate&&t.parent&&t.parent.events[e.type]&&t.parent.emit(e.type,s,e)),s.stop||(i.events[e.type]&&i.emit(e.type,s,e),e.stop||n.events[e.type]&&n.emit(e.type,s,e))},keypress:function(e){var t=n.activePage;t.activeComponent&&t.activeComponent!==t&&t.activeComponent.events[e.type]&&t.activeComponent.emit(e.type,e)},mousewheel:function(e){var t=n.activePage;t.activeComponent&&t.activeComponent!==t&&t.activeComponent.events[e.type]&&t.activeComponent.emit(e.type,e),e.stop||t.events[e.type]&&t.emit(e.type,e)}}},function(e,t,i){"use strict";if(!document.documentElement.classList){var n=Array.prototype,s=n.indexOf,o=n.slice,a=n.push,c=n.splice,l=n.join;window.DOMTokenList=function(e){if(this._element=e,e.className!==this._classCache){if(this._classCache=e.className,!this._classCache)return;var t,i=this._classCache.replace(/^\s+|\s+$/g,"").split(/\s+/);for(t=0;t<i.length;t++)a.call(this,i[t])}},window.DOMTokenList.prototype={add:function(e){this.contains(e)||(a.call(this,e),this._element.className=o.call(this,0).join(" "))},contains:function(e){return-1!==s.call(this,e)},item:function(e){return this[e]||null},remove:function(e){var t=s.call(this,e);-1!==t&&(c.call(this,t,1),this._element.className=o.call(this,0).join(" "))},toString:function(){return l.call(this," ")},toggle:function(e){return this.contains(e)?this.remove(e):this.add(e),this.contains(e)}},Object.defineProperty(Element.prototype,"classList",{get:function(){return new window.DOMTokenList(this)}})}},function(e,t,i){"use strict";var n=i(2),s=i(27);n.metrics=s[n.query.screenHeight]||s[screen.height]||s[720],n.metrics.availHeight=n.metrics.height-(n.metrics.availTop+n.metrics.availBottom),n.metrics.availWidth=n.metrics.width-(n.metrics.availLeft+n.metrics.availRight)},function(e,t,i){"use strict";e.exports={480:{height:480,width:720,availTop:24,availBottom:24,availRight:32,availLeft:48,canvasPosition:{x:360,y:68,width:310,height:174},channelListSize:10,scheduleListSize:8,floatingPanelStep:35,floatingPanelStepPadding:3},576:{height:576,width:720,availTop:24,availBottom:24,availRight:26,availLeft:54,canvasPosition:{x:360,y:68,width:310,height:174},channelListSize:13,scheduleListSize:10,floatingPanelStep:35,floatingPanelStepPadding:3},720:{height:720,width:1280,availTop:30,availBottom:30,availRight:40,availLeft:40,canvasPosition:{x:600,y:68,width:620,height:348},floatingPanelStep:40,floatingPanelStepPadding:4,channelListSize:14,scheduleListSize:10},1080:{height:1080,width:1920,availTop:45,availBottom:45,availRight:60,availLeft:60,canvasPosition:{x:900,y:102,width:930,height:522},channelListSize:14,scheduleListSize:10,floatingPanelStep:59,floatingPanelStepPadding:6}}},function(e,t,i){"use strict";var n,s=i(2);(n=document.createElement("link")).rel="stylesheet",n.href=window.core.theme.path+s.metrics.height+".css",document.head.appendChild(n),e.exports=n},function(e,t,i){"use strict";e.exports={backspace:8,tab:9,enter:13,escape:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,del:46}},function(e,t,i){"use strict";Array.prototype.findIndex||(Array.prototype.findIndex=function(e){for(var t=this.length,i=0;i<t;){if(e(this[i],i,this))return i;++i}return-1})},function(e,t,i){"use strict";var n=i(9),s=i(32),o=new n;function a(e){var t=new s(e);return window.gettext=window._=t.gettext,window.pgettext=t.pgettext,window.ngettext=t.ngettext,t}o.defaultLanguage="en",o.load=function(e,t){var i;return e.ext=e.ext||"json",e.path=e.path||"lang",e.name===o.defaultLanguage?(a(),t(null),!1):((i=new XMLHttpRequest).onload=function(){try{a(JSON.parse(i.responseText)),t(null),o.events["load"]&&o.emit("load")}catch(e){i.onerror(e)}},i.ontimeout=i.onerror=function(e){a(),t(e),o.events["error"]&&o.emit("error",e)},i.open("GET",e.path+"/"+e.name+"."+e.ext,!0),i.send(null),!0)},e.exports=o},function(module,exports,__webpack_require__){"use strict";function Gettext(config){var data,meta;config=config||{},data=config.data||{},data[""]=data[""]||{},meta=config.meta,this.gettext=function(e){return data[""][e]||e},this.pgettext=function(e,t){return data[e]&&data[e][t]||t},this.ngettext=function(msgId,plural,value){var n,evalResult;return data&&meta&&data[""][msgId]?(evalResult=eval("n = "+value+"; "+meta.plural),"boolean"==typeof evalResult&&(evalResult=+evalResult),data[""][msgId][evalResult]):1===value?msgId:plural}}Gettext.prototype.constructor=Gettext,module.exports=Gettext},function(e,t,i){"use strict";var n,s,o,a,c,l,d,r,h=i(10),m=i(11).tag,u=i(0),p=i(12),f=i(7),v=i(4),g=i(16),y=i(13),I=i(39);function x(e){var t,i,n,s,o,a=[],c=[];for(s=0;s<e.length;s++)o=m("div",{className:"logo"}),e[s].logo&&(o.style.backgroundImage="url("+core.backend.host+e[s].logo+")"),n=e[s].censored||e[s].genre&&e[s].genre.censored,c=[{className:"number",value:e[s].number.toString()},o,{className:"name",value:e[s].name},{className:e[s].archive?"theme-icon theme-icon-timeshift disabled":"theme-icon hidden"},{className:n?"theme-icon theme-icon-lock disabled":"theme-icon hidden"},{className:"arrowLeft theme-epg-grid-arrow-left"},{className:"arrowRight theme-epg-grid-arrow-right"},{className:"theme-epg-grid-timeshift hidden"}],t=new g({focusable:!1,data:c,className:"channel theme-epg-grid-main",events:{click:function(){this.parent.emit("click")}}}),i=new g({focusable:!1,className:"schedule",data:[],events:{click:function(){this.parent.emit("click")}}}),t.listIndex=s,i.listIndex=s,a.push({value:e[s],items:[t,i],censored:n});return a}function $(){var e,t=l.$focusItem.data.value;l.epgLastFocused&&(e=l.epgLastFocused.data),core.intent({action:"record",data:{uri:t.url,name:t.name,epgName:t.name,startTime:e?e.start:l.time,endTime:e?e.end:l.time+l.timeStep,id:t.id,pvr:{server:t.pvr,local:t.local_pvr}}},function(){})}function w(e){var t=this;e.className="magcore-page-epg"+(e.className?" "+e.className:""),h.call(this,e),this.addListener("show",function(e){l.focusIndex(e.data.index),l.focus(),l.startCheck()}),this.addListener("keydown",function(e){switch(e.code){case u.back:l.stopCheck(),t.emit("back",l.$focusItem)}}),a=new g({focusable:!1,data:[{name:"$title",className:"title",value:gettext("TV Guide")},{name:"$current",className:"current"},{name:"$description",className:"description"}],className:"header-layout theme-epg-grid-main"}),this.add(a),c=new g({focusable:!1,data:[{className:"time"},{name:"$timeline",className:"timeline theme-epg-grid-timeline"}],className:"content"}),this.add(c),l=new I({className:"epg-list",size:i(17).epgGrid,events:{"click:item":function(e){var i=e.$item;i.data.value.epgItems.length?i.data.value.epgItems[i.data.value.epgFocus]&&(i.data.value.archive&&i.data.value.epgItems[i.data.value.epgFocus].data.archive?t.emit("epg:click",{channelIndex:i.index,epg:i.data.value.epgItems[i.data.value.epgFocus].data}):t.emit("channel:click",{channelIndex:i.index})):t.emit("channel:click",{channelIndex:i.index})},"focus:item":function(e){var t=e.$curr,i=[];e={left:{},middle:[],label:{code:u.menu,title:gettext("Hold OK button to open Options menu"),action:function(){s.show(),s.focus()}}},(t.data.value.pvr||t.data.value.local_pvr)&&(e.middle.push({code:u.f1,title:gettext("Record"),action:$}),i.push({items:[{className:r.record},{className:"title",value:gettext("Record")}],click:function(){s.hide(),$()}})),i.push({items:[{className:r.realtime},{className:"title",value:gettext("To real time")}],click:function(){s.hide(),l.goToRealTime()}}),e.middle.push({code:u.f3,title:gettext("To real time"),action:function(){l.goToRealTime()}}),e.left={code:u.menu,action:function(){s.show(),s.focus()}},n.init(e),o.init({data:i,size:i.length,focusIndex:0})}},noData:gettext("No Channels"),apiProvider:e.apiProvider,focusIndex:0,scroll:d=new y,$timeBlock:c.$node.children[0],$programDescription:a.links.$description,$programName:a.links.$current,$timeLine:c.links.$timeline}),c.add(l),c.add(d),(n=new p({visible:!1,parent:this})).init({left:{code:u.menu,action:function(){s.show(),s.focus()}},middle:[{code:u.f1,title:gettext("Record"),action:$},{code:u.f3,title:gettext("To real time"),action:function(){l.goToRealTime()}}],label:{code:u.menu,title:gettext("Hold OK button to open Options menu"),action:function(){s.show(),s.focus()}}}),n.show(),this.add(s=new f({title:gettext("Actions"),className:"width2x",events:{show:function(){n.hide(),this.children[0].focus()},hide:function(){n.show(),l.focus()}},children:[o=new v({size:2,focusIndex:0,cycle:!0,data:[{items:[{className:r.record},{className:"title",value:gettext("Record")}],click:function(){s.hide(),$()}},{items:[{className:r.realtime},{className:"title",value:gettext("To real time")}],click:function(){s.hide(),l.goToRealTime()}}],events:{keydown:function(e){switch(v.prototype.defaultEvents.keydown.call(this,e),e.code){case u.menu:case u.back:s.hide(),e.stop=!0}}}})]}))}r={realtime:"theme-icon theme-icon-rc-f3",record:"theme-icon theme-icon-rc-f1"},w.prototype=Object.create(h.prototype),w.prototype.constructor=w,w.prototype.setChannels=function(e){l.setData({data:x(e),focusIndex:0}),l.updateEpg()},e.exports=w},function(e,t,i){"use strict";var n=i(6);function s(e){e=e||{},this.active=!1,this.activeComponent=null,n.call(this,e),this.active=this.$node.classList.contains("active"),null===this.$node.parentNode&&document.body.appendChild(this.$node),this.page=this}s.prototype=Object.create(n.prototype),s.prototype.constructor=s,s.prototype.name="spa-component-page",e.exports=s},function(e,t,i){"use strict";e.exports=i(36),e.exports.prototype.name="stb-component-modal"},function(e,t,i){"use strict";var n=i(6);function s(e){(e=e||{}).$body=document.createElement("div"),e.$body.className="body",n.call(this,e),this.$node.appendChild(document.createElement("div").appendChild(this.$body).parentNode)}s.prototype=Object.create(n.prototype),s.prototype.constructor=s,s.prototype.name="spa-component-modal",e.exports=s},function(e,t,i){"use strict";var n=i(3),s=i(0);function o(e){var t=this;e=e||{},this.focusIndex=0,this.data=[],this.links={},n.call(this,e),this.init(e),this.addListener("keydown",function(e){switch(e.code){case s.right:t.children.length&&t.focusIndex<t.children.length-1&&t.children[++t.focusIndex].focus();break;case s.left:t.children.length&&t.focusIndex>0&&t.children[--t.focusIndex].focus();break;case s.back:t.parent&&(t.parent.focus(),t.$parentItem&&t.parent.focusItem(t.$parentItem))}})}o.prototype=Object.create(n.prototype),o.prototype.constructor=o,o.prototype.name="mag-component-layout",o.prototype.init=function(e){for(var t,i,s,o=this,a=function(e){var t,i;for(t=0;t<e.length;t++)"object"==typeof(i=e[t])?i instanceof n||i instanceof HTMLElement?e[t]={value:i,wrap:!1}:e[t].wrap=!0:e[t]={value:e[t],wrap:!0};return e}(e.data);this.$node.firstChild;)this.$node.removeChild(this.$node.firstChild);function c(){o.focusIndex=this.index}for(this.data=a,s=0;s<a.length;s++)"string"==typeof(t=a[s]).value?((i=document.createElement("div")).textContent=t.value,t.className&&(i.className=t.className),this.$node.appendChild(i),t.name&&(this.links[t.name]=i)):t.value instanceof HTMLElement?t.wrap?(i=document.createElement("div"),t.className&&(i.className=t.className),i.appendChild(t.value),this.$node.appendChild(i),t.name&&(this.links[t.name]=i)):(this.$node.appendChild(t.value),t.name&&(this.links[t.name]=t.value)):t.value instanceof n?(t.value.propagate=!0,t.value.index=this.children.length,t.value.addListener("click",c),t.wrap?(i=document.createElement("div"),t.className&&(i.className=t.className),i.appendChild(t.value.$node),this.$node.appendChild(i),this.children.push(t.value),t.value.parent=this,t.name&&(this.links[t.name]=i)):(this.add(t.value),t.name&&(this.links[t.name]=t.value))):(i=document.createElement("div"),t.className&&(i.className=t.className),this.$node.appendChild(i),t.name&&(this.links[t.name]=i))},e.exports=o},function(e,t,i){"use strict";var n=i(6);function s(e){e=e||{},this.viewSize=10,this.realSize=100,this.value=0,this.type=this.TYPE_VERTICAL,this.thumbRect=null,this.trackRect=null,e.focusable=e.focusable||!1,e.type&&(this.type=e.type),this.type===this.TYPE_HORIZONTAL&&(e.className+=" horizontal"),n.call(this,e),this.$thumb=this.$body.appendChild(document.createElement("div")),this.$thumb.className="thumb",this.init(e)}s.prototype=Object.create(n.prototype),s.prototype.constructor=s,s.prototype.name="spa-component-scrollbar",s.prototype.TYPE_VERTICAL=1,s.prototype.TYPE_HORIZONTAL=2,s.prototype.init=function(e){void 0!==(e=e||{}).realSize&&(this.realSize=e.realSize),void 0!==e.viewSize&&(this.viewSize=e.viewSize),this.viewSize>=this.realSize?this.$thumb.classList.add("hidden"):this.$thumb.classList.remove("hidden"),void 0!==e.value&&this.scrollTo(e.value),this.type===this.TYPE_VERTICAL?this.$thumb.style.height=this.viewSize/this.realSize*100+"%":this.$thumb.style.width=this.viewSize/this.realSize*100+"%",this.thumbRect=this.$thumb.getBoundingClientRect(),this.trackRect=this.$node.getBoundingClientRect()},s.prototype.scrollTo=function(e){return this.value!==e&&(0!==this.thumbRect.height&&0!==this.thumbRect.width||(this.trackRect=this.$node.getBoundingClientRect(),this.thumbRect=this.$thumb.getBoundingClientRect()),this.type===this.TYPE_VERTICAL?this.$thumb.style.marginTop=(this.trackRect.height-this.thumbRect.height)*e/(this.realSize-this.viewSize)+"px":this.$thumb.style.marginLeft=(this.trackRect.width-this.thumbRect.width)*e/(this.realSize-this.viewSize)+"px",this.events["change"]&&this.emit("change",{curr:e,prev:this.value}),e>=this.realSize&&(e=this.realSize,this.events["done"]&&this.emit("done")),this.value=e,!0)},e.exports=s},function(e,t,i){"use strict";var n=i(11),s=i(0),o=i(16),a=i(4),c=i(17),l=[gettext("January"),gettext("February"),gettext("March"),gettext("April"),gettext("May"),gettext("June"),gettext("July"),gettext("August"),gettext("September"),gettext("October"),gettext("November"),gettext("December")],d=[gettext("Sunday "),gettext("Monday "),gettext("Tuesday "),gettext("Wednesday "),gettext("Thursday "),gettext("Friday "),gettext("Saturday ")];function r(e){this.scheduleWidth=c.scheduleWidth,this.time=null,this.day=0,this.timeStep=