function addJasmineSpec(e,t,n){var i=JasmineSpecLookup[e]||(JasmineSpecLookup[e]=[]);i.push([t,n])}function __getOwnPropertyDescriptor(e,t){try{return Object.getOwnPropertyDescriptor(e,t)}catch(n){return{configurable:!1,enumerable:!0,value:e[t],writable:!0}}}function __defineProperty(e,t,n){try{Object.defineProperty(e,t,n)}catch(i){}}function goToTop(){window.scrollTo(0,0)}function override(){}function GetCompiledAsset(){return ErrorReporter.Trace(null,"GetCompiledAsset call outside of module definition."),""}function RegisterCompiledAsset(){}function Harness(){return null}function JasmineSpec(){return null}function lazyStaticInit(e){return function(t){var n=!0,i=function(){var i=t.apply(this,arguments);return n&&(n=!1,e()),i};return i.prototype=t.prototype,i}}function $timestamp(e){"console"in window&&"timeStamp"in console&&"object"!=typeof console.timeStamp&&-1==console.timeStamp.toString().indexOf("__BROWSERTOOLS_CONSOLE_SAFEFUNC")&&console.timeStamp(e)}function $logFmt(){}function $warn(){}function $time(){}function $timeEnd(){}function $ots(){Locator.otsReport._generate();"console"in window&&console.log(Locator.otsReport._message)}function $dir(){}function $now(){return null}function $stem(e){var t=Locator.treeLookup.getReference(e);return"dir"in console&&console.dir(t),t}function cycleid(){return"Locator"in window&&Locator.validationManager?Locator.validationManager.cyclecount:0}function LongClick(e,t,n){"use strict";var i=this;if(this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.touchBoundary=10,this.time=t,this.handler=n,this.timer=null,this.layer=e,!e||!e.nodeType)throw new TypeError("Layer must be a document node");this.onTouchStart=function(){return LongClick.prototype.onTouchStart.apply(i,arguments)};this.onTouchMove=function(){return LongClick.prototype.onTouchMove.apply(i,arguments)};this.onTouchEnd=function(){return LongClick.prototype.onTouchEnd.apply(i,arguments)};this.onTouchCancel=function(){return LongClick.prototype.onTouchCancel.apply(i,arguments)};window.navigator.msPointerEnabled?(this.startEventName="MSPointerDown",this.moveEventName="MSPointerMove",this.endEventName="MSPointerUp",this.cancelEventName="MSPointerCancel"):(this.startEventName="touchstart",this.moveEventName="touchmove",this.endEventName="touchend",this.cancelEventName="touchcancel");e.addEventListener(this.startEventName,this.onTouchStart,!1);e.addEventListener(this.moveEventName,this.onTouchMove,!1);e.addEventListener(this.endEventName,this.onTouchEnd,!1);e.addEventListener(this.cancelEventName,this.onTouchCancel,!1)}var ns_test,JasmineSpecLookup,ns_gen5_util,ErrorReporter,__decorate,__param,extend,ANIMATION_END,TRANSITION_END,$log_log,$log,$logTest,$break_on_assert,$assert,$setFooter,FastClick,ns_gen5_data,ns_gen5_ml,ns_gen5_util_user,ns_gen5_events,ns_gen5_net,ns_gen5_validation,ns_gen5_language,ns_gen5_config,ns_gen5_ui,ns_gen5_ui_managers,ns_gen5_ui_controls,ns_gen5_animation_easing,ns_gen5_animation,readit,ns_betslip,Locator,RegisterCompiledAsset,GetCompiledAsset,cache,SITE_ROOT_PATH="SportsUI",TEST=!0,ns_inplay_utils,ns_inplay_general,ns_inplay_events,ns_inplaylib_media,__extends,IoC,LiveInPlay,Typescript;!function(e){var t=function(){function e(){}return e.prototype.runSpec=function(){$assert&&$assert(!1,"B365JasmineSpec must override the runSpec method.")},e}();e.B365JasmineSpec=t}(ns_test||(ns_test={}));JasmineSpecLookup={},function(e){var t=function(){function e(){}return e.encrypt=function(t){for(var n,i="",r=t.length,o=0,s=0,o=0;r>o;o++){for(n=t.substr(o,1),s=0;s<e.MAP_LEN;s++)if(n==e.charMap[s][0]){n=e.charMap[s][1];break}i+=n}return i},e.decrypt=function(t){for(var n,i="",r=t.length,o=0,s=0,o=0;r>o;o++){for(n=t.substr(o,1),s=0;s<e.MAP_LEN;s++){if(":"==n&&":|~"==t.substr(o,3)){n="\n";o+=2;break}if(n==e.charMap[s][1]){n=e.charMap[s][0];break}}i+=n}return i},e}();t.MAP_LEN=64;t.charMap=[["A","d"],["B","e"],["C","f"],["D","g"],["E","h"],["F","i"],["G","j"],["H","k"],["I","l"],["J","m"],["K","n"],["L","o"],["M","p"],["N","q"],["O","r"],["P","s"],["Q","t"],["R","u"],["S","v"],["T","w"],["U","x"],["V","y"],["W","z"],["X","a"],["Y","b"],["Z","c"],["a","Q"],["b","R"],["c","S"],["d","T"],["e","U"],["f","V"],["g","W"],["h","X"],["i","Y"],["j","Z"],["k","A"],["l","B"],["m","C"],["n","D"],["o","E"],["p","F"],["q","0"],["r","1"],["s","2"],["t","3"],["u","4"],["v","5"],["w","6"],["x","7"],["y","8"],["z","9"],["0","G"],["1","H"],["2","I"],["3","J"],["4","K"],["5","L"],["6","M"],["7","N"],["8","O"],["9","P"],["\n",":|~"],["\r",""]];e.B365SimpleEncrypt=t}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=function(){function e(){}return e.setDeferralPeriod=function(t){$assert&&$assert(e.defferalPeriod>=4e3,"Log period cannot be less than 4 seconds");e.defferalPeriod=t},e.prototype.log=function(){},e.prototype.logError=function(t,n){e.Trace(t,n)},e.GetLogger=function(){return e.LOGGER||(e.LOGGER=new e)},e.getRequest=function(){null==e._xmlHttpAvailable&&e.checkXmlHttpAvailable();return e._xmlHttpAvailable?readit.XDomainXMLHttpRequest.TryCreate(new XMLHttpRequest):new ActiveXObject(this._activeXVersion)},e.checkXmlHttpAvailable=function(){try{new XMLHttpRequest;e._xmlHttpAvailable=!0}catch(t){e._xmlHttpAvailable=!1}},e}();t.NEW_LINE="\t\r\n";t.defferalPeriod=4e3;t._flushTimer=null;t._xmlHttpAvailable=null;t._errorLog=[];t._activeXVersion=null;t.LOGGER=null;t.maximumLogSize=100;t.LINE=" -------------------- ";t.Trace=function(e,n){var i,r,o,s,a;try{i=new Date;Locator&&Locator.pushedConfig&&Locator.pushedConfig.getIsErrorLoggingEnabled()&&(0==t._errorLog.length&&(t._flushTimer=setTimeout(function(){t.LogError()},t.defferalPeriod)),r="clientDate="+i+t.NEW_LINE,o="clientObject="+e+t.NEW_LINE,s="clientErrorMessage="+n+t.NEW_LINE,a="clientBrowserURL="+(window.location&&window.location.href?encodeURIComponent(window.location.href):"not available")+t.NEW_LINE,t._errorLog.push(r+o+s+a))}catch(n){}};t.Flush=function(){try{t._flushTimer&&clearTimeout(t._flushTimer);t.LogError()}catch(e){}};t.LogError=function(){var n,i,r,o,s;try{if(t._flushTimer=null,Locator&&Locator.pushedConfig&&Locator.pushedConfig.getIsErrorLoggingEnabled()){for(n=void 0,i=void 0,n="*Error Reporter*"+t.NEW_LINE,n=n.concat("SessionId="+e.CookieManager.GetSessionId()+t.NEW_LINE),t.errorLogCustomHeader&&(n=n.concat("CustomHeader="+t.errorLogCustomHeader()+t.NEW_LINE)),n=n.concat("Log:"+t.NEW_LINE),i=0;i<t._errorLog.length;i++)n=n.concat(t._errorLog[i]+t.NEW_LINE);r=Locator&&Locator.config&&Locator.config.jsLogEndPoint?Locator.config.jsLogEndPoint:null;r&&(o="lvl=1",o=o.concat("&msg="+e.B365SimpleEncrypt.encrypt(n)),o=o.concat("&encr=true"),s=t.getRequest(),s.open("POST",r,!0),s.onreadystatechange=function(){4===s.readyState&&200===s.status&&"OFF"===s.responseText&&Locator.pushedConfig.setIsErrorLoggingEnabled(!1)},s.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),s.send(o))}t._errorLog=[]}catch(a){}};e.MobileServerLogger=t}(ns_gen5_util||(ns_gen5_util={})),function(e){var t,n;!function(e){e[e.CONNECTION_ENTRY=0]="CONNECTION_ENTRY";e[e.PUSH_MESSAGE_CONNECTION_ENTRY=1]="PUSH_MESSAGE_CONNECTION_ENTRY";e[e.PULL_DATA_ENTRY=2]="PULL_DATA_ENTRY";e[e.MODULE_LOAD_ENTRY=3]="MODULE_LOAD_ENTRY";e[e.NAVIGATION_ENTRY=4]="NAVIGATION_ENTRY";e[e.VIDEO_ENTRY=5]="VIDEO_ENTRY";e[e.COUPON_STREAMING_ENTRY=6]="COUPON_STREAMING_ENTRY";e[e.BET_SLIP_ENTRY=7]="BET_SLIP_ENTRY";e[e.GLOBAL_CONFIG_ENTRY=8]="GLOBAL_CONFIG_ENTRY";e[e.PLAYTECH_INSTANT_GAMES_ENTRY=9]="PLAYTECH_INSTANT_GAMES_ENTRY";e[e.FLASH_MODULE_ENTRY=10]="FLASH_MODULE_ENTRY";e[e.EMPTY_TOPIC_ENTRY=11]="EMPTY_TOPIC_ENTRY";e[e.FINANCIALS_TOPIC_ENTRY=12]="FINANCIALS_TOPIC_ENTRY";e[e.FILTERING_ENTRY=13]="FILTERING_ENTRY";e[e.BLOB_ENTRY=14]="BLOB_ENTRY";e[e.EDIT_BETS=15]="EDIT_BETS";e[e.MATCH_ALERTS_SERVICE_WORKER_ENTRY=16]="MATCH_ALERTS_SERVICE_WORKER_ENTRY";e[e.MATCH_ALERTS_ENTRY=17]="MATCH_ALERTS_ENTRY";e[e.QUICK_BET_ENTRY=18]="QUICK_BET_ENTRY"}(t=e.InfoReporterGroups||(e.InfoReporterGroups={}));n=function(){function e(){}return e.getLog=function(){return e.InfoLog},e.SetServerLogger=function(t){e.ServerLogger=t},e.Trace=function(n,i){e.InfoLog[t[n]]||(e.InfoLog[t[n]]=[]);e.InfoLog[t[n]].push(i);e.ServerLogger.log(n,i)},e}();n.CONNECTION_ENTRY=t.CONNECTION_ENTRY;n.PUSH_MESSAGE_CONNECTION_ENTRY=t.PUSH_MESSAGE_CONNECTION_ENTRY;n.PULL_DATA_ENTRY=t.PULL_DATA_ENTRY;n.MODULE_LOAD_ENTRY=t.MODULE_LOAD_ENTRY;n.NAVIGATION_ENTRY=t.NAVIGATION_ENTRY;n.VIDEO_ENTRY=t.VIDEO_ENTRY;n.COUPON_STREAMING_ENTRY=t.COUPON_STREAMING_ENTRY;n.BET_SLIP_ENTRY=t.BET_SLIP_ENTRY;n.GLOBAL_CONFIG_ENTRY=t.GLOBAL_CONFIG_ENTRY;n.PLAYTECH_INSTANT_GAMES_ENTRY=t.PLAYTECH_INSTANT_GAMES_ENTRY;n.FLASH_MODULE_ENTRY=t.FLASH_MODULE_ENTRY;n.EMPTY_TOPIC_ENTRY=t.EMPTY_TOPIC_ENTRY;n.FINANCIALS_TOPIC_ENTRY=t.FINANCIALS_TOPIC_ENTRY;n.FILTERING_ENTRY=t.FILTERING_ENTRY;n.BLOB_ENTRY=t.BLOB_ENTRY;n.EDIT_BETS_ENTRY=t.EDIT_BETS;n.MATCH_ALERTS_SERVICE_WORKER_ENTRY=t.MATCH_ALERTS_SERVICE_WORKER_ENTRY;n.MATCH_ALERTS_ENTRY=t.MATCH_ALERTS_ENTRY;n.ServerLogger=e.MobileServerLogger.GetLogger();n.InfoLog={};e.InfoReporter=n}(ns_gen5_util||(ns_gen5_util={}));ErrorReporter=function(){function e(){}return e.SetServerLogger=function(t){e.serverLogger=t},e}();ErrorReporter.MAXIMUM_LOG_SIZE=100;ErrorReporter.errorLog=[];ErrorReporter.serverLogger=ns_gen5_util.MobileServerLogger.GetLogger();ErrorReporter.getLog=function(){return ErrorReporter.errorLog};ErrorReporter.Trace=function(e,t){var n,i,r;try{n=t.stack||t&&t.message||t;i=""+e;$log(i,n);this.errorLog.length>=ErrorReporter.MAXIMUM_LOG_SIZE&&(r=this.errorLog.length-ErrorReporter.MAXIMUM_LOG_SIZE+1,ErrorReporter.errorLog.splice(0,r));this.errorLog.push(new Date+" "+i+" "+t);ErrorReporter.serverLogger.logError(i,n)}catch(t){$log("Problem happened during logging error")}};__decorate=this&&this.__decorate||function(e,t,n,i){var r,o,s=arguments.length,a=3>s?t:null===i?i=__getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(o=e.length-1;o>=0;o--)(r=e[o])&&(a=(3>s?r(a):s>3?r(t,n,a):r(t,n))||a);return s>3&&a&&__defineProperty(t,n,a),a};__param=this.__param||function(e,t){return function(n,i){t(n,i,e)}};__extends=this&&this.__extends||function(e,t){var n,i;for(n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);i=function(){this.constructor=e};e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};extend=function(e,t){return __extends(t,e),e},function(){var e,t,n,i,r=document.createElement("div"),o=r.style;for(""===o.animation?ANIMATION_END="animationend":""===o.webkitAnimation?ANIMATION_END="webkitAnimationEnd":""===o.mozAnimation?ANIMATION_END="mozAnimationEnd":""===o.msAnimation&&(ANIMATION_END="msAnimationEnd"),""===o.transition?TRANSITION_END="transitionend":""===o.webkitTransition&&(TRANSITION_END="webkitTransitionEnd"),e=0,t=["webkit","moz"],n=window,i=0;i<t.length&&!window.requestAnimationFrame;++i)n.requestAnimationFrame=n[t[i]+"RequestAnimationFrame"],n.cancelAnimationFrame=n[t[i]+"CancelAnimationFrame"]||n[t[i]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t){var n=(new Date).getTime(),i=Math.max(0,16-(n-e)),r=window.setTimeout(function(){t(n+i)},i);return e=n+i,r});window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})}(),function(){Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var n,i;for(t||(t=0),n=this.length,i=t;n>i;i++)if(this[i]===e)return i;return-1})}();$log_log="";$log=function(){};$logTest=function(){var e,t;TEST&&(window.console&&console.log((new Date).getTime()+" (TEST) : "+Array.prototype.join.call(arguments,", ")),e=document.getElementById("hr-TestHarness_Console"),e&&(t=(new Date).getTime()+" : "+Array.prototype.join.call(arguments,", ")+"\n",Locator.validationManager.callPostValidation(function(){e.innerHTML+=t})))};$setFooter="setFooter"in window?window.setFooter:function(){},function(){window.makeSafeForCSS||(window.makeSafeForCSS=function(e){return e&&e.replace?e.replace(/[^a-z0-9]/g,function(e){var t=e.charCodeAt(0);return 32==t?"-":t>=65&&90>=t?"_"+e.toLowerCase():"__"+("000"+t.toString(16)).slice(-4)}):""})}(),function(){window.safeSessionStorage||(window.safeSessionStorage=function(){function e(){}function t(){this._store={}}var n="test-string",i=function(){try{if(window.sessionStorage)return window.sessionStorage.setItem(n,n),window.sessionStorage.removeItem(n),!0}catch(e){ErrorReporter.Trace(null,e)}return!1}();return e.prototype.setItem=function(e,t){try{window.sessionStorage&&window.sessionStorage.setItem(e,t)}catch(n){}},e.prototype.getItem=function(e){try{if(window.sessionStorage)return window.sessionStorage.getItem(e)}catch(t){}return null},e.prototype.removeItem=function(e){try{window.sessionStorage&&window.sessionStorage.removeItem(e)}catch(t){}},t.prototype.setItem=function(e,t){this._store[e]=t},t.prototype.getItem=function(e){return this._store[e]},t.prototype.removeItem=function(e){delete this._store[e]},i?new e:new t}())}(),function(e,t,n){function i(e){var n=t[e];t[e]=function(e){return r(n(e))}}function r(e){var t=e.length;if(t)for(;t--;)e[t].addEventListener=c,e[t].removeEventListener=l;else e.addEventListener=c,e.removeEventListener=l;return e}var o,s,a,c,l,u;e.addEventListener&&e.removeEventListener||!e.attachEvent||!e.detachEvent||(o=function(e){return"function"==typeof e},s=function(e,t){var i,r,o=t[n];if(o)for(i=void 0,r=o.length;r--;)if(i=o[r],i[0]===e)return i[1]},a=function(e,t,i){var r=t[n]||(t[n]=[]);return s(e,t)||(r[r.length]=[e,i],i)},c=function(n,i){if(o(i)){var s=this;s.attachEvent("on"+n,a(s,i,function(n){n=n||e.event;n.preventDefault=n.preventDefault||function(){n.returnValue=!1};n.stopPropagation=n.stopPropagation||function(){n.cancelBubble=!0};n.target=n.target||n.srcElement||t.documentElement;n.currentTarget=n.currentTarget||s;n.timeStamp=n.timeStamp||(new Date).getTime();i.call(s,n)}))}},l=function(e,t){var i,r;o(t)&&(i=this,r=s(i,t),r&&i.detachEvent("on"+e,r))},r([t,e]),"Element"in e?(u=e.Element,u.prototype.addEventListener=c,u.prototype.removeEventListener=l):(t.attachEvent("onreadystatechange",function(){r(t.all)}),i("getElementsByTagName"),i("getElementById"),i("createElement"),r(t.all)))}(window,document,"x-ms-event-listeners"),function(){function e(e){var t,n,i=this,r=i,o=r.length>>>0;if("function"!=typeof e)throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===o&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");if(n=o-1,arguments.length>=2)t=arguments[1];else for(;;){if(n in r){t=r[n--];break}if(--n<0)throw new TypeError("reduceRight of empty array with no initial value");}if(0>n)return t;do n in r&&(t=e(t,r[n],n,i));while(n--);return t}Array.prototype.reduceRight||(Array.prototype.reduceRight=e)}(),function(e){function t(e,n,i){var r,o=e.document&&e.currentStyle[n].match(/([\d\.]+)(%|cm|em|in|mm|pc|pt|)/)||[0,0,""],s=o[1],a=o[2];return i=i?/%|em/.test(a)&&e.parentElement?t(e.parentElement,"fontSize",null):16:i,r="fontSize"==n?i:/width/i.test(n)?e.clientWidth:e.clientHeight,"%"==a?s/100*r:"cm"==a?.3937*s*96:"em"==a?s*i:"in"==a?96*s:"mm"==a?.3937*s*96/10:"pc"==a?16*s:"pt"==a?96*s/72:s}function n(e,t){var n="border"==t?"Width":"",i=t+"Top"+n,r=t+"Right"+n,o=t+"Bottom"+n,s=t+"Left"+n;e[t]=(e[i]==e[r]&&e[i]==e[o]&&e[i]==e[s]?[e[i]]:e[i]==e[o]&&e[s]==e[r]?[e[i],e[r]]:e[s]==e[r]?[e[i],e[r],e[o]]:[e[i],e[r],e[o],e[s]]).join(" ")}function i(e){var i,r=this,o=e.currentStyle,s=t(e,"fontSize"),a=function(e){return"-"+e.toLowerCase()};for(i in o)if(Array.prototype.push.call(r,"styleFloat"==i?"float":i.replace(/[A-Z]/,a)),"width"==i)r[i]=e.offsetWidth+"px";else if("height"==i)r[i]=e.offsetHeight+"px";else if("styleFloat"==i)r.float=o[i];else if(/margin.|padding.|border.+W/.test(i)&&"auto"!=r[i])r[i]=Math.round(t(e,i,s))+"px";else if(/^outline/.test(i))try{r[i]=o[i]}catch(c){r.outlineColor=o.color;r.outlineStyle=r.outlineStyle||"none";r.outlineWidth=r.outlineWidth||"0px";r.outline=[r.outlineColor,r.outlineWidth,r.outlineStyle].join(" ")}else r[i]=o[i];n(r,"margin");n(r,"padding");n(r,"border");r.fontSize=Math.round(s)+"px"}e.getComputedStyle||(i.prototype={constructor:i,getPropertyPriority:function(){$assert&&$assert(!1,"NotSupportedError: DOM Exception 9")},getPropertyValue:function(e){return this[e.replace(/-\w/g,function(e){return e[1].toUpperCase()})]},item:function(e){return this[e]},removeProperty:function(){$assert&&$assert(!1,"NoModificationAllowedError: DOM Exception 7")},setProperty:function(){$assert&&$assert(!1,"NoModificationAllowedError: DOM Exception 7")},getPropertyCSSValue:function(){$assert&&$assert(!1,"NotSupportedError: DOM Exception 9")}},e.getComputedStyle=function(e){return new i(e)})}(this);FastClick=function(){"use strict";function e(t,n){function i(e,t){return function(){return e.apply(t,arguments)}}var r,o,s,a,c,l,u;if(n=n||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=n.touchBoundary||10,this.layer=t,this.tapDelay=n.tapDelay||20,this.tapTimeout=n.tapTimeout||700,o=this.deviceIsWindowsPhone=navigator.userAgent.indexOf("Windows Phone")>=0,s=this.deviceIsAndroid=navigator.userAgent.indexOf("Android")>0&&!o,this.deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent)&&!o,this.deviceIsIOS4=this.deviceIsIOS&&/OS 4_\d(_\d)?/.test(navigator.userAgent),this.deviceIsIOSWithBadTarget=this.deviceIsIOS&&/OS [6-7]_\d/.test(navigator.userAgent),this.deviceIsBlackBerry10=navigator.userAgent.indexOf("BB10")>0,!e.notNeeded(t)){for(a=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],c=this,l=a.length,u=0;l>u;u++)c[a[u]]=i(c[a[u]],c);s&&(t.addEventListener("mouseover",this.onMouse,!0),t.addEventListener("mousedown",this.onMouse,!0),t.addEventListener("mouseup",this.onMouse,!0));t.addEventListener("click",this.onClick,!0);t.addEventListener("touchstart",this.onTouchStart,!1);t.addEventListener("touchmove",this.onTouchMove,!1);t.addEventListener("touchend",this.onTouchEnd,!1);t.addEventListener("touchcancel",this.onTouchCancel,!1);Event.prototype.stopImmediatePropagation||(t.removeEventListener=function(e,n,i){var r=Node.prototype.removeEventListener;"click"===e?r.call(t,e,n.hijacked||n,i):r.call(t,e,n,i)},t.addEventListener=function(e,n,i){var r=Node.prototype.addEventListener;"click"===e?r.call(t,e,n.hijacked||(n.hijacked=function(e){e.propagationStopped||n(e)}),i):r.call(t,e,n,i)});"function"==typeof t.onclick&&(r=t.onclick,t.addEventListener("click",function(e){r(e)},!1),t.onclick=null)}}return e.prototype.needsClick=function(e){var t,n;switch(e.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(e.disabled)return!0;break;case"input":if(this.deviceIsIOS&&"file"===e.type||e.disabled)return!0;break;case"label":case"iframe":case"video":return!0}for(t=!1,n=e;n&&n!==document&&!t;)t=/\bneedsclick\b/.test(n.className),n=n.parentNode;return t},e.prototype.needsFocus=function(e){if(/\bforcenofocus\b/.test(e.className))return!1;switch(e.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!this.deviceIsAndroid;case"input":switch(e.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!e.disabled&&!e.readOnly;default:return/\bneedsfocus\b/.test(e.className)}},e.prototype.sendClick=function(e,t){var n,i;document.activeElement&&document.activeElement!==e&&document.activeElement.blur();i=t.changedTouches[0];n=document.createEvent("MouseEvents");n.initMouseEvent(this.determineEventType(e),!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null);n.forwardedTouchEvent=!0;e.dispatchEvent(n)},e.prototype.determineEventType=function(e){return this.deviceIsAndroid&&"select"===e.tagName.toLowerCase()?"mousedown":"click"},e.prototype.focus=function(e){var t;this.deviceIsIOS&&e.setSelectionRange&&0!==e.type.indexOf("date")&&"time"!==e.type&&"month"!==e.type?(t=e.value.length,e.setSelectionRange(t,t)):e.focus()},e.prototype.updateScrollParent=function(e){var t,n=e.fastClickScrollParent;if(!n||!n.contains(e)){t=e;do{if(t.scrollHeight>t.offsetHeight){n=t;e.fastClickScrollParent=t;break}t=t.parentElement}while(t)}n&&(n.fastClickLastScrollTop=n.scrollTop,n.fastClickLastScrollLeft=n.scrollLeft)},e.prototype.getTargetElementFromEventTarget=function(e){return e.nodeType===Node.TEXT_NODE?e.parentNode:e},e.prototype.onTouchStart=function(e){var t,n,i;if(e.targetTouches.length>1)return!0;if(t=this.getTargetElementFromEventTarget(e.target),n=e.targetTouches[0],this.deviceIsIOS){if(i=window.getSelection(),i.rangeCount&&!i.isCollapsed)return!0;if(!this.deviceIsIOS4){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return e.preventDefault(),!1;this.lastTouchIdentifier=n.identifier;this.updateScrollParent(t)}}return this.trackingClick=!0,this.trackingClickStart=e.timeStamp,this.targetElement=t,this.touchStartX=n.pageX,this.touchStartY=n.pageY,e.timeStamp-this.lastClickTime<this.tapDelay&&e.preventDefault(),!0},e.prototype.touchHasMoved=function(e){var t=e.changedTouches[0],n=this.touchBoundary;return Math.abs(t.pageX-this.touchStartX)>n||Math.abs(t.pageY-this.touchStartY)>n},e.prototype.onTouchMove=function(e){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(e.target)||this.touchHasMoved(e))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},e.prototype.findControl=function(e){return void 0!==e.control?e.control:e.htmlFor?document.getElementById(e.htmlFor):e.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},e.prototype.onTouchEnd=function(e){var t,n,i,r,o,s=this.targetElement;if(!this.trackingClick)return!0;if(e.timeStamp-this.lastClickTime<this.tapDelay)return this.cancelNextClick=!0,!0;if(e.timeStamp-this.trackingClickStart>this.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=e.timeStamp,n=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,this.deviceIsIOSWithBadTarget&&(o=e.changedTouches[0],s=document.elementFromPoint(o.pageX-window.pageXOffset,o.pageY-window.pageYOffset)||s,s.fastClickScrollParent=this.targetElement.fastClickScrollParent),i=s.tagName.toLowerCase(),"label"===i){if(t=this.findControl(s)){if(this.focus(s),this.deviceIsAndroid)return!1;s=t}}else if(this.needsFocus(s))return e.timeStamp-n>100||this.deviceIsIOS&&window.top!==window&&"input"===i?(this.targetElement=null,!1):(this.focus(s),this.sendClick(s,e),this.deviceIsIOS&&"select"===i||(this.targetElement=null,e.preventDefault()),!1);return!this.deviceIsIOS||this.deviceIsIOS4||(r=s.fastClickScrollParent,!r||r.fastClickLastScrollTop===r.scrollTop&&r.fastClickLastScrollLeft===r.scrollLeft)?(this.needsClick(s)||(e.preventDefault(),this.sendClick(s,e)),!1):!0},e.prototype.onTouchCancel=function(){this.trackingClick=!1;this.targetElement=null},e.prototype.onMouse=function(e){return this.targetElement?e.forwardedTouchEvent?!0:e.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(e.stopImmediatePropagation?e.stopImmediatePropagation():e.propagationStopped=!0,e.stopPropagation(),e.preventDefault(),!1):!0:!0},e.prototype.onClick=function(e){var t;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===e.target.type&&0===e.detail?!0:(t=this.onMouse(e),t||(this.targetElement=null),t)},e.prototype.destroy=function(){var e=this.layer;this.deviceIsAndroid&&(e.removeEventListener("mouseover",this.onMouse,!0),e.removeEventListener("mousedown",this.onMouse,!0),e.removeEventListener("mouseup",this.onMouse,!0));e.removeEventListener("click",this.onClick,!0);e.removeEventListener("touchstart",this.onTouchStart,!1);e.removeEventListener("touchmove",this.onTouchMove,!1);e.removeEventListener("touchend",this.onTouchEnd,!1);e.removeEventListener("touchcancel",this.onTouchCancel,!1)},e.notNeeded=function(e){var t,n,i,r;return"undefined"==typeof ontouchstart?!0:(n=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1])&&(!this.deviceIsAndroid||(t=document.querySelector("meta[name=viewport]"))&&(-1!==t.content.indexOf("user-scalable=no")||n>31&&document.documentElement.scrollWidth<=window.outerWidth))?!0:this.deviceIsBlackBerry10&&(i=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),i[1]>=10&&i[2]>=3&&(t=document.querySelector("meta[name=viewport]")))&&(-1!==t.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth)?!0:"none"===e.style.msTouchAction||"manipulation"===e.style.touchAction?!0:(r=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],r>=27&&(t=document.querySelector("meta[name=viewport]"),t&&(-1!==t.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===e.style.touchAction||"manipulation"===e.style.touchAction)},e.attach=function(t,n){return new e(t,n)},e}();window.FastClick=FastClick;LongClick.prototype.onTouchStart=function(e){"use strict";var t,n;if(e.targetTouches&&1===e.targetTouches.length)n=e.targetTouches[0];else{if(!e.clientX||!e.clientY)return!0;n=e}return t=e.target,this.trackingClick=!0,this.trackingClickStart=e.timeStamp,this.targetElement=t,this.touchStartX=n.clientX,this.touchStartY=n.clientY,this.timer=window.setTimeout(this.handler,this.time),!0};LongClick.prototype.touchHasMoved=function(e){"use strict";var t,n=this.touchBoundary;return t=e.changedTouches?e.changedTouches[0]:e,Math.abs(t.clientX-this.touchStartX)>n||Math.abs(t.clientY-this.touchStartY)>n};LongClick.prototype.onTouchMove=function(e){"use strict";return this.trackingClick?((this.targetElement!==e.target||this.touchHasMoved(e))&&this.reset(),!0):!0};LongClick.prototype.onTouchEnd=function(e){"use strict";return this.trackingClick?e.timeStamp-this.trackingClickStart<this.time?(this.reset(),!0):!1:!0};LongClick.prototype.reset=function(){"use strict";this.timer&&window.clearTimeout(this.timer);this.trackingClick=!1;this.trackingClickStart=null;this.targetElement=null};LongClick.prototype.onTouchCancel=function(){"use strict";this.reset()};LongClick.prototype.destroy=function(){"use strict";var e=this.layer;e.removeEventListener(this.startEventName,this.onTouchStart,!1);e.removeEventListener(this.moveEventName,this.onTouchMove,!1);e.removeEventListener(this.endEventName,this.onTouchEnd,!1);e.removeEventListener(this.cancelEventName,this.onTouchCancel,!1)};LongClick.attach=function(e,t,n){"use strict";return new LongClick(e,t,n)},function(){}(ns_gen5_data||(ns_gen5_data={})),function(e){var t=function(){function e(e,t,n,i,r,o,s){this.languageId=e;this.cultureCode=t;this.cultureCode2=n;this.languageCode=i;this.supportsEmbeddedFonts=r;this.isAsianRegion=o;this.allowCapitalisation=s}return e}();e.LanguageProfile=t}(ns_gen5_ml||(ns_gen5_ml={})),function(e){var t=e.LanguageProfile,n=function(){function e(){}return e.SelectLanguageProfile=function(t){0==t&&(t=1);e.SelectedProfile=e.LanguageProfiles[t]},e.getRegionIsAsian=function(){return e.SelectedProfile.isAsianRegion},e.getLanguageId=function(){return e.SelectedProfile.languageId},e.allowCapitalisation=function(){return e.SelectedProfile.allowCapitalisation},e.getLanguageCode=function(){return this.SelectedProfile.languageCode},e.getCultureCode=function(){return this.SelectedProfile.cultureCode},e.getCultureCode2=function(){return this.SelectedProfile.cultureCode2},e.init=function(){e.LanguageProfiles={1:new t(1,"en","en","en-GB",!0,!1,!0),2:new t(2,"zht","zh-cht","ch",!1,!0,!1),3:new t(3,"es","es","es",!0,!1,!0),4:new t(4,"fr","fr","fr",!0,!1,!0),5:new t(5,"de","de","de",!0,!1,!0),6:new t(6,"it","it","it",!0,!1,!0),7:new t(7,"da","da","da",!0,!1,!0),8:new t(8,"sv","sv","sv",!0,!1,!0),9:new t(9,"nn","nn","no",!0,!1,!0),10:new t(10,"zh","zh-chs","zh-cn",!1,!0,!1),19:new t(19,"bg","bg","bg",!0,!1,!0),20:new t(20,"el","el","el",!0,!1,!1),21:new t(21,"pl","pl","pl",!0,!1,!0),22:new t(22,"pt","pt","pt",!0,!1,!0),23:new t(23,"ro","ro","ro",!0,!1,!0),24:new t(24,"cs","cs","cs",!0,!1,!0),25:new t(25,"hu","hu","hu",!0,!1,!0),26:new t(26,"sk","sk","sk",!0,!1,!0),28:new t(28,"nl","nl","nl-nl",!0,!1,!0),30:new t(30,"en","en","en-AU",!0,!1,!0)}},e}();e.LanguageSettings=n;n.init()}(ns_gen5_ml||(ns_gen5_ml={})),function(e){var t=e.LanguageSettings,n=function(){function e(){}return e.GetMonthName=function(n){return e._mylanguage||(e._mylanguage=e.ALL_MONTHS[t.getLanguageId()]),t.getRegionIsAsian()?(n+1+e.CMC).toString():e._mylanguage[n].toString()},e}();n.CMC="月";n.CDC="日";n.ALL_MONTHS={1:["January","February","March","April","May","June","July","August","September","October","November","December"],2:["1","2","3","4","5","6","7","8","9","10","11","12"],3:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],5:["Januar ","Februar ","März","April ","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],6:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],7:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober ","November","December"],8:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],9:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],10:["1","2","3","4","5","6","7","8","9","10","11","12"],19:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],20:["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαϊου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"],21:["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia"],22:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],23:["Ian","Feb","Mar","Apr","Mai","Iun","Iul","Aug","Sep","Oct","Nov","Dec"],24:["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince"],25:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],26:["januára","februára","marca","apríla","mája","júna","júla","augusta","septembra","októbra","novembra","decembra"],28:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],30:["January","February","March","April","May","June","July","August","September","October","November","December"]};e.LongMonthNames=n}(ns_gen5_ml||(ns_gen5_ml={})),function(e){var t=e.LanguageSettings,n=function(){function e(){}return e.GetDay=function(n){return e._mylanguage||(e._mylanguage=e.ALL_DAYS[t.getLanguageId()]),e._mylanguage[n].toString()},e}();n.ALL_DAYS={1:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],2:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],3:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],5:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],6:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],7:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],8:["Söndag","Mandag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"],9:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],10:["星期天","星期一","星期二","星期三","星期四","星期五","星期六"],19:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота"],20:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],21:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],22:["Domingo","Segunda-Feira","Terça-Feira","Quarta-Feira","Quinta-Feira","Sexta-Feira","Sábado"],23:["Duminica","Luni","Marti","Miercuri","Joi","Vineri","Sambata"],24:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota"],25:["Vasárnap","Hétfő","Kedd","Szerda"," Csütörtök","Péntek","Szombat"],26:["Nedeľa","Pondelok","Utorok","Streda","Štvrtok","Piatok","Sobota"],28:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag"],30:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]};e.LongDayNames=n}(ns_gen5_ml||(ns_gen5_ml={})),function(e){var t=e.LanguageSettings,n=function(){function e(){}return e.GetMonthName=function(n){return e._mylanguage||(e._mylanguage=e.ALL_MONTHS[t.getLanguageId()]),t.getRegionIsAsian()?String(n+1)+this.CMC:e._mylanguage[n]},e}();n.CYC="年";n.CMC="月";n.CDC="日";n.ALL_MONTHS={1:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],2:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],3:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],4:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],5:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],6:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],7:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],8:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],9:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],10:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],14:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],19:["яну","фев","мар","апр","май","юни","юли","авг","сеп","окт","ное","дек"],20:["Ιαν","Φεβ","Μαρ","Απρ","Μαΐου","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],21:["Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paź","Lis","Gru"],22:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Sep","Out","Nov","Dez"],23:["Ian","Feb","Mar","Apr","Mai","Iun","Iul","Aug","Sep","Oct","Nov","Dec"],24:["led","úno","bře","dub","kvě","čer","čvc","srp","zář","říj","lis","pro"],25:["Jan","Feb","Már","Ápr","Máj","Jún","Júl","Aug","Szep","Okt","Nov","Dec"],26:["jan","feb","mar","apr","máj","jún","júl","aug","sep","okt","nov","dec"],28:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],30:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};e.ShortMonthNames=n}(ns_gen5_ml||(ns_gen5_ml={})),function(e){var t=e.LanguageSettings,n=function(){function e(){}return e.GetDay=function(n){return e._mylanguage||(e._mylanguage=e.ALL_DAYS[t.getLanguageId()]),e._mylanguage[n]},e}();n.ALL_DAYS={1:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],2:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],3:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],5:["So","Mo","Di","Mi","Do","Fr","Sa"],6:["Dom","Lun","Mar","Mer","Giov","Ven","Sab"],7:["Søn","Man","Tir","Ons","Tor","Fre"," Lør"],8:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],9:["Søn","Man","Tirs","Ons","Tors","Fre","Lør"],10:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],19:["Нед","Пон","Вт","Ср","Чет","Пет","Съб"],20:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],21:["N","Pn","Wt","Śr","Cz","Pt","So"],22:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"],23:["D","L","Ma","Mi","J","V","S"],24:["Ne","Po","Út","St","Čt","Pá","So"],25:["Vas","Hét","Kedd","Sze"," Csüt","Pén","Szo"],26:["Ned","Pon","Ut","Str","Štv","Pia","Sob"],28:["zo","ma","di","wo","do","vr","za"],30:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]};e.ShortDayNames=n}(ns_gen5_ml||(ns_gen5_ml={})),function(e){var t=e.LanguageSettings,n=e.ShortMonthNames,i=e.LongMonthNames,r=e.ShortDayNames,o=e.LongDayNames,s=function(){function e(){}return e.FormatDate=function(e,t,n,i){var r,o;switch(0!=i&&(o=t.getMinutes(),o+=i,t.setMinutes(o)),e){case this.BOOK_CLOSE:r=this.bookClose(t,n);break;case this.DAY_DATE_LONGMONTH:r=this.dayDateLongMonth(t,n);break;case this.DAY_DATE_MONTH_YEAR_TIME:r=this.dayDateMonthYearTime(t,n);break;case this.HH_MM_SS:r=this.hhmmss(t);break;case this.HH_MM:r=this.hhmm(t);break;case this.DAY_DATE:r=this.dayDate(t,n);break;case this.DAY_DATE_LONG:r=this.dayDateLong(t,n);break;case this.DAY_ONLY:r=this.day(t);break;case this.DATE_MONTH_YEAR:r=this.dateMonthYear(t);break;case this.DAY_DATE_MONTH_YEAR_TIME_SECONDS:r=this.dayDateMonthYearTimeSeconds(t,n);break;case this.DAY_DATE_MONTH_TIME:r=this.dayDateMonthTime(t)}return r},e.FormatStringToDate=function(e){var t=e.split(" "),n=t[0],i=n.split("/"),r=t[1],o=r.split(":"),s=new Date;return s.setDate(parseInt(i[0])),s.setMonth(parseInt(i[1])-1),s.setFullYear(parseInt(i[2])),s.setHours(parseInt(o[0])),s.setMinutes(parseInt(o[1])),s.setSeconds(parseInt(o[2])),s},e.bookClose=function(e,i){var r,o=e.getDate().toString(),s=n.GetMonthName(e.getMonth()),a=e.getMinutes().toString(),c=e.getHours().toString(),l=(c.length>1?c:"0"+c)+this.TIME_SEPERATOR+(a.length>1?a:"0"+a);return t.getRegionIsAsian()?(o+=n.CDC,r=s+o+" "+l):r=this.requiresAmericanFormatting(i,t.getLanguageId())?s+" "+o+" "+l:25==t.getLanguageId()?s+" "+o+" "+l:o+" "+s+" "+l,r},e.dayDateLong=function(e,t){var n=e.getDay();return r.GetDay(n)+" "+this.dayDate(e,t)},e.dayDate=function(e,i){var r,o=e.getDate(),s=10>o?"0"+o.toString():o.toString(),a=n.GetMonthName(e.getMonth());return t.getRegionIsAsian()?(s+=n.CDC,r=a+s):r=this.requiresAmericanFormatting(i,t.getLanguageId())?a+" "+s:25==t.getLanguageId()?a+" "+s:s+" "+a,r},e.day=function(e){var t=e.getDay();return o.GetDay(t)},e.requiresAmericanFormatting=function(e,t){return"11"==e&&1==t},e.hhmmss=function(e){var t=e.getHours().toString(),n=e.getMinutes().toString(),i=e.getSeconds().toString();return t.length<2&&(t="0"+t),n.length<2&&(n="0"+n),i.length<2&&(i="0"+i),t+":"+n+":"+i},e.hhmm=function(e){var t=e.getHours().toString(),n=e.getMinutes().toString();return t.length<2&&(t="0"+t),n.length<2&&(n="0"+n),t+":"+n},e.dayDateLongMonth=function(e,n){var r,o=e.toString(),s=i.GetMonthName(e.getMonth()).toString(),a=this.GetSuffix(e.getDay()),c=t.getLanguageId();switch(c){case 1:case 6:case 9:case 19:case 20:case 21:case 24:case 26:case 28:r=this.requiresAmericanFormatting(n,c)?s+" "+o+a:o+a+" "+s;break;case 2:case 10:o+=i.CDC;r=s+" "+o;break;case 3:r=o+a+" de "+s;break;case 5:r=", den "+o+a+" "+s;break;case 7:case 8:r="den "+o+a+" "+s;break;case 23:r=", "+o+a+" "+s;break;case 25:r=s+" "+o+a;break;default:r=o+" "+s}return r},e.dayDateMonthYearTime=function(e,i){var o,s,a=n.GetMonthName(e.getMonth()),c=r.GetDay(e.getDay()),l=e.getMinutes().toString(),u=t.getLanguageId();switch(s=0==e.getHours()?"00":e.getHours()<10?"0"+e.getHours().toString():e.getHours().toString(),l=0==e.getMinutes()?"00":e.getMinutes()<10?"0"+e.getMinutes().toString():e.getMinutes().toString(),u){case 2:case 10:o=c+" "+e.getFullYear()+n.CYC+a+e.getDate()+n.CDC+", "+s+":"+l;break;case 23:o=c+", "+e.getDate()+" "+a+" "+e.getFullYear()+", "+s+":"+l;break;case 25:o=c+" "+e.getFullYear()+" "+a+" "+e.getDate()+" "+s+":"+l;break;default:o=this.requiresAmericanFormatting(i,t.getLanguageId())?c+" "+a+" "+e.getDate()+" "+e.getFullYear()+", "+s+":"+l:c+" "+e.getDate()+" "+a+" "+e.getFullYear()+", "+s+":"+l}return o},e.dayDateMonthYearTimeSeconds=function(e,t){var n=this.dayDateMonthYearTime(e,t),i=e.getSeconds().toString();return i.length<2&&(i="0"+i),n+(":"+i)},e.dateMonthYear=function(e){var t=(e.getDay()<10?"0"+e.getDay():e.getDay()).toString(),n=((e.getMonth()<9?"0":"")+(e.getMonth()+1)).toString(),i=e.getFullYear().toString();return t+"."+n+"."+i},e.dayDateMonthTime=function(e){var t,i=n.GetMonthName(e.getMonth()),o=r.GetDay(e.getDay()),s=e.getMinutes().toString();return t=0==e.getHours()?"00":e.getHours()<10?"0"+e.getHours().toString():e.getHours().toString(),s=0==e.getMinutes()?"00":e.getMinutes()<10?"0"+e.getMinutes().toString():e.getMinutes().toString(),o+" "+e.getDate()+" "+i+" "+t+":"+s},e.GetSuffix=function(e){var n,i,r=t.getLanguageId(),o=[];switch(e%=100,e>19&&(i=e.toString(),e=parseInt(this.charAt(i,i.length-1))),r){case 1:o=["th","st","nd","rd","th","th","th","th","th","th","th","th","th","th","th","th","th","th","th","th"];break;case 6:n=1==e?"°":"";break;case 3:n="°";break;case 5:case 7:case 9:case 21:case 24:case 25:case 26:n=".";break;case 19:case 20:case 22:case 23:n="";break;case 8:o=["e:",":a",":a",":e",":e",":e",":e",":e",":e",":e",":e",":e",":e",":e",":e",":e",":e",":e",":e",":e"];break;case 28:o=["e","e","e","e","e","e","e","e","e","e","e","e","e","e","e","e","e","e","e","e"];break;default:n=""}return null!=n?n:o[e]},e.charAt=function(e,t){return e.charAt(t)},e}();s.BOOK_CLOSE="bookClose";s.HH_MM_SS="hhmmss";s.HH_MM="hhmm";s.DAY_DATE_MONTH_YEAR_TIME="dayDateMonthYearTime";s.DAY_DATE_LONGMONTH="dayDateLongMonth";s.DAY_ONLY="day";s.DAY_DATE="dayDate";s.DAY_DATE_LONG="dayDateLong";s.DATE_MONTH_YEAR="dateMonthYear";s.DAY_DATE_MONTH_TIME="dayDateMonthTime";s.DAY_DATE_MONTH_YEAR_TIME_SECONDS="dayDateMonthYearTimeSeconds";s.TIME_SEPERATOR=":";e.MLDateFormatter=s}(ns_gen5_ml||(ns_gen5_ml={})),function(e){var t=function(){function e(){}return e.Init=function(){var t=Locator.user.countryId,n=window.location.hostname.toLowerCase().split(".");e.IsSpanish=t===e.Spain;e.IsDanish=t===e.Denmark;e.IsGreek=t===e.Greece;e.IsCypriot=t===e.Cyprus;e.IsItalyDomain=t===e.Italy;e.IsBulgarian=t===e.Bulgaria;e.IsSpainDomain="es"==n[n.length-1];e.IsAusDomain=t===e.Australia;e.IsCzechRepublic=t===e.CzechRepublic;e.IsIndia=t===e.India;e.IsAusDomainAndCustomer=e.IsAusDomain&&(Locator.user.isLoggedIn||!Locator.user.isLoggedIn&&"AU"===Locator.user.countryCode)},e}();t.Denmark="54";t.Spain="171";t.Greenland="218";t.Australia="13";t.Germany="75";t.Greece="78";t.Cyprus="51";t.Italy="97";t.Bulgaria="31";t.CzechRepublic="52";t.India="91";e.RegisteredCountry=t}(ns_gen5_util_user||(ns_gen5_util_user={})),function(e){var t=function(){function e(){}return e.HexStringToNumber=function(e){return Number("0x"+e.slice(1))},e.NumberToHexString=function(e){var t=(16777215&e).toString(16);return"#"+"00000".substring(0,6-t.length)+t},e.AdjustColourBrightness=function(e,t){return e=((16711680&e)>>16)*t<<16|((65280&e)>>8)*t<<8|(255&e)*t,e>16777215?16777215:e},e.AdjustHexBrightness=function(e,t){return this.NumberToHexString(this.AdjustColourBrightness(this.HexStringToNumber(e),t))},e.Blend=function(e,t,n){return(((16711680&e)>>16)*(1-n)<<16|((65280&e)>>8)*(1-n)<<8|(255&e)*(1-n))+(((16711680&t)>>16)*n<<16|((65280&t)>>8)*n<<8|(255&t)*n)},e}();e.ColourUtil=t}(ns_gen5_util||(ns_gen5_util={})),function(e){var t;!function(e){function t(e){return+e}function n(e){return~~e}e.StringToNumber=t;e.StringToInteger=n}(t=e.MathUtil||(e.MathUtil={}))}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=function(){function e(){}return e.prototype.setConfigJSON=function(e){this.rawJSON=e;this.configJSON=this.rawJSON.config},e.prototype.getItem=function(e){return this.configJSON[e]},e.prototype.getRawJson=function(){return this.rawJSON},e}();e.Config=t}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=function(){function e(e){this.message=e;this.timestamp=new Date}return e.prototype.toString=function(){return"["+this.timestamp+"] - "+this.message},e}();e.LogEntry=t}(ns_gen5_util||(ns_gen5_util={})),function(e){e.AjaxLoader=function(){"use strict";function t(e,t){var i,r,o,s,a,c,l=[];if(l.splice(0,0,document.getElementsByTagName("script")),c=!1,e.src)for(s=0,a=l.length;a>s;s++)if(l[s].src&&l[s].src.split("?")[0]==e.src.split("?")[0]){c=!0;break}if(c)t&&t();else{if(r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("script"),o.type="text/javascript",e.src)o.src=e.src,o.onerror=o.onload=t;else{for(i=n(e),s=0,a=l.length;a>s;s++)n(l[s])==i&&l[s].parentNode.removeChild(l[s]);o.appendChild(document.createTextNode(i));t&&t()}r.appendChild(o,r.firstChild);e.parentNode&&e.parentNode.removeChild(e)}}function n(e){return e.text||e.textContent||e.innerHTML||""}function i(e,n,r){n<e.length?t(e[n],function(){i(e,++n,r)}):r&&r()}return{load:function(e,t,n){var i=new XMLHttpRequest;i.onreadystatechange=function(){4==i.readyState&&(200==i.status?(t.innerHTML=i.responseText,n&&n()):$log("MatchLive markup request failed, status: "+i.status),i.onreadystatechange=null)};i.open("GET",e,!0);i.send("")},loadAndExecute:function(t,n,i){e.AjaxLoader.load(t,n,function(){e.AjaxLoader.processScripts(n,i)})},processScripts:function(e,t){for(var r=[],o=e.getElementsByTagName("script"),n=o.length;n--;)o[0].type&&"text/javascript"!==o[0].type.toLowerCase()||r.push(o[0].parentNode?o[0].parentNode.removeChild(o[0]):o[0]);i(r,0,t)}}}()}(ns_gen5_util||(ns_gen5_util={})),function(e){e.EventTrigger=function(){"use strict";return{triggerEventOnElement:function(e,t,n){var i;document.createEvent?(i=document.createEvent("HTMLEvents"),i.initEvent(t,!0,!0)):(i=document.createEventObject(),i.eventType=t);i.eventName=t;i.data=n||{};document.createEvent?document.dispatchEvent(i):document.fireEvent("on"+i.eventType,i)}}}()}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=function(){function e(e,t){this.scope=e;this.method=t}return e.prototype.toString=function(){return"[Delegate scope="+this.scope+"]"},e}();e.Delegate=t;e.EventListener=t}(ns_gen5_util||(ns_gen5_util={})),function(e){var t;!function(e){e[e.DEFAULT=1]="DEFAULT";e[e.FRACTIONAL=1]="FRACTIONAL";e[e.DECIMAL=2]="DECIMAL";e[e.AMERICAN=3]="AMERICAN"}(t=e.OddsType||(e.OddsType={}))}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=function(){function e(){}return e}();t.NOT_SUSPENDED="0";t.SUSPEND_AND_SHOW="1";t.OFF_THE_BOARD="2";t.IPPG_SUSPEND_AND_HIDE="3";e.SuspendType=t}(ns_gen5_util||(ns_gen5_util={})),function(e){var t,n,i=(ns_gen5_data.Attribute,{}),r={};!function(e){e[e.AVAILABLE=0]="AVAILABLE";e[e.BELOW_MINIMUM=1]="BELOW_MINIMUM";e[e.NOT_OFFERED=2]="NOT_OFFERED"}(t=e.OddsAvailable||(e.OddsAvailable={}));n=function(){function e(){}return e.ConvertOddsDecimal=function(t,n,r){var o,s,a,c,l,u,d,h;if(n||0==n||(n=2),r||0==r||(r=!0),o=t+n,r&&(i[o]||!t))return i[o];if(a=t.indexOf("/",1),a>-1)if(s=[t.slice(0,a),t.slice(++a)],c=Number((Number(s[0])>>0)/(Number(s[1])>>0)+(r?1:0)).toFixed(4),Number(c)<1.1&&c.split(".")[1].length>2&&0==e.MinOdds&&(n=3),l=0,u=c.indexOf(".",1),0==n)c=c.slice(0,u>-1?u:2147483647);else if(u>-1)if(l=n-(c.length-++u),l>0)for(d=0;l>d;d++)c+="0";else 0>l&&(c=c.slice(0,c.length+l));else for(c+=".",h=0;n>h;h++)c+="0";return r&&(i[o]=c),c},e.ConvertOddsUS=function(e){var t,n,i,o,s,a;return r[e]||!e?r[e]:(i=e.indexOf("/",1),i>-1&&(n=[e.slice(0,i),e.slice(++i)],o=Number(n[0]),s=Number(n[1]),a=o/s,t=a>.999999?"+"+String(100*a+1e-6|0):"-"+String(s/o*100+.999999|0)),r[e]=t,t)},e.AreOddsBelowMinimum=function(t){if(e.MinOdds<=1)return!1;var n=e.ConvertOddsDecimal(t,4);return isNaN(n)?!1:+n<e.MinOdds},e.AreOddsRestricted=function(e){var t,n,i=e.data.PX,r=!1;if(i){t=-1;n=Locator.user.countryCode64;do t=i.indexOf(n,++t);while(-1!=t&&t%2);r=t>-1}return r},e.ConvertDecimalOddsToFractional=function(t){var n,i,r,o=String(t),s=Math.pow(o.length,10),a=(t-1)*s,c=e.FactorOdds(a,s);return c?(i=a/c,r=s/c):(i=a,r=s),n=String(i)+"/"+String(r)},e.FactorOdds=function(t,n){var i;return i=e.HCF(t,n),Math.floor(i)},e.HCF=function(t,n){var i;return i=0==t?n:0==n?t:e.HCF(n,t%n),Math.floor(i)},e.AreOddsAvailable=function(e){return this.AreOddsBelowMinimum(e.data.OD)?t.BELOW_MINIMUM:this.AreOddsRestricted(e)?t.NOT_OFFERED:t.AVAILABLE},e}();n.MinOdds=0;n.NOT_OFFERED="N / O";e.OddsConverter=n}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=function(){function e(e,t){this.min=e;this.max=t}return e.prototype.getLength=function(){return this.max-this.min},e}();e.Range=t}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=function(){function e(e){this.type=e;$assert&&$assert(e,'"type" has not been defined on '+this)}return e.prototype.toString=function(){return"[Event365 type="+this.type+"]"},e}();t.SInit=function(){t.prototype.stopPropagation=!1;t.prototype.target=null;t.prototype.currentTarget=null}();e.Event365=t}(ns_gen5_events||(ns_gen5_events={})),function(e){var t=function(e){function t(t,n){var i=e.call(this,t)||this;return i.type=t,i.data=n,i}return __extends(t,e),t.prototype.toString=function(){return"[Event365 type="+this.type+", data = "+this.data+"]"},t}(e.Event365);t.DATA="data";__decorate([override],t.prototype,"toString");e.DataEvent=t}(ns_gen5_events||(ns_gen5_events={})),function(e){var t=function(){function e(){}return e.prototype.toString=function(){return"[EventDispatcher]"},e.prototype.addEventListener=function(e,t){$assert&&$assert(t,"handlerDelegate must be defined.");this._eRegister||(this._eRegister={},this._touchlist={});var n=this._eRegister[e];n?n[n.length]=t:this._eRegister[e]=[t]},e.prototype.dispatchEvent=function(e){var t,n,i,r;if(e.target?e.currentTarget=this:e.target=e.currentTarget=this,this._eRegister&&(t=e.type,n=this._eRegister[t]))for(this._touchlist[t]&&this.cleanRegister(t),r=0;r<n.length;r++){i=n[r];try{i&&i.method.call(i.scope,e)}catch(o){ErrorReporter.Trace(this,o)}}},e.prototype.bubbleEvent=function(e){if(this.dispatchEvent(e),!e.stopPropagation)for(var t=this.parent;t;){if(t.bubbleEvent){t.bubbleEvent(e);break}t=t.parent}},e.prototype.removeEventListener=function(e,t){var n,i;return this._eRegister?(n=this._eRegister[e],void(n&&(i=n.indexOf(t))>-1?(n[i]=void 0,this._touchlist[e]=!0):$assert&&$assert(!1,"removeEventListener call failed because the delegate didn't exist."))):void($assert&&$assert(!1,"removeEventListener call failed because the eRegister doesn't exist."))},e.prototype.hasEventListener=function(e){if(!this._eRegister)return!1;this._touchlist[e]&&this.cleanRegister(e);var t=this._eRegister[e];return t&&t.length>0},e.prototype.hasEventListenerWithDelegate=function(e,t){if(!this._eRegister)return!1;this._touchlist[e]&&this.cleanRegister(e);var n=this._eRegister[e];return!!(n&&n.indexOf(t)>-1)},e.prototype.cleanRegister=function(e){var t,n,i,r,o;for(this._touchlist[e]=!1,t=this._eRegister[e],n=[],i=0,r=t;i<r.length;i++)o=r[i],o&&(n[n.length]=o);this._eRegister[e]=n},e}();t.SInit=function(){t.prototype._eRegister=null;t.prototype._touchlist=null}();e.EventDispatcher=t}(ns_gen5_events||(ns_gen5_events={})),function(e){var t=function(e){function t(t,n){void 0===n&&(n=NaN);var i=e.call(this,t)||this;return i.width=n,i}return __extends(t,e),t.prototype.toString=function(){return"[ApplicationEvent]"},t}(e.Event365);t.LOADING="loading";t.LOADING_COMPLETE="loadingComplete";t.LOADING_TIMEOUT="loadingTimeout";t.UNLOADING="unloading";t.WIDTH_STATE_CHANGED="widthStateChanged";t.VIEW_STATE_CHANGED="viewStateChanged";t.HEIGHT_CHANGED="heightChanged";t.WIDTH_CHANGED="widthChanged";t.FOCUS_IN="focusIn";t.FOCUS_OUT="focusOut";__decorate([override],t.prototype,"toString");e.ApplicationEvent=t}(ns_gen5_events||(ns_gen5_events={})),function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t}(e.Event365);t.ODDS_TYPE_CHANGED="oddsChanged";t.LANGUAGE_CHANGED="languageChanged";e.UserEvent=t}(ns_gen5_events||(ns_gen5_events={})),function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t}(e.Event365);t.MODULE_READY="moduleReady";e.ModuleEvent=t}(ns_gen5_events||(ns_gen5_events={})),function(e){var t=e.Event365,n=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t}(t);n.BALANCEMODEL_UPDATE_EVENT="balanceModelUpdated";e.BalanceModelEvent=n}(ns_gen5_events||(ns_gen5_events={})),function(e){var t=function(e){function t(t,n){var i=e.call(this,t)||this;return i.modal=n,i}return __extends(t,e),t}(e.Event365);t.MODAL_CHANGE="modalChange";e.ModalEvent=t}(ns_gen5_events||(ns_gen5_events={})),function(e){var t=ns_gen5_events.EventDispatcher,n=function(e){function t(t){var n=e.call(this)||this;return n.preformattedXML=t,n}return __extends(t,e),t.prototype.setPreformattedXML=function(e){this.preformattedXML!==e&&(this.preformattedXML=e)},t.prototype.parse=function(e){var t,n,i;if(e&&this.setPreformattedXML(e),window.DOMParser&&DOMParser.prototype.parseFromString)n=new DOMParser,t=n.parseFromString(this.preformattedXML,"text/xml");else{if(n=new ActiveXObject("Microsoft.XMLDOM"),n.aSync&&(n.aSync=!1),i=n.loadXML(this.preformattedXML),!i)return ErrorReporter.Trace(this,"Unable to parse XML"),null;t=n}return t},t}(t);e.XMLParser=n}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=function(){function e(){this.manifest=window.websiteManifest}return e.prototype.getBuildVersion=function(e){return e?this.manifest.modulesInformation[e].version:this.manifest.version},e.prototype.getDefaultTopic=function(e){return this.manifest.modulesInformation[e].defaultTopic},e.prototype.resolveResourcePath=function(){return""},e.prototype.getDependencyLookup=function(){return this.manifest.modulesInformation},e}();e.ManifestManager=t}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t}(ns_gen5_events.Event365);t.COMPLETE="complete";t.TICK="tick";e.TimerEvent=t}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=e.TimerEvent,n=function(e){function n(t,n){var i=e.call(this)||this;return i.time=t,i._timeStarted=null,i._timerid=-1,i._timeRemaining=0,i.repeats=n||0,i.ticks=0,i._callback_tickHandler=function(){return i._tickHandler()},i}return __extends(n,e),n.prototype.toString=function(){return"[Timer]"},n.prototype.start=function(){var e=this._timeRemaining||this.time;this._timeRemaining=0;this._timeStarted=new Date;this._timerid=setTimeout(this._callback_tickHandler,e);this.active=!0},n.prototype.reset=function(){this._timerid>-1&&(clearTimeout(this._timerid),this._timerid=-1,this.ticks=0,this._timeRemaining=0,this.active=!1)},n.prototype.stop=function(){this._timerid>-1&&(this._timeRemaining=this.time-((new Date).getTime()-this._timeStarted.getTime()),clearTimeout(this._timerid),this._timerid=-1,this.active=!1)},n.prototype._tickHandler=function(){this.repeats>-1&&++this.ticks>=this.repeats?(this.dispatchEvent(new t(t.COMPLETE)),this.active=!1):(this.dispatchEvent(new t(t.TICK)),this.start())},n}(ns_gen5_events.EventDispatcher);__decorate([override],n.prototype,"toString");e.Timer=n}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=function(e){function t(t,n,i){var r=e.call(this,t)||this;return r.date=n,r.dateZoneAdjusted=i,r}return __extends(t,e),t.prototype.toString=function(){return"[TimeManagerEvent type="+this.type+"]"},t}(ns_gen5_events.Event365);t.TICK="tick";__decorate([override],t.prototype,"toString");e.TimeManagerEvent=t}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=e.TimeManagerEvent,n=function(e){function n(){var t=e.call(this)||this;return t._tickid=-1,t._callback_serverTime_tick=function(){t._serverTime_tick()},t}return __extends(n,e),n.prototype.toString=function(){return"[TimeManager]"},n.prototype.getTime=function(){return this._serverDate},n.prototype.getTimeInDateFormat=function(){return n.ParseDate(this._serverTime)},n.prototype.getTimeZoneAdjustedDate=function(){return this._serverDateZoneAdjusted?this._serverDateZoneAdjusted:this._serverDate},n.ParseDate=function(e){return new Date(Number(e.slice(0,4)),Number(e.slice(4,6))-1,Number(e.slice(6,8)),Number(e.slice(8,10)),Number(e.slice(10,12)),Number(e.slice(12,14)))},n.ParseZoneDate=function(e){var t=n.ParseDate(e);return t.setTime(t.getTime()+6e4*Locator.user.timeZoneAdjustment),t},n.ParseEpochDate=function(e,t){t&&(e+="000");return new Date(1e3*Number(e))},n.ParseEpochZoneDate=function(e,t){var i=n.ParseEpochDate(e,t);return i.setTime(i.getTime()+6e4*Locator.user.timeZoneAdjustment),i},n.StripNonNumericChars=function(e){return e.replace(/[^0-9]/g,"")},n.getTimeString=function(e,t){void 0===t&&(t=!0);var n=e.toTimeString();return n=n.substr(0,n.indexOf(" ")),t?n:n=n.substr(0,n.lastIndexOf(this.TIME_SEPERATOR))},n.prototype.setServerTime=function(e){var t,i;this._serverTime||(Locator.validationManager.callLater(this._callback_serverTime_tick),this._lastUpdatedMS=(new Date).getTime());this._serverTime=e;this._serverDate=n.ParseDate(e);this._lastUpdatedMS=(new Date).getTime();t=Locator.user.timeZoneAdjustment;0!=t&&(this._serverDateZoneAdjusted=n.ParseDate(e),i=this._serverDate.getMinutes()+t,this._serverDateZoneAdjusted.setMinutes(i))},n.prototype._serverTime_tick=function(){var e,n,i,r;this._serverDate&&(n=(new Date).getTime(),i=n-this._lastUpdatedMS,this._lastUpdatedMS=n,r=this._serverDate.getTime()+i,this._serverDate.setTime(r),this._serverDateZoneAdjusted?(r=this._serverDateZoneAdjusted.getTime()+i,this._serverDateZoneAdjusted.setTime(r),e=this._serverDateZoneAdjusted):e=this._serverDate,this.dispatchEvent(new t(t.TICK,this._serverDate,e)),this._tickid=setTimeout(this._callback_serverTime_tick,1e3))},n}(ns_gen5_events.EventDispatcher);n.DATE_SEPERATOR="/";n.TIME_SEPERATOR=":";__decorate([override],n.prototype,"toString");e.TimeManager=n}(ns_gen5_util||(ns_gen5_util={})),function(e){e.PrintDump=function(){"use strict";function e(n,i){var r,o,s,a,c,l;for(i||(i=0),r=t(n),o="",a="",c=0;i>c;c++)a+="  ";switch(r){case"string":return'"'+n+'"';case"number":return n.toString();case"boolean":return n?"true":"false";case"date":return"Date: "+n.toLocaleString();case"array":for(o+="List ( \n",s=0;s<n.length;s++)o+=a+"  "+s+" => "+e(n[s],i+1)+"\n";o+=a+")";break;case"object":o+="\n";for(l in n)n.hasOwnProperty(l)&&(o+=a+"  "+l+": "+e(n[l],i+1)+"\n");break;default:o+="N/A: "+r}return o}function t(e){var t=typeof e;if("object"!==t)return t;switch(e){case null:return"null"}switch(e.constructor){case Array:return"array";case Boolean:return"boolean";case Date:return"date";case Number:return"number";case Object:return"object"}return"Unknown"}function n(t){return e(t)}return n}()}(ns_gen5_util||(ns_gen5_util={})),function(e){var t="\t\r\n",n=" -------------------- ",i=function(){function i(){this._message=""}return i.prototype.buildHeader=function(e){return"*"+n+e+n+"*"+t},i.prototype._generate=function(){this._message=this._appendSummary();this._message=this._message.concat(this._appendNavigationHistory());this._message=this._message.concat(this._appendSettings());this._message=this._message.concat(this._pushedConfig());this._message=this._message.concat(this._appendNavigator());this._message=this._message.concat(this._appendModernizer());this._message=this._message.concat(this._appendReadIt());this._message=this._message.concat(this._appendSportSubscriptions());this._message=this._message.concat(this._appendPrivateSubscriptions());this._message=this._message.concat(this._appendErrorLog());this._message=this._message.concat(this._appendTraceLog());this._message=this._message.concat(this._appendOpenBetsLog());this._message=this._message.concat(this._appendAAATCookie());this._message=this._message.concat(this._appendSiteDataLocal());this._message=this._message.concat(this._appendManifest())},i.prototype.send=function(){this._generate();var e=new XMLHttpRequest;e.open("POST","LogHandler.ashx?lvl=2",!0);e.onreadystatechange=function(){4===e.readyState&&200===e.status};e.send(this._message);this._message=""},i.prototype._appendSiteProps=function(){return"sProps"in window?this.buildHeader("Site Properties")+e.PrintDump(sProps):""},i.prototype._appendAAATCookie=function(){var t=e.CookieManager.GetCookieValue("aaat");return t?this.buildHeader("Alternative Auth Token Cookie")+t:""},i.prototype._appendSiteDataLocal=function(){if("siteDataLocal"in window){var t=window.siteDataLocal.siteData;return t.constructor=Object,this.buildHeader("Site Data Local")+e.PrintDump(t)}return""},i.prototype._appendManifest=function(){var e,n,i=this.buildHeader("Manifest");i=i.concat("MasterVersion:"+Locator.manifestManager.getBuildVersion()+t);e=Locator.manifestManager.getDependencyLookup();for(n in e)e.hasOwnProperty(n)&&(i=i.concat(n+":"+t),i=i.concat("  version:"+e[n].version+t),i=i.concat(t));return i},i.prototype._appendSettings=function(){var n,i,r=Locator.user,o=this.buildHeader("User");o=o.concat("sessionId: "+e.CookieManager.GetSessionId()+t);for(n in r)if(r.hasOwnProperty(n)){if(i=r[n],"object"==typeof i)try{i=JSON.stringify(i)}catch(s){i="Object, impossible to stringify"}o=o.concat(n+":"+i+t)}return o},i.prototype._pushedConfig=function(){var e,n="",i=Locator.pushedConfig,r=this.buildHeader("pushedConfig");for(n in i)if(i.hasOwnProperty(n)){if(e=i[n],"object"==typeof e)try{e=JSON.stringify(e)}catch(o){e="Object, impossible to stringify"}r=r.concat(n+":"+e+t)}return r},i.prototype._appendModernizer=function(){var e,n,i;if("Modernizr"in window){n=Modernizr;e=this.buildHeader("Modernizer");for(i in n)n.hasOwnProperty(i)&&"function"!=typeof n[i]&&"object"!=typeof n[i]&&(e=e.concat(i+":"+n[i]+t))}return e},i.prototype._appendSummary=function(){var e="";return e=e.concat("Current Url:"+window.location.href+t),e=e.concat("Current time:"+new Date+t)},i.prototype._appendNavigator=function(){var e=window.navigator,n=this.buildHeader("Navigator");return n=n.concat("UserAgent:"+e.userAgent+t),n=n.concat("Language:"+(e.language||e.userLanguage)+t),n=n.concat("Vendor:"+e.vendor+t),n=n.concat("Platform:"+e.platform+t)},i.prototype._appendNavigationHistory=function(){var e,n,i;if("hashHistory"in window&&(n=hashHistory,i=void 0,e=this.buildHeader("Navigation History"),n))for(i=0;i<n.length;i++)e=e.concat(n[i]+t);return e},i.prototype._appendReadIt=function(){for(var n=readit.ReadItLog.getLog(),i=this.buildHeader("ReadIt"),e=0;e<n.length;e++)i=i.concat(n[e].toString()+t);return i},i.prototype._appendSportSubscriptions=function(){return this.buildHeader("SubscriptionManager - Sports")+Locator.subscriptionManager._OtsReport()},i.prototype._appendPrivateSubscriptions=function(){return this.buildHeader("PrivateSubscriptionManager")+Locator.privateSubscriptionManager._OtsReport()},i.prototype._appendErrorLog=function(){for(var n=ErrorReporter.getLog(),i=this.buildHeader("Error Reporter"),e=0;e<n.length;e++)i=i.concat(n[e]+t);return i},i.prototype._appendTraceLog=function(){var i,r,o,s,a=e.InfoReporter.getLog(),c=this.buildHeader("Trace Log");for(i in a)for(c=c.concat(n+i+n+t),r=0,o=a[i];r<o.length;r++)s=o[r],c=c.concat(s+t);return c.concat(n+t)},i.prototype._appendOpenBetsLog=function(){var e,n,i="";try{if(n=Locator.treeLookup.getReference("OPENBETS"))for(i=this.buildHeader("Open Bets"),e=0;e<n.getChildren().length;e++)i=i.concat(n.getChildren()[e].data.IT+t)}catch(r){i=""}return i},i.prototype._appendLoadedScripts=function(){for(var n,i=document.getElementsByTagName("script"),r=this.buildHeader("Loaded Scripts"),e=0;e<i.length;e++)n=i[e],n.src&&n.type&&(r=r.concat(n.src+t));return r},i}();e.OTSReport=i}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=ns_gen5_ml.LanguageSettings,n=function(){function e(){}return e.Format=function(e){for(var n,i,r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if(!e)return null;for(n=r.length,i=0;n>i;i++)e=e.split("{"+i+"}").join(r[i]);return e},e.Uppercase=function(e){return e?t.allowCapitalisation()?e.toUpperCase():e:""},e.Trim=function(e){return e.replace(/^\s+|\s+$/g,"")},e}();e.StringUtil=n}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=function(){function e(){}return e.getUnloadedDependencies=function(e){var t,n,i,r;if(!this.Lookup)return null;for(t=[],n=0,i=this.Lookup[e].deps;n<i.length;n++)r=i[n],this.LoadedDependenciesLookup[r]||t.push(r);return t.length?t:null},e.setLookup=function(e){this.Lookup=e},e.setLoaded=function(e){this.LoadedDependenciesLookup[e]=!0},e.IsLoaded=function(e){return e in this.LoadedDependenciesLookup},e}();t.LoadedDependenciesLookup={};e.DependencyManager=t}(ns_gen5_net||(ns_gen5_net={})),function(e){var t,n,i=function(){function e(e){this.keys=[];e&&this.deSerialize(e)}return e.prototype.addPair=function(e,t){this.keys[this.keys.length]=[e,t]},e.prototype.getPairWithKey=function(e){for(var i,t=0,n=this.keys;t<n.length;t++)if(i=n[t],i[0]==e)return i[1];return null},e.prototype.getKeys=function(){return this.keys},e.prototype.serialize=function(){for(var n,i="",e=0,t=this.keys;e<t.length;e++)n=t[e],i+=n[0]+"="+encodeURIComponent(n[1])+"&";return i.length?i.slice(0,i.length-1):i},e.prototype.deSerialize=function(e){for(var i,r,o=e.split("&"),t=0,n=o;t<n.length;t++)i=n[t],r=i.indexOf("="),r>-1&&this.addPair(i.substring(0,r),i.substring(r+1))},e}();e.URLVariables=i;t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t}(ns_gen5_events.Event365);t.COMPLETE="complete";t.ERROR="error";e.LoaderEvent=t;n=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return __extends(n,e),n.prototype.load=function(e,i){var r,o,s=this,a=this.isExternalDomain(e);this.url=e;r=this.xhr=a?readit.XDomainXMLHttpRequest.TryCreate(new XMLHttpRequest):new XMLHttpRequest;o=!1;r.onreadystatechange=function(){var n,i;4!=r.readyState||o||(o=!0,r.onreadystatechange=null,s.xhr=null,200==r.status?(s.completeHandler&&Locator.validationManager.callNewContext(function(){return s.completeHandler(r.responseText,r.status)}),s.hasEventListener(t.COMPLETE)&&(n=new t(t.COMPLETE),n.status=200,n.data=r.responseText,Locator.validationManager.callNewContext(function(){return s.dispatchEvent(n)}))):(s.errorHandler&&Locator.validationManager.callNewContext(function(){return s.errorHandler(r.status)}),s.hasEventListener(t.ERROR)&&(i=new t(t.ERROR),i.status=r.status,Locator.validationManager.callNewContext(function(){return s.dispatchEvent(i)}))))};r.open(i&&i.method||"GET",e+(i&&i.method!=n.POST&&i.urlVariables&&"?"+i.urlVariables.serialize()||""),!0);i&&i.contentType&&r.setRequestHeader("Content-type",i.contentType);r.withCredentials=i&&i.withCredentials||!1;r.send((i&&i.method==n.POST?i.urlVariables&&i.urlVariables.serialize():null)||i&&i.data||"")},n.prototype.abort=function(){try{this.xhr&&(this.xhr.abort(),this.xhr.onreadystatechange=null,this.xhr=null)}catch(e){}},n.prototype.getURL=function(){return this.url},n.prototype.isExternalDomain=function(e){var t=function(e){return 0===e.indexOf("//")&&(e=location.protocol+e),e.toLowerCase().replace(/([a-z])?:\/\//,"$1").split("/")[0]};return(e.indexOf(":")>-1||e.indexOf("//")>-1)&&t(location.href)!==t(e)},n}(ns_gen5_events.EventDispatcher);n.GET="GET";n.POST="POST";e.Loader=n}(ns_gen5_net||(ns_gen5_net={})),function(e){var t,n=ns_gen5_util.StringUtil,i="/SportsUI/{0}/min/{1}/{0}";window.LazyLoad||(window.LazyLoad={css:function(e,t,n){var i,r,o,s,a;for(e=[e],i=document.head||document.getElementsByTagName("head")[0],o=e.length,s=0;o>s;s++)r=e[s],a=document.createElement("link"),a.href=r,a.rel="stylesheet",a.onload=function(){t(n)},a.onerror=function(){ErrorReporter.Trace("LazyLoader","Module CSS Failed to Load: "+r)},i.appendChild(a)},js:function(e,t,n){var i,r;for(e=[e],i=e.length,r=0;i>r;r++)!function(e){var i,r,o;i=document.createElement("script");i.setAttribute("charset","UTF-8");r=document.head||document.getElementsByTagName("head")[0];i.onload=i.onreadystatechange=function(){o||i.readyState&&"loaded"!==i.readyState&&"complete"!==i.readyState||(o=!0,t(n),i.onload=i.onreadystatechange=null,r&&i.parentNode&&r.removeChild(i))};i.onerror=function(){ErrorReporter.Trace("LazyLoader"," Failed to Load: "+e)};i.src=e;r.appendChild(i)}(e[r])}});t=function(){function t(){}return t.SetModulePath=function(e){$assert&&$assert(e.indexOf("{0}")>-1&&e.indexOf("{1}")>-1,"Path must contain {0} AND {1} tokens for module name and version respectively.");i=e},t.prototype.loadModule=function(r,o,s,a){var c,l,u,d=this,h=Locator.manifestManager.getBuildVersion(r),p=i;p=n.Format(p,r,h);a=a||function(){o.resourcesLoaded++;s()};c=function(){var e,i,c,l=t.ModuleResourceLookup[r],u=window.LazyLoad;l&&(l.loadCSS&&o.resourcesNeeded++,l.loadLanguage&&o.resourcesNeeded++,l.loadConfig&&o.resourcesNeeded++,l.loadCSS&&u.css(p+".css",a),l.loadLanguage&&u.js(p.slice(0,p.lastIndexOf("/")+1)+Locator.user.languageId+".js",s),l.loadConfig&&(e=window.location.host.indexOf(":3000")>-1?"http://www414.b365dev.com":"http://"+window.location.host,i=e+"/sports/"+r+"/config.asp?lang={0}&cid={1}&zid={2}&cg={3}",c=Locator.user,i=n.Format(i,c.languageId,c.countryId,c.zoneId,c.countryGroupId),u.js(i,a)));u.js(p+".min.js",s)};null!=(l=e.DependencyManager.getUnloadedDependencies(r))?(u=function(){var t,n,i;l.length?(t=l.shift(),e.DependencyManager.setLoaded(t),n=new ns_gen5_ui.ModuleResourcePackage,i=function(){n.resourcesLoaded++;n.isFullyLoaded()&&u()},d.loadModule(t,n,i,i)):c()})():c()},t}();e.ModuleLoaderDefault=t}(ns_gen5_net||(ns_gen5_net={})),function(e){var t=function(){function t(){}return t.prototype.loadModule=function(t,n,i){function r(){n.resourcesLoaded=n.resourcesNeeded;i()}var o,s,a,c,l;if(!e.DependencyManager.IsLoaded(t)){if(o=e.DependencyManager.getUnloadedDependencies(t))for(s=0,a=o;s<a.length;s++)c=a[s],this.loadModule(c,new ns_gen5_ui.ModuleResourcePackage,function(){});l=boot.loadModule(t,r);e.DependencyManager.setLoaded(t);l&boot.LoadingFlags.CSS&&n.resourcesNeeded++;l&boot.LoadingFlags.LANGUAGE&&n.resourcesNeeded++}},t}();e.ModuleLoaderBlob=t}(ns_gen5_net||(ns_gen5_net={})),function(e){var t,n=ns_gen5_net.Loader,i=ns_gen5_net.LoaderEvent,r=ns_gen5_net.URLVariables,o=function(){function e(){this.data={}}return e}();o.UserPreferencesGUID="ns_gen5_util.UserPreferenceData";e.UserPreferenceData=o;t=function(){function t(t){this._userPreferenceServiceUrl=t;this._preferences=new o;this._preferencesInitialised=!1;this._pendingRequest=null;this._saveToServerCompleteHandlerDelegate=new e.Delegate(this,this._saveToServerCompleteHandler);this._saveToServerErrorHandlerDelegate=new e.Delegate(this,this._saveToServerErrorHandler)}return t.prototype.loadInitialPreferenceData=function(e){$assert&&$assert(!this._preferencesInitialised,"UserPreferencesAPI already initialised!");this._preferencesInitialised||(this._preferencesInitialised=!0,e&&(this._preferences.data[t.TEAM_PREFERENCE]=e.teamPreference,this._preferences.data[t.MARKET_GROUP_PREFERENCE]=e.marketGroupPreference,this._preferences.data[t.LEAGUE_TABLE_PREFERENCE]=e.leagueTablePreference,this._preferences.data[t.OVERVIEW_DEFAULT_MARKET]=e.overviewDefaultMarketPreference,this._preferences.data[t.PREGAME_CLASSIFICATION_MENU_FAVOURITES]=e.prematchClassificationsPreference))},t.prototype.getSerializationData=function(){return this._preferences},t.prototype.setSerializationData=function(e){this._preferences=e},t.prototype.addValues=function(e,t){var n,i,r,o;for(this._preferences.data[e]||(this._preferences.data[e]=[]),n=this._preferences.data[e],i=0,r=t;i<r.length;i++)o=r[i],-1===n.indexOf(o)&&n.push(o);this.save(e)},t.prototype.removeValues=function(e,t){for(var i,r=this._preferences.data[e],n=0;n<r.length;++n)for(i=0;i<t.length;++i)r[n]===t[i]&&r.splice(n--,1);this._preferences.data[e]=r;this.save(e)},t.prototype.setValues=function(e,t){this._preferences.data[e]=t;this.save(e)},t.prototype.getValues=function(e){return this._preferences.data[e]},t.prototype.save=function(e){this.saveToServer(e)},t.prototype.saveToServer=function(e){var t,o,s;if(Locator.user.isLoggedIn){if(this._clearPendingRequest(),t=new r,e)t.addPair(e,this._preferences.data[e].join(","));else for(o in this._preferences.data)t.addPair(o,this._preferences.data[o].join(","));s=this._pendingRequest=new n;s.addEventListener(i.COMPLETE,this._saveToServerCompleteHandlerDelegate);s.addEventListener(i.ERROR,this._saveToServerErrorHandlerDelegate);s.load(this._userPreferenceServiceUrl,{method:n.POST,urlVariables:t,contentType:"application/x-www-form-urlencoded"})}},t.prototype._saveToServerCompleteHandler=function(){$log(this,"Save To Server OK");this._clearPendingRequest()},t.prototype._saveToServerErrorHandler=function(e){ErrorReporter.Trace(this,"Save To Server : "+e.data);this._clearPendingRequest()},t.prototype._clearPendingRequest=function(){this._pendingRequest&&(this._pendingRequest.removeEventListener(i.COMPLETE,this._saveToServerCompleteHandlerDelegate),this._pendingRequest.removeEventListener(i.ERROR,this._saveToServerErrorHandlerDelegate),this._pendingRequest.abort(),this._pendingRequest=null)},t}();t.TEAM_PREFERENCE="te";t.MARKET_GROUP_PREFERENCE="lg";t.LEAGUE_TABLE_PREFERENCE="lt";t.OVERVIEW_DEFAULT_MARKET="odm";t.PREGAME_CLASSIFICATION_MENU_FAVOURITES="lhsf";e.UserPreferenceAPI=t}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=function(){function e(){this._interface=null}return e.prototype.toString=function(){return"[ServerPreferenceManager]"},e.prototype.setUserPreferenceInterface=function(e){this._interface=e},e.prototype.get3wayPreference=function(e){$log(this+" get3wayPreference",e);try{if(this._interface&&this._interface.get3wayPreference)return this._interface.get3wayPreference(e)}catch(t){ErrorReporter.Trace(this,t)}return!1},e.prototype.set3wayPreference=function(e,t){$log(this+" set3wayPreference",e,t);try{this._interface&&this._interface.set3wayPreference&&this._interface.set3wayPreference(e,t)}catch(n){ErrorReporter.Trace(this,n)}},e.prototype.setTeamPreference=function(e,t){$log(this+" setTeamPreference",e.teamID,t);try{if(this._interface&&this._interface.setTeamPreference)return this._interface.setTeamPreference(e,t)}catch(n){ErrorReporter.Trace(this,n)}return!1},e.prototype.getTeamPreference=function(e){$log(this+" getTeamPreference",e.teamID);try{if(this._interface&&this._interface.getTeamPreference)return this._interface.getTeamPreference(e)}catch(t){ErrorReporter.Trace(this,t)}return!1},e.prototype.getPreferredTeams=function(){$log(this+" getPreferredTeams");try{if(this._interface&&this._interface.getPreferredTeams)return this._interface.getPreferredTeams()}catch(e){ErrorReporter.Trace(this,e)}return[]},e.prototype.getPreferredTeamIds=function(){$log(this+" getPreferredTeamIds");try{if(this._interface&&this._interface.getPreferredTeamIds)return this._interface.getPreferredTeamIds()}catch(e){ErrorReporter.Trace(this,e)}return[]},e.prototype.setLeagueTableLiveUpdates=function(e){try{if(this._interface&&this._interface.setLeagueTableLiveUpdates)return this._interface.setLeagueTableLiveUpdates(e)}catch(t){ErrorReporter.Trace(this,t)}},e.prototype.getLeagueTableLiveUpdates=function(){try{if(this._interface&&this._interface.getLeagueTableLiveUpdates)return this._interface.getLeagueTableLiveUpdates()}catch(e){ErrorReporter.Trace(this,e)}return""},e.prototype.setClassificationMenuFavourites=function(e){try{if(this._interface&&this._interface.setClassificationMenuFavourites)return this._interface.setClassificationMenuFavourites(e)}catch(t){ErrorReporter.Trace(this,t)}},e.prototype.getClassificationMenuFavourites=function(){try{if(this._interface&&this._interface.getClassificationMenuFavourites)return this._interface.getClassificationMenuFavourites()}catch(e){ErrorReporter.Trace(this,e)}return[]},e}();e.ServerPreferenceManager=t}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=(ns_gen5_data.Attribute,function(){function t(){}return t.FilterStemChildren=function(e){for(var t,n=0;n<e.getChildren().length;n++)(t=e.getChildren()[n])&&this.IsExcludedFromPromotion(t.data.EF)&&(t.remove(),n--);return e.parent&&"XL"!==e.parent.nodeName&&0===e.getChildren().length&&Locator.validationManager.callPostValidation(function(){return e.parent.remove()}),e.getChildren().length>0},t.IsExcludedFromPromotion=function(t){return!!(e.MathUtil.StringToNumber(t)&Locator.user.offerType)},t}());e.PromotionalFilter=t}(ns_gen5_util||(ns_gen5_util={})),function(){}(ns_gen5_validation||(ns_gen5_validation={})),function(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.callLaterQueue=[],t.priorityQueue=[],t.postValidationQueue=[],t.canCreateNewContext=!0,t.nextCallLaterQueue=[],t.cycleID=-1,t.cyclecount=0,t.callback_cycleHandler=function(){return t.cycleHandler()},t}return __extends(t,e),t.prototype.toString=function(){return"[ValidationManager]"},t.prototype.callLater=function(e){$assert&&$assert(e,"Callback isn't defined.");this.callLaterQueue[this.callLaterQueue.length]=e;-1==this.cycleID&&this._cycle()},t.prototype.callNewContext=function(e){var t=this;$assert&&$assert(e,"Callback isn't defined.");this.nextCallLaterQueue[this.nextCallLaterQueue.length]=e;this.canCreateNewContext&&(this.canCreateNewContext=!1,setTimeout(function(){document.body.clientWidth;t.canCreateNewContext=!0;t.callLaterQueue=t.nextCallLaterQueue.concat(t.callLaterQueue);t.nextCallLaterQueue.length=0;t.processValidationCycleNow()},0))},t.prototype.queueForValidation=function(e){var t,n;1!=e.validationState&&(e.validationState=1,t=e.nestLevel||0,n=this.priorityQueue[t],n||(n=this.priorityQueue[t]=[]),n[n.length]=e,-1==this.cycleID&&this._cycle())},t.prototype.callPostValidation=function(e){$assert&&$assert(e,"Callback isnt defined.");this.postValidationQueue[this.postValidationQueue.length]=e;-1==this.cycleID&&this._cycle()},t.prototype.processValidationCycleNow=function(){-1!=this.cycleID&&clearTimeout(this.cycleID);this.cycleHandler()},t.prototype._processCallLaterQueue=function(){var e,t,n=this.callLaterQueue;for(this.callLaterQueue=[],e=n.length,t=0;e>t;t++)try{n[t]()}catch(i){ErrorReporter.Trace(this,i)}},t.prototype._processValidationQueue=function(){var e,t,n,i,r,o,s=this.priorityQueue;for(this.priorityQueue=[],r=s.length,o=0;r>o;o++)if(n=s[o])for(e=0,t=n.length;t>e;e++)if((i=n[e])&&1==i.validationState)try{i.validationState=2;i.validateNow(!1);i.validationState=0}catch(a){ErrorReporter.Trace(this,a)}},t.prototype._processPostValidationQueue=function(){var e,t,n=this.postValidationQueue;for(this.postValidationQueue=[],e=n.length,t=0;e>t;t++)try{n[t]()}catch(i){ErrorReporter.Trace(this,i)}},t.prototype._cycle=function(e){this.cycleID=setTimeout(this.callback_cycleHandler,e||50)},t.prototype.cycleHandler=function(){for(this.cyclecount++,$timestamp("Start Frame"),this.callLaterQueue.length>0&&this._processCallLaterQueue();this.priorityQueue.length>0;)this._processValidationQueue();this.postValidationQueue.length>0&&this._processPostValidationQueue();this.callLaterQueue.length>0||this.priorityQueue.length>0||this.postValidationQueue.length>0?($timestamp("Recursive Start Frame"),this.cycleHandler()):this.cycleID=-1},t}(ns_gen5_events.EventDispatcher);__decorate([override],t.prototype,"toString");e.ValidationManager=t}(ns_gen5_validation||(ns_gen5_validation={})),function(e){var t=function(){function e(){this.mlJson={}}return e.prototype.toString=function(){return"[Resource]"},e.prototype.loadResource=function(e,t){var n=Locator.manifestManager.resolveResourcePath(e,t),i=new XMLHttpRequest;i.open("GET",n,!1);i.setRequestHeader("Content-Type","application/json");i.send();4===i.readyState&&200===i.status&&(this.mlJson=JSON.parse(i.responseText));i=null},e.prototype.getValue=function(e,t){return this.mlJson[e]||t},e}();e.Resource=t}(ns_gen5_language||(ns_gen5_language={})),function(e){var t,n=function(){function e(e,t,n,i,r){this.topic=e;this.type=t;this.item=n;this.nodeType=i;this.info=r}return e.prototype.toString=function(){return"[DataMessage type="+this.type+" item="+this.item+" nodeType="+this.nodeType+" info="+this.info+"]"},e}();e.DataMessage=n;t=function(){function e(){}return e}();t.SNAPSHOT="F";t.UPDATE="U";t.INSERT="I";t.DELETE="D";e.DataMessageType=t}(ns_gen5_data||(ns_gen5_data={})),function(e){var t=function(e){function t(t,n){var i=e.call(this,t)||this;return i.data=n,i}return __extends(t,e),t.prototype.toString=function(){return"[StemEvent type="+this.type+"]"},t}(ns_gen5_events.Event365);t.UPDATE="update";t.INSERT="insert";t.DELETE="delete";t.CHILD_DELETE="childDelete";__decorate([override],t.prototype,"toString");e.StemEvent=t}(ns_gen5_data||(ns_gen5_data={})),function(e){var t=e.StemEvent,n=(e.Attribute,e.DataMessage),i=function(e){function i(){var t=e.call(this)||this;return t._delegateList=[],t._actualChildren=[],t}return __extends(i,e),i.prototype.toString=function(){return"[Stem]"},i.prototype.update=function(e){var n,r,o,s,a,c,l,u,d,h;if(e){for(s in e)this.data[s]=e[s];if(this.parent)if(a="OR"in e,a&&(c=Number(e.OR),l=this.parent._actualChildren,l.splice(l.indexOf(this),1),l.splice(c,0,this)),"FF"in e){for(u=!1,d=e.FF,h=null,i.FilterToken.lastIndex=0;!u&&null!==(h=i.FilterToken.exec(d));)u=!(1&h.index);if(this.filtered!=(this.filtered=u)){if(this.parent._filterInvalidated=!0,this.filtered){if(this.readonly_length--,this._hasDelegates)for(n=0,r=this._delegateList.length;r>n;n++)if(o=this._delegateList[n])try{o.stemDeleteHandler(this)}catch(p){ErrorReporter.Trace(this,p)}this._hasListeners&&this.dispatchEvent(new t(t.DELETE))}else{if(this.parent.getChildren(),this.parent._hasDelegates)for(n=0,r=this.parent._delegateList.length;r>n;n++)if(o=this.parent._delegateList[n])try{o.stemInsertHandler(this.parent,this)}catch(p){ErrorReporter.Trace(this,p)}this.parent._hasListeners&&this.parent.dispatchEvent(new t(t.INSERT,this));this._filterInvalidated=!0}return}}else a&&!this.filtered&&this.parent._children&&(this.parent._filterInvalidated=!0);if(!this.filtered){if(this._hasDelegates)for(n=0,r=this._delegateList.length;r>n;n++)if(o=this._delegateList[n])try{o.stemUpdateHandler(this,e)}catch(p){ErrorReporter.Trace(this,p)}this._hasListeners&&this.dispatchEvent(new t(t.UPDATE,e))}}},i.prototype.insert=function(e,r){var o,s,a,c,l,u;if(r=r||i,e instanceof n?(s=e,o=new r,o.set_data(s.item),o.nodeName=s.nodeType):e instanceof i?o=e:(o=new r,o.set_data(e)),o.parent=this,a=o.data.OR,a?this._actualChildren.splice(Number(a),0,o):this._actualChildren[this._actualChildren.length]=o,o.filtered)this._filterInvalidated=!0;else{if(this._children?(this._filterInvalidated=!0,this.getChildren()):this.readonly_length++,this._hasDelegates)for(c=void 0,l=this._delegateList.length,u=0;l>u;u++)if(c=this._delegateList[u])try{c.stemInsertHandler(this,o)}catch(d){ErrorReporter.Trace(this,d)}this._hasListeners&&this.dispatchEvent(new t(t.INSERT,o))}},i.prototype.remove=function(){var e,n,i,r,o,s,a,c;if(this._hasDelegates)for(e=void 0,n=this._delegateList.length,i=0;n>i;i++)if(e=this._delegateList[i])try{e.stemDeleteHandler(this)}catch(l){ErrorReporter.Trace(this,l)}for(this._hasListeners&&this.dispatchEvent(new t(t.DELETE)),o=this._actualChildren.length,s=0;o>s;s++)r=this._actualChildren[s],r&&(r.parent=null,r.remove(),delete this._actualChildren[s]);if(this.hasLookupReference&&Locator.treeLookup.removeReference(this.data.IT),null!=this.parent){for(this.filtered||this.parent.readonly_length--,a=this.parent._actualChildren,c=a.length,this.parent._children&&(this.parent._filterInvalidated=!0),i=0;c>i;i++)if(a[i]==this){a.splice(i,1);break}this.parent._hasListeners&&this.parent.hasEventListener(t.CHILD_DELETE)&&this.parent.dispatchEvent(new t(t.CHILD_DELETE,this));this.parent=null}},i.prototype.removeChildStem=function(e){if(e.parent==this){e.filtered||this.readonly_length--;this._children&&(this._filterInvalidated=!0);var t=this._actualChildren.indexOf(e);t>-1&&this._actualChildren.splice(t,1);e.parent=null}},i.prototype.adoptStem=function(e,t){var n,i,r,o;if(null!=e.parent){for(n=e.parent,i=n._actualChildren,r=i.length,e.filtered||(n.readonly_length--,this.readonly_length++),n._children&&(n._filterInvalidated=!0),o=0;r>o;o++)if(i[o]==e){i.splice(o,1);break}e.parent=this;(void 0==t||t>this._actualChildren.length)&&(t=this._actualChildren.length);this._actualChildren[t]=e;this._children&&(this._filterInvalidated=!0)}},i.prototype.set_data=function(e){var n,r,o,s,a,c;if(this.data=e,this.hasLookupReference||Locator.treeLookup.addReference(this),e.FF){for(n=!1,r=e.FF,o=null,i.FilterToken.lastIndex=0;!n&&null!==(o=i.FilterToken.exec(r));)n=!(1&o.index);n?(this.filtered=!0,this.parent&&(this.parent._filterInvalidated=!0)):this.parent&&this.parent.readonly_length++}else this.parent&&this.parent.readonly_length++;if(this._hasDelegates)for(s=void 0,a=this._delegateList.length,c=0;a>c;c++)if(s=this._delegateList[c])try{s.stemUpdateHandler(this,e)}catch(l){ErrorReporter.Trace(this,l)}this._hasListeners&&this.dispatchEvent(new t(t.UPDATE,e))},i.prototype.getChildren=function(){var e,t,n,i,r;if(this._filterInvalidated){for(this._filterInvalidated=!1,this._children?this._children.length=0:this._children=[],e=void 0,t=this._actualChildren,n=void 0,i=t.length,r=0;i>r;r++)e=t[r],e&&!e.filtered&&(n=this._children.length,e.data.OR=String(n),this._children[n]=e);this.readonly_length=this._children.length}return this._children||this._actualChildren},i.prototype.shed=function(){var e,n,i,r,o=this;if(this._hasDelegates)for(i=void 0,e=0,n=this._delegateList.length;n>e;e++)if(i=this._delegateList[e])try{i.stemDeleteHandler(this)}catch(s){ErrorReporter.Trace(this,s)}for(this._hasListeners&&this.dispatchEvent(new t(t.DELETE)),$assert&&(this.hasClearedDown()||Locator.validationManager.callPostValidation(function(){return $assert&&$assert(o.hasClearedDown(),"`shed` has been called on this stem, but delegates/listeners still exist.")})),r=this._actualChildren,e=0,n=r.length;n>e;e++)r[e].shed()},i.prototype.hasClearedDown=function(){for(var n,e=0,t=this._delegateList;e<t.length;e++)if(n=t[e])return!1;return!this._hasListeners},i.prototype.addDelegate=function(e){this._delegateList[this._delegateList.length]=e;this._hasDelegates=!0},i.prototype.removeDelegate=function(e){var t=this._delegateList.indexOf(e);t>-1&&(this._delegateList[t]=void 0)},i.prototype.addEventListener=function(t,n){this._numListeners++;this._hasListeners=!0;e.prototype.addEventListener.call(this,t,n)},i.prototype.removeEventListener=function(t,n){this._numListeners--;this._hasListeners=this._numListeners>0;e.prototype.removeEventListener.call(this,t,n)},i}(ns_gen5_events.EventDispatcher);i.SInit=function(){i.prototype._actualChildren=null;i.prototype._children=null;i.prototype._numListeners=0;i.prototype._hasListeners=!1;i.prototype._filterInvalidated=!1;i.prototype.data=null;i.prototype.parent=null;i.prototype.filtered=!1;i.prototype.readonly_length=0;i.prototype.nodeName=null;i.prototype.hasLookupReference=!1}();i.FilterToken=/\^\^\^/;__decorate([override],i.prototype,"toString");__decorate([override],i.prototype,"addEventListener");__decorate([override],i.prototype,"removeEventListener");e.Stem=i}(ns_gen5_data||(ns_gen5_data={})),function(){}(ns_gen5_data||(ns_gen5_data={})),function(e){var t=e.Stem,n=e.StemEvent,i=(e.Attribute,e.DataMessage),r=function(e){function r(){var t=e.call(this)||this;return t.statGroups=[],t.teamGroups=[],t.additionalScores=[],t}return __extends(r,e),r.prototype.toString=function(){return"[FixtureStem]"},r.prototype.insert=function(e,r){var o,s,a,c,l,u;if(r=r||t,e instanceof i?(s=e,o=new r,o.set_data(s.item),o.nodeName=s.nodeType):e instanceof t?o=e:(o=new r,o.set_data(e)),o.parent=this,"ES"==o.nodeName?this.additionalScores[this.additionalScores.length]=o:"TG"==o.nodeName?this.teamGroups[this.teamGroups.length]=o:"SG"==o.nodeName?this.statGroups[this.statGroups.length]=o:(a=o.data.OR,a?this._actualChildren.splice(Number(a),0,o):this._actualChildren[this._actualChildren.length]=o,o.filtered||(this._children?(this._filterInvalidated=!0,this.getChildren()):this.readonly_length++)),o.filtered)this._filterInvalidated=!0;else{if(this._hasDelegates)for(c=void 0,l=this._delegateList.length,u=0;l>u;u++)(c=this._delegateList[u])&&c.stemInsertHandler(this,o);this._hasListeners&&this.dispatchEvent(new n(n.INSERT,o))}},r.prototype.remove=function(){var t,n,i;for(e.prototype.remove.call(this),n=this.statGroups.length,i=0;n>i;i++)t=this.statGroups[i],t&&(t.parent=null,t.remove(),delete this.statGroups[i]);for(n=this.teamGroups.length,i=0;n>i;i++)t=this.teamGroups[i],t&&(t.parent=null,t.remove(),delete this.teamGroups[i]);for(n=this.additionalScores.length,i=0;n>i;i++)t=this.additionalScores[i],t&&(t.parent=null,t.remove(),delete this.additionalScores[i])},r.prototype.shed=function(){var t,n,i,r,o,s,a;for(e.prototype.shed.call(this),t=0,n=this.additionalScores;t<n.length;t++)i=n[t],i.shed();for(r=0,o=this.teamGroups;r<o.length;r++)i=o[r],i.shed();for(s=0,a=this.statGroups;s<a.length;s++)i=a[s],i.shed()},r.prototype.getLegacyID=function(){return this.data.C1+this.data.T1+this.data.C2+this.data.T2+"-"+((this.parent&&this.parent.data?this.parent.data.ID:null)||this.data.CL)},r.prototype.getLegacyIDraw=function(){return this.data.C1+this.data.T1+this.data.C2+this.data.T2+((this.parent&&this.parent.data?this.parent.data.ID:null)||this.data.CL)},r}(e.Stem);__decorate([override],r.prototype,"toString");__decorate([override],r.prototype,"insert");__decorate([override],r.prototype,"remove");__decorate([override],r.prototype,"shed");e.FixtureStem=r}(ns_gen5_data||(ns_gen5_data={})),function(e){var t=(e.Attribute,function(){function e(){this._table={}}return e.prototype.toString=function(){return"[TreeLookup]"},e.prototype.addReference=function(e,t){var n=e.data[t||"IT"];n&&(this._table[n]=e,e.hasLookupReference=!0)},e.prototype.getReference=function(e){return this._table[e]},e.prototype.removeReference=function(e){var t=this._table[e];t&&(delete this._table[e],t.hasLookupReference=!1)},e}());e.TreeLookup=t}(ns_gen5_data||(ns_gen5_data={})),function(e){var t=function(e){function t(t,n){var i=e.call(this,t)||this;return i.data=n,i}return __extends(t,e),t}(ns_gen5_events.Event365);t.INFO_UPDATED="infoUpdated";t.SNAPSHOT_EMPTY="snapshotEmpty";t.SERVER_RECONNECT="serverReconnect";t.CONNECTION_FAILED="connectionFailed";t.RECONNECT_FAILED="reconnectFailed";t.CONNECTED="connected";t.PULL_DATA_RECEIVED="pullDataReceived";t.PULL_REQUEST_FAILED="pullRequestFailed";t.CONNECTION_FAILED_INVALID_SESSION="connectionFailedInvalidSession";e.StreamDataProcessorEvent=t}(ns_gen5_data||(ns_gen5_data={})),function(e){var t=function(e){function t(t,n){var i=e.call(this,t)||this;return i.message=n,i}return __extends(t,e),t}(ns_gen5_events.Event365);t.BALANCE_RECEIVED="balanceReceived";t.PUSH_MESSAGE_RECEIVED="pushMessageReceived";e.PrivateStreamDataProcessorEvent=t}(ns_gen5_data||(ns_gen5_data={})),function(e){e.SubscriptionManagerFlags={SUPPRESS_SERVER_MESSAGE:1,BATCH:2,SUPPRESS_FULL_HIERARCHY:4,SUPPRESS_POP_FALLBACK:8,NO_GRACE_PERIOD:16,DONT_BATCH:32,USE_CUSTOM_PARAMS:64}}(ns_gen5_data||(ns_gen5_data={})),function(e){var t=function(e){function t(t,n){var i=e.call(this,t)||this;return i.data=n,i}return __extends(t,e),t}(ns_gen5_events.Event365);t.RENEW_SUBSCRIPTION="renewSubscription";t.CONNECTION_FAILED="connectionFailed";t.CONNECTED="connected";t.ERROR="error";e.SubscriptionManagerEvent=t}(ns_gen5_data||(ns_gen5_data={})),function(e){var t=function(e){function t(t,n,i){var r=e.call(this,t)||this;return r.topic=n,r.message=i,r}return __extends(t,e),t}(ns_gen5_events.Event365);t.BALANCE_RECEIVED="balanceReceived";t.PUSH_MESSAGE_RECEIVED="pushMessageReceived";e.PrivateSubscriptionManagerEvent=t}(ns_gen5_data||(ns_gen5_data={})),function(e){function t(e){e.VI="0";e.VS="0";e.MS="0"}var n=(e.Attribute,e.Stem),i=e.DataMessage,r=e.DataMessageType,o=e.FixtureStem,s=r.SNAPSHOT,a="PH",c=0,l=function(){function l(){this.toString=function(){return"[DataUtil]"}}return l.ProcessStemChanges=function(e,t,n,i,s){var a,c,l,u,d,h=e.type,p=e.item;h==r.SNAPSHOT?s(t):h==r.UPDATE?(a=Locator.treeLookup.getReference(t),a&&a.update(p)):h==r.INSERT?(c=i?t:n,l=c.lastIndexOf("/"),u=c.lastIndexOf("/",l-1)+1,d=c.slice(u,l),a=Locator.treeLookup.getReference(d),a&&a.insert(e,"EV"==e.nodeType?o:null)):h==r.DELETE&&(a=Locator.treeLookup.getReference(t),a&&a.remove())},l.ParseMessage=function(e,l){for(var u,d,h,p,_,g,f,E,v,m,S,C,y,T,L,b,I,D,A,N,M,P,R,O,w,k,H,B,F,x,U,G,V,Y,W,z=Locator.treeLookup,q=e.charAt(0),j=q==r.SNAPSHOT||q==r.INSERT,$=new n,J=e.indexOf("|",1),Q=J,X=(d=q!=s)?0:1,K=Locator.user.countryCode,Z=Locator.user.countryCode64,ee=Locator.user.phoneOnlyEnabled;-1!=Q;){for(J=e.indexOf("|",++Q),_=e.slice(Q,J).split(";"),p=_.length-1,Q=J,g={},v=_[0],u=X;p>u;u++)E=_[u],g[E.charAt(0)+E.charAt(1)]=E.substr(3);if(j&&!g.IT&&(g.IT="_i"+c++),K&&"CB"in g){V=g.CB||"";Y=-1;do Y=V.indexOf(K,++Y);while(-1!=Y&&1==(1&Y));-1!=Y&&t(g)}else!K&&"CB"in g&&""!=g.CB&&t(g);if("Modernizr"in window&&!Modernizr.embeddedstreaming&&"1"==g.ES&&(g._V=g.VI,t(g)),ee&&"TO"in g){V=g.TO;Y=-1;do Y=V.indexOf(Z,++Y);while(-1!=Y&&1==(1&Y));-1!=Y&&(g[a]="1")}if(d&&"IN"!=v)return[new i(l,q,g,v,h)];switch(v){case"PA":f=new n;U=A||D||x||$;f.parent=U;U._actualChildren[U._actualChildren.length]=f;break;case"CO":f=new n;f.parent=D;A=D._actualChildren[D._actualChildren.length]=f;break;case"MA":A=null;D=f=new n;G=b||L||$;f.parent=G;G._actualChildren[G._actualChildren.length]=f;break;case"MG":A=null;b=f=new n;f.parent=L;L._actualChildren[L._actualChildren.length]=f;break;case"CT":I=f=new n;f.parent=T;T._actualChildren[T._actualChildren.length]=f;break;case"EV":f=new o;null==T&&(T=C||$);G=I||T;f.parent=G;L=f;G._actualChildren[G._actualChildren.length]=f;break;case"CL":T=f=new n;I=null;f.parent=y||$;f.parent._actualChildren[f.parent._actualChildren.length]=f;break;case"CS":y=f=new n;f.parent=$;$._actualChildren[$._actualChildren.length]=f;break;case"TG":M=f=new n;f.parent=L;L.teamGroups[L.teamGroups.length]=f;break;case"TE":f=new n;f.parent=M;M._actualChildren[M._actualChildren.length]=f;break;case"SG":P=f=new n;f.parent=L;L.statGroups[L.statGroups.length]=f;break;case"ST":f=new n;f.parent=P;P._actualChildren[P._actualChildren.length]=f;break;case"ES":R=f=new n;f.parent=L;L.additionalScores[L.additionalScores.length]=f;break;case"SC":O=f=new n;f.parent=R;R._actualChildren[R._actualChildren.length]=f;break;case"SL":f=new n;f.parent=O;O._actualChildren[O._actualChildren.length]=f;break;case"AS":w=f=new n;f.parent=L;L._actualChildren[L._actualChildren.length]=f;break;case"AP":k=f=new n;f.parent=w;w._actualChildren[w._actualChildren.length]=f;break;case"AT":H=f=new n;f.parent=k;k._actualChildren[k._actualChildren.length]=f;break;case"AC":B=f=new n;f.parent=H;H._actualChildren[H._actualChildren.length]=f;break;case"AE":f=new n;f.parent=B;B._actualChildren[B._actualChildren.length]=f;break;case"IN":h=g;break;case"PD":C=f=new n;null==S&&(S=m||$);f.parent=S;S._actualChildren[S._actualChildren.length]=f;break;case"PS":S=f=new n;null==m&&(m=$);f.parent=m;m._actualChildren[m._actualChildren.length]=f;break;case"XL":m=f=new n;$._actualChildren[$._actualChildren.length]=m;break;case"LG":N=f=new n;f.parent=L;L._actualChildren[L._actualChildren.length]=f;break;case"XI":$=f=new n;break;case"CG":$=f=new n;break;case"OP":F=f=new n;break;case"CF":F=f=new n;break;case"BE":x=f=new n;f.parent=F;F._actualChildren[F._actualChildren.length]=f;break;default:f=null}f&&(f.nodeName=v,f.set_data(g))}return 1==$._actualChildren.length&&"PA"==$._actualChildren[0].nodeName?$=$._actualChildren[0]:z.getReference(l)||$.set_data({IT:l}),W=new i(l,q,$,v,h),[W]},l.ParseMergeMessage=function(n,o){var c,u,d,h,p,_,g,f,E,v,m,S,C,y,T,L,b,I,D,A,N,M,P,R,O,w,k,H,B,F,x,U,G,V,Y,W,z,q,j,$,J,Q,X,K,Z,ee,te,ne,ie,re,oe,se=Locator.treeLookup,ae=n.indexOf("|",1),ce=ae,le=Locator.user.phoneOnlyEnabled,ue=n.charAt(0),de=Locator.user.countryCode64,he=Locator.user.countryCode,pe=(u=ue!=s)?0:1,_e={},ge=[],fe=[],Ee=[],ve=[ge,fe,Ee],me=[];for(_e[o]=!0,o.lastIndexOf("/")>=0&&(W=o.substring(o.lastIndexOf("/")+1,o.length),_e[W]=!0);-1!=ce;)try{if(ae=n.indexOf("|",++ce),p=n.slice(ce,ae).split(";"),h=p.length-1,ce=ae,-1===ce&&0===h)break;for(_={},v=p[0],c=pe;h>c;c++)E=p[c],_[E.substr(0,2)]=E.substr(3);if(he&&"CB"in _){V=_.CB||"";Y=-1;do Y=V.indexOf(he,++Y);while(-1!=Y&&1==(1&Y));-1!=Y&&t(_)}else!he&&"CB"in _&&""!=_.CB&&t(_);if("Modernizr"in window&&!Modernizr.embeddedstreaming&&"1"==_.ES&&t(_),le&&"TO"in _){V=_.TO;Y=-1;do Y=V.indexOf(de,++Y);while(-1!=Y&&1==(1&Y));-1!=Y&&(_[a]="1")}switch(v){case"PA":U=A||D||x||o;f=U;break;case"CO":A=_.IT;f=D;break;case"MA":A=null;D=_.IT;G=b||L||o;f=G;break;case"MG":A=null;b=_.IT;f=L;break;case"CT":I=_.IT;f=T;break;case"EV":null==T&&(T=C||o);G=I||T;f=G;L=_.IT;break;case"CL":T=_.IT;I=null;f=y||_.IT;break;case"CS":y=_.IT;f=_.IT;break;case"TG":M=_.IT;f=L;break;case"TE":f=M;break;case"SG":P=_.IT;f=L;break;case"ST":f=P;break;case"ES":R=_.IT;f=L;break;case"SC":O=_.IT;f=R;break;case"SL":f=O;break;case"AS":w=_.IT;f=L;break;case"AP":k=_.IT;f=w;break;case"AT":H=_.IT;f=k;break;case"AC":B=_.IT;f=H;break;case"AE":f=B;break;case"IN":d=_;break;case"PD":C=_.IT;null==S&&(S=m||o);f=S;break;case"PS":S=_.IT;null==m&&(m=o);f=m;break;case"XL":m=_.IT;break;case"LG":N=_.IT;f=L;break;case"OP":F=_.IT;break;case"CF":F=_.IT;f=F;break;case"BE":x=_.IT;f=F;break;case"CG":f=_.IT}if(g=_.IT,_e[g]=!0,z=se.getReference(g),z&&(g===f||z.parent&&z.parent.data&&z.parent.data.IT===f)){q=z.data;j={};$=!1;for(J in _)q[J]!=_[J]&&($=!0,j[J]=_[J]);$&&(j.IT=g,Ee[Ee.length]={topic:g,msgType:r.UPDATE,data:j,nodeType:v,info:d})}else g!==f?fe.push({topic:f+"/"+g,msgType:r.INSERT,data:_,nodeType:v,info:d}):"EMPTY"===o&&"undefined"!=typeof d&&fe.push({topic:o,msgType:r.SNAPSHOT,data:_,nodeType:"",info:d})}catch(Se){ErrorReporter.Trace(l,Se)}for(Q=se.getReference(o),Q&&(K=function(e){for(var n=e.length,t=0;n>t;t++)X(e[t],e)},(X=function(t,n){var i,o;if(t){if(!_e[t.data.IT]&&(ge.push({topic:t.data.IT,msgType:r.DELETE,data:t.data,nodeType:t.nodeName}),n&&t.parent instanceof e.FixtureStem&&(n===t.parent.statGroups||n===t.parent.teamGroups||n===t.parent.additionalScores)))for(i=n.length,o=0;i>o;o++)n[o]===t&&n.splice(o,1);K(t.getChildren());t instanceof e.FixtureStem&&(K(t.statGroups),K(t.teamGroups),K(t.additionalScores))}})(Q)),Z=ve.length,ee=0;Z>ee;ee++)if(te=ve[ee])for(ne=te.length,ie=0;ne>ie;ie++)re=te[ie],re&&(oe=new i(re.topic,re.msgType,re.data,re.nodeType,re.info),me.push(oe));return me},l}();e.DataUtil=l}(ns_gen5_data||(ns_gen5_data={})),function(e){var t=e.Stem,n=ns_gen5_events.UserEvent,i="GD,GG,GI,GJ",r=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.username=null,t.migratedSession=!1,t.oddsTypeId=null,t.languageId=null,t.zoneId=null,t.timeZoneId=null,t.timeZoneAdjustment=null,t.timeZoneInitials=null,t.currencyCode=null,t.currencyRate=null,t.userName=null,t.wizeGuy=!1,t.offerType=1,t.countryId=null,t.countryStateId=null,t.countryGroupId=null,t.countryCode=null,t.countryCode64="",t.countryState64="",t.countryGroup64="",t.filterMode=null,t.phoneOnlyEnabled=!1,t.isLoggedIn=!1,t.lastLoginTime=null,t.telephoneAccountNumber=null,t.codiceFiscale=null,t.impersonatedUsername=null,t.currencyGroupSeparator=null,t.currencyDecimalSeparator=null,t._balance=null,t}return __extends(r,e),r.prototype.toString=function(){return"[User]"},r.prototype.getBalance=function(){return this._balance||(this._balance=ns_gen5_util.Singleton.getInstance(ns_gen5_util.BalanceModel))},r.prototype.setSiteConfig=function(e,t,n,i){this.countryId=t;this.countryStateId=n;this.countryGroupId=i;this.filterMode=e;this._setStemFilterMode()},r.prototype.setOddsTypeId=function(e){this.oddsTypeId!=e&&(this.oddsTypeId=e,this.dispatchEvent(new n(n.ODDS_TYPE_CHANGED)))},r.prototype.setLanguageId=function(e){this.languageId!=e&&(this.languageId=e,this.dispatchEvent(new n(n.LANGUAGE_CHANGED)))},r.prototype.getFilterToken=function(){return new RegExp("("+this.countryCode64.replace("+","\\+")+"|"+this.countryState64.replace("+","\\+")+"|"+this.countryGroup64.replace("+","\\+")+")","g")},r.prototype._setStemFilterMode=function(){for(var e,n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","+","/"],r=[],o=0,s=0,a=0;4096>a;)e=n[o]+n[s],(a+1)%64==0&&(o++,s=-1),r[a]=e,s++,a++;this.countryCode64=r[1024+Number(this.countryId)];this.countryState64=r[2048+Number(this.countryStateId)];this.countryGroup64=r[Number(this.countryGroupId)];this.phoneOnlyEnabled=i.split(",").indexOf(this.countryCode64)>-1;t.FilterToken=this.getFilterToken()},r}(ns_gen5_events.EventDispatcher);r.FILTER_MODE_COUNTRY_GROUP="1";r.FILTER_MODE_COUNTRY="2";r.FILTER_MODE_COUNTRY_STATE="3";__decorate([override],r.prototype,"toString");e.User=r}(ns_gen5_data||(ns_gen5_data={})),function(e){var t=ns_gen5_events.Event365,n=e.DataUtil,i=e.SubscriptionManagerEvent,r=e.User,o=ns_gen5_net.Loader,s=ns_gen5_net.LoaderEvent,a=ns_gen5_util.Delegate,c=ns_gen5_util.InfoReporter,l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t}(o),u=function(e){function o(){var t=e.call(this)||this;return t._dataInclusionExclusionLevel="",t._customDataInclusionExclusionLevel="",t._topicRequestLookup=null,t._initialised=!1,t.canDebouncePVCN=!0,t._topicRequestLookup={},t}return __extends(o,e),o.prototype.toString=function(){return"[PullDataProcessor]"},o.prototype.loadPageData=function(e,t,n,i){var r,o,c,u,d,h;if(this._initialised||this._initialise(),r=Locator.config,o=Locator.user,c=r.apiLocation,u=this._dataInclusionExclusionLevel,n&&(c=n,i&&(u=this._customDataInclusionExclusionLevel)),-1==c.indexOf("?")&&(c+="?"),0==e.indexOf("#AA")&&(c+="res=au&"),c+="lid="+o.languageId+"&zid="+o.zoneId+"&pd="+escape(e)+"&cid="+o.countryId,c+=u,null!=t)for(d in t)c+="&"+d+"="+t[d];h=new l;h.pageTopic=e;h.addEventListener(s.COMPLETE,new a(this,this._pageDataCompleteHandler));h.addEventListener(s.ERROR,new a(this,this._pageDataErrorHandler));h.load(c);this._topicRequestLookup[e]=h},o.prototype.cancelPageDataLoad=function(e){var t=this._topicRequestLookup[e];if(t)try{t.abort();delete this._topicRequestLookup[e]}catch(n){ErrorReporter.Trace(this,n)}},o.prototype._initialise=function(){var e=Locator.user;if(this._initialised=!0,e.countryGroupId&&(this._dataInclusionExclusionLevel="&cg="+e.countryGroupId),e.filterMode){if("-1"!=e.filterMode)switch(e.filterMode){case r.FILTER_MODE_COUNTRY_GROUP:this._dataInclusionExclusionLevel="&cgid="+e.countryGroupId;break;case r.FILTER_MODE_COUNTRY:this._dataInclusionExclusionLevel="&ctid="+e.countryId;break;case r.FILTER_MODE_COUNTRY_STATE:this._dataInclusionExclusionLevel="&csid="+e.countryStateId}this._customDataInclusionExclusionLevel="&csid="+e.countryStateId+"&ctid="+e.countryId+"&cgid="+e.countryGroupId}},o.prototype._pageDataCompleteHandler=function(e){var i,r,o,s,a,c,l=this,u=e.target,d=u.pageTopic,h=e.data;for(delete this._topicRequestLookup[d],i=h.split("\b"),a=i.length,c=0;a>c;c++)r=i[c],s=r.indexOf("IT="),o=1==a?d:r.slice(s+3,r.indexOf(";",s)),n.ParseMessage(r,o);Locator.validationManager.callLater(function(){l.dispatchEvent(new t(d))});this.canDebouncePVCN&&(this.canDebouncePVCN=!1,setTimeout(function(){l.canDebouncePVCN=!0;Locator.validationManager.processValidationCycleNow()},0))},o.prototype._pageDataErrorHandler=function(e){var t=e.target,n=t.pageTopic,r=e.status,o=Locator.subscriptionManager;n&&(o.dispatchEvent(new i(i.ERROR+n)),c.Trace(c.PULL_DATA_ENTRY,"Pull API IO Error on pageData: "+n+" - "+r),o.unsubscribe(n),delete this._topicRequestLookup[n])},o}(ns_gen5_events.EventDispatcher);__decorate([override],u.prototype,"toString");e.PullDataProcessor=u}(ns_gen5_data||(ns_gen5_data={})),function(e){var t=e.SubscriptionManagerEvent,n=ns_gen5_util.Delegate,i={},r=15e3,o=function(o){function s(){var e=o.call(this)||this;return e.unsubscribeGraceLookup={},e._pushConnected=!1,e.unsubscribeDeferralPeriodMS=r,e._subscribedTopics={},e._batchSubscribe="",e._batchUnsubscribe="",e._streamDataProcessor=null,e._pullDataProcessor=null,e.delegate_snapshotRecievedHandler=new n(e,e._snapshotRecievedHandler),e.delegate_pushReconnectHandler=new n(e,e._pushReconnectHandler),e.delegate_pushConnectedHandler=new n(e,e._pushConnectedHandler),e.delegate_pushConnectFailedHandler=new n(e,e._pushConnectFailedHandler),e.callback_submitBatch=function(){return e.submitBatch()},e}return __extends(s,o),s.prototype.toString=function(){return"[SubscriptionManager]"},s.prototype.connect=function(){this._streamDataProcessor.connect()},s.prototype.subscribe=function(n,r,o,a){var c,l,u,d,h,p;return"boolean"==typeof o&&(c=arguments[2],l=arguments[3],u=arguments[4],d=arguments[5],o=0,c||(o|=e.SubscriptionManagerFlags.SUPPRESS_SERVER_MESSAGE),l||(o|=e.SubscriptionManagerFlags.SUPPRESS_FULL_HIERARCHY),u&&(a=u),d&&(o|=e.SubscriptionManagerFlags.BATCH)),n?(s.DevicePrefix&&n.indexOf("X^{0}")>-1&&(n=n.replace("{0}",s.DevicePrefix)),h=this.unsubscribeGraceLookup[n],h&&(clearTimeout(h),delete this.unsubscribeGraceLookup[n]),p=!1,o&e.SubscriptionManagerFlags.SUPPRESS_POP_FALLBACK&&(o|=e.SubscriptionManagerFlags.DONT_BATCH,p=i[n]=!0),Locator.treeLookup.getReference(n)?Locator.validationManager.callLater(function(){return r.method.call(r.scope,new t(n))}):(this.addEventListener(n,r),this._subscribedTopics[n]?this._subscribedTopics[n].push(r):(this._subscribedTopics[n]=[r],"#"==n.charAt(0)?(o&e.SubscriptionManagerFlags.SUPPRESS_SERVER_MESSAGE||this._pullDataProcessor.loadPageData(n,null,a,!!(o&e.SubscriptionManagerFlags.USE_CUSTOM_PARAMS)),this._pullDataProcessor.addEventListener(n,this.delegate_snapshotRecievedHandler)):(o&e.SubscriptionManagerFlags.SUPPRESS_SERVER_MESSAGE||(o&e.SubscriptionManagerFlags.DONT_BATCH?this._streamDataProcessor.subscribe(n,p):this._addToSubscribeBuffer(n)),this._streamDataProcessor.addEventListener(n,this.delegate_snapshotRecievedHandler)))),n):null},s.prototype.unsubscribe=function(t,n){var i,r,o,a=this;t&&(s.DevicePrefix&&t.indexOf("X^{0}")>-1&&(t=t.replace("{0}",s.DevicePrefix)),i=Locator.treeLookup.getReference(t),i&&i.shed(),"#"!=t.charAt(0)?n&e.SubscriptionManagerFlags.SUPPRESS_SERVER_MESSAGE||(i||this._streamDataProcessor.hasEventListener(t)&&this._streamDataProcessor.removeEventListener(t,this.delegate_snapshotRecievedHandler),(!this.unsubscribeGraceLookup[t]||n&e.SubscriptionManagerFlags.NO_GRACE_PERIOD)&&(r=function(){n&e.SubscriptionManagerFlags.DONT_BATCH?a._streamDataProcessor.unsubscribe(t):a._addToUnsubscribeBuffer(t);a.clearDownTopic(t,i);var r=a.unsubscribeGraceLookup[t];r&&(clearTimeout(r),delete a.unsubscribeGraceLookup[t])},n&e.SubscriptionManagerFlags.NO_GRACE_PERIOD||this.unsubscribeDeferralPeriodMS<=0?r():(o=setTimeout(r,this.unsubscribeDeferralPeriodMS),this.unsubscribeGraceLookup[t]=o))):(!this.unsubscribeGraceLookup[t]||n&e.SubscriptionManagerFlags.NO_GRACE_PERIOD)&&(r=function(){a._pullDataProcessor.cancelPageDataLoad(t);a.clearDownTopic(t,i);var e=a.unsubscribeGraceLookup[t];e&&(clearTimeout(e),delete a.unsubscribeGraceLookup[t])},n&e.SubscriptionManagerFlags.NO_GRACE_PERIOD||!i?r():(o=setTimeout(r,this.unsubscribeDeferralPeriodMS),this.unsubscribeGraceLookup[t]=o)))},s.prototype.clearDownTopic=function(e,t){this._removeListenersForTopic(e);delete this._subscribedTopics[e];t&&t.remove()},s.prototype.send=function(e,t){this._streamDataProcessor.send(e,t)},s.prototype.resubscribePush=function(){for(var e in this._subscribedTopics)"#"!=e.charAt(0)&&(i[e]?this._streamDataProcessor.subscribe(e,!0):this._addToSubscribeBuffer(e))},s.prototype.setStreamDataProcessor=function(t){this._streamDataProcessor&&(this._streamDataProcessor.removeEventListener(e.StreamDataProcessorEvent.SERVER_RECONNECT,this.delegate_pushReconnectHandler),this._streamDataProcessor.removeEventListener(e.StreamDataProcessorEvent.CONNECTED,this.delegate_pushConnectedHandler),this._streamDataProcessor.removeEventListener(e.StreamDataProcessorEvent.CONNECTION_FAILED,this.delegate_pushConnectFailedHandler),this._streamDataProcessor.removeEventListener(e.StreamDataProcessorEvent.RECONNECT_FAILED,this.delegate_pushConnectFailedHandler));this._streamDataProcessor=t;this._streamDataProcessor.addEventListener(e.StreamDataProcessorEvent.SERVER_RECONNECT,this.delegate_pushReconnectHandler);this._streamDataProcessor.addEventListener(e.StreamDataProcessorEvent.CONNECTED,this.delegate_pushConnectedHandler);this._streamDataProcessor.addEventListener(e.StreamDataProcessorEvent.CONNECTION_FAILED,this.delegate_pushConnectFailedHandler);this._streamDataProcessor.addEventListener(e.StreamDataProcessorEvent.RECONNECT_FAILED,this.delegate_pushConnectFailedHandler)},s.prototype.setPullDataProcessor=function(e){this._pullDataProcessor=e},s.prototype.close=function(){this._streamDataProcessor.close(readit.ReaditFlags.SEND_CLOSE)},s.prototype._addToSubscribeBuffer=function(e){0==this._batchSubscribe.length&&0==this._batchUnsubscribe.length?Locator.validationManager.callLater(this.callback_submitBatch):this._batchSubscribe&&(this._batchSubscribe+=",");this._batchSubscribe+=e},s.prototype._addToUnsubscribeBuffer=function(e){0==this._batchSubscribe.length&&0==this._batchUnsubscribe.length?Locator.validationManager.callLater(this.callback_submitBatch):this._batchUnsubscribe&&(this._batchUnsubscribe+=",");this._batchUnsubscribe+=e},s.prototype.submitBatch=function(){this._batchSubscribe&&this._batchUnsubscribe?this._streamDataProcessor.swapSubscriptions(this._batchSubscribe,this._batchUnsubscribe):(this._batchSubscribe&&this._streamDataProcessor.subscribe(this._batchSubscribe),this._batchUnsubscribe&&this._streamDataProcessor.unsubscribe(this._batchUnsubscribe));this._batchSubscribe="";this._batchUnsubscribe=""},s.prototype._removeListenersForTopic=function(e){var t,n,i=this._subscribedTopics[e];if(i){for(t=i.length,n=0;t>n;n++)this.removeEventListener(e,i[n]);i.length=0}},s.prototype._OtsReport=function(){var e,t="";for(e in this._subscribedTopics)t+=e+"\t\r\n";return t},s.prototype._snapshotRecievedHandler=function(e){e.target.removeEventListener(e.type,this.delegate_snapshotRecievedHandler);try{this.dispatchEvent(new t(e.type));this._removeListenersForTopic(e.type)}catch(n){ErrorReporter.Trace(this,n)}},s.prototype._pushReconnectHandler=function(){this.resubscribePush()},s.prototype._pushConnectedHandler=function(){this._pushConnected||this.dispatchEvent(new t(t.CONNECTED));this._pushConnected=!0;this.unsubscribeDeferralPeriodMS=r},s.prototype._pushConnectFailedHandler=function(){this._pushConnected&&this.dispatchEvent(new t(t.CONNECTION_FAILED));this._pushConnected=!1;this.unsubscribeDeferralPeriodMS=0},s}(ns_gen5_events.EventDispatcher);o.TOPIC_FALLBACK_INDICATOR="*";__decorate([override],o.prototype,"toString");e.SubscriptionManager=o}(ns_gen5_data||(ns_gen5_data={})),function(e){var t=ns_gen5_util.Delegate,n=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return __extends(i,n),i.prototype.setStreamDataProcessor=function(i){this._streamDataProcessor?(this._streamDataProcessor.removeEventListener(e.PrivateStreamDataProcessorEvent.BALANCE_RECEIVED,this.delegate_balanceReceivedHandler),this._streamDataProcessor.removeEventListener(e.PrivateStreamDataProcessorEvent.PUSH_MESSAGE_RECEIVED,this.delegate_pushMessageReceivedHandler)):(this.delegate_balanceReceivedHandler=new t(this,this.balanceReceivedHandler),this.delegate_pushMessageReceivedHandler=new t(this,this.pushMessageReceivedHandler));n.prototype.setStreamDataProcessor.call(this,i);this._streamDataProcessor.addEventListener(e.PrivateStreamDataProcessorEvent.BALANCE_RECEIVED,this.delegate_balanceReceivedHandler);this._streamDataProcessor.addEventListener(e.PrivateStreamDataProcessorEvent.PUSH_MESSAGE_RECEIVED,this.delegate_pushMessageReceivedHandler)},i.prototype.balanceReceivedHandler=function(t){this.dispatchEvent(new e.PrivateSubscriptionManagerEvent(e.PrivateSubscriptionManagerEvent.BALANCE_RECEIVED,t.message.topic,t.message.message))},i.prototype.pushMessageReceivedHandler=function(t){this.dispatchEvent(new e.PrivateSubscriptionManagerEvent(e.PrivateSubscriptionManagerEvent.PUSH_MESSAGE_RECEIVED,t.message.topic,t.message.message))},i}(e.SubscriptionManager);__decorate([override],n.prototype,"setStreamDataProcessor");e.PrivateSubscriptionManager=n}(ns_gen5_data||(ns_gen5_data={})),function(e){var t=e.DataUtil,n=ns_gen5_net.Loader,i=function(){function i(e,t,n){void 0===n&&(n=!1);this.initialSnapshotHandler=function(){};this.url=e;this.topic=t;n&&this.buildInclusionExclusionData()}return i.prototype.poll=function(){var e,t=this;this.dataInclusionExclusionLevel&&(this.url=-1===this.url.indexOf("?")?this.url+"?":this.url+"&",this.url+="pd="+encodeURIComponent(this.topic),this.url+="&"+this.dataInclusionExclusionLevel,this.dataInclusionExclusionLevel=null);e=new n;e.completeHandler=function(e,n){200===n&&t.handleResponse(e)};e.load(this.url)},i.prototype.handleResponse=function(e){for(var r,o=this,s=this.topic,a=!!Locator.treeLookup.getReference(s),c=a?t.ParseMergeMessage(e,s):t.ParseMessage(e,s),n=0,i=c;n<i.length;n++)r=i[n],a&&(s=r.topic),t.ProcessStemChanges(r,s,this.topic,a,function(e){return o.initialSnapshotHandler(e)});this.pollCompleteHandler&&this.pollCompleteHandler()},i.prototype.buildInclusionExclusionData=function(){var t=Locator.user;if(this.dataInclusionExclusionLevel="cid="+t.countryId+"&cg="+t.countryGroupId+"&lid="+t.languageId+"&zid="+t.zoneId,t.filterMode&&"-1"!=t.filterMode)switch(t.filterMode){case e.User.FILTER_MODE_COUNTRY_GROUP:this.dataInclusionExclusionLevel+="&cgid="+t.countryGroupId;break;case e.User.FILTER_MODE_COUNTRY:this.dataInclusionExclusionLevel+="&ctid="+t.countryId;break;case e.User.FILTER_MODE_COUNTRY_STATE:this.dataInclusionExclusionLevel+="&csid="+t.countryStateId}},i}();e.PollDataProcessor=i}(ns_gen5_data||(ns_gen5_data={})),function(e){var t=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.toString=function(){return"[PushedConfigPropertyChangeEvent type="+this.type+"]"},t}(ns_gen5_events.Event365);t.PROPERTIES_INITIALISED="PUSH_CONFIG_PROPERTIES_INITIALISED";t.IS_INPLAY_AVAILABLE="IS_INPLAY_AVAILABLE";t.INPLAY_LAUNCHER_DISPLAY_MODE="INPLAY_LAUNCHER_CONTENT_TYPE";t.IS_MYBETS_SYSTEM_ENABLED="IS_MYBETS_SYSTEM_ENABLED";t.IS_OPEN_BETS_PULL_DELIVERY_AVAILABLE="IS_OPEN_BETS_PULL_DELIVERY_AVAILABLE";t.IS_CLOSE_BETS_PULL_DELIVERY_AVAILABLE="IS_CLOSE_BETS_PULL_DELIVERY_AVAILABLE";t.IS_MYBETS_SITE_FEATURE_AVAILABLE="IS_MYBETS_SITE_FEATURE_AVAILABLE";t.IS_CLICK_TO_CALL_SITE_FEATURE_AVAILABLE="IS_CLICK_TO_CALL_SITE_FEATURE_AVAILABLE";t.IS_BET_CALL_AVAILABLE="IS_BET_CALL_AVAILABLE";t.IS_BET_CALL_TWILIO_AVAILABLE="IS_BET_CALL_TWILIO_AVAILABLE";t.IS_CUSTOMER_TO_CUSTOMER_CALLING_FEATURE_AVAILABLE="IS_CUSTOMER_TO_CUSTOMER_CALLING_FEATURE_AVAILABLE";t.IS_CUSTOMER_TO_REPRESENTATIVE_CALLING_FEATURE_AVAILABLE="IS_CUSTOMER_TO_REPRESENTATIVE_CALLING_FEATURE_AVAILABLE";t.PUSH_BALANCE_ENABLED_AVAILABLE="PUSH_BALANCE_ENABLED_AVAIBLE";t.IS_SETTLED_BETS_FEATURE_AVAILABLE="IS_SETTLED_BETS_FEATURE_AVAILABLE";t.IS_EDIT_BETS_FEATURE_AVAILABLE="IS_EDIT_BETS_FEATURE_AVAILABLE";t.IS_EDIT_BETS_COMPLEX_MULTIPLES_FEATURE_AVAILABLE="IS_EDIT_BETS_COMPLEX_MULTIPLE_FEATURE_AVAILABLE";t.IS_AUS_MULTIPLES_AVAILABLE="IS_AUS_MULTIPLES_AVAILABLE";t.FREE_BET_COUNTRIES_UPDATED="FREE_BET_COUNTRIES_UPDATED";__decorate([override],t.prototype,"toString");e.PushedConfigPropertyChangeEvent=t}(ns_gen5_config||(ns_gen5_config={})),function(e){var t,n,i=ns_gen5_util.OddsConverter,r=ns_gen5_events.EventDispatcher,o=ns_gen5_data.SubscriptionManagerEvent,s=ns_gen5_data.StemEvent,a=ns_gen5_util.Delegate;ns_gen5_data.Attribute;!function(e){e[e.fixture=0]="fixture";e[e.classification=1]="classification"}(t=e.InplayLauncherDisplayModeEnum||(e.InplayLauncherDisplayModeEnum={}));n=function(n){function r(){var e=n.call(this)||this;return e._subscriptionTopic=null,e._subscriptionManager=null,e._configStem=null,e._configStemUpdateHandlerDelegate=null,e._configStemDeleteHandlerDelegate=null,e._pushConnectedHandlerDelegate=null,e._pushDisconnectedHandlerDelegate=null,e._isSubscriptionInitialised=!1,e._isDisposed=!1,e._pushConnected=!1,e._inplayLauncherDisplayMode=t.fixture,e._arePropertiesInitialised=!1,e._isInPlayDataAvailable=!1,e._isMyBetsSystemEnabled=!1,e._isOpenBetsPullDeliveryAvailable=!1,e._isMyBetsSiteFeatureAvailable=!1,e._isBetCallAvailable=!1,e._isAusMultiplesAvailable=!1,e._isBetCallTwilioAvailable=!1,e._isErrorLoggingEnabled=!1,e._isPushBalanceEnabled=!1,e._settledBetsEnabled=!1,e._isCloseBetPullPresentationEnabled=!1,e._isEditBetsEnabled=!1,e.psqfV4Enabled=!0,e.freeBetCountries=[],e.isWebErrorLoggingEnabled=!1,e.webInfoLoggingCodes=[],e.editBetsComplexMultiplesEnabled=!1,e.betCallDisabledAttribute="MB",e.ausMultiplesDisabledAttribute="AM",e.betCallTwilioDisabledAttribute="MT",e.settledBetsDisabledAttribute="SB",e.pushBalanceEnabledAttribute="PB",e.complexMultiplesEnabledAttribute="EM",window.sProps&&window.sProps.JavascriptLogging&&(e._isErrorLoggingEnabled=!0),e}return __extends(r,n),r.prototype.initialiseSubscription=function(e,t){this._isSubscriptionInitialised||this._isDisposed||(this._pushConnectedHandlerDelegate=new a(this,this.pushConnectedHandler),this._pushDisconnectedHandlerDelegate=new a(this,this.pushDisconnectedHandler),Locator.privateSubscriptionManager.addEventListener(o.CONNECTED,this._pushConnectedHandlerDelegate),Locator.privateSubscriptionManager.addEventListener(o.CONNECTION_FAILED,this._pushDisconnectedHandlerDelegate),this._isSubscriptionInitialised=!0,this._subscriptionTopic=ns_gen5_util.StringUtil.Format(r.USER_CONFIG_SUBSCRIPTION_TOPIC,t.languageId,t.zoneId),this._subscriptionManager=e,e.subscribe(this._subscriptionTopic,new a(this,this.configTopicSubscriptionHandler)))},r.prototype.getArePropertiesInitialised=function(){return this._arePropertiesInitialised},r.prototype.getIsInPlayAvailable=function(){return this._isInPlayDataAvailable},r.prototype.getInplayLauncherDisplayMode=function(){return this._inplayLauncherDisplayMode},r.prototype.getIsMyBetsSystemEnabled=function(){return this._isMyBetsSystemEnabled},r.prototype.getIsOpenBetsPullDeliveryAvailable=function(){return this._isOpenBetsPullDeliveryAvailable},r.prototype.getIsCloseBetPullPresentationEnabled=function(){return this._isCloseBetPullPresentationEnabled},r.prototype.getIsMyBetsSiteFeatureAvailable=function(){return this._isMyBetsSiteFeatureAvailable},r.prototype.getIsBetCallAvailable=function(){return this._isBetCallAvailable},r.prototype.getIsAusMultiplesAvailable=function(){return this._isAusMultiplesAvailable},r.prototype.getIsBetCallTwilioAvailable=function(){return this._isBetCallTwilioAvailable},r.prototype.getIsErrorLoggingEnabled=function(){return this._isErrorLoggingEnabled},r.prototype.getIsWebErrorLoggingEnabled=function(){return this.isWebErrorLoggingEnabled},r.prototype.getWebInfoReportingCodes=function(){return this.webInfoLoggingCodes},r.prototype.getIsPushBalanceEnabled=function(){return this._isPushBalanceEnabled},r.prototype.getIsEditBetsEnabled=function(){return this._isEditBetsEnabled},r.prototype.getIsSettledBetsEnabled=function(){return this._settledBetsEnabled},r.prototype.getIsEditBetsComplexEnabled=function(){return this.editBetsComplexMultiplesEnabled},r.prototype.getIsPSQFV4Enabled=function(){return this.psqfV4Enabled},r.prototype.getIsFreeBetsAllowed=function(e){return this.freeBetCountries.indexOf(e)>-1},r.prototype.setIsErrorLoggingEnabled=function(e){this._isErrorLoggingEnabled=e},r.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this._subscriptionTopic&&(Locator.privateSubscriptionManager.removeEventListener(o.CONNECTED,this._pushConnectedHandlerDelegate),Locator.privateSubscriptionManager.removeEventListener(o.CONNECTION_FAILED,this._pushDisconnectedHandlerDelegate),this._subscriptionManager.unsubscribe(this._subscriptionTopic),this._subscriptionTopic=null,this._subscriptionManager=null),this.configStemDeleteHandler())},r.prototype.getIsDisposed=function(){return this._isDisposed},r.prototype.configTopicSubscriptionHandler=function(t){var n=Locator.treeLookup;!this._configStem&&n&&(this._configStem=n.getReference(t.type),this._configStemUpdateHandlerDelegate=new a(this,this.configStemUpdateHandler),this._configStemDeleteHandlerDelegate=new a(this,this.configStemDeleteHandler),this._configStem.addEventListener(s.UPDATE,this._configStemUpdateHandlerDelegate),this._configStem.addEventListener(s.DELETE,this._configStemDeleteHandlerDelegate),this.updateProperties(this._configStem.data,!1),this._arePropertiesInitialised=!0,this.dispatchEvent(new e.PushedConfigPropertyChangeEvent(e.PushedConfigPropertyChangeEvent.PROPERTIES_INITIALISED)))},r.ConvertInplayLauncherStemAttrValueToDisplayMode=function(e){var n,i=t.fixture;return"undefined"==typeof e||null===e||0===e.length?i:(n=Number(e),isNaN(n)||(i=n),i)},r.prototype.updateProperties=function(t,n){var o,s,a,c,l,u,d,h,p,_,g,f,E,v,m,S,C,y,T;if("IF"in t&&(o="1"===this._configStem.data.IF,this._isInPlayDataAvailable!==o&&(this._isInPlayDataAvailable=o,n&&this.dispatchEvent(new e.PushedConfigPropertyChangeEvent(e.PushedConfigPropertyChangeEvent.IS_INPLAY_AVAILABLE)))),"CB"in t&&(s="0"===this._configStem.data.CB,this._isMyBetsSystemEnabled!==s&&(this._isMyBetsSystemEnabled=s,n&&this.dispatchEvent(new e.PushedConfigPropertyChangeEvent(e.PushedConfigPropertyChangeEvent.IS_MYBETS_SYSTEM_ENABLED)))),"CP"in t&&(a="0"===this._configStem.data.CP,this._isCloseBetPullPresentationEnabled!==a&&(this._isCloseBetPullPresentationEnabled=a,this.dispatchEvent(new e.PushedConfigPropertyChangeEvent(e.PushedConfigPropertyChangeEvent.IS_CLOSE_BETS_PULL_DELIVERY_AVAILABLE)))),"OP"in t&&(c="0"===this._configStem.data.OP,this._isOpenBetsPullDeliveryAvailable!==c&&(this._isOpenBetsPullDeliveryAvailable=c,n&&this.dispatchEvent(new e.PushedConfigPropertyChangeEvent(e.PushedConfigPropertyChangeEvent.IS_OPEN_BETS_PULL_DELIVERY_AVAILABLE)))),"FC"in t&&(this.freeBetCountries=this._configStem.data.FC.split(","),n&&this.dispatchEvent(new e.PushedConfigPropertyChangeEvent(e.PushedConfigPropertyChangeEvent.FREE_BET_COUNTRIES_UPDATED))),l=this._isMyBetsSystemEnabled&&this._isOpenBetsPullDeliveryAvailable,this._isMyBetsSiteFeatureAvailable!==l&&(this._isMyBetsSiteFeatureAvailable=l,n&&this.dispatchEvent(new e.PushedConfigPropertyChangeEvent(e.PushedConfigPropertyChangeEvent.IS_MYBETS_SITE_FEATURE_AVAILABLE))),u=r.ConvertInplayLauncherStemAttrValueToDisplayMode(this._configStem.data.DM),this._inplayLauncherDisplayMode!==u&&(this._inplayLauncherDisplayMode=u,n&&this.dispatchEvent(new e.PushedConfigPropertyChangeEvent(e.PushedConfigPropertyChangeEvent.INPLAY_LAUNCHER_DISPLAY_MODE))),this.betCallTwilioDisabledAttribute in t&&(d="1"!=this._configStem.data[this.betCallTwilioDisabledAttribute],this._isBetCallTwilioAvailable!==d&&(this._isBetCallTwilioAvailable=d,this.dispatchEvent(new e.PushedConfigPropertyChangeEvent(e.PushedConfigPropertyChangeEvent.IS_BET_CALL_TWILIO_AVAILABLE)))),this.betCallDisabledAttribute in t&&(h="1"!=this._configStem.data[this.betCallDisabledAttribute],this._isBetCallAvailable!==h&&(this._isBetCallAvailable=h,this.dispatchEvent(new e.PushedConfigPropertyChangeEvent(e.PushedConfigPropertyChangeEvent.IS_BET_CALL_AVAILABLE)))),this.ausMultiplesDisabledAttribute in t&&(p="1"!=this._configStem.data[this.ausMultiplesDisabledAttribute],this._isAusMultiplesAvailable!==p&&(this._isAusMultiplesAvailable=p,this.dispatchEvent(new e.PushedConfigPropertyChangeEvent(e.PushedConfigPropertyChangeEvent.IS_AUS_MULTIPLES_AVAILABLE)))),this.settledBetsDisabledAttribute in t&&(_="1"!=this._configStem.data[this.settledBetsDisabledAttribute],this._settledBetsEnabled!==_&&(this._settledBetsEnabled=_,this.dispatchEvent(new e.PushedConfigPropertyChangeEvent(e.PushedConfigPropertyChangeEvent.IS_SETTLED_BETS_FEATURE_AVAILABLE)))),"ER"in t&&(g="1"!=this._configStem.data.ER,this._isErrorLoggingEnabled!==g&&(this._isErrorLoggingEnabled=g)),"WL"in t&&(this.isWebErrorLoggingEnabled="1"===t.WL),"WI"in t)for(f=t.WI.split(","),E=0,v=f;E<v.length;E++)m=v[E],this.webInfoLoggingCodes.push(parseInt(m,10));this.pushBalanceEnabledAttribute in t&&(S="1"==this._configStem.data[this.pushBalanceEnabledAttribute]&&this._pushConnected,this._isPushBalanceEnabled!==S&&(this._isPushBalanceEnabled=S,n&&this.dispatchEvent(new e.PushedConfigPropertyChangeEvent(e.PushedConfigPropertyChangeEvent.PUSH_BALANCE_ENABLED_AVAILABLE))));"EE"in t&&(C="1"!==this._configStem.data.EE,this._isEditBetsEnabled!==C&&(this._isEditBetsEnabled=C,this.dispatchEvent(new e.PushedConfigPropertyChangeEvent(e.PushedConfigPropertyChangeEvent.IS_EDIT_BETS_FEATURE_AVAILABLE))));this.complexMultiplesEnabledAttribute in t&&(y=t[this.complexMultiplesEnabledAttribute]&&"1"!==t[this.complexMultiplesEnabledAttribute],this.editBetsComplexMultiplesEnabled!==y&&(this.editBetsComplexMultiplesEnabled=y,this.dispatchEvent(new e.PushedConfigPropertyChangeEvent(e.PushedConfigPropertyChangeEvent.IS_EDIT_BETS_COMPLEX_MULTIPLES_FEATURE_AVAILABLE))));"PF"in t&&(T="1"===this._configStem.data.PF,this.psqfV4Enabled!==T&&(this.psqfV4Enabled=T));this.psqfV4Enabled&&(i.MinOdds=0)},r.prototype.configStemUpdateHandler=function(e){this.updateProperties(e.data,!0)},r.prototype.configStemDeleteHandler=function(){this._configStem&&(this._configStem.removeEventListener(s.UPDATE,this._configStemUpdateHandlerDelegate),this._configStem.removeEventListener(s.DELETE,this._configStemDeleteHandlerDelegate),this._configStem=null)},r.prototype.pushDisconnectedHandler=function(){if(this._pushConnected&&(this._pushConnected=!1,this._configStem)){var e={};e[this.pushBalanceEnabledAttribute]="0";this.updateProperties(e,!0)}},r.prototype.pushConnectedHandler=function(){if(!this._pushConnected&&(this._pushConnected=!0,this._configStem)){var e={};e[this.pushBalanceEnabledAttribute]="1";this.updateProperties(e,!0)}},r}(r);n.USER_CONFIG_SUBSCRIPTION_TOPIC="CONFIG_{0}_{1}";e.PushedConfigManager=n}(ns_gen5_config||(ns_gen5_config={})),function(){}(ns_gen5_events||(ns_gen5_events={})),function(){}(ns_gen5_ui||(ns_gen5_ui={})),function(e){function t(){return i.length?i.pop():document.createComment("")}function n(e){i[i.length]=e}var i=[],r=function(e){function i(t){var n=e.call(this)||this;return n._element=n._active_element=n.createElement?n.createElement(t||"div"):document.createElement(t||"div"),n._element.wrapper=n,n}return __extends(i,e),i.prototype.toString=function(){return"[DomElement]"},i.prototype.initialize=function(){this.initialized=!0},i.prototype.appendChild=function(e){var t=e;return e.parent=this,!t.initialized&&t.initialize&&(t.nestLevel=this.nestLevel+1,t.initialize()),$assert&&$assert("initialized"in e&&t.initialized||!("initialized"in e),"Child - "+e+" - is not initialized."),this._element.appendChild(t._active_element),e},i.prototype.insertBefore=function(e,t){$assert&&$assert(t,"before is null or undefined!!!");var n=e;return e.parent=this,!n.initialized&&n.initialize&&(n.nestLevel=this.nestLevel+1,n.initialize()),this._element.insertBefore(n._active_element,t._active_element?t._active_element:t),e},i.prototype.insertAfter=function(e,t){var n,i;return $assert&&$assert(t,"after is null or undefined!!!"),n=e,e.parent=this,!n.initialized&&n.initialize&&(n.nestLevel=this.nestLevel+1,n.initialize()),i=t._active_element?t._active_element:t,i.nextSibling?this._element.insertBefore(n._active_element,i.nextSibling):this._element.appendChild(n._active_element),e},i.prototype.appendChildAt=function(e,t){var n,i=e;return e.parent=this,!i.initialized&&i.initialize&&(i.nestLevel=this.nestLevel+1,i.initialize()),n=this._element.children.length>t?this._element.children[t]:null,this._element.insertBefore(i._active_element,n),e},i.prototype.removeChild=function(e){var t=e;if(e.parent==this){e.parent=null;try{this._element.removeChild(t._active_element)}catch(n){ErrorReporter.Trace(this,n)}}return e},i.prototype.replaceChild=function(e,t){if(t.parent==this){t.parent=null;var n=e;e.parent=this;!n.initialized&&n.initialize&&(n.nestLevel=this.nestLevel+1,n.initialize());this._element.replaceChild(n._active_element,t._active_element)}return e},i.prototype.removeAllChildren=function(){for(var e,t=this._element.firstChild;t;)e=t.wrapper,t=t.nextSibling,e&&this.removeChild(e);return this},i.prototype.suspendElementFromDom=function(){var e,n;this._suspended_markerNode||(e=this._active_element=this._suspended_markerNode=t(),e.wrapper=this,this.parent&&this._element.parentNode&&(n=this.parent._element,n.replaceChild(e,this._element)))},i.prototype.unsuspendElementFromDom=function(){var e,t;this._suspended_markerNode&&(e=this._suspended_markerNode,e.wrapper=null,this._suspended_markerNode=null,this._active_element=this._element,n(e),this.parent&&e.parentNode&&(t=this.parent._element,t.replaceChild(this._element,e)))},i.prototype.setAttribute=function(e,t){return this._element.setAttribute(e,t),this},i.prototype.removeAttribute=function(e){return this._element.removeAttribute(e),this},i.prototype.getAttribute=function(e){return this._element.getAttribute(e)},i.prototype.getElement=function(){return this._element},i.prototype.getElementChildren=function(){return this._element.children},i.prototype.getFirstChild=function(){return this._element.firstChild},i.prototype.getLastChild=function(){return this._element.lastChild},i.prototype.getPreviousSibling=function(){return this._active_element.previousSibling},i.prototype.getNextSibling=function(){return this._active_element.nextSibling},i.prototype.getInlineStyle=function(){return this._element.style},i.prototype.getTooltip=function(){return this.tooltip},i}(ns_gen5_events.EventDispatcher);r.SInit=function(){r.prototype._element=null;r.prototype._active_element=null;r.prototype.parent=null;r.prototype.initialized=!1;r.prototype.nestLevel=0;r.prototype._suspended_markerNode=null;r.prototype.tooltip=null;r.prototype.alwaysShowTooltip=!1}();__decorate([override],r.prototype,"toString");e.DomElement=r}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=function(){function e(e){this._element=this._active_element=document.createTextNode(e||"");this._text=e||null}return e.prototype.toString=function(){return"[TextNode text="+this._text+"]"},e.prototype.setText=function(e){return this._text=this._element.data=e},e.prototype.getText=function(){return this._text},e.prototype.getElement=function(){return this._element},e}();t.Wrapper=function(e){this._element=e;this._text=this._element.data||null};t.SInit=function(){t.prototype.parent=null;t.prototype._element=null;t.prototype._active_element=null;t.prototype._text=null;t.Wrapper.prototype=new t}();e.TextNode=t}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=function(){function t(e,t){var n=this;this.element=e;this.enableFastClick=t;this._callback_clickHandler=function(e){return n._clickHandler(e)};this._callback_touchStartHandler=function(e){return n._touchStartHandler(e)}}return t.prototype.activate=function(){var n=this.element instanceof e.DomElement?this.element.getElement():this.element;n.addEventListener("click",this._callback_clickHandler);t.IS_CHROME&&n.addEventListener("touchstart",this._callback_touchStartHandler);this.enableFastClick&&(this._fastClick=FastClick.attach(n))},t.prototype.release=function(){this._fastClick&&(this._fastClick.destroy(),this._fastClick=null);var n=this.element instanceof e.DomElement?this.element.getElement():this.element;n.removeEventListener("click",this._callback_clickHandler);t.IS_CHROME&&n.removeEventListener("touchstart",this._callback_touchStartHandler)},t.prototype._touchStartHandler=function(e){this._touchElement=e?e.target:null},t.prototype._clickHandler=function(e){var n,i=e||window.event;if(i.target){for(n=i.target,this._touchElement&&t.IS_CHROME&&(n=this._touchElement,this._touchElement=null);n;){if(n.wrapper&&n.wrapper.clickHandler){try{n.wrapper.clickHandler(i)}catch(r){ErrorReporter.Trace(this,r)}break}n=n.parentNode}Locator.validationManager.processValidationCycleNow()}},t}();t.IS_CHROME=!!/chrome/.exec(navigator.userAgent.toLowerCase());e.PointerProcessor=t}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=function(e){function t(t){var n=e.call(this,t)||this;return n._styleList={},n}return __extends(t,e),t.prototype.toString=function(){return"[Component]"},t.prototype.initialize=function(){1!=this._stopInitInvalidation&&(Locator.validationManager.queueForValidation(this),this._propertiesInvalidated=!0);this.createChildren();this.initialized=!0},t.prototype.setAttribute=function(t,n){return $assert&&$assert("class"!=t,"It's not safe to use 'setAttribute(\"class\",' with a Component instance. Use 'addStyle' instead."),e.prototype.setAttribute.call(this,t,n)},t.prototype.createChildren=function(){},t.prototype.commitProperties=function(){},t.prototype.commitStyles=function(){var e,t="";for(e in this._styleList)t+=e+" ";this._element.className=t},t.prototype.hasStyle=function(e){return!!this._styleList[e]},t.prototype.addStyle=function(e){return this._styleList[e]=!0,this._stylesInvalidated||this.invalidateStyles(),this},t.prototype.removeStyle=function(e){return delete this._styleList[e],this._stylesInvalidated||this.invalidateStyles(),this},t.prototype.overwriteStyle=function(e,t){return delete this._styleList[e],this._styleList[t]=!0,this.invalidateStyles(),this},t.prototype.setVisible=function(e){return e!=this._visible&&(this._visible=e,e?this.removeStyle("Hidden"):this.addStyle("Hidden")),this},t.prototype.getVisible=function(){return this._visible},t.prototype.invalidateProperties=function(){return this._propertiesInvalidated=!0,1!=this.validationState&&this.parent&&Locator.validationManager.queueForValidation(this),this},t.prototype.invalidateStyles=function(){return this._stylesInvalidated=!0,0==this.validationState&&this.parent&&Locator.validationManager.queueForValidation(this),this},t.prototype.validateNow=function(e){this._propertiesInvalidated&&(this._propertiesInvalidated=!1,this.commitProperties());this._stylesInvalidated&&(this._stylesInvalidated=!1,this.commitStyles());0!=e&&(this.validationState=0)},t}(e.DomElement);t.Wrapper=function(e){var t,n,i,r,o;for(ns_gen5_events.EventDispatcher.call(this),this.parent=!0,this._element=e,e.wrapper=this,t=this._element.getAttribute("class"),n={},i=t?t.split(" "):[],r=i.length,o=0;r>o;o++)n[i[o]]=!0;this._styleList=n};t.SInit=function(){t.prototype._styleList=null;t.prototype._propertiesInvalidated=!1;t.prototype._stylesInvalidated=!1;t.prototype._visible=!0;t.prototype._stopInitInvalidation=!1;t.prototype.validationState=0;t.Wrapper.prototype=new t}();__decorate([override],t.prototype,"toString");__decorate([override],t.prototype,"initialize");__decorate([override],t.prototype,"setAttribute");e.Component=t}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.setSVGData=function(e){t.RequiresAbsolutePaths&&(e=e.replace(/url\(#/g,"url("+window.location.href.replace(window.location.hash,"")+"#"));this._element.innerHTML=e},t}(e.Component);t.RequiresAbsolutePaths=!0;e.SVGWrapperComponent=t}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.commitStyles=function(){var e,t="";for(e in this._styleList)t+=e+" ";this._element.setAttribute("class",t)},t.prototype.createElement=function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)},t.prototype.setViewbox=function(e){this._element.setAttribute("viewBox",e)},t.prototype.createSVGPoint=function(){return this._element.createSVGPoint()},t}(e.Component);__decorate([override],t.prototype,"commitStyles");e.SVG=t}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.addPoint=function(e){var t=this.cordinateContext?this.cordinateContext.createSVGPoint():e;this.cordinateContext&&(t.x=e.x,t.y=e.y);this._element.points.appendItem(t)},t.prototype.removePoint=function(e){this._element.points.removeItem(e)},t.prototype.pointCount=function(){return this._element.points.numberOfItems},t.prototype.clearPoints=function(){this._element.points.clear()},t.prototype.setStroke=function(e){this._element.setAttribute("stroke",e)},t.prototype.setStrokeWidth=function(e){this._element.setAttribute("stroke-width",e)},t.prototype.setFill=function(e){this._element.setAttribute("fill",e)},t.prototype.setFillOpacity=function(e){this._element.setAttribute("fill-opacity",e)},t}(e.SVG);t.SInit=function(){t.prototype.cordinateContext=null}();e.SVGPoly=t}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=function(e){function t(){return e.call(this,"stop")||this}return __extends(t,e),t.prototype.setOffset=function(e){this._element.setAttribute("offset",e)},t.prototype.setOpacity=function(e){this._element.setAttribute("stop-opacity",e)},t.prototype.setColor=function(e){this._element.setAttribute("stop-color",e)},t}(e.SVG);e.SVGStop=t}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=function(e){function t(t){var n=e.call(this,"linearGradient")||this;return n.id=t,n.svgId=t,n}return __extends(t,e),t.prototype.initialize=function(){this._element.setAttribute("id",this.id);e.prototype.initialize.call(this)},t.prototype.setX1=function(e){this._element.setAttribute("x1",e)},t.prototype.setX2=function(e){this._element.setAttribute("x2",e)},t.prototype.setY1=function(e){this._element.setAttribute("y1",e)},t.prototype.setY2=function(e){this._element.setAttribute("y2",e)},t.prototype.getUrl=function(){return t.RequiresAbsolutePaths?"url("+window.location.href.replace(window.location.hash,"#")+this.svgId+")":"url(#"+this.svgId+")"},t}(e.SVG);t.RequiresAbsolutePaths=!0;__decorate([override],t.prototype,"initialize");e.SVGLinearGradient=t}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t,n=function(e){function n(n,i){var r=this;return t=i.getElement(),r=e.call(this,n)||this,t=null,1!=r._stopInitInvalidation&&(Locator.validationManager.queueForValidation(r),r._propertiesInvalidated=!0),r}return __extends(n,e),n.prototype.createElement=function(e){var n=t.querySelector("#"+e);return $assert&&$assert(!n.wrapper,"The SVG element has already been wrapped."),n},n}(e.SVG);__decorate([override],n.prototype,"createElement");e.SVGWrapper=n}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=e.DomElement,n=0,i=function(i){function r(e){var r=i.call(this,e)||this;return r.root=new t,r.uid=++n,r}return __extends(r,i),r.prototype.toString=function(){return"[Module]"},r.getRoot=function(e){for(;e;){if(e instanceof r)return e;e=e.parent}return null},r.prototype.initialize=function(){i.prototype.initialize.call(this);ns_gen5_util.Singleton.RegisterModule(this);this.parent&&this.parent.parent||this.parent instanceof e.ModuleContainer||(this.parent=this.root,this.moduleReady())},r.prototype.moduleReady=function(){this.ready=!0},r.prototype.dispose=function(){this.disposed=!0;ns_gen5_util.Singleton.RemoveScope(this)},r}(e.Component);__decorate([override],i.prototype,"toString");__decorate([override],i.prototype,"initialize");e.Module=i}(ns_gen5_ui||(ns_gen5_ui={})),function(e){function t(e){return function(t){return e+"  "+(t.moduleName||"")+":"+(t.elementName||"")}}function n(e){var t="Module Load Error "+e;ErrorReporter.Trace("ModuleContainer:::",t);$logFmt(t,"font-weight:bold; color:#FF0000;")}var i,r=t("0x01"),o=ns_gen5_util.Delegate,s=ns_gen5_util.Config,a=ns_gen5_events.ModuleEvent,c=ns_gen5_util.InfoReporter,l=function(){function e(){this.resourcesNeeded=1;this.resourcesLoaded=0}return e.prototype.isFullyLoaded=function(){return this.resourcesLoaded>=this.resourcesNeeded},e}();e.ModuleResourcePackage=l;i=function(t){function i(){var e=t.call(this)||this;return e.invokeQueue=[],e}return __extends(i,t),i.LoadModule=function(e,t){var n,r,o,s=i.ModuleCache[e];s&&s.definition?(n=s.isFullyLoaded(),Locator.validationManager.callLater(function(){t.moduleAvailableHandler(s);n&&t.moduleReadyHandler(s)})):s?(r=i.PendingList[e],r[r.length]=t):(s=i.ModuleCache[e]=new l,o=function(){var t,n,r,o;if(s.isFullyLoaded()&&(t=i.PendingList[e])){for(n=0,r=t;n<r.length;n++)o=r[n],o.moduleReadyHandler(s);delete i.PendingList[e]}},i.PendingList[e]=[t],i.ModuleLoader.loadModule(e,s,o))},i.RegisterModule=function(e,t){var n,r,o,s,a=i.ModuleCache[e];if(a||(a=i.ModuleCache[e]=new l),a.resourcesLoaded++,$assert&&$assert(!a.definition,"Duplicate module definition loaded - "+e),a.definition=t,n=i.PendingList[e])for(r=0,o=n;r<o.length;r++)s=o[r],s.moduleAvailableHandler(a)},i.RegisterLanguage=function(e,t){var n=i.ModuleCache[e];n.resourcesLoaded++;n.languageDefinition=t},i.RegisterConfig=function(e,t){var n=i.ModuleCache[e];n.config=t},i.prototype.load=function(e){var t,n;this.moduleName=e;i.LoadModule(e,this);t=Locator.manifestManager.getDefaultTopic(e);null!==t&&(t&&(n=Locator.user,t=t.replace("{L}",n.languageId),t=t.replace("{Z}",n.zoneId),t=t.replace("{C}",""+n.customerType),this.defaultTopic=t),this.defaultTopic&&Locator.subscriptionManager.subscribe(this.defaultTopic,new o(this,this.defaultTopicSubscriptionHandler)))},i.prototype.defaultTopicSubscriptionHandler=function(e){var t=Locator.treeLookup.getReference(e.type);this.defaultStem=t;this.storedResourcePackage&&this.moduleReadyHandler(this.storedResourcePackage)},i.prototype.dispose=function(){if(this._module){try{this._module.dispose()}catch(e){ErrorReporter.Trace(this,e)}$assert&&$assert(this._module.disposed,"dispose() has been called but module isn't reporting as being disposed - "+this._module);this._module.disposed||c.Trace(c.MODULE_LOAD_ENTRY,this._module+" did not dispose correctly");this._module=null}this.disposed=!0},i.prototype.getModule=function(){return this._module},i.prototype.invoke=function(e){var t=this;this.moduleReady?Locator.validationManager.callLater(function(){return e(t._module)}):this.invokeQueue.push(e)},i.prototype.moduleAvailableHandler=function(t){var n=this._module=new t.definition;n.initObject=this.initObject;e.MediaTypeIdLookup&&(n.mediaTypeId=e.MediaTypeIdLookup[this.moduleName],$assert&&$assert(void 0!==n.mediaTypeId,"moduleAvailableHandler() is looking for the media type of module '"+this.moduleName+"' which is not defined in MediaTypeIdLookup"));try{this.appendChild(n)}catch(i){ErrorReporter.Trace(this,i)}},i.prototype.moduleReadyHandler=function(e){var t,i,o,l;if(!this.disposed){if(this.defaultTopic&&!this.defaultStem)return void(this.storedResourcePackage=e);if(this.defaultTopic&&!this._module)return void n(r(this));this.storedResourcePackage=null;t=this._module.languageDefinition=ns_gen5_util.Singleton.getInstance(ns_gen5_language.Resource,this._module);t.mlJson=e.languageDefinition;e.config&&(this._module.config=new s,this._module.config.setConfigJSON(e.config));this.defaultStem&&(this._module.defaultStem=this.defaultStem);try{this._module.moduleReady();this._module.bubbleEvent(new a(a.MODULE_READY));this.moduleReady=!0}catch(u){ErrorReporter.Trace(this,u)}for($assert&&$assert(this._module.ready,"moduleReady() has been called but module isn't reporting as ready - "+this._module),this._module.ready||c.Trace(c.MODULE_LOAD_ENTRY,this._module+" did not ready-up correctly"),i=0,o=this.invokeQueue;i<o.length;i++){l=o[i];try{l(this._module)}catch(u){ErrorReporter.Trace(this,u)}}this.invokeQueue.length=0}},i}(e.Component);i.ModuleCache={};i.PendingList={};i.ModuleLoader=new ns_gen5_net.ModuleLoaderDefault;i.SInit=function(){i.prototype._module=null;i.prototype.defaultStem=null;i.prototype.moduleReady=!1;i.prototype.storedResourcePackage=null;i.prototype.disposed=!1;i.prototype.initObject=null;i.prototype.defaultTopic=null;i.prototype.elementName=null;i.prototype.moduleName=null}();e.ModuleContainerAs=i;e.ModuleContainer=i}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=e.DomElement,n=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.spinnerStyle="g5-Spinner_Image",t.defaultStyle="g5-Spinner",t}return __extends(n,e),n.prototype.createChildren=function(){this.addStyle(this.defaultStyle);this.addStyle("g5-Spinner_FadeIn");var e=new t;e.setAttribute("class",this.spinnerStyle);this.appendChild(e);this.validateNow()},n.prototype.remove=function(){var e,t=this,n=this._element;this.removeStyle("g5-Spinner_FadeIn");this.addStyle("g5-Spinner_FadeOut");e=function(){t.removeStyle("g5-Spinner_FadeOut");n.parentElement.removeChild(n);n.removeEventListener(ANIMATION_END,e)};this._element.addEventListener&&this._element.addEventListener(ANIMATION_END,e,!1);this.validateNow()},n}(e.Component);__decorate([override],n.prototype,"createChildren");e.Spinner=n}(ns_gen5_ui||(ns_gen5_ui={})),function(e){function t(e,t){if(!t)return!1;for(;t.parent;){if(t.parent==e||t==e)return!0;t=t.parent}return!1}var n=ns_gen5_ui.Component,i=function(){function e(){}return e.Register=function(t){e.Root=t},e.AddPopup=function(t,n,i,r){void 0===n&&(n=!0);void 0===i&&(i=e.Root);void 0===r&&(r=!0);$assert&&$assert(e.Root,"Root is not specified");n?(e.PopupHasOverlay=!0,e.ShowOverlay(!0,e.Root)):e.PopupHasOverlay&&(e.PopupHasOverlay=!1,e.ShowOverlay(!1,e.Root));e.PopupList.push(t);i.appendChildAt(t,0);r&&(e.SupressClickTarget=t)},e.RemovePopup=function(t){$assert&&$assert(e.PopupList.indexOf(t)>-1,"Popup does not exist in the manager");var n=e.PopupList.indexOf(t);n>-1&&(t.parent.removeChild(t),t.dispose(),e.PopupList.splice(n,1),e.PopupHasOverlay&&(e.PopupHasOverlay=!1,e.ShowOverlay(!1,e.Root)))},e.HasPopup=function(){return this.PopupList.length>0},e.ContainsPopup=function(n){return t(e.Root,n)},e.HandleHover=function(t){for(var n=0;n<e.RegisteredDelegates.length;n++)e.RegisteredDelegates[n].overlayHoverHandler(t)},e.HandleTouchMove=function(e){e.preventDefault()},e.HandleClick=function(n){var i,r;if(n=n||window.event,n.target){for(r=0;r<e.RegisteredDelegates.length;r++)i=e.RegisteredDelegates[r],t(i,n.target.wrapper)||i==e.SupressClickTarget||i.clickOutsideHandler(n);e.SupressClickTarget=null}},e.AddDelegate=function(t){var n=e.RegisteredDelegates.indexOf(t);$assert&&$assert(-1===n,"The delegate has already been added.");-1===n&&e.RegisteredDelegates.push(t)},e.RemoveDelegate=function(t){var n=e.RegisteredDelegates.indexOf(t);$assert&&$assert(n>-1,"The delegate is not added.");n>-1&&e.RegisteredDelegates.splice(n,1)},e.ShowOverlay=function(t,n){var i,r;void 0===n&&(n=null);i=e.OverlayComponent;i.initialized||i.initialize();t?(e.OverlayCount>0&&(e.RemoveOverlay(i),e.OverlayCount--),null!=n?(n.appendChild(i),e.BehindComponent=n):(r=document.getElementsByTagName("body"),r&&r[0].appendChild(i.getElement())),e.OverlayCount++):(e.RemoveOverlay(i),e.OverlayCount--);i.setVisible(e.OverlayCount>0);Locator.validationManager.queueForValidation(i)},e.RemoveOverlay=function(e){e.parent?e.parent.removeChild(e):e.getElement().parentElement.removeChild(e.getElement())},e}();i.RegisteredDelegates=[];i.OverlayCount=0;i.PopupList=[];i.CreateOverlay=function(){var e,t,r=new n;r.addStyle("g5-PopupManager_ClickMask");r.setVisible(!1);e=document.getElementsByTagName("body")[0];e&&(e.appendChild(r.getElement()),e.addEventListener("click",i.HandleClick),e.addEventListener("touchend",i.HandleClick));t=r.getElement();t.addEventListener("mouseover",i.HandleHover);t.addEventListener("mousemove",i.HandleHover);t.addEventListener("touchmove",i.HandleTouchMove);i.OverlayComponent=r}();e.PopupManager=i}(ns_gen5_ui_managers||(ns_gen5_ui_managers={})),function(e){function t(){var e,t;"undefined"!=typeof l.currentApplication&&(v=document.documentElement.clientWidth||window.innerWidth||document.body.clientWidth,m=document.documentElement.clientHeight||window.innerHeight||document.body.clientHeight,l.currentApplication.width=v,e=v<l.widthThreshold?0:1,e!=l.currentApplication.widthState&&(l.currentApplication.removeStyle(f+l.currentApplication.widthState),l.currentApplication.widthState=e,o.dispatchEvent(new u(u.WIDTH_STATE_CHANGED,v)),Locator.validationManager.processValidationCycleNow(),l.currentApplication.overwriteStyle(f+l.currentApplication.widthState,f+e)),e=v<l.viewWidthThreshold?0:1,e!=l.currentApplication.viewState&&(l.currentApplication.removeStyle(E+l.currentApplication.viewState),l.currentApplication.viewState=e,o.dispatchEvent(new u(u.VIEW_STATE_CHANGED)),Locator.validationManager.processValidationCycleNow(),l.currentApplication.overwriteStyle(E+l.currentApplication.viewState,E+e)),l.currentApplication.height!==m&&(l.currentApplication.height=m,o.dispatchEvent(new u(u.HEIGHT_CHANGED))),l.currentApplication.dispatchEvent(new u(u.WIDTH_CHANGED,v)),t=m,t&&(t-=l.heightOffset,l.currentApplication.getElement().style.minHeight=t+"px"))}function n(e){window.removeEventListener("orientationchanged",n);window.removeEventListener("resize",n);window.addEventListener(e.type,t);t()}function i(){o&&!o.preventUnloading&&(o.preventUnloading=!1,o.dispatchEvent(new u(u.UNLOADING)))}function r(e){o&&(e=e||window.event,o.suspended="focus"==e.type||"focusin"==e.type?!1:"blur"==e.type||"focusout"==e.type?!0:this[a]?!0:!1,o.suspended?o.dispatchEvent(new u(u.FOCUS_OUT)):o.dispatchEvent(new u(u.FOCUS_IN)))}var o,s,a,c,l,u=ns_gen5_events.ApplicationEvent,d=ns_gen5_util.Delegate,h=e.Spinner,p=ns_gen5_data.StreamDataProcessorEvent,_=e.PointerProcessor,g=!1,f="widthState",E="viewState",v=0,m=0,S=0,C=0;window.addEventListener("orientationchanged",n);window.addEventListener("resize",n);window.addEventListener("beforeunload",i);a="";c={hidden:"visibilitychange",mozHidden:"mozvisibilitychange",webkitHidden:"webkitvisibilitychange",msHidden:"msvisibilitychange"};for(a in c)if(a in document){s=c[a];break}s?(document.removeEventListener(s,r),document.addEventListener(s,r)):"onfocusin"in document?document.onfocusin=document.onfocusout=r:window.onfocus=window.onblur=r;l=function(n){function i(r){var s=n.call(this)||this;return s.applyPointerProcessor=!0,s._loadingTimer=null,s._spinner=null,s.height=0,s.width=0,s.widthState=-1,s.viewState=-1,s.suspended=!1,s.preventUnloading=!1,s.connected=!1,e.Component.Wrapper.call(s,r),s.addStyle("g5-Application"),s._delegate_loadingHandler=new d(s,s.loadingHandler),s._delegate_loadingCompleteHandler=new d(s,s.loadingCompleteHandler),s._delegate_showStreamingHandler=new d(s,s._showStreamingHandler),s._delegate_connectedHandler=new d(s,s._connectedHandler),s._delegate_connectionFailureHandler=new d(s,s._connectionFailedHandler),s._addSpinnerCallback=function(){return s.addSpinner()},Locator.subscriptionManager._streamDataProcessor.addEventListener(p.CONNECTED,s._delegate_connectedHandler),Locator.subscriptionManager._streamDataProcessor.addEventListener(p.CONNECTION_FAILED,s._delegate_connectionFailureHandler),o=i.currentApplication=s,v=window.innerWidth||document.body.clientWidth,m=window.innerHeight||document.body.clientHeight,"screen"in window&&(S=window.screen.width,C=window.screen.height),s.width=v,t(),s}return __extends(i,n),i.prototype.toString=function(){return"[Application]"},i.prototype.enableUI=function(){g||(g=!0,this.applyPointerProcessor&&(this.pointerProcessor=new _(this),this.pointerProcessor.activate()),this.addEventListener(u.LOADING,this._delegate_loadingHandler),this.addEventListener(u.LOADING_COMPLETE,this._delegate_loadingCompleteHandler),this.addEventListener("showStreaming",this._delegate_showStreamingHandler))},i.prototype.disableUI=function(){g&&(g=!1,this._spinner&&(this._spinner.remove(),this._spinner=null),this.removeEventListener(u.LOADING,this._delegate_loadingHandler),this.removeEventListener(u.LOADING_COMPLETE,this._delegate_loadingCompleteHandler),this.removeEventListener("showStreaming",this._delegate_showStreamingHandler),this.pointerProcessor&&(this.pointerProcessor.release(),this.pointerProcessor=null))},i.prototype.loadingHandler=function(){g&&!this._loadingTimer&&(this._loadingTimer=setTimeout(this._addSpinnerCallback,i.loadingTimeout))},i.prototype.addSpinner=function(){this._spinner=new h;var e=this.getElement();e.appendChild(this._spinner.getElement());this._spinner.initialize()},i.prototype.loadingCompleteHandler=function(){this._loadingTimer&&(clearTimeout(this._loadingTimer),this._loadingTimer=null);this._spinner&&(this._spinner.remove(),this._spinner=null)},i.prototype._showStreamingHandler=function(){this.preventUnloading=!0},i.prototype._connectedHandler=function(){this.connected=!0},i.prototype._connectionFailedHandler=function(){this.connected=!1},i.prototype.getDeviceWidth=function(){return v},i.prototype.getDeviceHeight=function(){return m},i.prototype.getScreenWidth=function(){return S},i.prototype.getScreenHeight=function(){return C},i}(e.Component);l.loadingTimeout=200;l.overflowLayout=!1;l.widthThreshold=550;l.viewWidthThreshold=950;l.heightOffset=89;__decorate([override],l.prototype,"toString");e.Application=l}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=e.Component,n=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.toString=function(){return"[ClosableContainer]"},t.prototype.createChildren=function(){this._button=new this._buttonClass(this._buttonTag);this._initAppendChildButton&&this.appendChild(this._button);this._open&&this.initializeContainer()},t.prototype.initializeContainer=function(){this._container||(this._container=new this._containerClass(this._containerTag),this._initAppendChildContainer&&this.appendChild(this._container))},t.prototype.setOpen=function(e){e!=this._open&&(this._open=e,this._container?this._container.setVisible(this._open):this.initializeContainer())},t.prototype.getOpen=function(){return this._open},t.prototype.clickHandler=function(){this.setOpen(!this._open)},t}(e.Component);n.SInit=function(){n.prototype._button=null;n.prototype._buttonClass=t;n.prototype._container=null;n.prototype._containerClass=t;n.prototype._open=!1;n.prototype._initAppendChildButton=!0;n.prototype._initAppendChildContainer=!0;n.prototype._buttonTag=null;n.prototype._containerTag=null}();__decorate([override],n.prototype,"toString");__decorate([override],n.prototype,"createChildren");e.ClosableContainer=n}(ns_gen5_ui||(ns_gen5_ui={})),function(e){e.StemBaseMixin=function(){function e(){this.stem&&this.stem.addDelegate(this);this.___initialize&&this.___initialize()}function t(e){var n,i,r=e||this;if(r.getFirstChild)for(n=r.getFirstChild(),i=void 0;n;)i=n.wrapper,n=n.nextSibling,i&&(i.recursiveDetatchStem?i.recursiveDetatchStem():t(i));r.detatchStem&&r.detatchStem()}function n(){this.stem&&(this.stem.removeDelegate(this),this.stem=null,this.validationState=0,this.parent&&this.parent.removeChild(this))}function i(){}function r(){}function o(){this.detatchStem()}return function(){this.stem=null;this.___initialize=this.initialize;this.initialize=e;this.stemUpdateHandler=i;this.stemDeleteHandler=o;this.stemInsertHandler=r;this.detatchStem=n;this.recursiveDetatchStem=t}}()}(ns_gen5_ui||(ns_gen5_ui={})),function(){}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.toString=function(){return"[ComponentStemBase]"},t.prototype.stemUpdateHandler=function(){},t.prototype.stemDeleteHandler=function(){},t.prototype.stemInsertHandler=function(){},t.prototype.detatchStem=function(){},t.prototype.recursiveDetatchStem=function(){},t}(e.Component);__decorate([override],t.prototype,"toString");e.ComponentStemBase=t;e.StemBaseMixin.call(t.prototype)}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.toString=function(){return"[ClosableContainerStemBase]"},t.prototype.createChildren=function(){this._button=new this._buttonClass(this._buttonTag);this.buttonAcceptsStem&&(this._button.stem=this.stem);this._initAppendChildButton&&this.appendChild(this._button);this._open&&this.initializeContainer()},t.prototype.initializeContainer=function(){this._container=new this._containerClass;this._container.stem=this.stem;this._initAppendChildContainer&&this.appendChild(this._container)},t.prototype.stemUpdateHandler=function(){},t.prototype.stemDeleteHandler=function(){},t.prototype.stemInsertHandler=function(){},t.prototype.detatchStem=function(){},t.prototype.recursiveDetatchStem=function(){},t}(e.ClosableContainer);t.SInit=function(){t.prototype.buttonAcceptsStem=!1}();__decorate([override],t.prototype,"toString");__decorate([override],t.prototype,"createChildren");__decorate([override],t.prototype,"initializeContainer");e.ClosableContainerStemBase=t;e.StemBaseMixin.call(t.prototype)}(ns_gen5_ui||(ns_gen5_ui={})),function(e){function t(e){return!!e.createChildInstance}var n=(ns_gen5_data.Attribute,e.ComponentStemBase),i=function(e){function n(t){return e.call(this,t)||this}return __extends(n,e),n.prototype.toString=function(){return"[GenericStemRenderer]"},n.prototype.createChildren=function(){var e,n,i,r,o,s,a,c,l;if(this.stem)if(e=this,n=this.stem.getChildren(),i=this.childType,t(e))for(r=0,o=n;r<o.length;r++)s=o[r],a=e.createChildInstance(s),a.stem=s,this.appendChild(a);else for(c=0,l=n;c<l.length;c++)s=l[c],a=new i,a.stem=s,this.appendChild(a)},n.prototype.appendChildAt=function(t,n){return e.prototype.appendChildAt.call(this,t,n+this.baseIndex)},n.prototype.stemInsertHandler=function(e,n){var i,r=n.data.OR,o=this,s=t(o)?o.createChildInstance(n):new this.childType;if(s.stem=n,r)try{i=this._element.children[Number(r)+this.baseIndex];i?this.insertBefore(s,i):this.appendChild(s)}catch(a){ErrorReporter.Trace(this,a);this.appendChild(s)}else this.appendChild(s)},n.prototype.setStem=function(e){var t=this;this.stem&&this.recursiveDetatchStem();this.stem=e;this.parent&&this.stem&&(this.stem.addDelegate(this),Locator.validationManager.callLater(function(){t.suspendElementFromDom();t.createChildren();Locator.validationManager.callPostValidation(function(){return t.unsuspendElementFromDom()})}))},n}(e.ComponentStemBase);i.SInit=function(){i.prototype.childType=n;i.prototype.baseIndex=0}();__decorate([override],i.prototype,"toString");__decorate([override],i.prototype,"createChildren");__decorate([override],i.prototype,"appendChildAt");__decorate([override],i.prototype,"stemInsertHandler");e.GenericStemRenderer=i}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=function(e){function t(){var t=e.call(this,"input")||this;return t.passwordDisplay=!1,t._rendered=!1,t}return __extends(t,e),t.prototype.createChildren=function(){if(this.maxLength>0&&this.setAttribute("maxlength",this.maxLength+""),this.passwordDisplay)this.setAttribute("type","password");else if(this.setAttribute("type","text"),this._initialValue&&""!=this._initialValue){var e=this.getElement();e.value=this._initialValue}this._rendered=!0},t.prototype.setValue=function(e){return this._rendered?this.getElement().value=e:this._initialValue=e,e},t.prototype.getValue=function(){return this._rendered?this.getElement().value:this._initialValue},t}(e.Component);__decorate([override],t.prototype,"createChildren");e.TextInput=t}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=ns_gen5_ui.DomElement,n=ns_gen5_ui.Module,i=function(){function e(){}return e.getInstance=function(i,r){var o,s,a;if(e.ClassMap||(e.ClassMap=new Map,e.ModuleBank=new Map),r){if(a=r instanceof t?n.getRoot(r):e.ModuleIDLookup[r],!a)return null;o=e.ModuleBank.get(a);o||(o=new Map,e.ModuleBank.set(a,o))}else o=e.ClassMap;return s=o.get(i),s||(s=new i,o.set(i,s)),s},e.RemoveInstance=function(t){e.ClassMap["delete"](t)},e.RemoveScope=function(t){t instanceof n&&delete e.ModuleIDLookup[t.uid];e.ModuleBank["delete"](t)},e.RegisterModule=function(t){e.ModuleIDLookup[t.uid]||(e.ModuleIDLookup[t.uid]=t)},e}();i.ModuleIDLookup=[];e.Singleton=i}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.toString=function(){return"[WidthStateWatcherEvent]"},t}(ns_gen5_events.Event365);t.WIDTH_STATE_CHANGED="widthStateChanged";__decorate([override],t.prototype,"toString");e.WidthStateWatcherEvent=t}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=ns_gen5_ui.Application,n=ns_gen5_events.ApplicationEvent,i=e.Delegate,r=e.WidthStateWatcherEvent,o=function(e){function o(){return e.call(this)||this}return __extends(o,e),o.prototype.toString=function(){return"[WidthStateWatcher]"},o.prototype.initialize=function(){var e,r,o,s,a;if(this._delegate_applicationWidthChangedHandler=new i(this,this._applicationWidthChangedHandler),this._applicationWidthChangedHandler(new n(n.WIDTH_CHANGED,t.currentApplication.width)),t.currentApplication.addEventListener(n.WIDTH_CHANGED,this._delegate_applicationWidthChangedHandler),$assert)for($assert(this.thresholds,"Thresholds have not been set on this instance of "+this),e=this.thresholds,r=-1,o=e.length,s=0;o>s;s++)a=e[s],$assert(a>r,"The thresholds list provided to this instance of "+this+" is not sequential."),r=a;this.initialized=!0},o.prototype.dispose=function(){this._registeredDisplayElements=null;t.currentApplication.removeEventListener(n.WIDTH_CHANGED,this._delegate_applicationWidthChangedHandler)},o.prototype.registerElement=function(e){this._registeredDisplayElements||(this._registeredDisplayElements=[]);this._registeredDisplayElements[this._registeredDisplayElements.length]=e;this.initialized&&e.addStyle(this.classPrefix+this.state)},o.prototype.unregisterElement=function(e){this._registeredDisplayElements.splice(this._registeredDisplayElements.indexOf(e),1)},o.prototype._applicationWidthChangedHandler=function(e){for(var t,i,o,s=this.thresholds,a=e.width,c=-1,l=s.length,n=0;l>n;n++)if(t=s[n],t>a){c=n;break}if(-1==c&&(c=s.length),this.state!=c&&(i=this.state,this.state=c,this.hasEventListener(r.WIDTH_STATE_CHANGED)&&this.dispatchEvent(new r(r.WIDTH_STATE_CHANGED)),o=this._registeredDisplayElements,o&&(l=o.length)))if(-1==i)for(n=0;l>n;n++)o[n].addStyle(this.classPrefix+c);else for(n=0;l>n;n++)o[n].overwriteStyle(this.classPrefix+i,this.classPrefix+c)},o}(ns_gen5_events.EventDispatcher);o.SInit=function(){o.prototype._delegate_applicationWidthChangedHandler=null;o.prototype._registeredDisplayElements=null;o.prototype.initialized=!1;o.prototype.state=-1;o.prototype.thresholds=null;o.prototype.classPrefix="g5-WidthStateWatcher_CurrentSize-"}();__decorate([override],o.prototype,"toString");e.WidthStateWatcher=o}(ns_gen5_util||(ns_gen5_util={})),function(e){var t,n=(ns_gen5_data.Attribute,function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.initialize=function(){},t.prototype.stemUpdateHandler=function(){},t.prototype.stemInsertHandler=function(){},t.prototype.stemDeleteHandler=function(){},t.prototype.detatchStem=function(){},t.prototype.recursiveDetatchStem=function(){},t}(ns_gen5_events.EventDispatcher));n.SInit=function(){ns_gen5_ui.StemBaseMixin.call(n.prototype)}();e.StemMergeProcessor_PrivateBase=n;t=function(e){function t(t,n){var i=e.call(this)||this;return i.toStem=null,i._excludeMap=null,i.stem=t,i.toStem=n,i._excludeMap={},i._excludeMap.IT=1,i}return __extends(t,e),t.prototype.toString=function(){return"[StemMergeProcessor]"},t.prototype.excludeAttributes=function(){for(var t,n,i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];for(t=arguments.length,n=0;t>n;n++)this._excludeMap[arguments[n]]=1},t.prototype.initialize=function(){e.prototype.initialize.call(this);this.takeAll()},t.prototype.takeAll=function(){var e,t=this.stem.data,n=this.toStem.data;for(e in t)e in this._excludeMap||(n[e]=t[e]);return n},t.prototype.detatchStem=function(){this.toStem=null;e.prototype.detatchStem.call(this)},t.prototype.stemUpdateHandler=function(e,t){var n,i={};for(n in t)n in this._excludeMap||(i[n]=t[n]);this.toStem.update(i)},t}(n);__decorate([override],t.prototype,"toString");__decorate([override],t.prototype,"initialize");__decorate([override],t.prototype,"detatchStem");__decorate([override],t.prototype,"stemUpdateHandler");e.StemMergeProcessor=t}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=function(){function e(){}return e.GetCookieValue=function(e){return this.GetCookieAttributeValue(e)},e.GetCookieAttributeValue=function(e,t){for(var n,i,r,s,a,c=document.cookie.split(";"),l=null,u=c.length,o=0;u>o;o++)if(r=c[o],i=r.indexOf("="),n=r.substr(0,i),n=n.replace(/^\s+|\s+$/g,""),n==e){if(l=r.substr(i+1),t)for(s=l.split("&"),l=null,a=0;a<s.length;a++)if(t==s[a].split("=")[0]){l=s[a].split("=")[1];break}break}return l?unescape(l):l},e.SetCookieValue=function(e,t,n,i){var r,o,s,a,c=document.cookie.split(";"),l=[],u=!1,d="";if(t&&0!=t.length){for(o=0;o<c.length;o++)if(c[o]=c[o].replace(/^\s+|\s+$/g,""),e==c[o].split("=")[0])for(s=c[o].substring(c[o].indexOf("=")+1,c[o].length),l=s.split("&"),a=0;a<l.length;a++)t==l[a].split("=")[0]&&(l[a]=t+"="+escape(n).replace(/\+/g,"%2b"),u=!0);u||(l.length++,l[l.length-1]=t+"="+escape(n).replace(/\+/g,"%2b"));document.cookie=e+"=; expires=Thu, 01-Jan-70 00:00:01 GMT;path=/";document.cookie=e+"="+l.join("&")+";path=/"}else r=new Date,r.setDate(r.getDate()+90),i&&(d=";domain="+i),document.cookie=e+"="+n+d+";path=/"},e.GetSessionId=function(){var t;try{t=e.GetCookieValue("pstk");/[A-F0-9]{38}/i.test(t)||(t=null)}catch(n){t=null;ErrorReporter.Trace(this,n)}return t},e.SetSessionId=function(t,n){e.SetCookieValue("pstk","",t,n)},e.SetLoginSuccess=function(t){var n=1==t?"1":"0";e.SetCookieValue("session","lgs",n)},e.SetKYCPage=function(t){e.SetCookieValue("session","kpd",t)},e}();e.CookieManager=t}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=e.TextNode,n=function(e){function n(t){return e.call(this,t)||this}return __extends(n,e),n.prototype.toString=function(){return"[Label]"},n.prototype.createChildren=function(){this._textNode=new t(this._text);this.appendChild(this._textNode)},n.prototype.commitProperties=function(){this._textChanged&&(this._textChanged=!1,this._textNode.setText(this._text))},n.prototype.setText=function(e){e!=this._text&&(this._text=e,this._textChanged=!0,this.invalidateProperties())},n.prototype.getText=function(){return this._text},n.prototype.getTooltip=function(){return this._text},n.prototype.commitText=function(e){this._textNode.setText(e)},n}(e.Component);n.SInit=function(){n.prototype._text=null;n.prototype._textChanged=!1;n.prototype._textNode=null}();__decorate([override],n.prototype,"toString");__decorate([override],n.prototype,"createChildren");__decorate([override],n.prototype,"commitProperties");__decorate([override],n.prototype,"getTooltip");e.Label=n}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t,n=(ns_gen5_data.Attribute,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.stemUpdateHandler=function(){},t.prototype.stemDeleteHandler=function(){},t.prototype.stemInsertHandler=function(){},t.prototype.detatchStem=function(){},t.prototype.recursiveDetatchStem=function(){},t}(e.Label));e.LabelStemBase_Mixin=n;e.StemBaseMixin.call(n.prototype);t=function(e){function t(t){var n=e.call(this,t)||this;return n._textChanged=!0,n}return __extends(t,e),t.prototype.toString=function(){return"[LabelStemBase]"},t.prototype.commitProperties=function(){this._textChanged&&(this._text=this.stem.data[this.stemAttributeName]||"",e.prototype.commitProperties.call(this))},t.prototype.stemUpdateHandler=function(e,t){this.stemAttributeName in t&&(this._textChanged=!0,this.invalidateProperties())},t.prototype.setStem=function(e){this.stem&&this.stem.removeDelegate(this);this.stem=e;e&&(e.addDelegate(this),this._textChanged=!0,this.invalidateProperties())},t}(n);t.SInit=function(){t.prototype.stemAttributeName="NA"}();__decorate([override],t.prototype,"toString");__decorate([override],t.prototype,"commitProperties");__decorate([override],t.prototype,"stemUpdateHandler");e.LabelStemBase=t}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=function(e){function t(){var t=e.call(this,"iframe")||this;return t.scrolling=!1,t.isIE8=function(){var e,t=navigator.userAgent.toLowerCase(),n=-1;return-1!=t.indexOf("msie")&&(e=new RegExp("msie ([0-9]{1,}[.0-9]{0,})"),e.exec(t)&&(n=parseFloat(RegExp.$1))),8==n}(),t.onloadHandler=function(){return t.onLoad()},t}return __extends(t,e),t.prototype.createChildren=function(){var e=this,t=this.getElement();t.src=this.src;t.name=this.name;t.scrolling=this.scrolling?"yes":"no";this.isIE8&&(t.frameBorder="0");t.setAttribute("allowtransparency",this.allowTransparency?"true":"false");this.setVisible(!1);t.addEventListener("load",this.onloadHandler);t.addEventListener("unload",function(){return e.executeUnload()})},t.prototype.executeUnload=function(){},t.prototype.onLoad=function(){var e=this.getElement();e.removeEventListener("load",this.onloadHandler);this.setVisible(!0)},t}(e.Component);__decorate([override],t.prototype,"createChildren");e.InlineFrame=t}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.direction=null,t}return __extends(t,e),t.prototype.toString=function(){return"[ArrowButton]"},t.prototype.createChildren=function(){this.addStyle("g5-ArrowButton");this.direction&&this.addStyle(this.direction)},t}(ns_gen5_ui.Component);t.LEFT="g5-ArrowButton_Left";t.RIGHT="g5-ArrowButton_Right";t.UP="g5-ArrowButton_Up";t.DOWN="g5-ArrowButton_Down";__decorate([override],t.prototype,"toString");__decorate([override],t.prototype,"createChildren");e.ArrowButton=t}(ns_gen5_ui_controls||(ns_gen5_ui_controls={})),function(e){var t=ns_gen5_ui.DomElement,n=e.ArrowButton,i=-1,r=1,o=function(e){function n(){var t=e.call(this)||this;return t.scrollAmmountModifier=1,t.ignoreButtonsForTravel=!1,t.fixedWidthScroll=!1,t._scrollContent=null,t._leftButton=null,t._rightButton=null,t}return __extends(n,e),n.prototype.toString=function(){return"[HorizontalScroller]"},n.prototype.createChildren=function(){var e,n,o,s=this;this.addStyle(this.baseStyle);e=this._leftButton=new this.arrowButtonType;e.direction=this.directions.LEFT;e.clickHandler=function(){return s._travel(r)};e.addStyle(this.baseStyle+"_Dis");n=this._rightButton=new this.arrowButtonType;n.direction=this.directions.RIGHT;n.clickHandler=function(){return s._travel(i)};o=new t;o.setAttribute("class",this.baseStyle+"_HScroll");this.appendChild(o);this.appendChild(e);this.appendChild(o);o.appendChild(this._scrollContent);this.appendChild(n)},n.prototype._travel=function(e,t){var n,i,r,o;this._rightButton.removeStyle(this.baseStyle+"_Dis");this._leftButton.removeStyle(this.baseStyle+"_Dis");this.buttonWidth||(this.buttonWidth=this._rightButton.getElement().clientWidth);this.ignoreButtonsForTravel&&(this.buttonWidth=0);n=this._scrollContent.getElement();i=n.clientWidth-2*this.buttonWidth;this.max_x_pos=i-n.scrollWidth;this.max_x_pos>0&&(this.max_x_pos=0);r=n.style.left||"0px";r=r.slice(0,-2);o=t||n.scrollWidth/n.children.length*this.scrollAmmountModifier;this.endPos=Number(r)+o*e;this.endPos-this.graceSpace<this.max_x_pos&&(this.endPos=this.max_x_pos,this._rightButton.addStyle(this.baseStyle+"_Dis"));this.endPos+this.graceSpace>0&&(this.endPos=0,this._leftButton.addStyle(this.baseStyle+"_Dis"));n.style.left=this.endPos+"px"},n.prototype.setScrollContent=function(e){this._scrollContent=e;this._scrollContent.addStyle(this.baseStyle+"_ScrollContent")},n}(ns_gen5_ui.Component);o.SInit=function(){o.prototype.directions=n;o.prototype.arrowButtonType=n;o.prototype.baseStyle="g5-HorizontalScroller";o.prototype.graceSpace=60}();__decorate([override],o.prototype,"toString");__decorate([override],o.prototype,"createChildren");e.HorizontalScroller=o}(ns_gen5_ui_controls||(ns_gen5_ui_controls={})),function(e){var t,n,i=ns_gen5_ui.Component,r=ns_gen5_events.EventDispatcher,o=ns_gen5_events.ModalEvent;!function(e){e[e.Low=1]="Low";e[e.Normal=2]="Normal";e[e.High=3]="High";e[e.Urgent=4]="Urgent"}(t=e.ModalPriority||(e.ModalPriority={}));n=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.modalQueue=[],t}return __extends(n,e),n.prototype.addModal=function(e,n){this.root||(this.root=this.getModalRoot());n||(n=t.Normal);this.displayingModal?n>this.displayingModal.priority?(this.modalQueue.push(this.displayingModal),this.modalQueue.push({modalComponent:e,priority:n}),this.removeModal(this.displayingModal.modalComponent)):this.modalQueue.push({modalComponent:e,priority:n}):(this.displayingModal={modalComponent:e,priority:n},this.showDarkWash(),this.root.appendChild(e));this.dispatchEvent(new o(o.MODAL_CHANGE,!0))},n.prototype.removeModal=function(e){if(this.displayingModal=null,this.darkWash.suspendElementFromDom(),this.root.removeChild(e),this.modalQueue.length>0){this.modalQueue.sort(function(e,t){return t.priority-e.priority});var t=this.modalQueue.splice(0,1)[0];this.addModal(t.modalComponent,t.priority)}else this.dispatchEvent(new o(o.MODAL_CHANGE,!1))},n.prototype.contains=function(e){if(this.displayingModal&&this.displayingModal.modalComponent==e)return!0;if(this.modalQueue&&this.modalQueue.length>0)for(var t=0;t<this.modalQueue.length;t++)if(this.modalQueue[t].modalComponent==e)return!0;return!1},n.prototype.showDarkWash=function(){this.darkWash?this.darkWash.unsuspendElementFromDom():(this.darkWash=new i,this.darkWash.addStyle(this.getWashStyle()),this.root.appendChild(this.darkWash))},n}(r);e.ModalManagerBase=n}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=1.70158,n=function(){function e(){}return e.EaseIn=function(e){return e*e*((t+1)*e-t)},e.EaseOut=function(e){return(e-=1)*e*((t+1)*e+t)+1},e.EaseInOut=function(e){return(e*=2)<1?.5*e*e*((1.525*t+1)*e-1.525*t):.5*((e-=2)*e*((1.525*t+1)*e+1.525*t)+2)},e}();e.Back=n}(ns_gen5_animation_easing||(ns_gen5_animation_easing={})),function(e){var t=function(){function e(){}return e.EaseIn=function(t){return 1-e.EaseOut(1-t)},e.EaseOut=function(e){return 1/2.75>e?7.5625*e*e:2/2.75>e?7.5625*(e-=1.5/2.75)*e+.75:2.5/2.75>e?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},e.EaseInOut=function(t){return(t*=2)<1?.5*e.EaseIn(t):.5*e.EaseOut(t-1)+.5},e}();e.Bounce=t}(ns_gen5_animation_easing||(ns_gen5_animation_easing={})),function(e){var t=1,n=.3,i=n/4,r=function(){function e(){}return e.EaseIn=function(e){return 0==e||1==e?e:-(t*Math.pow(2,10*(e-=1))*Math.sin((e-i)*2*Math.PI/n))},e.EaseOut=function(e){return 0==e||1==e?e:t*Math.pow(2,-10*e)*Math.sin((e-i)*2*Math.PI/n)+1},e.EaseInOut=function(e){return 0==e||1==e?e:(e=2*e-1,0>e?-.5*t*Math.pow(2,10*e)*Math.sin((e-1.5*i)*2*Math.PI/(1.5*n)):.5*t*Math.pow(2,-10*e)*Math.sin((e-1.5*i)*2*Math.PI/(1.5*n))+1)},e}();e.Elastic=r}(ns_gen5_animation_easing||(ns_gen5_animation_easing={})),function(e){var t=function(){function e(){}return e.EaseIn=function(e){return 0==e?0:Math.pow(2,10*(e-1))},e.EaseOut=function(e){return 1==e?1:1-Math.pow(2,-10*e)},e.EaseInOut=function(e){return 0==e||1==e?e:0>(e=2*e-1)?.5*Math.pow(2,10*e):1-.5*Math.pow(2,-10*e)},e}();e.Exponential=t}(ns_gen5_animation_easing||(ns_gen5_animation_easing={})),function(e){var t=function(){function e(){}return e.EaseNone=function(e){return e},e}();e.Linear=t}(ns_gen5_animation_easing||(ns_gen5_animation_easing={})),function(e){var t=function(){function e(){}return e.EaseIn=function(e){return e*e*e*e},e.EaseOut=function(e){return 1-(e-=1)*e*e*e},e.EaseInOut=function(e){return.5>e?8*e*e*e*e:-8*(e-=1)*e*e*e+1},e}();e.Quartic=t}(ns_gen5_animation_easing||(ns_gen5_animation_easing={})),function(e){var t=function(){function e(){}return e.EaseIn=function(e){return e*e},e.EaseOut=function(e){return-e*(e-2)},e.EaseInOut=function(e){return.5>e?2*e*e:-2*e*(e-2)-1},e}();e.Quadratic=t}(ns_gen5_animation_easing||(ns_gen5_animation_easing={})),function(e){function t(){var e,n,r;for(o=+new Date,e=0,n=a.slice();e<n.length;e++)r=n[e],r.update(o),r.getPlaying()||i(r);Locator.validationManager.processValidationCycleNow();a.length&&requestAnimationFrame(t)}function n(e){a[a.length]=e;1==a.length&&(requestAnimationFrame(t),o=+new Date);c&&(c=!1,Locator.validationManager.callPostValidation(function(){c=!0;t()}))}function i(e){var t=a.indexOf(e);t>-1&&a.splice(t,1)}function r(e,t){var n,i,r,o,s,a,c,l=e.from;return e.to instanceof Array?(o=e.to,n=o[0],s=o[1],"string"==typeof s?i=s:r=s):(n=e.to,i=""),a=l+t*(n-l),e.internal_different=a!==e.internal_previous_raw,e.internal_previous_raw=a,e.internal_different?r?(c=r(n+l===1?a:Math.round(a)),e.internal_different=c!==e.internal_previous_calc,e.internal_previous_calc=c,c):i?(c=(n+l===1?a:Math.round(a))+i,e.internal_different=c!==e.internal_previous_calc,e.internal_previous_calc=c,c):a:-0}var o,s=ns_gen5_animation_easing.Linear,a=[],c=!0,l=function(){function e(t,n,i,r){var o=this;this.element=t;this.time=n;this.params=i;this.flags=r;Locator.validationManager.callLater(function(){o.flags&e.AUTO_START_OFF||o.start()})}return e.prototype.start=function(){this.playing||(this.playing=!0,n(this),this.startTime=o)},e.prototype.pause=function(){this.playing?(this.playing=!1,i(this)):this.flags|=e.AUTO_START_OFF},e.prototype.end=function(){this.playing&&(this.playing=!1,this.update(this.startTime+this.time+1),i(this))},e.prototype.getPlaying=function(){return this.playing},e.prototype.getElement=function(){return this.element},e.prototype.then=function(t){return t.flags=(t.flags||0)|e.AUTO_START_OFF,this.next=t},e.prototype.onBegin=function(e){return this.beginCallback=e,this},e.prototype.onChange=function(e){return this.changeCallback=e,this},e.prototype.onComplete=function(e){return this.completeCallback=e,this},e.prototype.executeVoidCallback=function(e){try{e()}catch(t){ErrorReporter.Trace(this,t)}},e.prototype.executeChangeCallback=function(e){try{this.changeCallback(e)}catch(t){ErrorReporter.Trace(this,t)}},e.prototype.update=function(t){var n,i,o,a,c,l,u=(t-(this.startTime+(this.params.delay||0)))/(this.time*e.DurationModifier)||(0===this.time?1:0);if(u>=1)this.playing=!1,u=1;else if(0>u)return void(u=0);if(!this.moving&&this.playing&&(this.moving=!0,this.beginCallback&&this.executeVoidCallback(this.beginCallback)),n=(this.params.ease||s.EaseNone)(u),i=this.params,i.attribute)for(o in i.attribute)a=i.attribute[o],c=r(a,n)+"",a.internal_different&&this.element.setAttribute(o,c);if(i.style){l=this.element.getElement().style;for(o in i.style)a=i.style[o],c=r(a,n)+"",a.internal_different&&(l[o]=c)}if(i.property)for(o in i.property)a=i.property[o],c=r(a,n),a.internal_different&&("function"==typeof this.element[o]?this.element[o](c):this.element[o]=c);this.changeCallback&&this.executeChangeCallback(n);this.playing||(this.completeCallback&&this.executeVoidCallback(this.completeCallback),this.next&&(this.next.start(),this.next=null))},e}();l.DurationModifier=1;l.AUTO_START_OFF=1;l.SInit=function(){l.prototype.playing=!1;l.prototype.moving=!1;l.prototype.startTime=0;l.prototype.next=null;l.prototype.element=null;l.prototype.time=0;l.prototype.params=null;l.prototype.flags=0;l.prototype.beginCallback=null;l.prototype.changeCallback=null;l.prototype.completeCallback=null}();e.Tween=l}(ns_gen5_animation||(ns_gen5_animation={})),function(e){var t=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t}(ns_gen5_events.Event365);t.CONNECTED="connected";t.DISCONNECTED="disconnected";t.CONNECTION_FAILED="connectionFailed";t.CONNECTION_FAILED_INVALID_SESSION="connectionFailedInvalidSession";e.ReaditConnectionEvent=t}(readit||(readit={})),function(){}(readit||(readit={})),function(e){var t=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t}(ns_gen5_events.Event365);t.CONNECTED="connected";t.DISCONNECTED="disconnected";t.CONNECTION_FAILED="connectionFailed";t.PULL_ENABLED="pullEnabled";t.PULL_DISABLED="pullDisabled";t.PULL_DATA_RECEIVED="pullDataReceived";t.PULL_REQUEST_FAILED="pullRequestFailed";t.CONNECTION_FAILED_INVALID_SESSION="connectionFailedInvalidSession";e.TransportConnectionEvent=t}(readit||(readit={})),function(e){var t=function(e){function t(t,n){var i=e.call(this,t)||this;return i.message=n,i}return __extends(t,e),t.prototype.toString=function(){return"[ReaditMessageEvent type="+this.type+" message="+this.message+"]"},t}(ns_gen5_events.Event365);t.MESSAGE_RECEIVED="messageReceived";__decorate([override],t.prototype,"toString");e.ReaditMessageEvent=t}(readit||(readit={})),function(e){var t=function(){function t(e,t,n,i){this.messageType=e;this.topic=t;this.message=n;this.userHeaders=i}return t.prototype.toString=function(){return"[ReaditMessage messageType="+this.messageType+" message="+this.message+" topic="+this.topic+"]"},t.prototype.getMessage=function(){return this.message},t.prototype.getTopic=function(){return this.topic},t.prototype.getBaseTopic=function(){return this.topic.substr(this.topic.lastIndexOf("/")+1,this.topic.length)},t.prototype.getUserHeaders=function(){return this.userHeaders},t.prototype.isInitialTopicLoad=function(){return this.messageType===e.StandardProtocolConstants.INITIAL_TOPIC_LOAD},t}();e.ReaditMessage=t}(readit||(readit={})),function(e){var t;!function(e){e[e.DISCONNECTED=0]="DISCONNECTED";e[e.PENDING=1]="PENDING";e[e.CONNECTED=2]="CONNECTED"}(t=e.ReaditConnectionStatus||(e.ReaditConnectionStatus={}));e.StandardProtocolConstants={RECORD_DELIM:"\x01",FIELD_DELIM:"\x02",HANDSHAKE_MESSAGE_DELIM:"\x03",MESSAGE_DELIM:"\b",CLIENT_CONNECT:0,CLIENT_POLL:1,CLIENT_SEND:2,CLIENT_CONNECT_FAST:3,INITIAL_TOPIC_LOAD:20,DELTA:21,CLIENT_SUBSCRIBE:22,CLIENT_UNSUBSCRIBE:23,CLIENT_SWAP_SUBSCRIPTIONS:26,NONE_ENCODING:0,ENCRYPTED_ENCODING:17,COMPRESSED_ENCODING:18,BASE64_ENCODING:19,SERVER_PING:24,CLIENT_PING:25,CLIENT_ABORT:28,CLIENT_CLOSE:29,ACK_ITL:30,ACK_DELTA:31,ACK_RESPONSE:32}}(readit||(readit={})),function(e){var t,n=ns_gen5_util.Delegate,i=e.TransportConnectionEvent,r=e.ReaditConnectionEvent,o=e.ReaditConnectionStatus;e.ReadItLog=new function(){var e=ns_gen5_util.LogEntry;this._enabled=!0;this._log=[];this.getLog=function(){return this._log};this.Log=function(t){if(this._log.push(new e(t)),this._enabled)try{var n=new Date;$log(n.getHours()+":"+n.getMinutes()+":"+n.getSeconds()+"."+n.getMilliseconds()+" -> "+t)}catch(i){}};this.SetEnabled=function(e){this._enabled=e}};e.pushConnectionStatusEnum={ATTEMPTINGCONNECTION:1,CONNECTED:2,FIRSTATTEMPTFAILED:3,ALLRETRYSFAILED:4,DISCONNECTED:5,DELTA:6,PULL_FALLBACK_ENABLED:7,PULL_FALLBACK_DISABLED:8,PULL_FALLBACK_DATA_RECEIVED:9,PULL_FALLBACK_REQUEST_FAILED:10};e.ReaditFlags={SEND_CLOSE:1};t=function(t){function s(){var e=t.call(this)||this;return e._connectionListStart=null,e._connectionListEnd=null,e._currentConnectionDetails=null,e._currentTransportMethod=null,e._connectionStatus=o.DISCONNECTED,e._connectionCycleAttempts=0,e.connectionListCycles=0,e.pushStatusHandler=null,e.storageId=null,e.delegate_transportConnectedHandler=new n(e,e.transportConnectedHandler),e.delegate_transportConnectionFailedHandler=new n(e,e.transportConnectionFailedHandler),e.delegate_transportDisconnectedHandler=new n(e,e.transportDisconnectedHandler),e.delegate_transportConnectionFailedInvalidSessionHandler=new n(e,e.transportConnectionFailedInvalidSessionHandler),"LongPollStatusHandler"in window?e.pushStatusHandler=new LongPollStatusHandler:"bet365"in window&&"pushStatus"in window.bet365&&(e.pushStatusHandler=new window.bet365.pushStatus.longPollStatus.LongPollStatusHandler),e}return __extends(s,t),s.prototype.toString=function(){return"[ReaditClient]"},s.prototype.addConnectionAttempt=function(e){this._connectionListStart?(this._connectionListEnd.next=e,this._connectionListEnd=e):this._connectionListStart=this._connectionListEnd=e},s.prototype.connect=function(){this._connectionStatus==o.DISCONNECTED&&(this._connectionStatus=o.PENDING,this._connectionCycleAttempts=0,this._currentConnectionDetails=this._connectionListEnd,this.connectToNext())},s.prototype.close=function(e){if(this._currentTransportMethod){var t=this._currentTransportMethod;this.disposeCurrentTransportMethod();t.close(e)}this._connectionStatus=o.DISCONNECTED},s.prototype.connectToNext=function(){if(!Locator.config.hasSessionExpired()){if(!this._currentConnectionDetails||!(this._currentConnectionDetails=this._currentConnectionDetails.next)){if(this.connectionListCycles>0&&this._connectionCycleAttempts++==this.connectionListCycles)return e.ReadItLog.Log("Transport connection cycles completed, connection failed"),this.close(),void this.dispatchEvent(new r(e.ReaditConnectionEvent.CONNECTION_FAILED));this._currentConnectionDetails=this._connectionListStart}this.disposeCurrentTransportMethod();this._currentTransportMethod=new this._currentConnectionDetails.transportMethod;this._currentTransportMethod.addEventListener(i.CONNECTED,this.delegate_transportConnectedHandler);this._currentTransportMethod.addEventListener(i.CONNECTION_FAILED,this.delegate_transportConnectionFailedHandler);this._currentTransportMethod.addEventListener(i.DISCONNECTED,this.delegate_transportDisconnectedHandler);this._currentTransportMethod.addEventListener(i.CONNECTION_FAILED_INVALID_SESSION,this.delegate_transportConnectionFailedInvalidSessionHandler);this._currentTransportMethod.setConnectionDetails(this._currentConnectionDetails);this._currentTransportMethod.setMessageDispatcher(this);this.logPushStatus(String(e.pushConnectionStatusEnum.ATTEMPTINGCONNECTION),this.getCurrentConnectionHost());this._currentTransportMethod.storageId=this.storageId;this._currentTransportMethod.connect()}},s.prototype.disposeCurrentTransportMethod=function(){this._currentTransportMethod&&(this._currentTransportMethod.removeEventListener(i.CONNECTED,this.delegate_transportConnectedHandler),this._currentTransportMethod.removeEventListener(i.CONNECTION_FAILED,this.delegate_transportConnectionFailedHandler),this._currentTransportMethod.removeEventListener(i.DISCONNECTED,this.delegate_transportDisconnectedHandler),this._currentTransportMethod.removeEventListener(i.CONNECTION_FAILED_INVALID_SESSION,this.delegate_transportConnectionFailedInvalidSessionHandler),this._currentTransportMethod=null)},s.prototype.subscribe=function(e){if(this._connectionStatus==o.CONNECTED)try{this._currentTransportMethod.subscribe(e)}catch(t){ErrorReporter.Trace(this,t)}},s.prototype.unsubscribe=function(e){if(this._connectionStatus==o.CONNECTED)try{this._currentTransportMethod.unsubscribe(e)}catch(t){ErrorReporter.Trace(this,t)}},s.prototype.send=function(e,t){this._connectionStatus==o.CONNECTED&&this._currentTransportMethod.send(e,t)},s.prototype.swapSubscription=function(e,t){if(this._connectionStatus==o.CONNECTED)try{this._currentTransportMethod.swapSubscription(e,t)}catch(n){ErrorReporter.Trace(this,n)}},s.prototype.getConnectionID=function(){return this._connectionStatus==o.CONNECTED?this._currentTransportMethod.getConnectionId():null},s.prototype.getConnected=function(){return this._connectionStatus==o.CONNECTED},s.prototype.getConnectionStatus=function(){return this._connectionStatus},s.prototype.getTransportSuspended=function(){return this._currentTransportMethod&&this._currentTransportMethod.suspended},s.prototype.getCurrentConnectionHost=function(){return this._currentConnectionDetails?this._currentConnectionDetails.host:this._connectionListEnd.host},s.prototype.getCurrentConnectionDetails=function(){return this._currentTransportMethod.getConnectionDetails()},s.prototype.logPushStatus=function(e,t){try{this.pushStatusHandler&&this.pushStatusHandler.log(e,0,t)}catch(n){}},s.prototype.transportConnectedHandler=function(){this._connectionStatus=o.CONNECTED;this.logPushStatus(String(e.pushConnectionStatusEnum.CONNECTED),this.getCurrentConnectionHost());this.dispatchEvent(new r(e.ReaditConnectionEvent.CONNECTED))},s.prototype.transportConnectionFailedHandler=function(){this.logPushStatus(String(e.pushConnectionStatusEnum.DISCONNECTED),this.getCurrentConnectionHost());this.connectToNext()},s.prototype.transportDisconnectedHandler=function(){this.close();this.logPushStatus(String(e.pushConnectionStatusEnum.DISCONNECTED),this.getCurrentConnectionHost());this.dispatchEvent(new r(e.ReaditConnectionEvent.DISCONNECTED))},s.prototype.transportConnectionFailedInvalidSessionHandler=function(){this.close();this.dispatchEvent(new r(e.ReaditConnectionEvent.CONNECTION_FAILED_INVALID_SESSION))},s}(ns_gen5_events.EventDispatcher);__decorate([override],t.prototype,"toString");e.ReaditClient=t}(readit||(readit={})),function(e){var t=ns_gen5_util.Delegate,n=e.ReaditConnectionStatus,i=e.TransportConnectionEvent,r=function(r){function o(){var e=r.call(this)||this;return e.delegate_transportPullEnabledHandler=new t(e,e._transportPullEnabledHandler),e.delegate_transportPullDisabledHandler=new t(e,e._transportPullDisabledHandler),e.delegate_transportPullDataReceivedHandler=new t(e,e._transportPullDataReceivedHandler),e.delegate_transportPullRequestFailedHandler=new t(e,e._transportPullRequestFailedHandler),e}return __extends(o,r),o.prototype.toString=function(){return"[ReadItFallbackClient]"},o.prototype.connectToNext=function(){null===this._currentTransportMethod?(r.prototype.connectToNext.call(this),this._currentTransportMethod.addEventListener(i.PULL_ENABLED,this.delegate_transportPullEnabledHandler),this._currentTransportMethod.addEventListener(i.PULL_DISABLED,this.delegate_transportPullDisabledHandler),this._currentTransportMethod.addEventListener(i.PULL_DATA_RECEIVED,this.delegate_transportPullDataReceivedHandler),this._currentTransportMethod.addEventListener(i.PULL_REQUEST_FAILED,this.delegate_transportPullRequestFailedHandler)):this._currentTransportMethod.connect()},o.prototype.connect=function(){this._connectionStatus=n.CONNECTED;this._connectionCycleAttempts=0;this._currentConnectionDetails=this._connectionListEnd;this.connectToNext()},o.prototype.close=function(){},o.prototype.pause=function(){this._currentTransportMethod&&this._currentTransportMethod.pause()},o.prototype.resume=function(){this._currentTransportMethod&&this._currentTransportMethod.resume()},o.prototype.updatePollTime=function(e){this._currentTransportMethod&&this._currentTransportMethod.updatePollDelay(e)},o.prototype.disableSubscription=function(e){if(this._connectionStatus==n.CONNECTED)try{this._currentTransportMethod.disableSubscription(e)}catch(t){ErrorReporter.Trace(this,t)}},o.prototype.disposeCurrentTransportMethod=function(){},o.prototype.logPushStatus=function(t,n){switch(t){case e.pushConnectionStatusEnum.PULL_FALLBACK_ENABLED:case e.pushConnectionStatusEnum.PULL_FALLBACK_DISABLED:case e.pushConnectionStatusEnum.PULL_FALLBACK_DATA_RECEIVED:case e.pushConnectionStatusEnum.PULL_FALLBACK_REQUEST_FAILED:r.prototype.logPushStatus.call(this,t,n)}},o.prototype.getCurrentConnectionHost=function(){return this._currentConnectionDetails?window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+this._currentConnectionDetails.path+"pt"+this._currentConnectionDetails.partition:""},o.prototype._transportPullEnabledHandler=function(){this.logPushStatus(e.pushConnectionStatusEnum.PULL_FALLBACK_ENABLED,this.getCurrentConnectionHost())},o.prototype._transportPullDisabledHandler=function(){this.logPushStatus(e.pushConnectionStatusEnum.PULL_FALLBACK_DISABLED,this.getCurrentConnectionHost())},o.prototype._transportPullDataReceivedHandler=function(){this.logPushStatus(e.pushConnectionStatusEnum.PULL_FALLBACK_DATA_RECEIVED,this.getCurrentConnectionHost());this.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.PULL_DATA_RECEIVED))},o.prototype._transportPullRequestFailedHandler=function(){this.logPushStatus(e.pushConnectionStatusEnum.PULL_FALLBACK_REQUEST_FAILED,this.getCurrentConnectionHost());this.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.PULL_REQUEST_FAILED))},o}(e.ReaditClient);__decorate([override],r.prototype,"toString");__decorate([override],r.prototype,"connectToNext");__decorate([override],r.prototype,"connect");__decorate([override],r.prototype,"close");__decorate([override],r.prototype,"disposeCurrentTransportMethod");__decorate([override],r.prototype,"logPushStatus");__decorate([override],r.prototype,"getCurrentConnectionHost");e.ReaditFallbackClient=r}(readit||(readit={})),function(e){var t=function(){function e(e,t,n,i,r){this.host=e;this.port=t;this.transportMethodId=n;this.defaultTopic=i;this.uid=r;this.next=null}return e.prototype.toString=function(){return"[host:"+this.host+", port:"+this.port+", topic:"+this.defaultTopic+"]"},e}();e.ReaditConnectionDetails=t}(readit||(readit={})),function(e){var t=function(e){function t(t,n,i,r,o){var s=e.call(this,"","",i,o,"")||this;return s.path=t,s.interval=n,s.transportMethodId=i,s.partition=r,s.defaultTopic=o,s.next=null,s}return __extends(t,e),t.prototype.toString=function(){return"[ReaditFallbackConnectionDetails path:"+this.path+", interval:"+this.interval+", partition:"+this.partition+"]"},t}(e.ReaditConnectionDetails);__decorate([override],t.prototype,"toString");e.ReaditFallbackConnectionDetails=t}(readit||(readit={})),function(e){"use strict";var t=0,n=1,i=3,r=4,o=function(){function e(){var e=this;this.xdr=new XDomainRequest;this.xdr.timeout=6e4;this.status=0;this.readyState=t;this.responseText=null;this.contentType=null;this.onreadystatechange=null;this.progress_delegate=function(){return e._progress()};this.onload_delegate=function(){return e._onload()};this.onerror_delegate=function(){return e._onerror()};this.ontimeout_delegate=function(){return e._timeout()}}return e.TryCreate=function(t){return"withCredentials"in t||!XDomainRequest?t:new e},e.prototype._progress=function(){this.readyState=i;this.onreadystatechange&&this.onreadystatechange.call(this)},e.prototype._timeout=function(){this.readyState=r;this.status=0;this.responseText=null;this.contentType=null;this.xdr.onload=this.xdr.onerror=this.xdr.ontimeout=function(){};this.xdr=void 0;this.onreadystatechange&&this.onreadystatechange.call(this)},e.prototype._onerror=function(){this.readyState=r;this.status=0;this.responseText=null;this.contentType=null;this.xdr.onload=this.xdr.onerror=this.xdr.ontimeout=function(){};this.xdr=void 0;this.onreadystatechange&&this.onreadystatechange.call(this)},e.prototype._onload=function(){this.readyState=r;this.status=200;this.responseText=this.xdr.responseText;this.contentType=this.xdr.contentType;this.xdr.onload=this.xdr.onerror=this.xdr.ontimeout=function(){};this.xdr=void 0;this.onreadystatechange&&this.onreadystatechange.call(this)},e.prototype.open=function(e,t){var i=null;try{i=this.xdr.open(e,t)}catch(r){throw{name:r.name,message:r.message,number:r.number};}return this.xdr.onprogress=this.progress_delegate,this.xdr.ontimeout=this.ontimeout_delegate,this.xdr.onerror=this.onerror_delegate,this.xdr.onload=this.onload_delegate,this.readyState=n,this.onreadystatechange&&this.onreadystatechange.call(this),i},e.prototype.send=function(e){this.xdr.send(e)},e.prototype.abort=function(){return this.readyState=t,this.onreadystatechange=null,this.xdr.abort()},e}();e.XDomainXMLHttpRequest=o}(readit||(readit={})),function(e){var t=ns_gen5_ui.Application,n=ns_gen5_events.ApplicationEvent,i=ns_gen5_util.Delegate,r=ns_gen5_util.CookieManager,o={L:"1",M:"2",I:"3"},s=function(s){function a(){var e=s.call(this)||this;return e._poller=null,e._messageDispatcher=null,e._connectionTimeout=0,e._url="",e._requestActive=!1,e._requestQueue=[],e._connectionID="",e._sID="",e._sequence=0,e._connected=!1,e._hasNativeXmlHttp=!1,e._transportIsSupported=e.checkXmlHttpAvailable(),e._activeXVersion=null,e.instanceid=a.count++,e.suspended=!1,e.storageId=null,e.TRAILING="/pow2/",e.CONNECTION_TIMEOUT_LIMIT=15e3,e.PUBLISHER_SESSION_TIMEOUT=9e4,e.TRANSPORT_TIMEOUT=20,e._delegate_resume=new i(e,e._resume),e}return __extends(a,s),a.prototype.toString=function(){return"[HttpTransportMethod]"},a.prototype.connect=function(){var t,n,i,o,s,a=this;if(this._transportIsSupported){this._connectionTimeout=setTimeout(function(){a.connectionFailed("timeout after "+a.CONNECTION_TIMEOUT_LIMIT+"ms")},this.CONNECTION_TIMEOUT_LIMIT);try{s=this.retrieve();this._connectionID=s[0];this._connectionTimeStamp=s[1];this._url=this._connectionDetails.host+":"+this._connectionDetails.port+this.TRAILING;this.log("Attempting connection to "+this._url);t=r.GetSessionId();null==t?this.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.CONNECTION_FAILED_INVALID_SESSION)):(n=function(){var n=a.getRequest({method:e.StandardProtocolConstants.CLIENT_CONNECT,transporttimeout:a.TRANSPORT_TIMEOUT,type:"F",topic:a._connectionDetails.defaultTopic+",S_"+t});a.log("Connecting with:"+n);n.onreadystatechange=function(){var t,i,r,o;4==n.readyState&&(clearTimeout(a._connectionTimeout),200==n.status?(t=n.responseText.split(e.StandardProtocolConstants.HANDSHAKE_MESSAGE_DELIM),i=t[0],r=i.split("\x02"),"100"==r[0]&&(a.handshakeHandler(r[1]),o=t[1],o&&a.processMessage(o)),"111"==r[0]&&a.connectionFailed("connection rejected 111")):a.connectionFailed("Connection Rejected - Invalid response status:"+n.status),n.onreadystatechange=null)};n.send(n.params||"")},!this.storageId||!this._connectionID||!this._connectionTimeStamp||(new Date).getTime()-this._connectionTimeStamp>this.PUBLISHER_SESSION_TIMEOUT?n():(this.clear(),i=!1,o=this.getRequest({method:e.StandardProtocolConstants.CLIENT_CLOSE,s:this._sequence++}),o.onreadystatechange=function(){i||4!==o.readyState||(i=!0,o.onreadystatechange=null,n())},o.send("")))}catch(c){clearTimeout(this._connectionTimeout);this.connectionFailed("Unable to open Socket.")}}else this.connectionFailed("XML Http Transport not supported.")},a.prototype.subscribe=function(t){this.put(this.getRequest({method:e.StandardProtocolConstants.CLIENT_SUBSCRIBE,topic:t,s:this._sequence++}))},a.prototype.unsubscribe=function(t){this.put(this.getRequest({method:e.StandardProtocolConstants.CLIENT_UNSUBSCRIBE,topic:t,s:this._sequence++}))},a.prototype.send=function(t,n){this.put(this.getRequest({method:e.StandardProtocolConstants.CLIENT_SEND,data:encodeURIComponent(n),topic:t,s:this._sequence++}))},a.prototype.swapSubscription=function(t,n){this.put(this.getRequest({method:e.StandardProtocolConstants.CLIENT_SWAP_SUBSCRIPTIONS,subs:t,unsubs:n,s:this._sequence++}))},a.prototype.close=function(t){t&e.ReaditFlags.SEND_CLOSE&&(this.put(this.getRequest({method:e.StandardProtocolConstants.CLIENT_CLOSE,s:this._sequence++})),this.clear());this.dispose();this.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.DISCONNECTED))},a.prototype.setMessageDispatcher=function(e){this._messageDispatcher=e},a.prototype.getConnectionDetails=function(){return this._connectionDetails},a.prototype.setConnectionDetails=function(e){this._connectionDetails=e},a.prototype.getConnected=function(){return this._connected},a.prototype.connectionFailed=function(t){this.log("http connection ("+this.instanceid+", "+this._connectionDetails+") failed - "+t);var n=this._connected;this.dispose();n?this.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.DISCONNECTED)):this.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.CONNECTION_FAILED))},a.prototype.getRequest=function(t){var n,i,r;n=this._hasNativeXmlHttp?e.XDomainXMLHttpRequest.TryCreate(new XMLHttpRequest):new ActiveXObject(this._activeXVersion);try{n.open("POST",this._url+(this._connectionID?"?id="+this._connectionID:""));this._connectionID&&(t.clientid=this._connectionID);i="";n.setRequestHeader&&n.setRequestHeader("Content-Type","text/plain");for(r in t)i+=(i.length>0?"&":"")+r+"="+encodeURIComponent(t[r]);return n.params=i,n}catch(o){ErrorReporter.Trace(this,o)}return null},a.prototype.put=function(e){var t,n=this;null!==e&&this._requestQueue.push(e);this._requestActive||this.suspended||""===this._connectionID||this._requestQueue.length>0&&(t=this._requestQueue.shift(),this._requestActive=!0,t.onreadystatechange=function(){4==t.readyState&&(200==t.status&&t.responseText?n.processMessage(t.responseText):200!=t.status&&n.connectionFailed("Connection lost during put."),n.queuedRequestCompleteHandler(),t.onreadystatechange=null)},"params"in t?t.send(t.params||""):t.send(""))},a.prototype.poll=function(){var i=this;this._connected&&(a.SuspendOnFocusLost&&t.currentApplication&&t.currentApplication.suspended?this.suspended||($log("suspend"),this.suspended=!0,t.currentApplication.addEventListener(n.FOCUS_IN,this._delegate_resume)):(this._poller=this.getRequest({method:e.StandardProtocolConstants.CLIENT_POLL,s:this._sequence++,topic:""}),this._poller.complete=!1,this._poller.onreadystatechange=function(){4!=i._poller.readyState||i._poller.complete||(i._poller.complete=!0,i._poller.onreadystatechange=null,200==i._poller.status?i.pollerCompleteHandler(i._poller.responseText):i._connected&&i.connectionFailed('Connection lost during poll statusCode:"'+i._poller.status+'" statusText:"'+i._poller.statusText+'"'))},"params"in this._poller?this._poller.send(this._poller.params||""):this._poller.send("")))},a.prototype.save=function(){this.storageId&&this._connectionID&&window.safeSessionStorage.setItem(this.storageId,this._connectionID+"|"+(this._connectionTimeStamp=(new Date).getTime()))},a.prototype.clear=function(){this.storageId&&window.safeSessionStorage.setItem(this.storageId,"")},a.prototype.retrieve=function(){var e,t,n,i;return this.storageId&&(e=window.safeSessionStorage.getItem(this.storageId))?(t=e.split("|"),n=t[0],i=t[1],[n,Number(i)]):[null,null]},a.prototype._resume=function(){$log("resume");t.currentApplication.removeEventListener(n.FOCUS_IN,this._delegate_resume);this.suspended=!1;this.poll();this._requestQueue.length>0&&this.put(null)},a.prototype.dispose=function(){if(this._connected=!1,this._connectionTimeStamp=null,this._connectionID=null,this._poller){try{this._poller.abort()}catch(e){}this._poller.onreadystatechange=null;this._poller=null}this._messageDispatcher=null;clearTimeout(this._connectionTimeout)},a.prototype.checkXmlHttpAvailable=function(){try{return new XMLHttpRequest,this._hasNativeXmlHttp=!0,!0}catch(e){}return!1},a.prototype.getConnectionId=function(){return this._connected?this._connectionID:""},a.prototype.log=function(t){e.ReadItLog.Log(this+" -> "+t)},a.prototype.handshakeHandler=function(t){this._requestActive=!1;this._connectionID=t;this._connectionDetails.connectionID=t;this.save();this._sID=t?o[t.charAt(0).toUpperCase()]||"0":"0";this._connected=!0;this.log(this.instanceid+" connected as "+this._connectionID+". "+this._connectionDetails);this.poll();this.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.CONNECTED))},a.prototype.processMessage=function(t){var n,i,r,o,s,a,c,l;if(this.save(),t){n=t.split(e.StandardProtocolConstants.MESSAGE_DELIM);do switch(i=n.shift(),r=i.charCodeAt(0)){case e.StandardProtocolConstants.INITIAL_TOPIC_LOAD:case e.StandardProtocolConstants.DELTA:o=i.split(e.StandardProtocolConstants.RECORD_DELIM);s=o[0].split(e.StandardProtocolConstants.FIELD_DELIM);a=s.shift();c=a.substr(1,a.length);l=i.substr(o[0].length+1);null!==this._messageDispatcher&&this._messageDispatcher.dispatchEvent(new e.ReaditMessageEvent(e.ReaditMessageEvent.MESSAGE_RECEIVED,new e.ReaditMessage(String(r),c,l,s)));break;case e.StandardProtocolConstants.CLIENT_ABORT:case e.StandardProtocolConstants.CLIENT_CLOSE:this.connectionFailed("Connection close/abort during poll.")}while(n.length)}},a.prototype.pollerCompleteHandler=function(e){var t=this;this.processMessage(e);this._connected&&setTimeout(function(){t.poll()},a.pollDelay)},a.prototype.queuedRequestCompleteHandler=function(){this._requestActive=!1;this._requestQueue.length&&this.put(null)},a.prototype.getTransportSuspended=function(){return this.suspended},a}(ns_gen5_events.EventDispatcher);s.SuspendOnFocusLost=!0;s.pollDelay=10;s.count=0;__decorate([override],s.prototype,"toString");e.HttpTransportMethod=s}(readit||(readit={})),function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.TRAILING="/pow/",t}return __extends(t,e),t.IsSupported=function(){if(t._isSupported===!1){var e=new XMLHttpRequest;t._isSupported=e&&"withCredentials"in e}return t._isSupported},t.prototype.toString=function(){return"[HttpTransportMethodLegacy]"},t.prototype.getRequest=function(e){var t,n;t=this._hasNativeXmlHttp?new XMLHttpRequest:new ActiveXObject(this._activeXVersion);try{t.open("POST",this._url+"?sid="+(this._sID||"0")+"&rn="+(this._connectionDetails.uid||"yyy"),!0);"undefined"!=typeof this._connectionID&&(e.clientid=this._connectionID);e["Content-Type"]="text/plain";e["Accept-Language"]=" ";for(n in e)t.setRequestHeader(n,e[n]);return t}catch(i){ErrorReporter.Trace(this,i)}return null},t}(e.HttpTransportMethod);t._isSupported=!1;__decorate([override],t.prototype,"toString");__decorate([override],t.prototype,"getRequest");e.HttpTransportMethodLegacy=t}(readit||(readit={})),function(e){var t=ns_gen5_ui.Application,n=ns_gen5_events.ApplicationEvent,i=7e3,r=function(r){function o(){var e=r.call(this)||this;return e.pollDelay=i,e.paused=!0,e._subscribedTopics=null,e._requestedTopics=[],e._pollerTimer=null,e._enabledTopicCount=0,e._lastError=null,e.TRAILING="?",e._subscribedTopics={},e}return __extends(o,r),o.prototype.toString=function(){return"[HttpTransportMethodPolling]"},o.prototype.getRequest=function(e){var t,n,i;t=this._hasNativeXmlHttp?new XMLHttpRequest:new ActiveXObject(this._activeXVersion);try{n=this._url;for(i in e)n+=i+"="+encodeURIComponent(e[i])+"&";return n=n.substr(0,n.length-1),t.open("GET",n,!0),t}catch(r){ErrorReporter.Trace(this,r)}return null},o.prototype.connect=function(){this._url=this._connectionDetails.path+this.TRAILING;this._connected=!0;this.log("Enabled polling from "+this._url+", poll delay: "+this.pollDelay);for(var t in this._subscribedTopics)this._subscribedTopics[t]&&(this._subscribedTopics[t].enabled=!0,this._enabledTopicCount++);null===this._pollerTimer&&this.poll();this.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.CONNECTED));this._enabledTopicCount>0&&this.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.PULL_ENABLED))},o.prototype.close=function(){this._connected=!1;this.log("Disabled polling from "+this._url);this.cancelPoll()},o.prototype.pause=function(){this.paused=!0},o.prototype.resume=function(){this.paused&&(this.paused=!1,this.connect(),this.poll())},o.prototype.put=function(){},o.prototype.poll=function(i){var r,o,s=this;if(this._connected&&!this.paused)if(t.currentApplication&&t.currentApplication.suspended)this.suspended||(this.suspended=!0,t.currentApplication.addEventListener(n.FOCUS_IN,this._delegate_resume));else{if(this.cancelPoll(),r=void 0,i?(r=i,this._connectionDetails.defaultTopic&&(r+=";"+this._connectionDetails.defaultTopic)):r=this._getTopicList(),0===r.length)return;o={pt:this._connectionDetails.partition,tl:r};Locator.user.countryGroupId&&"0"!==Locator.user.countryGroupId&&(o.cg=Locator.user.countryGroupId);Locator.user.countryStateId&&"0"!==Locator.user.countryStateId&&(o.cs=Locator.user.countryStateId);Locator.user.countryId&&"0"!==Locator.user.countryId&&(o.ci=Locator.user.countryId);this._poller=this.getRequest(o);this._poller.complete=!1;this._poller.onreadystatechange=function(){4!=s._poller.readyState||s._poller.complete||(s._poller.complete=!0,s._poller.onreadystatechange=null,200==s._poller.status?(s.pollerCompleteHandler(s._poller.responseText),s._poller=null):400===s._poller.status?s.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.CONNECTION_FAILED_INVALID_SESSION)):s._connected&&s.connectionFailed('Connection lost during poll statusCode:"'+s._poller.status+'" statusText:"'+s._poller.statusText+'"'))};this._poller.send("")}},o.prototype.subscribe=function(t){for(var i,r=this,o=t.split(","),s=o.length,n=0;s>n;n++)i=o[n],i=i.replace(/\/\/$/,""),i=i.substr(i.lastIndexOf("/")+1,i.length),-1==this._requestedTopics.indexOf(i)&&this._requestedTopics.push(i),this._subscribedTopics[i]||(this._subscribedTopics[i]={receivedCount:0,enabled:!0},this._enabledTopicCount++,1===this._enabledTopicCount&&this.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.PULL_ENABLED)));0!=this._requestedTopics.length&&Locator.validationManager.callLater(function(){return r.poll(r._requestedTopics.join(";"))})},o.prototype.unsubscribe=function(e){for(var n,i=e.split(","),r=i.length,t=0;r>t;t++)n=i[t],n=n.substr(n.lastIndexOf("/")+1,n.length),this.disableSubscription(n),this._subscribedTopics[n]&&delete this._subscribedTopics[n]},o.prototype.disableSubscription=function(t){t=t.substr(t.lastIndexOf("/")+1,t.length);this._subscribedTopics[t]&&this._subscribedTopics[t].enabled&&(this._subscribedTopics[t].enabled=!1,this._enabledTopicCount--,0===this._enabledTopicCount&&this.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.PULL_DISABLED)))},o.prototype.connectionFailed=function(t){this.log("Error Polling "+this._url+"  - "+t);null===this._lastError&&(this._lastError=t,this.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.PULL_REQUEST_FAILED)));this.queueNextPoll()},o.prototype.pollerCompleteHandler=function(e){this.processMessage(e);this.queueNextPoll()},o.prototype.queueNextPoll=function(){if(this._connected){this.cancelPoll();var e=this;this._pollerTimer=setTimeout(function(){e.poll()},this.pollDelay)}},o.prototype.cancelPoll=function(){if(this._poller&&!this._poller.complete){this._poller.onreadystatechange=null;try{this._poller.abort()}catch(e){}this._poller=null}this._pollerTimer&&(clearTimeout(this._pollerTimer),this._pollerTimer=null)},o.prototype.updatePollDelay=function(e){e!==this.pollDelay&&(this.pollDelay=e&&e>=4e3?e:4e3,this.queueNextPoll())},o.prototype.processMessage=function(t){var n,i,r,o,s,a,c,l,u,d;if(t){i=t.split(e.StandardProtocolConstants.MESSAGE_DELIM);do switch(r=i.shift(),o=String(r.charCodeAt(0))){case String(e.StandardProtocolConstants.INITIAL_TOPIC_LOAD):s=r.split(e.StandardProtocolConstants.RECORD_DELIM);a=s[0].split(e.StandardProtocolConstants.FIELD_DELIM);c=a.shift();l=c.substr(1,c.length);u=r.substr(s[0].length+1);"EMPTY"===l&&(d=u.match(/TO=(.*);/),d.length>1&&this.disableSubscription(d[1]));n=l.substr(l.lastIndexOf("/")+1,l.length);(this._subscribedTopics[n]&&this._subscribedTopics[n].enabled||l===this._connectionDetails.defaultTopic||"EMPTY"===l)&&(this._requestedTopics.indexOf(n)>=0&&this._requestedTopics.splice(this._requestedTopics.indexOf(n),1),this._subscribedTopics[n]&&this._subscribedTopics[n].receivedCount++,null!==this._messageDispatcher&&this._messageDispatcher.dispatchEvent(new e.ReaditMessageEvent(e.ReaditMessageEvent.MESSAGE_RECEIVED,new e.ReaditMessage(o,l,u,a))),this._subscribedTopics[n]&&1===this._subscribedTopics[n].receivedCount&&this.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.PULL_DATA_RECEIVED)))}while(i.length)}},o.prototype._getTopicList=function(){var e,t,n="",i=[];for(e in this._subscribedTopics)this._subscribedTopics[e]&&this._subscribedTopics[e].enabled&&i.push(e);if(i.length>0){this._connectionDetails.defaultTopic&&i.push(this._connectionDetails.defaultTopic);i.sort();for(t in i)n+=i[t]+";";n=n.substr(0,n.length-1)}return n},o}(e.HttpTransportMethod);__decorate([override],r.prototype,"toString");__decorate([override],r.prototype,"getRequest");__decorate([override],r.prototype,"connect");__decorate([override],r.prototype,"close");__decorate([override],r.prototype,"put");__decorate([override],r.prototype,"poll");__decorate([override],r.prototype,"subscribe");__decorate([override],r.prototype,"unsubscribe");__decorate([override],r.prototype,"connectionFailed");__decorate([override],r.prototype,"pollerCompleteHandler");__decorate([override],r.prototype,"processMessage");e.HttpTransportMethodPolling=r}(readit||(readit={})),function(e){var t=function(t){function n(){var e=t.call(this)||this;return e._messageDispatcher=null,e._connectionID="",e._connectionTimeout=0,e._url="",e._transportIsSupported=e.checkWebsocketAvailable(),e._socket=null,e._socketReadyState=null,e._connected=!1,e.suspended=!1,e.storageId=null,e.socketOpenHandler=function(t){e.log("Websocket: onopen: "+t.type);e.socketConnectCallback()},e.socketErrorHandler=function(t){e.connectionFailed("connection error: "+t.type)},e.socketCloseHandler=function(t){e._connected?e.connectionClosed("Websocket: onclosed: "+t.reason):e.connectionFailed("connection error: "+t.type+" (unable to connect error)")},e.socketMessageHandshakeHandler=function(t){e.handshakeCallback(t.data)},e.socketMessageDataHandler=function(t){e.socketDataCallback(t.data)},e}return __extends(n,t),n.prototype.toString=function(){return"[WebsocketTransportMethod]"},n.prototype.close=function(){if(this.getSocketConnected()){var t="";t+=String.fromCharCode(e.StandardProtocolConstants.CLIENT_CLOSE);t+=String.fromCharCode(0);this.put(t);this._socket.close()}},n.prototype.getConnected=function(){return this.getSocketConnected()&&this._connected},n.prototype.getSocketConnected=function(){return this._transportIsSupported&&this._socketReadyState==WebSocket.OPEN},n.prototype.setSocketReadyState=function(){this._socketReadyState=this._socket&&this._socket.readyState?this._socket.readyState:null;this._connected&&this._socketReadyState!==WebSocket.OPEN&&(this._connected=!1)},n.prototype.connect=function(){var e=this;if(this._transportIsSupported||this.connectionFailed("Websocket Transport not supported."),null==this._socket){this._connectionTimeout=setTimeout(function(){e.connectionFailed("timeout after "+n.CONNECTION_TIMEOUT_LIMIT+"ms")},n.CONNECTION_TIMEOUT_LIMIT);try{this._url=this._connectionDetails.host+":"+this._connectionDetails.port+n.TRAILING+"?uid="+this._connectionDetails.uid;this._socket=new WebSocket(this._url,"zap-protocol-v1");this._socket.addEventListener("open",this.socketOpenHandler);this._socket.addEventListener("error",this.socketErrorHandler);this._socket.addEventListener("close",this.socketCloseHandler)}catch(t){this.connectionFailed("Unable to open Socket. Error: "+t)}}},n.prototype.socketConnectCallback=function(){var e,t=this;this.clearConnectionTimeout();this.setSocketReadyState();this.getSocketConnected()?(this._socket.addEventListener("message",this.socketMessageHandshakeHandler),e=this.getHandshakeData(),e?(this._socket.send(e),this._connectionTimeout=setTimeout(function(){t.connectionFailed("timeout after "+n.HANDSHAKE_TIMEOUT_LIMIT+"ms")},n.HANDSHAKE_TIMEOUT_LIMIT)):this.close()):this.connectionFailed("not connected")},n.prototype.handshakeCallback=function(t){var i=t.split(e.StandardProtocolConstants.HANDSHAKE_MESSAGE_DELIM),r=i[0],o=r.split(e.StandardProtocolConstants.FIELD_DELIM);return this._socket.removeEventListener("message",this.socketMessageHandshakeHandler),this.clearConnectionTimeout(),o[0]!=n.HANDSHAKE_STATUS_CONNECTED?o[0]==n.HANDSHAKE_STATUS_REJECTED?void this.connectionFailed("connection rejected "+n.HANDSHAKE_STATUS_REJECTED):void this.connectionFailed("connection rejected - unrecognised response"):(this.setSocketReadyState(),this._connected=!0,this._connectionID=o[1],this.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.CONNECTED)),this.log("Websocket connected as "+this._connectionID+". "+this._connectionDetails),void this._socket.addEventListener("message",this.socketMessageDataHandler))},n.prototype.socketDataCallback=function(t){var n,i,r,o,s,a,c,l;try{if(t){n=t.split(e.StandardProtocolConstants.MESSAGE_DELIM);do switch(i=n.shift(),r=i.charCodeAt(0)){case e.StandardProtocolConstants.INITIAL_TOPIC_LOAD:case e.StandardProtocolConstants.DELTA:o=i.split(e.StandardProtocolConstants.RECORD_DELIM);s=o[0].split(e.StandardProtocolConstants.FIELD_DELIM);a=s.shift();c=a.substr(1,a.length);l=i.substr(o[0].length+1);null!==this._messageDispatcher&&this._messageDispatcher.dispatchEvent(new e.ReaditMessageEvent(e.ReaditMessageEvent.MESSAGE_RECEIVED,new e.ReaditMessage(String(r),c,l,s)));break;case e.StandardProtocolConstants.CLIENT_ABORT:case e.StandardProtocolConstants.CLIENT_CLOSE:this.connectionFailed("Connection close/abort message type sent from publisher. Message type: "+r);break;default:this.log("Unrecognised message type sent from publisher: "+r)}while(n.length)}}catch(u){this.log(u.toString())}},n.prototype.subscribe=function(t){var n="";n+=String.fromCharCode(e.StandardProtocolConstants.CLIENT_SUBSCRIBE);n+=String.fromCharCode(e.StandardProtocolConstants.NONE_ENCODING);n+=t;n+=e.StandardProtocolConstants.RECORD_DELIM;this.put(n)},n.prototype.unsubscribe=function(t){var n="";n+=String.fromCharCode(e.StandardProtocolConstants.CLIENT_UNSUBSCRIBE);n+=String.fromCharCode(e.StandardProtocolConstants.NONE_ENCODING);n+=t;n+=e.StandardProtocolConstants.RECORD_DELIM;this.put(n)},n.prototype.swapSubscription=function(e,t){this.unsubscribe(t);this.subscribe(e)},n.prototype.send=function(t,n){var i="";i+=String.fromCharCode(e.StandardProtocolConstants.CLIENT_SEND);i+=String.fromCharCode(e.StandardProtocolConstants.NONE_ENCODING);i+=t;i+=e.StandardProtocolConstants.RECORD_DELIM;i+=n;this.put(i)},n.prototype.put=function(e){try{if(!this.getSocketConnected())throw new Error("socket not connected");this._socket.send(e)}catch(t){this.connectionFailed("WebSocket: put:"+t)}},n.prototype.getHandshakeData=function(){var t,i="";return i+=String.fromCharCode(n.HANDSHAKE_PROTOCOL),i+=String.fromCharCode(n.HANDSHAKE_VERSION),i+=String.fromCharCode(n.HANDSHAKE_CONNECTION_TYPE),i+=String.fromCharCode(n.HANDSHAKE_CAPABILITIES_FLAG),null!=this._connectionDetails.defaultTopic&&(i+=this._connectionDetails.defaultTopic+","),t=ns_gen5_util.CookieManager.GetSessionId(),null==t?(this.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.CONNECTION_FAILED_INVALID_SESSION)),null):(i+="S_"+t,i+=String.fromCharCode(0))},n.prototype.checkWebsocketAvailable=function(){return"WebSocket"in window},n.prototype.getConnectionId=function(){return this._connectionID},n.prototype.getConnectionDetails=function(){return this._connectionDetails},n.prototype.setConnectionDetails=function(e){this._connectionDetails=e},n.prototype.setMessageDispatcher=function(e){this._messageDispatcher=e},n.prototype.log=function(t){e.ReadItLog.Log(this+" -> "+t)},n.prototype.clearConnectionTimeout=function(){this._connectionTimeout&&(clearTimeout(this._connectionTimeout),this._connectionTimeout=null)},n.prototype.connectionFailed=function(t){return this.log("Websocket connection ("+this._connectionDetails+") failed - "+t),this.clearConnectionTimeout(),this.getConnected()?void this.connectionClosed("connection failed"):(this.setSocketReadyState(),this.dispose(),void this.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.CONNECTION_FAILED)))},n.prototype.connectionClosed=function(t){this.log("Websocket connection ("+this._connectionDetails+") closed - "+t);this.clearConnectionTimeout();this.setSocketReadyState();this.dispose();this.dispatchEvent(new e.TransportConnectionEvent(e.TransportConnectionEvent.DISCONNECTED))},n.prototype.dispose=function(){this.close();this._socket&&(this._socket.removeEventListener("open",this.socketOpenHandler),this._socket.removeEventListener("close",this.socketCloseHandler),this._socket.removeEventListener("error",this.socketErrorHandler),this._socket.removeEventListener("message",this.socketMessageDataHandler),this._socket.removeEventListener("message",this.socketMessageHandshakeHandler),this._socket=null)},n}(ns_gen5_events.EventDispatcher);t.TRAILING="/zap/";t.CONNECTION_TIMEOUT_LIMIT=15e3;t.HANDSHAKE_TIMEOUT_LIMIT=15e3;t.HANDSHAKE_PROTOCOL=35;t.HANDSHAKE_VERSION=3;t.HANDSHAKE_CONNECTION_TYPE=80;t.HANDSHAKE_CAPABILITIES_FLAG=1;t.HANDSHAKE_STATUS_CONNECTED="100";t.HANDSHAKE_STATUS_REJECTED="111";__decorate([override],t.prototype,"toString");e.WebsocketTransportMethod=t}(readit||(readit={})),function(e){var t=readit.StandardProtocolConstants,n=ns_gen5_events.BalanceModelEvent,i=ns_gen5_config.PushedConfigPropertyChangeEvent,r=ns_gen5_data.PrivateSubscriptionManagerEvent,o=ns_gen5_events.EventDispatcher,s=e.MathUtil,a=ns_gen5_net.Loader,c=ns_gen5_net.LoaderEvent,l=ns_gen5_events.Event365,u=ns_gen5_net.URLVariables,d=e.InfoReporter,h="SPTBK",p="rn",_=function(o){function _(){var t=o.call(this)||this;return t._subscriptionsInitializedDelegate=null,t._pushBalanceFlagChangeDelegate=null,t._pushBalanceReceivedDelegate=null,t._pullBalanceReceivedDelegate=null,t._pullBalanceErrorDelegate=null,t._subscriptionsInitializedDelegate=new e.Delegate(t,t.loadBalance),t._pushBalanceFlagChangeDelegate=new e.Delegate(t,t.pushBalanceFlagChangeHandler),t._pushBalanceReceivedDelegate=new e.Delegate(t,t.pushBalanceReceivedHandler),t._pullBalanceReceivedDelegate=new e.Delegate(t,t.pullBalanceReceivedHandler),t._pullBalanceErrorDelegate=new e.Delegate(t,t.pullBalanceErrorHandler),t}return __extends(_,o),_.prototype.load=function(e){this._sessionToken=e;Locator.pushedConfig.getArePropertiesInitialised()?this.loadBalance():Locator.pushedConfig.addEventListener(i.PROPERTIES_INITIALISED,this._subscriptionsInitializedDelegate)},_.prototype.loadBalance=function(){this.pushBalanceEnabled=Locator.pushedConfig.getIsPushBalanceEnabled();this.isItalianDomain&&this.loadPullBalance();this.loadPushBalance();Locator.pushedConfig.addEventListener(i.PUSH_BALANCE_ENABLED_AVAILABLE,this._pushBalanceFlagChangeDelegate)},_.prototype.refreshBalance=function(){this._sessionToken&&(this.pushBalanceEnabled&&!this.isItalianDomain||this.loadPullBalance(),this.pushBalanceEnabled&&this.refreshPushBalance())},_.prototype.calculateTotalBalance=function(e,t){void 0===t&&(t=!1);this.pushBalanceEnabled||t||(this.totalBalance=(s.StringToNumber(this.totalBalance)-this.formatCurrencyNoCulture(e.toString())).toFixed(2),this.dispatchEvent(new l(n.BALANCEMODEL_UPDATE_EVENT)))},_.prototype.updateBonusBalance=function(e){this.pushBalanceEnabled||(this.bonusBalance=(s.StringToNumber(this.bonusBalance)-this.formatCurrencyNoCulture(e.toString())).toFixed(2),this.dispatchEvent(new l(n.BALANCEMODEL_UPDATE_EVENT)))},_.prototype.formatCurrencyNoCulture=function(e){return e?s.StringToNumber(e.split(Locator.user.currencyDecimalSeparator).join(".")):0},_.prototype.pushBalanceFlagChangeHandler=function(){this.pushBalanceEnabled=Locator.pushedConfig.getIsPushBalanceEnabled();this.pushBalanceEnabled?this.loadPushBalance():(Locator.privateSubscriptionManager.removeEventListener(r.BALANCE_RECEIVED,this._pushBalanceReceivedDelegate),this._balanceListenerAdded=!1)},_.prototype.pushBalanceReceivedHandler=function(e){d.Trace(d.PUSH_MESSAGE_CONNECTION_ENTRY,"Push balance received: "+e.message);"D"==e.message.charAt(0)?this.loadPushBalance():this.pushBalanceEnabled=this.updateBalanceInfo(e.message)},_.prototype.pullBalanceReceivedHandler=function(e){d.Trace(d.PUSH_MESSAGE_CONNECTION_ENTRY,"Pull balance received: "+e.data);this._urlLoader.removeEventListener(c.COMPLETE,this._pullBalanceReceivedDelegate);this._urlLoader.removeEventListener(c.ERROR,this._pullBalanceErrorDelegate);this.updateBalanceInfo(e.data)},_.prototype.pullBalanceErrorHandler=function(){this._urlLoader.removeEventListener(c.COMPLETE,this._pullBalanceReceivedDelegate);this._urlLoader.removeEventListener(c.ERROR,this._pullBalanceErrorDelegate)},_.prototype.loadPushBalance=function(){if(this.pushBalanceEnabled){this._balanceListenerAdded||(Locator.privateSubscriptionManager.addEventListener(r.BALANCE_RECEIVED,this._pushBalanceReceivedDelegate),this._balanceListenerAdded=!0);var e="getBalance"+t.RECORD_DELIM+this._sessionToken+t.FIELD_DELIM+h;Locator.privateSubscriptionManager.send("command",e)}},_.prototype.loadPullBalance=function(){this._urlLoader||(this._urlLoader=new a);var e=new u;e.addPair(p,(new Date).getTime()+"");this._urlLoader.addEventListener(c.COMPLETE,this._pullBalanceReceivedDelegate);this._urlLoader.addEventListener(c.ERROR,this._pullBalanceErrorDelegate);this._urlLoader.load(this.pullBalancePath,{method:a.GET,urlVariables:e})},_.prototype.refreshPushBalance=function(){if(this.pushBalanceEnabled){this.loadPushBalance();var e="refresh"+t.RECORD_DELIM+this._sessionToken+t.FIELD_DELIM+h;Locator.privateSubscriptionManager.send("command",e)}},_.prototype.updateBalanceInfo=function(e){var t=e.split("$"),i=!1,r=t.length;return r>1&&t[1].length>0?(this.totalBalance=s.StringToNumber(t[1]).toFixed(2),this.withdrableBalance=s.StringToNumber(t[2]).toFixed(2),this.bonusBalance=s.StringToNumber(t[3]).toFixed(2),this.stakeRollover=s.StringToNumber(t[4]).toFixed(2),this.stakeRolloverRequirement=s.StringToNumber(t[5]).toFixed(2),this.depositRollover=s.StringToNumber(t[6]).toFixed(2),this.depositRolloverRequirement=s.StringToNumber(t[7]).toFixed(2),this.italianSportsWithdrableBalance=s.StringToNumber(t[8]).toFixed(2),this.italianSportsNonWithdrableBalance=s.StringToNumber(t[9]).toFixed(2),11==r&&(this.gamingBalance=s.StringToNumber(t[10]).toFixed(2)),this.isItalianDomain&&r>11&&"1"===t[11]&&this.refreshBalance(),this.dispatchEvent(new l(n.BALANCEMODEL_UPDATE_EVENT)),i=!0):this.pushBalanceEnabled=!1,i},_}(o);e.BalanceModel=_}(ns_gen5_util||(ns_gen5_util={})),function(e){var t=function(){function t(){this.betsBank={};this._betSlipInterface=null}return t.prototype.toString=function(){return"[BetSlipManager]"},t.prototype.getBetCount=function(){return this._betSlipInterface.GetBetCount()},t.prototype.setBetSlipInterface=function(e){this._betSlipInterface=e},t.prototype.addBet=function(e,t){e&&this._betSlipInterface&&this._betSlipInterface.AddBet&&this._betSlipInterface.AddBet({item:e,Target:t})},t.prototype.deleteBet=function(e){e&&this._betSlipInterface&&this._betSlipInterface.DeleteBet&&this._betSlipInterface.DeleteBet({ConstructString:e.constructString})},t.prototype.isSelected=function(e){return e&&this._betSlipInterface&&this._betSlipInterface.IsSelected?this._betSlipInterface.IsSelected({Id:e}):!1},t.prototype.isSelectedEditBet=function(e){return e&&this._betSlipInterface&&this._betSlipInterface.isSelectedEditBet?this._betSlipInterface.isSelectedEditBet({Id:e}):!1},t.prototype.deselectBet=function(t){var n,i;if(t)n=new e.BetSlipEvent(t),n.selected=e.State.NONE_SELECTED,Locator.inplayEvents.dispatchEvent(n),delete this.betsBank[t];else for(i in this.betsBank)n=new e.BetSlipEvent(i),n.selected=e.State.NONE_SELECTED,Locator.inplayEvents.dispatchEvent(n),delete this.betsBank[i]},t.prototype.addBetToBank=function(t){this.betsBank[t]=!0;var n=new e.BetSlipEvent(t);n.selected=e.State.BETSLIP_SELECTED;Locator.inplayEvents.dispatchEvent(n)},t.prototype.populateBetBank=function(e){this.betsBank=e},t}();e.BetSlipManager=t}(ns_betslip||(ns_betslip={})),function(e){var t=function(){function e(){}return e.SetConstructOnBetItem=function(e){var t,n="#",i="x",r="|",g="pom=Y",f="pt="+e.partType+n;return f+="o="+e.odds+n,f+="f="+e.fixtureID+n,f+="fp="+e.participantID+n,f+="so="+n,f+="c="+e.classificationID+n,f+=e.handicap.length>0?"ln="+e.handicap+n:"",e.betsource&&(f+="mt="+e.betsource+n),t=e.oddsTypeOverride?i+e.oddsTypeOverride.toString()+i+e.decimalPlaces:"",e.subscribe&&(f+=r+"TP=BS"+e.participantID+t+n),e.pom&&"1"===e.pom&&(f+=e.subscribe?g+n:r+g+n),f+=e.toteCombination?"atc="+e.toteCombination+n:"",e.constructString=f,e},e}();e.BetConstructor=t}(ns_betslip||(ns_betslip={})),function(e){var t,n;!function(e){e[e.NONE_SELECTED=0]="NONE_SELECTED";e[e.BETSLIP_SELECTED=1]="BETSLIP_SELECTED";e[e.EDITBET_SELECTED=2]="EDITBET_SELECTED"}(t=e.State||(e.State={}));n=function(e){function t(t){var n=e.call(this,t)||this;return n.data=null,n}return __extends(t,e),t.prototype.toString=function(){return"[BetSlipEvent type="+this.type+"]"},t}(ns_gen5_events.Event365);n.PARTICIPANT_REMOVED_FROM_BETSLIP="participantRemovedFromBetSlip";n.PARTICIPANT_ADDED_TO_BETSLIP="participantAddedToBetslip";n.TOTE_COMBINATION_CHANGED="totecombinationchanged";n.BETCALL_CONNECTED="betCallConnected";__decorate([override],n.prototype,"toString");e.BetSlipEvent=n}(ns_betslip||(ns_betslip={})),function(e){var t=ns_gen5_events.Event365,n=ns_gen5_util.Delegate,i=readit.ReaditClient,r=readit.ReaditFallbackClient,o=readit.HttpTransportMethod,s=readit.HttpTransportMethodLegacy,a=readit.HttpTransportMethodPolling,c=readit.WebsocketTransportMethod,l=readit.ReaditConnectionEvent,u=readit.ReaditMessageEvent,d=e.DataUtil,h=(e.Attribute,e.StreamDataProcessorEvent),p=ns_gen5_util.Timer,_=ns_gen5_util.TimerEvent,g=ns_gen5_events.ApplicationEvent,f=ns_gen5_ui.Application,E=ns_gen5_util.InfoReporter,v={0:null,1:s,2:o,3:c},m=!0,S=1e4,C=9900,y=function(e){function s(){var t=e.call(this)||this;return t._retryInterval=0,t._connectedPublisher=null,t._reconnected=!1,t._idleTime=8e4,t._idleTimerID=-1,t._reConnectTimer=null,t._connectionAttempts=0,t._applicaitonUnloading=!1,t._subscriptionTimeoutTimer=null,t._allowFallbackConnection=!0,t.canDebouncePVCN=!0,t.storageId=null,t._serverConnection=null,t._fallbackServerConnection=null,t._pendingConnect=!1,t._initialized=!1,t._subscriptionTimeoutTopic=null,t._subscriptionQueue=[],t._sendQueue=[],t.delegate_serverConnectHandler=new n(t,t._serverConnectHandler),t.delegate_serverDataHandler=new n(t,t._serverDataHandler),t.delegate_applicationUnloadingHandler=new n(t,t._applicationUnloadingHandler),t.delegate_pullDataReceivedHandler=new n(t,t._pullDataReceivedHandler),t.delegate_pullRequestFailedHandler=new n(t,t._pullRequestFailedHandler),t.delegate_connectionFailedInvalidSessionHandler=new n(t,t._connectionFailedInvalidSessionHandler),t.callback_idleTimerHandler=function(){return t._idleTimerHandler()},t}return __extends(s,e),s.prototype.toString=function(){return"[StreamDataProcessor]"},s.prototype.getConnectionDetails=function(){return Locator.config.getConnectionDetails()},s.prototype.getfallbackConnectionDetails=function(){return Locator.config.getFallbackConnectionDetails()},s.prototype.connect=function(){var e,t,n,s,c,l;if(this._initialized||this._initialize(),!this._pendingConnect){for(this.closeConnection(this._serverConnection),this._pendingConnect=!0,e=this._serverConnection=new i,e.storageId=this.storageId,e.connectionListCycles=1,t=0,n=this.getConnectionDetails();t<n.length;t++)s=n[t],s.transportMethod=v[s.transportMethodId]||o,e.addConnectionAttempt(s);this.openConnection(e);c=this._fallbackServerConnection;Locator.config.fallbackConnectionEnabled()&&!c&&this._allowFallbackConnection&&(c=this._fallbackServerConnection=new r,c.connectionListCycles=0,l=this.getfallbackConnectionDetails(),l.transportMethod=a,c.addConnectionAttempt(l),c.addEventListener(u.MESSAGE_RECEIVED,this.delegate_serverDataHandler),c.addEventListener(readit.TransportConnectionEvent.PULL_DATA_RECEIVED,this.delegate_pullDataReceivedHandler),c.addEventListener(readit.TransportConnectionEvent.PULL_REQUEST_FAILED,this.delegate_pullRequestFailedHandler),c.addEventListener(readit.TransportConnectionEvent.CONNECTION_FAILED_INVALID_SESSION,this.delegate_connectionFailedInvalidSessionHandler),c.connect())}},s.prototype.close=function(e){this.closeConnection(this._serverConnection,e)},s.prototype.openConnection=function(e){e&&(e.addEventListener(l.CONNECTED,this.delegate_serverConnectHandler),e.addEventListener(l.DISCONNECTED,this.delegate_serverConnectHandler),e.addEventListener(l.CONNECTION_FAILED,this.delegate_serverConnectHandler),e.addEventListener(l.CONNECTION_FAILED_INVALID_SESSION,this.delegate_connectionFailedInvalidSessionHandler),e.addEventListener(u.MESSAGE_RECEIVED,this.delegate_serverDataHandler),e.connect())},s.prototype.closeConnection=function(e,t){if(e){e.hasEventListener(l.CONNECTED)&&(e.removeEventListener(l.CONNECTED,this.delegate_serverConnectHandler),e.removeEventListener(l.DISCONNECTED,this.delegate_serverConnectHandler),e.removeEventListener(l.CONNECTION_FAILED,this.delegate_serverConnectHandler),e.removeEventListener(l.CONNECTION_FAILED_INVALID_SESSION,this.delegate_connectionFailedInvalidSessionHandler),e.removeEventListener(u.MESSAGE_RECEIVED,this.delegate_serverDataHandler));try{e.close(t)}catch(n){}}},s.prototype._fallbackSubscribe=function(e){var t,n,i;if(this._fallbackServerConnection)if(e.indexOf(",")>-1)for(t=e.split(","),n=t.length,i=0;n>i;i++)this._fallbackServerConnection.subscribe(t[i]);else this._fallbackServerConnection.subscribe(e)},s.prototype.subscribe=function(e,t){var i,r;t||this._fallbackSubscribe(e);this._reConnectTimer&&this._reConnectTimer.active&&(this._reConnectTimer.stop(),this.connect());this._serverConnection&&this._serverConnection.getConnected()?e&&(e.length>C?(i=e.indexOf(",",e.length/2),this.subscribe(e.slice(0,i)),this.subscribe(e.slice(i+1))):(this._serverConnection.subscribe(e),this._subscriptionTimeoutTimer||(r=e.split(",")[0],this._subscriptionTimeoutTimer=new p(S),this._subscriptionTimeoutTimer.addEventListener(_.COMPLETE,new n(this,this._subscriptionTimeoutHandler)),this._subscriptionTimeoutTimer.start(),this._subscriptionTimeoutTopic=r))):this._subscriptionQueue.push(e)},s.prototype.unsubscribe=function(e){var t,n,i,r,o;if(this._fallbackServerConnection)if(e.indexOf(",")>-1)for(t=e.split(","),n=t.length,i=0;n>i;i++)this._fallbackServerConnection.unsubscribe(t[i]);else this._fallbackServerConnection.unsubscribe(e);r=this._subscriptionQueue;r.length&&(o=r.indexOf(e))>-1&&r.splice(o,1);this._serverConnection&&this._serverConnection.getConnected()&&this._serverConnection.unsubscribe(e)},s.prototype.send=function(e,t){this._serverConnection&&this._serverConnection.getConnected()?this._serverConnection.send(e,t):this._sendQueue.push({topic:e,message:t})},s.prototype.swapSubscriptions=function(e,t){if(t&&this._fallbackServerConnection&&this._fallbackServerConnection.unsubscribe(t),e&&this._fallbackSubscribe(e),this._serverConnection.getConnected()){if(this._serverConnection.swapSubscription(e,t),!this._subscriptionTimeoutTimer&&e){var i=e.split(",")[0];this._subscriptionTimeoutTimer=new p(S);this._subscriptionTimeoutTimer.addEventListener(_.COMPLETE,new n(this,this._subscriptionTimeoutHandler));this._subscriptionTimeoutTimer.start();this._subscriptionTimeoutTopic=i}}else this._subscriptionQueue.push(e)},s.prototype._initialize=function(){f.currentApplication.addEventListener(g.UNLOADING,this.delegate_applicationUnloadingHandler);this._initialized=!0},s.prototype._resetIdleTimer=function(){clearTimeout(this._idleTimerID);this._idleTimerID=setTimeout(this.callback_idleTimerHandler,this._idleTime)},s.prototype._processSubscriptionQueue=function(){if(this._subscriptionQueue.length>0)try{this._serverConnection.subscribe(this._subscriptionQueue.join(","));this._subscriptionQueue.length=0}catch(e){ErrorReporter.Trace(this,e)}for(;this._sendQueue.length>0;)this.send(this._sendQueue[0].topic,this._sendQueue.shift().message)},s.prototype._connectionFailedInvalidSessionHandler=function(){E.Trace(E.PUSH_MESSAGE_CONNECTION_ENTRY,"Failed on invalid session");this._allowFallbackConnection=!1;this.close();this._fallbackServerConnection&&this._fallbackServerConnection.close();this.dispatchEvent(new h(h.CONNECTION_FAILED_INVALID_SESSION))},s.prototype._serverConnectHandler=function(){var t,i;this._pendingConnect=!1;this._serverConnection.getConnected()?(this._retryInterval=0,this._connectedPublisher=this._serverConnection.getConnectionID(),this._connectedPublisher=this._connectedPublisher.substring(0,this._connectedPublisher.indexOf("-")),this.dispatchEvent(new h(h.CONNECTED,this._serverConnection.getCurrentConnectionDetails())),this._reconnected?(this._subscriptionQueue.length=0,this.dispatchEvent(new h(h.SERVER_RECONNECT))):this._reconnected=!0,this._resetIdleTimer(),this._processSubscriptionQueue()):(this._connectedPublisher="not connected.",t=this._fallbackServerConnection,!this._reconnected&&t&&t.resume(),this._serverConnection.logPushStatus(readit.pushConnectionStatusEnum.ALLRETRYSFAILED,this._serverConnection.getCurrentConnectionHost()),i=void 0,this._reconnected?this.dispatchEvent(new h(h.RECONNECT_FAILED,this._connectionAttempts)):(i=new h(h.CONNECTION_FAILED,this._connectionAttempts),this.dispatchEvent(i),i.retry=!0,i.retry||(this._subscriptionQueue.length=0)),(this._reconnected||i&&i.retry)&&(this._applicaitonUnloading||(this._retryInterval=Math.min(this._retryInterval+=5e3,1e4),this._reConnectTimer?this._reConnectTimer.time=this._retryInterval:(this._reConnectTimer=new p(this._retryInterval),this._reConnectTimer.addEventListener(_.COMPLETE,new n(this,this._reConnectHandler))),this._reConnectTimer.reset(),this._reConnectTimer.start()),this._idleTimerID>-1&&clearTimeout(this._idleTimerID)),this._connectionAttempts++)},s.prototype._applicationUnloadingHandler=function(){this._applicaitonUnloading=!0},s.prototype._serverDataHandler=function(e){var t=this;Locator.validationManager.callLater(function(){return t._serverDataHandler_later(e)});Number(e.message.messageType)==readit.StandardProtocolConstants.INITIAL_TOPIC_LOAD&&this.canDebouncePVCN&&(this.canDebouncePVCN=!1,setTimeout(function(){t.canDebouncePVCN=!0;Locator.validationManager.processValidationCycleNow()},0))},s.prototype._serverDataHandler_later=function(e){var n,i,r,o,s,a,c,l,u,p,_,g,f=this;for(this._resetIdleTimer(),n=e.message,i=n.getMessage(),Number(n.messageType)==readit.StandardProtocolConstants.INITIAL_TOPIC_LOAD?(r=n.getTopic(),e.currentTarget===this._serverConnection&&(this._fallbackServerConnection&&(this._fallbackServerConnection.disableSubscription(r),this._fallbackServerConnection.pause()),this._subscriptionTimeoutTopic===r&&this._resetSubscriptionTimeoutTimer())):(r=n.getBaseTopic(),this._serverConnection.logPushStatus(readit.pushConnectionStatusEnum.DELTA,this._serverConnection.getCurrentConnectionHost())),o=!!Locator.treeLookup.getReference(r),s=Number(n.messageType)==readit.StandardProtocolConstants.INITIAL_TOPIC_LOAD&&o,a=s?d.ParseMergeMessage(i,r):d.ParseMessage(i,r),c=a.length,l=0;c>l;l++)u=a[l],s&&(r=u.topic),p=void 0,u.info&&(_=u.info,g=_.TI,g&&Locator.timeManager.setServerTime(g),_&&"PD"in _&&this._fallbackServerConnection.updatePollTime(1e3*parseFloat(_.PD)),"EMPTY"==r&&_.TO&&(E.Trace(E.EMPTY_TOPIC_ENTRY,"Empty topic "+_.TO),r=_.TO,this._subscriptionTimeoutTopic&&(this._subscriptionTimeoutTopic===r||this._subscriptionTimeoutTopic.lastIndexOf("/")>-1&&this._subscriptionTimeoutTopic.substring(this._subscriptionTimeoutTopic.lastIndexOf("/")+1)==r)&&this._resetSubscriptionTimeoutTimer(),p=Locator.treeLookup.getReference(r),p&&p.remove()),this.dispatchEvent(new h(h.INFO_UPDATED,_))),d.ProcessStemChanges(u,r,n.getTopic(),s,function(e){return f.dispatchEvent(new t(e))})},s.prototype._resetSubscriptionTimeoutTimer=function(){this._subscriptionTimeoutTimer.stop();this._subscriptionTimeoutTimer=null;this._subscriptionTimeoutTopic=null},s.prototype._idleTimerHandler=function(){this._serverConnection.getTransportSuspended()||(this.close(),this.connect())},s.prototype._reConnectHandler=function(){this.connect()},s.prototype._pullDataReceivedHandler=function(){m&&this.dispatchEvent(new h(h.PULL_DATA_RECEIVED))},s.prototype._pullRequestFailedHandler=function(){this.dispatchEvent(new h(h.PULL_REQUEST_FAILED))},s.prototype._subscriptionTimeoutHandler=function(){!this._reconnected&&this._fallbackServerConnection&&this._fallbackServerConnection.resume();this.closeConnection(this._serverConnection)},s}(ns_gen5_events.EventDispatcher);__decorate([override],y.prototype,"toString");e.StreamDataProcessor=y}(ns_gen5_data||(ns_gen5_data={})),function(e){var t=e.StreamDataProcessor,n=e.PrivateStreamDataProcessorEvent,i=function(e){function t(){var t=e.call(this)||this;return t.storageId="PrivateConnectionDetails",t}return __extends(t,e),t.prototype.getConnectionDetails=function(){return Locator.config.getPrivateConnectionDetails()},t.prototype.getfallbackConnectionDetails=function(){return Locator.config.getPrivateFallbackConnectionDetails()},t.prototype._serverDataHandler_later=function(t){var i=t.message.topic,r=i.substr(i.lastIndexOf("_")+1);switch(r){case"BAL":this.dispatchEvent(new n(n.BALANCE_RECEIVED,t.message));break;case"MSG":this.dispatchEvent(new n(n.PUSH_MESSAGE_RECEIVED,t.message));break;default:e.prototype._serverDataHandler_later.call(this,t)}},t}(t);__decorate([override],i.prototype,"getConnectionDetails");__decorate([override],i.prototype,"getfallbackConnectionDetails");__decorate([override],i.prototype,"_serverDataHandler_later");e.PrivateStreamDataProcessor=i}(ns_gen5_data||(ns_gen5_data={}));Locator=function(){function e(){}return e}();Locator.treeLookup=new ns_gen5_data.TreeLookup;Locator.subscriptionManager=function(){var e=new ns_gen5_data.SubscriptionManager;return e.setStreamDataProcessor(new ns_gen5_data.StreamDataProcessor),e.setPullDataProcessor(new ns_gen5_data.PullDataProcessor),e}();Locator.privateSubscriptionManager=function(){var e=new ns_gen5_data.PrivateSubscriptionManager;return e.setStreamDataProcessor(new ns_gen5_data.PrivateStreamDataProcessor),e}();Locator.validationManager=new ns_gen5_validation.ValidationManager;Locator.betSlipManager=new ns_betslip.BetSlipManager;Locator.timeManager=new ns_gen5_util.TimeManager;Locator.manifestManager=new ns_gen5_util.ManifestManager;Locator.user=new ns_gen5_data.User;Locator.languageResource=new ns_gen5_language.Resource;Locator.pushedConfig=new ns_gen5_config.PushedConfigManager;Locator.inplayEvents=new ns_gen5_events.EventDispatcher;Locator.participantEvents=new ns_gen5_events.EventDispatcher;Locator.otsReport=new ns_gen5_util.OTSReport;Locator.serverPreferenceManager=new ns_gen5_util.ServerPreferenceManager,function(e){function t(t){return function(e){function n(){var n=e.call(this)||this;return n.load(t),n}return __extends(n,e),n}(e.ModuleContainer)}e.SingletonModule=t}(ns_gen5_ui||(ns_gen5_ui={})),function(e){var t=function(){function t(){this.toteCombination="";this.eachWay=!1;this.trapNumber="";this.betslipDisplay="";this.marketDescription="";this.fixtureDescription="";this.competitionCode="";this.competitionKey="";this.parentFixtureId="";this.participantName="";this.formattedHandicap="";this.labelHandicap="";this.isTote=!1;this.hasPitcher=!1;this.isFreeBetFixture=!1;this.relatedBets=[]}return t.prototype.updateItem=function(){e.BetConstructor.SetConstructOnBetItem(this)},t}();e.BetItem=t}(ns_betslip||(ns_betslip={}));cache=cache||{},function(){RegisterCompiledAsset=function(e,t){e=e.toLowerCase();cache[e]=t};GetCompiledAsset=function(e){return e=e.toLowerCase(),cache[e]}}();!function(e){"use strict";function t(e,t){function i(e){return this&&this.constructor===i?(this._keys=[],this._values=[],this._itp=[],this.objectOnly=t,void(e&&n.call(this,e))):new i(e)}return e.constructor=i,i.prototype=e,i}function n(e){this.add?e.forEach(this.add,this):e.forEach(function(e){this.set(e[0],e[1])},this)}function i(e){var t,n,i;if(this.has(e))for(this._keys.splice(E,1),this._values.splice(E,1),t=0,n=this._itp.length;n>t;t++)i=this._itp[t],E<i[0]&&i[0]--;return E>-1}function r(e){if(this.has(e))return this._values[E]}function o(e,t){if(this.objectOnly&&t!==Object(t))throw new TypeError("Invalid value used as weak collection key");if(t!=t||0===t)for(E=e.length;E--&&!v(e[E],t););else E=e.indexOf(t);return E>-1}function s(e){return o.call(this,this._values,e)}function a(e){return o.call(this,this._keys,e)}function c(e,t){return this.has(e)?this._values[E]=t:this._values[this._keys.push(e)-1]=t,this}function l(e){return this.has(e)||this._values.push(e),this}function u(){(this._keys||0).length=this._values.length=0}function d(){return g(this._itp,this._keys)}function h(){return g(this._itp,this._values)}function p(){return g(this._itp,this._keys,this._values)}function _(){return g(this._itp,this._values,this._values)}function g(e,t,n){var i=[0],r=!1;return e.push(i),{next:function(){var o,s=i[0];return!r&&s<t.length?(o=n?[t[s],n[s]]:t[s],i[0]++):(r=!0,e.splice(e.indexOf(i),1)),{done:r,value:o}}}}function f(e,t){for(var i,n=this.entries();i=n.next(),!i.done;)e.call(t,i.value[1],i.value[0],this)}var E,v=(Object.defineProperty,function(e,t){return isNaN(e)?isNaN(t):e===t});"undefined"==typeof WeakMap&&(e.WeakMap=t({"delete":i,clear:u,get:r,has:a,set:c},!0));"undefined"!=typeof Map&&"function"==typeof(new Map).values&&(new Map).values().next||(e.Map=t({"delete":i,has:a,get:r,set:c,keys:d,values:h,entries:p,forEach:f,clear:u}));"undefined"!=typeof Set&&"function"==typeof(new Set).values&&(new Set).values().next||(e.Set=t({has:s,add:l,"delete":i,clear:u,keys:h,values:h,entries:_,forEach:f}));"undefined"==typeof WeakSet&&(e.WeakSet=t({"delete":i,add:l,clear:u,has:s},!0))}("undefined"!=typeof exports&&"undefined"!=typeof global?global:window);ns_gen5_net.ModuleLoaderDefault.ModuleResourceLookup=window.websiteManifest?window.websiteManifest.modulesInformation:{};SITE_ROOT_PATH="SportsUI";TEST=!0;!function(e){e.AudioDisplay=function(){"use strict";var e=(ns_gen5_data.Attribute,"1"),t="AUS ",n={2:!0,4:!0,88:!0};return{shouldShow:function(i,r){var a,o;return r?(a="CC"in i&&i.CC.indexOf(t)>-1,o=!!n[i.CL],a&&o?!1:o&&Locator.user.languageId===e?!0:"1"===i.AU):(o=!!n[i.ID],!(!o||Locator.user.languageId!==e))}}}()}(ns_inplay_utils||(ns_inplay_utils={})),function(e){var t=function(){function e(){}return e.Has=function(e,t){return e.indexOf(t)>-1},e.CalculateMatchWinner=function(e,t){for(var r,a,o=["0","0"],n=0,i=e;n<i.length;n++)r=i[n],a=r.split(t),+a[0]>+a[1]?o[0]=+o[0]+1+"":+a[0]<+a[1]&&(o[1]=+o[1]+1+"");return o},e.SplitParticipantNames=function(e){var t=!0,n=t?" v ":" V ",i=e.split(n);return i.length<2&&(n=t?" vs ":" VS ",i=e.split(n),i.length<2&&(n=" @ ",i=e.split(n),i.length<2&&(n=",",i=e.split(n),i.length<2&&(n="contra",i=e.split(n),i.length<2))))?(n="",[i[0],""]):i},e.FlipPoints=function(t){return!!e.Has(e.FlipPointsLookup,t)},e.ShowSetBasedScores=function(t){return!!e.Has(e.ShowSetBasedScoresLookup,t)},e.ShowPreviousAndCurrent=function(t){return!!e.Has(e.ShowPreviousAndCurrentLookup,t)},e.ShowShortScores=function(t){return!!e.Has(e.ShowShortScoresLookup,t)},e.StemDataToMatchLiveData=function(e,t){var n=(ns_gen5_data.Attribute,{available:parseInt(e.SV,10),videoAvailable:parseInt(e.VI,10),audioAvailable:parseInt(e.AU,10),c1id:e.C1,c1idtable:e.T1,c2id:e.C2,c2idtable:e.T2,fixtureId:e.FI,mediaId:e.MS,providerId:e.VI,audioId:e.SD,language:Locator.user.languageId.toString(),zone:Locator.user.zoneId.toString(),classification:t,topic:null});return n.available&&(n.topic="7"==n.classification?n.fixtureId+"LS_"+n.language+"_0":n.c1id+n.c1idtable+n.c2id+n.c2idtable+"M"+n.classification+"_"+n.language+"_"+n.zone),n},e.SplitParticipantNamesForClassification=function(t,n){return e.Has(e.PreserveNameLookup,n)?[t,""]:e.SplitParticipantNames(t)},e.MergedMarket=function(t){return!!e.Has(e.MergedMarketLookup,t)},e.ConvertScoreToShortTennisScore=function(t,n){var i=["0","0"],r=t[t.length-1];return t.length>1&&(i=e.CalculateMatchWinner(t.splice(0,t.length-1),"-")),[i,e.TransformToGameScore(r),e.TransformToGameScore(n)]},e.ConvertScoreToShortScore=function(t,n){var i=e.CalculateMatchWinner(t,"-");return[i,e.TransformToGameScore(n)]},e.TransformToGameScore=function(e,t){void 0===t&&(t="-");var n=e.split(t);return[n[0]+"",n[1]+""]},e.TransformFromGameScore=function(e,t){return void 0===t&&(t="-"),e[0]+t+e[1]},e.TransformToGameScoreArray=function(t,n,i){var r,a,o,s,_;for(void 0===n&&(n=","),void 0===i&&(i="-"),t||(t="-"),r=Array.isArray(t)?t:t.split(n),a=[],o=0,s=r;o<s.length;o++)_=s[o],a.push(e.TransformToGameScore(_,i));return a},e.TransformFromGameScoreArray=function(t,n){var i,r,a,o;for(void 0===n&&(n="-"),i=[],r=0,a=t;r<a.length;r++)o=a[r],i.push(e.TransformFromGameScore(o,n));return i},e}();t.FlipPointsLookup=["13","92"];t.ShowPreviousAndCurrentLookup=["91","94","95","107"];t.ShowSetBasedScoresLookup=["3","91","13","92","94","95","107","66"];t.PreserveNameLookup=["2","4","88"];t.MergedMarketLookup=["40011","20028","20031","20032","20033","20034","880105","880106","880107","880108","880109"];t.ShowShortScoresLookup=["13","92","91","95","107","94"];e.FixtureDataConverter=t}(ns_inplay_utils||(ns_inplay_utils={})),function(e){var t=function(e){function t(t,n){var i=e.call(this,t)||this;return i.timerString=n,i}return __extends(t,e),t.prototype.toString=function(){return"[GameTimerEvent type="+this.type+" timerString="+this.timerString+"]"},t}(ns_gen5_events.Event365);t.TICK="tick";__decorate([override],t.prototype,"toString");e.GameTimerEvent=t}(ns_inplay_general||(ns_inplay_general={})),function(e){var t=ns_gen5_util.TimeManager,n=ns_gen5_util.TimeManagerEvent,i=ns_gen5_util.Delegate,r=e.GameTimerEvent,a=function(e){function a(){var t=e.call(this)||this;return t.defaultClockValue="00:00",t._delegate_timerTickHandler=new i(t,t._timerTickHandler),t._timer_Tick_listening=!1,t}return __extends(a,e),a.prototype.toString=function(){return"[GameTimer]"},a.prototype.updateTimerValues=function(e,i,r,a,o){this._savedTime!=e&&(this._savedTime=e,this._savedDateTime=t.ParseDate(e));this._minsSaved=i;this._secsSaved=r;this._timerRunning=a;this._countdown=o;a&&!this._timer_Tick_listening?(Locator.timeManager.addEventListener(n.TICK,this._delegate_timerTickHandler),this._timer_Tick_listening=!0,this.forceUpdate()):a||(this._timer_Tick_listening&&(Locator.timeManager.removeEventListener(n.TICK,this._delegate_timerTickHandler),this._timer_Tick_listening=!1),this.forceUpdate())},a.prototype.generateTimerString=function(){var e,t,n,i,r,a=this._serverTime;try{a&&this._savedDateTime&&(t=a.getTime()-this._savedDateTime.getTime())}catch(o){}return this._serverMSpassed=6e4*this._minsSaved+1e3*this._secsSaved,this._serverMSpassed<0&&(this._serverMSpassed=-1),e=this._timerRunning?this._countdown?this._serverMSpassed-t:this._serverMSpassed+t:this._serverMSpassed,n=e/6e4>>0,i=.001*(e-6e4*n)>>0,r=10>n&&n>-1&&!this.singleDigitMins?"0"+n:0>n?"00":String(n),r+=":",10>i&&i>=0?r+="0":0>i&&(r+="00"),r+=String(i),0>=e&&(r=this.defaultClockValue),r},a.prototype.forceUpdate=function(){this._serverTime=Locator.timeManager.getTime();this.dispatchEvent(new r(r.TICK,this.generateTimerString()))},a.prototype._timerTickHandler=function(e){this._serverTime=e.date;this.dispatchEvent(new r(r.TICK,this.generateTimerString()))},a.prototype.getTimerRunning=function(){return this._timerRunning},a.prototype.setTimerRunning=function(e){this._timerRunning=e},a}(ns_gen5_events.EventDispatcher);__decorate([override],a.prototype,"toString");e.GameTimer=a}(ns_inplay_general||(ns_inplay_general={})),function(e){var t,n=ns_gen5_util.Delegate,i=(ns_gen5_data.Attribute,e.GameTimer),r=e.GameTimerEvent,a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.initialize=function(){},t.prototype.stemUpdateHandler=function(){},t.prototype.stemDeleteHandler=function(){},t.prototype.detatchStem=function(){},t.prototype.recursiveDetatchStem=function(){},t.prototype.setStem=function(){},t}(ns_gen5_ui.TextNode);e.GamerTimerTextNodeBase=a;ns_gen5_ui.StemBaseMixin.call(a.prototype);t=function(e){function t(){var t=e.call(this," ")||this;return t.forceDisplay=!1,t.isSuddenDeath=!1,t.clearOnKill=!0,t._delegate_updateTimerText=new n(t,t._updateTimerText),t}return __extends(t,e),t.prototype.toString=function(){return"[GameTimerTextNode text="+this._text+"]"},t.prototype.initialize=function(){e.prototype.initialize.call(this);this.stem&&this.updateTimerValues(!1)},t.prototype.updateTimerValues=function(e){var t,n,a,o,s,_,u,p;this.stem&&(t=this.stem.data,n=this.forceDisplay||(e?!1:"1"===t.DC),a=t.TU,o=Number(t.TM),s=Number(t.TS),_=e||!a?!1:n&&"1"===t.TT,u="1"===t.TD,this.isSuddenDeath&&(p=Number(t.ML)+Number(t.XT),o-=p),this._gameTimer||(this._gameTimer=new i),n&&!this._listeningToGameTimer?(this._gameTimer.addEventListener(r.TICK,this._delegate_updateTimerText),this._listeningToGameTimer=!0):n||(this._listeningToGameTimer&&(this._gameTimer.removeEventListener(r.TICK,this._delegate_updateTimerText),this._listeningToGameTimer=!1),(!e||e&&this.clearOnKill)&&this.setText("")),this._gameTimer.updateTimerValues(a,o,s,_,u))},t.prototype.stemUpdateHandler=function(){this.updateTimerValues(!1)},t.prototype.detatchStem=function(){this.updateTimerValues(!0);e.prototype.detatchStem.call(this)},t.prototype.setStem=function(e){this.stem&&this.stem===e||(this.detatchStem(),this.stem=e)},t.prototype._updateTimerText=function(e){this.setText(e.timerString)},t}(a);__decorate([override],t.prototype,"toString");__decorate([override],t.prototype,"initialize");__decorate([override],t.prototype,"stemUpdateHandler");__decorate([override],t.prototype,"detatchStem");__decorate([override],t.prototype,"setStem");e.GameTimerTextNode=t}(ns_inplay_general||(ns_inplay_general={})),function(e){var t,n=(ns_gen5_data.Attribute,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.initialize=function(){},t.prototype.stemDeleteHandler=function(){},t.prototype.detatchStem=function(){},t.prototype.recursiveDetatchStem=function(){},t}(e.GameTimer));e.GameTimerWithStemPrivateBase=n;ns_gen5_ui.StemBaseMixin.call(n.prototype);t=function(e){function t(t){var n=e.call(this)||this;return n.stem=t,n.initialize(),n.stemUpdateHandler(null),n}return __extends(t,e),t.prototype.toString=function(){return"[GameTimerWithStem]"},t.prototype.stemUpdateHandler=function(){var t=this.stem.data;this.updateTimerValues(t.TU,Number(t.TM),Number(t.TS),"1"===t.TT)},t}(n);__decorate([override],t.prototype,"toString");e.GameTimerWithStem=t}(ns_inplay_general||(ns_inplay_general={})),function(e){var t,n=ns_gen5_util.Delegate,i=(ns_gen5_data.Attribute,e.GameTimer),r=e.GameTimerEvent,a=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.initialize=function(){},t.prototype.stemUpdateHandler=function(){},t.prototype.stemDeleteHandler=function(){},t.prototype.detatchStem=function(){},t.prototype.recursiveDetatchStem=function(){},t}(ns_gen5_events.EventDispatcher);e.GameTimerEventDispatcherBase=a;ns_gen5_ui.StemBaseMixin.call(a.prototype);t=function(e){function t(){var t=e.call(this)||this;return t._gameTimer=null,t._listeningToGameTimer=!1,t._delegate_updateTimerText=new n(t,t._updateTimerText),t}return __extends(t,e),t.prototype.toString=function(){return"[GameTimerEventDispatcher]"},t.prototype.initialize=function(){e.prototype.initialize.call(this);this.stem&&this.updateTimerValues(!1)},t.prototype.updateTimerValues=function(e){var t,n,a,o,s,_,u;this.stem&&(t=this.stem.data,n=e?!1:"1"===t.DC,a=t.TU,o=Number(t.TM),s=Number(t.TS),_=e||!a?!1:n&&"1"===t.TT,u="1"===t.TD,this._gameTimer||(this._gameTimer=new i),n&&!this._listeningToGameTimer?(this._gameTimer.addEventListener(r.TICK,this._delegate_updateTimerText),this._listeningToGameTimer=!0):!n&&this._listeningToGameTimer&&(this._gameTimer.removeEventListener(r.TICK,this._delegate_updateTimerText),this._listeningToGameTimer=!1,this.dispatchEvent(new r(r.TICK,""))),this._gameTimer.updateTimerValues(a,o,s,_,u))},t.prototype.stemUpdateHandler=function(){this.updateTimerValues(!1)},t.prototype.detatchStem=function(){this.updateTimerValues(!0);e.prototype.detatchStem.call(this)},t.prototype.setStem=function(e){this.detatchStem();this.stem=e;this.initialize()},t.prototype._updateTimerText=function(e){this.dispatchEvent(new r(r.TICK,e.timerString))},t}(a);__decorate([override],t.prototype,"toString");__decorate([override],t.prototype,"initialize");__decorate([override],t.prototype,"stemUpdateHandler");__decorate([override],t.prototype,"detatchStem");e.GameTimerEventDispatcher=t}(ns_inplay_general||(ns_inplay_general={})),function(e){var t=function(e){function t(t,n){var i=e.call(this,t)||this;return i.data=n,i}return __extends(t,e),t.prototype.toString=function(){return"[FixtureDataProcessorEvent type="+this.type+"]"},t}(ns_gen5_events.Event365);t.SCORE_CHANGED="scoreChanged";t.PERIOD_CHANGED="periodChanged";t.TIME_CHANGED="timeChanged";t.RESULT_CHANGED="resultChanged";t.FIXTURE_LINK_CREATED="fixtureLinkCreated";__decorate([override],t.prototype,"toString");e.FixtureDataProcessorEvent=t}(ns_inplay_events||(ns_inplay_events={})),function(e){var t=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.toString=function(){return"[InPlayCastEvent type="+this.type+"]"},t}(ns_gen5_events.Event365);t.CAST_SELECTOR_INDEX_CHANGED="castSelectorIndexChanged";t.CAST_CHECK_CHANGED="castCheckChanged";t.CAST_PARTICIPANT_ADDED="castParticipantAdded";t.CAST_PARTICIPANT_REMOVED="castParticipantRemoved";t.CAST_MARKETRACINGCASTBUTTON_CLICKED="castMarketRacingCastButtonClicked";__decorate([override],t.prototype,"toString");e.InPlayCastEvent=t}(ns_inplay_events||(ns_inplay_events={})),function(e){var t=function(e){function t(t){var n=e.call(this,t)||this;return n.data=null,n}return __extends(t,e),t.prototype.toString=function(){return"[InPlayNavigationEvent type="+this.type+"]"},t}(ns_gen5_events.Event365);t.OVERVIEW_CLASSIFICATION_SELECTED="overviewClassificationSelected";t.OVERVIEW_ALT_CLASSIFICATION_SELECTED="overviewAltClassificationSelected";t.OVERVIEW_MAX_PARTICIPANT_COUNT_CHANGED="overviewMaxParticipantCountChanged";t.OVERVIEW_FIXTURE_DELETED="overviewFixtureDeleted";t.FIXTURE_SELECTED="fixtureSelected";t.FIXTURE_STREAMING_STATUS_CHANGED="fixtureStreamingStatusChanged";t.EVENTVIEW_EXIT="eventviewExit";t.MARKET_SELECTOR_INDEX_CHANGED="marketSelectorIndexChanged";t.MARKET_HEADERS_CHANGED="marketHeadersChanged";t.MARKET_STEM_BROADCAST="marketSnapshotReceived";t.MARKET_INSERT_RECEIVED="marketInsertReceived";t.REMOVING_OVERVIEW="removingOverview";t.SHOW_STREAMING="showStreaming";t.SHOW_MESSAGE="showMessage";t.SECONDARY_FIXTURE_STATUS_CHANGED="secondaryFixtureStatusChanged";t.CHILD_IS_EVENT_LINK="childIsEventLink";t.SHOW_STREAMING_AUDIO="showStreamingAudio";t.MATCHLIVE_LOADCONTENT="MatchLiveLoadContent";t.MATCHLIVE_CONTENTLOADED="MatchLiveContentLoaded";t.MATCHLIVE_DISABLED="MatchLiveDisabled";t.MATCHLIVE_DISPOSED="MatchLiveContainerDisposed";t.MATCHLIVE_REMOVED="MatchLiveRemoved";t.VIEWACTIVATED="ViewActivated";t.NO_VIEW_AVAILABLE="NoViewAvailable";t.DEFAULT_VIEW_SELECTED="defaultViewSelected";t.APPLY_TEAM_KIT_COLORS="ApplyTeamKitColors";t.CHANGE_EVENT_MENU_SHOWN="ChangeEventMenuShown";t.CHANGE_EVENT_MENU_HIDDEN="ChangeEventMenuHidden";t.POPUP_SHOWN="PopupShown";t.POPUP_HIDDEN="PopupHidden";t.PHONE_ONLY="PhoneOnly";t.MARKET_PREFERENCE_CHANGED="MarketPreferenceChanged";t.LIVE_ALERT_SELECTED="LiveAlertSelected";t.LIVE_ALERT_CHECK_STATE="LiveAlertCheckState";t.LIVE_ALERT_HEADER_ADDED="LiveAlertHeaderAdded";t.HIDE_INPLAY_MYBETS="HideInPlayMyBets";t.SHOW_INPLAY_MYBETS="ShowInPlayMyBets";t.INPLAY_MYBETS_VIEW_REQUESTED="InPlayMyBetsViewRequested";t.INPLAY_MYBETS_VIEW="InPlayMyBetsView";t.INPLAY_MARKETS_VIEW="InPlayMarketsView";t.WIDTH_STATE_CHANGE="WidthStateChanged";t.SHOW_BETCALL_INFO="BetCallInfo";t.SHOW_CUSTOMERCALL_C2R_POPUP="CustomerToCustomerCall";t.SHOW_CUSTOMERCALL_C2C_POPUP="CustomerToRepresentativeCall";t.OPEN_BETS_UPDATED="OpenBetsUpdated";__decorate([override],t.prototype,"toString");e.InPlayNavigationEvent=t}(ns_inplay_events||(ns_inplay_events={})),function(e){var t=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.toString=function(){return"[InPlayEventViewEvent type="+this.type+"]"},t}(ns_gen5_events.Event365);t.MARKET_PARTICIPANT_SORT_ORDER_CHANGED="marketParticipantSortOrderChanged";t.SECONDARY_ODDS_REMOVED="secondaryOddsRemoved";t.LIVE_ALERT_HEADER_VISIBLE="LiveAlertHeaderVisible";t.LINE_UP_POPUP_CLOSED="LineUpPopupClosed";t.STATS_POPUP_CLOSED="StatsPopupClosed";__decorate([override],t.prototype,"toString");e.InPlayEventViewEvent=t}(ns_inplay_events||(ns_inplay_events={})),function(e){var t=function(e){function t(t,n){var i=e.call(this,t)||this;return i.data=n,i}return __extends(t,e),t.prototype.toString=function(){return"[InPlayEventDataEvent type="+this.type+"]"},t}(ns_gen5_events.Event365);t.INPLAY_EVENT_ID_AVAILABLE="inPlayEventIdAvailable";t.INPLAY_EVENT_ID_DISPOSED="inPlayEventIdDisposed";__decorate([override],t.prototype,"toString");e.InPlayEventDataEvent=t}(ns_inplay_events||(ns_inplay_events={})),function(e){var t=function(e){function t(t,n){var i=e.call(this,t)||this;return i._messageKey=n,i}return __extends(t,e),t.prototype.toString=function(){return"[InPlayPopupEvent type="+this.type+"]"},t.prototype.getMessageKey=function(){return this._messageKey},t}(ns_gen5_events.Event365);t.SHOW="show";t.SHOW_LOGIN="showLogin";__decorate([override],t.prototype,"toString");e.InPlayPopupEvent=t}(ns_inplay_events||(ns_inplay_events={})),function(e){var t=function(e){function t(t){var n=e.call(this,t)||this;return n.isShowingTimeOfTenthTee=!1,n}return __extends(t,e),t.prototype.toString=function(){return"[ParticipantGolfCouponEvent type="+this.type+"]"},t}(ns_gen5_events.Event365);t.CURRENT_PROGRESS_SHOWING_TIME_OF_TENTH_TEE="currentProgressShowingTimeTillTenthTee";__decorate([override],t.prototype,"toString");e.ParticipantGolfCouponEvent=t}(ns_inplay_events||(ns_inplay_events={})),function(e){var t=function(e){function t(t){var n=e.call(this,t)||this;return n.data=null,n.isStreamingInline=!1,n.canStreamInline=!1,n.streamUrl=null,n}return __extends(t,e),t.prototype.toString=function(){return"[StreamingEvent type="+this.type+"]"},t}(ns_gen5_events.Event365);t.WATCH_STREAM="watchStream";t.STOP_WATCHING_STREAM="stopStream";t.NATIVE_VIDEO_DETATCHED="nativeVideoClosed";t.STREAM_INLINE="streamInline";t.STREAM_INLINE_FAILED="streamInlineFailed";t.STREAM_LOADING="streamLoading";t.STREAM_LOADED="streamLoaded";__decorate([override],t.prototype,"toString");e.StreamingEvent=t}(ns_inplay_events||(ns_inplay_events={})),function(e){var t=function(e){function t(t,n){var i=e.call(this,t)||this;return i.data=n,i}return __extends(t,e),t.prototype.toString=function(){return"[ScoreboardEvent type="+this.type+"]"},t}(ns_gen5_events.Event365);t.LINEUP_SHOW="lineupShow";t.STATS_SHOW="statsShow";__decorate([override],t.prototype,"toString");e.ScoreboardEvent=t}(ns_inplay_events||(ns_inplay_events={})),function(e){var t=function(e){function t(t,n){var i=e.call(this,t)||this;return i.createItemDelegate=n,i}return __extends(t,e),t.prototype.toString=function(){return"[ScheduleCreationEvent type="+this.type+"]"},t}(ns_gen5_events.Event365);t.SCHEDULE_CREATION="scheduleCreation";__decorate([override],t.prototype,"toString");e.ScheduleCreationEvent=t}(ns_inplay_events||(ns_inplay_events={})),function(e){var t=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.toString=function(){return"[MatchLiveButtonEvent type="+this.type+"]"},t}(ns_gen5_events.Event365);t.BUTTON_SELECTED="matchLiveButtonSelected";__decorate([override],t.prototype,"toString");e.MatchLiveButtonEvent=t}(ns_inplay_events||(ns_inplay_events={})),function(e){var t=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.toString=function(){return"[MediaManagerEvent]"},t}(ns_gen5_events.Event365);t.VIEW_STATUS={NONE:0,MATCH_LIVE:1,LIVE_STREAMING:2};t.MATCH_LIVE_POPULATED="matchLivePopulated";t.MEDIA_STREAM_POPULATED="mediaStreamPopulated";t.MEDIA_AVAILIABLE="mediaAvailable";t.NO_MEDIA="noMedia";t.LOAD_MATCH_LIVE="loadMatchLive";t.LOAD_MEDIA_STREAM="loadMediaStream";__decorate([override],t.prototype,"toString");e.MediaManagerEvent=t}(ns_inplay_events||(ns_inplay_events={})),function(e){var t=ns_inplay_events.MediaManagerEvent,n=(ns_gen5_data.Attribute,function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.classification=null,t.matchLiveGrabVideoDelegate=null,t.matchLiveDropVideoDelegate=null,t.isShowingNativeStream=!1,t}return __extends(n,e),n.prototype.toString=function(){return"[MediaManager]"},n.prototype.populate=function(e){var n,i,r;this._stem=e;i=Number(this._stem.data.VI);r=-1==document.getElementsByTagName("html")[0].getAttribute("class").indexOf("no-sp-"+i);Number(this._stem.data.SV)>0?n=new t(t.MATCH_LIVE_POPULATED):i>0&&r&&(n=new t(t.MEDIA_STREAM_POPULATED));n&&(n.data=e,this.dispatchEvent(n))},n.prototype.unpopulate=function(){this.dispatchEvent(new t(t.NO_MEDIA))},n.prototype.getStem=function(){return this._stem},n.prototype.stopStream=function(){this.dispatchEvent(new t(t.LOAD_MATCH_LIVE))},n}(ns_gen5_events.EventDispatcher));__decorate([override],n.prototype,"toString");e.MediaManager=n}(ns_inplaylib_media||(ns_inplaylib_media={})),function(e){var t=e.MediaManager,n=function(){function e(){}return e}();n.mediaManager=new t;n.v7MatchLiveEnabledClassifications=["1","3","8","13","17","18","19","78","91","110"];n.selectedOverviewMarketId=null;n.marketIdGroups={};e.Locator=n}(ns_inplaylib_media||(ns_inplaylib_media={}));__extends=this&&this.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])};return function(d,b){function __(){this.constructor=d}extendStatics(d,b);d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}(),function(Typescript){var Application;(function(Application_1){var Application=function(){function Application(abstractFactory){this.initialWindowWidth=window.outerWidth;this._abstractFactory=abstractFactory;this._documentReadyObservers=[];this._windowReadyObservers=[];this._windowResizeObservers=[];this._windowRotateObservers=[];this._classificationChangedObservers=[];this._streamingPlayerLoadedObservers=[]}return Application.prototype.initialise=function(initialiser,componentName){return initialiser.initialise(this,this._abstractFactory.createInstance(componentName)),this},Application.prototype.addDocumentReadyObserver=function(observer){this._documentReadyObservers.push(observer)},Application.prototype.addWindowReadyObserver=function(observer){this._windowReadyObservers.push(observer)},Application.prototype.addWindowResizeObserver=function(observer){this._windowResizeObservers.push(observer)},Application.prototype.addWindowRotateObserver=function(observer){this._windowRotateObservers.push(observer)},Application.prototype.addClassificationChangedObserver=function(observer){this._classificationChangedObservers.push(observer)},Application.prototype.addStreamingPlayerLoadedObserver=function(observer){this._streamingPlayerLoadedObservers.push(observer)},Application.prototype.notifyDocumentReady=function(){this._documentReadyObservers.forEach(function(observer){observer.documentReady()})},Application.prototype.notifyWindowReady=function(){this._windowReadyObservers.forEach(function(observer){observer.windowReady()})},Application.prototype.notifyWindowResize=function(){this._windowResizeObservers.forEach(function(observer){observer.windowResize()})},Application.prototype.notifyWindowRotate=function(){this._windowRotateObservers.forEach(function(observer){observer.windowRotate()})},Application.prototype.notifyClassificationChanged=function(classificationID){this._classificationChangedObservers.forEach(function(observer){observer.classifcationChanged(classificationID)})},Application.prototype.notifyStreamingPlayerLoaded=function(){this._streamingPlayerLoadedObservers.forEach(function(observer){observer.streamingPlayerLoaded()})},Application}();Application_1.Application=Application})(Application=Typescript.Application||(Typescript.Application={}))}(Typescript||(Typescript={})),function(Typescript){var Application;(function(Application){var ApplicationConfig=function(){function ApplicationConfig(){}return ApplicationConfig.prototype.setConnectionDetails=function(value){this.connectionDetails=value},ApplicationConfig.prototype.getConnectionDetails=function(){return this.connectionDetails},ApplicationConfig.prototype.setPrivateConnectionDetails=function(value){this.privateConnectionDetails=value},ApplicationConfig.prototype.getPrivateConnectionDetails=function(){return this.privateConnectionDetails},ApplicationConfig.prototype.fallbackConnectionEnabled=function(){return!1},ApplicationConfig.prototype.getFallbackConnectionDetails=function(){return null},ApplicationConfig.prototype.getPrivateFallbackConnectionDetails=function(){return null},ApplicationConfig.prototype.hasSessionExpired=function(){return!1},ApplicationConfig}();Application.ApplicationConfig=ApplicationConfig})(Application=Typescript.Application||(Typescript.Application={}))}(Typescript||(Typescript={})),function(Typescript){var Application;(function(Application){var DocumentFactory=function(){function DocumentFactory(){}return DocumentFactory.prototype.createDocument=function(){return document},DocumentFactory}();Application.DocumentFactory=DocumentFactory})(Application=Typescript.Application||(Typescript.Application={}))}(Typescript||(Typescript={})),function(Typescript){var Application;(function(Application){var DomQuery=function(){function DomQuery(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return DomQuery.prototype.elementExists=function(selector){return this._jqueryObjectFactory.createObjectForSelector(selector).length>0},DomQuery}();Application.DomQuery=DomQuery})(Application=Typescript.Application||(Typescript.Application={}))}(Typescript||(Typescript={})),function(IoC){var Lifestyle;(function(Lifestyle){Lifestyle[Lifestyle.Singleton=0]="Singleton";Lifestyle[Lifestyle.Transient=1]="Transient"})(Lifestyle=IoC.Lifestyle||(IoC.Lifestyle={}))}(IoC||(IoC={})),function(IoC){var ComponentRegistration=function(){function ComponentRegistration(name,componentType,lifestyle){lifestyle===void 0&&(lifestyle=IoC.Lifestyle.Transient);this.name=name;this.componentType=componentType;this.lifestyle=lifestyle}return ComponentRegistration.prototype.withLifestyle=function(lifestyle){return this.lifestyle=lifestyle,this},ComponentRegistration}();IoC.ComponentRegistration=ComponentRegistration}(IoC||(IoC={})),function(Typescript){var Application;(function(Application){var Initialisers;(function(Initialisers){var InitialiserBase=function(){function InitialiserBase(action){this._action=action}return InitialiserBase.prototype.initialise=function(application,instance){this._instance=instance;this.addObservers(application)},InitialiserBase.prototype.invokeAction=function(){this._action(this._instance)},InitialiserBase}();Initialisers.InitialiserBase=InitialiserBase})(Initialisers=Application.Initialisers||(Application.Initialisers={}))})(Application=Typescript.Application||(Typescript.Application={}))}(Typescript||(Typescript={})),function(Typescript){var Application;(function(Application){var Initialisers;(function(Initialisers){var DocumentReadyInitialiser=function(_super){function DocumentReadyInitialiser(action){return _super.call(this,action)||this}return __extends(DocumentReadyInitialiser,_super),DocumentReadyInitialiser.prototype.addObservers=function(application){application.addDocumentReadyObserver(this)},DocumentReadyInitialiser.prototype.documentReady=function(){this.invokeAction()},DocumentReadyInitialiser}(Initialisers.InitialiserBase);Initialisers.DocumentReadyInitialiser=DocumentReadyInitialiser})(Initialisers=Application.Initialisers||(Application.Initialisers={}))})(Application=Typescript.Application||(Typescript.Application={}))}(Typescript||(Typescript={})),function(Typescript){var Application;(function(Application){var Initialisers;(function(Initialisers){var WindowResizeInitialiser=function(_super){function WindowResizeInitialiser(action){return _super.call(this,action)||this}return __extends(WindowResizeInitialiser,_super),WindowResizeInitialiser.prototype.addObservers=function(application){application.addWindowResizeObserver(this)},WindowResizeInitialiser.prototype.windowResize=function(){this.invokeAction()},WindowResizeInitialiser}(Initialisers.InitialiserBase);Initialisers.WindowResizeInitialiser=WindowResizeInitialiser})(Initialisers=Application.Initialisers||(Application.Initialisers={}))})(Application=Typescript.Application||(Typescript.Application={}))}(Typescript||(Typescript={})),function(Typescript){var Application;(function(Application){var Initialisers;(function(Initialisers){var StreamingPlayerLoadedInitialiser=function(_super){function StreamingPlayerLoadedInitialiser(action){return _super.call(this,action)||this}return __extends(StreamingPlayerLoadedInitialiser,_super),StreamingPlayerLoadedInitialiser.prototype.addObservers=function(application){application.addStreamingPlayerLoadedObserver(this)},StreamingPlayerLoadedInitialiser.prototype.streamingPlayerLoaded=function(){this.invokeAction()},StreamingPlayerLoadedInitialiser}(Initialisers.InitialiserBase);Initialisers.StreamingPlayerLoadedInitialiser=StreamingPlayerLoadedInitialiser})(Initialisers=Application.Initialisers||(Application.Initialisers={}))})(Application=Typescript.Application||(Typescript.Application={}))}(Typescript||(Typescript={})),function(IoC){var Kernel=function(){function Kernel(componentCache){this.componentCache=componentCache;this._registeredComponents=[]}return Kernel.prototype.nameIsRegistered=function(name){for(var i=0;i<this._registeredComponents.length;i++)if(this._registeredComponents[i].name===name)return!0;return!1},Kernel.prototype.registerComponent=function(componentRegistration){this._registeredComponents.push(componentRegistration)},Kernel.prototype.getComponentRegistration=function(name){for(var i=0;i<this._registeredComponents.length;i++)if(this._registeredComponents[i].name===name)return this._registeredComponents[i];throw new Error("No component registered for "+name);},Kernel}();IoC.Kernel=Kernel}(IoC||(IoC={})),function(IoC){var ComponentInstance=function(){function ComponentInstance(name,instance){this.name=name;this.instance=instance}return ComponentInstance}();IoC.ComponentInstance=ComponentInstance}(IoC||(IoC={})),function(IoC){var ComponentCache=function(){function ComponentCache(){this._componentInstances=[]}return ComponentCache.prototype.hasInstance=function(name){for(var i=0;i<this._componentInstances.length;i++)if(this._componentInstances[i].name===name)return!0;return!1},ComponentCache.prototype.getInstance=function(name){for(var i=0;i<this._componentInstances.length;i++)if(this._componentInstances[i].name===name)return this._componentInstances[i].instance;throw new Error("Component cache doesn't have an instance for component named '"+name+"'");},ComponentCache.prototype.addInstance=function(name,instance){this._componentInstances.push(new IoC.ComponentInstance(name,instance))},ComponentCache}();IoC.ComponentCache=ComponentCache}(IoC||(IoC={})),function(IoC){var Pipeline;(function(Pipeline){var ResolvePipeline=function(){function ResolvePipeline(){this._stages=[]}return ResolvePipeline.prototype.execute=function(context){for(var i=0;i<this._stages.length;i++)context.continueProcessing&&this._stages[i].execute(context)},ResolvePipeline.prototype.addStage=function(stage){this._stages.push(stage)},ResolvePipeline}();Pipeline.ResolvePipeline=ResolvePipeline})(Pipeline=IoC.Pipeline||(IoC.Pipeline={}))}(IoC||(IoC={})),function(IoC){var ResolveContext=function(){function ResolveContext(kernel,name,depth,suppliedArgs){this.kernel=kernel;this.name=name;this.depth=depth;this.suppliedArgs=suppliedArgs;this.continueProcessing=!0}return ResolveContext}();IoC.ResolveContext=ResolveContext}(IoC||(IoC={})),function(IoC){var Pipeline;(function(Pipeline){var Stages;(function(Stages){var CheckDepthForCyclicDependency=function(){function CheckDepthForCyclicDependency(){this._depthThreshold=10}return CheckDepthForCyclicDependency.prototype.execute=function(context){this.checkDepth(context.depth,context.name)},CheckDepthForCyclicDependency.prototype.checkDepth=function(depth,name){if(depth>this._depthThreshold)throw new Error("Cyclic dependency detected whilst resolving component named '"+name+"'.");},CheckDepthForCyclicDependency}();Stages.CheckDepthForCyclicDependency=CheckDepthForCyclicDependency})(Stages=Pipeline.Stages||(Pipeline.Stages={}))})(Pipeline=IoC.Pipeline||(IoC.Pipeline={}))}(IoC||(IoC={})),function(IoC){var Pipeline;(function(Pipeline){var Stages;(function(Stages){var CheckSuppliedArgsForUnRegisteredComponents=function(){function CheckSuppliedArgsForUnRegisteredComponents(){}return CheckSuppliedArgsForUnRegisteredComponents.prototype.execute=function(context){if(context.suppliedArgs)for(var argumentName in context.suppliedArgs)if(context.suppliedArgs.hasOwnProperty(argumentName)&&argumentName===context.name&&!context.kernel.nameIsRegistered(context.name)){context.componentInstance=context.suppliedArgs[argumentName];context.continueProcessing=!1;break}},CheckSuppliedArgsForUnRegisteredComponents}();Stages.CheckSuppliedArgsForUnRegisteredComponents=CheckSuppliedArgsForUnRegisteredComponents})(Stages=Pipeline.Stages||(Pipeline.Stages={}))})(Pipeline=IoC.Pipeline||(IoC.Pipeline={}))}(IoC||(IoC={})),function(IoC){var Pipeline;(function(Pipeline){var Stages;(function(Stages){var CheckComponentIsRegistered=function(){function CheckComponentIsRegistered(){}return CheckComponentIsRegistered.prototype.execute=function(context){if(!context.kernel.nameIsRegistered(context.name)){context.componentInstance=null;context.continueProcessing=!1;throw new Error("IOC Component '"+context.name+"' hasn't been registered. Did you forget to register it?");}},CheckComponentIsRegistered}();Stages.CheckComponentIsRegistered=CheckComponentIsRegistered})(Stages=Pipeline.Stages||(Pipeline.Stages={}))})(Pipeline=IoC.Pipeline||(IoC.Pipeline={}))}(IoC||(IoC={})),function(IoC){var Pipeline;(function(Pipeline){var Stages;(function(Stages){var ObtainRegistration=function(){function ObtainRegistration(){}return ObtainRegistration.prototype.execute=function(context){context.componentRegistration=context.kernel.getComponentRegistration(context.name);context.componentRegistration===null&&(context.continueProcessing=!1,context.componentInstance=null)},ObtainRegistration}();Stages.ObtainRegistration=ObtainRegistration})(Stages=Pipeline.Stages||(Pipeline.Stages={}))})(Pipeline=IoC.Pipeline||(IoC.Pipeline={}))}(IoC||(IoC={})),function(IoC){var Pipeline;(function(Pipeline){var Stages;(function(Stages){var CheckCache=function(){function CheckCache(){}return CheckCache.prototype.execute=function(context){context.componentRegistration.lifestyle===IoC.Lifestyle.Singleton&&context.kernel.componentCache.hasInstance(context.name)&&(context.componentInstance=context.kernel.componentCache.getInstance(context.name),context.continueProcessing=!1)},CheckCache}();Stages.CheckCache=CheckCache})(Stages=Pipeline.Stages||(Pipeline.Stages={}))})(Pipeline=IoC.Pipeline||(IoC.Pipeline={}))}(IoC||(IoC={})),function(IoC){var Pipeline;(function(Pipeline){var Stages;(function(Stages){var GetDependencyNames=function(){function GetDependencyNames(){this._functionArguments=/^function\s*[^\(]*\(\s*([^\)]*)\)/m.source}return GetDependencyNames.prototype.execute=function(context){context.dependencyNames=this.getDependencyNames(context.componentRegistration)},GetDependencyNames.prototype.getDependencyNames=function(componentRegistration){if(componentRegistration.name==="")return this.noArguments();var result=componentRegistration.componentType.toString().match(this._functionArguments);return result===null?this.noArguments():result[1]===""?this.noArguments():result[1].split(" ").join("").split(",")},GetDependencyNames.prototype.noArguments=function(){return[]},GetDependencyNames}();Stages.GetDependencyNames=GetDependencyNames})(Stages=Pipeline.Stages||(Pipeline.Stages={}))})(Pipeline=IoC.Pipeline||(IoC.Pipeline={}))}(IoC||(IoC={})),function(IoC){var Pipeline;(function(Pipeline){var Stages;(function(Stages){var ResolveDependencies=function(){function ResolveDependencies(_resolver){this._resolver=_resolver}return ResolveDependencies.prototype.execute=function(context){var result=[],i;for(context.depth++,i=0;i<context.dependencyNames.length;i++)result.push(this._resolver.resolve(context.dependencyNames[i],context.depth,context.suppliedArgs));context.dependencies=result},ResolveDependencies}();Stages.ResolveDependencies=ResolveDependencies})(Stages=Pipeline.Stages||(Pipeline.Stages={}))})(Pipeline=IoC.Pipeline||(IoC.Pipeline={}))}(IoC||(IoC={})),function(IoC){var Pipeline;(function(Pipeline){var Stages;(function(Stages){var CreateInstance=function(){function CreateInstance(){}return CreateInstance.prototype.execute=function(context){function constr(){context.componentRegistration.componentType.apply(this,context.dependencies)}if(context.componentRegistration.componentType.apply===undefined)throw new Error("Component type for component named '"+context.name+"' does not have a defined apply function. Are you sure that you've registered a class for this component?");constr.prototype=context.componentRegistration.componentType.prototype;context.componentInstance=new constr},CreateInstance}();Stages.CreateInstance=CreateInstance})(Stages=Pipeline.Stages||(Pipeline.Stages={}))})(Pipeline=IoC.Pipeline||(IoC.Pipeline={}))}(IoC||(IoC={})),function(IoC){var Pipeline;(function(Pipeline){var Stages;(function(Stages){var CacheInstance=function(){function CacheInstance(){}return CacheInstance.prototype.execute=function(context){context.componentRegistration.lifestyle!==IoC.Lifestyle.Singleton||context.kernel.componentCache.hasInstance(context.name)||context.kernel.componentCache.addInstance(context.name,context.componentInstance)},CacheInstance}();Stages.CacheInstance=CacheInstance})(Stages=Pipeline.Stages||(Pipeline.Stages={}))})(Pipeline=IoC.Pipeline||(IoC.Pipeline={}))}(IoC||(IoC={})),function(IoC){var Resolver=function(){function Resolver(kernel,pipeline){this._kernel=kernel;this._pipeline=pipeline;this._pipeline.addStage(new IoC.Pipeline.Stages.CheckDepthForCyclicDependency);this._pipeline.addStage(new IoC.Pipeline.Stages.CheckSuppliedArgsForUnRegisteredComponents);this._pipeline.addStage(new IoC.Pipeline.Stages.CheckComponentIsRegistered);this._pipeline.addStage(new IoC.Pipeline.Stages.ObtainRegistration);this._pipeline.addStage(new IoC.Pipeline.Stages.CheckCache);this._pipeline.addStage(new IoC.Pipeline.Stages.GetDependencyNames);this._pipeline.addStage(new IoC.Pipeline.Stages.ResolveDependencies(this));this._pipeline.addStage(new IoC.Pipeline.Stages.CreateInstance);this._pipeline.addStage(new IoC.Pipeline.Stages.CacheInstance)}return Resolver.prototype.resolve=function(name,depth,suppliedArguments){depth===void 0&&(depth=1);var context=new IoC.ResolveContext(this._kernel,name,depth,suppliedArguments);return this._pipeline.execute(context),context.componentInstance},Resolver}();IoC.Resolver=Resolver}(IoC||(IoC={})),function(IoC){var Component=function(){function Component(_name){this._name=_name}return Component.named=function(name){return new Component(name)},Component.prototype.componentType=function(componentType){return new IoC.ComponentRegistration(this._name,componentType)},Component}();IoC.Component=Component}(IoC||(IoC={})),function(IoC){var IocContainer=function(){function IocContainer(kernel,resolver){this._kernel=kernel;this._resolver=resolver;this.registerTheResolverComponent()}return IocContainer.prototype.resolve=function(name){return this._resolver.resolve(name,1)},IocContainer.prototype.register=function(componentRegistration){return this._kernel.registerComponent(componentRegistration),this},IocContainer.prototype.install=function(installer){return installer.install(this),this},IocContainer.prototype.registerTheResolverComponent=function(){this.register(IoC.Component.named("kernel").componentType(IoC.Kernel).withLifestyle(IoC.Lifestyle.Singleton));this.register(IoC.Component.named("resolver").componentType(IoC.Resolver).withLifestyle(IoC.Lifestyle.Singleton));this._kernel.componentCache.addInstance("resolver",this._resolver)},IocContainer}();IoC.IocContainer=IocContainer}(IoC||(IoC={})),function(IoC){var Container=function(){function Container(){}return Container.bootstrap=function(){var kernel=new IoC.Kernel(new IoC.ComponentCache),pipeline=new IoC.Pipeline.ResolvePipeline,resolver=new IoC.Resolver(kernel,pipeline);return new IoC.IocContainer(kernel,resolver)},Container}();IoC.Container=Container}(IoC||(IoC={})),function(IoC){var Installers;(function(Installers){var ApplicationInstaller=function(){function ApplicationInstaller(){}return ApplicationInstaller.prototype.install=function(container){container.register(IoC.Component.named("application").componentType(Typescript.Application.Application).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("domQuery").componentType(Typescript.Application.DomQuery).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("documentFactory").componentType(Typescript.Application.DocumentFactory).withLifestyle(IoC.Lifestyle.Singleton))},ApplicationInstaller}();Installers.ApplicationInstaller=ApplicationInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(Typescript){var Components;(function(Components){var ExtraHandlebars;(function(ExtraHandlebars){var HandlebarHelpers=function(){function HandlebarHelpers(){}return HandlebarHelpers.prototype.registerHelper=function(name,func,inverse){Handlebars.registerHelper(name,func,inverse)},HandlebarHelpers.prototype.registerPartial=function(partialName,templateMarkup){Handlebars.registerPartial(partialName,templateMarkup)},HandlebarHelpers}();ExtraHandlebars.HandlebarHelpers=HandlebarHelpers})(ExtraHandlebars=Components.ExtraHandlebars||(Components.ExtraHandlebars={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(IoC){var Installers;(function(Installers){var HandlebarHelpersInstaller=function(){function HandlebarHelpersInstaller(){}return HandlebarHelpersInstaller.prototype.install=function(container){container.register(IoC.Component.named("handlebarHelpers").componentType(Typescript.Components.ExtraHandlebars.HandlebarHelpers).withLifestyle(IoC.Lifestyle.Singleton))},HandlebarHelpersInstaller}();Installers.HandlebarHelpersInstaller=HandlebarHelpersInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(Typescript){var Components;(function(Components){var JQueryComponents;(function(JQueryComponents){var JQueryObjectFactory=function(){function JQueryObjectFactory(){}return JQueryObjectFactory.prototype.createObjectForSelector=function(selector){return $(selector)},JQueryObjectFactory.prototype.createObjectForElement=function(element){return $(element)},JQueryObjectFactory.prototype.createObjectForArrayOfElements=function(elements){return $(elements)},JQueryObjectFactory.prototype.createObjectForArrayOfJQueryElements=function(elements){return $(elements)},JQueryObjectFactory.prototype.createObjectForCurrentWindow=function(){return $(window)},JQueryObjectFactory}();JQueryComponents.JQueryObjectFactory=JQueryObjectFactory})(JQueryComponents=Components.JQueryComponents||(Components.JQueryComponents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var JQueryComponents;(function(JQueryComponents){var JQueryXhrRequestFactory=function(){function JQueryXhrRequestFactory(){}return JQueryXhrRequestFactory.prototype.createXmlHttpRequest=function(url,settings){return $.ajax(url,settings)},JQueryXhrRequestFactory.prototype.createDeferred=function(){return $.Deferred()},JQueryXhrRequestFactory}();JQueryComponents.JQueryXhrRequestFactory=JQueryXhrRequestFactory})(JQueryComponents=Components.JQueryComponents||(Components.JQueryComponents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var ExtraHandlebars;(function(ExtraHandlebars){var HandlebarsTemplateFactory=function(){function HandlebarsTemplateFactory(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return HandlebarsTemplateFactory.prototype.createCompiledTemplate=function(selector){var templateSource=this._jqueryObjectFactory.createObjectForSelector(selector).html();return Handlebars.compile(templateSource)},HandlebarsTemplateFactory}();ExtraHandlebars.HandlebarsTemplateFactory=HandlebarsTemplateFactory})(ExtraHandlebars=Components.ExtraHandlebars||(Components.ExtraHandlebars={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(IoC){var AbstractFactory=function(){function AbstractFactory(resolver){this._resolver=resolver}return AbstractFactory.prototype.createInstance=function(name,suppliedArgs){return this._resolver.resolve(name,1,suppliedArgs)},AbstractFactory}();IoC.AbstractFactory=AbstractFactory}(IoC||(IoC={})),function(IoC){var Installers;(function(Installers){var FactoriesInstaller=function(){function FactoriesInstaller(){}return FactoriesInstaller.prototype.install=function(container){container.register(IoC.Component.named("jqueryObjectFactory").componentType(Typescript.Components.JQueryComponents.JQueryObjectFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("jqueryXhrRequestFactory").componentType(Typescript.Components.JQueryComponents.JQueryXhrRequestFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("handlebarsTemplateFactory").componentType(Typescript.Components.ExtraHandlebars.HandlebarsTemplateFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("abstractFactory").componentType(IoC.AbstractFactory).withLifestyle(IoC.Lifestyle.Singleton))},FactoriesInstaller}();Installers.FactoriesInstaller=FactoriesInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(Typescript){var Application;(function(Application){var InitialiseForSelector=function(){function InitialiseForSelector(domQuery){this._domQuery=domQuery}return InitialiseForSelector.prototype.elementExists=function(selector){return this._domQuery.elementExists(selector)},InitialiseForSelector}();Application.InitialiseForSelector=InitialiseForSelector})(Application=Typescript.Application||(Typescript.Application={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var Accordion;(function(Accordion_1){var InitialiseForSelector=Typescript.Application.InitialiseForSelector,Accordion=function(_super){function Accordion(accordionSectionsFactory,domQuery){var _this=_super.call(this,domQuery)||this;return _this._accordionSectionsFactory=accordionSectionsFactory,_this}return __extends(Accordion,_super),Accordion.prototype.initialiseForSelector=function(selector){this.elementExists(selector)&&(this._sections=this._accordionSectionsFactory.createAccordionSections(this,selector))},Accordion.prototype.closeAll=function(){this._sections.forEach(function(section){return section.close()})},Accordion}(InitialiseForSelector);Accordion_1.Accordion=Accordion})(Accordion=Components.Accordion||(Components.Accordion={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var Accordion;(function(Accordion){var AccordionSectionViewModel=function(){function AccordionSectionViewModel(accordionSectionElement,expandableElement,delay){var _this=this;this.isVisible=function(){return _this._expandableElement.is(":visible")};this.display=function(){return _this._expandableElement.css("display")};this.slideUp=function(){_this._expandableElement.slideUp(_this._delay);_this._accordionSectionElement.removeClass("active")};this.slideDown=function(){_this._expandableElement.slideDown(_this._delay);_this._accordionSectionElement.addClass("active")};this._accordionSectionElement=accordionSectionElement;this._expandableElement=expandableElement;this._delay=delay}return AccordionSectionViewModel}();Accordion.AccordionSectionViewModel=AccordionSectionViewModel})(Accordion=Components.Accordion||(Components.Accordion={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var Accordion;(function(Accordion){var AccordionSection=function(){function AccordionSection(_viewModel,_accordion){var _this=this;this._viewModel=_viewModel;this._accordion=_accordion;this.clickHandler=function(){_this._accordion.closeAll();_this.toggle()}}return AccordionSection.prototype.close=function(){this._viewModel.display()!=="none"&&this._viewModel.slideUp()},AccordionSection.prototype.toggle=function(){this._viewModel.isVisible()?this._viewModel.slideUp():this._viewModel.slideDown()},AccordionSection}();Accordion.AccordionSection=AccordionSection})(Accordion=Components.Accordion||(Components.Accordion={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var Accordion;(function(Accordion){var AccordionSectionsFactory=function(){function AccordionSectionsFactory(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return AccordionSectionsFactory.prototype.createAccordionSections=function(accordionParent,cssClass){var _this=this,clickHandlers=this._jqueryObjectFactory.createObjectForSelector(cssClass),result=[];return clickHandlers.each(function(index,handler){var accordionSectionElement=_this._jqueryObjectFactory.createObjectForElement(handler),expandableElement=accordionSectionElement.children(".accordion-section-body"),accordionSectionViewModel=new Accordion.AccordionSectionViewModel(accordionSectionElement,expandableElement,200),accordionSection=new Accordion.AccordionSection(accordionSectionViewModel,accordionParent);accordionSectionElement.click(accordionSection.clickHandler);result.push(accordionSection)}),result},AccordionSectionsFactory}();Accordion.AccordionSectionsFactory=AccordionSectionsFactory})(Accordion=Components.Accordion||(Components.Accordion={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(IoC){var Installers;(function(Installers){var AccordionInstaller=function(){function AccordionInstaller(){}return AccordionInstaller.prototype.install=function(container){container.register(IoC.Component.named("accordion").componentType(Typescript.Components.Accordion.Accordion).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("accordionSectionsFactory").componentType(Typescript.Components.Accordion.AccordionSectionsFactory).withLifestyle(IoC.Lifestyle.Singleton))},AccordionInstaller}();Installers.AccordionInstaller=AccordionInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(Typescript){var Components;(function(Components){var TabbedLayout;(function(TabbedLayout){var TabViewModel=function(){function TabViewModel(tabButton,tabSection,streamingMainBody,tabbedLayoutViewModel){this._enabled=!0;this._tabButton=tabButton;this._tabSection=tabSection;this._tabbedLayoutViewModel=tabbedLayoutViewModel;this.bindTabButtonClick(streamingMainBody)}return TabViewModel.prototype.showTabSection=function(){this._enabled&&(this._tabbedLayoutViewModel.hideAllTabs(),this._tabSection.show(),this.highlightTabButton())},TabViewModel.prototype.hideTabSection=function(){this._tabSection.hide();this.deEmphasiseTabButton()},TabViewModel.prototype.getCssClass=function(){return this._tabButton.attr("class")},TabViewModel.prototype.disableTabButton=function(){this._enabled=!1;this._tabButton.addClass("inactive");this.selectFirstEnabledTabIfCurrentlySelected()},TabViewModel.prototype.enableTabButton=function(){this._enabled=!0;this._tabButton.removeClass("inactive")},TabViewModel.prototype.enabled=function(){return this._enabled},TabViewModel.prototype.bindTabButtonClick=function(streamingMainBodySelector){var _this=this;this._tabButton.click(function(ev){ev.preventDefault();_this.showTabSection();_this.addTabClassToMainBody(streamingMainBodySelector)})},TabViewModel.prototype.selectFirstEnabledTabIfCurrentlySelected=function(){this._tabButton.hasClass("selected_promotion_nav_item")&&(this._tabbedLayoutViewModel.hideAllTabs(),this._tabbedLayoutViewModel.showFirstTab())},TabViewModel.prototype.highlightTabButton=function(){this._tabButton.addClass("selected_promotion_nav_item")},TabViewModel.prototype.deEmphasiseTabButton=function(){this._tabButton.removeClass("selected_promotion_nav_item")},TabViewModel.prototype.addTabClassToMainBody=function(streamingMainBodySelector){var tabClasses=this.getCssClass(),firstTabClass=tabClasses.split(" ")[0];streamingMainBodySelector.removeClass();streamingMainBodySelector.addClass(firstTabClass)},TabViewModel}();TabbedLayout.TabViewModel=TabViewModel})(TabbedLayout=Components.TabbedLayout||(Components.TabbedLayout={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var TabbedLayout;(function(TabbedLayout){var TabViewModelFactory=function(){function TabViewModelFactory(jqueryObjectFactory){this._streamingMainBody="#streaming-main-body-container";this._jqueryObjectFactory=jqueryObjectFactory}return TabViewModelFactory.prototype.createTabViewModels=function(selector,tabLayoutViewModel){var _this=this,buttons=this._jqueryObjectFactory.createObjectForSelector(selector),viewModels=[],streamingMainBody=this._jqueryObjectFactory.createObjectForSelector(this._streamingMainBody);return buttons.each(function(index,handler){var tabButton=_this._jqueryObjectFactory.createObjectForElement(handler),tabSection=_this._jqueryObjectFactory.createObjectForSelector("div.tab-section-wrapper div."+tabButton.attr("class"));viewModels.push(new TabbedLayout.TabViewModel(tabButton,tabSection,streamingMainBody,tabLayoutViewModel))}),viewModels},TabViewModelFactory}();TabbedLayout.TabViewModelFactory=TabViewModelFactory})(TabbedLayout=Components.TabbedLayout||(Components.TabbedLayout={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var LinQ;(function(LinQ){var Enumerable=function(){function Enumerable(array){this._array=array}return Enumerable.prototype.where=function(func){var enumerable=new LinQ.List([]);return this._array.forEach(function(i){func(i)&&enumerable.add(i)}),enumerable},Enumerable.prototype.groupBy=function(func){var enumerable=new LinQ.List([]);return this._array.forEach(function(i){var funcValue=func(i);enumerable.hasAny(function(x){return x.key===funcValue})?enumerable.firstOrDefault(function(x){return x.key===funcValue}).value.add(i):enumerable.add({key:funcValue,value:new LinQ.List([i])})}),enumerable},Enumerable.prototype.orderBy=function(func){var _this=this;return this._array.sort(function(a,b){return _this.getOrder(func(a),func(b))}),this},Enumerable.prototype.select=function(func){var result=new LinQ.List([]);return this._array.forEach(function(i){result.add(func(i))}),result},Enumerable.prototype.hasAny=function(func){return this.firstOrDefault(func)!==undefined},Enumerable.prototype.first=function(){return this._array[0]},Enumerable.prototype.firstOrDefault=function(func){return func?this.where(func).first():this.first()},Enumerable.prototype.last=function(){return new Enumerable(this._array.slice(0).reverse()).first()},Enumerable.prototype.lastOrDefault=function(func){return new Enumerable(this._array.slice(0).reverse()).firstOrDefault(func)},Enumerable.prototype.count=function(func){return func?this.where(func).count():this._array.length},Enumerable.prototype.elementAt=function(index){return this._array[index]},Enumerable.prototype.toArray=function(){return this._array},Enumerable.prototype.getOrder=function(valA,valB){switch(typeof valA){case"number":return valA-valB;case"string":return valA.toLowerCase()<valB.toLowerCase()?-1:valA.toLowerCase()>valB.toLowerCase()?1:0;case"boolean":return valA===valB?0:valA?1:-1}return 0},Enumerable}();LinQ.Enumerable=Enumerable})(LinQ=Typescript.LinQ||(Typescript.LinQ={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var TabbedLayout;(function(TabbedLayout){var Enumerable=Typescript.LinQ.Enumerable,TabbedLayoutViewModel=function(){function TabbedLayoutViewModel(tabViewModelFactory){this._tabViewModelFactory=tabViewModelFactory}return TabbedLayoutViewModel.prototype.initialise=function(tabButtonSelector){this._tabs=new Enumerable(this._tabViewModelFactory.createTabViewModels(tabButtonSelector,this))},TabbedLayoutViewModel.prototype.showFirstTab=function(){this._tabs.hasAny(function(x){return x.enabled()})&&this._tabs.firstOrDefault(function(x){return x.enabled()}).showTabSection()},TabbedLayoutViewModel.prototype.hideAllTabs=function(){this._tabs.toArray().forEach(function(t){return t.hideTabSection()})},TabbedLayoutViewModel.prototype.disableTab=function(cssClass){var tab=this._tabs.firstOrDefault(function(x){return x.getCssClass().indexOf(cssClass)>-1});tab!==undefined&&tab!==null&&tab.disableTabButton()},TabbedLayoutViewModel.prototype.enableTab=function(cssClass){var tab=this._tabs.firstOrDefault(function(x){return x.getCssClass().indexOf(cssClass)>-1});tab!==undefined&&tab!==null&&tab.enableTabButton()},TabbedLayoutViewModel}();TabbedLayout.TabbedLayoutViewModel=TabbedLayoutViewModel})(TabbedLayout=Components.TabbedLayout||(Components.TabbedLayout={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var TabbedLayout;(function(TabbedLayout_1){var InitialiseForSelector=Typescript.Application.InitialiseForSelector,TabbedLayout=function(_super){function TabbedLayout(tabbedLayoutViewModel,domQuery){var _this=_super.call(this,domQuery)||this;return _this._tabbedLayoutViewModel=tabbedLayoutViewModel,_this}return __extends(TabbedLayout,_super),TabbedLayout.prototype.initialiseForSelector=function(selector){this.elementExists(selector)&&(this._tabbedLayoutViewModel.initialise(selector),this._tabbedLayoutViewModel.showFirstTab())},TabbedLayout}(InitialiseForSelector);TabbedLayout_1.TabbedLayout=TabbedLayout})(TabbedLayout=Components.TabbedLayout||(Components.TabbedLayout={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var TabbedLayout;(function(TabbedLayout){var TabCommandFactory=function(){function TabCommandFactory(abstractFactory){this._abstractFactory=abstractFactory}return TabCommandFactory.prototype.createEnableCommand=function(){return this._abstractFactory.createInstance("tabbedLayoutViewModel")},TabCommandFactory.prototype.createDisableCommand=function(){return this._abstractFactory.createInstance("tabbedLayoutViewModel")},TabCommandFactory}();TabbedLayout.TabCommandFactory=TabCommandFactory})(TabbedLayout=Components.TabbedLayout||(Components.TabbedLayout={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(IoC){var Installers;(function(Installers){var TabbedLayoutInstaller=function(){function TabbedLayoutInstaller(){}return TabbedLayoutInstaller.prototype.install=function(container){container.register(IoC.Component.named("tabViewModelFactory").componentType(Typescript.Components.TabbedLayout.TabViewModelFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("tabbedLayoutViewModel").componentType(Typescript.Components.TabbedLayout.TabbedLayoutViewModel).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("tabbedLayout").componentType(Typescript.Components.TabbedLayout.TabbedLayout).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("tabCommandFactory").componentType(Typescript.Components.TabbedLayout.TabCommandFactory).withLifestyle(IoC.Lifestyle.Singleton))},TabbedLayoutInstaller}();Installers.TabbedLayoutInstaller=TabbedLayoutInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var StreamingEventsHandlebarHelpers=function(){function StreamingEventsHandlebarHelpers(handlebarHelpers){this._handlebarHelpers=handlebarHelpers}return StreamingEventsHandlebarHelpers.prototype.registerHelpers=function(){this._handlebarHelpers.registerHelper("formatTime",function(d){return(d.getHours()<10?"0":"")+d.getHours()+":"+(d.getMinutes()<10?"0":"")+d.getMinutes()});this._handlebarHelpers.registerHelper("formatDate",function(d){return d.toDateString()});this._handlebarHelpers.registerHelper("selected",function(k,s){return k===s?"selected":""})},StreamingEventsHandlebarHelpers}();StreamingEvents.StreamingEventsHandlebarHelpers=StreamingEventsHandlebarHelpers})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var Default=function(){function Default(){}return Default.clasification=-1,Default.date=1,Default}();StreamingEvents.Default=Default})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var InitialiseForSelector=Typescript.Application.InitialiseForSelector,StreamingEventsComingUp=function(_super){function StreamingEventsComingUp(streamingEventsHandlebarHelpers,streamingEventsSettingsFactory,streamingEventsQuery,streamingEventsTransform,streamingEventsRenderer,filterDropdownBinder,tabCommandFactory,domQuery){var _this=_super.call(this,domQuery)||this;return _this._selectedClassification=StreamingEvents.Default.clasification,_this._selectedDate=StreamingEvents.Default.date,_this._streamingEventsHandlebarHelpers=streamingEventsHandlebarHelpers,_this._streamingEventsSettingsFactory=streamingEventsSettingsFactory,_this._streamingEventsQuery=streamingEventsQuery,_this._streamingEventsTransform=streamingEventsTransform,_this._streamingEventsRenderer=streamingEventsRenderer,_this._filterDropdownBinder=filterDropdownBinder,_this._tabCommandFactory=tabCommandFactory,_this}return __extends(StreamingEventsComingUp,_super),StreamingEventsComingUp.prototype.getStreamingEvents=function(){return this._serviceResponse},StreamingEventsComingUp.prototype.initialiseForSelector=function(selector){var _this=this;this.elementExists(selector)&&(this._settings=this._streamingEventsSettingsFactory.createSettings(selector),this._streamingEventsHandlebarHelpers.registerHelpers(),this._streamingEventsQuery.getStreamingEvents(this._settings).done(function(data){return _this.serviceCallback(data)}))},StreamingEventsComingUp.prototype.classificationChangedHandler=function(selectedClassification){this._selectedClassification!==selectedClassification&&(this._selectedClassification=selectedClassification,this.render())},StreamingEventsComingUp.prototype.dateChangedHandler=function(selectedDate){this._selectedDate!==selectedDate&&(this._selectedDate=selectedDate,this.render())},StreamingEventsComingUp.prototype.serviceCallback=function(data){this._serviceResponse=data;this.hideTabIfNoStreamingEventsWereRetrieved(data);this.render()},StreamingEventsComingUp.prototype.render=function(){var _this=this,transformedData=this._streamingEventsTransform.transformData(this._serviceResponse,this._settings,this._selectedClassification,this._selectedDate);this._streamingEventsRenderer.render(transformedData,this._settings.templateSelector,this._settings.containerSelector);this._filterDropdownBinder.bind(this._settings,function(selectedClassification){return _this.classificationChangedHandler(selectedClassification)},function(selectedDate){return _this.dateChangedHandler(selectedDate)})},StreamingEventsComingUp.prototype.hideTabIfNoStreamingEventsWereRetrieved=function(data){data.length===0&&this._tabCommandFactory.createDisableCommand().disableTab("coming-up-tab")},StreamingEventsComingUp}(InitialiseForSelector);StreamingEvents.StreamingEventsComingUp=StreamingEventsComingUp})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var StreamingEventsSettings=function(){function StreamingEventsSettings(endpoint,languageId,countryCode,timezoneOffset,classificationId,templateSelector,containerSelector,allSportsText,todayText,tomorrowText,classificationFilterSelector,dateFilterSelector){this.endpoint=endpoint;this.languageId=languageId;this.countryCode=countryCode;this.timezoneOffset=timezoneOffset;this.classificationId=classificationId;this.templateSelector=templateSelector;this.containerSelector=containerSelector;this.allSportsText=allSportsText;this.todayText=todayText;this.tomorrowText=tomorrowText;this.classificationFilterSelector=classificationFilterSelector;this.dateFilterSelector=dateFilterSelector}return StreamingEventsSettings}();StreamingEvents.StreamingEventsSettings=StreamingEventsSettings})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var Services;(function(Services){var LanguageProfile=function(){function LanguageProfile(languageId,cultureCode,cultureCode2,languageCode,supportsEmbeddedFonts,isAsianRegion,allowCapitalisation){this.languageId=languageId;this.cultureCode=cultureCode;this.cultureCode2=cultureCode2;this.languageCode=languageCode;this.supportsEmbeddedFonts=supportsEmbeddedFonts;this.isAsianRegion=isAsianRegion;this.allowCapitalisation=allowCapitalisation}return LanguageProfile}();Services.LanguageProfile=LanguageProfile})(Services=Components.Services||(Components.Services={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var Services;(function(Services){var LanguageSettings=function(){function LanguageSettings(){}return LanguageSettings.SelectLanguageProfile=function(value){value==0&&(value=1);LanguageSettings.selectedProfile=LanguageSettings.languageProfiles[value]},LanguageSettings.getRegionIsAsian=function(){return LanguageSettings.selectedProfile.isAsianRegion},LanguageSettings.getLanguageId=function(){return LanguageSettings.selectedProfile.languageId},LanguageSettings.allowCapitalisation=function(){return LanguageSettings.selectedProfile.allowCapitalisation},LanguageSettings.getLanguageCode=function(){return this.selectedProfile.languageCode},LanguageSettings.getCultureCode=function(){return this.selectedProfile.cultureCode},LanguageSettings.getCultureCode2=function(){return this.selectedProfile.cultureCode2},LanguageSettings.init=function(){LanguageSettings.languageProfiles={1:new Services.LanguageProfile(1,"en","en","en-GB",!0,!1,!0),2:new Services.LanguageProfile(2,"zht","zh-cht","ch",!1,!0,!1),3:new Services.LanguageProfile(3,"es","es","es",!0,!1,!0),4:new Services.LanguageProfile(4,"fr","fr","fr",!0,!1,!0),5:new Services.LanguageProfile(5,"de","de","de",!0,!1,!0),6:new Services.LanguageProfile(6,"it","it","it",!0,!1,!0),7:new Services.LanguageProfile(7,"da","da","da",!0,!1,!0),8:new Services.LanguageProfile(8,"sv","sv","sv",!0,!1,!0),9:new Services.LanguageProfile(9,"nn","nn","no",!0,!1,!0),10:new Services.LanguageProfile(10,"zh","zh-chs","zh-cn",!1,!0,!1),19:new Services.LanguageProfile(19,"bg","bg","bg",!0,!1,!0),20:new Services.LanguageProfile(20,"el","el","el",!0,!1,!1),21:new Services.LanguageProfile(21,"pl","pl","pl",!0,!1,!0),22:new Services.LanguageProfile(22,"pt","pt","pt",!0,!1,!0),23:new Services.LanguageProfile(23,"ro","ro","ro",!0,!1,!0),24:new Services.LanguageProfile(24,"cs","cs","cs",!0,!1,!0),25:new Services.LanguageProfile(25,"hu","hu","hu",!0,!1,!0),26:new Services.LanguageProfile(26,"sk","sk","sk",!0,!1,!0),28:new Services.LanguageProfile(28,"nl","nl","nl-nl",!0,!1,!0),29:new Services.LanguageProfile(29,"et","et","et-EE",!0,!1,!0),30:new Services.LanguageProfile(30,"en","en","en-AU",!0,!1,!0)}},LanguageSettings}();Services.LanguageSettings=LanguageSettings;LanguageSettings.init()})(Services=Components.Services||(Components.Services={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var StreamingEventsSettingsFactory=function(){function StreamingEventsSettingsFactory(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return StreamingEventsSettingsFactory.prototype.createSettings=function(selector){var element=this._jqueryObjectFactory.createObjectForSelector(selector),endpoint=element.data("endpoint"),languageId=element.data("language-id"),countryCode=element.data("country-code"),timezoneOffset=element.data("timezone-offset"),classificationId=element.data("classification-id"),templateSelector=element.data("template-selector"),allSportsText=element.data("all-sports-text"),todayText=element.data("today-text"),tomorrowText=element.data("tomorrow-text"),classificationFilterSelector=element.data("classification-filter-selector"),dateFilterSelector=element.data("date-filter-selector");return Typescript.Components.Services.LanguageSettings.SelectLanguageProfile(languageId),new StreamingEvents.StreamingEventsSettings(endpoint,languageId,countryCode,timezoneOffset,classificationId,templateSelector,selector,allSportsText,todayText,tomorrowText,classificationFilterSelector,dateFilterSelector)},StreamingEventsSettingsFactory}();StreamingEvents.StreamingEventsSettingsFactory=StreamingEventsSettingsFactory})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var StreamingEventsQuery=function(){function StreamingEventsQuery(jqueryXhrRequestFactory){this._jqueryXhrRequestFactory=jqueryXhrRequestFactory}return StreamingEventsQuery.prototype.getStreamingEvents=function(settings){return this._jqueryXhrRequestFactory.createXmlHttpRequest(settings.endpoint,{dataType:"json",data:this.addClassificationIdIfDefined({languageId:settings.languageId,countryCode:settings.countryCode},settings)})},StreamingEventsQuery.prototype.addClassificationIdIfDefined=function(object,settings){return settings.classificationId&&(object.classification=settings.classificationId),object},StreamingEventsQuery}();StreamingEvents.StreamingEventsQuery=StreamingEventsQuery})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var StreamingEventsRenderer=function(){function StreamingEventsRenderer(handlebarsTemplateFactory,jqueryObjectFactory){this._handlebarsTemplateFactory=handlebarsTemplateFactory;this._jqueryObjectFactory=jqueryObjectFactory}return StreamingEventsRenderer.prototype.render=function(templateData,templateSelector,containerSelector){var template=this._handlebarsTemplateFactory.createCompiledTemplate(templateSelector),container=this._jqueryObjectFactory.createObjectForSelector(containerSelector);container.html(template(templateData))},StreamingEventsRenderer}();StreamingEvents.StreamingEventsRenderer=StreamingEventsRenderer})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var StreamingEventsFilter=function(){function StreamingEventsFilter(){}return StreamingEventsFilter.prototype.filter=function(streamingEvents,selectedClassification,selectedDate){return new Typescript.LinQ.Enumerable(streamingEvents).where(function(se){return(selectedClassification===-1||se.ClassificationId===selectedClassification)&&(selectedDate===-1||se.EventDateIndex===selectedDate)}).toArray()},StreamingEventsFilter}();StreamingEvents.StreamingEventsFilter=StreamingEventsFilter})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var FilterDropdownBinder=function(){function FilterDropdownBinder(dropdownFactory){this._dropdownFactory=dropdownFactory}return FilterDropdownBinder.prototype.bind=function(settings,onClassificationChanged,onDateChanged){this._dropdownFactory.createDropdown(settings.classificationFilterSelector,function(value){return onClassificationChanged(value)}).initialise();this._dropdownFactory.createDropdown(settings.dateFilterSelector,function(value){return onDateChanged(value)}).initialise()},FilterDropdownBinder}();StreamingEvents.FilterDropdownBinder=FilterDropdownBinder})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var Services;(function(Services){var MLDateFormatter=function(){function MLDateFormatter(){}return MLDateFormatter.FormatDate=function(type,date,zoneId,timeZoneAdjustment){var rtn,mins;timeZoneAdjustment!=0&&(mins=date.getMinutes(),mins+=timeZoneAdjustment,date.setMinutes(mins));switch(type){case this.BOOK_CLOSE:rtn=this.bookClose(date,zoneId);break;case this.DAY_DATE_LONGMONTH:rtn=this.dayDateLongMonth(date,zoneId);break;case this.DAY_DATE_MONTH_YEAR_TIME:rtn=this.dayDateMonthYearTime(date,zoneId);break;case this.HH_MM_SS:rtn=this.hhmmss(date);break;case this.HH_MM:rtn=this.hhmm(date);break;case this.DAY_DATE:rtn=this.dayDate(date,zoneId);break;case this.DAY_DATE_LONG:rtn=this.dayDateLong(date,zoneId);break;case this.DAY_ONLY:rtn=this.day(date);break;case this.DATE_MONTH_YEAR:rtn=this.dateMonthYear(date);break;case this.DAY_DATE_MONTH_YEAR_TIME_SECONDS:rtn=this.dayDateMonthYearTimeSeconds(date,zoneId);break;case this.DAY_DATE_MONTH_YEAR:rtn=this.dayDateMonthYear(date,zoneId);break;case this.EXTRA_STREAMING_SCHEDULE:rtn=this.extraStreamingSchedule(date,zoneId);break;case this.EXTRA_EARLYPAYOUT_OFFER:rtn=this.extraEarlyPayoutOfferDateFormat(date)}return rtn},MLDateFormatter.FormatStringToDate=function(value){var split=value.split(" "),dateString=split[0],dateSplit=dateString.split("/"),time=split[1],timeSplit=time.split(":"),d=new Date;return d.setDate(parseInt(dateSplit[0])),d.setMonth(parseInt(dateSplit[1])-1),d.setFullYear(parseInt(dateSplit[2])),d.setHours(parseInt(timeSplit[0])),d.setMinutes(parseInt(timeSplit[1])),d.setSeconds(parseInt(timeSplit[2])),d},MLDateFormatter.bookClose=function(date,zoneId){var rtn,day=date.getDate().toString(),month=Services.ShortMonthNames.GetMonthName(date.getMonth()),minutes=date.getMinutes().toString(),hours=date.getHours().toString(),time=(hours.length>1?hours:"0"+hours)+this.TIME_SEPERATOR+(minutes.length>1?minutes:"0"+minutes);return Services.LanguageSettings.getRegionIsAsian()?(day+=Services.ShortMonthNames.CDC,rtn=month+day+" "+time):rtn=this.requiresAmericanFormatting(zoneId,Services.LanguageSettings.getLanguageId())?month+" "+day+" "+time:Services.LanguageSettings.getLanguageId()==25?month+" "+day+" "+time:day+" "+month+" "+time,rtn},MLDateFormatter.dayDateLong=function(date,zoneId){var daynumber=date.getDay();return Services.ShortDayNames.GetDay(daynumber)+" "+this.dayDate(date,zoneId)},MLDateFormatter.dayDate=function(date,zoneId){var rtn,daynumber=date.getDate(),day=daynumber<10?"0"+daynumber.toString():daynumber.toString(),month=Services.ShortMonthNames.GetMonthName(date.getMonth());return Services.LanguageSettings.getRegionIsAsian()?(day+=Services.ShortMonthNames.CDC,rtn=month+day):rtn=this.requiresAmericanFormatting(zoneId,Services.LanguageSettings.getLanguageId())?month+" "+day:Services.LanguageSettings.getLanguageId()==25?month+" "+day:day+" "+month,rtn},MLDateFormatter.day=function(date){var daynumber=date.getDay();return Services.LongDayNames.GetDay(daynumber)},MLDateFormatter.requiresAmericanFormatting=function(zoneId,languageId){return zoneId=="11"&&languageId==1},MLDateFormatter.hhmmss=function(date){var hours=date.getHours().toString(),mins=date.getMinutes().toString(),secs=date.getSeconds().toString();return hours.length<2&&(hours="0"+hours),mins.length<2&&(mins="0"+mins),secs.length<2&&(secs="0"+secs),hours+":"+mins+":"+secs},MLDateFormatter.hhmm=function(date){var hours=date.getHours().toString(),mins=date.getMinutes().toString();return hours.length<2&&(hours="0"+hours),mins.length<2&&(mins="0"+mins),hours+":"+mins},MLDateFormatter.dayDateLongMonth=function(date,zoneId){var rtn,todaysDate=date.toString(),month=Services.LongMonthNames.GetMonthName(date.getMonth()).toString(),suffix=this.GetSuffix(date.getDate()),language=Services.LanguageSettings.getLanguageId();switch(language){case 1:case 6:case 9:case 19:case 20:case 21:case 24:case 26:case 28:rtn=this.requiresAmericanFormatting(zoneId,language)?month+" "+todaysDate+suffix:todaysDate+suffix+" "+month;break;case 2:case 10:todaysDate+=Services.LongMonthNames.CDC;rtn=month+" "+todaysDate;break;case 3:rtn=todaysDate+suffix+" de "+month;break;case 5:rtn=", den "+todaysDate+suffix+" "+month;break;case 7:case 8:rtn="den "+todaysDate+suffix+" "+month;break;case 23:rtn=", "+todaysDate+suffix+" "+month;break;case 25:rtn=month+" "+todaysDate+suffix;break;default:rtn=todaysDate+" "+month}return rtn},MLDateFormatter.dayDateMonthYearTime=function(date,zoneId){var rtn,month=Services.ShortMonthNames.GetMonthName(date.getMonth()),day=Services.ShortDayNames.GetDay(date.getDay()),hours,minutes=date.getMinutes().toString(),language=Services.LanguageSettings.getLanguageId();hours=date.getHours()==0?"00":date.getHours()<10?"0"+date.getHours().toString():date.getHours().toString();minutes=date.getMinutes()==0?"00":date.getMinutes()<10?"0"+date.getMinutes().toString():date.getMinutes().toString();switch(language){case 2:case 10:rtn=day+" "+date.getFullYear()+Services.ShortMonthNames.CYC+month+date.getDate()+Services.ShortMonthNames.CDC+", "+hours+":"+minutes;break;case 23:rtn=day+", "+date.getDate()+" "+month+" "+date.getFullYear()+", "+hours+":"+minutes;break;case 25:rtn=day+" "+date.getFullYear()+" "+month+" "+date.getDate()+" "+hours+":"+minutes;break;default:rtn=this.requiresAmericanFormatting(zoneId,Services.LanguageSettings.getLanguageId())?day+" "+month+" "+date.getDate()+" "+date.getFullYear()+", "+hours+":"+minutes:day+" "+date.getDate()+" "+month+" "+date.getFullYear()+", "+hours+":"+minutes}return rtn},MLDateFormatter.dayDateMonthYear=function(date,zoneId){var rtn,month=Services.ShortMonthNames.GetMonthName(date.getMonth()),year=date.getFullYear(),suffix=this.GetSuffix(date.getDate()),language=Services.LanguageSettings.getLanguageId(),hours=date.getHours().toString(),minutes=date.getMinutes().toString(),day=Services.ShortDayNames.GetDay(date.getDay());switch(language){case 2:case 10:rtn=day+" "+year+Services.ShortMonthNames.CYC+month+date.getDate()+Services.ShortMonthNames.CDC;break;case 3:rtn=day+" "+date.getDate()+suffix+" de "+month+" "+year;break;case 23:rtn=day+" "+date.getDate()+suffix+" "+month+" "+year;break;case 25:rtn=day+" "+year+" "+month+" "+date.getDate()+suffix;break;default:rtn=this.requiresAmericanFormatting(zoneId,Services.LanguageSettings.getLanguageId())?day+" "+month+" "+date.getDate()+suffix+" "+year:day+" "+date.getDate()+suffix+" "+month+" "+year}return rtn},MLDateFormatter.extraStreamingSchedule=function(date,zoneId){var rtn,month=Services.ShortMonthNames.GetMonthName(date.getMonth()),year=date.getFullYear(),suffix=this.GetSuffix(date.getDate()),language=Services.LanguageSettings.getLanguageId(),hours=date.getHours().toString(),minutes=date.getMinutes().toString(),day=Services.ShortDayNames.GetDay(date.getDay());switch(language){case 2:case 10:rtn=day+year+Services.ShortMonthNames.CYC+month+date.getDate()+Services.ShortMonthNames.CDC;break;case 3:rtn=this.day(date)+" "+this.dateMonthYear(date,"/");break;case 23:rtn=day+" "+date.getDate()+suffix+" "+month+" "+year;break;case 25:rtn=year+". "+month+". "+date.getDate()+".";break;case 26:rtn=day+" "+date.getDate()+". "+month+". "+year;break;case 29:rtn=day+", "+date.getDate()+". "+month+" "+year;break;default:rtn=this.requiresAmericanFormatting(zoneId,Services.LanguageSettings.getLanguageId())?day+" "+month+" "+date.getDate()+suffix+" "+year:day+" "+date.getDate()+suffix+" "+month+" "+year}return rtn},MLDateFormatter.extraEarlyPayoutOfferDateFormat=function(date){var rtn,month=Services.LongMonthNames.GetMonthName(date.getMonth()).toString(),language=Services.LanguageSettings.getLanguageId(),day=Services.ShortDayNames.GetDay(date.getDay());switch(language){case 3:rtn=""+this.day(date)+" "+date.getDate()+" de "+month;break;case 22:rtn=""+this.day(date)+", "+date.getDate()+" "+month;break;case 25:rtn=month+" "+date.getDate()+"., "+(""+this.day(date));break;case 26:rtn=""+this.day(date)+" "+date.getDate()+". "+month;break;case 21:rtn=""+this.day(date)+" "+date.getDate()+". "+month;break;default:rtn=""+this.day(date)+" "+date.getDate()+" "+month}return rtn},MLDateFormatter.dayDateMonthYearTimeSeconds=function(date,zoneId){var rtn=this.dayDateMonthYearTime(date,zoneId),seconds=date.getSeconds().toString();return seconds.length<2&&(seconds="0"+seconds),rtn+(":"+seconds)},MLDateFormatter.dateMonthYear=function(date,separator){separator===void 0&&(separator=".");var daynum=date.getDate(),day=(daynum<10?"0"+daynum:daynum).toString(),month=((date.getMonth()<9?"0":"")+(date.getMonth()+1)).toString(),year=date.getFullYear().toString();return day+separator+month+separator+year},MLDateFormatter.GetSuffix=function(date){var language=Services.LanguageSettings.getLanguageId(),suffixList=[],singleSuffix,dateStr;date=date%100;date>19&&(dateStr=date.toString(),date=parseInt(this.charAt(dateStr,dateStr.length-1)));switch(language){case 1:suffixList=["th","st","nd","rd","th","th","th","th","th","th","th","th","th","th","th","th","th","th","th","th"];break;case 3:singleSuffix="°";break;case 5:case 7:case 9:case 21:case 24:case 25:case 26:singleSuffix=".";break;case 19:case 20:case 22:case 23:singleSuffix="";break;default:singleSuffix=""}return singleSuffix!=null?singleSuffix:suffixList[date]},MLDateFormatter.charAt=function(text,position){return text.charAt(position)},MLDateFormatter.getShortYear=function(fullYear){var twoLastDigits=fullYear%100;return twoLastDigits<10?"0"+twoLastDigits:""+twoLastDigits},MLDateFormatter.BOOK_CLOSE="bookClose",MLDateFormatter.HH_MM_SS="hhmmss",MLDateFormatter.HH_MM="hhmm",MLDateFormatter.DAY_DATE_MONTH_YEAR_TIME="dayDateMonthYearTime",MLDateFormatter.DAY_DATE_MONTH_YEAR="dayDateMonthYear",MLDateFormatter.DAY_DATE_LONGMONTH="dayDateLongMonth",MLDateFormatter.DAY_ONLY="day",MLDateFormatter.DAY_DATE="dayDate",MLDateFormatter.DAY_DATE_LONG="dayDateLong",MLDateFormatter.DATE_MONTH_YEAR="dateMonthYear",MLDateFormatter.DAY_DATE_MONTH_YEAR_TIME_SECONDS="dayDateMonthYearTimeSeconds",MLDateFormatter.EXTRA_STREAMING_SCHEDULE="extraStreamingSchedule",MLDateFormatter.EXTRA_EARLYPAYOUT_OFFER="extraEarlyPayoutOfferDateFormat",MLDateFormatter.TIME_SEPERATOR=":",MLDateFormatter}();Services.MLDateFormatter=MLDateFormatter})(Services=Components.Services||(Components.Services={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var MLDateFormatter=Typescript.Components.Services.MLDateFormatter,StreamingEventsTransform=function(){function StreamingEventsTransform(streamingEventsFilter,filteredClassificationsQuery,filteredDatesQuery,dateParser){this._streamingEventsFilter=streamingEventsFilter;this._filteredClassificationsQuery=filteredClassificationsQuery;this._filteredDatesQuery=filteredDatesQuery;this._dateParser=dateParser}return StreamingEventsTransform.prototype.transformData=function(data,settings,selectedClassification,selectedDate){var _this=this,dataWithParsedDates,tomorrow_1;if(!this._enrichedData){dataWithParsedDates=this._dateParser.parseDates(data,settings);this._alldates=new Typescript.LinQ.Enumerable(this._filteredDatesQuery.getFilteredDates(dataWithParsedDates));dataWithParsedDates.forEach(function(e){e.EventDateIndex=_this._alldates.where(function(d){return d.value.date==_this.formatDate(e.EventTime)}).select(function(s){return s.key}).first()});this._enrichedData=dataWithParsedDates;var todaydate=new Date,today_1=this.formatDate(todaydate),tomorrowdate=new Date;tomorrowdate.setDate(todaydate.getDate()+1);tomorrow_1=this.formatDate(tomorrowdate);this._alldates.toArray().forEach(function(d){d.value.date==today_1?d.value.date=settings.todayText:d.value.date==tomorrow_1&&(d.value.date=settings.tomorrowText)})}var dates=selectedClassification===StreamingEvents.Default.clasification?this._alldates:this._alldates.where(function(x){return x.value.classifications.indexOf(selectedClassification)>-1}),classifications=this._filteredClassificationsQuery.getFilteredClassifications(this._enrichedData,selectedDate),streamingEvents=this._streamingEventsFilter.filter(this._enrichedData,selectedClassification,selectedDate);return{dates:dates.toArray(),classifications:classifications,streamingEvents:streamingEvents,displayClassificationsDropdown:settings.classificationId!==undefined,displayDatesDropdown:!0,allSportsText:settings.allSportsText,selectedClassification:selectedClassification,selectedDate:selectedDate}},StreamingEventsTransform.prototype.formatDate=function(date){return MLDateFormatter.FormatDate(MLDateFormatter.EXTRA_STREAMING_SCHEDULE,date,"0",0)},StreamingEventsTransform}();StreamingEvents.StreamingEventsTransform=StreamingEventsTransform})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var Enumerable=Typescript.LinQ.Enumerable,DateParser=function(){function DateParser(timezoneAdjustedDatetimeQuery){this._timezoneAdjustedDatetimeQuery=timezoneAdjustedDatetimeQuery}return DateParser.prototype.parseDates=function(data,settings){var _this=this;return new Enumerable(data).select(function(x){return{EventDateIndex:-1,EventTime:_this.adjustDateBasedOnTimezone(x.EventTime.toString().substr(6),settings),ClassificationId:x.ClassificationId,EventName:x.EventName,ClassificationName:x.ClassificationName}}).toArray()},DateParser.prototype.adjustDateBasedOnTimezone=function(eventTime,settings){return this._timezoneAdjustedDatetimeQuery.getAdjustedDateTime(eventTime,settings)},DateParser}();StreamingEvents.DateParser=DateParser})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var TimezoneAdjustedDateTimeQuery=function(){function TimezoneAdjustedDateTimeQuery(){}return TimezoneAdjustedDateTimeQuery.prototype.getAdjustedDateTime=function(dateTime,settings){var intDateTime=parseInt(dateTime),adjustment=settings.timezoneOffset*6e4;return new Date(intDateTime+adjustment)},TimezoneAdjustedDateTimeQuery}();StreamingEvents.TimezoneAdjustedDateTimeQuery=TimezoneAdjustedDateTimeQuery})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var DropdownButton=function(){function DropdownButton(buttonJQueryObject,buttonTextJQueryObject){this._buttonJQueryObject=buttonJQueryObject;this._buttonTextJQueryObject=buttonTextJQueryObject}return DropdownButton.prototype.setSelectedItemText=function(text){this._buttonTextJQueryObject.html(text)},DropdownButton.prototype.bindClick=function(dropdownMenu){this._buttonJQueryObject.click(function(){dropdownMenu.toggle()})},DropdownButton}();StreamingEvents.DropdownButton=DropdownButton})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var DropdownMenuItems=function(){function DropdownMenuItems(dropdownItemsJQueryObject){this._dropdownItemsJQueryObject=dropdownItemsJQueryObject}return DropdownMenuItems.prototype.bindItemSelected=function(handler){this._dropdownItemsJQueryObject.click(function(event){handler(parseInt(event.target.value),event.target.innerHTML)})},DropdownMenuItems}();StreamingEvents.DropdownMenuItems=DropdownMenuItems})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var DropdownSelectedItem=function(){function DropdownSelectedItem(selectedItemObject){this._selectedItemObject=selectedItemObject}return DropdownSelectedItem.prototype.getText=function(){return this._selectedItemObject.text()},DropdownSelectedItem}();StreamingEvents.DropdownSelectedItem=DropdownSelectedItem})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var DropdownMenu=function(){function DropdownMenu(jqueryObjectFactory,dropdownMenuObject,documentObject,dropdownSelector){this._dropdownMenuObject=dropdownMenuObject;this._documentObject=documentObject;this.bindLostFocus(jqueryObjectFactory,dropdownSelector)}return DropdownMenu.prototype.toggle=function(){this._dropdownMenuObject.toggle()},DropdownMenu.prototype.hide=function(){this._dropdownMenuObject.hide()},DropdownMenu.prototype.isVisible=function(){return this._dropdownMenuObject.is(":visible")},DropdownMenu.prototype.bindLostFocus=function(jqueryObjectFactory,selector){var _this=this;this._documentObject.click(function(ev){var target=jqueryObjectFactory.createObjectForElement(ev.target);target.closest(selector).length||target.is(selector)||!_this.isVisible()||_this.hide()})},DropdownMenu}();StreamingEvents.DropdownMenu=DropdownMenu})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var Dropdown=function(){function Dropdown(dropdownButton,dropdownItems,dropdownSelectedItem,dropdownMenu,itemSelectedHandler){this._dropdownButton=dropdownButton;this._dropdownItems=dropdownItems;this._dropdownSelectedItem=dropdownSelectedItem;this._dropdownMenu=dropdownMenu;this._itemSelectedHandler=itemSelectedHandler}return Dropdown.prototype.initialise=function(){var _this=this;this._dropdownButton.setSelectedItemText(this._dropdownSelectedItem.getText());this._dropdownButton.bindClick(this._dropdownMenu);this._dropdownItems.bindItemSelected(function(value,text){_this._dropdownMenu.hide();_this._itemSelectedHandler(value,text)})},Dropdown}();StreamingEvents.Dropdown=Dropdown})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var DropdownFactory=function(){function DropdownFactory(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return DropdownFactory.prototype.createDropdown=function(selector,itemSelectedHandler){var documentObject=this._jqueryObjectFactory.createObjectForSelector("body"),dropdownContainerObject=this._jqueryObjectFactory.createObjectForSelector(selector),button=new StreamingEvents.DropdownButton(dropdownContainerObject.children("div.selected-item"),dropdownContainerObject.find("div.selected-item span")),menuItems=new StreamingEvents.DropdownMenuItems(dropdownContainerObject.find("ul li")),selectedItem=new StreamingEvents.DropdownSelectedItem(dropdownContainerObject.find("ul li[selected]")),dropdownMenu=new StreamingEvents.DropdownMenu(this._jqueryObjectFactory,dropdownContainerObject.find("ul"),documentObject,selector);return new StreamingEvents.Dropdown(button,menuItems,selectedItem,dropdownMenu,itemSelectedHandler)},DropdownFactory}();StreamingEvents.DropdownFactory=DropdownFactory})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var Enumerable=Typescript.LinQ.Enumerable,FilteredClassificationsQuery=function(){function FilteredClassificationsQuery(){}return FilteredClassificationsQuery.prototype.getFilteredClassifications=function(data,date){var _this=this;return new Enumerable(data).orderBy(function(x){return _this.formattedTime(x.EventTime.getHours(),x.EventTime.getMinutes())}).where(function(x){return x.EventDateIndex===date}).groupBy(function(x){return x.ClassificationId}).select(function(kv){return{key:kv.key,value:kv.value.first().ClassificationName}}).toArray()},FilteredClassificationsQuery.prototype.formattedTime=function(hours,minutes){var formattedHours=this.formatDateComponent(hours),formattedMinutes=this.formatDateComponent(minutes);return parseInt(formattedHours+formattedMinutes)},FilteredClassificationsQuery.prototype.formatDateComponent=function(dateComponent){return dateComponent<10?"0"+dateComponent.toString():dateComponent.toString()},FilteredClassificationsQuery}();StreamingEvents.FilteredClassificationsQuery=FilteredClassificationsQuery})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingEvents;(function(StreamingEvents){var Enumerable=Typescript.LinQ.Enumerable,MLDateFormatter=Typescript.Components.Services.MLDateFormatter,FilteredDatesQuery=function(){function FilteredDatesQuery(){}return FilteredDatesQuery.prototype.getFilteredDates=function(data){var _this=this,index=1;return new Enumerable(data).groupBy(function(x){return _this.formatDate(x.EventTime)}).orderBy(function(kv){return kv.value.first().EventTime.getTime()}).select(function(kv){return{key:index++,value:{date:kv.key,classifications:kv.value.select(function(x){return x.ClassificationId}).toArray()}}}).toArray()},FilteredDatesQuery.prototype.formatDate=function(date){return MLDateFormatter.FormatDate(MLDateFormatter.EXTRA_STREAMING_SCHEDULE,date,"0",0)},FilteredDatesQuery}(),IDateClassificationLink;StreamingEvents.FilteredDatesQuery=FilteredDatesQuery;IDateClassificationLink=function(){function IDateClassificationLink(){}return IDateClassificationLink}();StreamingEvents.IDateClassificationLink=IDateClassificationLink})(StreamingEvents=Components.StreamingEvents||(Components.StreamingEvents={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(IoC){var Installers;(function(Installers){var StreamingEventsInstaller=function(){function StreamingEventsInstaller(){}return StreamingEventsInstaller.prototype.install=function(container){container.register(IoC.Component.named("streamingEventsHandlebarHelpers").componentType(Typescript.Components.StreamingEvents.StreamingEventsHandlebarHelpers).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("streamingEventsComingUp").componentType(Typescript.Components.StreamingEvents.StreamingEventsComingUp).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("streamingEventsSettingsFactory").componentType(Typescript.Components.StreamingEvents.StreamingEventsSettingsFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("streamingEventsQuery").componentType(Typescript.Components.StreamingEvents.StreamingEventsQuery).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("streamingEventsRenderer").componentType(Typescript.Components.StreamingEvents.StreamingEventsRenderer).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("streamingEventsFilter").componentType(Typescript.Components.StreamingEvents.StreamingEventsFilter).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("filterDropdownBinder").componentType(Typescript.Components.StreamingEvents.FilterDropdownBinder).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("streamingEventsTransform").componentType(Typescript.Components.StreamingEvents.StreamingEventsTransform).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("dateParser").componentType(Typescript.Components.StreamingEvents.DateParser).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("timezoneAdjustedDatetimeQuery").componentType(Typescript.Components.StreamingEvents.TimezoneAdjustedDateTimeQuery).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("dropdownFactory").componentType(Typescript.Components.StreamingEvents.DropdownFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("filteredClassificationsQuery").componentType(Typescript.Components.StreamingEvents.FilteredClassificationsQuery).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("filteredDatesQuery").componentType(Typescript.Components.StreamingEvents.FilteredDatesQuery).withLifestyle(IoC.Lifestyle.Singleton))},StreamingEventsInstaller}();Installers.StreamingEventsInstaller=StreamingEventsInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Queries;(function(Queries){"use strict";var BrowserCapabilityQuery=function(){function BrowserCapabilityQuery(){}return BrowserCapabilityQuery.prototype.browserSupportsCrossDomainRequests=function(){return"withCredentials"in new XMLHttpRequest},BrowserCapabilityQuery.prototype.browserSupportsXDomainRequestObject=function(){return typeof XDomainRequest!="undefined"},BrowserCapabilityQuery}();Queries.BrowserCapabilityQuery=BrowserCapabilityQuery})(Queries=LoginControls.Queries||(LoginControls.Queries={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Events;(function(Events){var EventHandler=function(){function EventHandler(){this._callbacks=[]}return EventHandler.prototype.emitEvent=function(){for(var index,args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];for(index=0;index<this._callbacks.length;index++)this._callbacks[index].apply(this,args)},EventHandler.prototype.onEvent=function(callback){this._callbacks.push(callback)},EventHandler}();Events.EventHandler=EventHandler})(Events=LoginControls.Events||(LoginControls.Events={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Events;(function(Events){var RealityCheckTimerEvent=function(_super){function RealityCheckTimerEvent(){return _super.call(this)||this}return __extends(RealityCheckTimerEvent,_super),RealityCheckTimerEvent}(Events.EventHandler);Events.RealityCheckTimerEvent=RealityCheckTimerEvent})(Events=LoginControls.Events||(LoginControls.Events={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Services;(function(Services){var CorsService=function(){function CorsService(jqueryXhrRequestFactory,browserCapabilityQuery,windowQueries,jsonParser,jqueryObjectFactory){this._jqueryXhrRequestFactory=jqueryXhrRequestFactory;this._browserCapabilityQuery=browserCapabilityQuery;this._windowQueries=windowQueries;this._jqueryObjectFactory=jqueryObjectFactory;this._jsonParser=jsonParser;this.registerPostMessageEventListener()}return CorsService.prototype.browserSupportsCors=function(){return this._browserCapabilityQuery.browserSupportsCrossDomainRequests()?!0:this._browserCapabilityQuery.browserSupportsXDomainRequestObject()?!0:!1},CorsService.prototype.browserSupportsXhr=function(){return this._browserCapabilityQuery.browserSupportsCrossDomainRequests()?!0:!1},CorsService.prototype.sendCorsRequest=function(method,url,data,targetWindow){var _this=this,settings,message,targetDomain,deferredPromise;if(this._deferred)return this._jqueryXhrRequestFactory.createDeferred().reject().promise();if(this._deferred=this._jqueryXhrRequestFactory.createDeferred(),this.browserSupportsCors()){if(settings={url:url,type:method,data:data,xhrFields:{withCredentials:!0}},this.browserSupportsXhr())return this._deferred=this._jqueryXhrRequestFactory.createXmlHttpRequest(url,settings),this._deferred.always(function(){_this._deferred=null}),this._deferred;settings.url+="?isb=1";message=JSON.stringify(settings);targetDomain=this.generateTargetDomain();targetWindow.postMessage(message,targetDomain)}else this._deferred.reject();return deferredPromise=this._deferred.promise(),deferredPromise.always(function(){_this._deferred=null}),deferredPromise},CorsService.prototype.generateTargetDomain=function(){return"https://"+this._windowQueries.hostname()},CorsService.prototype.registerPostMessageEventListener=function(){var _this=this;this._jqueryObjectFactory.createObjectForCurrentWindow().on("message onmessage",function(event){_this.receivePostMessageFromTarget(event)})},CorsService.prototype.receivePostMessageFromTarget=function(event){if(this._deferred){var messageEvent=event.originalEvent,result=this._jsonParser.parseJSON(messageEvent.data);result.success===!0?this._deferred.resolve(result.data):this._deferred.reject()}},CorsService}();Services.CorsService=CorsService})(Services=LoginControls.Services||(LoginControls.Services={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Services;(function(Services){var QueryStringService=function(){function QueryStringService(windowQueries){this._windowQueries=windowQueries}return QueryStringService.prototype.getQueryString=function(url){url||(url=this.getWindowLocationHref());for(var result=[],re=new RegExp("([^?=&]+)=([^&]*)?","gi"),match=re.exec(url);match!=null;)result.push({key:match[1],value:match[2]}),match=re.exec(url);return result},QueryStringService.prototype.updateQueryString=function(key,value,url){var re,hash,separator;return url||(url=this.getWindowLocationHref()),re=new RegExp("([?&])"+key+"=.*?(&|#|$)(.*)","gi"),re.test(url)?typeof value!="undefined"&&value!==null?url.replace(re,"$1"+key+"="+value+"$2$3"):(hash=url.split("#"),url=hash[0].replace(re,"$1$3").replace(/(&|\?)$/,""),typeof hash[1]!="undefined"&&hash[1]!==null&&(url+="#"+hash[1]),url):typeof value!="undefined"&&value!==null?(separator=url.indexOf("?")!==-1?"&":"?",hash=url.split("#"),url=hash[0]+separator+key+"="+value,typeof hash[1]!="undefined"&&hash[1]!==null&&(url+="#"+hash[1]),url):url},QueryStringService.prototype.getWindowLocationHref=function(){return this._windowQueries.url()},QueryStringService}();Services.QueryStringService=QueryStringService})(Services=LoginControls.Services||(LoginControls.Services={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Models;(function(Models){var LoginRequestModel=function(){function LoginRequestModel(txtUsername,txtPassword,txtStkn,txtTkn,txtType,platform){this.txtUsername=txtUsername;this.txtPassword=txtPassword;this.txtStkn=txtStkn;this.txtTkn=txtTkn;this.txtType=txtType;this.platform=platform}return LoginRequestModel}();Models.LoginRequestModel=LoginRequestModel})(Models=LoginControls.Models||(LoginControls.Models={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Services;(function(Services){var LoginService=function(){function LoginService(corsService,queryStringService,loginProcessQuery,loginResultQuery,loginViewModel,jsonParser,windowQueries,windowCommands,reloadParentWindowCommand){this._isLoginInProgress=!1;this._corsService=corsService;this._queryStringService=queryStringService;this._loginProcessQuery=loginProcessQuery;this._loginResultQuery=loginResultQuery;this._loginViewModel=loginViewModel;this._jsonParser=jsonParser;this._windowQueries=windowQueries;this._windowCommands=windowCommands;this._reloadParentWindowCommand=reloadParentWindowCommand}return LoginService.prototype.logIn=function(username,password,targetUrl,additionalItems,sourceId,modalInstance){if(!this._isLoginInProgress){if(this._modalInstance=modalInstance,this._loginViewModel.init(".login-data"),!this._loginViewModel.loginDataIsPresentOnPage()){this.handleLoginError(sourceId);return}this._isLoginInProgress=!0;this._targetUrl=targetUrl;var loginProcessId=this.createLoginProcess(targetUrl,additionalItems,sourceId),sessionId=this._loginViewModel.sessionId(),membersLoginTypeId=this._loginViewModel.membersLoginTypeId(),platformTypeId=this._loginViewModel.platformTypeId(),loginRequest=new LoginControls.Models.LoginRequestModel(username,encodeURIComponent(password),loginProcessId,sessionId,membersLoginTypeId,platformTypeId);loginProcessId&&this.submitLoginRequest(loginRequest,sourceId)}},LoginService.prototype.createLoginProcess=function(targetUrl,additionalItems,sourceId){var _this=this,loginProcessId,r=this._loginProcessQuery.getLoginProcessId(targetUrl,additionalItems,sourceId);return r.done(function(data){loginProcessId=data}),r.fail(function(){_this.handleLoginError(sourceId)}),loginProcessId},LoginService.prototype.submitLoginRequest=function(loginRequest,sourceId){var _this=this,loginUrl=this._loginViewModel.loginUrl(),loginReceiver=this._loginViewModel.loginReceiver(),corsRequestPromise=this._corsService.sendCorsRequest("POST",loginUrl,loginRequest,loginReceiver.contentWindow);corsRequestPromise.done(function(data){_this.processLoginResult(data,sourceId)});corsRequestPromise.fail(function(){_this.handleLoginError(sourceId)})},LoginService.prototype.processLoginResult=function(json,sourceId){var _this=this,postData=this._jsonParser.parseJSON(json),loginResult=this._loginResultQuery.getLoginResult(postData);loginResult.done(function(data){_this.actionLoginResponse(data,sourceId)});loginResult.fail(function(){_this.handleLoginError(sourceId)});loginResult.always(function(){_this._isLoginInProgress=!1})},LoginService.prototype.actionLoginResponse=function(data,sourceId){var success=data.SuccessfulLogin,redirectionUrl=data.RedirectionUrl,queryStringParams,i;if(redirectionUrl.slice(-1)!=="/"&&redirectionUrl.indexOf(this._targetUrl)===-1&&redirectionUrl.indexOf("finalUrl")===-1&&/^[a-z\/]*$/.test(this._targetUrl)&&(redirectionUrl=redirectionUrl+this._targetUrl),success)if(redirectionUrl&&redirectionUrl.length){for(queryStringParams=this._queryStringService.getQueryString(this._windowQueries.url()),i=0;i<queryStringParams.length;i++)redirectionUrl=this._queryStringService.updateQueryString(queryStringParams[i].key,queryStringParams[i].value,redirectionUrl);redirectionUrl=this._queryStringService.updateQueryString("sl","1",redirectionUrl);this.loginRedirect(this.replaceSchemeForMatchingHostnames(redirectionUrl))}else this.loginRedirect(this._windowQueries.url());else this.handleLoginError(sourceId)},LoginService.prototype.replaceSchemeForMatchingHostnames=function(url){for(var currentDomain=this._windowQueries.protocol()+"//"+this._windowQueries.hostname(),domains=["http://"+this._windowQueries.hostname(),"https://"+this._windowQueries.hostname()],i=0;i<domains.length;i++)if(url.indexOf(domains[i])===0)return url.replace(domains[i],currentDomain);return url},LoginService.prototype.loginRedirect=function(redirectionUrl){this._windowQueries.isHostedInPopupWindow()?this._reloadParentWindowCommand.reloadParentWindow(redirectionUrl):this._windowCommands.redirectTo(redirectionUrl)},LoginService.prototype.handleLoginError=function(){this._modalInstance.showFailedLogin();this._isLoginInProgress=!1},LoginService.prototype.handleLoginErrorWithKyc=function(){this._isLoginInProgress=!1},LoginService}();Services.LoginService=LoginService})(Services=LoginControls.Services||(LoginControls.Services={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Services;(function(Services){var LogoutService=function(){function LogoutService(logoutCommand,logoutScreenUpdatingService){this._logoutCommand=logoutCommand;this._logoutScreenUpdatingService=logoutScreenUpdatingService}return LogoutService.prototype.logOut=function(refreshScreen){var _this=this;this._logoutCommand.doLogout().done(function(){return _this.updateBrowser(refreshScreen)})},LogoutService.prototype.updateBrowser=function(refreshScreen){refreshScreen?this._logoutScreenUpdatingService.reloadWindow():this._logoutScreenUpdatingService.removeLoggedInInformationFromScreen()},LogoutService}();Services.LogoutService=LogoutService})(Services=LoginControls.Services||(LoginControls.Services={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Services;(function(Services){var LogoutScreenUpdatingService=function(){function LogoutScreenUpdatingService(jqueryObjectFactory,windowCommands){this._jqueryObjectFactory=jqueryObjectFactory;this._windowCommands=windowCommands}return LogoutScreenUpdatingService.prototype.reloadWindow=function(){this._windowCommands.reloadWindow()},LogoutScreenUpdatingService.prototype.removeLoggedInInformationFromScreen=function(){this._jqueryObjectFactory.createObjectForSelector("#login-info").hide()},LogoutScreenUpdatingService}();Services.LogoutScreenUpdatingService=LogoutScreenUpdatingService})(Services=LoginControls.Services||(LoginControls.Services={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Commands;(function(Commands){var LogOutCommand=function(){function LogOutCommand(jqueryXhrRequestFactory){this._jqueryXhrRequestFactory=jqueryXhrRequestFactory}return LogOutCommand.prototype.doLogout=function(){return this._jqueryXhrRequestFactory.createXmlHttpRequest("/SessionActivity/LogOut",{type:"POST",contentType:"application/json; charset=utf-8",dataType:"json",data:""})},LogOutCommand}();Commands.LogOutCommand=LogOutCommand})(Commands=LoginControls.Commands||(LoginControls.Commands={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Commands;(function(Commands){var ReloadParentWindowCommand=function(){function ReloadParentWindowCommand(windowCommands){this._windowCommands=windowCommands}return ReloadParentWindowCommand.prototype.reloadParentWindow=function(returnUrl){this._windowCommands.redirectTo("/Reload/ParentWindow?returnUrl="+encodeURIComponent(returnUrl))},ReloadParentWindowCommand}();Commands.ReloadParentWindowCommand=ReloadParentWindowCommand})(Commands=LoginControls.Commands||(LoginControls.Commands={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Queries;(function(Queries){var LoginProcessQuery=function(){function LoginProcessQuery(jqueryXhrRequestFactory){this._jqueryXhrRequestFactory=jqueryXhrRequestFactory}return LoginProcessQuery.prototype.getLoginProcessId=function(targetUrl,additionalItems,sourceId){return this._jqueryXhrRequestFactory.createXmlHttpRequest("/Login/GenerateProcess",{type:"POST",async:!1,data:{TargetUrl:targetUrl,AdditionalItems:additionalItems,Validate:!1,SourceId:sourceId}})},LoginProcessQuery}();Queries.LoginProcessQuery=LoginProcessQuery})(Queries=LoginControls.Queries||(LoginControls.Queries={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Queries;(function(Queries){var LoginResultQuery=function(){function LoginResultQuery(jqueryXhrRequestFactory){this._jqueryXhrRequestFactory=jqueryXhrRequestFactory}return LoginResultQuery.prototype.getLoginResult=function(postData){return this._jqueryXhrRequestFactory.createXmlHttpRequest("/Login/Result",{type:"POST",data:postData})},LoginResultQuery}();Queries.LoginResultQuery=LoginResultQuery})(Queries=LoginControls.Queries||(LoginControls.Queries={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var LoginViewModel=function(){function LoginViewModel(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return LoginViewModel.prototype.init=function(selector){this._loginData=this._jqueryObjectFactory.createObjectForSelector(selector)},LoginViewModel.prototype.loginDataIsPresentOnPage=function(){return this._loginData!=null&&this._loginData.length>0},LoginViewModel.prototype.sessionId=function(){return this._loginData&&this._loginData.data("session-id")?this._loginData.data("session-id"):""},LoginViewModel.prototype.membersLoginTypeId=function(){return this._loginData&&this._loginData.data("members-login-type-id")?+this._loginData.data("members-login-type-id"):0},LoginViewModel.prototype.platformDescription=function(){return this._jqueryObjectFactory.createObjectForSelector("div[data-component-type='KycSecondaryAuthMobile']")&&this._jqueryObjectFactory.createObjectForSelector("div[data-component-type='KycSecondaryAuthMobile']").data("onmobile")==="True"?"mobile":"web"},LoginViewModel.prototype.platformTypeId=function(){return this._loginData&&this._loginData.data("platform-type-id")?+this._loginData.data("platform-type-id"):0},LoginViewModel.prototype.loginUrl=function(){return this._loginData&&this._loginData.data("members-login-url")?this._loginData.data("members-login-url"):""},LoginViewModel.prototype.loginReceiver=function(){return this._jqueryObjectFactory.createObjectForSelector(".login-receiver").length?this._jqueryObjectFactory.createObjectForSelector(".login-receiver")[0]:null},LoginViewModel}();LoginControls.LoginViewModel=LoginViewModel})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var LoginModalViewModel=function(){function LoginModalViewModel(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return LoginModalViewModel.prototype.init=function(selector){this._modal=this._jqueryObjectFactory.createObjectForSelector(selector);this._modal!==null&&(this._modal.appendTo(".login-container"),this._modal.css("display","block"))},LoginModalViewModel.prototype.modalWindow=function(){return this._modal?this._modal:null},LoginModalViewModel.prototype.toggleFocus=function(){return this._modal?this._modal.find(".toggle"):null},LoginModalViewModel.prototype.loginButton=function(){return this._modal?this._modal.find("#login-button"):null},LoginModalViewModel.prototype.username=function(){return this._modal?this._modal.find("#txtUsername"):null},LoginModalViewModel.prototype.password=function(){return this._modal?this._modal.find("#txtPassword"):null},LoginModalViewModel.prototype.spinner=function(){return this.loginButton()?this.loginButton().find(".spinner"):null},LoginModalViewModel.prototype.popUpMask=function(){return this._jqueryObjectFactory.createObjectForSelector("#popupmask")},LoginModalViewModel.prototype.loginButtonText=function(){return this._modal?this._modal.find("#login-button span"):null},LoginModalViewModel.prototype.clearInput=function(){return this._modal?this._modal.find(".clear-input"):null},LoginModalViewModel.prototype.window=function(){return window},LoginModalViewModel.prototype.jQueryWindow=function(){return this._jqueryObjectFactory.createObjectForCurrentWindow()},LoginModalViewModel.prototype.document=function(){return document},LoginModalViewModel.prototype.clearInputUsername=function(){return this._modal?this._modal.find(".clear-input").siblings(".username"):null},LoginModalViewModel.prototype.clearInputLabel=function(){return this._modal?this._modal.find(".clear-input").siblings("label"):null},LoginModalViewModel.prototype.isUsernameEmpty=function(){return this.username().val()===""},LoginModalViewModel.prototype.isPasswordEmpty=function(){return this.password().val()===""},LoginModalViewModel.prototype.isModalVisible=function(){return this._modal.parents("body").hasClass("visibleModal")},LoginModalViewModel.prototype.showPassword=function(){return this._modal?this._modal.find(".show-password"):null},LoginModalViewModel.prototype.showPasswordToggleState=function(){var inputType="password";this.password().attr("type")==="password"&&(inputType="text");this.password().attr("type",inputType)},LoginModalViewModel.prototype.ResetInpuPasswordState=function(){this.password().attr("type","password")},LoginModalViewModel.prototype.displayClearInputIfRequired=function(){this.isUsernameEmpty()?this.clearInput().hide():this.clearInput().show()},LoginModalViewModel.prototype.displayShowPasswordIfRequired=function(){this.isPasswordEmpty()?this.showPassword().hide():this.showPassword().show()},LoginModalViewModel.prototype.getItemFromEventTarget=function(target){return this._jqueryObjectFactory.createObjectForElement(target)},LoginModalViewModel.prototype.hideLabelIfRequired=function(item){item===undefined||item.val()===""?item.siblings("label").show():item.siblings("label").hide()},LoginModalViewModel}();LoginControls.LoginModalViewModel=LoginModalViewModel})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Services;(function(Services){var LoginEventHandlingService=function(){function LoginEventHandlingService(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return LoginEventHandlingService.prototype.init=function(loginModal){this._pageJQueryObject=this._jqueryObjectFactory.createObjectForSelector("body div.main_content");this._loginModal=loginModal;this.registerEventHandlers()},LoginEventHandlingService.prototype.registerEventHandlers=function(){var _this=this;this._pageJQueryObject.on("click",".loginlink",function(e){e.preventDefault();_this._loginModal.showLogin(!0,null)});this._pageJQueryObject.on("click",".mobileLogin",function(e){e.preventDefault();_this._jqueryObjectFactory.createObjectForSelector(".popup-mask").removeClass("frame-loading-overlay");_this._loginModal.showLogin(!0,null)})},LoginEventHandlingService}();Services.LoginEventHandlingService=LoginEventHandlingService})(Services=LoginControls.Services||(LoginControls.Services={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var ModalServiceViewModel=function(){function ModalServiceViewModel(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return ModalServiceViewModel.prototype.body=function(){return this._jqueryObjectFactory.createObjectForSelector("body")},ModalServiceViewModel.prototype.popUpMask=function(){return this._jqueryObjectFactory.createObjectForSelector("#popupmask")},ModalServiceViewModel.prototype.tabableElements=function(){return this._jqueryObjectFactory.createObjectForSelector("a[href], area[href], input, select, textarea, button, iframe, object, embed, *[tabindex], *[contenteditable]")},ModalServiceViewModel.prototype.documentActiveElement=function(){return document.activeElement},ModalServiceViewModel.prototype.elementToJquery=function(element){return this._jqueryObjectFactory.createObjectForElement(element)},ModalServiceViewModel.prototype.elementsAreTheSame=function(element1,element2){return element1.is(element2)},ModalServiceViewModel.prototype.window=function(){return this._jqueryObjectFactory.createObjectForCurrentWindow()},ModalServiceViewModel}();LoginControls.ModalServiceViewModel=ModalServiceViewModel})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var Models;(function(Models){var Modal=function(){function Modal(modal,priority,hideModalOnOverlayClick){hideModalOnOverlayClick===void 0&&(hideModalOnOverlayClick=!0);this.modal=modal;this.priority=priority;this.hideModalOnOverlayClick=hideModalOnOverlayClick}return Modal}();Models.Modal=Modal})(Models=Components.Models||(Components.Models={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Services;(function(Services){"use strict";var BrowserDetailsService=function(){function BrowserDetailsService(){this.browser=null}return BrowserDetailsService.prototype.getBrowser=function(){if(this.browser!=null)return this.browser;var sBrowser=this.getBrowserUserAgent();return this.browser=sBrowser.indexOf("opr")!==-1?this.buildOperaBrowser():sBrowser.indexOf("chrome")!==-1?this.buildGoogleChromeBrowser():sBrowser.indexOf("firefox")!==-1?this.buildMozillaFirefoxBrowser():sBrowser.indexOf("safari")!==-1&&sBrowser.indexOf("android")===-1?this.buildAppleSafariBrowser():sBrowser.indexOf("android")!==-1?this.buildAndroidNativeBrowser():this.buildMicrosoftInternetExplorerBrowser(sBrowser),this.browser},BrowserDetailsService.prototype.isAndroidInternetBrowser=function(){return this.getBrowser().name==="AndroidInternet"},BrowserDetailsService.prototype.buildMicrosoftInternetExplorerBrowser=function(browser){var version=0,re;return browser.indexOf("trident")!==-1&&browser.indexOf("rv:11")!==-1?version=11:(re=new RegExp("msie ([0-9]{1,}[.0-9]{0,})"),re.exec(browser)!=null&&(version=parseFloat(RegExp.$1))),new Components.Models.Browser("Microsoft","Internet Explorer",version)},BrowserDetailsService.prototype.buildGoogleChromeBrowser=function(){return new Components.Models.Browser("Google","Chrome",0)},BrowserDetailsService.prototype.buildOperaBrowser=function(){return new Components.Models.Browser("Opera","Opera",0)},BrowserDetailsService.prototype.buildMozillaFirefoxBrowser=function(){return new Components.Models.Browser("Mozilla","Firefox",0)},BrowserDetailsService.prototype.buildAppleSafariBrowser=function(){return new Components.Models.Browser("Apple","Safari",0)},BrowserDetailsService.prototype.buildNetscapeNavigatorBrowser=function(){return new Components.Models.Browser("Netscape","Navigator",0)},BrowserDetailsService.prototype.buildAndroidNativeBrowser=function(){return new Components.Models.Browser("Android","AndroidInternet",0)},BrowserDetailsService.prototype.getBrowserUserAgent=function(){return navigator.userAgent.toLowerCase()},BrowserDetailsService}();Services.BrowserDetailsService=BrowserDetailsService})(Services=LoginControls.Services||(LoginControls.Services={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Modal=Components.Models.Modal,InitialiseForSelector=Typescript.Application.InitialiseForSelector,LoginModal=function(_super){function LoginModal(modalService,loginService,loginEventHandlingService,domQuery,loginModalViewModel,windowQueries,browserDetailsService){var _this=_super.call(this,domQuery)||this;return _this._showLoginModalUrlParam="slp=1",_this._priority=50,_this._validClass="valid",_this._startBouncingClass="failed-login-bounce",_this._modalService=modalService,_this._loginService=loginService,_this._loginEventHandlingService=loginEventHandlingService,_this._loginModalViewModel=loginModalViewModel,_this._windowQueries=windowQueries,_this._browserDetailsService=browserDetailsService,_this}return __extends(LoginModal,_super),LoginModal.prototype.initialiseForSelector=function(cssClass){var _this=this;if(this.elementExists(cssClass)){this._loginModalViewModel.init(cssClass);this.setupClearInputClick();this.setupShowPasswordClick();this.bindCloseClicks();this._closeCallback=function(){return _this._modalService.hideModal()};this.bindLoginClick();this._loginModalViewModel.username().on("keypress",function(e){_this.logInOnEnter(e)});this._loginModalViewModel.username().on("keyup",function(){_this.toggleValidClass(_this._loginModalViewModel.username());_this.lteIe9()||_this._loginModalViewModel.displayClearInputIfRequired()});this._loginModalViewModel.password().on("keypress",function(e){_this.logInOnEnter(e)});this._loginModalViewModel.password().on("keyup",function(){_this.toggleValidClass(_this._loginModalViewModel.password());_this.lteIe9()||_this._loginModalViewModel.displayShowPasswordIfRequired()});this.showModalOnInit();this._loginModalViewModel.username().change(function(){_this.toggleValidClass(_this._loginModalViewModel.username());_this.lteIe9()||_this._loginModalViewModel.displayClearInputIfRequired()});this._loginModalViewModel.password().change(function(){_this.lteIe9()||_this._loginModalViewModel.displayShowPasswordIfRequired()});this.setupInputBlurEvents();this._loginEventHandlingService.init(this)}},LoginModal.prototype.setupInputBlurEvents=function(){if(this.lteIe9()){var that=this;that._loginModalViewModel.username().blur(function(e){that._loginModalViewModel.hideLabelIfRequired(that._loginModalViewModel.getItemFromEventTarget(e.target))});that._loginModalViewModel.password().blur(function(e){that._loginModalViewModel.hideLabelIfRequired(that._loginModalViewModel.getItemFromEventTarget(e.target))})}},LoginModal.prototype.lteIe9=function(){var browser=this._browserDetailsService.getBrowser();return browser.name==="Internet Explorer"&&browser.version<=9},LoginModal.prototype.showModalOnInit=function(){var href=this.getWindowLocationHref();href.indexOf(this._showLoginModalUrlParam)>-1&&this.showLogin(!0)},LoginModal.prototype.getWindowLocationHref=function(){return window.location.href},LoginModal.prototype.showFailedLogin=function(){this._loginModalViewModel.modalWindow().parent().addClass("failed-login");this._loginModalViewModel.modalWindow().parent().addClass(this._startBouncingClass);this._loginModalViewModel.loginButtonText().show();this._loginModalViewModel.spinner().hide();this.clearAllInput();this._modalService.showModal(new Modal(this._loginModalViewModel.modalWindow(),this._priority))},LoginModal.prototype.showLogin=function(hideModalOnOverlayClick,closeEventCallback){closeEventCallback!=null&&(this._closeCallback=closeEventCallback);this._loginModalViewModel.modalWindow().parent().removeClass("failed-login");this._loginModalViewModel.modalWindow().parent().removeClass(this._startBouncingClass);this.clearAllInput();this._loginModalViewModel.displayClearInputIfRequired();this._loginModalViewModel.displayShowPasswordIfRequired();this.lteIe9()||this._loginModalViewModel.ResetInpuPasswordState();this._modalService.showModal(new Modal(this._loginModalViewModel.modalWindow(),this._priority,hideModalOnOverlayClick))},LoginModal.prototype.setupClearInputClick=function(){var _this=this;this._loginModalViewModel.clearInput().on("click",function(e){return e.preventDefault(),_this._loginModalViewModel.clearInputUsername().val(""),_this._loginModalViewModel.clearInputLabel().show(),_this._loginModalViewModel.clearInput().hide(),!1})},LoginModal.prototype.setupShowPasswordClick=function(){var _this=this;this._loginModalViewModel.showPassword().on("click",function(e){return e.preventDefault(),_this._loginModalViewModel.showPasswordToggleState(),!1})},LoginModal.prototype.clearAllInput=function(){this._loginModalViewModel.isModalVisible()||(this._loginModalViewModel.username().val("").siblings("label").show(),this._loginModalViewModel.password().val("").siblings("label").show())},LoginModal.prototype.bindCloseClicks=function(){var _this=this;this._loginModalViewModel.popUpMask().on("click",function(){_this.isModalLoginVisible()&&_this._closeCallback()})},LoginModal.prototype.isModalLoginVisible=function(){return this._loginModalViewModel.modalWindow().is(":visible")},LoginModal.prototype.bindLoginClick=function(){var _this=this;this._loginModalViewModel.loginButton().on("click",function(e){_this.logIn(e)})},LoginModal.prototype.logInOnEnter=function(e){e.which===13&&this.logIn(e)},LoginModal.prototype.logIn=function(e){e.preventDefault();this._loginModalViewModel.modalWindow().parent().removeClass(this._startBouncingClass);this._loginModalViewModel.loginButtonText().hide();this._loginModalViewModel.spinner().show();this._loginService.logIn(this._loginModalViewModel.username().val(),this._loginModalViewModel.password().val(),this._windowQueries.pathname(),"","loginpanel",this)},LoginModal.prototype.toggleValidClass=function(element){element.val().length===0?element.removeClass(this._validClass):element.addClass(this._validClass)},LoginModal}(InitialiseForSelector);LoginControls.LoginModal=LoginModal})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var RealityCheckViewModel=function(){function RealityCheckViewModel(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return RealityCheckViewModel.prototype.init=function(selector){this._modal=this._jqueryObjectFactory.createObjectForSelector(selector);this._timeUntilNext=this._modal&&this._modal.data("time-until-next")?+this._modal.data("time-until-next"):0},RealityCheckViewModel.prototype.modalWindow=function(){return this._modal?this._modal:null},RealityCheckViewModel.prototype.remainLoggedInButton=function(){return this._modal?this._modal.find(".stay-logged-in"):null},RealityCheckViewModel.prototype.logOutButton=function(){return this._modal?this._modal.find(".log-out"):null},RealityCheckViewModel.prototype.closeButton=function(){return this._modal?this._modal.find(".cooloff-message-container a.realitychecks-close"):null},RealityCheckViewModel.prototype.totalSessionTimeElement=function(){return this._modal?this._modal.find(".total-session-time"):null},RealityCheckViewModel.prototype.sessionMessageContainer=function(){return this._modal?this._modal.find(".session-message-container"):null},RealityCheckViewModel.prototype.coolOffMessageContainer=function(){return this._modal?this._modal.find(".cooloff-message-container"):null},RealityCheckViewModel.prototype.getTimeUntilNext=function(){return this._timeUntilNext},RealityCheckViewModel.prototype.setTimeUntilNext=function(theTimeUntilNext){this._timeUntilNext=theTimeUntilNext},RealityCheckViewModel.prototype.totalSessionTime=function(){return this._modal&&this._modal.data("total-session-time")?+this._modal.data("total-session-time"):0},RealityCheckViewModel.prototype.inactivityWarningDialogIsVisible=function(){return this._jqueryObjectFactory.createObjectForSelector(".InactivityWarningDialog").is(":visible")},RealityCheckViewModel}();LoginControls.RealityCheckViewModel=RealityCheckViewModel})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Queries;(function(Queries){var RealityCheckQueries=function(){function RealityCheckQueries(jqueryXhrRequestFactory){this._jqueryXhrRequestFactory=jqueryXhrRequestFactory}return RealityCheckQueries.prototype.checkIfPopupIsDisplayed=function(){return this._jqueryXhrRequestFactory.createXmlHttpRequest("/RealityCheck/Audit",{type:"POST",data:"{ 'eventType': 'Popup Displayed' }",contentType:"application/json; charset=utf-8",dataType:"json"})},RealityCheckQueries.prototype.getTimeUntilNext=function(){return this._jqueryXhrRequestFactory.createXmlHttpRequest("/RealityCheck/ResetRealityCheckTimer",{type:"POST",data:"",contentType:"application/json; charset=utf-8",dataType:"json"})},RealityCheckQueries.prototype.logOut=function(){return this._jqueryXhrRequestFactory.createXmlHttpRequest("/RealityCheck/Audit",{type:"POST",data:"{ 'eventType': 'Logout' }",contentType:"application/json; charset=utf-8",dataType:"json"})},RealityCheckQueries}();Queries.RealityCheckQueries=RealityCheckQueries})(Queries=LoginControls.Queries||(LoginControls.Queries={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Services;(function(Services){var ModalService=function(){function ModalService(modalServiceViewModel){this._modalQueue=[];this._visibleModal=null;this._modalServiceViewModel=modalServiceViewModel}return ModalService.prototype.showModal=function(modal){if(this._visibleModal==null)this._visibleModal=modal,this.displayModal();else{if(this._visibleModal.priority>modal.priority){if(this.modalExistsInQueueOrIsShowing(this._modalQueue,modal))return;this._modalQueue.push(this._visibleModal);this.fadeOut();this._visibleModal=modal;this.displayModal()}else{if(this.modalExistsInQueueOrIsShowing(this._modalQueue,modal))return;this._modalQueue.push(modal)}this._modalQueue.sort(this.modalQueueSortFunction)}},ModalService.prototype.fadeOut=function(){this.isLoginModal()?this._modalServiceViewModel.popUpMask().fadeOut(this.getFadeOutDuration()):this._visibleModal.modal.fadeOut(this.getFadeOutDuration())},ModalService.prototype.displayModal=function(){this._modalServiceViewModel.body().addClass("visibleModal");this.removeTabEventListener();this._modalServiceViewModel.window().off(".modal");this._modalServiceViewModel.popUpMask().is(":visible")||this._modalServiceViewModel.popUpMask().fadeIn(this.getFadeInDuration());this.animatedDisplay();this._visibleModal.modal.is("div")&&this.setupTabIndexes()},ModalService.prototype.animatedDisplay=function(){this.isLoginModal()?this._visibleModal.modal.fadeIn(0):this._visibleModal.modal.fadeIn(250)},ModalService.prototype.isLoginModal=function(){return this._visibleModal.modal.attr("data-component-type")==="LoginModal"},ModalService.prototype.getFadeInDuration=function(){return this.isLoginModal()?0:250},ModalService.prototype.getFadeOutDuration=function(){return this.isLoginModal()?0:250},ModalService.prototype.modalQueueSortFunction=function(modal1,modal2){return modal1.priority-modal2.priority},ModalService.prototype.hideModal=function(){this._modalServiceViewModel.body().removeClass("visibleModal");this._visibleModal!=null&&(this.fadeOut(),this._visibleModal.modal.is("div")&&this.removeTabEventListener(),this._modalQueue.length>0?(this._visibleModal=this._modalQueue.shift(),this.displayModal()):(this._modalServiceViewModel.popUpMask().fadeOut(this.getFadeOutDuration()),this._modalServiceViewModel.window().off(".modal"),this._visibleModal=null))},ModalService.prototype.setupTabIndexes=function(){var _this=this,tabableVisibleElements=this._visibleModal.modal.find(this._modalServiceViewModel.tabableElements()).not(":hidden, :disabled"),firstTabableElement=tabableVisibleElements.first(),lastTabableElement=tabableVisibleElements.last();this._visibleModal.modal.attr("tabindex",-1);this._visibleModal.modal.trigger("focus");tabableVisibleElements.each(function(index,element){_this._modalServiceViewModel.elementToJquery(element).attr("tabindex",index+1)});this.addTabEventListener(firstTabableElement,lastTabableElement)},ModalService.prototype.addTabEventListener=function(firstTabableElement,lastTabableElement){var _this=this;this._visibleModal&&this._visibleModal.modal.get(0).addEventListener("keydown",function(e){_this.tabEventListener(e,firstTabableElement,lastTabableElement)},!1)},ModalService.prototype.removeTabEventListener=function(){this._visibleModal.modal.get(0).removeEventListener("keydown",function(){})},ModalService.prototype.tabEventListener=function(e,firstTabableElement,lastTabableElement){e.keyCode==9&&(e.stopPropagation(),e.shiftKey?this._modalServiceViewModel.documentActiveElement()===firstTabableElement.get(0)&&(e.preventDefault(),lastTabableElement.trigger("focus")):this._modalServiceViewModel.documentActiveElement()===lastTabableElement.get(0)&&(e.preventDefault(),firstTabableElement.trigger("focus")))},ModalService.prototype.modalExistsInQueueOrIsShowing=function(modalArray,modal){var length,i;if(this._modalServiceViewModel.elementsAreTheSame(this._visibleModal.modal,modal.modal))return!0;for(length=modalArray.length,i=0;i<length;i++)if(this._modalServiceViewModel.elementsAreTheSame(modalArray[i].modal,modal.modal))return!0;return!1},ModalService}();Services.ModalService=ModalService})(Services=LoginControls.Services||(LoginControls.Services={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Utils;(function(Utils){var JSONParser=function(){function JSONParser(){}return JSONParser.prototype.parseJSON=function(jsonString){return $.parseJSON(jsonString)},JSONParser}();Utils.JSONParser=JSONParser})(Utils=LoginControls.Utils||(LoginControls.Utils={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var InitialiseForSelector=Typescript.Application.InitialiseForSelector,PostMessageReceiver=function(_super){function PostMessageReceiver(domQuery){return _super.call(this,domQuery)||this}return __extends(PostMessageReceiver,_super),PostMessageReceiver.prototype.initialiseForSelector=function(cssClass){this.elementExists(cssClass)&&this.registerPostMessageEventListener()},PostMessageReceiver.prototype.registerPostMessageEventListener=function(){var _this=this;$(window).on("message onmessage",function(event){_this.receivePostMessageFromSource(event)})},PostMessageReceiver.prototype.receivePostMessageFromSource=function(event){var messageEvent=event.originalEvent;this.isOriginAllowed(messageEvent.origin)&&this.performAjaxRequest(messageEvent)},PostMessageReceiver.prototype.isOriginAllowed=function(originDomain){var originHostname=originDomain.substr(originDomain.indexOf("://")+3);return originHostname===window.location.hostname},PostMessageReceiver.prototype.performAjaxRequest=function(messageEvent){var _this=this,settings=$.parseJSON(messageEvent.data);if(settings.url){var source=messageEvent.source,origin=messageEvent.origin,result={success:!1,data:null},xdr=new XDomainRequest;xdr.open(settings.type,settings.url);xdr.onload=function(){result.success=!0;result.data=xdr.responseText;_this.postResponseToSource(source,origin,result)};xdr.onerror=function(){_this.postResponseToSource(source,origin,result)};xdr.ontimeout=function(){_this.postResponseToSource(source,origin,result)};xdr.send($.param(settings.data,!0))}},PostMessageReceiver.prototype.postResponseToSource=function(source,origin,result){var message=JSON.stringify(result);source.postMessage(message,origin)},PostMessageReceiver}(InitialiseForSelector);LoginControls.PostMessageReceiver=PostMessageReceiver})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Utils;(function(Utils){var WindowQueries=function(){function WindowQueries(){}return WindowQueries.prototype.url=function(){return window.location.href},WindowQueries.prototype.hostname=function(){return window.location.hostname},WindowQueries.prototype.protocol=function(){return window.location.protocol},WindowQueries.prototype.pathname=function(){return window.location.pathname},WindowQueries.prototype.isHostedInPopupWindow=function(){return window.opener&&window.opener!==window},WindowQueries.prototype.opener=function(){return window.opener},WindowQueries}();Utils.WindowQueries=WindowQueries})(Utils=LoginControls.Utils||(LoginControls.Utils={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Utils;(function(Utils){var WindowCommands=function(){function WindowCommands(){}return WindowCommands.prototype.redirectTo=function(url){this.redirectUrlIsTheSameAsTheCurrentUrlAndContainsAHashSymbol(url)?this.reloadWindow():window.location.href=url},WindowCommands.prototype.reloadWindow=function(){window.location.reload()},WindowCommands.prototype.redirectUrlIsTheSameAsTheCurrentUrlAndContainsAHashSymbol=function(redirectUrl){return window.location.href.indexOf("#")>-1&&window.location.href===redirectUrl},WindowCommands}();Utils.WindowCommands=WindowCommands})(Utils=LoginControls.Utils||(LoginControls.Utils={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Modal=Components.Models.Modal,InitialiseForSelector=Typescript.Application.InitialiseForSelector,RealityCheckModal=function(_super){function RealityCheckModal(modalService,realityCheckTimerService,realityCheckTimerEvent,realityCheckViewModel,realityCheckQueries,domQuery,windowCommands){var _this=_super.call(this,domQuery)||this;return _this._priority=5,_this._sessionTimerIncrement=1e3,_this._modalService=modalService,_this._realityCheckTimerService=realityCheckTimerService,_this._realityCheckTimerEvent=realityCheckTimerEvent,_this._realityCheckViewModel=realityCheckViewModel,_this._realityCheckQueries=realityCheckQueries,_this._windowComamnds=windowCommands,_this}return __extends(RealityCheckModal,_super),RealityCheckModal.prototype.initialiseForSelector=function(cssClass){this.elementExists(cssClass)&&(this._realityCheckViewModel.init(cssClass),this.bindEvents(),this._timeWhenPageLoaded=+new Date,this._realityCheckTimerService.startTimer(this._realityCheckViewModel.getTimeUntilNext()))},RealityCheckModal.prototype.bindEvents=function(){var _this=this;this._realityCheckTimerEvent.onEvent(function(){_this.showRealityCheck()});this._realityCheckViewModel.remainLoggedInButton().on("click",function(){_this.hideRealityCheck(!0)});this._realityCheckViewModel.logOutButton().on("click",function(){_this.hideRealityCheck(!1)});this._realityCheckViewModel.closeButton().on("click",function(){_this.reloadWindowLocation()})},RealityCheckModal.prototype.showRealityCheck=function(){var _this=this,query;this._realityCheckViewModel.inactivityWarningDialogIsVisible()||(query=this._realityCheckQueries.checkIfPopupIsDisplayed(),query.done(function(data){data&&data.toString().toLowerCase()==="true"?_this.showRealityCheckAuditCallback():_this.reloadWindowLocation()}))},RealityCheckModal.prototype.showRealityCheckAuditCallback=function(){this._modalService.showModal(new Modal(this._realityCheckViewModel.modalWindow(),this._priority,!1));this._realityCheckTimerService.stopAndResetTimer();this.startSessionTimer()},RealityCheckModal.prototype.coolOffAcknowledged=function(){this.reloadWindowLocation()},RealityCheckModal.prototype.continuePlaying=function(){var _this=this,q=this._realityCheckQueries.getTimeUntilNext();q.done(function(data){_this.resetRealityCheckTimerCallback(data)})},RealityCheckModal.prototype.resetRealityCheckTimerCallback=function(data){data>0?(this._realityCheckViewModel.setTimeUntilNext(data),this._realityCheckTimerService.startTimer(this._realityCheckViewModel.getTimeUntilNext())):this.reloadWindowLocation()},RealityCheckModal.prototype.auditLogout=function(){this._realityCheckQueries.logOut()},RealityCheckModal.prototype.startSessionTimer=function(){var tempTotalSessionTime=this._realityCheckViewModel.totalSessionTime()+(+new Date-this._timeWhenPageLoaded);this.startIncrementTotalSessionTime(tempTotalSessionTime)},RealityCheckModal.prototype.hideRealityCheck=function(stayLoggedIn){stayLoggedIn?(this.continuePlaying(),this.stopSessionTimer(),this._modalService.hideModal()):(this.auditLogout(),this._realityCheckViewModel.sessionMessageContainer().hide(),this._realityCheckViewModel.coolOffMessageContainer().show())},RealityCheckModal.prototype.startIncrementTotalSessionTime=function(tempTotalSessionTime){var that=this;this._sessionTimer=setTimeout(function(){tempTotalSessionTime=tempTotalSessionTime+that._sessionTimerIncrement;that._realityCheckViewModel.totalSessionTimeElement().text(that.msToFormattedTime(tempTotalSessionTime));that.startIncrementTotalSessionTime(tempTotalSessionTime)},that._sessionTimerIncrement)},RealityCheckModal.prototype.stopSessionTimer=function(){clearTimeout(this._sessionTimer)},RealityCheckModal.prototype.msToFormattedTime=function(duration){var seconds=parseInt((duration/1e3%60).toString()),minutes=parseInt((duration/6e4%60).toString()),hours=parseInt((duration/36e5%24).toString()),hoursString=hours<10?"0"+hours:hours,minutesString=minutes<10?"0"+minutes:minutes,secondsString=seconds<10?"0"+seconds:seconds;return hoursString+":"+minutesString+":"+secondsString},RealityCheckModal.prototype.reloadWindowLocation=function(){this._windowComamnds.reloadWindow()},RealityCheckModal}(InitialiseForSelector);LoginControls.RealityCheckModal=RealityCheckModal})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Services;(function(Services){var RealityCheckTimerService=function(){function RealityCheckTimerService(realityCheckTimerEvent){this._realityCheckTimerEvent=realityCheckTimerEvent}return RealityCheckTimerService.prototype.startTimer=function(timeTillNext){this.timer(timeTillNext)},RealityCheckTimerService.prototype.stopAndResetTimer=function(){clearTimeout(this._timeout)},RealityCheckTimerService.prototype.timer=function(checkInterval){var _this=this;this._timeout=setTimeout(function(){_this._realityCheckTimerEvent.emitEvent()},checkInterval)},RealityCheckTimerService}();Services.RealityCheckTimerService=RealityCheckTimerService})(Services=LoginControls.Services||(LoginControls.Services={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Services;(function(Services){var InitialiseForSelector=Typescript.Application.InitialiseForSelector,LogoutEventHandlingService=function(_super){function LogoutEventHandlingService(jqueryObjectFactory,logoutService,domQuery){var _this=_super.call(this,domQuery)||this;return _this._jqueryObjectFactory=jqueryObjectFactory,_this._logoutService=logoutService,_this}return __extends(LogoutEventHandlingService,_super),LogoutEventHandlingService.prototype.initialise=function(selector){this.elementExists(selector)&&this.bindLogoutClickEventHandlers(this._jqueryObjectFactory.createObjectForSelector(selector))},LogoutEventHandlingService.prototype.bindLogoutClickEventHandlers=function(pageJQueryObject){var _this=this;pageJQueryObject.on("click",".log-out",function(e){return _this.logoutOut(e)})},LogoutEventHandlingService.prototype.logoutOut=function(e){e.preventDefault();var clickedObject=this._jqueryObjectFactory.createObjectForElement(e.target),refreshPage=clickedObject.hasClass("refresh");this._logoutService.logOut(refreshPage)},LogoutEventHandlingService}(InitialiseForSelector);Services.LogoutEventHandlingService=LogoutEventHandlingService})(Services=LoginControls.Services||(LoginControls.Services={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(IoC){var Installers;(function(Installers){var LoginInstaller=function(){function LoginInstaller(){}return LoginInstaller.prototype.install=function(container){container.register(IoC.Component.named("corsService").componentType(Typescript.Components.LoginControls.Services.CorsService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("queryStringService").componentType(Typescript.Components.LoginControls.Services.QueryStringService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("loginService").componentType(Typescript.Components.LoginControls.Services.LoginService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("logoutService").componentType(Typescript.Components.LoginControls.Services.LogoutService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("logoutScreenUpdatingService").componentType(Typescript.Components.LoginControls.Services.LogoutScreenUpdatingService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("logoutCommand").componentType(Typescript.Components.LoginControls.Commands.LogOutCommand).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("reloadParentWindowCommand").componentType(Typescript.Components.LoginControls.Commands.ReloadParentWindowCommand).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("loginProcessQuery").componentType(Typescript.Components.LoginControls.Queries.LoginProcessQuery).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("loginResultQuery").componentType(Typescript.Components.LoginControls.Queries.LoginResultQuery).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("loginViewModel").componentType(Typescript.Components.LoginControls.LoginViewModel).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("loginModalViewModel").componentType(Typescript.Components.LoginControls.LoginModalViewModel).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("loginEventHandlingService").componentType(Typescript.Components.LoginControls.Services.LoginEventHandlingService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("modalServiceViewModel").componentType(Typescript.Components.LoginControls.ModalServiceViewModel).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("loginModal").componentType(Typescript.Components.LoginControls.LoginModal).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("realityCheckViewModel").componentType(Typescript.Components.LoginControls.RealityCheckViewModel).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("realityCheckQueries").componentType(Typescript.Components.LoginControls.Queries.RealityCheckQueries).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("modalService").componentType(Typescript.Components.LoginControls.Services.ModalService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("jsonParser").componentType(Typescript.Components.LoginControls.Utils.JSONParser).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("postMessageReceiver").componentType(Typescript.Components.LoginControls.PostMessageReceiver).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("browserCapabilityQuery").componentType(Typescript.Components.LoginControls.Queries.BrowserCapabilityQuery).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("windowQueries").componentType(Typescript.Components.LoginControls.Utils.WindowQueries).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("windowCommands").componentType(Typescript.Components.LoginControls.Utils.WindowCommands).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("realityCheckModal").componentType(Typescript.Components.LoginControls.RealityCheckModal).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("realityCheckTimerEvent").componentType(Typescript.Components.LoginControls.Events.RealityCheckTimerEvent).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("realityCheckTimerService").componentType(Typescript.Components.LoginControls.Services.RealityCheckTimerService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("logoutEventHandlingService").componentType(Typescript.Components.LoginControls.Services.LogoutEventHandlingService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("kycSecondaryAuthMobile").componentType(Typescript.Components.KycSecondaryAuthMobile).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("membersLoadInFrameEvent").componentType(Typescript.Components.LoginControls.Events.MembersLoadInFrameEvent).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("membersFrame").componentType(Typescript.Components.MembersFrame).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("postMessageBrokerService").componentType(Typescript.Components.LoginControls.Services.PostMessageBrokerService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("postMessageBrokerService").componentType(Typescript.Components.LoginControls.Services.PostMessageBrokerService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("membersLoadInFrameEvent").componentType(Typescript.Components.LoginControls.Events.MembersLoadInFrameEvent).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("toggleMenuEvent").componentType(Typescript.Components.LoginControls.Events.ToggleMenuEvent).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("pageContextService").componentType(Typescript.Components.LoginControls.Services.PageContextService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("loginEvent").componentType(Typescript.Components.LoginControls.Events.LoginEvent).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("logService").componentType(Typescript.Components.LoginControls.Services.LogService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("cookieService").componentType(Typescript.Components.LoginControls.Services.CookieService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("browserDetailsService").componentType(Typescript.Components.LoginControls.Services.BrowserDetailsService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("mobileLoggedInOverlay").componentType(Typescript.Components.MobileLoggedInOverlay).withLifestyle(IoC.Lifestyle.Singleton))},LoginInstaller}();Installers.LoginInstaller=LoginInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(LiveInPlay){var SportsContentAttributes=function(){function SportsContentAttributes(){}return SportsContentAttributes.filteredOut="FX",SportsContentAttributes}();LiveInPlay.SportsContentAttributes=SportsContentAttributes}(LiveInPlay||(LiveInPlay={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var ComponentStemBase=ns_gen5_ui.ComponentStemBase,SportsContentAttributes=LiveInPlay.SportsContentAttributes,Suspendable=function(_super){function Suspendable(type){var _this=_super.call(this,type)||this;return _this._suspendUpdated=!0,_this}return __extends(Suspendable,_super),Suspendable.prototype.commitProperties=function(){this._suspendUpdated&&(this.stem.data.SU=="1"?this.suspendElementFromDom():SportsContentAttributes.filteredOut in this.stem.data&&this.stem.data[SportsContentAttributes.filteredOut]=="0"&&this.unsuspendElementFromDom())},Suspendable.prototype.stemUpdateHandler=function(stem,updateData){"SU"in updateData&&(this._suspendUpdated=!0,this.invalidateProperties())},Suspendable}(ComponentStemBase);LiveNowPod.Suspendable=Suspendable})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var SportsContentAttributes=LiveInPlay.SportsContentAttributes,SportsFixture=function(_super){function SportsFixture(classificationName,fixtureName,fixtureTime,onClickStreamPlayer,fixtureNameTransformer,classificationNamesQuery,formattedDatetimeQuery,liveNowPodSettings,extraPlayerModuleFactory){var _this=_super.call(this)||this;return _this.extraPlayerModuleFactory=extraPlayerModuleFactory,_this._nameUpdated=!0,_this._classificationUpdated=!0,_this._startTimeUpdated=!0,_this._mediaIdUpdated=!0,_this._paddockUpdated=!0,_this._filterUpdated=!0,_this._fixtureNameTransformer=fixtureNameTransformer,_this._classificationNamesQuery=classificationNamesQuery,_this._formattedDatetimeQuery=formattedDatetimeQuery,_this._classificationName=classificationName,_this._fixtureName=fixtureName,_this._fixtureTime=fixtureTime,_this._onClickStreamPlayer=onClickStreamPlayer,_this._liveNowPodSettings=liveNowPodSettings,_this.addStyle("fixture"),_this.bindClick(),_this.addLoginLinkIfRequired(liveNowPodSettings),_this}return __extends(SportsFixture,_super),SportsFixture.prototype.createChildren=function(){this.appendChild(this._fixtureTime);this.appendChild(this._fixtureName)},SportsFixture.prototype.updateClassification=function(id){this._classificationName.setText(this._classificationNamesQuery.getClassificationName(id));this.setAttribute("value",id);var classificationSvgImageUrl=this.getBackgroundImageUrlWithClassificationId(id);this.setAttribute("style","background-image: url('"+classificationSvgImageUrl+"')")},SportsFixture.prototype.bindClick=function(){this._onClickStreamPlayer.attachToElement(this.getElement())},SportsFixture.prototype.addLoginLinkIfRequired=function(settings){settings.userIsLoggedIn||this.addStyle("loginlink")},SportsFixture.prototype.getBackgroundImageUrlWithClassificationId=function(id){return this._liveNowPodSettings.classificationSvgImageUrl.replace("{classificationId}",id)},SportsFixture.prototype.commitProperties=function(){this._nameUpdated&&(this._fixtureName.setText(this._fixtureNameTransformer.transform(this.stem.data.NA).name),this._nameUpdated=!1);this._classificationUpdated&&(this.updateClassification(this.stem.data.CL),this._classificationUpdated=!1);this._startTimeUpdated&&(this._fixtureTime.setText(this._formattedDatetimeQuery.getFormattedValue(this.stem.data.SM)),this._nameUpdated=!1);(this._filterUpdated||this._mediaIdUpdated||this._suspendUpdated||this._paddockUpdated)&&(this.currentValidItem()?this.unsuspendElementFromDom():this.suspendElementFromDom(),this._filterUpdated=this._mediaIdUpdated=this._suspendUpdated=this._paddockUpdated=!1)},SportsFixture.prototype.currentValidItem=function(){var module=this.extraPlayerModuleFactory.retriveExtraPlayerModule();return SportsContentAttributes.filteredOut in this.stem.data&&this.stem.data[SportsContentAttributes.filteredOut]=="1"||"SU"in this.stem.data&&this.stem.data.SU=="1"||!(module.isValidMediaId(this.stem.data.MS)||module.isValidMediaId(this.stem.data.PS))?!1:!0},SportsFixture.prototype.stemUpdateHandler=function(stem,updateData){_super.prototype.stemUpdateHandler.call(this,stem,updateData);"NA"in updateData&&(this._nameUpdated=!0);"CL"in updateData&&(this._classificationUpdated=!0);"SM"in updateData&&(this._startTimeUpdated=!0);"MS"in updateData&&(this._mediaIdUpdated=!0);"PS"in updateData&&(this._paddockUpdated=!0);SportsContentAttributes.filteredOut in updateData&&(this._filterUpdated=!0);(this._nameUpdated||this._classificationUpdated||this._startTimeUpdated||this._filterUpdated||this._mediaIdUpdated||this._paddockUpdated)&&this.invalidateProperties()},SportsFixture.prototype.stemDeleteHandler=function(){this.suspendElementFromDom()},SportsFixture}(LiveNowPod.Suspendable);LiveNowPod.SportsFixture=SportsFixture})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var ClassificationDropdownItem=function(_super){function ClassificationDropdownItem(classificationNamesQuery,textNode){var _this=_super.call(this,"a")||this;return _this._classificationUpdated=!0,_this._classificationNamesQuery=classificationNamesQuery,_this._textNode=textNode,_this}return __extends(ClassificationDropdownItem,_super),ClassificationDropdownItem.prototype.updateClassification=function(id){this._textNode.setText(this._classificationNamesQuery.getClassificationName(id));this.setAttribute("value",id);id==="-1"&&this.addStyle("selected")},ClassificationDropdownItem.prototype.createChildren=function(){this.appendChild(this._textNode)},ClassificationDropdownItem.prototype.commitProperties=function(){_super.prototype.commitProperties.call(this);this._classificationUpdated&&(this.updateClassification(this.stem.data.CL),this._classificationUpdated=!1)},ClassificationDropdownItem.prototype.stemUpdateHandler=function(stem,updateData){_super.prototype.stemUpdateHandler.call(this,stem,updateData);"CL"in updateData&&(this._classificationUpdated=!0,this.invalidateProperties())},ClassificationDropdownItem}(LiveNowPod.Suspendable);LiveNowPod.ClassificationDropdownItem=ClassificationDropdownItem})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var InitialiseForSelector=Typescript.Application.InitialiseForSelector,SportsLiveNowPodInitialiser=function(_super){function SportsLiveNowPodInitialiser(gen5BaseViewHostFactory,liveNowPodSettingsFactory,sportsLiveNowPodViewFactory,subscribeCommand,extraPlayerModuleFactory,domQuery){var _this=_super.call(this,domQuery)||this;return _this.gen5BaseViewHostFactory=gen5BaseViewHostFactory,_this.liveNowPodSettingsFactory=liveNowPodSettingsFactory,_this.sportsLiveNowPodViewFactory=sportsLiveNowPodViewFactory,_this.subscribeCommand=subscribeCommand,_this.extraPlayerModuleFactory=extraPlayerModuleFactory,_this}return __extends(SportsLiveNowPodInitialiser,_super),SportsLiveNowPodInitialiser.prototype.initialiseForSelector=function(selector){var _this=this;if(this.elementExists(selector)){var settings_1=this.liveNowPodSettingsFactory.createSettings(selector),gen5BaseViewHost_1=this.gen5BaseViewHostFactory.createViewHost(settings_1),view=this.sportsLiveNowPodViewFactory.createView(settings_1);this.extraPlayerModuleFactory.createExtraPlayerModule(function(){_this.subscribeCommand.subscribe(settings_1.subscriptionTopic,function(rootStem){view.subscribed(rootStem);gen5BaseViewHost_1.addView(view)})})}},SportsLiveNowPodInitialiser}(InitialiseForSelector);LiveNowPod.SportsLiveNowPodInitialiser=SportsLiveNowPodInitialiser})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var InitialiseForSelector=Typescript.Application.InitialiseForSelector,FaqsPodInitialiser=function(_super){function FaqsPodInitialiser(domQuery,accordion,jqueryObjectFactory){var _this=_super.call(this,domQuery)||this;return _this._accordionSelector=".accordion-section",_this._accordion=accordion,_this._jqueryObjectFactory=jqueryObjectFactory,_this}return __extends(FaqsPodInitialiser,_super),FaqsPodInitialiser.prototype.initialiseForSelector=function(selector){this.elementExists(selector)&&this._accordion.initialiseForSelector(this._accordionSelector)},FaqsPodInitialiser.prototype.buildElement=function(text){return'<input type="text" class="search-box" name= "search" value= "'+text+'" original-value="'+text+'"/>'},FaqsPodInitialiser}(InitialiseForSelector);LiveNowPod.FaqsPodInitialiser=FaqsPodInitialiser})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Gen5BaseViewHost=function(){function Gen5BaseViewHost(commonLiveNowPodSettings){this.initialiseViewHost(commonLiveNowPodSettings)}return Gen5BaseViewHost.prototype.addView=function(view){this._application.appendChild(view)},Gen5BaseViewHost.prototype.initialiseViewHost=function(commonLiveNowPodSettings){this.initialiseApplication(commonLiveNowPodSettings.element);this.setupUserDetails(commonLiveNowPodSettings);this.connect(commonLiveNowPodSettings.connectionDetails,commonLiveNowPodSettings.fallbackConnectionDetails)},Gen5BaseViewHost.prototype.initialiseApplication=function(element){this._application=new ns_gen5_ui.Application(element);this._application.initialize();this._application.enableUI()},Gen5BaseViewHost.prototype.setupUserDetails=function(commonLiveNowPodSettings){Locator.user.languageId=commonLiveNowPodSettings.userLanguage;Locator.user.isLoggedIn=commonLiveNowPodSettings.userIsLoggedIn;Locator.user.zoneId=commonLiveNowPodSettings.userZone;Locator.user.countryCode=commonLiveNowPodSettings.userCountryCode;Locator.user.timeZoneAdjustment=commonLiveNowPodSettings.userTimezoneOffset;Locator.user.setSiteConfig(commonLiveNowPodSettings.sportsFilterMode,commonLiveNowPodSettings.sportsCountryId,commonLiveNowPodSettings.sportsCountryStateId,commonLiveNowPodSettings.sportsCountryGroupId)},Gen5BaseViewHost.prototype.connect=function(connectionDetails,fallbackConnectionDetails){Locator.config=new Typescript.Application.ApplicationConfig;Locator.config.connectionDetails=connectionDetails;Locator.config._fallbackConnectionDetails=fallbackConnectionDetails;Locator.subscriptionManager._streamDataProcessor._allowFallbackConnection=!1;Locator.subscriptionManager._streamDataProcessor._fallbackServerConnection=new readit.ReaditFallbackClient;Locator.subscriptionManager.connect()},Gen5BaseViewHost}();LiveNowPod.Gen5BaseViewHost=Gen5BaseViewHost})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Gen5BaseViewHostFactory=function(){function Gen5BaseViewHostFactory(){}return Gen5BaseViewHostFactory.prototype.createViewHost=function(liveNowPodSettings){return new LiveNowPod.Gen5BaseViewHost(liveNowPodSettings)},Gen5BaseViewHostFactory}();LiveNowPod.Gen5BaseViewHostFactory=Gen5BaseViewHostFactory})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var CommonLiveNowPodSettings=function(){function CommonLiveNowPodSettings(element,subscriptionTopic,title,connectionDetails,fallbackConnectionDetails,userOnMobilePlatform,userIsLoggedIn,userLanguage,userZone,userTimezoneOffset,userCountryCode,sportsCountryId,sportsCountryGroupId,sportsCountryStateId,sportsFilterMode,classificationSvgImageUrl){this.element=element;this.subscriptionTopic=subscriptionTopic;this.title=title;this.connectionDetails=connectionDetails;this.fallbackConnectionDetails=fallbackConnectionDetails;this.userOnMobilePlatform=userOnMobilePlatform;this.userIsLoggedIn=userIsLoggedIn;this.userLanguage=userLanguage;this.userZone=userZone;this.userTimezoneOffset=userTimezoneOffset;this.userCountryCode=userCountryCode;this.sportsCountryId=sportsCountryId;this.sportsCountryGroupId=sportsCountryGroupId;this.sportsCountryStateId=sportsCountryStateId;this.sportsFilterMode=sportsFilterMode;this.classificationSvgImageUrl=classificationSvgImageUrl}return CommonLiveNowPodSettings}();LiveNowPod.CommonLiveNowPodSettings=CommonLiveNowPodSettings})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var LiveNowPodSettings=function(_super){function LiveNowPodSettings(element,subscriptionTopic,title,connectionDetails,fallbackConnectionDetails,userOnMobilePlatform,userIsLoggedIn,userLanguage,userZone,userTimezoneOffset,usersCountryCode,sportsCountryId,sportsCountryGroupId,sportsCountryStateId,sportsFilterMode,classificationNames,classificationSvgImageUrl){var _this=_super.call(this,element,subscriptionTopic,title,connectionDetails,fallbackConnectionDetails,userOnMobilePlatform,userIsLoggedIn,userLanguage,userZone,userTimezoneOffset,usersCountryCode,sportsCountryId,sportsCountryGroupId,sportsCountryStateId,sportsFilterMode,classificationSvgImageUrl)||this;return _this.classificationNames=classificationNames,_this}return __extends(LiveNowPodSettings,_super),LiveNowPodSettings}(LiveNowPod.CommonLiveNowPodSettings);LiveNowPod.LiveNowPodSettings=LiveNowPodSettings})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var LiveNowPodSettingsFactory=function(){function LiveNowPodSettingsFactory(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return LiveNowPodSettingsFactory.prototype.createSettings=function(selector){var liveNowPod=this._jqueryObjectFactory.createObjectForSelector(selector);return new LiveNowPod.LiveNowPodSettings(liveNowPod[0],liveNowPod.data("subscription-topic"),liveNowPod.data("title"),liveNowPod.data("connection-details"),liveNowPod.data("fallback-connection-details"),liveNowPod.data("user-on-mobile-platform").toLowerCase()==="true",liveNowPod.data("user-is-logged-in").toLowerCase()==="true",liveNowPod.data("user-language"),liveNowPod.data("user-zone"),liveNowPod.data("user-timezone-offset"),liveNowPod.data("user-country-code"),liveNowPod.data("sports-country-id"),liveNowPod.data("sports-country-group-id"),liveNowPod.data("sports-country-state-id"),liveNowPod.data("sports-filter-mode"),liveNowPod.data("classification-names"),liveNowPod.data("classification-svg-image-url"))},LiveNowPodSettingsFactory}();LiveNowPod.LiveNowPodSettingsFactory=LiveNowPodSettingsFactory})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var SportsLiveNowPodViewFactory=function(){function SportsLiveNowPodViewFactory(abstractFactory){this._abstractFactory=abstractFactory}return SportsLiveNowPodViewFactory.prototype.createView=function(settings){return this._abstractFactory.createInstance("sportsLiveNowPodView",{liveNowPodSettings:settings})},SportsLiveNowPodViewFactory}();LiveNowPod.SportsLiveNowPodViewFactory=SportsLiveNowPodViewFactory})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Delegate=ns_gen5_util.Delegate,SubscribeCommand=function(){function SubscribeCommand(){}return SubscribeCommand.prototype.subscribe=function(subscriptionTopic,subscribedHandler){var user=Locator.user,formattedTopic=ns_gen5_util.StringUtil.Format(subscriptionTopic,user.languageId,user.zoneId);Locator.subscriptionManager.subscribe(formattedTopic,new Delegate(this,this.subscribed(subscribedHandler)))},SubscribeCommand.prototype.subscribed=function(subscribedHandler){var _this=this;return function(event){var stem=_this.lookupRootStem(event.type);subscribedHandler(stem)}},SubscribeCommand.prototype.lookupRootStem=function(eventType){return Locator.treeLookup.getReference(eventType)},SubscribeCommand}();LiveNowPod.SubscribeCommand=SubscribeCommand})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var ComponentStemBase=ns_gen5_ui.ComponentStemBase,Delegate=ns_gen5_util.Delegate,SportsContentAttributes=LiveInPlay.SportsContentAttributes,LiveNowPodViewBase=function(_super){function LiveNowPodViewBase(visibleFixturesQuery,tabCommandFactory,playFirstStream,notifyAvailableStreams,extraMediaPlayer,extraPlayerModuleFactory){var _this=_super.call(this)||this;return _this.visibleFixturesQuery=visibleFixturesQuery,_this.tabCommandFactory=tabCommandFactory,_this.playFirstStream=playFirstStream,_this.notifyAvailableStreams=notifyAvailableStreams,_this.extraMediaPlayer=extraMediaPlayer,_this.extraPlayerModuleFactory=extraPlayerModuleFactory,_this.stemChildDeletedHandlerDelegate=null,_this.stemChildUpdateHandlerDelegate=null,_this.stemInsertHandlerDelegate=null,_this.stemChildDeletedHandlerDelegate=new Delegate(_this,_this.stemChildDeletedHandler),_this.stemChildUpdateHandlerDelegate=new Delegate(_this,_this.childUpdateHandler),_this.stemInsertHandlerDelegate=new Delegate(_this,_this.insertHandler),_this}return __extends(LiveNowPodViewBase,_super),LiveNowPodViewBase.prototype.subscribed=function(rootStem){var children,i;for(this.rootStem=rootStem,this.filterStem(),this.rootStem.addEventListener(ns_gen5_data.StemEvent.CHILD_DELETE,this.stemChildDeletedHandlerDelegate),this.rootStem.addEventListener(ns_gen5_data.StemEvent.INSERT,this.stemInsertHandlerDelegate),children=this.rootStem.getChildren(),i=0;i<children.length;i++)children[i].addEventListener(ns_gen5_data.StemEvent.UPDATE,this.stemChildUpdateHandlerDelegate)},LiveNowPodViewBase.prototype.getStemData=function(){return this.rootStem},LiveNowPodViewBase.prototype.hideOrShowViewBasedOnNumberOfVisibleFixtures=function(playfirst){this.visibleFixturesQuery.getCount(this.rootStem)===0?(this.notifyAvailableStreams.streamsAvailable(!1),this.tabCommandFactory.createDisableCommand().disableTab("live-now-tab"),this.suspendElementFromDom()):(this.notifyAvailableStreams.streamsAvailable(!0),this.tabCommandFactory.createEnableCommand().enableTab("live-now-tab"),this.unsuspendElementFromDom(),playfirst&&this.playFirstStream.playFirstStream(this.rootStem))},LiveNowPodViewBase.prototype.filterStem=function(){},LiveNowPodViewBase.prototype.stemChildDeletedHandler=function(event){event.data.removeEventListener(ns_gen5_data.StemEvent.UPDATE,this.stemChildUpdateHandlerDelegate);this.handleChanges(event.data);this.filterStem();this.invalidateProperties()},LiveNowPodViewBase.prototype.getModule=function(){return this.extraPlayerModuleFactory.retriveExtraPlayerModule()},LiveNowPodViewBase.prototype.childUpdateHandler=function(event){this.handleChanges(event.target)},LiveNowPodViewBase.prototype.handleChanges=function(stem){this.getModule().getMediaDataVO(stem).topicID!=this.extraMediaPlayer.currentVO.topicID||this.itemValid(stem)||this.hideOrShowViewBasedOnNumberOfVisibleFixtures(!1)},LiveNowPodViewBase.prototype.itemValid=function(stem){return SportsContentAttributes.filteredOut in stem.data&&stem.data[SportsContentAttributes.filteredOut]=="1"||"SU"in stem.data&&stem.data.SU=="1"||!this.isMediaIdValid(stem)||stem.parent.getChildren().indexOf(stem)==-1?!1:!0},LiveNowPodViewBase.prototype.isMediaIdValid=function(stem){return this.isValidMediaId(stem.data.MS)||this.isValidMediaId(stem.data.PS)},LiveNowPodViewBase.prototype.isValidMediaId=function(id){return id&&id!=""&&id!="0"},LiveNowPodViewBase.prototype.insertHandler=function(event){var stem=event.target;this.filterStem();this.invalidateProperties()},LiveNowPodViewBase}(ComponentStemBase);LiveNowPod.LiveNowPodViewBase=LiveNowPodViewBase})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var DomElement=ns_gen5_ui.DomElement,TextNode=ns_gen5_ui.TextNode,SportsLiveNowPodView=function(_super){function SportsLiveNowPodView(visibleFixturesQuery,tabCommandFactory,playFirstStream,notifyAvailableStreams,extraMediaPlayer,extraPlayerModuleFactory,sportsFixtureFilter,sportsFixtureRenderer,classificationDropdownItemsRenderer,allSportsButton,uniqueClassificationsFilter,classificationDropdownWrapper,classificationDropdownItemFactory,abstractFactory,classificationNamesQuery){var _this=_super.call(this,visibleFixturesQuery,tabCommandFactory,playFirstStream,notifyAvailableStreams,extraMediaPlayer,extraPlayerModuleFactory)||this;return _this.sportsFixtureFilter=sportsFixtureFilter,_this.sportsFixtureRenderer=sportsFixtureRenderer,_this.classificationDropdownItemsRenderer=classificationDropdownItemsRenderer,_this.allSportsButton=allSportsButton,_this.uniqueClassificationsFilter=uniqueClassificationsFilter,_this.classificationDropdownWrapper=classificationDropdownWrapper,_this.classificationDropdownItemFactory=classificationDropdownItemFactory,_this.abstractFactory=abstractFactory,_this.classificationNamesQuery=classificationNamesQuery,_this}return __extends(SportsLiveNowPodView,_super),SportsLiveNowPodView.prototype.filter=function(classificationId){this.filterStem({classificationId:classificationId})},SportsLiveNowPodView.prototype.commitProperties=function(){this.uniqueClassificationsStem=this.uniqueClassificationsFilter.filter(this.rootStem);var dropdownrenderer=this.abstractFactory.createInstance("classificationDropdownItemsRenderer"),newDropDown=dropdownrenderer.render(this.uniqueClassificationsStem);newDropDown.appendChildAt(this.createAllSports(),0);this.dropDown?this.classificationDropdownWrapper.replaceChild(newDropDown,this.dropDown):this.classificationDropdownWrapper.appendChild(newDropDown);this.dropDown=newDropDown},SportsLiveNowPodView.prototype.createAllSports=function(){var text=new TextNode(this.classificationNamesQuery.getClassificationName("-1")),link=new DomElement("a");return link.appendChild(text),link.setAttribute("value","-1"),link},SportsLiveNowPodView.prototype.createChildren=function(){this.appendChild(this.allSportsButton);this.appendChild(this.classificationDropdownWrapper);this.appendChild(this.sportsFixtureRenderer.render(this.rootStem));this.hideOrShowViewBasedOnNumberOfVisibleFixtures(!0)},SportsLiveNowPodView.prototype.filterStem=function(options){this.rootStem=this.sportsFixtureFilter.filter(this.rootStem,options);this.uniqueClassificationsStem=this.uniqueClassificationsFilter.filter(this.rootStem)},SportsLiveNowPodView}(LiveNowPod.LiveNowPodViewBase);LiveNowPod.SportsLiveNowPodView=SportsLiveNowPodView})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var GenericStemRenderer=ns_gen5_ui.GenericStemRenderer,StemRenderer=function(_super){function StemRenderer(stemDisplayFactory,type){var _this=_super.call(this,type)||this;return _this._stemDisplayFactory=stemDisplayFactory,_this}return __extends(StemRenderer,_super),StemRenderer.prototype.render=function(stem){return this.setStem(stem),this},StemRenderer.prototype.createChildInstance=function(s){return this._stemDisplayFactory.createStemDisplay(s)},StemRenderer}(GenericStemRenderer);LiveNowPod.StemRenderer=StemRenderer})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var SportsFixtureRenderer=function(_super){function SportsFixtureRenderer(sportsFixtureFactory,formattedDatetimeQuery,application){var _this=_super.call(this,sportsFixtureFactory)||this;return _this.formattedDatetimeQuery=formattedDatetimeQuery,_this.application=application,_this.classsificationFilter="-1",_this.addStyle("sportsFixtureWrapper"),application.addClassificationChangedObserver(_this),_this}return __extends(SportsFixtureRenderer,_super),SportsFixtureRenderer.prototype.classifcationChanged=function(classificationId){this.classsificationFilter=classificationId},SportsFixtureRenderer.prototype.stemInsertHandler=function(stem,insertStem){var insertChild=this.createChildInstance(insertStem),newChildTime=this.convertTimeToNumber(insertStem.data.SM),newChildClassification=insertStem.data.CL,i,child,wrapper;for(insertChild.stem=insertStem,this.classsificationFilter!="-1"&&insertStem.data.CL!=this.classsificationFilter&&insertStem.update({FX:"1"}),i=0;i<=this._element.children.length;i++)if(child=this._element.children[i],wrapper=child.wrapper,wrapper){var childstem=wrapper.stem,currentStartTime=this.convertTimeToNumber(childstem.data.SM),currentClassification=childstem.data.CL;if(currentStartTime>newChildTime||currentClassification==newChildClassification&&currentStartTime==newChildTime){try{this.insertBefore(insertChild,child)}catch(a){ErrorReporter.Trace(this,a)}break}else if(i==this._element.children.length-1){try{this.appendChild(insertChild)}catch(a){ErrorReporter.Trace(this,a)}break}}},SportsFixtureRenderer.prototype.convertTimeToNumber=function(stemDate){var time=this.formattedDatetimeQuery.getFormattedValue(stemDate);return parseInt(time.replace(":",""))},SportsFixtureRenderer}(LiveNowPod.StemRenderer);LiveNowPod.SportsFixtureRenderer=SportsFixtureRenderer})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var SportsFixtureFactory=function(){function SportsFixtureFactory(abstractFactory,liveNowPodSettings){this._abstractFactory=abstractFactory;this._liveNowPodSettings=liveNowPodSettings}return SportsFixtureFactory.prototype.createStemDisplay=function(stem){return this._abstractFactory.createInstance("sportsFixture",{liveNowPodSettings:this._liveNowPodSettings,stem:stem})},SportsFixtureFactory}();LiveNowPod.SportsFixtureFactory=SportsFixtureFactory})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var ClassificationDropdownItemRenderer=function(_super){function ClassificationDropdownItemRenderer(classificationDropdownItemFactory){var _this=_super.call(this,classificationDropdownItemFactory,"div")||this;return _this.addStyle("classificationDropdown"),_this}return __extends(ClassificationDropdownItemRenderer,_super),ClassificationDropdownItemRenderer.prototype.stemInsertHandler=function(){},ClassificationDropdownItemRenderer}(LiveNowPod.StemRenderer);LiveNowPod.ClassificationDropdownItemRenderer=ClassificationDropdownItemRenderer})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var ClassificationDropdownItemFactory=function(){function ClassificationDropdownItemFactory(abstractFactory,liveNowPodSettings){this._abstractFactory=abstractFactory;this._liveNowPodSettings=liveNowPodSettings}return ClassificationDropdownItemFactory.prototype.createStemDisplay=function(stem){return this._abstractFactory.createInstance("classificationDropdownItem",{liveNowPodSettings:this._liveNowPodSettings,stem:stem})},ClassificationDropdownItemFactory}();LiveNowPod.ClassificationDropdownItemFactory=ClassificationDropdownItemFactory})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Component=ns_gen5_ui.Component,TextNode=ns_gen5_ui.TextNode,ElementBase=function(_super){function ElementBase(tagType,cssClass){var _this=_super.call(this,tagType)||this;return _this.createElementTextNode(cssClass),_this}return __extends(ElementBase,_super),ElementBase.prototype.setText=function(text){this._headerText.setText(text)},ElementBase.prototype.getText=function(){return this._headerText.getText()},ElementBase.prototype.createElementTextNode=function(cssClass){this.addStyle(cssClass);this._headerText=new TextNode;this.appendChild(this._headerText)},ElementBase}(Component);LiveNowPod.ElementBase=ElementBase})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var ClassificationName=function(_super){function ClassificationName(){return _super.call(this,"h3","classificationName")||this}return __extends(ClassificationName,_super),ClassificationName}(LiveNowPod.ElementBase);LiveNowPod.ClassificationName=ClassificationName})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var ClassificationDropdownWrapper=function(_super){function ClassificationDropdownWrapper(jqueryObjectFactory,sportsBarObjects){var _this=_super.call(this,"div","classificationDropdownWrapper")||this;return _this.sportsBarObjects=sportsBarObjects,_this.bindLostFocus(jqueryObjectFactory),_this}return __extends(ClassificationDropdownWrapper,_super),ClassificationDropdownWrapper.prototype.bindLostFocus=function(jqueryObjectFactory){var _this=this,body=jqueryObjectFactory.createObjectForSelector("body"),dropdownSelector=".classificationDropdownWrapper";body.click(function(ev){var target=jqueryObjectFactory.createObjectForElement(ev.target),button=_this.sportsBarObjects.allSportsButton(),sportsBar;target.closest(dropdownSelector).length||target.is(dropdownSelector)||target.closest(button).length||target.is(button)||!$(_this.getElement()).is(":visible")||(sportsBar=_this.sportsBarObjects.sportsBar(),sportsBar.slideUp(0),sportsBar.parent().removeClass("expanded"))})},ClassificationDropdownWrapper}(LiveNowPod.ElementBase);LiveNowPod.ClassificationDropdownWrapper=ClassificationDropdownWrapper})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var FixtureName=function(_super){function FixtureName(){return _super.call(this,"span","fixtureName")||this}return __extends(FixtureName,_super),FixtureName}(LiveNowPod.ElementBase);LiveNowPod.FixtureName=FixtureName})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var FixtureTime=function(_super){function FixtureTime(){return _super.call(this,"span","fixtureTime")||this}return __extends(FixtureTime,_super),FixtureTime}(LiveNowPod.ElementBase);LiveNowPod.FixtureTime=FixtureTime})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var FixtureInfo=function(){function FixtureInfo(name,time){this.name=name;this.time=time}return FixtureInfo}();LiveNowPod.FixtureInfo=FixtureInfo})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var FixtureNameTransformer=function(){function FixtureNameTransformer(){}return FixtureNameTransformer.prototype.transform=function(name){if(this.containsTime(name)){var fixtureName=name.split(/ (.+)/)[1],fixtureTime=this.fixTime(name.split(" ")[0]);return new LiveNowPod.FixtureInfo(fixtureName,fixtureTime)}return new LiveNowPod.FixtureInfo(name,"")},FixtureNameTransformer.prototype.containsTime=function(name){return/\d{1,2}(?:\.)\d{1,2}/.test(name)},FixtureNameTransformer.prototype.fixTime=function(time){var parts=time.split("."),hours,minutes;return parts&&parts.length===2?(hours=parts[0],minutes=parts[1],this.formatTimeComponent(hours)+":"+this.formatTimeComponent(minutes)):""},FixtureNameTransformer.prototype.formatTimeComponent=function(component){return component.length===1?"0"+component:component},FixtureNameTransformer}();LiveNowPod.FixtureNameTransformer=FixtureNameTransformer})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var ClassificationNamesQuery=function(){function ClassificationNamesQuery(liveNowPodSettings){this._liveNowPodSettings=liveNowPodSettings}return ClassificationNamesQuery.prototype.getClassificationName=function(id){return new Typescript.LinQ.Enumerable(this.getClassisificationNamesListFromSettings()).where(function(x){return x.key===id}).select(function(x){return x.value}).firstOrDefault()},ClassificationNamesQuery.prototype.getClassisificationNamesListFromSettings=function(){return this._liveNowPodSettings.classificationNames||[]},ClassificationNamesQuery}();LiveNowPod.ClassificationNamesQuery=ClassificationNamesQuery})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var LinQ;(function(LinQ){var List=function(_super){function List(array){return _super.call(this,array)||this}return __extends(List,_super),List.prototype.add=function(item){this._array.push(item)},List.prototype.addRange=function(items){var _this=this;items.toArray().forEach(function(x){_this.add(x)})},List}(LinQ.Enumerable);LinQ.List=List})(LinQ=Typescript.LinQ||(Typescript.LinQ={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var StemFilterBase=function(){function StemFilterBase(){}return StemFilterBase.prototype.unsuspendStem=function(stem){stem.update({SU:"0"})},StemFilterBase.prototype.suspendStem=function(stem){stem.update({SU:"1"})},StemFilterBase.prototype.filterStem=function(stem){stem.update({FX:"1"})},StemFilterBase.prototype.unfilterStem=function(stem){stem.update({FX:"0"})},StemFilterBase}();LiveNowPod.StemFilterBase=StemFilterBase})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Stem=ns_gen5_data.Stem,Enumerable=Typescript.LinQ.Enumerable,ChronologicalByTimeStem=function(_super){function ChronologicalByTimeStem(stem,formattedDatetimeQuery){var _this=_super.call(this)||this;return _this._formattedDatetimeQuery=formattedDatetimeQuery,_this.set_data(stem.data),_this._children=new Enumerable(stem.getChildren()).orderBy(function(x){return _this.convertTimeToNumber(x.data.SM)}).toArray(),_this}return __extends(ChronologicalByTimeStem,_super),ChronologicalByTimeStem.prototype.convertTimeToNumber=function(stemDate){var time=this._formattedDatetimeQuery.getFormattedValue(stemDate);return parseInt(time.replace(":",""))},ChronologicalByTimeStem}(Stem);LiveNowPod.ChronologicalByTimeStem=ChronologicalByTimeStem})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var SportsFixturesFilter=function(_super){function SportsFixturesFilter(extraPlayerModuleFactory,formattedDatetimeQuery,liveNowPodSettings){var _this=_super.call(this)||this;return _this.extraPlayerModuleFactory=extraPlayerModuleFactory,_this._formattedDatetimeQuery=formattedDatetimeQuery,_this._liveNowPodSettings=liveNowPodSettings,_this}return __extends(SportsFixturesFilter,_super),SportsFixturesFilter.prototype.filter=function(stem,options){var _this=this;return options&&options.classificationId&&this.filterForSelection(stem,options.classificationId),stem&&stem._actualChildren.sort(function(c1,c2){var c1num=_this.convertTimeToNumber(c1.data.SM),c2num=_this.convertTimeToNumber(c2.data.SM);return c1num>c2num?1:c1num<c2num?-1:0}),stem},SportsFixturesFilter.prototype.convertTimeToNumber=function(stemDate){var time=this._formattedDatetimeQuery.getFormattedValue(stemDate);return parseInt(time.replace(":",""))},SportsFixturesFilter.prototype.filterForSelection=function(stem,classificationId){var _this=this;new Typescript.LinQ.Enumerable(stem.getChildren()).where(function(x){return x.data.CL===classificationId||classificationId==="-1"}).toArray().forEach(function(x){return _this.unfilterStem(x)});new Typescript.LinQ.Enumerable(stem.getChildren()).where(function(x){return x.data.CL!==classificationId&&classificationId!=="-1"}).toArray().forEach(function(x){return _this.filterStem(x)})},SportsFixturesFilter.prototype.isNotSuspended=function(stem){return!stem.data.SU||stem.data.SU==="0"},SportsFixturesFilter.prototype.isMediaIdValid=function(stem){var module=this.extraPlayerModuleFactory.retriveExtraPlayerModule();return module.isValidMediaId(stem.data.MS)||module.isValidMediaId(stem.data.PS)},SportsFixturesFilter.prototype.isCountryNotExcluded=function(stem){var countryCode=this._liveNowPodSettings.userCountryCode.toUpperCase(),index=-1,list;if(countryCode&&stem.data.CB){list=stem.data.CB||"";do index=list.indexOf(countryCode,++index);while(index!==-1&&(index&1)==1)}return index===-1},SportsFixturesFilter}(LiveNowPod.StemFilterBase);LiveNowPod.SportsFixturesFilter=SportsFixturesFilter})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Stem=ns_gen5_data.Stem,Enumerable=Typescript.LinQ.Enumerable,ChronologicalStem=function(_super){function ChronologicalStem(stem){var _this=_super.call(this)||this;return _this.set_data(stem.data),_this._children=new Enumerable(stem.getChildren()).orderBy(function(x){return parseInt(x.data.SM)}).toArray(),_this}return __extends(ChronologicalStem,_super),ChronologicalStem}(Stem);LiveNowPod.ChronologicalStem=ChronologicalStem})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Classifications=function(){function Classifications(){}return Classifications.Soccer="1",Classifications.HorseRacing="2",Classifications.Cricket="3",Classifications.GreyhoundRacing="4",Classifications.Lotto="6",Classifications.Golf="7",Classifications.RugbyUnion="8",Classifications.Formula1="10",Classifications.Athletics="11",Classifications.AmericanFootball="12",Classifications.Tennis="13",Classifications.Snooker="14",Classifications.Darts="15",Classifications.Baseball="16",Classifications.IceHockey="17",Classifications.Basketball="18",Classifications.RugbyLeague="19",Classifications.Speedway="24",Classifications.Pool="35",Classifications.AustralianRules="36",Classifications.GaelicSports="37",Classifications.Cycling="38",Classifications.WNBA="59",Classifications.Hurling="64",Classifications.Nascar="65",Classifications.Bowls="66",Classifications.UsHorseRacing="73",Classifications.ParlayCards="76",Classifications.Handball="78",Classifications.WinterSports="80",Classifications.Futsal="83",Classifications.Hockey="84",Classifications.OtherSports="86",Classifications.UsGreyhoundRacing="88",Classifications.Trotting="88",Classifications.Bandy="89",Classifications.Floorball="90",Classifications.Volleyball="91",Classifications.TableTennis="92",Classifications.Archery="93",Classifications.Badmiton="94",Classifications.BeachVollyball="95",Classifications.CanoeKayak="96",Classifications.CombatSports="97",Classifications.Curling="98",Classifications.Diving="99",Classifications.Equestrian="100",Classifications.Fencing="101",Classifications.Gymnastics="102",Classifications.Pesapallo="104",Classifications.Rowing="105",Classifications.Shooting="106",Classifications.Squash="107",Classifications.Swimming="108",Classifications.WaterPolo="110",Classifications.Weightlifting="111",Classifications.Wrestling="112",Classifications.Yatching="113",Classifications.Rally="116",Classifications.Softball="117",Classifications.AlpingSkiing="118",Classifications.Bobsleigh="120",Classifications.SkiJumping="123",Classifications.Luge="124",Classifications.Skating="125",Classifications.Skeleton="127",Classifications.TenPenBowling="128",Classifications.Snowboarding="139",Classifications.Poker="140",Classifications.Pelota="142",Classifications.Lacrosse="143",Classifications.VirtualSports="144",Classifications.Netball="147",Classifications.Surfing="148",Classifications.ESports="151",Classifications.SepakTakraw="152",Classifications}();LiveNowPod.Classifications=Classifications})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Enumerable=Typescript.LinQ.Enumerable,NoHorseOrGreyhoundFixturesFilter=function(_super){function NoHorseOrGreyhoundFixturesFilter(){var _this=_super!==null&&_super.apply(this,arguments)||this;return _this._horseAndGreyhoundFixtures=new Enumerable([LiveNowPod.Classifications.HorseRacing,LiveNowPod.Classifications.GreyhoundRacing,LiveNowPod.Classifications.UsHorseRacing,LiveNowPod.Classifications.UsGreyhoundRacing]),_this}return __extends(NoHorseOrGreyhoundFixturesFilter,_super),NoHorseOrGreyhoundFixturesFilter.prototype.filter=function(stem){return stem?(this.filterChildStems(stem),new LiveNowPod.ChronologicalStem(stem)):stem},NoHorseOrGreyhoundFixturesFilter.prototype.filterChildStems=function(stem){var _this=this;new Enumerable(stem.getChildren()).where(function(x){return _this._horseAndGreyhoundFixtures.hasAny(function(f){return f===x.data.CL})}).toArray().forEach(function(x){return _this.suspendStem(x)})},NoHorseOrGreyhoundFixturesFilter}(LiveNowPod.StemFilterBase);LiveNowPod.NoHorseOrGreyhoundFixturesFilter=NoHorseOrGreyhoundFixturesFilter})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Stem=ns_gen5_data.Stem,Enumerable=Typescript.LinQ.Enumerable,List=Typescript.LinQ.List,UniqueSportsClassificationStem=function(_super){function UniqueSportsClassificationStem(stem){var _this=_super.call(this)||this;return _this.hasLookupReference=!0,_this.set_data(stem.data),_this._stemfilter&&_this._stemfilter.filter(stem),_this._children=new Enumerable(_this.getChildStems(stem)).where(function(x){return _this.itemValid(x)}).groupBy(function(x){return x.data.CL}).select(function(x){return x.value.firstOrDefault()}).toArray(),_this}return __extends(UniqueSportsClassificationStem,_super),UniqueSportsClassificationStem.prototype.getChildStems=function(stem){var allSports=new List(new Array(this.getAllSportsStem()));return allSports.addRange(new Enumerable(stem.getChildren())),allSports.toArray()},UniqueSportsClassificationStem.prototype.getAllSportsStem=function(){var stem=new Stem;return stem.data={},stem.data.CL="-1",stem},UniqueSportsClassificationStem.prototype.isMediaIdValid=function(stem){return this.isValidMediaId(stem.data.MS)||this.isValidMediaId(stem.data.PS)},UniqueSportsClassificationStem.prototype.isValidMediaId=function(id){return id&&id!=""&&id!="0"},UniqueSportsClassificationStem.prototype.itemValid=function(stem){return"SU"in stem.data&&stem.data.SU=="1"||!this.isMediaIdValid(stem)||stem.parent.getChildren().indexOf(stem)==-1?!1:!0},UniqueSportsClassificationStem}(Stem);LiveNowPod.UniqueSportsClassificationStem=UniqueSportsClassificationStem})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var UniqueSportsClassificationFilter=function(){function UniqueSportsClassificationFilter(uniqueClassificationStemFactory){this.uniqueClassificationStemFactory=uniqueClassificationStemFactory}return UniqueSportsClassificationFilter.prototype.filter=function(stem){return stem?this.uniqueClassificationStemFactory.create(stem):stem},UniqueSportsClassificationFilter}();LiveNowPod.UniqueSportsClassificationFilter=UniqueSportsClassificationFilter})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var UniqueSportsClassificationStemFactory=function(){function UniqueSportsClassificationStemFactory(abstractFactory){this._abstractFactory=abstractFactory}return UniqueSportsClassificationStemFactory.prototype.create=function(stem){return this._abstractFactory.createInstance("uniqueSportsClassificationStem",{stem:stem})},UniqueSportsClassificationStemFactory}();LiveNowPod.UniqueSportsClassificationStemFactory=UniqueSportsClassificationStemFactory})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var VisibleFixturesQuery=function(){function VisibleFixturesQuery(){}return VisibleFixturesQuery.prototype.getCount=function(stem){return stem?new Typescript.LinQ.Enumerable(stem.getChildren()).where(function(b){return!b.data.SU||b.data.SU==="0"}).count():0},VisibleFixturesQuery}();LiveNowPod.VisibleFixturesQuery=VisibleFixturesQuery})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var TextNode=ns_gen5_ui.TextNode,EmptyTextNode=function(_super){function EmptyTextNode(){return _super.call(this)||this}return __extends(EmptyTextNode,_super),EmptyTextNode}(TextNode);LiveNowPod.EmptyTextNode=EmptyTextNode})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var AllSportsButtonAndSelector;(function(AllSportsButtonAndSelector){var Component=ns_gen5_ui.Component,AllSportsButton=function(_super){function AllSportsButton(textNode,allSportsButtonText,allSportsButtonImage){var _this=_super.call(this,"div")||this;return _this.addStyle("allSports"),_this._textNode=textNode,_this._allSportsButtonText=allSportsButtonText,_this._allSportsButtonImage=allSportsButtonImage,_this}return __extends(AllSportsButton,_super),AllSportsButton.prototype.createChildren=function(){this.appendChild(this._textNode);this.appendChild(this._allSportsButtonText);this.appendChild(this._allSportsButtonImage)},AllSportsButton.prototype.setText=function(text){this.setAttribute("value",text)},AllSportsButton.prototype.getText=function(){return this.getAttribute("value")},AllSportsButton}(Component);AllSportsButtonAndSelector.AllSportsButton=AllSportsButton})(AllSportsButtonAndSelector=LiveNowPod.AllSportsButtonAndSelector||(LiveNowPod.AllSportsButtonAndSelector={}))})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var AllSportsButtonAndSelector;(function(AllSportsButtonAndSelector){var Component=ns_gen5_ui.Component,AllSportsButtonText=function(_super){function AllSportsButtonText(textNode,classificationNamesQuery){var _this=_super.call(this,"span")||this;return _this.textNode=textNode,_this.classificationNamesQuery=classificationNamesQuery,_this.addStyle("allSportsButtonText b365ui-arrowDown"),_this}return __extends(AllSportsButtonText,_super),AllSportsButtonText.prototype.createChildren=function(){this.textNode.setText(this.classificationNamesQuery.getClassificationName("-1"));this.appendChild(this.textNode)},AllSportsButtonText.prototype.setText=function(text){this.setAttribute("value",text)},AllSportsButtonText.prototype.getText=function(){return this.textNode.getText()},AllSportsButtonText}(Component);AllSportsButtonAndSelector.AllSportsButtonText=AllSportsButtonText})(AllSportsButtonAndSelector=LiveNowPod.AllSportsButtonAndSelector||(LiveNowPod.AllSportsButtonAndSelector={}))})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var AllSportsButtonAndSelector;(function(AllSportsButtonAndSelector){var Component=ns_gen5_ui.Component,AllSportsButtonImage=function(_super){function AllSportsButtonImage(){var _this=_super.call(this,"div")||this;return _this.addStyle("allSportsButtonImage"),_this}return __extends(AllSportsButtonImage,_super),AllSportsButtonImage.prototype.createChildren=function(){},AllSportsButtonImage.prototype.setText=function(text){this.setAttribute("value",text)},AllSportsButtonImage.prototype.getText=function(){return this.getAttribute("value")},AllSportsButtonImage}(Component);AllSportsButtonAndSelector.AllSportsButtonImage=AllSportsButtonImage})(AllSportsButtonAndSelector=LiveNowPod.AllSportsButtonAndSelector||(LiveNowPod.AllSportsButtonAndSelector={}))})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Factories;(function(Factories){var FixtureFilterCommandFactory=function(){function FixtureFilterCommandFactory(abstractFactory){this._abstractFactory=abstractFactory}return FixtureFilterCommandFactory.prototype.createCommand=function(){return this._abstractFactory.createInstance("sportsLiveNowPodView")},FixtureFilterCommandFactory}();Factories.FixtureFilterCommandFactory=FixtureFilterCommandFactory})(Factories=LiveNowPod.Factories||(LiveNowPod.Factories={}))})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var FormattedDateTimeQuery=function(){function FormattedDateTimeQuery(timezoneOffsetQuery){this._timezoneOffsetQuery=timezoneOffsetQuery}return FormattedDateTimeQuery.prototype.getFormattedValue=function(time){var intTime=parseInt(time)*1e3,date=new Date(intTime+this._timezoneOffsetQuery.getOffset());return date.toTimeString().match(/\d{2}:\d{2}/)[0]},FormattedDateTimeQuery}();LiveNowPod.FormattedDateTimeQuery=FormattedDateTimeQuery})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var TimezoneOffsetQuery=function(){function TimezoneOffsetQuery(liveNowPodSettings){this._liveNowPodSettings=liveNowPodSettings}return TimezoneOffsetQuery.prototype.getOffset=function(){return this._liveNowPodSettings.userTimezoneOffset*6e4},TimezoneOffsetQuery}();LiveNowPod.TimezoneOffsetQuery=TimezoneOffsetQuery})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var ClickBinder;(function(ClickBinder_1){var ClickBinder=function(){function ClickBinder(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return ClickBinder.prototype.addHandler=function(element,clickHandler){var jqueryObject=this._jqueryObjectFactory.createObjectForElement(element);jqueryObject!==null&&jqueryObject!==undefined&&jqueryObject.click(clickHandler)},ClickBinder}();ClickBinder_1.ClickBinder=ClickBinder})(ClickBinder=LiveNowPod.ClickBinder||(LiveNowPod.ClickBinder={}))})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Adapters;(function(Adapters){var PlayStreamCommandAdapter=function(){function PlayStreamCommandAdapter(classificationNamesQuery,formattedDatetimeQuery){this._classificationNamesQuery=classificationNamesQuery;this._formattedDatetimeQuery=formattedDatetimeQuery}return PlayStreamCommandAdapter.prototype.adaptStem=function(stem){return{commandType:"play-stream",streamId:this.getMediaId(stem),fixtureName:this.getFixtureName(stem),fixtureStartTime:this.getFixtureStartTime(stem),classificationName:this.getClassificationName(stem),stem:stem}},PlayStreamCommandAdapter.prototype.getMediaId=function(stem){return stem.data.MS},PlayStreamCommandAdapter.prototype.getFixtureName=function(stem){return stem.data.NA},PlayStreamCommandAdapter.prototype.getFixtureStartTime=function(stem){return this._formattedDatetimeQuery.getFormattedValue(stem.data.SM)},PlayStreamCommandAdapter.prototype.getClassificationName=function(stem){return this._classificationNamesQuery.getClassificationName(stem.data.CL)},PlayStreamCommandAdapter}();Adapters.PlayStreamCommandAdapter=PlayStreamCommandAdapter})(Adapters=LiveNowPod.Adapters||(LiveNowPod.Adapters={}))})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Adapters;(function(Adapters){var PlayPaddockStreamCommandAdapter=function(){function PlayPaddockStreamCommandAdapter(classificationNamesQuery,formattedDatetimeQuery,extraPlayerModuleFactory){this._classificationNamesQuery=classificationNamesQuery;this._formattedDatetimeQuery=formattedDatetimeQuery;this._extraPlayerModuleFactory=extraPlayerModuleFactory}return PlayPaddockStreamCommandAdapter.prototype.adaptStem=function(stem){return{commandType:"play-paddock-stream",mediaDataVo:this.getMediaDataVo(stem),fixtureName:this.getFixtureName(stem),fixtureStartTime:this.getFixtureStartTime(stem),classificationName:this.getClassificationName(stem),stem:stem}},PlayPaddockStreamCommandAdapter.prototype.getFixtureName=function(stem){return stem.data.NA},PlayPaddockStreamCommandAdapter.prototype.getFixtureStartTime=function(stem){return this._formattedDatetimeQuery.getFormattedValue(stem.data.SM)},PlayPaddockStreamCommandAdapter.prototype.getClassificationName=function(stem){return this._classificationNamesQuery.getClassificationName(stem.data.CL)},PlayPaddockStreamCommandAdapter.prototype.getMediaDataVo=function(stem){var mediaPlayerModule=this._extraPlayerModuleFactory.retriveExtraPlayerModule();return mediaPlayerModule!==undefined&&mediaPlayerModule!==null?mediaPlayerModule.getMediaDataVO(stem):null},PlayPaddockStreamCommandAdapter}();Adapters.PlayPaddockStreamCommandAdapter=PlayPaddockStreamCommandAdapter})(Adapters=LiveNowPod.Adapters||(LiveNowPod.Adapters={}))})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var PlayStreamOnClick=function(){function PlayStreamOnClick(clickBinder,extraMediaPlayer,playStreamCommandAdapter,stem,liveNowPodSettings){this._clickBinder=clickBinder;this._mediaPlayer=extraMediaPlayer;this._playStreamCommandAdapter=playStreamCommandAdapter;this._stem=stem;this._liveNowPodSettings=liveNowPodSettings}return PlayStreamOnClick.prototype.attachToElement=function(element,onClickCallback){var _this=this;this._clickBinder.addHandler(element,function(){_this._liveNowPodSettings.userIsLoggedIn&&!_this._liveNowPodSettings.userOnMobilePlatform&&(_this._mediaPlayer.playStream(_this._playStreamCommandAdapter.adaptStem(_this._stem)),onClickCallback!==undefined&&onClickCallback())})},PlayStreamOnClick}();LiveNowPod.PlayStreamOnClick=PlayStreamOnClick})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var PlayPaddockStreamOnClick=function(){function PlayPaddockStreamOnClick(clickBinder,extraMediaPlayer,playPaddockStreamCommandAdapter,stem,liveNowPodSettings){this._clickBinder=clickBinder;this._mediaPlayer=extraMediaPlayer;this._playPaddockStreamCommandAdapter=playPaddockStreamCommandAdapter;this._stem=stem;this._liveNowPodSettings=liveNowPodSettings}return PlayPaddockStreamOnClick.prototype.attachToElement=function(element,onClickCallback){var _this=this;this._clickBinder.addHandler(element,function(){_this._liveNowPodSettings.userIsLoggedIn&&!_this._liveNowPodSettings.userOnMobilePlatform&&(_this._mediaPlayer.playPaddockStream(_this._playPaddockStreamCommandAdapter.adaptStem(_this._stem)),onClickCallback!==undefined&&onClickCallback())})},PlayPaddockStreamOnClick}();LiveNowPod.PlayPaddockStreamOnClick=PlayPaddockStreamOnClick})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Enumerable=Typescript.LinQ.Enumerable,PlayFirstStreamBase=function(){function PlayFirstStreamBase(extraPlayerModuleFactory){this._extraPlayerModuleFactory=extraPlayerModuleFactory}return PlayFirstStreamBase.prototype.playFirstStream=function(stem){var module=this._extraPlayerModuleFactory.retriveExtraPlayerModule(),stemToPlay=this.isNotNullOrUndefined(stem)?stem:this._previousValue;this.isNotNullOrUndefined(module)&&this.isNotNullOrUndefined(stemToPlay)&&module.initialized?this.hasPlayableStream(stemToPlay)&&(this.playStreamFromStem(this.getFirstChildStem(stemToPlay)),this._previousValue=undefined):this._previousValue=stemToPlay},PlayFirstStreamBase.prototype.getFirstChildStem=function(stem){return new Enumerable(stem.getChildren()).where(function(x){return x.data.SU!=="1"}).first()},PlayFirstStreamBase.prototype.hasPlayableStream=function(stem){return new Enumerable(stem.getChildren()).hasAny(function(x){return x.data.SU!=="1"})},PlayFirstStreamBase.prototype.isNotNullOrUndefined=function(value){return value!==null&&value!==undefined},PlayFirstStreamBase}();LiveNowPod.PlayFirstStreamBase=PlayFirstStreamBase})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var PlayFirstStream=function(_super){function PlayFirstStream(extraMediaPlayer,extraPlayerModuleFactory,playStreamCommandAdapter){var _this=_super.call(this,extraPlayerModuleFactory)||this;return _this._extraMediaPlayer=extraMediaPlayer,_this._playStreamCommandAdapter=playStreamCommandAdapter,_this}return __extends(PlayFirstStream,_super),PlayFirstStream.prototype.playStreamFromStem=function(stemToPlay){this._extraMediaPlayer.playStream(this._playStreamCommandAdapter.adaptStem(stemToPlay))},PlayFirstStream}(LiveNowPod.PlayFirstStreamBase);LiveNowPod.PlayFirstStream=PlayFirstStream})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var PlayFirstPaddockStream=function(_super){function PlayFirstPaddockStream(extraMediaPlayer,extraPlayerModuleFactory,playPaddockStreamCommandAdapter){var _this=_super.call(this,extraPlayerModuleFactory)||this;return _this._extraMediaPlayer=extraMediaPlayer,_this._playPaddockStreamCommandAdapter=playPaddockStreamCommandAdapter,_this}return __extends(PlayFirstPaddockStream,_super),PlayFirstPaddockStream.prototype.playStreamFromStem=function(stemToPlay){this._extraMediaPlayer.playPaddockStream(this._playPaddockStreamCommandAdapter.adaptStem(stemToPlay))},PlayFirstPaddockStream}(LiveNowPod.PlayFirstStreamBase);LiveNowPod.PlayFirstPaddockStream=PlayFirstPaddockStream})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var NotifyAvailableStreams=function(){function NotifyAvailableStreams(extraPlayerModuleFactory){this._extraPlayerModuleFactory=extraPlayerModuleFactory}return NotifyAvailableStreams.prototype.streamsAvailable=function(value){var module=this._extraPlayerModuleFactory.retriveExtraPlayerModule(),streamsAvailable=this.isNotNullOrUndefined(value)?value:this._previousValue;this.isNotNullOrUndefined(module)&&this.isNotNullOrUndefined(streamsAvailable)&&module.initialized?(module.setNoStreamsAvailable(!streamsAvailable),this._previousValue=undefined):this._previousValue=streamsAvailable},NotifyAvailableStreams.prototype.isNotNullOrUndefined=function(value){return value!==null&&value!==undefined},NotifyAvailableStreams}();LiveNowPod.NotifyAvailableStreams=NotifyAvailableStreams})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var ClearStreamAvailabilityAndPlayFirstStreamNotifications=function(){function ClearStreamAvailabilityAndPlayFirstStreamNotifications(notifyAvailableStreams,playFirstStreamFactory){this._notifyAvailableStreams=notifyAvailableStreams;this._playFirstStreamFactory=playFirstStreamFactory}return ClearStreamAvailabilityAndPlayFirstStreamNotifications.prototype.clear=function(){this._notifyAvailableStreams.streamsAvailable();this._playFirstStreamFactory.createPlayFirstStream("playFirstStream").playFirstStream();this._playFirstStreamFactory.createPlayFirstStream("playFirstPaddockStream").playFirstStream()},ClearStreamAvailabilityAndPlayFirstStreamNotifications}();LiveNowPod.ClearStreamAvailabilityAndPlayFirstStreamNotifications=ClearStreamAvailabilityAndPlayFirstStreamNotifications})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var PlayFirstStreamFactory=function(){function PlayFirstStreamFactory(abstractFactory){this._abstractFactory=abstractFactory}return PlayFirstStreamFactory.prototype.createPlayFirstStream=function(componentName){return this._abstractFactory.createInstance(componentName)},PlayFirstStreamFactory}();LiveNowPod.PlayFirstStreamFactory=PlayFirstStreamFactory})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(IoC){var Installers;(function(Installers){var LiveNowPodInstaller=function(){function LiveNowPodInstaller(){}return LiveNowPodInstaller.prototype.install=function(container){container.register(IoC.Component.named("sportsLiveNowPodInitialiser").componentType(Typescript.Components.LiveNowPod.SportsLiveNowPodInitialiser).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("faqsPodInitialiser").componentType(Typescript.Components.LiveNowPod.FaqsPodInitialiser).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("gen5BaseViewHostFactory").componentType(Typescript.Components.LiveNowPod.Gen5BaseViewHostFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("liveNowPodSettingsFactory").componentType(Typescript.Components.LiveNowPod.LiveNowPodSettingsFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("sportsLiveNowPodViewFactory").componentType(Typescript.Components.LiveNowPod.SportsLiveNowPodViewFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("subscribeCommand").componentType(Typescript.Components.LiveNowPod.SubscribeCommand).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("sportsLiveNowPodView").componentType(Typescript.Components.LiveNowPod.SportsLiveNowPodView).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("sportsFixtureRenderer").componentType(Typescript.Components.LiveNowPod.SportsFixtureRenderer).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("sportsFixtureFactory").componentType(Typescript.Components.LiveNowPod.SportsFixtureFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("classificationDropdownItemsRenderer").componentType(Typescript.Components.LiveNowPod.ClassificationDropdownItemRenderer).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("classificationDropdownItemFactory").componentType(Typescript.Components.LiveNowPod.ClassificationDropdownItemFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("classificationName").componentType(Typescript.Components.LiveNowPod.ClassificationName).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("classificationDropdownWrapper").componentType(Typescript.Components.LiveNowPod.ClassificationDropdownWrapper).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("fixtureName").componentType(Typescript.Components.LiveNowPod.FixtureName).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("fixtureTime").componentType(Typescript.Components.LiveNowPod.FixtureTime).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("sportsFixture").componentType(Typescript.Components.LiveNowPod.SportsFixture).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("fixtureNameTransformer").componentType(Typescript.Components.LiveNowPod.FixtureNameTransformer).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("classificationNamesQuery").componentType(Typescript.Components.LiveNowPod.ClassificationNamesQuery).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("sportsFixtureFilter").componentType(Typescript.Components.LiveNowPod.SportsFixturesFilter).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("noHorseOrGreyhoundFixturesFilter").componentType(Typescript.Components.LiveNowPod.NoHorseOrGreyhoundFixturesFilter).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("uniqueClassificationsFilter").componentType(Typescript.Components.LiveNowPod.UniqueSportsClassificationFilter).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("uniqueClassificationStemFactory").componentType(Typescript.Components.LiveNowPod.UniqueSportsClassificationStemFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("uniqueSportsClassificationStem").componentType(Typescript.Components.LiveNowPod.UniqueSportsClassificationStem).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("visibleFixturesQuery").componentType(Typescript.Components.LiveNowPod.VisibleFixturesQuery).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("classificationDropdownItem").componentType(Typescript.Components.LiveNowPod.ClassificationDropdownItem).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("textNode").componentType(Typescript.Components.LiveNowPod.EmptyTextNode).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("allSportsButton").componentType(Typescript.Components.LiveNowPod.AllSportsButtonAndSelector.AllSportsButton).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("allSportsButtonText").componentType(Typescript.Components.LiveNowPod.AllSportsButtonAndSelector.AllSportsButtonText).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("allSportsButtonImage").componentType(Typescript.Components.LiveNowPod.AllSportsButtonAndSelector.AllSportsButtonImage).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("fixtureFilterCommandFactory").componentType(Typescript.Components.LiveNowPod.Factories.FixtureFilterCommandFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("formattedDatetimeQuery").componentType(Typescript.Components.LiveNowPod.FormattedDateTimeQuery).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("timezoneOffsetQuery").componentType(Typescript.Components.LiveNowPod.TimezoneOffsetQuery).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("clickBinder").componentType(Typescript.Components.LiveNowPod.ClickBinder.ClickBinder).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("playStreamCommandAdapter").componentType(Typescript.Components.LiveNowPod.Adapters.PlayStreamCommandAdapter).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("playPaddockStreamCommandAdapter").componentType(Typescript.Components.LiveNowPod.Adapters.PlayPaddockStreamCommandAdapter).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("onClickStreamPlayer").componentType(Typescript.Components.LiveNowPod.PlayStreamOnClick).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("onClickPaddockStreamPlayer").componentType(Typescript.Components.LiveNowPod.PlayPaddockStreamOnClick).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("playFirstStream").componentType(Typescript.Components.LiveNowPod.PlayFirstStream).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("playFirstPaddockStream").componentType(Typescript.Components.LiveNowPod.PlayFirstPaddockStream).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("notifyAvailableStreams").componentType(Typescript.Components.LiveNowPod.NotifyAvailableStreams).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("clearStreamAvailabilityAndPlayStreamNotifications").componentType(Typescript.Components.LiveNowPod.ClearStreamAvailabilityAndPlayFirstStreamNotifications).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("playFirstStreamFactory").componentType(Typescript.Components.LiveNowPod.PlayFirstStreamFactory).withLifestyle(IoC.Lifestyle.Singleton))},LiveNowPodInstaller}();Installers.LiveNowPodInstaller=LiveNowPodInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(Typescript){var Components;(function(Components){var SportsData;(function(SportsData){var SportsDataProviders;(function(SportsDataProviders){var Results;(function(Results){var ResultsCorsRequest=function(){function ResultsCorsRequest(endpoint,path,verb,data,ensureSlashesInUrl,useCredentials){this._endpoint=endpoint;this._path=path;this._verb=verb;this._data=data;this._ensureSlashesInUrl=ensureSlashesInUrl;this._useCredentials=useCredentials}return Object.defineProperty(ResultsCorsRequest.prototype,"endpoint",{get:function(){return this._endpoint},enumerable:!0,configurable:!0}),Object.defineProperty(ResultsCorsRequest.prototype,"controller",{get:function(){return this._path},enumerable:!0,configurable:!0}),Object.defineProperty(ResultsCorsRequest.prototype,"verb",{get:function(){return this._verb},enumerable:!0,configurable:!0}),Object.defineProperty(ResultsCorsRequest.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(ResultsCorsRequest.prototype,"withSlashesInUrl",{get:function(){return this._ensureSlashesInUrl},enumerable:!0,configurable:!0}),Object.defineProperty(ResultsCorsRequest.prototype,"useCredentials",{get:function(){return this._useCredentials},enumerable:!0,configurable:!0}),ResultsCorsRequest.prototype.getUrl=function(){return this._endpoint+this._path},ResultsCorsRequest}();Results.ResultsCorsRequest=ResultsCorsRequest})(Results=SportsDataProviders.Results||(SportsDataProviders.Results={}))})(SportsDataProviders=SportsData.SportsDataProviders||(SportsData.SportsDataProviders={}))})(SportsData=Components.SportsData||(Components.SportsData={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var SportsData;(function(SportsData){var SportsDataProviders;(function(SportsDataProviders){var Results;(function(Results){var ResultsCorsRequestBuilder=function(){function ResultsCorsRequestBuilder(){this._ensureSlashesInUrl=!1;this._useCredentials=!1}return ResultsCorsRequestBuilder.prototype.withEndpoint=function(endpoint){return this._endpoint=endpoint,this},ResultsCorsRequestBuilder.prototype.withPath=function(pathSections){return this._pathSections=pathSections,this},ResultsCorsRequestBuilder.prototype.withVerb=function(verb){return this._verb=verb,this},ResultsCorsRequestBuilder.prototype.withData=function(data){return this._data=data,this},ResultsCorsRequestBuilder.prototype.ensureSlashesInUrl=function(withSlashesInUrl){return this._ensureSlashesInUrl=withSlashesInUrl,this},ResultsCorsRequestBuilder.prototype.useCredentials=function(useCredentials){return this._useCredentials=useCredentials,this},ResultsCorsRequestBuilder.prototype.build=function(){var endpoint,path;return this._ensureSlashesInUrl?(endpoint=this.addSlashToString(this._endpoint),path=this.buildPath(this._pathSections,!0)):(endpoint=this._endpoint,path=this.buildPath(this._pathSections)),new Results.ResultsCorsRequest(endpoint,path,this._verb,this._data,this._ensureSlashesInUrl,this._useCredentials)},ResultsCorsRequestBuilder.prototype.buildPath=function(pathSections,ensureSlashesInUrl){var result,temp,i;for(ensureSlashesInUrl===void 0&&(ensureSlashesInUrl=!1),result="",i=0;i<pathSections.length;i++)temp=pathSections[i].toString(),ensureSlashesInUrl&&(temp=this.addSlashToString(temp)),result+=temp;return result},ResultsCorsRequestBuilder.prototype.addSlashToString=function(stringToCheck){return this.stringEndsWith(stringToCheck,"/")||(stringToCheck+="/"),stringToCheck},ResultsCorsRequestBuilder.prototype.stringEndsWith=function(stringToCheck,character){return stringToCheck.indexOf(character,stringToCheck.length-character.length)!==-1},ResultsCorsRequestBuilder}();Results.ResultsCorsRequestBuilder=ResultsCorsRequestBuilder})(Results=SportsDataProviders.Results||(SportsDataProviders.Results={}))})(SportsDataProviders=SportsData.SportsDataProviders||(SportsData.SportsDataProviders={}))})(SportsData=Components.SportsData||(Components.SportsData={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var SportsData;(function(SportsData){var SportsDataProviders;(function(SportsDataProviders){var Results;(function(Results){var ResultsDataProvider=function(){function ResultsDataProvider(resultsCorsService,resultsCorsRequestFactory){this._resultsCorsService=resultsCorsService;this._resultsCorsRequestFactory=resultsCorsRequestFactory}return ResultsDataProvider.prototype.getClassificationList=function(handler){this.makeRequest(this._resultsCorsRequestFactory.classificationList(),handler)},ResultsDataProvider.prototype.getSearchByList=function(classificationId,handler){this.makeRequest(this._resultsCorsRequestFactory.searchByList(classificationId),handler)},ResultsDataProvider.prototype.getDropdownList=function(searchBy,classificationId,dateFrom,dateTo,handler){this.makeRequest(this._resultsCorsRequestFactory.dropdownList(searchBy,classificationId,dateFrom,dateTo),handler)},ResultsDataProvider.prototype.getFixtureList=function(searchBy,classificationId,dropdownFilterId,dateFrom,dateTo,handler){this.makeRequest(this._resultsCorsRequestFactory.fixtureList(searchBy,classificationId,dropdownFilterId,dateFrom,dateTo),handler)},ResultsDataProvider.prototype.getFixtureDetails=function(searchBy,classificationId,fixtureId,handler){this.makeRequest(this._resultsCorsRequestFactory.fixtureDetails(searchBy,classificationId,fixtureId),handler)},ResultsDataProvider.prototype.makeRequest=function(dataRequest,handler){var corsRequestPromise=this._resultsCorsService.sendCorsRequest(dataRequest);corsRequestPromise.done(function(data){handler(data)});corsRequestPromise.fail(function(args){alert(args.responseText)})},ResultsDataProvider}();Results.ResultsDataProvider=ResultsDataProvider})(Results=SportsDataProviders.Results||(SportsDataProviders.Results={}))})(SportsDataProviders=SportsData.SportsDataProviders||(SportsData.SportsDataProviders={}))})(SportsData=Components.SportsData||(Components.SportsData={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var SportsData;(function(SportsData){var SportsDataProviders;(function(SportsDataProviders){var Results;(function(Results){var ResultsDataProviderFactory=function(){function ResultsDataProviderFactory(abstractFactory){this._abstractFactory=abstractFactory}return ResultsDataProviderFactory.prototype.createInstance=function(serviceEndpoint,localisationContext){return this._abstractFactory.createInstance("resultsDataProvider",{endpoint:serviceEndpoint,localisationContext:localisationContext})},ResultsDataProviderFactory}();Results.ResultsDataProviderFactory=ResultsDataProviderFactory})(Results=SportsDataProviders.Results||(SportsDataProviders.Results={}))})(SportsDataProviders=SportsData.SportsDataProviders||(SportsData.SportsDataProviders={}))})(SportsData=Components.SportsData||(Components.SportsData={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StandardDropdown;(function(StandardDropdown){var StandardDropdownItem=function(){function StandardDropdownItem(value,text){this._text=text;this._value=value}return Object.defineProperty(StandardDropdownItem.prototype,"Text",{get:function(){return this._text},enumerable:!0,configurable:!0}),Object.defineProperty(StandardDropdownItem.prototype,"Value",{get:function(){return this._value},enumerable:!0,configurable:!0}),StandardDropdownItem}();StandardDropdown.StandardDropdownItem=StandardDropdownItem})(StandardDropdown=Components.StandardDropdown||(Components.StandardDropdown={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var ResultsSearchControl;(function(ResultsSearchControl_1){var InitialiseForSelector=Typescript.Application.InitialiseForSelector,StandardDropdownItem=Components.StandardDropdown.StandardDropdownItem,ResultsSearchControl=function(_super){function ResultsSearchControl(domQuery,resultsSearchControlViewModelFactory,resultsDataProviderFactory,resultsRenderer){var _this=_super.call(this,domQuery)||this;return _this._resultsSearchControlViewModelFactory=resultsSearchControlViewModelFactory,_this._resultsDataProviderFactory=resultsDataProviderFactory,_this._resultsRenderer=resultsRenderer,_this}return __extends(ResultsSearchControl,_super),ResultsSearchControl.prototype.initialiseForSelector=function(selector){var _this=this;this.elementExists(selector)&&(this._controlViewModel=this._resultsSearchControlViewModelFactory.createInstance(),this._controlViewModel.cancelButton!=null&&this._controlViewModel.cancelButton.click(function(e){return _this.cancelButtonHandler(e)}),this._controlViewModel.classificationDropDown!=null&&this._controlViewModel.classificationDropDown.setChangeHandler(function(classificationId){return _this.classificationDropdownHandler(parseInt(classificationId))}),this._controlViewModel.last24HourButton!=null&&this._controlViewModel.last24HourButton.click(function(){return _this.last24HourButtonHandler()}),this._controlViewModel.last48HourButton!=null&&this._controlViewModel.last48HourButton.click(function(){return _this.last48HourButtonHandler()}),this._controlViewModel.otherDatesButton!=null&&this._controlViewModel.otherDatesButton.click(function(){return _this.otherDatesButtonHandler()}),this._controlViewModel.searchOptions1!=null&&this._controlViewModel.searchOptions1.setChangeHandler(function(id){return _this.searchOptions1Handler(id,_this._classificationId)}),this._controlViewModel.searchOptions2!=null&&this._controlViewModel.searchOptions2.setChangeHandler(function(filterbyId){return _this.searchOptions2Handler(_this._searchBy,_this._classificationId,filterbyId)}),this._controlViewModel.resultsDataEndpoint!=null&&(this._resultsDataProvider=this._resultsDataProviderFactory.createInstance(this._controlViewModel.resultsDataEndpoint.text(),this._controlViewModel.localisationContext),this._resultsDataProvider.getClassificationList(function(data){return _this.handleClassificationListDataReturn(data)})))},ResultsSearchControl.prototype.cancelButtonHandler=function(e){e.preventDefault();this.resetFilterCriteria()},ResultsSearchControl.prototype.classificationDropdownHandler=function(classificationId){var _this=this;this._classificationId=classificationId;this._controlViewModel.classificationDropDown.selectedIndex<1?this._controlViewModel.searchOptions1.addClass("results-hide"):this._resultsDataProvider.getSearchByList(classificationId,function(data){return _this.handleSearchOptions1DataReturn(data)});this._controlViewModel.searchOptions1.setSelectedIndex(0);this.searchOptions1Handler("",0)},ResultsSearchControl.prototype.handleClassificationListDataReturn=function(searchOptions){var dropDownItems,defaultItemToAdd,i,searchoption,itemToAdd;for(this._controlViewModel.searchOptions1.removeAllOptions(),dropDownItems=[],defaultItemToAdd=new StandardDropdownItem("0","--SELECT--"),dropDownItems.push(defaultItemToAdd),i=0;i<searchOptions.classifications.length;i++)searchoption=searchOptions.classifications[i],itemToAdd=new StandardDropdownItem(searchoption.id.toString(),searchoption.description),dropDownItems.push(itemToAdd);searchOptions.classifications.length>0?(this._controlViewModel.classificationDropDown.addOptions(dropDownItems),this._controlViewModel.classificationDropDown.removeClass("results-hide")):this._controlViewModel.searchOptions1.addClass("results-hide")},ResultsSearchControl.prototype.handleSearchOptions1DataReturn=function(data){var dropDownItems,defaultItemToAdd,i,searchoption,itemToAdd;for(this._controlViewModel.searchOptions1.removeAllOptions(),dropDownItems=[],defaultItemToAdd=new StandardDropdownItem("0","--SELECT--"),dropDownItems.push(defaultItemToAdd),i=0;i<data.dropdownItems.length;i++)searchoption=data.dropdownItems[i],itemToAdd=new StandardDropdownItem(searchoption.id.toString(),searchoption.description),dropDownItems.push(itemToAdd);data.dropdownItems.length>0?(this._controlViewModel.searchOptions1.addOptions(dropDownItems),this._controlViewModel.searchOptions1.removeClass("results-hide")):this._controlViewModel.searchOptions1.addClass("results-hide")},ResultsSearchControl.prototype.last24HourButtonHandler=function(){this.selectButton(this._controlViewModel.last24HourButton);this._controlViewModel.setFromDate(new Date);this._controlViewModel.setToDate(new Date);this.setDatePickerVisibility(!1)},ResultsSearchControl.prototype.last48HourButtonHandler=function(){var today=new Date,yesterday=new Date;yesterday.setDate(today.getDate()-1);this.selectButton(this._controlViewModel.last48HourButton);this._controlViewModel.setFromDate(yesterday);this._controlViewModel.setToDate(today);this.setDatePickerVisibility(!1)},ResultsSearchControl.prototype.otherDatesButtonHandler=function(){this.selectButton(this._controlViewModel.otherDatesButton);this.setDatePickerVisibility(!0)},ResultsSearchControl.prototype.selectButton=function(buttonToSelect){this._controlViewModel.last48HourButton.removeClass("results-ButtonSelected");this._controlViewModel.last24HourButton.removeClass("results-ButtonSelected");this._controlViewModel.otherDatesButton.removeClass("results-ButtonSelected");buttonToSelect.addClass("results-ButtonSelected")},ResultsSearchControl.prototype.setDatePickerVisibility=function(shouldBeVisible){shouldBeVisible?this._controlViewModel.datePickerContainer.removeClass("results-hide"):this._controlViewModel.datePickerContainer.addClass("results-hide")},ResultsSearchControl.prototype.searchOptions1Handler=function(searchBy,classificationId){var _this=this;this._searchBy=searchBy;this._controlViewModel.searchOptions1.selectedIndex<1?this._controlViewModel.searchOptions2.addClass("results-hide"):this._resultsDataProvider.getDropdownList(searchBy,classificationId,this._controlViewModel.getFromDate(),this._controlViewModel.getToDate(),function(data){return _this.handleSearchOptions2DataReturn(data)})},ResultsSearchControl.prototype.searchOptions2Handler=function(searchBy,classificationId,filterbyId){var _this=this;filterbyId===void 0&&(filterbyId="-1");this._resultsDataProvider.getFixtureList(searchBy,classificationId,filterbyId,this._controlViewModel.getFromDate(),this._controlViewModel.getToDate(),function(data){return _this.handleFixtureListSearchResults(data)})},ResultsSearchControl.prototype.handleSearchOptions2DataReturn=function(searchOptions){var dropDownItems,defaultItemToAdd,i,searchoption,itemToAdd;for(this._controlViewModel.searchOptions2.removeAllOptions(),dropDownItems=[],defaultItemToAdd=new StandardDropdownItem("0","--SELECT--"),dropDownItems.push(defaultItemToAdd),i=0;i<searchOptions.dropdownItems.length;i++)searchoption=searchOptions.dropdownItems[i],itemToAdd=new StandardDropdownItem(searchoption.id.toString(),searchoption.description),dropDownItems.push(itemToAdd);searchOptions.dropdownItems.length>1?(this._controlViewModel.searchOptions2.addOptions(dropDownItems),this._controlViewModel.searchOptions2.removeClass("results-hide")):(this._controlViewModel.searchOptions2.addClass("results-hide"),this.searchOptions2Handler(this._searchBy,this._classificationId))},ResultsSearchControl.prototype.handleFixtureListSearchResults=function(fixtureList){var _this=this;this._resultsRenderer.renderFixtureList(fixtureList,function(fixtureId){return _this.fixtureSelectedHandler(fixtureId)})},ResultsSearchControl.prototype.fixtureSelectedHandler=function(fixtureId){var _this=this;this._resultsDataProvider.getFixtureDetails(this._searchBy,this._classificationId,fixtureId,function(data){return _this._resultsRenderer.renderFixtureDetails(data)})},ResultsSearchControl.prototype.resetFilterCriteria=function(){this._controlViewModel.classificationDropDown.setSelectedIndex(0);this.classificationDropdownHandler(0)},ResultsSearchControl}(InitialiseForSelector);ResultsSearchControl_1.ResultsSearchControl=ResultsSearchControl})(ResultsSearchControl=Components.ResultsSearchControl||(Components.ResultsSearchControl={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var ResultsSearchControl;(function(ResultsSearchControl){var ResultsSearchControlViewModel=function(){function ResultsSearchControlViewModel(cancelButton,classificationDropDown,userMessage,datePickerContainer,fromDatePicker,toDatePicker,classificationsDropdown,searchOptions1,searchOptions2,last24HourButton,last48HourButton,otherDatesButton,resultsDataEndpoint,localisation){this._visibilityHiddenSelector="results-hide";this._selectedButtonSelector="results-ButtonSelected";this._cancelButton=cancelButton;this._classificationDropDown=classificationDropDown;this._userMessage=userMessage;this._datePickerContainer=datePickerContainer;this._fromDatePicker=fromDatePicker;this._toDatePicker=toDatePicker;this._searchOptions1=searchOptions1;this._searchOptions2=searchOptions2;this._last24HourButton=last24HourButton;this._last48HourButton=last48HourButton;this._otherDatesButton=otherDatesButton;this._resultsDataEndpoint=resultsDataEndpoint;this._localisation=localisation}return Object.defineProperty(ResultsSearchControlViewModel.prototype,"cancelButton",{get:function(){return this._cancelButton},enumerable:!0,configurable:!0}),Object.defineProperty(ResultsSearchControlViewModel.prototype,"classificationDropDown",{get:function(){return this._classificationDropDown},enumerable:!0,configurable:!0}),Object.defineProperty(ResultsSearchControlViewModel.prototype,"userMessage",{get:function(){return this._userMessage},enumerable:!0,configurable:!0}),Object.defineProperty(ResultsSearchControlViewModel.prototype,"datePickerContainer",{get:function(){return this._datePickerContainer},enumerable:!0,configurable:!0}),Object.defineProperty(ResultsSearchControlViewModel.prototype,"fromDatePicker",{get:function(){return this._fromDatePicker},enumerable:!0,configurable:!0}),Object.defineProperty(ResultsSearchControlViewModel.prototype,"toDatePicker",{get:function(){return this._toDatePicker},enumerable:!0,configurable:!0}),Object.defineProperty(ResultsSearchControlViewModel.prototype,"searchOptions1",{get:function(){return this._searchOptions1},enumerable:!0,configurable:!0}),Object.defineProperty(ResultsSearchControlViewModel.prototype,"searchOptions2",{get:function(){return this._searchOptions2},enumerable:!0,configurable:!0}),Object.defineProperty(ResultsSearchControlViewModel.prototype,"last24HourButton",{get:function(){return this._last24HourButton},enumerable:!0,configurable:!0}),Object.defineProperty(ResultsSearchControlViewModel.prototype,"last48HourButton",{get:function(){return this._last48HourButton},enumerable:!0,configurable:!0}),Object.defineProperty(ResultsSearchControlViewModel.prototype,"otherDatesButton",{get:function(){return this._otherDatesButton},enumerable:!0,configurable:!0}),Object.defineProperty(ResultsSearchControlViewModel.prototype,"resultsDataEndpoint",{get:function(){return this._resultsDataEndpoint},enumerable:!0,configurable:!0}),Object.defineProperty(ResultsSearchControlViewModel.prototype,"localisationContext",{get:function(){return{languageId:this._localisation.data("language-id"),countryId:this._localisation.data("country-id"),zoneId:this._localisation.data("zone-id")}},enumerable:!0,configurable:!0}),ResultsSearchControlViewModel.prototype.setFromDate=function(dateFrom){this._fromDatePicker.val(this.getFormattedDateString(dateFrom))},ResultsSearchControlViewModel.prototype.setToDate=function(dateTo){this._toDatePicker.val(this.getFormattedDateString(dateTo))},ResultsSearchControlViewModel.prototype.getFromDate=function(){return new Date(Date.parse(this.fromDatePicker.val()))},ResultsSearchControlViewModel.prototype.getToDate=function(){return new Date(Date.parse(this.toDatePicker.val()))},ResultsSearchControlViewModel.prototype.getFormattedDateString=function(date){return date.getFullYear()+"-"+("0"+(date.getMonth()+1)).slice(-2)+"-"+("0"+date.getDate()).slice(-2)},ResultsSearchControlViewModel.cancelButtonSelector="#results-FilterCancelLink",ResultsSearchControlViewModel.classificationDropDownSelector="#results-classificationDropDown",ResultsSearchControlViewModel.userMessageSelector=".results-UserMessage",ResultsSearchControlViewModel.datePickerContainerSelector=".results-datePickerContainer",ResultsSearchControlViewModel.dateFromPickerSelector=".results-DatePickerFromContainer .commonDatePicker",ResultsSearchControlViewModel.dateToPickerSelector=".results-DatePickerToContainer .commonDatePicker",ResultsSearchControlViewModel.classificationsDropdownSelector="#results-classificationDropDown",ResultsSearchControlViewModel.searchOptions1Selector="#results-SearchOptions1",ResultsSearchControlViewModel.searchOptions2Selector="#results-SearchOptions2",ResultsSearchControlViewModel.last24HourButtonSelector=".results-last24HourButton",ResultsSearchControlViewModel.last48HourButtonSelector=".results-last48HourButton",ResultsSearchControlViewModel.otherDatesButtonSelector=".results-otherDatesButton",ResultsSearchControlViewModel.resultsDataEndpointSelector="#results-ResultsDataEndpoint",ResultsSearchControlViewModel.localisationSelector="#results-localisation",ResultsSearchControlViewModel}();ResultsSearchControl.ResultsSearchControlViewModel=ResultsSearchControlViewModel})(ResultsSearchControl=Components.ResultsSearchControl||(Components.ResultsSearchControl={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var ResultsSearchControl;(function(ResultsSearchControl){var ResultsSearchControlViewModelFactory=function(){function ResultsSearchControlViewModelFactory(jqueryObjectFactory,standardDropdownFactory){this._jqueryObjectFactory=jqueryObjectFactory;this._dropdownFactory=standardDropdownFactory}return ResultsSearchControlViewModelFactory.prototype.createInstance=function(){var cancelButton=this._jqueryObjectFactory.createObjectForSelector(ResultsSearchControl.ResultsSearchControlViewModel.cancelButtonSelector),classificatonDropDown=this._dropdownFactory.createInstance(ResultsSearchControl.ResultsSearchControlViewModel.classificationDropDownSelector),userMessage=this._jqueryObjectFactory.createObjectForSelector(ResultsSearchControl.ResultsSearchControlViewModel.userMessageSelector),datePickerContainer=this._jqueryObjectFactory.createObjectForSelector(ResultsSearchControl.ResultsSearchControlViewModel.datePickerContainerSelector),fromDatePicker=this._jqueryObjectFactory.createObjectForSelector(ResultsSearchControl.ResultsSearchControlViewModel.dateFromPickerSelector),toDatePicker=this._jqueryObjectFactory.createObjectForSelector(ResultsSearchControl.ResultsSearchControlViewModel.dateToPickerSelector),classificationsDropdown=this._dropdownFactory.createInstance(ResultsSearchControl.ResultsSearchControlViewModel.classificationDropDownSelector),searchOptions1=this._dropdownFactory.createInstance(ResultsSearchControl.ResultsSearchControlViewModel.searchOptions1Selector),searchOptions2=this._dropdownFactory.createInstance(ResultsSearchControl.ResultsSearchControlViewModel.searchOptions2Selector),last24HourButton=this._jqueryObjectFactory.createObjectForSelector(ResultsSearchControl.ResultsSearchControlViewModel.last24HourButtonSelector),last48HourButton=this._jqueryObjectFactory.createObjectForSelector(ResultsSearchControl.ResultsSearchControlViewModel.last48HourButtonSelector),otherDatesButton=this._jqueryObjectFactory.createObjectForSelector(ResultsSearchControl.ResultsSearchControlViewModel.otherDatesButtonSelector),resultsDataEndpoint=this._jqueryObjectFactory.createObjectForSelector(ResultsSearchControl.ResultsSearchControlViewModel.resultsDataEndpointSelector),localisation=this._jqueryObjectFactory.createObjectForSelector(ResultsSearchControl.ResultsSearchControlViewModel.localisationSelector);return new ResultsSearchControl.ResultsSearchControlViewModel(cancelButton,classificatonDropDown,userMessage,datePickerContainer,fromDatePicker,toDatePicker,classificationsDropdown,searchOptions1,searchOptions2,last24HourButton,last48HourButton,otherDatesButton,resultsDataEndpoint,localisation)},ResultsSearchControlViewModelFactory}();ResultsSearchControl.ResultsSearchControlViewModelFactory=ResultsSearchControlViewModelFactory})(ResultsSearchControl=Components.ResultsSearchControl||(Components.ResultsSearchControl={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StandardDropdown;(function(StandardDropdown){var StandardDropdownFactory=function(){function StandardDropdownFactory(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return StandardDropdownFactory.prototype.createInstance=function(selector){var jQueryObject=this._jqueryObjectFactory.createObjectForSelector(selector);return new StandardDropdown.StandardDropdown(jQueryObject,this._jqueryObjectFactory)},StandardDropdownFactory}();StandardDropdown.StandardDropdownFactory=StandardDropdownFactory})(StandardDropdown=Components.StandardDropdown||(Components.StandardDropdown={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var SportsData;(function(SportsData){var SportsDataProviders;(function(SportsDataProviders){var Results;(function(Results){var ResultsCorsService=function(){function ResultsCorsService(jqueryXhrRequestFactory,browserCapabilityQuery,windowQueries,jsonParser,jqueryObjectFactory){this.jqueryXhrRequestFactory=jqueryXhrRequestFactory;this.browserCapabilityQuery=browserCapabilityQuery;this.windowQueries=windowQueries;this.jqueryObjectFactory=jqueryObjectFactory;this.jsonParser=jsonParser}return ResultsCorsService.prototype.browserSupportsCors=function(){return this.browserCapabilityQuery.browserSupportsCrossDomainRequests()?!0:this.browserCapabilityQuery.browserSupportsXDomainRequestObject()?!0:!1},ResultsCorsService.prototype.browserSupportsXhr=function(){return this.browserCapabilityQuery.browserSupportsCrossDomainRequests()?!0:!1},ResultsCorsService.prototype.sendCorsRequest=function(request){var _this=this,settings,deferredPromise;if(this.deferred)return this.jqueryXhrRequestFactory.createDeferred().reject().promise();if(this.deferred=this.jqueryXhrRequestFactory.createDeferred(),this.browserSupportsCors())return(settings={url:request.getUrl(),type:request.verb,data:request.data,xhrFields:{withCredentials:request.useCredentials}},this.browserSupportsXhr())?(this.deferred=this.jqueryXhrRequestFactory.createXmlHttpRequest(request.getUrl(),settings),this.deferred.always(function(){_this.deferred=null}),this.deferred):(deferredPromise=this.deferred.promise(),deferredPromise.always(function(){_this.deferred=null}),deferredPromise);this.deferred.reject()},ResultsCorsService}();Results.ResultsCorsService=ResultsCorsService})(Results=SportsDataProviders.Results||(SportsDataProviders.Results={}))})(SportsDataProviders=SportsData.SportsDataProviders||(SportsData.SportsDataProviders={}))})(SportsData=Components.SportsData||(Components.SportsData={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var ResultsSearchControl;(function(ResultsSearchControl){var ResultsDataRenderer=function(){function ResultsDataRenderer(handlebarsTemplateFactory,jqueryObjectFactory,resultsHandlebarsHelper){this._helpersRegistered=!1;this._handlebarsTemplateFactory=handlebarsTemplateFactory;this._jqueryObjectFactory=jqueryObjectFactory;this._resultsHandlebarsHelper=resultsHandlebarsHelper}return ResultsDataRenderer.prototype.renderFixtureList=function(resultsData,fixtureSelectedHandler){var _this=this,template=this._handlebarsTemplateFactory.createCompiledTemplate("#results-fixture-list-template"),container=this._jqueryObjectFactory.createObjectForSelector("#results-container");this.lazyRegisterHelpers();container.off();container.on("click","a.fixture",function(eo){var clicked=_this._jqueryObjectFactory.createObjectForElement(eo.target),fixtureId=parseInt(clicked.data("fixture-id"));fixtureSelectedHandler(fixtureId)});container.html(template(resultsData))},ResultsDataRenderer.prototype.renderFixtureDetails=function(resultsData){var _this=this,template=this._handlebarsTemplateFactory.createCompiledTemplate("#results-fixture-details-template"),container=this._jqueryObjectFactory.createObjectForSelector("#results-container");container.off();container.on("click","a.toggle-losers",function(eo){var clicked=_this._jqueryObjectFactory.createObjectForElement(eo.target),toggleText=clicked.data("toggle-text"),currentText=clicked.text();clicked.data("toggle-text",currentText);clicked.text(toggleText);_this._jqueryObjectFactory.createObjectForSelector("#market-information").toggleClass("hide-losers")});container.html(template(resultsData))},ResultsDataRenderer.prototype.lazyRegisterHelpers=function(){this._helpersRegistered||(this._resultsHandlebarsHelper.registerHelpers(),this._helpersRegistered=!0)},ResultsDataRenderer}();ResultsSearchControl.ResultsDataRenderer=ResultsDataRenderer})(ResultsSearchControl=Components.ResultsSearchControl||(Components.ResultsSearchControl={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var ResultsSearchControl;(function(ResultsSearchControl){var OddsConverter=ns_gen5_util.OddsConverter,ResultsRendererHandlebarsHelpers=function(){function ResultsRendererHandlebarsHelpers(handlebarHelpers,jqueryObjectFactory){this._handlebarHelpers=handlebarHelpers;this._jqueryObjectFactory=jqueryObjectFactory}return ResultsRendererHandlebarsHelpers.prototype.registerHelpers=function(){var container=this._jqueryObjectFactory.createObjectForSelector("#results-container"),oddsType=container.data("odds-type");this._handlebarHelpers.registerHelper("formatDatetime",function(d){var date=new Date(Date.parse(d)),stringDate=date.toDateString(),match=/(\d{2}:\d{2}):\d{2}/.exec(date.toTimeString()),time=match&&match.length>1?match[1]:"";return stringDate+" "+time});this._handlebarHelpers.registerHelper("ifEqual",function(leftOperand,rightOperand,options){return leftOperand===rightOperand?options.fn(this):options.inverse(this)});this._handlebarHelpers.registerHelper("rowClass",function(index){return index%2==0?"even":"odd"});this._handlebarHelpers.registerHelper("convertOdds",function(textValue){if(oddsType)switch(oddsType){case"odds-type-decimal":return OddsConverter.ConvertOddsDecimal(textValue,2);case"odds-type-american":return OddsConverter.ConvertOddsUS(textValue)}return textValue});this._handlebarHelpers.registerPartial("participantsPartial",this._jqueryObjectFactory.createObjectForSelector("#results-particpants-partial").html());this._handlebarHelpers.registerPartial("tablePartial",this._jqueryObjectFactory.createObjectForSelector("#results-table-partial").html());this._handlebarHelpers.registerPartial("headerRowPartial",this._jqueryObjectFactory.createObjectForSelector("#results-table-header-row-partial").html());this._handlebarHelpers.registerPartial("cellPartial",this._jqueryObjectFactory.createObjectForSelector("#results-table-cell-partial").html())},ResultsRendererHandlebarsHelpers}();ResultsSearchControl.ResultsRendererHandlebarsHelpers=ResultsRendererHandlebarsHelpers})(ResultsSearchControl=Components.ResultsSearchControl||(Components.ResultsSearchControl={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(IoC){var Installers;(function(Installers){var ResultsSearchControlInstaller=function(){function ResultsSearchControlInstaller(){}return ResultsSearchControlInstaller.prototype.install=function(container){container.register(IoC.Component.named("resultsSearchControl").componentType(Typescript.Components.ResultsSearchControl.ResultsSearchControl).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("resultsSearchControlViewModelFactory").componentType(Typescript.Components.ResultsSearchControl.ResultsSearchControlViewModelFactory).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("standardDropdownFactory").componentType(Typescript.Components.StandardDropdown.StandardDropdownFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("resultsDataProviderFactory").componentType(Typescript.Components.SportsData.SportsDataProviders.Results.ResultsDataProviderFactory).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("resultsRenderer").componentType(Typescript.Components.ResultsSearchControl.ResultsDataRenderer).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("resultsCorsService").componentType(Typescript.Components.SportsData.SportsDataProviders.Results.ResultsCorsService).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("resultsCorsRequestBuilder").componentType(Typescript.Components.SportsData.SportsDataProviders.Results.ResultsCorsRequestBuilder).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("resultsCorsRequestFactory").componentType(Typescript.Components.SportsData.SportsDataProviders.Results.ResultsCorsRequestFactory).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("resultsDataProvider").componentType(Typescript.Components.SportsData.SportsDataProviders.Results.ResultsDataProvider).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("resultsHandlebarsHelper").componentType(Typescript.Components.ResultsSearchControl.ResultsRendererHandlebarsHelpers).withLifestyle(IoC.Lifestyle.Transient))},ResultsSearchControlInstaller}();Installers.ResultsSearchControlInstaller=ResultsSearchControlInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(Typescript){var Components;(function(Components){var Services;(function(Services){var SessionService=function(){function SessionService(jqueryXhrRequestFactory){this._jqueryXhrRequestFactory=jqueryXhrRequestFactory}return SessionService.prototype.checkSessionValid=function(timeStamp,hashValue,timeoutDuration,currentTime,successCallback){var data={timeStamp:timeStamp.toString(),hashValue:hashValue.toString(),timeoutDuration:parseInt(timeoutDuration)};this._jqueryXhrRequestFactory.createXmlHttpRequest("/SessionActivity/CheckSessionValid",{type:"POST",dataType:"json",contentType:"application/json; charset=utf-8",async:!0,data:JSON.stringify(data),success:function(jsonData){var model=new Services.SessionValidModel(jsonData.showMessage,jsonData.lastActivity,jsonData.newExpiryTime,jsonData.newTimestamp,jsonData.newHash,jsonData.newTimeoutDuration);successCallback(model)},error:function(){return!1}})},SessionService.prototype.keepSessionAlive=function(timeStamp,hashValue,timeoutDuration,successCallback,errorCallback){var data={timeStamp:timeStamp.toString(),hashValue:hashValue.toString(),timeoutDuration:parseInt(timeoutDuration)};this._jqueryXhrRequestFactory.createXmlHttpRequest("/SessionActivity/KeepAlive",{type:"POST",dataType:"json",contentType:"application/json; charset=utf-8",async:!0,data:JSON.stringify(data),success:function(jsonData){var model=new Services.SessionValidModel(jsonData.showMessage,jsonData.lastActivity,jsonData.newExpiryTime,jsonData.newTimestamp,jsonData.newHash,jsonData.newTimeoutDuration);return successCallback(model),!1},error:function(){return errorCallback(),!1}})},SessionService}();Services.SessionService=SessionService})(Services=Components.Services||(Components.Services={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var Services;(function(Services){var SessionValidModel=function(){function SessionValidModel(showMessage,lastActivity,newExpiryTime,newTimestamp,hash,newTimeoutDuration){this.showMessage=showMessage;this.lastActivity=lastActivity;this.newExpiryTime=newExpiryTime;this.newTimestamp=newTimestamp;this.hash=hash;this.newTimeoutDuration=newTimeoutDuration}return SessionValidModel}();Services.SessionValidModel=SessionValidModel})(Services=Components.Services||(Components.Services={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var InactivityWarning;(function(InactivityWarning_1){var InitialiseForSelector=Typescript.Application.InitialiseForSelector,InactivityWarning=function(_super){function InactivityWarning(modalService,sessionService,pageReloader,inactivityWarningViewModelFactory,jqueryXhrRequestFactory,domQuery,pollInactivityWarningService,nextExpiryCalculator,logoutService){var _this=_super.call(this,domQuery)||this;return _this.clickHandler=function(eventObject){var that=_this;return eventObject.preventDefault(),that._sessionService.keepSessionAlive(that._viewModel.getInactivitySessionTimestamp(),that._viewModel.getInactivitySessionHashValue(),that._viewModel.getInactivitySessionDuration(),function(model){that.onSessionKeepAliveSuccess(model)},function(){that.onSessionKeepAliveError()}),!1},_this._modalService=modalService,_this._sessionService=sessionService,_this._pageReloader=pageReloader,_this._inactivityWarningViewModelFactory=inactivityWarningViewModelFactory,_this._jqueryXhrRequestFactory=jqueryXhrRequestFactory,_this._pollInactivityWarningService=pollInactivityWarningService,_this._nextExpiryCalculator=nextExpiryCalculator,_this._logoutService=logoutService,_this}return __extends(InactivityWarning,_super),InactivityWarning.prototype.initialiseForSelector=function(selector){var _this=this;this.elementExists(selector)&&(this._deferred=this._jqueryXhrRequestFactory.createDeferred(),this._viewModel=this._inactivityWarningViewModelFactory.createViewModel(selector),this.initLinks(),this.calculateNextExpiry(),this._pollInactivityWarningService.init(selector,function(model){_this.onSessionCheckSuccess(model)}))},InactivityWarning.prototype.calculateNextExpiry=function(){var seconds=this._viewModel.getInactivitySessionDuration();this._viewModel.setInactivitySessionExpiry(this._nextExpiryCalculator.calculate(seconds))},InactivityWarning.prototype.initLinks=function(){var _this=this,that=this;that._viewModel.getInactivitySessionExpiryElement().length>0&&that._viewModel.getRemainLoginButtonElement().click(function(e){_this.clickHandler(e)})},InactivityWarning.prototype.onSessionCheckSuccess=function(sessionValidModel){sessionValidModel!=null&&(sessionValidModel.showMessage?this.showAlert():sessionValidModel.lastActivity<0?this._pageReloader.pageReload():(this._viewModel.setInactivitySessionExpiry(sessionValidModel.newExpiryTime),this._viewModel.setInactivitySessionTimestamp(sessionValidModel.newTimestamp),this._viewModel.setInactivitySessionHashValue(sessionValidModel.hash)))},InactivityWarning.prototype.onSessionKeepAliveSuccess=function(sessionValidModel){sessionValidModel!=null?(this._viewModel.update(sessionValidModel.newExpiryTime,sessionValidModel.newTimestamp,sessionValidModel.hash,sessionValidModel.newTimeoutDuration),this.calculateNextExpiry(),this._modalService.hideModal()):this._pageReloader.pageReload()},InactivityWarning.prototype.onSessionKeepAliveError=function(){this._pageReloader.pageReload()},InactivityWarning.prototype.showAlert=function(){var _this=this;this._modalService.showModal(new Components.Models.Modal(this._viewModel.getModalElement(),1,!1));this._deferred!=undefined&&this._deferred.resolve();setTimeout(function(){_this._viewModel.getIsModalVisible()&&_this._logoutService.logOut(!0)},63e3)},InactivityWarning}(InitialiseForSelector);InactivityWarning_1.InactivityWarning=InactivityWarning})(InactivityWarning=Components.InactivityWarning||(Components.InactivityWarning={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var InactivityWarningViewModel=function(){function InactivityWarningViewModel(inactivitySessionExpiry,inactivitySessionTimestamp,inactivitySessionHashValue,inactivitySessionDuration,remainLoginButton,logOutButton,modal){this._inactivitySessionExpiry=inactivitySessionExpiry;this._inactivitySessionTimestamp=inactivitySessionTimestamp;this._inactivitySessionHashValue=inactivitySessionHashValue;this._inactivitySessionDuration=inactivitySessionDuration;this._remainLoginButton=remainLoginButton;this._logOutButton=logOutButton;this._modal=modal}return InactivityWarningViewModel.prototype.update=function(expiry,timeStamp,hash,duration){this.setInactivitySessionExpiry(expiry);this.setInactivitySessionTimestamp(timeStamp);this.setInactivitySessionHashValue(hash);this.setInactivitySessionDuration(duration)},InactivityWarningViewModel.prototype.getInactivitySessionExpiryElement=function(){return this._inactivitySessionExpiry},InactivityWarningViewModel.prototype.getRemainLoginButtonElement=function(){return this._remainLoginButton},InactivityWarningViewModel.prototype.getLogoutButtonElement=function(){return this._logOutButton},InactivityWarningViewModel.prototype.getModalElement=function(){return this._modal},InactivityWarningViewModel.prototype.getInactivitySessionExpiry=function(){return this._inactivitySessionExpiry.val()},InactivityWarningViewModel.prototype.getInactivitySessionTimestamp=function(){return this._inactivitySessionTimestamp.val()},InactivityWarningViewModel.prototype.getInactivitySessionHashValue=function(){return this._inactivitySessionHashValue.val()},InactivityWarningViewModel.prototype.getInactivitySessionDuration=function(){return this._inactivitySessionDuration.val()},InactivityWarningViewModel.prototype.setInactivitySessionExpiry=function(value){this._inactivitySessionExpiry.val(value)},InactivityWarningViewModel.prototype.setInactivitySessionTimestamp=function(value){this._inactivitySessionTimestamp.val(value)},InactivityWarningViewModel.prototype.setInactivitySessionHashValue=function(value){this._inactivitySessionHashValue.val(value)},InactivityWarningViewModel.prototype.setInactivitySessionDuration=function(value){this._inactivitySessionDuration.val(value)},InactivityWarningViewModel.prototype.getIsModalVisible=function(){return this._modal.is(":visible")},InactivityWarningViewModel}();Components.InactivityWarningViewModel=InactivityWarningViewModel})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var CountDownService=function(){function CountDownService(){}return CountDownService.prototype.startCountdown=function(logoutTime){var _this=this,h,m,s,remainingTime;remainingTime=logoutTime-(new Date).getTime();s=Math.floor(remainingTime/1e3);m=0;h=0;s>=60&&(remainingTime=remainingTime-6e4,s=s%60,m=1);m+=Math.floor(remainingTime/6e4);m>=60&&(remainingTime=remainingTime-36e5,m=m%60,h=1);h+=Math.floor(remainingTime/36e5);h+m+s>0&&setTimeout(function(){_this.startCountdown(logoutTime)},1e3)},CountDownService}();Components.CountDownService=CountDownService})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var PageReload=function(){function PageReload(){}return PageReload.prototype.pageReload=function(){window.location.reload()},PageReload}();Components.PageReload=PageReload})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var InactivityWarningViewModelFactory=function(){function InactivityWarningViewModelFactory(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return InactivityWarningViewModelFactory.prototype.createViewModel=function(element){return new Components.InactivityWarningViewModel(this._jqueryObjectFactory.createObjectForSelector(element).find("input#InactivitySessionExpiry"),this._jqueryObjectFactory.createObjectForSelector(element).find("input#InactivitySessionTimestamp"),this._jqueryObjectFactory.createObjectForSelector(element).find("input#InactivitySessionHashValue"),this._jqueryObjectFactory.createObjectForSelector(element).find("input#InactivitySessionTimeoutDuration"),this._jqueryObjectFactory.createObjectForSelector("div.InactivityWarningDialog a.RemainLoggedInButton"),this._jqueryObjectFactory.createObjectForSelector("div.InactivityWarningDialog a.LogOutButton"),this._jqueryObjectFactory.createObjectForSelector("div.InactivityWarningDialog"))},InactivityWarningViewModelFactory}();Components.InactivityWarningViewModelFactory=InactivityWarningViewModelFactory})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var PollInactivityWarningService=function(){function PollInactivityWarningService(sessionService,inactivityWarningViewModelFactory){this._askViewModelEvery=1e3;this._sessionService=sessionService;this._inactivityWarningViewModelFactory=inactivityWarningViewModelFactory}return PollInactivityWarningService.prototype.init=function(selector,onCheckSuccessCallaback){this._inactivityWarningViewModel=this._inactivityWarningViewModelFactory.createViewModel(selector);this.start(onCheckSuccessCallaback)},PollInactivityWarningService.prototype.start=function(onCheckSuccessCallaback){var that=this;that._inactivityWarningViewModel.getInactivitySessionExpiryElement().length>0&&setInterval(function(){var expiryTime=new Date(that._inactivityWarningViewModel.getInactivitySessionExpiry()),now=new Date;now.getTime()>=expiryTime.getTime()-6e4&&(that._inactivityWarningViewModel.getIsModalVisible()||that._sessionService.checkSessionValid(that._inactivityWarningViewModel.getInactivitySessionTimestamp(),that._inactivityWarningViewModel.getInactivitySessionHashValue(),that._inactivityWarningViewModel.getInactivitySessionDuration(),now,function(model){onCheckSuccessCallaback(model)}))},this._askViewModelEvery)},PollInactivityWarningService}();Components.PollInactivityWarningService=PollInactivityWarningService})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var NextExpiryCalculator=function(){function NextExpiryCalculator(){}return NextExpiryCalculator.prototype.calculate=function(seconds){var currentTime=new Date;return currentTime.setSeconds(currentTime.getSeconds()+parseInt(seconds)),new Date(currentTime.toString()).toString()},NextExpiryCalculator}();Components.NextExpiryCalculator=NextExpiryCalculator})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(IoC){var Installers;(function(Installers){var InactivityWarningInstaller=function(){function InactivityWarningInstaller(){}return InactivityWarningInstaller.prototype.install=function(container){container.register(IoC.Component.named("inactivityWarning").componentType(Typescript.Components.InactivityWarning.InactivityWarning).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("modalService").componentType(Typescript.Components.LoginControls.Services.ModalService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("sessionService").componentType(Typescript.Components.Services.SessionService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("inactivityWarningViewModel").componentType(Typescript.Components.InactivityWarningViewModel).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("countDownService").componentType(Typescript.Components.CountDownService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("pageReloader").componentType(Typescript.Components.PageReload).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("inactivityWarningViewModelFactory").componentType(Typescript.Components.InactivityWarningViewModelFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("pollInactivityWarningService").componentType(Typescript.Components.PollInactivityWarningService).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("nextExpiryCalculator").componentType(Typescript.Components.NextExpiryCalculator).withLifestyle(IoC.Lifestyle.Singleton))},InactivityWarningInstaller}();Installers.InactivityWarningInstaller=InactivityWarningInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(Typescript){var Components;(function(Components){var NowPlaying;(function(NowPlaying){var NowPlayingViewModel=function(){function NowPlayingViewModel(nowPlayingWrapper,fixtureName,classificationName,startTime){this._nowPlayingWrapperJQueryObject=nowPlayingWrapper;this._fixtureNameJQueryObject=fixtureName;this._classificationNameJQueryObject=classificationName;this._startTimeJQueryObject=startTime}return NowPlayingViewModel.prototype.isVisible=function(){return this._nowPlayingWrapperJQueryObject.is(":visible")},NowPlayingViewModel.prototype.show=function(){this._nowPlayingWrapperJQueryObject.slideDown(500)},NowPlayingViewModel.prototype.hideClassificationName=function(){this._classificationNameJQueryObject.hide()},NowPlayingViewModel.prototype.setFixtureName=function(fixtureName){this._fixtureNameJQueryObject.text(fixtureName)},NowPlayingViewModel.prototype.setClassificationName=function(classificationName){this._classificationNameJQueryObject.text(classificationName)},NowPlayingViewModel.prototype.setFixtureStartTime=function(startTime){var template=this._startTimeJQueryObject.data("template"),formattedTemplate=ns_gen5_util.StringUtil.Format(template,startTime);this._startTimeJQueryObject.text(formattedTemplate)},NowPlayingViewModel}();NowPlaying.NowPlayingViewModel=NowPlayingViewModel})(NowPlaying=Components.NowPlaying||(Components.NowPlaying={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var NowPlaying;(function(NowPlaying){var NowPlayingViewModelFactory=function(){function NowPlayingViewModelFactory(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return NowPlayingViewModelFactory.prototype.createViewModel=function(selector){var wrapper=this._jqueryObjectFactory.createObjectForSelector(selector),fixtureName=wrapper.find(".fixture-name"),classificationName=wrapper.find(".classification-name"),startTime=wrapper.find(".start-time");return new NowPlaying.NowPlayingViewModel(wrapper,fixtureName,classificationName,startTime)},NowPlayingViewModelFactory}();NowPlaying.NowPlayingViewModelFactory=NowPlayingViewModelFactory})(NowPlaying=Components.NowPlaying||(Components.NowPlaying={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var NowPlaying;(function(NowPlaying_1){var InitialiseForSelector=Typescript.Application.InitialiseForSelector,NowPlaying=function(_super){function NowPlaying(nowPlayingViewModelFactory,domQuery){var _this=_super.call(this,domQuery)||this;return _this._enabled=!1,_this._nowPlayingViewModelFactory=nowPlayingViewModelFactory,_this}return __extends(NowPlaying,_super),NowPlaying.prototype.initialiseForSelector=function(selector){this.elementExists(selector)&&(this._nowPlayingViewModel=this._nowPlayingViewModelFactory.createViewModel(selector),this._enabled=!0)},NowPlaying.prototype.updateDisplay=function(fixtureName,startTime,classificationName){this._enabled&&(this._nowPlayingViewModel.setFixtureName(fixtureName),this._nowPlayingViewModel.setClassificationName(classificationName),this._nowPlayingViewModel.setFixtureStartTime(startTime),this.stringIsNullOrUndefinedOrEmpty(classificationName)&&this._nowPlayingViewModel.hideClassificationName(),this._nowPlayingViewModel.isVisible()||this._nowPlayingViewModel.show())},NowPlaying.prototype.stringIsNullOrUndefinedOrEmpty=function(value){return value===null||value===undefined||value===""},NowPlaying}(InitialiseForSelector);NowPlaying_1.NowPlaying=NowPlaying})(NowPlaying=Components.NowPlaying||(Components.NowPlaying={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(IoC){var Installers;(function(Installers){var NowPlayingInstaller=function(){function NowPlayingInstaller(){}return NowPlayingInstaller.prototype.install=function(container){container.register(IoC.Component.named("nowPlaying").componentType(Typescript.Components.NowPlaying.NowPlaying).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("nowPlayingViewModelFactory").componentType(Typescript.Components.NowPlaying.NowPlayingViewModelFactory).withLifestyle(IoC.Lifestyle.Singleton))},NowPlayingInstaller}();Installers.NowPlayingInstaller=NowPlayingInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(Typescript){var Components;(function(Components){var MediaPlayer;(function(MediaPlayer){var ExtraMediaPlayer=function(){function ExtraMediaPlayer(extraPlayerModuleFactory,nowPlaying){this._extraPlayerModuleFactory=extraPlayerModuleFactory;this._nowPlaying=nowPlaying}return ExtraMediaPlayer.prototype.playStream=function(command){var module=this.getActiveModule();this.isNotNullOrUndefined(module)?(this.currentVO=module.getMediaDataVO(command.stem),module.getVideoPlayer().playStream(this.currentVO),this.updateStreamTextInformation(command)):console.log("could not play stream, as the extra player module has not been initialised")},ExtraMediaPlayer.prototype.playPaddockStream=function(command){var module=this.getActiveModule();this.currentVO=command.mediaDataVo;this.isNotNullOrUndefined(module)?(module.getVideoPlayer().playStream(this.currentVO),this.updateStreamTextInformation(command)):console.log("could not play stream, as the extra player module has not been initialised")},ExtraMediaPlayer.prototype.getActiveModule=function(){return this._extraPlayerModuleFactory.retriveExtraPlayerModule()},ExtraMediaPlayer.prototype.isNotNullOrUndefined=function(value){return value!==null&&value!==undefined},ExtraMediaPlayer.prototype.updateStreamTextInformation=function(command){this._nowPlaying.updateDisplay(command.fixtureName,command.fixtureStartTime,command.classificationName)},ExtraMediaPlayer}();MediaPlayer.ExtraMediaPlayer=ExtraMediaPlayer})(MediaPlayer=Components.MediaPlayer||(Components.MediaPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var MediaPlayer;(function(MediaPlayer){var ModuleContainerFactory=function(){function ModuleContainerFactory(abstractFactory){this._abstractFactory=abstractFactory}return ModuleContainerFactory.prototype.createModuleContainer=function(){return this._abstractFactory.createInstance("mediaPlayerCoreModule")},ModuleContainerFactory}();MediaPlayer.ModuleContainerFactory=ModuleContainerFactory})(MediaPlayer=Components.MediaPlayer||(Components.MediaPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var MediaPlayer;(function(MediaPlayer){var ExtraPlayerModuleFactory=function(){function ExtraPlayerModuleFactory(){}return ExtraPlayerModuleFactory.prototype.createExtraPlayerModule=function(onModuleLoadCallback){var _this=this;this.module&&onModuleLoadCallback(this.module);window.newExtraPlayer(function(module){_this.module=module;onModuleLoadCallback(_this.module)})},ExtraPlayerModuleFactory.prototype.retriveExtraPlayerModule=function(){if(!this.module){console.log("ExtraPlayerModule not initalised");throw new Error("ExtraPlayerModule not initalised");}return this.module},ExtraPlayerModuleFactory}();MediaPlayer.ExtraPlayerModuleFactory=ExtraPlayerModuleFactory})(MediaPlayer=Components.MediaPlayer||(Components.MediaPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(IoC){var Installers;(function(Installers){var MediaPlayerInstaller=function(){function MediaPlayerInstaller(){}return MediaPlayerInstaller.prototype.install=function(container){container.register(IoC.Component.named("extraMediaPlayer").componentType(Typescript.Components.MediaPlayer.ExtraMediaPlayer).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("moduleFactory").componentType(Typescript.Components.MediaPlayer.ModuleContainerFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("extraPlayerModuleFactory").componentType(Typescript.Components.MediaPlayer.ExtraPlayerModuleFactory).withLifestyle(IoC.Lifestyle.Singleton))},MediaPlayerInstaller}();Installers.MediaPlayerInstaller=MediaPlayerInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(Typescript){var Specifications;(function(Specifications){var Specification=function(){function Specification(){}return Specification.prototype.and=function(specification){return new Specifications.AndSpecification(this,specification)},Specification.prototype.or=function(specification){return new Specifications.OrSpecification(this,specification)},Specification.prototype.not=function(){return new Specifications.NotSpecification(this)},Specification}();Specifications.Specification=Specification})(Specifications=Typescript.Specifications||(Typescript.Specifications={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var Specifications;(function(Specifications){var Specification=Typescript.Specifications.Specification,NotNull=function(_super){function NotNull(){return _super!==null&&_super.apply(this,arguments)||this}return __extends(NotNull,_super),NotNull.prototype.isSatisfiedBy=function(candidate){return candidate!==undefined&&candidate!==null},NotNull}(Specification);Specifications.NotNull=NotNull})(Specifications=StreamingPlayer.Specifications||(StreamingPlayer.Specifications={}))})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var Specifications;(function(Specifications){var Specification=Typescript.Specifications.Specification,UserIsLoggedIn=function(_super){function UserIsLoggedIn(){return _super!==null&&_super.apply(this,arguments)||this}return __extends(UserIsLoggedIn,_super),UserIsLoggedIn.prototype.isSatisfiedBy=function(candidate){return candidate.userIsLoggedIn},UserIsLoggedIn}(Specification);Specifications.UserIsLoggedIn=UserIsLoggedIn})(Specifications=StreamingPlayer.Specifications||(StreamingPlayer.Specifications={}))})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var Specifications;(function(Specifications){var Specification=Typescript.Specifications.Specification,UsersAccountIsFunded=function(_super){function UsersAccountIsFunded(){return _super!==null&&_super.apply(this,arguments)||this}return __extends(UsersAccountIsFunded,_super),UsersAccountIsFunded.prototype.isSatisfiedBy=function(candidate){return candidate.usersAccountIsFunded},UsersAccountIsFunded}(Specification);Specifications.UsersAccountIsFunded=UsersAccountIsFunded})(Specifications=StreamingPlayer.Specifications||(StreamingPlayer.Specifications={}))})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var Specifications;(function(Specifications){var Specification=Typescript.Specifications.Specification,MobilePlatformUser=function(_super){function MobilePlatformUser(){return _super!==null&&_super.apply(this,arguments)||this}return __extends(MobilePlatformUser,_super),MobilePlatformUser.prototype.isSatisfiedBy=function(candidate){return candidate.userIsOnMobilePlatform},MobilePlatformUser}(Specification);Specifications.MobilePlatformUser=MobilePlatformUser})(Specifications=StreamingPlayer.Specifications||(StreamingPlayer.Specifications={}))})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var Specifications;(function(Specifications){var Specification=Typescript.Specifications.Specification,EmbedPlayerSpecification=function(_super){function EmbedPlayerSpecification(){return _super!==null&&_super.apply(this,arguments)||this}return __extends(EmbedPlayerSpecification,_super),EmbedPlayerSpecification.prototype.isSatisfiedBy=function(candidate){return(new Specifications.NotNull).and(new Specifications.UserIsLoggedIn).and(new Specifications.UsersAccountIsFunded).and((new Specifications.MobilePlatformUser).not()).isSatisfiedBy(candidate)},EmbedPlayerSpecification}(Specification);Specifications.EmbedPlayerSpecification=EmbedPlayerSpecification})(Specifications=StreamingPlayer.Specifications||(StreamingPlayer.Specifications={}))})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var Specifications;(function(Specifications){var Specification=Typescript.Specifications.Specification,LoggedInUnfundedSpecification=function(_super){function LoggedInUnfundedSpecification(){return _super!==null&&_super.apply(this,arguments)||this}return __extends(LoggedInUnfundedSpecification,_super),LoggedInUnfundedSpecification.prototype.isSatisfiedBy=function(candidate){return(new Specifications.NotNull).and(new Specifications.UserIsLoggedIn).and((new Specifications.UsersAccountIsFunded).not()).and((new Specifications.MobilePlatformUser).not()).isSatisfiedBy(candidate)},LoggedInUnfundedSpecification}(Specification);Specifications.LoggedInUnfundedSpecification=LoggedInUnfundedSpecification})(Specifications=StreamingPlayer.Specifications||(StreamingPlayer.Specifications={}))})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var Specifications;(function(Specifications){var Specification=Typescript.Specifications.Specification,MobileUserLoggedInUnfundedSpecification=function(_super){function MobileUserLoggedInUnfundedSpecification(){return _super!==null&&_super.apply(this,arguments)||this}return __extends(MobileUserLoggedInUnfundedSpecification,_super),MobileUserLoggedInUnfundedSpecification.prototype.isSatisfiedBy=function(candidate){return(new Specifications.NotNull).and(new Specifications.UserIsLoggedIn).and((new Specifications.UsersAccountIsFunded).not()).and(new Specifications.MobilePlatformUser).isSatisfiedBy(candidate)},MobileUserLoggedInUnfundedSpecification}(Specification);Specifications.MobileUserLoggedInUnfundedSpecification=MobileUserLoggedInUnfundedSpecification})(Specifications=StreamingPlayer.Specifications||(StreamingPlayer.Specifications={}))})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var Specifications;(function(Specifications){var Specification=Typescript.Specifications.Specification,MobileUserLoggedInSpecification=function(_super){function MobileUserLoggedInSpecification(){return _super!==null&&_super.apply(this,arguments)||this}return __extends(MobileUserLoggedInSpecification,_super),MobileUserLoggedInSpecification.prototype.isSatisfiedBy=function(candidate){return(new Specifications.NotNull).and(new Specifications.UserIsLoggedIn).and(new Specifications.UsersAccountIsFunded).and(new Specifications.MobilePlatformUser).isSatisfiedBy(candidate)},MobileUserLoggedInSpecification}(Specification);Specifications.MobileUserLoggedInSpecification=MobileUserLoggedInSpecification})(Specifications=StreamingPlayer.Specifications||(StreamingPlayer.Specifications={}))})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var Specifications;(function(Specifications){var Specification=Typescript.Specifications.Specification,LoggedOutSpecification=function(_super){function LoggedOutSpecification(){return _super!==null&&_super.apply(this,arguments)||this}return __extends(LoggedOutSpecification,_super),LoggedOutSpecification.prototype.isSatisfiedBy=function(candidate){return(new Specifications.NotNull).and((new Specifications.UserIsLoggedIn).not()).isSatisfiedBy(candidate)},LoggedOutSpecification}(Specification);Specifications.LoggedOutSpecification=LoggedOutSpecification})(Specifications=StreamingPlayer.Specifications||(StreamingPlayer.Specifications={}))})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var EmbedPlayerSpecification=StreamingPlayer.Specifications.EmbedPlayerSpecification,LoggedInUnfundedSpecification=StreamingPlayer.Specifications.LoggedInUnfundedSpecification,StreamingPlayerInitialiser=function(){function StreamingPlayerInitialiser(streamingPlayerSettingsFactory,embedPlayerCommandFactory,streamingPlayerViewModelFactory,setPlayerImagesCommand,jqueryObjectFactory,playerBackdropImageFactory,clearStreamAvailabilityAndPlayStreamNotifications,extraPlayerModuleFactory,windowQueries){this.streamingPlayerSettingsFactory=streamingPlayerSettingsFactory;this.embedPlayerCommandFactory=embedPlayerCommandFactory;this.streamingPlayerViewModelFactory=streamingPlayerViewModelFactory;this.setPlayerImagesCommand=setPlayerImagesCommand;this.jqueryObjectFactory=jqueryObjectFactory;this.playerBackdropImageFactory=playerBackdropImageFactory;this.clearStreamAvailabilityAndPlayStreamNotifications=clearStreamAvailabilityAndPlayStreamNotifications;this.extraPlayerModuleFactory=extraPlayerModuleFactory;this.windowQueries=windowQueries;this._small=!1}return StreamingPlayerInitialiser.prototype.initialise=function(selectors){var _this=this;this.jqueryObjectFactory.createObjectForSelector(selectors.settings).length>0&&(this._settings=this.streamingPlayerSettingsFactory.createSettings(selectors.settings),this._viewModel=this.streamingPlayerViewModelFactory.createViewModel(selectors.playerBackdrop),this._placeholder=this.jqueryObjectFactory.createObjectForSelector(selectors.playerPlaceHolder),this._player=this.jqueryObjectFactory.createObjectForSelector(selectors.player),this._closeStandAlone=this.jqueryObjectFactory.createObjectForSelector(selectors.closeStandalone),(new EmbedPlayerSpecification).isSatisfiedBy(this._settings)?this.loadExtraPlayer(selectors.playerWrapper,selectors.playerBackdrop):(new LoggedInUnfundedSpecification).isSatisfiedBy(this._settings)?(this.jqueryObjectFactory.createObjectForSelector(selectors.player).hide(),this.loadStaticImage()):this.jqueryObjectFactory.createObjectForSelector(selectors.playerWrapper).css("display","table"),window.onresize=function(){_this._small&&window.resizeTo(_this.calculateNewWindowWidth(window),_this.calculateNewWindowHeight(window))})},StreamingPlayerInitialiser.prototype.embedPlayer=function(){var _this=this;(new EmbedPlayerSpecification).isSatisfiedBy(this._settings)&&this._embedCommand.loadPlayerModule(function(){_this.setPlayerImagesCommand.setPlayerImages(_this._settings.streamingPlayerImages);_this.clearStreamAvailabilityAndPlayStreamNotifications.clear();var module=_this.getActiveModule();module.setStandaloneDelegate(new ns_gen5_util.Delegate(_this,function(){return _this.standalone()}));module.documentChanged(!1)})},StreamingPlayerInitialiser.prototype.setupMininumStakeInformation=function(){Locator.user.horseStreamingMinimumSinglesStake=this._settings.minimumStakeWin;Locator.user.horseStreamingMinimumEachWayStake=this._settings.minimumStakeEachWay},StreamingPlayerInitialiser.prototype.loadExtraPlayer=function(playerWrapperSelector,playerBackdropSelector){this.setupMininumStakeInformation();this._embedCommand=this.embedPlayerCommandFactory.createEmbedCommand(playerWrapperSelector,playerBackdropSelector)},StreamingPlayerInitialiser.prototype.loadStaticImage=function(){this._viewModel.displayImageInPlayerBackdrop(this.playerBackdropImageFactory.getPlayerBackdropImage(this._settings))},StreamingPlayerInitialiser.prototype.standalone=function(){var module=this.getActiveModule();this.windowQueries.opener()?(this._small?this.showAll():this.hideAll(),module.documentChanged(!1)):this._popoutWindow?this._popoutWindow.close():(this.popout(),module.documentChanged(!0))},StreamingPlayerInitialiser.prototype.hideAll=function(){this._small=!0;this.jqueryObjectFactory.createObjectForSelector(".body_wrapper").append(this._player);this.jqueryObjectFactory.createObjectForSelector("#StreamingPage").hide();this._originalWidth=window.outerWidth;this._originalHeight=window.outerHeight;window.resizeTo(this.calculateNewWindowWidth(window),this.calculateNewWindowHeight(window))},StreamingPlayerInitialiser.prototype.showAll=function(){this._small=!1;window.resizeTo(this._originalWidth,this._originalHeight);this.jqueryObjectFactory.createObjectForSelector("#StreamingPage").show();this._placeholder[0].appendChild(this._player[0])},StreamingPlayerInitialiser.prototype.calculateNewWindowHeight=function(win){return win.outerHeight-win.innerHeight+320},StreamingPlayerInitialiser.prototype.calculateNewWindowWidth=function(win){return win.outerWidth-win.innerWidth+475},StreamingPlayerInitialiser.prototype.getActiveModule=function(){return this.extraPlayerModuleFactory.retriveExtraPlayerModule()},StreamingPlayerInitialiser.prototype.popout=function(){var _this=this,win=this._popoutWindow=window.open("about:blank","ExtraPlayerPopout","height=335,width=500,top=30,left=30"),interval,template,headChildren,i,element,betnow;for(setTimeout(function(){win.onresize=function(){win.resizeTo(_this.calculateNewWindowWidth(win),_this.calculateNewWindowHeight(win))}},500),interval=setInterval(function(){win.closed&&(clearInterval(interval),_this.closePopout())},200),window.onbeforeunload=function(){_this._popoutWindow&&_this._popoutWindow.close()},template=document.getElementById("popouttemplate"),win.document.write("<html>"+template.outerHTML+"<\/html>"),headChildren=document.head.childNodes,i=0;i<headChildren.length;i++)win.document.head.children[i]=headChildren[i];win.document.body.style.overflow="hidden";element=win.document.getElementById("popouttemplate");element.style.display="";element.appendChild(this._player[0]);this._closeStandAlone.show();betnow=win.document.getElementById("streaming-now-playing").getElementsByTagName("a")[0];betnow.onclick=function(evt){evt.preventDefault();win.close();bet365.navigation.ParentWindow(betnow.href)}},StreamingPlayerInitialiser.prototype.closePopout=function(){this._popoutWindow=null;this._closeStandAlone.hide();this._placeholder[0].appendChild(this._player[0]);var module=this.getActiveModule();module.documentChanged(!0)},StreamingPlayerInitialiser}();StreamingPlayer.StreamingPlayerInitialiser=StreamingPlayerInitialiser})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var StreamingPlayerSettings=function(){function StreamingPlayerSettings(streamingPlayerScriptLocation,userIsLoggedIn,userIsOnMobilePlatform,usersAccountIsFunded,streamingPlayerImages,minimumStakeWin,minimumStakeEachWay){this.streamingPlayerScriptLocation=streamingPlayerScriptLocation;this.userIsLoggedIn=userIsLoggedIn;this.userIsOnMobilePlatform=userIsOnMobilePlatform;this.usersAccountIsFunded=usersAccountIsFunded;this.streamingPlayerImages=streamingPlayerImages;this.minimumStakeWin=minimumStakeWin;this.minimumStakeEachWay=minimumStakeEachWay}return StreamingPlayerSettings}();StreamingPlayer.StreamingPlayerSettings=StreamingPlayerSettings})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var StreamingPlayerSettingsFactory=function(){function StreamingPlayerSettingsFactory(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return StreamingPlayerSettingsFactory.prototype.createSettings=function(selector){var jqueryObject=this._jqueryObjectFactory.createObjectForSelector(selector),streamingPlayerScriptLocation=jqueryObject.data("player-src"),userIsLoggedIn=jqueryObject.data("logged-in").toLowerCase()==="true",userIsOnMobilePlatform=jqueryObject.data("user-on-mobile-platform").toLowerCase()==="true",usersAccountIsFunded=jqueryObject.data("user-account-funded").toLowerCase()==="true",playerImages=jqueryObject.data("player-images"),dataMinimumStakeEachWay=jqueryObject.data("minimum-stake-each-way"),dataMinimumStakeWin=jqueryObject.data("minimum-stake-win");return new StreamingPlayer.StreamingPlayerSettings(streamingPlayerScriptLocation,userIsLoggedIn,userIsOnMobilePlatform,usersAccountIsFunded,playerImages,dataMinimumStakeWin,dataMinimumStakeEachWay)},StreamingPlayerSettingsFactory}();StreamingPlayer.StreamingPlayerSettingsFactory=StreamingPlayerSettingsFactory})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var StreamingPlayerViewModel=function(){function StreamingPlayerViewModel(playerBackdropJQueryObject,imageJQueryObject){this._playerBackdropJQueryObject=playerBackdropJQueryObject;this._imageJQueryObject=imageJQueryObject}return StreamingPlayerViewModel.prototype.displayImageInPlayerBackdrop=function(imageSrc){this._imageJQueryObject.attr("src",imageSrc);this._playerBackdropJQueryObject.show();this._playerBackdropJQueryObject.append(this._imageJQueryObject);this._imageJQueryObject.fadeIn(1e3)},StreamingPlayerViewModel}();StreamingPlayer.StreamingPlayerViewModel=StreamingPlayerViewModel})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var StreamingPlayerViewModelFactory=function(){function StreamingPlayerViewModelFactory(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return StreamingPlayerViewModelFactory.prototype.createViewModel=function(playerBackdropSelector){var playerBackdropJQueryObject=this._jqueryObjectFactory.createObjectForSelector(playerBackdropSelector);return new StreamingPlayer.StreamingPlayerViewModel(playerBackdropJQueryObject,this.createAndSetupImage())},StreamingPlayerViewModelFactory.prototype.createAndSetupImage=function(){var imageObject=this._jqueryObjectFactory.createObjectForElement(document.createElement("img"));return imageObject.hide(),imageObject.css("width","100%"),imageObject.css("height","100%"),imageObject},StreamingPlayerViewModelFactory}();StreamingPlayer.StreamingPlayerViewModelFactory=StreamingPlayerViewModelFactory})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var EmbedPlayerCommand=function(){function EmbedPlayerCommand(playerWrapperJQueryObject,playerBackdropJQueryObject,extraPlayerModuleFactory){this.playerWrapperJQueryObject=playerWrapperJQueryObject;this.playerBackdropJQueryObject=playerBackdropJQueryObject;this.extraPlayerModuleFactory=extraPlayerModuleFactory}return EmbedPlayerCommand.prototype.loadPlayerModule=function(onModuleLoadCallback){var _this=this;this.extraPlayerModuleFactory.createExtraPlayerModule(function(module){onModuleLoadCallback();_this.playerWrapperJQueryObject.children().first().append(module.getElement())});this.playerBackdropJQueryObject.hide();this.playerWrapperJQueryObject.css("display","table")},EmbedPlayerCommand}();StreamingPlayer.EmbedPlayerCommand=EmbedPlayerCommand})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var EmbedPlayerCommandFactory=function(){function EmbedPlayerCommandFactory(jqueryObjectFactory,extraPlayerModuleFactory){this.jqueryObjectFactory=jqueryObjectFactory;this.extraPlayerModuleFactory=extraPlayerModuleFactory}return EmbedPlayerCommandFactory.prototype.createEmbedCommand=function(wrapperSelector,playerBackdropSelector){return new StreamingPlayer.EmbedPlayerCommand(this.jqueryObjectFactory.createObjectForSelector(wrapperSelector),this.jqueryObjectFactory.createObjectForSelector(playerBackdropSelector),this.extraPlayerModuleFactory)},EmbedPlayerCommandFactory}();StreamingPlayer.EmbedPlayerCommandFactory=EmbedPlayerCommandFactory})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var SetPlayerImagesCommand=function(){function SetPlayerImagesCommand(extraPlayerModuleFactory,streamingPlayerImagesAdapter){this._extraPlayerModuleFactory=extraPlayerModuleFactory;this._streamingPlayerImagesAdapter=streamingPlayerImagesAdapter}return SetPlayerImagesCommand.prototype.setPlayerImages=function(streamingPlayerImages){var result=this._extraPlayerModuleFactory.retriveExtraPlayerModule().setBackgroundImageProperties(this._streamingPlayerImagesAdapter.adapt(streamingPlayerImages));result||console.log("unable to set background properties")},SetPlayerImagesCommand}();StreamingPlayer.SetPlayerImagesCommand=SetPlayerImagesCommand})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var StreamingPlayerImagesAdapter=function(){function StreamingPlayerImagesAdapter(){}return StreamingPlayerImagesAdapter.prototype.adapt=function(streamingPlayerImages){return{noBetBackground:streamingPlayerImages.loggedInUnfundedAccountImage,noStreamBackground:streamingPlayerImages.loggedInNoStreamsAvailableImage,horseRacingBetBackground:streamingPlayerImages.loggedInMinimumBetNotMetImage}},StreamingPlayerImagesAdapter}();StreamingPlayer.StreamingPlayerImagesAdapter=StreamingPlayerImagesAdapter})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var ScriptLoader;(function(ScriptLoader_1){var ScriptLoader=function(){function ScriptLoader(documentFactory){this._documentFactory=documentFactory}return ScriptLoader.prototype.loadScript=function(scriptLocation){var doc=this._documentFactory.createDocument(),body=doc.body,element=doc.createElement("script");element.async=!0;element.src=scriptLocation;body.appendChild(element)},ScriptLoader}();ScriptLoader_1.ScriptLoader=ScriptLoader})(ScriptLoader=Components.ScriptLoader||(Components.ScriptLoader={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StreamingPlayer;(function(StreamingPlayer){var LoggedInUnfundedSpecification=StreamingPlayer.Specifications.LoggedInUnfundedSpecification,PlayerBackdropImageFactory=function(){function PlayerBackdropImageFactory(){}return PlayerBackdropImageFactory.prototype.getPlayerBackdropImage=function(settings){switch(!0){case(new LoggedInUnfundedSpecification).isSatisfiedBy(settings):return settings.streamingPlayerImages.loggedInUnfundedAccountImage}return""},PlayerBackdropImageFactory}();StreamingPlayer.PlayerBackdropImageFactory=PlayerBackdropImageFactory})(StreamingPlayer=Components.StreamingPlayer||(Components.StreamingPlayer={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(IoC){var Installers;(function(Installers){var StreamingPlayerInitialiserInstaller=function(){function StreamingPlayerInitialiserInstaller(){}return StreamingPlayerInitialiserInstaller.prototype.install=function(container){container.register(IoC.Component.named("streamingPlayerInitialiser").componentType(Typescript.Components.StreamingPlayer.StreamingPlayerInitialiser).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("streamingPlayerSettingsFactory").componentType(Typescript.Components.StreamingPlayer.StreamingPlayerSettingsFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("streamingPlayerViewModelFactory").componentType(Typescript.Components.StreamingPlayer.StreamingPlayerViewModelFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("embedPlayerCommandFactory").componentType(Typescript.Components.StreamingPlayer.EmbedPlayerCommandFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("setPlayerImagesCommand").componentType(Typescript.Components.StreamingPlayer.SetPlayerImagesCommand).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("streamingPlayerImagesAdapter").componentType(Typescript.Components.StreamingPlayer.StreamingPlayerImagesAdapter).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("scriptLoader").componentType(Typescript.Components.ScriptLoader.ScriptLoader).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("playerBackdropImageFactory").componentType(Typescript.Components.StreamingPlayer.PlayerBackdropImageFactory).withLifestyle(IoC.Lifestyle.Singleton))},StreamingPlayerInitialiserInstaller}();Installers.StreamingPlayerInitialiserInstaller=StreamingPlayerInitialiserInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(Typescript){var Components;(function(Components){var ToggleClass;(function(ToggleClass){var InitialiseForSelector=Typescript.Application.InitialiseForSelector,ToggleClassOnClick=function(_super){function ToggleClassOnClick(domQuery,jqueryObjectFactory){var _this=_super.call(this,domQuery)||this;return _this._jqueryObjectFactory=jqueryObjectFactory,_this}return __extends(ToggleClassOnClick,_super),ToggleClassOnClick.prototype.initialise=function(onClickSelector,classToggleTargetSelector,cssClassToToggle){if(this.elementExists(onClickSelector)&&this.elementExists(classToggleTargetSelector)){var onClickObject=this._jqueryObjectFactory.createObjectForSelector(onClickSelector),classToggleTarget=this._jqueryObjectFactory.createObjectForSelector(classToggleTargetSelector);onClickObject.click(function(){return classToggleTarget.toggleClass(cssClassToToggle)})}},ToggleClassOnClick}(InitialiseForSelector);ToggleClass.ToggleClassOnClick=ToggleClassOnClick})(ToggleClass=Components.ToggleClass||(Components.ToggleClass={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(IoC){var Installers;(function(Installers){var ToggleClassInstaller=function(){function ToggleClassInstaller(){}return ToggleClassInstaller.prototype.install=function(container){container.register(IoC.Component.named("toggleClassOnClick").componentType(Typescript.Components.ToggleClass.ToggleClassOnClick).withLifestyle(IoC.Lifestyle.Singleton))},ToggleClassInstaller}();Installers.ToggleClassInstaller=ToggleClassInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(Typescript){var Components;(function(Components){var NavigationBar;(function(NavigationBar_1){var NavigationBar=function(){function NavigationBar(navBarViewModel){this._navBarViewModel=navBarViewModel}return NavigationBar.prototype.initialiseForSelector=function(selector){this._navBarViewModel.sportsMoreButtonExists(selector)?(this.setUpAllSportsPosition(),this.setUpEvents(),this.setUpCategoryMenus()):this._navBarViewModel.hideSportsMoreButton()},NavigationBar.prototype.setUpEvents=function(){var _this=this;this._navBarViewModel.sportsMoreButton().click(function(){_this._navBarViewModel.toggleDropDownMenu()});this._navBarViewModel.setResizeEvent(function(){_this.setUpAllSportsPosition();_this.setUpCategoryMenus()});this._navBarViewModel.body().on("click",function(e){_this._navBarViewModel.isElementPartOfDropDownList(e.target)||(_this._navBarViewModel.hideDropDownMenu(),_this._navBarViewModel.closeSportsMenu())})},NavigationBar.prototype.setUpCategoryMenus=function(){var itemsInDropDownMenus,hiddenItems;if(this._navBarViewModel.categoryDropDownIsRequired())itemsInDropDownMenus=this._navBarViewModel.getNavBarElementsInDropDownMenu(),itemsInDropDownMenus.length&&this._navBarViewModel.appendDropDownMenuElementsBackToNavBar(itemsInDropDownMenus),hiddenItems=this._navBarViewModel.getInvisibleNavBarElements(),hiddenItems.length?(this._navBarViewModel.showSportsMoreButton(),this._navBarViewModel.appendNavElementsToDropDownMenu(hiddenItems)):this._navBarViewModel.hideSportsMoreButton();else{this._navBarViewModel.hideSportsMoreButton();return}},NavigationBar.prototype.setUpAllSportsPosition=function(){this._navBarViewModel.setAllSportsButtonPositionIfRequired()},NavigationBar}();NavigationBar_1.NavigationBar=NavigationBar})(NavigationBar=Components.NavigationBar||(Components.NavigationBar={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var NavigationBar;(function(NavigationBar){var NavBarViewModel=function(){function NavBarViewModel(jqueryObjectFactory){this._sportsMoreButtonSelector="";this._minWidth=768;this._jqueryObjectFactory=jqueryObjectFactory}return NavBarViewModel.prototype.moreCategoriesDropDown=function(){return this._jqueryObjectFactory.createObjectForSelector(".moreCategoriesDropDown")},NavBarViewModel.prototype.moreCategoriesDropDownUnorderedList=function(){return this._jqueryObjectFactory.createObjectForSelector(".moreCategoriesDropDown ul")},NavBarViewModel.prototype.mainCategoriesList=function(){return this._jqueryObjectFactory.createObjectForSelector(".categoryListContainer .hideItems")},NavBarViewModel.prototype.windowInnerWidth=function(){return Number(this._jqueryObjectFactory.createObjectForCurrentWindow().attr("innerWidth")||this._jqueryObjectFactory.createObjectForCurrentWindow().width())},NavBarViewModel.prototype.languageSelectorSubHeaderWidth=function(){return this._jqueryObjectFactory.createObjectForSelector(".LanguageSelectorSubHeader").width()},NavBarViewModel.prototype.allSportsButtonRequiresRepositioning=function(initialValue){return this.languageSelectorSubHeaderWidth()>initialValue},NavBarViewModel.prototype.sportsMenu=function(){return this._jqueryObjectFactory.createObjectForSelector("#sports-menu")},NavBarViewModel.prototype.sportsMoreButtonExists=function(selector){return this._sportsMoreButtonSelector=selector,this._jqueryObjectFactory.createObjectForSelector(selector).length>0},NavBarViewModel.prototype.sportsMoreButton=function(){return this._jqueryObjectFactory.createObjectForSelector(this._sportsMoreButtonSelector)},NavBarViewModel.prototype.showSportsMoreButton=function(){this.sportsMoreButton().addClass("moreSportsShow")},NavBarViewModel.prototype.hideSportsMoreButton=function(){this.sportsMoreButton().removeClass("moreSportsShow")},NavBarViewModel.prototype.setResizeEvent=function(f){this._jqueryObjectFactory.createObjectForCurrentWindow().resize(function(){return f()})},NavBarViewModel.prototype.toggleDropDownMenu=function(){this.moreCategoriesDropDown().toggle();this.sportsMenu().toggleClass("open")},NavBarViewModel.prototype.hideDropDownMenu=function(){this.moreCategoriesDropDown().hide();this.sportsMenu().toggleClass("open")},NavBarViewModel.prototype.categoryListContainer=function(){return this._jqueryObjectFactory.createObjectForSelector(".categoryListContainer")},NavBarViewModel.prototype.getNavBarElementsInDropDownMenu=function(){return this.moreCategoriesDropDownUnorderedList().find("li")},NavBarViewModel.prototype.body=function(){return this._jqueryObjectFactory.createObjectForSelector("body")},NavBarViewModel.prototype.getInvisibleNavBarElements=function(){var _this=this,computedWidth=0,totalWidth=this.categoryListContainer().outerWidth(),invisibleItems=[];return this._jqueryObjectFactory.createObjectForSelector(".hideItems li a").each(function(i,item){computedWidth=computedWidth+_this._jqueryObjectFactory.createObjectForElement(item).outerWidth();computedWidth>totalWidth&&invisibleItems.push(_this._jqueryObjectFactory.createObjectForElement(item).parent().get(0))}),this._jqueryObjectFactory.createObjectForArrayOfElements(invisibleItems).map(function(i,item){return _this._jqueryObjectFactory.createObjectForElement(item).toArray()})},NavBarViewModel.prototype.appendNavElementsToDropDownMenu=function(elements){this.moreCategoriesDropDownUnorderedList().append(elements)},NavBarViewModel.prototype.appendDropDownMenuElementsBackToNavBar=function(elements){this.mainCategoriesList().append(elements)},NavBarViewModel.prototype.getElementOuterWidth=function(element){return element.outerWidth()},NavBarViewModel.prototype.appendParentElementToTarget=function(element,target){var parentElement=element.parent();parentElement.appendTo(target)},NavBarViewModel.prototype.isElementPartOfDropDownList=function(e){return this._jqueryObjectFactory.createObjectForElement(e).parents(".moreCategoriesDropDown").length>0||this._jqueryObjectFactory.createObjectForElement(e).attr("id")==="sports-more"},NavBarViewModel.prototype.categoryDropDownIsRequired=function(){return this.windowInnerWidth()>this._minWidth},NavBarViewModel.prototype.closeSportsMenu=function(){this.sportsMenu().removeClass("open")},NavBarViewModel.prototype.setAllSportsButtonPositionIfRequired=function(){var initialSubHeaderValue=40;if(this.allSportsButtonRequiresRepositioning(initialSubHeaderValue)&&this.categoryDropDownIsRequired()){var languageSelectorSubHeaderWidth=this.languageSelectorSubHeaderWidth(),additionalWidth=languageSelectorSubHeaderWidth-initialSubHeaderValue,newSportsMenuPaddingRight=200+additionalWidth,newSportsButtonMarginRight=82+additionalWidth,newMoreCategoriesRight=80+additionalWidth;this.sportsMenu().css("padding-right",newSportsMenuPaddingRight);this.sportsMoreButton().css("margin-right",newSportsButtonMarginRight);this.moreCategoriesDropDown().css("right",newMoreCategoriesRight)}},NavBarViewModel}();NavigationBar.NavBarViewModel=NavBarViewModel})(NavigationBar=Components.NavigationBar||(Components.NavigationBar={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(IoC){var Installers;(function(Installers){var NavigationBarInstaller=function(){function NavigationBarInstaller(){}return NavigationBarInstaller.prototype.install=function(container){container.register(IoC.Component.named("navigationBar").componentType(Typescript.Components.NavigationBar.NavigationBar).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("navBarViewModel").componentType(Typescript.Components.NavigationBar.NavBarViewModel).withLifestyle(IoC.Lifestyle.Transient))},NavigationBarInstaller}();Installers.NavigationBarInstaller=NavigationBarInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(Typescript){var Application;(function(Application){var DocumentReady=Application.Initialisers.DocumentReadyInitialiser,Extra=function(){function Extra(){this.initialiseAllComponents()}return Extra.start=function(){return new Extra},Extra.prototype.application=function(){return this._application},Extra.prototype.initialiseAllComponents=function(){this._application=IoC.Container.bootstrap().install(new IoC.Installers.ApplicationInstaller).install(new IoC.Installers.HandlebarHelpersInstaller).install(new IoC.Installers.FactoriesInstaller).install(new IoC.Installers.AccordionInstaller).install(new IoC.Installers.TabbedLayoutInstaller).install(new IoC.Installers.StreamingEventsInstaller).install(new IoC.Installers.LoginInstaller).install(new IoC.Installers.LiveNowPodInstaller).install(new IoC.Installers.ResultsSearchControlInstaller).install(new IoC.Installers.InactivityWarningInstaller).install(new IoC.Installers.LanguageSelectorInstaller).install(new IoC.Installers.SportBarInstaller).install(new IoC.Installers.NowPlayingInstaller).install(new IoC.Installers.MediaPlayerInstaller).install(new IoC.Installers.NavigationBarInstaller).install(new IoC.Installers.StreamingPlayerInitialiserInstaller).install(new IoC.Installers.ToggleClassInstaller).resolve("application");this._application.initialise(new DocumentReady(function(a){a.initialiseForSelector("#StreamingPage div.owl-item a")}),"tabbedLayout").initialise(new DocumentReady(function(a){a.initialiseForSelector("#streaming-now-playing")}),"nowPlaying").initialise(new DocumentReady(function(a){a.initialiseForSelector("#streaming-events-coming-up")}),"streamingEventsComingUp").initialise(new DocumentReady(function(a){a.initialiseForSelector("#sportsLiveNowPod")}),"sportsLiveNowPodInitialiser").initialise(new DocumentReady(function(a){a.initialiseForSelector(".classificationDropdown > a","#sportsLiveNowPod")}),"sportBar").initialise(new DocumentReady(function(a){a.initialiseForSelector(".results-SearchFilterContainer")}),"resultsSearchControl").initialise(new DocumentReady(function(a){a.initialiseForSelector("[data-component-type='LoginModal']")}),"loginModal").initialise(new DocumentReady(function(a){a.initialise("body")}),"logoutEventHandlingService").initialise(new DocumentReady(function(a){a.initialiseForSelector("div.realitycheck")}),"realityCheckModal").initialise(new DocumentReady(function(a){a.initialiseForSelector("[data-component-type='MembersFrame']")}),"membersFrame").initialise(new DocumentReady(function(a){a.initialiseForSelector(".LanguageSelector")}),"languageSelector").initialise(new DocumentReady(function(a){a.initialiseForSelector("[data-component-type='KycSecondaryAuthMobile'][data-fireevent='True']")}),"kycSecondaryAuthMobile").initialise(new DocumentReady(function(a){a.initialiseForSelector("[data-component-type='InactivityWarning']")}),"inactivityWarning").initialise(new DocumentReady(function(a){a.initialiseForSelector("[data-component-type='PostMessageReceiver'],.lostLoginLink")}),"postMessageReceiver").initialise(new DocumentReady(function(a){a.initialiseForSelector(".results-SearchFilterContainer")}),"resultsSearchControl").initialise(new DocumentReady(function(a){a.initialiseForSelector("#StreamingPage .tabs .faqs-tab")}),"faqsPodInitialiser").initialise(new DocumentReady(function(a){a.initialise({settings:"div.live-streaming",player:".player",playerWrapper:".player .playerwrapper",playerBackdrop:".player-backdrop",playerPlaceHolder:".playerPlaceHolder",closeStandalone:".close-standalone",streamingParent:"#StreamingPage"})}),"streamingPlayerInitialiser").initialise(new DocumentReady(function(a){a.embedPlayer()}),"streamingPlayerInitialiser").initialise(new DocumentReady(function(a){a.initialise("#logged-in-container div.username-container","#logged-in-container div.dropdown-container","show")}),"toggleClassOnClick").initialise(new DocumentReady(function(a){a.initialiseForSelector("[data-component-type='MobileLoggedInOverlay']")}),"mobileLoggedInOverlay").initialise(new DocumentReady(function(a){a.initialiseForSelector("#sports-more")}),"navigationBar")},Extra}();Application.Extra=Extra})(Application=Typescript.Application||(Typescript.Application={}))}(Typescript||(Typescript={})),function(Typescript){var Application;(function(Application){var Initialisers;(function(Initialisers){var WindowReadyInitialiser=function(_super){function WindowReadyInitialiser(action){return _super.call(this,action)||this}return __extends(WindowReadyInitialiser,_super),WindowReadyInitialiser.prototype.addObservers=function(application){application.addWindowReadyObserver(this)},WindowReadyInitialiser.prototype.windowReady=function(){this.invokeAction()},WindowReadyInitialiser}(Initialisers.InitialiserBase);Initialisers.WindowReadyInitialiser=WindowReadyInitialiser})(Initialisers=Application.Initialisers||(Application.Initialisers={}))})(Application=Typescript.Application||(Typescript.Application={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LanguageSelector;(function(LanguageSelector_1){var LanguageSelector=function(){function LanguageSelector(languageSelectorViewModel){this._langaugeSelectorViewModel=languageSelectorViewModel}return LanguageSelector.prototype.initialiseForSelector=function(selector){var _this=this;if(this._langaugeSelectorViewModel.checkContentExists(selector)){this._languageSelector=this._langaugeSelectorViewModel.languageSelector();this._langaugeList=this._langaugeSelectorViewModel.languageList();this._langaugeSelectorLabel=this._langaugeSelectorViewModel.languageSelectorLabel();this._langaugeSelectorLabel.click(function(){_this._langaugeList.toggle();_this._languageSelector.toggleClass("open")});this._langaugeSelectorViewModel.body().on("click",function(e){_this._langaugeSelectorViewModel.isElementPartOfLanguageSelectorWrapper(e.target)||(_this._langaugeList.hide(),_this._languageSelector.removeClass("open"))})}},LanguageSelector}();LanguageSelector_1.LanguageSelector=LanguageSelector})(LanguageSelector=Components.LanguageSelector||(Components.LanguageSelector={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LanguageSelector;(function(LanguageSelector){var LanguageSelectorViewModel=function(){function LanguageSelectorViewModel(jqueryObjectFactory){this._jqueryObjectFactory=jqueryObjectFactory}return LanguageSelectorViewModel.prototype.languageSelector=function(){return this._jqueryObjectFactory.createObjectForSelector(".LanguageSelector")},LanguageSelectorViewModel.prototype.checkContentExists=function(selector){return this._jqueryObjectFactory.createObjectForSelector(selector).length>0},LanguageSelectorViewModel.prototype.languageList=function(){return this._jqueryObjectFactory.createObjectForSelector(".LanguageSelector dd ul")},LanguageSelectorViewModel.prototype.body=function(){return this._jqueryObjectFactory.createObjectForSelector("body")},LanguageSelectorViewModel.prototype.languageSelectorLabel=function(){return this._jqueryObjectFactory.createObjectForSelector(".LanguageSelector dt")},LanguageSelectorViewModel.prototype.isElementPartOfLanguageSelectorWrapper=function(e){return this._jqueryObjectFactory.createObjectForElement(e).parents(".LanguageSelectorWrapper").length>0},LanguageSelectorViewModel}();LanguageSelector.LanguageSelectorViewModel=LanguageSelectorViewModel})(LanguageSelector=Components.LanguageSelector||(Components.LanguageSelector={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var AllSportsButtonAndSelector;(function(AllSportsButtonAndSelector){var InitialiseForSelector=Typescript.Application.InitialiseForSelector,SportBar=function(_super){function SportBar(sportBarViewModelFactory,domQuery){var _this=_super.call(this,domQuery)||this;return _this._sportBarViewModelFactory=sportBarViewModelFactory,_this}return __extends(SportBar,_super),SportBar.prototype.initialiseForSelector=function(cssClass,selector){this.elementExists(selector)&&(this._vieWModel=this._sportBarViewModelFactory.createSportBarViewModel(cssClass))},SportBar}(InitialiseForSelector);AllSportsButtonAndSelector.SportBar=SportBar})(AllSportsButtonAndSelector=LiveNowPod.AllSportsButtonAndSelector||(LiveNowPod.AllSportsButtonAndSelector={}))})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var AllSportsButtonAndSelector;(function(AllSportsButtonAndSelector){var SportObjects=function(){function SportObjects(jqueryObjectFactory){var _this=this;this.sportsBar=function(){return _this._jqueryObjectFactory.createObjectForSelector(".classificationDropdown")};this.allSportsButton=function(){return _this._jqueryObjectFactory.createObjectForSelector(".allSports > .allSportsButtonText")};this.selectedSportLink=function(){return _this._jqueryObjectFactory.createObjectForSelector(".classificationDropdown > a.selected")};this.pageJQueryObject=function(){return _this._jqueryObjectFactory.createObjectForSelector("#StreamingPage")};this._jqueryObjectFactory=jqueryObjectFactory}return SportObjects.prototype.sportLink=function(itemValue){return this._jqueryObjectFactory.createObjectForSelector(".classificationDropdown  > [value='"+itemValue+"']")},SportObjects}();AllSportsButtonAndSelector.SportObjects=SportObjects})(AllSportsButtonAndSelector=LiveNowPod.AllSportsButtonAndSelector||(LiveNowPod.AllSportsButtonAndSelector={}))})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var AllSportsButtonAndSelector;(function(AllSportsButtonAndSelector){var SportBarViewModel=function(){function SportBarViewModel(application,jqueryObjects,filterFixturesCommand,delay){var _this=this;this.application=application;this.jqueryObjects=jqueryObjects;this.filterFixturesCommand=filterFixturesCommand;this.delay=delay;this.isVisible=function(){return _this.jqueryObjects.sportsBar().is(":visible")};this.slideUp=function(){_this.jqueryObjects.sportsBar().slideUp(_this.delay);_this.jqueryObjects.sportsBar().parent().removeClass("expanded")};this.slideDown=function(){_this.jqueryObjects.sportsBar().slideDown(_this.delay);_this.jqueryObjects.sportsBar().parent().addClass("expanded")};this.selectItem=function(itemValue){_this.jqueryObjects.sportLink(itemValue).addClass("selected")};this.clearSelectedItem=function(){_this.jqueryObjects.selectedSportLink().removeClass("selected")};this.bindLinkEvents(this.jqueryObjects.pageJQueryObject());this.bindAllSportsEvents(this.jqueryObjects.pageJQueryObject())}return SportBarViewModel.prototype.bindLinkEvents=function(pageJQueryObject){var _this=this;pageJQueryObject.on("click",".classificationDropdown > a",function(ev){var itemValue=ev.target.getAttribute("value");_this.jqueryObjects.allSportsButton().text(ev.target.text);_this.filterFixturesCommand.filter(itemValue);_this.application.notifyClassificationChanged(itemValue);_this.slideUp();_this.clearSelectedItem();_this.selectItem(itemValue)})},SportBarViewModel.prototype.bindAllSportsEvents=function(pageJQueryObject){var _this=this;pageJQueryObject.on("click",".allSports",function(){_this.isVisible()?_this.slideUp():_this.slideDown()})},SportBarViewModel}();AllSportsButtonAndSelector.SportBarViewModel=SportBarViewModel})(AllSportsButtonAndSelector=LiveNowPod.AllSportsButtonAndSelector||(LiveNowPod.AllSportsButtonAndSelector={}))})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var AllSportsButtonAndSelector;(function(AllSportsButtonAndSelector){var SportBarViewModelFactory=function(){function SportBarViewModelFactory(application,fixtureFilterCommandFactory,sportsBarObjects){this.application=application;this.fixtureFilterCommandFactory=fixtureFilterCommandFactory;this.sportsBarObjects=sportsBarObjects}return SportBarViewModelFactory.prototype.createSportBarViewModel=function(){return new AllSportsButtonAndSelector.SportBarViewModel(this.application,this.sportsBarObjects,this.fixtureFilterCommandFactory.createCommand(),0)},SportBarViewModelFactory}();AllSportsButtonAndSelector.SportBarViewModelFactory=SportBarViewModelFactory})(AllSportsButtonAndSelector=LiveNowPod.AllSportsButtonAndSelector||(LiveNowPod.AllSportsButtonAndSelector={}))})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var MarketTypeId=function(){function MarketTypeId(){}return MarketTypeId.WinAndEachWayInPlay=1,MarketTypeId}();LiveNowPod.MarketTypeId=MarketTypeId})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Enumerable=Typescript.LinQ.Enumerable,MarketIdLookup=function(){function MarketIdLookup(){}return MarketIdLookup.getMarketId=function(classificationId,marketTypeId){var _this=this,keyValue=this._lookup.firstOrDefault(function(kv){return _this.keysMatch(kv.key,{classificationId:classificationId,marketTypeId:marketTypeId})});return keyValue===undefined?"":keyValue.value},MarketIdLookup.keysMatch=function(keyOne,keyTwo){return keyOne.classificationId===keyTwo.classificationId&&keyOne.marketTypeId===keyTwo.marketTypeId},MarketIdLookup._lookup=new Enumerable([{key:{classificationId:LiveNowPod.Classifications.HorseRacing,marketTypeId:LiveNowPod.MarketTypeId.WinAndEachWayInPlay},value:"20079"},{key:{classificationId:LiveNowPod.Classifications.GreyhoundRacing,marketTypeId:LiveNowPod.MarketTypeId.WinAndEachWayInPlay},value:"40226"}]),MarketIdLookup}();LiveNowPod.MarketIdLookup=MarketIdLookup})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Markets=function(){function Markets(){}return Markets.WinAndEachWayInPlay="20079",Markets}();LiveNowPod.Markets=Markets})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Enumerable=Typescript.LinQ.Enumerable,ClassificationNamesDescriptionQuery=function(){function ClassificationNamesDescriptionQuery(){this._lookup=new Enumerable([{key:LiveNowPod.Classifications.Soccer,value:"soccer"},{key:LiveNowPod.Classifications.Basketball,value:"basketball"},{key:LiveNowPod.Classifications.Tennis,value:"tennis"},{key:LiveNowPod.Classifications.Cricket,value:"cricket"},{key:LiveNowPod.Classifications.HorseRacing,value:"horse-racing"},{key:LiveNowPod.Classifications.GreyhoundRacing,value:"greyhound-racing"},{key:LiveNowPod.Classifications.UsHorseRacing,value:"us-horse-racing"},{key:LiveNowPod.Classifications.UsGreyhoundRacing,value:"us-greyhound-racing"},{key:LiveNowPod.Classifications.Golf,value:"golf"},{key:LiveNowPod.Classifications.RugbyUnion,value:"rugby-union"},{key:LiveNowPod.Classifications.Formula1,value:"formula-1"},{key:LiveNowPod.Classifications.Athletics,value:"athletics"},{key:LiveNowPod.Classifications.AmericanFootball,value:"american-football"},{key:LiveNowPod.Classifications.Snooker,value:"snooker"},{key:LiveNowPod.Classifications.Darts,value:"darts"},{key:LiveNowPod.Classifications.Baseball,value:"baseball"},{key:LiveNowPod.Classifications.IceHockey,value:"ice-hockey"},{key:LiveNowPod.Classifications.RugbyLeague,value:"rurby-league"},{key:LiveNowPod.Classifications.Pool,value:"pool"},{key:LiveNowPod.Classifications.AustralianRules,value:"australian-rules"},{key:LiveNowPod.Classifications.Cycling,value:"cycling"},{key:LiveNowPod.Classifications.Hurling,value:"hurling"},{key:LiveNowPod.Classifications.Nascar,value:"nascar"},{key:LiveNowPod.Classifications.Bowls,value:"bowls"},{key:LiveNowPod.Classifications.Handball,value:"handball"},{key:LiveNowPod.Classifications.Hockey,value:"hockey"},{key:LiveNowPod.Classifications.Trotting,value:"trotting"},{key:LiveNowPod.Classifications.Volleyball,value:"volleyball"},{key:LiveNowPod.Classifications.TableTennis,value:"table-tennis"},{key:LiveNowPod.Classifications.Badmiton,value:"badmiton"}])}return ClassificationNamesDescriptionQuery.prototype.getClassificationNameDescription=function(id){var item=this._lookup.firstOrDefault(function(kv){return kv.key===id});return item?item.value:""},ClassificationNamesDescriptionQuery}();LiveNowPod.ClassificationNamesDescriptionQuery=ClassificationNamesDescriptionQuery})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Stem=ns_gen5_data.Stem,Enumerable=Typescript.LinQ.Enumerable,ParticipantsStem=function(_super){function ParticipantsStem(stem){var _this=_super.call(this)||this;_this.set_data(stem.data);var winAndEachWayMarketId=LiveNowPod.MarketIdLookup.getMarketId(stem.data.CL,LiveNowPod.MarketTypeId.WinAndEachWayInPlay),marketWithParticipants=new Enumerable(stem.getChildren()).firstOrDefault(function(x){return x.data.ID===winAndEachWayMarketId}),hasParticipants=marketWithParticipants!==undefined&&marketWithParticipants!==null&&marketWithParticipants.getChildren().length>0,participantStems=hasParticipants?marketWithParticipants.getChildren()[0].getChildren():[];return _this._children=new Enumerable(participantStems).where(function(x){return!_this.isUndefinedOrEmpty(x.data.NC)}).toArray(),_this}return __extends(ParticipantsStem,_super),ParticipantsStem.prototype.isUndefinedOrEmpty=function(value){return value===undefined||value===""},ParticipantsStem}(Stem);LiveNowPod.ParticipantsStem=ParticipantsStem})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LiveNowPod;(function(LiveNowPod){var Component=ns_gen5_ui.Component,TextInput=function(_super){function TextInput(cssClass){var _this=_super.call(this,"input")||this;return _this.addStyle(cssClass),_this.setAttribute("type","text"),_this}return __extends(TextInput,_super),TextInput.prototype.setText=function(text){this.setAttribute("value",text)},TextInput.prototype.getText=function(){return this.getAttribute("value")},TextInput}(Component);LiveNowPod.TextInput=TextInput})(LiveNowPod=Components.LiveNowPod||(Components.LiveNowPod={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Enums;(function(Enums){"use strict";var Menu;(function(Menu){Menu[Menu.Deposit=0]="Deposit";Menu[Menu.Main=1]="Main"})(Menu=Enums.Menu||(Enums.Menu={}))})(Enums=LoginControls.Enums||(LoginControls.Enums={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Enums;(function(Enums){"use strict";var ModalShowEffect;(function(ModalShowEffect){ModalShowEffect[ModalShowEffect.Slide=1]="Slide";ModalShowEffect[ModalShowEffect.Fade=2]="Fade"})(ModalShowEffect=Enums.ModalShowEffect||(Enums.ModalShowEffect={}))})(Enums=LoginControls.Enums||(LoginControls.Enums={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Enums;(function(Enums){"use strict";var Page;(function(Page){Page[Page.Play=0]="Play";Page[Page.Unknown=1]="Unknown"})(Page=Enums.Page||(Enums.Page={}))})(Enums=LoginControls.Enums||(LoginControls.Enums={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Enums;(function(Enums){"use strict";var PageContextKeys;(function(PageContextKeys){PageContextKeys[PageContextKeys.ProductNavigationSlideDown=0]="ProductNavigationSlideDown";PageContextKeys[PageContextKeys.RealityCheckShowing=1]="RealityCheckShowing";PageContextKeys[PageContextKeys.Members=2]="Members"})(PageContextKeys=Enums.PageContextKeys||(Enums.PageContextKeys={}))})(Enums=LoginControls.Enums||(LoginControls.Enums={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Enums;(function(Enums){"use strict";var Toggle;(function(Toggle){Toggle[Toggle.Hide=0]="Hide";Toggle[Toggle.Show=1]="Show"})(Toggle=Enums.Toggle||(Enums.Toggle={}))})(Enums=LoginControls.Enums||(LoginControls.Enums={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Events;(function(Events){var LoginEvent=function(_super){function LoginEvent(){return _super.call(this)||this}return __extends(LoginEvent,_super),LoginEvent}(Events.EventHandler);Events.LoginEvent=LoginEvent})(Events=LoginControls.Events||(LoginControls.Events={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Events;(function(Events){var MembersLoadInFrameEvent=function(_super){function MembersLoadInFrameEvent(){return _super.call(this)||this}return __extends(MembersLoadInFrameEvent,_super),MembersLoadInFrameEvent}(Events.EventHandler);Events.MembersLoadInFrameEvent=MembersLoadInFrameEvent})(Events=LoginControls.Events||(LoginControls.Events={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Events;(function(Events){var FailedLoginEvent=function(_super){function FailedLoginEvent(){return _super.call(this)||this}return __extends(FailedLoginEvent,_super),FailedLoginEvent}(Events.EventHandler);Events.FailedLoginEvent=FailedLoginEvent})(Events=LoginControls.Events||(LoginControls.Events={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Events;(function(Events){var ToggleMenuEvent=function(_super){function ToggleMenuEvent(){return _super.call(this)||this}return __extends(ToggleMenuEvent,_super),ToggleMenuEvent}(Events.EventHandler);Events.ToggleMenuEvent=ToggleMenuEvent})(Events=LoginControls.Events||(LoginControls.Events={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Interfaces;(function(){"use strict"})(Interfaces=LoginControls.Interfaces||(LoginControls.Interfaces={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){"use strict";var KycSecondaryAuthMobile=function(){function KycSecondaryAuthMobile(membersLoadInFrameEvent){this.membersLoadInFrameEvent=membersLoadInFrameEvent}return KycSecondaryAuthMobile.prototype.initialiseForSelector=function(cssClass){if(this.membersHash="type=Members;key=hopper;",$(cssClass).length&&window.location.hash.indexOf(this.membersHash)===-1){var href=$(cssClass).data("url");this.membersLoadInFrameEvent.emitEvent({href:href})}},KycSecondaryAuthMobile}();Components.KycSecondaryAuthMobile=KycSecondaryAuthMobile})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){"use strict";var PageContextKeys=Components.LoginControls.Enums.PageContextKeys,MembersFrame=function(){function MembersFrame(postMessageBrokerService,membersLoadInFrameEvent,loginEvent,pageContextService,loginViewModel,modalService,loginModal){this.postMessageApiMethods={REAUTH_COMPLETE:"reauthenticationComplete",SHOW_HEADER:"showHeader",HIDE_HEADER:"hideHeader",INACTIVITY_RESET:"inactivityReset",IFRAME_LOADED:"frameLoaded",NAV_HOME:"navigateHome",NAV_MEMBERS:"navigateMembers",NAV_MEMBERS_DOMAIN:"navigateMembersDomain",NAV_3RDPARTY:"navigateThirdParty",NAV_3RDPARTYFORM:"navigateThirdPartyForm",IFRAME_HEIGHT:"setFrameHeight",USER_GET_BALANCE:"userGetBalance",USER_REFRESH_BALANCE:"userRefreshBalance",IFRAME_CLOSE:"closeFrame",PAGE_SCROLL:"scrollPage",NAV_HOME_LOGIN:"navigationHomeLogin",NAV_HOME_DOMAIN:"navigationHomeLogin"};this.membersPostMessages={userBalance:"USER_BALANCE"};this.postMessageBrokerService=postMessageBrokerService;this.membersLoadInFrameEvent=membersLoadInFrameEvent;this.loginEvent=loginEvent;this.pageContextService=pageContextService;this.loginViewModel=loginViewModel;this.modalService=modalService;this.loginModal=loginModal}return MembersFrame.prototype.initialiseForSelector=function(cssClass){var _this=this;if($(cssClass).length!==0){this.loginViewModel.init(".login-data");this.membersFrame=$("#MembersIFrame");this.bodyContent=$(".body_wrapper");this.loginContainer=$(".header-login-container");this.body=$("body");this.overlay=$(".popup-mask");this.header=$(".legacy-header-mask");this.membersDefaultPage="/he/helpers/hostedredirect.aspx?prdid=";this.membersHash="type=Members;key=hopper;";window.location.hash.indexOf(this.membersHash)>-1&&this.navigateMembers(null);this.membersLoadInFrameEvent.onEvent(function(args){_this.loadInFrame(args.href)});$(".lostLoginLink").click(function(event){_this.modalService.hideModal();_this.loadInFrame($(event.currentTarget).attr("href"));_this.hideHeader();event.preventDefault()});window.onhashchange=function(){_this.isUserInMembers()}}},MembersFrame.prototype.isUserInMembers=function(){window.location.hash.indexOf(this.membersHash)===-1&&this.hideMembers()},MembersFrame.prototype.kycRequirement=function(href){window.location.hash.indexOf(this.membersHash)===-1&&this.loadInFrame(href)},MembersFrame.prototype.attachMessageListener=function(){var _this=this;$(window).on("message",function(e){var data=_this.postMessageBrokerService.handleMessageEvent(e);_this.handleMessage(data)})},MembersFrame.prototype.sportsProductId=function(){return 1},MembersFrame.prototype.showLoadingOverlay=function(){var loadingSpinner=$(".frame-loading-spinner");this.overlay.addClass("frame-loading-overlay");$("html").css("overflow","hidden");loadingSpinner.show();this.centerBox(loadingSpinner)},MembersFrame.prototype.loadInFrame=function(href){this.membersFrame.length===0&&this.buildFrame();this.membersFrame.show();this.membersFrame.attr("allowTransparency","true");this.membersFrame.attr("src",this.buildMembersFrameLink(href));this.attachMessageListener()},MembersFrame.prototype.showMembersWithHeader=function(){this.bodyContent.hide();this.pageContextService.addPageContext(PageContextKeys.Members);this.membersFrame.length>0&&(this.productSlideMenuHasBeenHidden&&(this.productSlideMenuHasBeenHidden=!1,this.pageContextService.addPageContext(PageContextKeys.ProductNavigationSlideDown)),this.membersFrame.removeClass("coverpage"),this.membersFrame.show())},MembersFrame.prototype.onMobileDevice=function(){return $("[data-component-type='KycSecondaryAuthMobile']")&&$("[data-component-type='KycSecondaryAuthMobile']").data("onmobile")&&$("[data-component-type='KycSecondaryAuthMobile']").data("onmobile")==="True"},MembersFrame.prototype.alterMembersFrameAndContainerStyle=function(){this.onMobileDevice()?navigator.userAgent.match(/iPhone/i)||($(".members-frame-container").addClass("mobile-frame-container"),$(".members-frame-container").css("height",$(window).height())):(this.membersFrame.css("height","100%"),$(".members-frame-container").css({position:"absolute",width:"100%",height:"100%",top:"0","z-index":"9999"}))},MembersFrame.prototype.showMembersWithoutHeader=function(){$(".OfferAdminBar").hide();this.onMobileDevice()||(this.overlay.show(),window.scrollTo(0,0));this.onMobileDevice()&&this.showLoadingOverlay();this.onMobileDevice()&&this.bodyContent.addClass("members-dialog");this.alterMembersFrameAndContainerStyle()},MembersFrame.prototype.hideMembers=function(){this.bodyContent.show();this.bodyContent.removeClass("members-dialog");$(".OfferAdminBar").show();$(".body_wrapper").removeAttr("style");$(".members-frame-container").removeAttr("style");this.pageContextService.removePageContext(PageContextKeys.Members);this.productSlideMenuHasBeenHidden&&(this.productSlideMenuHasBeenHidden=!1,this.pageContextService.addPageContext(PageContextKeys.ProductNavigationSlideDown));this.membersFrame.length>0&&this.membersFrame.is(":visible")&&(this.overlay.hide(),this.membersFrame.removeClass("coverpage"),this.membersFrame.hide(),window.location.hash="");$(".body_wrapper").css("z-index","")},MembersFrame.prototype.reauthenticationComplete=function(){},MembersFrame.prototype.showHeader=function(){this.showMembersWithHeader()},MembersFrame.prototype.hideHeader=function(){this.showMembersWithoutHeader()},MembersFrame.prototype.inactivityReset=function(){},MembersFrame.prototype.frameLoaded=function(data){this.sendIframeHostedMessage(data);window.location.hash=this.membersHash;$("html").css("overflow","visible");this.overlay.find(".frame-loading-spinner").hide();this.overlay.removeClass("frame-loading-overlay")},MembersFrame.prototype.sendIframeHostedMessage=function(data){try{data.source&&data.origin&&data.source.postMessage({message:"IFRAME_HOSTED",logintype:this.loginViewModel.platformTypeId(),platform:this.loginViewModel.platformDescription(),productId:"1"},data.origin)}catch(e){}},MembersFrame.prototype.navigateHome=function(data){this.closeFrame();data.loginStateChanged&&window.location.reload()},MembersFrame.prototype.navigateMembers=function(data){var membersFirstUrlSegment,host,redirectPath,membersLink;if(data&&data.loginStateChanged){window.location.hash.indexOf(this.membersHash)===-1&&this.onMobileDevice()&&(window.location.hash=this.membersHash);this.onMobileDevice()||(window.location.hash="");window.location.reload(!0);return}membersFirstUrlSegment=this.onMobileDevice()?"mobile":"members";host=window.location.host.replace("extra",membersFirstUrlSegment);redirectPath=this.onMobileDevice()?this.membersDefaultPage+this.sportsProductId():"/home/mainpage.asp?pid=13007&prdid=23&version=2";membersLink=[window.location.protocol,"//",host,redirectPath].join("");this.loadInFrame(membersLink)},MembersFrame.prototype.navigateMembersDomain=function(data){if(data&&data.domain){var urlQueryStringAndHash=[window.location.search,"#",this.membersHash].join("");this.redirectToNewDomain(data.domain,urlQueryStringAndHash)}},MembersFrame.prototype.navigateThirdParty=function(data){data.url&&window.location.replace(data.url)},MembersFrame.prototype.navigateThirdPartyForm=function(data){var thirdPartyForm;data.url&&data.formData&&(thirdPartyForm=document.createElement("form"),thirdPartyForm.setAttribute("method","post"),thirdPartyForm.setAttribute("action",data.url),thirdPartyForm.innerHTML=data.formData,document.body.appendChild(thirdPartyForm),thirdPartyForm.submit())},MembersFrame.prototype.setFrameHeight=function(data){data&&data.height!==undefined&&data.height>=0&&(data.height===0?this.membersFrame.css("height",""):this.membersFrame.height(data.height))},MembersFrame.prototype.closeFrame=function(){this.hideMembers()},MembersFrame.prototype.scrollPage=function(data){if(data&&data.top){var scrollValue=data.top,headerWrapper=this.header.first();data.top>0&&headerWrapper.is(":visible")&&(scrollValue=scrollValue+headerWrapper.height());$(".members-frame-container").animate({scrollTop:scrollValue},0)}},MembersFrame.prototype.navigationHomeLogin=function(){this.hideMembers();this.overlay.removeClass("frame-loading-overlay");this.loginModal.showLogin(!0,null)},MembersFrame.prototype.buildFrame=function(){var frameContainer;this.membersFrame=$("<iframe>",{id:"MembersIFrame",name:"MembersIFrame",scrolling:"no",frameBorder:"0","data-component-type":"MembersIFrame","class":"members-frame-mobile",style:"display:block;width:100%"});frameContainer=$("<div>",{"class":"members-frame-container"});frameContainer.append(this.membersFrame);this.bodyContent.append(frameContainer)},MembersFrame.prototype.buildMembersFrameLink=function(href){return href&&href.indexOf("?mh=1")===-1&&href.indexOf("&mh=1")===-1?href.indexOf("?")===-1?[href,"?mh=1"].join(""):[href,"&mh=1"].join(""):href},MembersFrame.prototype.buildPostJoinNowUrl=function(){var querystring,launchGameQueryStringFragment="launchGame=false";return querystring=window.location.search.length>0?[window.location.search,"&",launchGameQueryStringFragment].join(""):["?",launchGameQueryStringFragment].join(""),[window.location.protocol,"//",window.location.host,window.location.pathname,querystring,"#",this.membersHash].join("")},MembersFrame.prototype.redirectToNewDomain=function(domain,urlQueryStringAndHash){var currentHost=window.location.host,urlParts=currentHost.split("."),rootDomain=urlParts[urlParts.length-1],newHost=currentHost.replace(rootDomain,domain),redirect=[window.location.protocol,"//",newHost,window.location.pathname,urlQueryStringAndHash].join("");this.windowRedirect(redirect)},MembersFrame.prototype.handleMessage=function(data){if(data&&this.postMessageApiMethods.hasOwnProperty(data.message)){var postMessageApiMethod=this.postMessageApiMethods[data.message];this[postMessageApiMethod](data)}},MembersFrame.prototype.windowRedirect=function(redirect){window.location.href=redirect},MembersFrame.prototype.centerBox=function(box,scrollToTop){scrollToTop===void 0&&(scrollToTop=!1);box.css("position","absolute");var windowHeight=$(window).height()-box.outerHeight(),windowWidth=$(window).width()-box.outerWidth(),top=Math.max(0,windowHeight/2+(scrollToTop?0:$(window).scrollTop())),left=Math.max(0,windowWidth/2);box.css("top",top+"px");box.css("left",left+"px");box.css("margin-left","0");box.css("margin-top","0")},MembersFrame}();Components.MembersFrame=MembersFrame})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){"use strict";var Modal=Components.Models.Modal,MobileLoggedInOverlay=function(){function MobileLoggedInOverlay(modalService,queryStringService,membersLoadInFrameEvent){this.priority=45;this.queryStringService=queryStringService;this.modalService=modalService;this.membersLoadInFrameEvent=membersLoadInFrameEvent}return MobileLoggedInOverlay.prototype.initialiseForSelector=function(cssClass){$(cssClass).length&&(this.modal=$(cssClass),this.continueButton=this.modal.find(".button"),$("div.main_content").append(this.modal),this.bindCloseButtonClick(),(document.URL.indexOf("?sl=")!==-1||document.URL.indexOf("&sl=")!==-1)&&this.modalService.showModal(new Modal(this.modal,this.priority,!1)))},MobileLoggedInOverlay.prototype.bindCloseButtonClick=function(){var _this=this;this.continueButton.on("click",function(){_this.modalService.hideModal();var reloadUrl=_this.queryStringService.updateQueryString("sl",null,window.location.href);window.location.href=reloadUrl});this.membersLoadInFrameEvent.onEvent(function(_a){var string=_a.href;_this.modal.is(":visible")&&_this.modalService.hideModal()})},MobileLoggedInOverlay}();Components.MobileLoggedInOverlay=MobileLoggedInOverlay})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var Models;(function(Models){"use strict";var Browser=function(){function Browser(vendor,name,version){this.vendor=vendor;this.name=name;this.version=version}return Browser}();Models.Browser=Browser})(Models=Components.Models||(Components.Models={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Services;(function(Services){"use strict";var CookieService=function(){function CookieService(browserDetailsService){this.browserDetailsService=browserDetailsService;this.cookieRestricted=!0;this.cookieCheckAttempts=0}return CookieService.prototype.setCookie=function(key,value,expiry,domain){var expiryDate,expire;expiry===void 0&&(expiry=null);domain===void 0&&(domain=null);expiryDate="";expiry&&(expire=new Date,expire.setMilliseconds(expire.getMilliseconds()+expiry*864e5),expiryDate=expire.toUTCString(),expiryDate="; expires="+expiryDate);domain&&(domain="; domain="+domain);document.cookie=[key,"=",value,expiryDate,";path=/",domain].join("")},CookieService.prototype.getCookie=function(key){var cookieValue=document.cookie,start,end;return cookieValue.length>0&&(start=cookieValue.indexOf(key+"="),start!==-1)?(start=start+key.length+1,end=cookieValue.indexOf(";",start),end==-1&&(end=cookieValue.length),decodeURIComponent(cookieValue.substring(start,end))):""},CookieService.prototype.eraseCookie=function(cookieName,domain){domain===void 0&&(domain=null);this.setCookie(cookieName,"",-1,domain)},CookieService.prototype.startupCookieRestrictionCheck=function(){var _this=this,windowLocation=window.location;if(this.browserDetailsService.getBrowser().name=="Internet Explorer"){this.cookieRestricted=!1;return}if(this.getCookie("ce")===""){var baseUrl="https://games.bet365scommetti.com/cookiecheck?b=",thirdPartyCookieUrl=windowLocation.origin?windowLocation.origin:[window.location.protocol,"//",window.location.hostname].join(""),rd=[baseUrl,thirdPartyCookieUrl].join("");$('<iframe id="ck" src="'+rd+'" height="0" width="0"/>').appendTo("body");setTimeout(function(){_this.thirdPartyCookieCheckRepeat()},500)}else this.cookieRestricted=!1},CookieService.prototype.areThirdPartyCookiesRestricted=function(){return this.cookieRestricted&&this.checkIFrameForThirdPartyCookieCheck(),this.cookieRestricted},CookieService.prototype.readMultiValueCookieValue=function(firstKey,secondKey){var cookieValue=this.getCookie(firstKey),values,i,parts;if(cookieValue==null)return"";for(values=cookieValue.split("&"),i=0;i<values.length;i++)if(parts=values[i].split("="),parts[0]===secondKey)return parts[1];return""},CookieService.prototype.thirdPartyCookieCheckRepeat=function(){var _this=this;try{if(this.cookieCheckAttempts>=5)return;this.cookieCheckAttempts++;this.checkIFrameForThirdPartyCookieCheck()||setTimeout(function(){_this.thirdPartyCookieCheckRepeat()},500)}catch(e){setTimeout(function(){_this.thirdPartyCookieCheckRepeat()},500)}},CookieService.prototype.checkIFrameForThirdPartyCookieCheck=function(){try{var result=$("#ck").contents().find("#success").text().toLowerCase();return result==="true"?(this.cookieRestricted=!1,this.setCookie("ce","1",1e4),!0):result==="false"?(this.cookieRestricted=!0,!0):!1}catch(e){return!1}},CookieService}();Services.CookieService=CookieService})(Services=LoginControls.Services||(LoginControls.Services={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Services;(function(Services){"use strict";var LogService=function(){function LogService(cookieService){this.cookieService=cookieService;this.cookieService.getCookie("debugLogger")==="true"?LogService.enable():LogService.disable()}return LogService.prototype.writeToConsole=function(message){"console"in self&&"log"in console&&message&&message.length>=1&&typeof console=="object"&&console.log(message)},LogService.enable=function(){LogService.status=!0},LogService.disable=function(){LogService.status=!1},LogService.prototype.write=function(message){LogService.status&&this.writeToConsole(message)},LogService.status=!1,LogService}();Services.LogService=LogService})(Services=LoginControls.Services||(LoginControls.Services={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Services;(function(Services){"use strict";var PageContextKeys=Typescript.Components.LoginControls.Enums.PageContextKeys,Page=Typescript.Components.LoginControls.Enums.Page,PageContextKey=function(){function PageContextKey(key,internalPageContextKey){this.key=key;this.internalPageContextKey=internalPageContextKey}return PageContextKey}(),PageContextService=function(){function PageContextService(logService){this.pageContextKeys=[new PageContextKey(PageContextKeys.ProductNavigationSlideDown,"product-navigation-slide-down"),new PageContextKey(PageContextKeys.RealityCheckShowing,"realitycheck-showing"),new PageContextKey(PageContextKeys.Members,"members")];this.logService=logService;this.body=$("body")}return PageContextService.prototype.addPageContext=function(pageContext){this.body.addClass(this.getPageContextKey(pageContext))},PageContextService.prototype.removePageContext=function(pageContext){this.body.removeClass(this.getPageContextKey(pageContext))},PageContextService.prototype.hasPageContext=function(pageContext){return this.body.hasClass(this.getPageContextKey(pageContext))},PageContextService.prototype.getCurrentPage=function(){return this.body.hasClass("play-page")?Page.Play:Page.Unknown},PageContextService.prototype.getPageContextKey=function(key){for(var item,i=0;i<this.pageContextKeys.length;i++)if(item=this.pageContextKeys[i],item.key===key)return item.internalPageContextKey;return this.logService.write("The key is not allowed "+key.toString()+" in the Page Context Service"),""},PageContextService}();Services.PageContextService=PageContextService})(Services=LoginControls.Services||(LoginControls.Services={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var LoginControls;(function(LoginControls){var Services;(function(Services){"user strict";var PostMessageBrokerService=function(){function PostMessageBrokerService(){}return PostMessageBrokerService.prototype.handleMessageEvent=function(e){var messageEvent=e.originalEvent,messageEventData=JSON.parse(messageEvent.data),sourceLocation,targetLocation;return messageEventData&&messageEventData.message?(sourceLocation=this.parsePrimaryHost(messageEvent.origin),targetLocation=this.parsePrimaryHost(this.getWindowLocationHostname()),sourceLocation!==targetLocation)?null:(messageEventData.source=messageEvent.source,messageEventData.origin=messageEvent.origin,messageEventData):null},PostMessageBrokerService.prototype.postMessage=function(messageName,messageTarget,additionalData){var messageData=additionalData,targetOrigin;messageData||(messageData={});messageData.message=messageName;var sendMessage=JSON.stringify(messageData),targetLocation=this.parsePrimaryHost(messageTarget.location.hostname),sourceLocation=this.parsePrimaryHost(this.getWindowLocationHostname());return targetLocation!==sourceLocation?!1:(targetOrigin=[messageTarget.location.protocol,"//",messageTarget.location.hostname].join(""),messageTarget.postMessage(sendMessage,targetOrigin),!0)},PostMessageBrokerService.prototype.parsePrimaryHost=function(hostname){return hostname.indexOf(".")>0?hostname.split(".").slice(1).join("."):hostname},PostMessageBrokerService.prototype.getWindowLocationHostname=function(){return window.location.hostname},PostMessageBrokerService}();Services.PostMessageBrokerService=PostMessageBrokerService})(Services=LoginControls.Services||(LoginControls.Services={}))})(LoginControls=Components.LoginControls||(Components.LoginControls={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var SportsData;(function(SportsData){var SportsDataProviders;(function(SportsDataProviders){var Results;(function(Results){var RequestType;(function(RequestType){RequestType[RequestType.ClassificationList=0]="ClassificationList";RequestType[RequestType.FixtureList=1]="FixtureList";RequestType[RequestType.FixtureDetails=2]="FixtureDetails"})(RequestType=Results.RequestType||(Results.RequestType={}))})(Results=SportsDataProviders.Results||(SportsDataProviders.Results={}))})(SportsDataProviders=SportsData.SportsDataProviders||(SportsData.SportsDataProviders={}))})(SportsData=Components.SportsData||(Components.SportsData={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var SportsData;(function(SportsData){var SportsDataProviders;(function(SportsDataProviders){var Results;(function(Results){var ResultsApiPathSections=function(){function ResultsApiPathSections(){}return ResultsApiPathSections.api="api",ResultsApiPathSections.classificationList="classification-list",ResultsApiPathSections.searchByList="search-by-list",ResultsApiPathSections.dropdownList="dropdown-list",ResultsApiPathSections.fixtureList="fixture-list",ResultsApiPathSections.fixtureDetails="fixture-details",ResultsApiPathSections}();Results.ResultsApiPathSections=ResultsApiPathSections})(Results=SportsDataProviders.Results||(SportsDataProviders.Results={}))})(SportsDataProviders=SportsData.SportsDataProviders||(SportsData.SportsDataProviders={}))})(SportsData=Components.SportsData||(Components.SportsData={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var SportsData;(function(SportsData){var SportsDataProviders;(function(SportsDataProviders){var Results;(function(Results){var ResultsCorsRequestFactory=function(){function ResultsCorsRequestFactory(endpoint,resultsCorsRequestBuilder,localisationContext){this._endpoint=endpoint;this._resultsCorsRequestBuilder=resultsCorsRequestBuilder;this._localisationContext=localisationContext}return ResultsCorsRequestFactory.prototype.classificationList=function(){return this._resultsCorsRequestBuilder.withEndpoint(this._endpoint).ensureSlashesInUrl(!0).withPath([Results.ResultsApiPathSections.api,Results.ResultsApiPathSections.classificationList,this._localisationContext.languageId,this._localisationContext.countryId]).withVerb("GET").useCredentials(!1).build()},ResultsCorsRequestFactory.prototype.searchByList=function(classificationId){return this._resultsCorsRequestBuilder.withEndpoint(this._endpoint).ensureSlashesInUrl(!0).withPath([Results.ResultsApiPathSections.api,Results.ResultsApiPathSections.searchByList,classificationId,this._localisationContext.languageId,this._localisationContext.countryId]).withVerb("GET").useCredentials(!1).build()},ResultsCorsRequestFactory.prototype.dropdownList=function(searchBy,classificationId,dateFrom,dateTo){return this._resultsCorsRequestBuilder.withEndpoint(this._endpoint).ensureSlashesInUrl(!0).withPath([Results.ResultsApiPathSections.api,Results.ResultsApiPathSections.dropdownList,searchBy,this._localisationContext.languageId,this._localisationContext.countryId,this._localisationContext.zoneId,classificationId,this.formatDate(dateFrom),this.formatDate(dateTo)]).withVerb("GET").useCredentials(!1).build()},ResultsCorsRequestFactory.prototype.fixtureList=function(searchBy,classificationId,dropdownFilterId,dateFrom,dateTo){return this._resultsCorsRequestBuilder.withEndpoint(this._endpoint).ensureSlashesInUrl(!0).withPath([Results.ResultsApiPathSections.api,Results.ResultsApiPathSections.fixtureList,searchBy,this._localisationContext.languageId,this._localisationContext.countryId,this._localisationContext.zoneId,classificationId,dropdownFilterId,this.formatDate(dateFrom),this.formatDate(dateTo)]).withVerb("GET").useCredentials(!1).build()},ResultsCorsRequestFactory.prototype.fixtureDetails=function(searchBy,classificationId,fixtureId){return this._resultsCorsRequestBuilder.withEndpoint(this._endpoint).ensureSlashesInUrl(!0).withPath([Results.ResultsApiPathSections.api,Results.ResultsApiPathSections.fixtureDetails,searchBy,this._localisationContext.languageId,this._localisationContext.countryId,this._localisationContext.zoneId,classificationId,fixtureId]).withVerb("GET").useCredentials(!1).build()},ResultsCorsRequestFactory.prototype.formatDate=function(date){return("0"+date.getDate()).slice(-2)+"-"+("0"+(date.getMonth()+1)).slice(-2)+"-"+date.getFullYear()},ResultsCorsRequestFactory}();Results.ResultsCorsRequestFactory=ResultsCorsRequestFactory})(Results=SportsDataProviders.Results||(SportsDataProviders.Results={}))})(SportsDataProviders=SportsData.SportsDataProviders||(SportsData.SportsDataProviders={}))})(SportsData=Components.SportsData||(Components.SportsData={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var StandardDropdown;(function(StandardDropdown_1){var StandardDropdown=function(){function StandardDropdown(jqueryObject,jqueryObjectFactory){this._jqueryObject=jqueryObject;this._jqueryObjectFactory=jqueryObjectFactory}return Object.defineProperty(StandardDropdown.prototype,"selectedIndex",{get:function(){return this._jqueryObject.prop("selectedIndex")},enumerable:!0,configurable:!0}),Object.defineProperty(StandardDropdown.prototype,"selectedValue",{get:function(){return this._jqueryObject.val()},enumerable:!0,configurable:!0}),Object.defineProperty(StandardDropdown.prototype,"selectedText",{get:function(){return this._jqueryObject.text()},enumerable:!0,configurable:!0}),StandardDropdown.prototype.setSelectedIndex=function(index){this._jqueryObject.prop("selectedIndex",index)},StandardDropdown.prototype.setChangeHandler=function(changeHandler){var _this=this;this._jqueryObject.unbind();this._jqueryObject.change(function(){var id="-1",description="";_this._jqueryObject.children("option:selected").each(function(i,e){id=e.getAttribute("value");description=e.textContent});changeHandler(id,description)})},StandardDropdown.prototype.addClass=function(className){this._jqueryObject.addClass(className)},StandardDropdown.prototype.removeClass=function(className){this._jqueryObject.removeClass(className)},StandardDropdown.prototype.addOption=function(value,text){var output='<option value="'+value+'">'+text+"<\/option>";this._jqueryObject.html(output)},StandardDropdown.prototype.addOptions=function(options){for(var dropdownItem,output=[],i=0;i<options.length;i++)dropdownItem=options[i],output.push('<option value="'+dropdownItem.Value+'">'+dropdownItem.Text+"<\/option>");this._jqueryObject.html(output.join(""))},StandardDropdown.prototype.removeOptionByIndex=function(index){this._jqueryObject.find("option:eq('"+index+"')").remove()},StandardDropdown.prototype.removeOptionByValue=function(){var thisIdentifier=this._jqueryObject.attr("id"),optionIdentifier=thisIdentifier+" option[value='+ value +']",option=this._jqueryObjectFactory.createObjectForSelector(optionIdentifier);option!=null&&option.remove()},StandardDropdown.prototype.removeAllOptions=function(){this._jqueryObject.empty()},StandardDropdown.prototype.removeAllOptionsBarFirst=function(){this._jqueryObject.find("option:gt(0)").remove()},StandardDropdown}();StandardDropdown_1.StandardDropdown=StandardDropdown})(StandardDropdown=Components.StandardDropdown||(Components.StandardDropdown={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(IoC){var Installers;(function(Installers){var LanguageSelectorInstaller=function(){function LanguageSelectorInstaller(){}return LanguageSelectorInstaller.prototype.install=function(container){container.register(IoC.Component.named("languageSelector").componentType(Typescript.Components.LanguageSelector.LanguageSelector).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("languageSelectorViewModel").componentType(Typescript.Components.LanguageSelector.LanguageSelectorViewModel).withLifestyle(IoC.Lifestyle.Transient))},LanguageSelectorInstaller}();Installers.LanguageSelectorInstaller=LanguageSelectorInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(IoC){var Installers;(function(Installers){var SportBarInstaller=function(){function SportBarInstaller(){}return SportBarInstaller.prototype.install=function(container){container.register(IoC.Component.named("sportBar").componentType(Typescript.Components.LiveNowPod.AllSportsButtonAndSelector.SportBar).withLifestyle(IoC.Lifestyle.Transient));container.register(IoC.Component.named("sportBarViewModelFactory").componentType(Typescript.Components.LiveNowPod.AllSportsButtonAndSelector.SportBarViewModelFactory).withLifestyle(IoC.Lifestyle.Singleton));container.register(IoC.Component.named("sportsBarObjects").componentType(Typescript.Components.LiveNowPod.AllSportsButtonAndSelector.SportObjects).withLifestyle(IoC.Lifestyle.Singleton))},SportBarInstaller}();Installers.SportBarInstaller=SportBarInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(IoC){var Installers;(function(Installers){var StandardDropdownInstaller=function(){function StandardDropdownInstaller(){}return StandardDropdownInstaller.prototype.install=function(){},StandardDropdownInstaller}();Installers.StandardDropdownInstaller=StandardDropdownInstaller})(Installers=IoC.Installers||(IoC.Installers={}))}(IoC||(IoC={})),function(LiveInPlay){var TextNode=ns_gen5_ui.TextNode,Component=ns_gen5_ui.Component,ClassificationHeader=function(_super){function ClassificationHeader(){var _this=_super.call(this)||this;return _this.addStyle("lip-classificationHeader_wrapper"),_this.createHeader(),_this}return __extends(ClassificationHeader,_super),ClassificationHeader.prototype.setHeaderText=function(textValue){this._labelField.setText(textValue)},ClassificationHeader.prototype.setTotalText=function(textValue,linkData){this._totalField.setText(textValue);linkData.href&&linkData.href!==""&&this._classificationTotal.setAttribute("href",linkData.href);linkData.onclick&&linkData.onclick!==""&&this._classificationTotal.setAttribute("onclick",linkData.onclick);linkData.target&&linkData.target!==""&&this._classificationTotal.setAttribute("target",linkData.target)},ClassificationHeader.prototype.createChildren=function(){this.appendChild(this._classificationName);this.appendChild(this._classificationTotal)},ClassificationHeader.prototype.createHeader=function(){this._labelField=new TextNode;this._totalField=new TextNode;this._classificationName=new Component("h3");this._classificationName.addStyle("lip-classificationHeader_name");this._classificationName.appendChild(this._labelField);this._classificationTotal=new Component("a");this._classificationTotal.addStyle("lip-classificationHeader_totalMatches");this._classificationTotal.appendChild(this._totalField)},ClassificationHeader}(Component);LiveInPlay.ClassificationHeader=ClassificationHeader}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var LinkData=function(){function LinkData(href,onclick,target){this.href=href;this.onclick=onclick;this.target=target}return LinkData}();LiveInPlay.LinkData=LinkData}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var BlankHeader=function(_super){function BlankHeader(){return _super.call(this)||this}return __extends(BlankHeader,_super),BlankHeader.prototype.setHeaderText=function(){},BlankHeader.prototype.setTotalText=function(){},BlankHeader.prototype.createChildren=function(){},BlankHeader}(LiveInPlay.ClassificationHeader);LiveInPlay.BlankHeader=BlankHeader}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var GenericStemRenderer=ns_gen5_ui.GenericStemRenderer,ComponentStemBase=ns_gen5_ui.ComponentStemBase,Classification=function(_super){function Classification(_classificationHeader,_settings,_fixtureFactory){var _this=_super.call(this)||this;return _this._classificationHeader=_classificationHeader,_this._settings=_settings,_this._fixtureFactory=_fixtureFactory,_this._labelChanged=!0,_this._suspendedChanged=!0,_this.addStyle("lip-classification"),_this}return __extends(Classification,_super),Classification.prototype.createChildren=function(){this.createContainer();this.appendChild(this._classificationHeader);this.appendChild(this._container)},Classification.prototype.commitProperties=function(){if((this._labelChanged||this._suspendedChanged)&&this.stem){if(this._fixtureCount=this.countFixtures(this.stem),this._classificationHeader.setHeaderText(this.stem.data.NA),this._classificationHeader.setTotalText(this.formatFixtureCount(this._fixtureCount),this.getLinkData(this.stem)),this._suspendedChanged){var hidden=this.stem.data.SU&&this.stem.data.SU==="1";hidden?this.suspendElementFromDom():this.unsuspendElementFromDom()}this._labelChanged=!1;this._suspendedChanged=!1}},Classification.prototype.stemUpdateHandler=function(stem,updateData){"NA"in updateData&&(this._labelChanged=!0);"SU"in updateData&&(this._suspendedChanged=!0);(this._labelChanged||this._suspendedChanged)&&this.invalidateProperties()},Classification.prototype.getLinkData=function(){var fixtureSettings=this._settings.getFixtureConfiguration(this.stem.data[this._settings.classificationIdAttribute]);return fixtureSettings?fixtureSettings.link:new LiveInPlay.LinkData("","","")},Classification.prototype.countFixtures=function(stem){var count=0;return(stem.getChildren()||[]).forEach(function(childStem){(!childStem.data.ET||Number(childStem.data.ET)<=0)&&(!childStem.data[LiveInPlay.SportsContentAttributes.filteredOut]||childStem.data[LiveInPlay.SportsContentAttributes.filteredOut]==="0")&&count++}),count},Classification.prototype.formatFixtureCount=function(count){var showAllLinkText=this._settings.getShowAllLinkText(this.stem.data[this._settings.classificationIdAttribute]);return ns_gen5_util.StringUtil.Format(showAllLinkText,count.toString())},Classification.prototype.createContainer=function(){var _this=this;this.stem&&(this._container=new GenericStemRenderer,this._container.addStyle("lip-classification_container"),this._container.createChildInstance=function(stem){return _this._fixtureFactory.createFixture(stem)},this._container.stem=this.stem,this.appendChild(this._container))},Classification}(ComponentStemBase);LiveInPlay.Classification=Classification}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var TopicSubscriptionCommand=function(){function TopicSubscriptionCommand(){}return TopicSubscriptionCommand.prototype.subscribeToTopic=function(topic,subscriptionHandler){var user=Locator.user,formattedTopic=ns_gen5_util.StringUtil.Format(topic,user.languageId,user.zoneId);Locator.subscriptionManager.subscribe(formattedTopic,subscriptionHandler)},TopicSubscriptionCommand}();LiveInPlay.TopicSubscriptionCommand=TopicSubscriptionCommand}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var ClassificationId=function(){function ClassificationId(){}return ClassificationId.soccer="1",ClassificationId.horseRacing="2",ClassificationId.cricket="3",ClassificationId.golf="7",ClassificationId.rugbyUnion="8",ClassificationId.tennis="13",ClassificationId.baseball="16",ClassificationId.iceHockey="17",ClassificationId.basketball="18",ClassificationId.rugbyLeague="19",ClassificationId.australianRules="36",ClassificationId.cycling="38",ClassificationId.bowls="66",ClassificationId.handball="78",ClassificationId.trotting="88",ClassificationId.volleyball="91",ClassificationId.tableTennis="92",ClassificationId.badminton="94",ClassificationId.beachVolleyball="95",ClassificationId.squash="107",ClassificationId}();LiveInPlay.ClassificationId=ClassificationId}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Scores=function(){function Scores(shortScore,shortPoints,classificationId){this.teamOneScores=[];this.teamTwoScores=[];this._pointSplitter=",";this._teamSplitter="-";this.splitScores(shortScore,shortPoints,classificationId)}return Scores.prototype.splitScores=function(shortScore,shortPoints,classificationId){var workingScore=this.getWorkingScore(shortScore,shortPoints,classificationId),pointSplit=workingScore.split(this._pointSplitter)||[],score,i,len;for(pointSplit.reverse(),i=0,len=pointSplit.length;i<len;i++)score=(pointSplit[i]||"").split(this._teamSplitter),this.teamOneScores.push(score[0]||" "),this.teamTwoScores.push(score[1]||" ")},Scores.prototype.getWorkingScore=function(shortScore,shortPoints,classificationId){return classificationId!==LiveInPlay.ClassificationId.cricket&&shortPoints?shortPoints+this._pointSplitter:shortScore||shortPoints||""},Scores}();LiveInPlay.Scores=Scores}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Component=ns_gen5_ui.Component,ScoresContainer=function(_super){function ScoresContainer(stem,settings){var _this=_super.call(this)||this;return _this.addStyle("lip-scores_wrapper"),_this.settings=settings,_this.scores=_this.getScores(stem),_this}return __extends(ScoresContainer,_super),ScoresContainer.prototype.updateScores=function(stem){this.scores=this.getScores(stem)},ScoresContainer.prototype.getScores=function(stem){return new LiveInPlay.Scores(stem.data.SS,stem.data.XP,stem.parent.data.ID)},ScoresContainer}(Component);LiveInPlay.ScoresContainer=ScoresContainer}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Component=ns_gen5_ui.Component,Label=ns_gen5_ui.Label,MultipleScoresContainer=function(_super){function MultipleScoresContainer(stem,settings){var _this=_super.call(this,stem,settings)||this;return _this.initialiseContainers(),_this}return __extends(MultipleScoresContainer,_super),MultipleScoresContainer.prototype.createChildren=function(){this.appendContainers()},MultipleScoresContainer.prototype.updateScores=function(stem){_super.prototype.updateScores.call(this,stem);this.removeContainers();this.initialiseContainers();this.appendContainers();this.writeOutScores()},MultipleScoresContainer.prototype.removeContainers=function(){this._teamOneScoreContainer&&this.removeChild(this._teamOneScoreContainer);this._teamTwoScoreContainer&&this.removeChild(this._teamTwoScoreContainer)},MultipleScoresContainer.prototype.initialiseContainers=function(){this._teamOneScoreContainer=new Component;this._teamTwoScoreContainer=new Component;this._teamOneScoreContainer.addStyle("lip-scores_teamOneScoreContainer");this._teamTwoScoreContainer.addStyle("lip-scores_teamTwoScoreContainer")},MultipleScoresContainer.prototype.appendContainers=function(){this.appendChild(this._teamOneScoreContainer);this.appendChild(this._teamTwoScoreContainer)},MultipleScoresContainer.prototype.writeOutScores=function(){this.writeScoresToContainer(this._teamOneScoreContainer,this.scores.teamOneScores);this.writeScoresToContainer(this._teamTwoScoreContainer,this.scores.teamTwoScores)},MultipleScoresContainer.prototype.writeScoresToContainer=function(container,scores){for(var label,j=0;j<scores.length;j++)label=new Label,label.addStyle("lip-score"),label.setText(scores[j]),container.appendChild(label)},MultipleScoresContainer}(LiveInPlay.ScoresContainer);LiveInPlay.MultipleScoresContainer=MultipleScoresContainer}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Component=ns_gen5_ui.Component,Label=ns_gen5_ui.Label,SingleScoresContainer=function(_super){function SingleScoresContainer(stem,settings){var _this=_super.call(this,stem,settings)||this;return _this._scoreContainer=new Component,_this._scoreLabel=new Label,_this._scoreContainer.addStyle("lip-scores_defaultScoreContainer"),_this._scoreLabel.addStyle("lip-scores_defaultScoreLabel"),_this}return __extends(SingleScoresContainer,_super),SingleScoresContainer.prototype.updateScores=function(stem){_super.prototype.updateScores.call(this,stem);this._scoreLabel.setText(this.scores.shortScore||"")},SingleScoresContainer.prototype.createChildren=function(){this.appendChild(this._scoreContainer)},SingleScoresContainer}(LiveInPlay.ScoresContainer);LiveInPlay.SingleScoresContainer=SingleScoresContainer}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Component=ns_gen5_ui.Component,TeamNamesContainer=function(_super){function TeamNamesContainer(style){var _this=_super.call(this)||this;return _this.addStyle(style),_this}return __extends(TeamNamesContainer,_super),TeamNamesContainer}(Component);LiveInPlay.TeamNamesContainer=TeamNamesContainer}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Label=ns_gen5_ui.Label,MultipleTeamNamesContainer=function(_super){function MultipleTeamNamesContainer(team1,team2){var _this=_super.call(this,"lip-teams_multipleTeamNamesContainer")||this;return _this.initialiseTeamLabels(team1,team2),_this}return __extends(MultipleTeamNamesContainer,_super),MultipleTeamNamesContainer.prototype.createChildren=function(){this.appendChild(this._teamOneLabel);this.appendChild(this._teamTwoLabel)},MultipleTeamNamesContainer.prototype.initialiseTeamLabels=function(team1,team2){this._teamOneLabel=new Label;this._teamTwoLabel=new Label;this._teamOneLabel.addStyle("lip-teams_teamNameOne");this._teamTwoLabel.addStyle("lip-teams_teamNameTwo");this._teamOneLabel.setText(team1);this._teamTwoLabel.setText(team2)},MultipleTeamNamesContainer}(LiveInPlay.TeamNamesContainer);LiveInPlay.MultipleTeamNamesContainer=MultipleTeamNamesContainer}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Label=ns_gen5_ui.Label,SingleLongTeamNameContainer=function(_super){function SingleLongTeamNameContainer(teamName){var _this=_super.call(this,"lip-teams_singleLongTeamNameContainer")||this;return _this.initialiseTeamLabel(teamName),_this}return __extends(SingleLongTeamNameContainer,_super),SingleLongTeamNameContainer.prototype.createChildren=function(){this.appendChild(this._teamNameLabel)},SingleLongTeamNameContainer.prototype.initialiseTeamLabel=function(teamName){this._teamNameLabel=new Label;this._teamNameLabel.addStyle("lip-teams_teamName");this._teamNameLabel.setText(teamName)},SingleLongTeamNameContainer}(LiveInPlay.TeamNamesContainer);LiveInPlay.SingleLongTeamNameContainer=SingleLongTeamNameContainer}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Label=ns_gen5_ui.Label,SingleTeamNameContainer=function(_super){function SingleTeamNameContainer(teamName){var _this=_super.call(this,"lip-teams_singleTeamNameContainer")||this;return _this.initialiseTeamLabel(teamName),_this}return __extends(SingleTeamNameContainer,_super),SingleTeamNameContainer.prototype.createChildren=function(){this.appendChild(this._teamNameLabel)},SingleTeamNameContainer.prototype.initialiseTeamLabel=function(teamName){this._teamNameLabel=new Label;this._teamNameLabel.addStyle("lip-teams_teamName");this._teamNameLabel.setText(teamName)},SingleTeamNameContainer}(LiveInPlay.TeamNamesContainer);LiveInPlay.SingleTeamNameContainer=SingleTeamNameContainer}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var ComponentStemBase=ns_gen5_ui.ComponentStemBase,TextNode=ns_gen5_ui.TextNode,CurrentProgress=function(_super){function CurrentProgress(){var _this=_super.call(this)||this;return _this.addStyle("lip-currentProgress"),_this._progressChanged=!0,_this}return __extends(CurrentProgress,_super),CurrentProgress.prototype.createChildren=function(){this._progressElement=new TextNode;this.appendChild(this._progressElement)},CurrentProgress.prototype.commitProperties=function(){this._progressChanged&&this.stem&&(this._progressChanged=!1,this._progressElement.setText(this.stem.data.CP))},CurrentProgress.prototype.stemUpdateHandler=function(stem,updateData){"CP"in updateData&&(this._progressChanged=!0,this.invalidateProperties())},CurrentProgress}(ComponentStemBase);LiveInPlay.CurrentProgress=CurrentProgress}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Component=ns_gen5_ui.Component,GameTimerTextNode=ns_inplay_general.GameTimerTextNode,DomElement=ns_gen5_ui.DomElement,Timer=function(_super){function Timer(stem){var _this=_super.call(this)||this;return _this.stem=stem,_this.addStyle("lip-timer_container"),_this}return __extends(Timer,_super),Timer.prototype.createChildren=function(){this.stem.data.DC==="1"&&(this.setupTimerElements(),this.appendChild(this._timerElement));this.stem.data.CP&&(this.setupCurrentProgress(),this.appendChild(this._currentProgress))},Timer.prototype.setupTimerElements=function(){this._timerElement=new DomElement;this._timerElement.setAttribute("class","lip-timer_element");this._gameTimeText=new GameTimerTextNode;this._gameTimeText.stem=this.stem;this._timerElement.appendChild(this._gameTimeText)},Timer.prototype.setupCurrentProgress=function(){this._currentProgress=new LiveInPlay.CurrentProgress;this._currentProgress.stem=this.stem},Timer}(Component);LiveInPlay.Timer=Timer}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var BlankClassificationFactory=function(){function BlankClassificationFactory(fixtureFactory,settings){this._fixtureFactory=fixtureFactory;this._settings=settings}return BlankClassificationFactory.prototype.createClassification=function(){return new LiveInPlay.Classification(new LiveInPlay.BlankHeader,this._settings,this._fixtureFactory)},BlankClassificationFactory}();LiveInPlay.BlankClassificationFactory=BlankClassificationFactory}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var ClassificationFactory=function(){function ClassificationFactory(fixtureFactory,settings){this._fixtureFactory=fixtureFactory;this._settings=settings}return ClassificationFactory.prototype.createClassification=function(){return new LiveInPlay.Classification(new LiveInPlay.ClassificationHeader,this._settings,this._fixtureFactory)},ClassificationFactory}();LiveInPlay.ClassificationFactory=ClassificationFactory}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var FixtureDataConverter=ns_inplay_utils.FixtureDataConverter,FixtureNames=function(){function FixtureNames(name){this.name=name;this.hasTeams=!1;var splitTeams=FixtureDataConverter.SplitParticipantNames(this.name);splitTeams.length>1&&splitTeams[1]!==""&&(this.hasTeams=!0,this.teamOne=splitTeams[0],this.teamTwo=splitTeams[1])}return FixtureNames}();LiveInPlay.FixtureNames=FixtureNames}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var FixtureConfig=function(){function FixtureConfig(classificationId,showAllLinkText,link,displayMultipleTeamNames,displayScores,displayTimer){this.classificationId=classificationId;this.showAllLinkText=showAllLinkText;this.link=link;this.displayMultipleTeamNames=displayMultipleTeamNames;this.displayScores=displayScores;this.displayTimer=displayTimer}return FixtureConfig}();LiveInPlay.FixtureConfig=FixtureConfig}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Specification=Typescript.Specifications.Specification,DisplayScores=function(_super){function DisplayScores(){return _super!==null&&_super.apply(this,arguments)||this}return __extends(DisplayScores,_super),DisplayScores.prototype.isSatisfiedBy=function(candidate){return candidate.displayScores},DisplayScores}(Specification);LiveInPlay.DisplayScores=DisplayScores}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Specification=Typescript.Specifications.Specification,DisplayMultipleTeamNames=function(_super){function DisplayMultipleTeamNames(){return _super!==null&&_super.apply(this,arguments)||this}return __extends(DisplayMultipleTeamNames,_super),DisplayMultipleTeamNames.prototype.isSatisfiedBy=function(candidate){return candidate.displayMultipleTeamNames},DisplayMultipleTeamNames}(Specification);LiveInPlay.DisplayMultipleTeamNames=DisplayMultipleTeamNames}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Specification=Typescript.Specifications.Specification,DisplayTimer=function(_super){function DisplayTimer(){return _super!==null&&_super.apply(this,arguments)||this}return __extends(DisplayTimer,_super),DisplayTimer.prototype.isSatisfiedBy=function(candidate){return candidate.displayTimer},DisplayTimer}(Specification);LiveInPlay.DisplayTimer=DisplayTimer}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Display=function(){function Display(){}return Display.scores=new LiveInPlay.DisplayScores,Display.multipleTeamNames=new LiveInPlay.DisplayMultipleTeamNames,Display.timer=new LiveInPlay.DisplayTimer,Display}();LiveInPlay.Display=Display}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var ComponentStemBase=ns_gen5_ui.ComponentStemBase,FixtureBase=function(_super){function FixtureBase(style){var _this=_super.call(this)||this;return _this.addStyle(style),_this.scoresChanged=!0,_this._suspendedChanged=!0,_this}return __extends(FixtureBase,_super),FixtureBase.prototype.createChildren=function(){},FixtureBase.prototype.updateFixturesScore=function(){},FixtureBase.prototype.commitProperties=function(){this._suspendedChanged&&this.stem&&(this._suspendedChanged=!1,this.updateFixtureVisibility());this.scoresChanged&&this.stem&&(this.scoresChanged=!1,this.updateFixturesScore())},FixtureBase.prototype.stemUpdateHandler=function(stem){("SS"in stem.data||"XP"in stem.data)&&(this.scoresChanged=!0);"SU"in stem.data&&(this._suspendedChanged=!0);(this.scoresChanged||this._suspendedChanged)&&this.invalidateProperties()},FixtureBase.prototype.updateFixtureVisibility=function(){var hidden=this.stem.data.SU&&this.stem.data.SU==="1";hidden?this.suspendElementFromDom():this.unsuspendElementFromDom()},FixtureBase}(ComponentStemBase);LiveInPlay.FixtureBase=FixtureBase}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var TimedFixture=function(_super){function TimedFixture(_timer,_teamsContainer,_scoresContainer){var _this=_super.call(this,"lip-liveInPlayTimedFixture")||this;return _this._timer=_timer,_this._teamsContainer=_teamsContainer,_this._scoresContainer=_scoresContainer,_this}return __extends(TimedFixture,_super),TimedFixture.prototype.createChildren=function(){this.appendChild(this._timer);this.appendChild(this._teamsContainer);this.appendChild(this._scoresContainer)},TimedFixture.prototype.updateFixturesScore=function(){this._scoresContainer.updateScores(this.stem)},TimedFixture}(LiveInPlay.FixtureBase);LiveInPlay.TimedFixture=TimedFixture}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Fixture=function(_super){function Fixture(_teamsContainer,_scoresContainer){var _this=_super.call(this,"lip-liveInPlayFixture")||this;return _this._teamsContainer=_teamsContainer,_this._scoresContainer=_scoresContainer,_this}return __extends(Fixture,_super),Fixture.prototype.createChildren=function(){this.appendChild(this._teamsContainer);this.appendChild(this._scoresContainer)},Fixture.prototype.updateFixturesScore=function(){this._scoresContainer.updateScores(this.stem)},Fixture}(LiveInPlay.FixtureBase);LiveInPlay.Fixture=Fixture}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var TimedNameOnlyFixture=function(_super){function TimedNameOnlyFixture(_timer,_teamsContainer){var _this=_super.call(this,"lip-liveInPlayNameOnlyFixture")||this;return _this._timer=_timer,_this._teamsContainer=_teamsContainer,_this}return __extends(TimedNameOnlyFixture,_super),TimedNameOnlyFixture.prototype.createChildren=function(){this.appendChild(this._timer);this.appendChild(this._teamsContainer)},TimedNameOnlyFixture.prototype.updateFixturesScore=function(){},TimedNameOnlyFixture}(LiveInPlay.FixtureBase);LiveInPlay.TimedNameOnlyFixture=TimedNameOnlyFixture}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var NameOnlyFixture=function(_super){function NameOnlyFixture(_teamsContainer){var _this=_super.call(this,"lip-liveInPlayNameOnlyFixture")||this;return _this._teamsContainer=_teamsContainer,_this}return __extends(NameOnlyFixture,_super),NameOnlyFixture.prototype.createChildren=function(){this.appendChild(this._teamsContainer)},NameOnlyFixture.prototype.updateFixturesScore=function(){},NameOnlyFixture}(LiveInPlay.FixtureBase);LiveInPlay.NameOnlyFixture=NameOnlyFixture}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var ConfigurableFixtureFactory=function(){function ConfigurableFixtureFactory(settings,fixtureConfigFactory){this.settings=settings;this.fixtureConfigFactory=fixtureConfigFactory}return ConfigurableFixtureFactory.prototype.createFixture=function(stem){var name=stem.data.NA;return this.createFixtureComponent(stem,new LiveInPlay.FixtureNames(name))},ConfigurableFixtureFactory.prototype.createFixtureComponent=function(stem,fixtureNames){var classificationId=stem.parent.data[this.settings.classificationIdAttribute]||stem.data[this.settings.classificationIdAttribute],classificationConfiguration=this.settings.getFixtureConfiguration(classificationId);if(classificationConfiguration){classificationConfiguration.displayMultipleTeamNames&&!fixtureNames.hasTeams&&(classificationConfiguration=this.fixtureConfigFactory.overrideDisplayMultipleTeamNames(classificationConfiguration,!1));switch(!0){case LiveInPlay.Display.scores.and(LiveInPlay.Display.multipleTeamNames).and(LiveInPlay.Display.timer).isSatisfiedBy(classificationConfiguration):return new LiveInPlay.TimedFixture(new LiveInPlay.Timer(stem),new LiveInPlay.MultipleTeamNamesContainer(fixtureNames.teamOne,fixtureNames.teamTwo),new LiveInPlay.MultipleScoresContainer(stem,this.settings));case LiveInPlay.Display.scores.and(LiveInPlay.Display.multipleTeamNames).and(LiveInPlay.Display.timer.not()).isSatisfiedBy(classificationConfiguration):return new LiveInPlay.Fixture(new LiveInPlay.MultipleTeamNamesContainer(fixtureNames.teamOne,fixtureNames.teamTwo),new LiveInPlay.MultipleScoresContainer(stem,this.settings));case LiveInPlay.Display.scores.and(LiveInPlay.Display.multipleTeamNames.not()).and(LiveInPlay.Display.timer).isSatisfiedBy(classificationConfiguration):return new LiveInPlay.TimedFixture(new LiveInPlay.Timer(stem),new LiveInPlay.SingleTeamNameContainer(fixtureNames.name),new LiveInPlay.SingleScoresContainer(stem,this.settings));case LiveInPlay.Display.scores.and(LiveInPlay.Display.multipleTeamNames.not()).and(LiveInPlay.Display.timer.not()).isSatisfiedBy(classificationConfiguration):return new LiveInPlay.Fixture(new LiveInPlay.SingleTeamNameContainer(fixtureNames.name),new LiveInPlay.SingleScoresContainer(stem,this.settings));case LiveInPlay.Display.scores.not().and(LiveInPlay.Display.multipleTeamNames).and(LiveInPlay.Display.timer).isSatisfiedBy(classificationConfiguration):return new LiveInPlay.TimedNameOnlyFixture(new LiveInPlay.Timer(stem),new LiveInPlay.MultipleTeamNamesContainer(fixtureNames.teamOne,fixtureNames.teamTwo));case LiveInPlay.Display.scores.not().and(LiveInPlay.Display.multipleTeamNames).and(LiveInPlay.Display.timer.not()).isSatisfiedBy(classificationConfiguration):return new LiveInPlay.NameOnlyFixture(new LiveInPlay.MultipleTeamNamesContainer(fixtureNames.teamOne,fixtureNames.teamTwo));case LiveInPlay.Display.scores.not().and(LiveInPlay.Display.multipleTeamNames.not()).and(LiveInPlay.Display.timer).isSatisfiedBy(classificationConfiguration):return new LiveInPlay.TimedNameOnlyFixture(new LiveInPlay.Timer(stem),new LiveInPlay.SingleLongTeamNameContainer(fixtureNames.name));case LiveInPlay.Display.scores.not().and(LiveInPlay.Display.multipleTeamNames.not()).and(LiveInPlay.Display.timer.not()).isSatisfiedBy(classificationConfiguration):return new LiveInPlay.NameOnlyFixture(new LiveInPlay.SingleLongTeamNameContainer(fixtureNames.name));default:return this.bestGuessBasedOnNumberOfTeamNames(stem,fixtureNames)}}return this.bestGuessBasedOnNumberOfTeamNames(stem,fixtureNames)},ConfigurableFixtureFactory.prototype.bestGuessBasedOnNumberOfTeamNames=function(stem,fixtureNames){return fixtureNames.hasTeams?new LiveInPlay.TimedFixture(new LiveInPlay.Timer(stem),new LiveInPlay.MultipleTeamNamesContainer(fixtureNames.teamOne,fixtureNames.teamTwo),new LiveInPlay.MultipleScoresContainer(stem,this.settings)):new LiveInPlay.TimedFixture(new LiveInPlay.Timer(stem),new LiveInPlay.SingleTeamNameContainer(fixtureNames.name),new LiveInPlay.SingleScoresContainer(stem,this.settings))},ConfigurableFixtureFactory}();LiveInPlay.ConfigurableFixtureFactory=ConfigurableFixtureFactory}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var FixtureConfigFactory=function(){function FixtureConfigFactory(){}return FixtureConfigFactory.prototype.overrideDisplayMultipleTeamNames=function(currentConfig,hasMultipleTeamNames){return this.createFixtureConfig(currentConfig.classificationId,currentConfig.showAllLinkText,currentConfig.link,hasMultipleTeamNames,currentConfig.displayScores,currentConfig.displayTimer)},FixtureConfigFactory.prototype.createFixtureConfig=function(classificationId,showAllLinkText,link,displayMultipleTeamNames,displayScores,displayTimer){return new LiveInPlay.FixtureConfig(classificationId,showAllLinkText,link,displayMultipleTeamNames,displayScores,displayTimer)},FixtureConfigFactory}();LiveInPlay.FixtureConfigFactory=FixtureConfigFactory}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var FixtureFactory=function(){function FixtureFactory(_settings){this._settings=_settings}return FixtureFactory.prototype.createFixture=function(stem){var name=stem.data.NA;return this.createFixtureComponent(stem,new LiveInPlay.FixtureNames(name))},FixtureFactory.prototype.createFixtureComponent=function(stem,fixtureNames){var classificationId=stem.parent.data[this._settings.classificationIdAttribute];switch(classificationId){case LiveInPlay.ClassificationId.tennis:case LiveInPlay.ClassificationId.beachVolleyball:case LiveInPlay.ClassificationId.baseball:case LiveInPlay.ClassificationId.badminton:case LiveInPlay.ClassificationId.squash:case LiveInPlay.ClassificationId.volleyball:case LiveInPlay.ClassificationId.bowls:return new LiveInPlay.Fixture(new LiveInPlay.MultipleTeamNamesContainer(fixtureNames.teamOne,fixtureNames.teamTwo),new LiveInPlay.MultipleScoresContainer(stem,this._settings));case LiveInPlay.ClassificationId.trotting:case LiveInPlay.ClassificationId.golf:case LiveInPlay.ClassificationId.horseRacing:case LiveInPlay.ClassificationId.cycling:return new LiveInPlay.NameOnlyFixture(new LiveInPlay.SingleLongTeamNameContainer(fixtureNames.name));case LiveInPlay.ClassificationId.cricket:return new LiveInPlay.TimedFixture(new LiveInPlay.Timer(stem),new LiveInPlay.SingleTeamNameContainer(fixtureNames.name),new LiveInPlay.SingleScoresContainer(stem,this._settings));case LiveInPlay.ClassificationId.rugbyUnion:case LiveInPlay.ClassificationId.rugbyLeague:case LiveInPlay.ClassificationId.australianRules:return new LiveInPlay.TimedFixture(new LiveInPlay.Timer(stem),new LiveInPlay.MultipleTeamNamesContainer(fixtureNames.teamOne,fixtureNames.teamTwo),new LiveInPlay.MultipleScoresContainer(stem,this._settings));default:return this.bestGuessBasedOnNumberOfTeamNames(stem,fixtureNames)}},FixtureFactory.prototype.bestGuessBasedOnNumberOfTeamNames=function(stem,fixtureNames){return fixtureNames.hasTeams?new LiveInPlay.TimedFixture(new LiveInPlay.Timer(stem),new LiveInPlay.MultipleTeamNamesContainer(fixtureNames.teamOne,fixtureNames.teamTwo),new LiveInPlay.MultipleScoresContainer(stem,this._settings)):new LiveInPlay.TimedFixture(new LiveInPlay.Timer(stem),new LiveInPlay.SingleTeamNameContainer(fixtureNames.name),new LiveInPlay.SingleScoresContainer(stem,this._settings))},FixtureFactory}();LiveInPlay.FixtureFactory=FixtureFactory}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var TextNode=ns_gen5_ui.TextNode,Component=ns_gen5_ui.Component,TextLabel=function(_super){function TextLabel(_settings){var _this=_super.call(this)||this;return _this._settings=_settings,_this._titleText=_this._settings.title,_this}return __extends(TextLabel,_super),TextLabel.prototype.createChildren=function(){this.appendChild(this.createInPlayTextNode())},TextLabel.prototype.createInPlayTextNode=function(){var label=new Component("h3");return label.addStyle("lip-liveInPlayPod_headerText"),label.appendChild(new TextNode(this._titleText)),label},TextLabel}(ns_gen5_ui.Component);LiveInPlay.TextLabel=TextLabel}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var VisibleClassificationsProvider=function(){function VisibleClassificationsProvider(){}return VisibleClassificationsProvider.prototype.countVisibleClassifications=function(stem){var total=0;return stem&&(stem.getChildren()||[]).forEach(function(classification){classification.data.SU&&classification.data.SU!=="0"||total++}),total},VisibleClassificationsProvider}();LiveInPlay.VisibleClassificationsProvider=VisibleClassificationsProvider}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Component=ns_gen5_ui.Component,PodHeader=function(_super){function PodHeader(textLabel){var _this=_super.call(this)||this;return _this.textLabel=textLabel,_this}return __extends(PodHeader,_super),PodHeader.prototype.createChildren=function(){this.addStyle("lip-liveInPlayPod_header");this.appendChild(this.textLabel)},PodHeader}(Component);LiveInPlay.PodHeader=PodHeader}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Delegate=ns_gen5_util.Delegate,PodBaseView=function(_super){function PodBaseView(_header,_subscriber,_subscriptionHandlerFunction,stemProvider,stemFilterFactory,visibleClassificationsProvider,settings){var _this=_super.call(this)||this;return _this._header=_header,_this._subscriber=_subscriber,_this._subscriptionHandlerFunction=_subscriptionHandlerFunction,_this.stemProvider=stemProvider,_this.stemFilterFactory=stemFilterFactory,_this.visibleClassificationsProvider=visibleClassificationsProvider,_this.settings=settings,_this._subscriptionHandlerDelegate=new Delegate(_this,_this._subscriptionHandlerFunction),_this._classificationFixtureChangeDelegate=new Delegate(_this,_this.classificationFixtureChangeHandler),_this.fixtureDataChanged=!0,_this}return __extends(PodBaseView,_super),PodBaseView.prototype.commitProperties=function(){this.fixtureDataChanged&&(this.fixtureDataChanged=!1,this.stemFilterFactory.createStemFilter().filterStemData(this.rootStem),this.hideShowView(this.rootStem))},PodBaseView.prototype.createChildren=function(){this.appendChild(this._header);this._subscriber.subscribeToTopic(this.settings.subscriptionTopic,this._subscriptionHandlerDelegate)},PodBaseView.prototype.classificationFixtureChangeHandler=function(event){var theStem=event.data?event.data:event.target;event.type===ns_gen5_data.StemEvent.DELETE?(theStem.removeEventListener(ns_gen5_data.StemEvent.INSERT,this._classificationFixtureChangeDelegate),theStem.removeEventListener(ns_gen5_data.StemEvent.DELETE,this._classificationFixtureChangeDelegate)):event.type===ns_gen5_data.StemEvent.INSERT&&(theStem.nodeName==="CL"&&theStem.addEventListener(ns_gen5_data.StemEvent.INSERT,this._classificationFixtureChangeDelegate),theStem.addEventListener(ns_gen5_data.StemEvent.DELETE,this._classificationFixtureChangeDelegate));this.fixtureDataChanged=!0;this.invalidateProperties()},PodBaseView.prototype.addEventListeners=function(stem){var _this=this;stem&&(this.addInsertAndDeleteListeners(stem),(stem.getChildren()||[]).forEach(function(childStem){_this.addInsertAndDeleteListeners(childStem);(childStem.getChildren()||[]).forEach(function(grandChildStem){_this.addInsertAndDeleteListeners(grandChildStem)})}))},PodBaseView.prototype.addInsertAndDeleteListeners=function(stem){stem.addEventListener(ns_gen5_data.StemEvent.INSERT,this._classificationFixtureChangeDelegate);stem.addEventListener(ns_gen5_data.StemEvent.DELETE,this._classificationFixtureChangeDelegate)},PodBaseView.prototype.hideShowView=function(stem){this.visibleClassificationsProvider.countVisibleClassifications(stem)===0?this.suspendElementFromDom():this.unsuspendElementFromDom()},PodBaseView}(ns_gen5_ui.Component);LiveInPlay.PodBaseView=PodBaseView}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var GenericStemRenderer=ns_gen5_ui.GenericStemRenderer,LiveInPlayPodView=function(_super){function LiveInPlayPodView(header,subscriber,stemProvider,classificationFactory,stemFilterFactory,visibleClassificationsProvider,settings){var _this=_super.call(this,header,subscriber,function(event){return _this.subscriptionHandler(event)},stemProvider,stemFilterFactory,visibleClassificationsProvider,settings)||this;return _this._classificationFactory=classificationFactory,_this}return __extends(LiveInPlayPodView,_super),LiveInPlayPodView.prototype.subscriptionHandler=function(event){var _this=this;this.rootStem=this.stemProvider.getTree(event.type,this.settings.subscriptionTopic);this.rootStem&&(this.addEventListeners(this.rootStem),this._content=new GenericStemRenderer,this._content.createChildInstance=function(){return _this._classificationFactory.createClassification()},this._content.stem=this.rootStem,this.appendChild(this._content),this.hideShowView(this.rootStem))},LiveInPlayPodView}(LiveInPlay.PodBaseView);LiveInPlay.LiveInPlayPodView=LiveInPlayPodView}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var ConfiguredFixturesBase=function(){function ConfiguredFixturesBase(visibleClassificationsProvider,fallbackStemFilter,settings){this.visibleClassificationsProvider=visibleClassificationsProvider;this.fallbackStemFilter=fallbackStemFilter;this.settings=settings}return ConfiguredFixturesBase.prototype.suspendStem=function(stem){stem.update({SU:"1"})},ConfiguredFixturesBase.prototype.unSuspendStem=function(stem){stem.update({SU:"0"})},ConfiguredFixturesBase}();LiveInPlay.ConfiguredFixturesBase=ConfiguredFixturesBase}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var ConfiguredFixturesFilter=function(_super){function ConfiguredFixturesFilter(visibleClassificationsProvider,fallbackStemFilter,settings){return _super.call(this,visibleClassificationsProvider,fallbackStemFilter,settings)||this}return __extends(ConfiguredFixturesFilter,_super),ConfiguredFixturesFilter.prototype.filterStemData=function(stem){var _this=this;return stem&&((stem.getChildren()||[]).forEach(function(childStem){var count=0,classificationId=childStem.data[_this.settings.classificationIdAttribute],maxFixturesForClassification=_this.settings.getMaxFixtures(classificationId);(childStem.getChildren()||[]).forEach(function(grandChildStem){grandChildStem.filtered||grandChildStem.data[LiveInPlay.SportsContentAttributes.filteredOut]==="1"||Number(grandChildStem.data.ET)>0||maxFixturesForClassification!==-1&&count>=maxFixturesForClassification?_this.suspendStem(grandChildStem):(_this.unSuspendStem(grandChildStem),count++)});count===0?_this.suspendStem(childStem):_this.unSuspendStem(childStem)}),this.visibleClassificationsProvider.countVisibleClassifications(stem)===0&&(stem=this.fallbackStemFilter.filterStemData(stem))),stem},ConfiguredFixturesFilter}(LiveInPlay.ConfiguredFixturesBase);LiveInPlay.ConfiguredFixturesFilter=ConfiguredFixturesFilter}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var ConfiguredFixturesNoClassificationFilter=function(_super){function ConfiguredFixturesNoClassificationFilter(visibleClassificationsProvider,fallbackStemFilter,settings){return _super.call(this,visibleClassificationsProvider,fallbackStemFilter,settings)||this}return __extends(ConfiguredFixturesNoClassificationFilter,_super),ConfiguredFixturesNoClassificationFilter.prototype.filterStemData=function(stem){var _this=this,count;return stem&&(count=0,(stem.getChildren()||[]).forEach(function(childStem){var classificationId=childStem.data.CL,maxFixturesForClassification=_this.settings.getMaxFixtures(classificationId);childStem.filtered||childStem.data[LiveInPlay.SportsContentAttributes.filteredOut]==="1"||Number(childStem.data.ET)>0||maxFixturesForClassification!==-1&&count>=maxFixturesForClassification?_this.suspendStem(childStem):(_this.unSuspendStem(childStem),count++)}),this.visibleClassificationsProvider.countVisibleClassifications(stem)===0&&(stem=this.fallbackStemFilter.filterStemData(stem))),stem},ConfiguredFixturesNoClassificationFilter}(LiveInPlay.ConfiguredFixturesBase);LiveInPlay.ConfiguredFixturesNoClassificationFilter=ConfiguredFixturesNoClassificationFilter}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var MobileAndVideoFilter=function(){function MobileAndVideoFilter(filter,settings){this._filter=filter;this._settings=settings}return MobileAndVideoFilter.prototype.filterStemData=function(stem){return stem&&(stem.getChildren()||[]).forEach(function(childStem){(childStem.getChildren()||[]).forEach(function(grandChildStem){grandChildStem.data[LiveInPlay.SportsContentAttributes.filteredOut]=grandChildStem.data.VI&&grandChildStem.data.VI!=="0"?"0":"1"})}),this._filter.filterStemData(stem)},MobileAndVideoFilter}();LiveInPlay.MobileAndVideoFilter=MobileAndVideoFilter}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var StemFilterFactory=function(){function StemFilterFactory(_visibleClassificationsProvider,_fallbackStemFilter,_subscriptionContainsClassificationData,_settings){this._visibleClassificationsProvider=_visibleClassificationsProvider;this._fallbackStemFilter=_fallbackStemFilter;this._subscriptionContainsClassificationData=_subscriptionContainsClassificationData;this._settings=_settings}return StemFilterFactory.prototype.createStemFilter=function(){return this._settings.containsFixtureConfiguration()?this._subscriptionContainsClassificationData?this.createFilter(new LiveInPlay.ConfiguredFixturesFilter(this._visibleClassificationsProvider,this._fallbackStemFilter,this._settings)):this.createFilter(new LiveInPlay.ConfiguredFixturesNoClassificationFilter(this._visibleClassificationsProvider,this._fallbackStemFilter,this._settings)):this.createFilter(this._fallbackStemFilter)},StemFilterFactory.prototype.createFilter=function(filter){return this._settings.displayLiveStreamsOnly?new LiveInPlay.MobileAndVideoFilter(filter,this._settings):filter},StemFilterFactory}();LiveInPlay.StemFilterFactory=StemFilterFactory}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var TopThreeSportsFilter=function(){function TopThreeSportsFilter(){}return TopThreeSportsFilter.prototype.filterStemData=function(stem){var _this=this,classificationCount;return stem&&(classificationCount=0,(stem.getChildren()||[]).forEach(function(childStem){var fixtureCount=0;classificationCount<3?((childStem.getChildren()||[]).forEach(function(grandChildStem){grandChildStem.filtered||grandChildStem.data[LiveInPlay.SportsContentAttributes.filteredOut]==="1"||Number(grandChildStem.data.ET)>0||fixtureCount>=2?_this.suspendStem(grandChildStem):(_this.unSuspendStem(grandChildStem),fixtureCount++)}),fixtureCount===0?_this.suspendStem(childStem):(_this.unSuspendStem(childStem),classificationCount++)):_this.suspendStem(childStem)})),stem},TopThreeSportsFilter.prototype.suspendStem=function(stem){stem.update({SU:"1"})},TopThreeSportsFilter.prototype.unSuspendStem=function(stem){stem.update({SU:"0"})},TopThreeSportsFilter}();LiveInPlay.TopThreeSportsFilter=TopThreeSportsFilter}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var FilteredStemProvider=function(){function FilteredStemProvider(_stemProvider,_stemFilterFactory){this._stemProvider=_stemProvider;this._stemFilterFactory=_stemFilterFactory}return FilteredStemProvider.prototype.getTree=function(type,subscriptionTopic){var rootStem=this._stemProvider.getTree(type,subscriptionTopic),filter=this._stemFilterFactory.createStemFilter();return filter.filterStemData(rootStem)},FilteredStemProvider}();LiveInPlay.FilteredStemProvider=FilteredStemProvider}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var StemProvider=function(){function StemProvider(){}return StemProvider.prototype.getTree=function(eventType,subscriptionTopic){var stem=Locator.treeLookup.getReference(eventType);if(stem)switch(subscriptionTopic){case"InPlay_{0}_{1}":case"Media_L{0}_Z{1}":return stem;case"LIInPlay_{0}_{1}":case"NN_1_0":return stem.getChildren()[0];default:return stem}throw new Error("Could not retrieve root stem for subscription "+subscriptionTopic+" and type "+eventType);},StemProvider}();LiveInPlay.StemProvider=StemProvider}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var LiveInPlayPodViewFactory=function(){function LiveInPlayPodViewFactory(){}return LiveInPlayPodViewFactory.prototype.createView=function(settings){var stemFilterFactory=new LiveInPlay.StemFilterFactory(new LiveInPlay.VisibleClassificationsProvider,new LiveInPlay.TopThreeSportsFilter,!0,settings);return new LiveInPlay.LiveInPlayPodView(new LiveInPlay.PodHeader(new LiveInPlay.TextLabel(settings)),new LiveInPlay.TopicSubscriptionCommand,new LiveInPlay.FilteredStemProvider(new LiveInPlay.StemProvider,stemFilterFactory),new LiveInPlay.ClassificationFactory(new LiveInPlay.ConfigurableFixtureFactory(settings,new LiveInPlay.FixtureConfigFactory),settings),stemFilterFactory,new LiveInPlay.VisibleClassificationsProvider,settings)},LiveInPlayPodViewFactory}();LiveInPlay.LiveInPlayPodViewFactory=LiveInPlayPodViewFactory}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var LiveStreamingPodViewFactory=function(){function LiveStreamingPodViewFactory(){}return LiveStreamingPodViewFactory.prototype.createView=function(settings){var stemFilterFactory=new LiveInPlay.StemFilterFactory(new LiveInPlay.VisibleClassificationsProvider,new LiveInPlay.TopThreeSportsFilter,!0,settings);return new LiveInPlay.LiveInPlayPodView(new LiveInPlay.PodHeader(new LiveInPlay.TextLabel(settings)),new LiveInPlay.TopicSubscriptionCommand,new LiveInPlay.FilteredStemProvider(new LiveInPlay.StemProvider,stemFilterFactory),new LiveInPlay.ClassificationFactory(new LiveInPlay.ConfigurableFixtureFactory(settings,new LiveInPlay.FixtureConfigFactory),settings),stemFilterFactory,new LiveInPlay.VisibleClassificationsProvider,settings)},LiveStreamingPodViewFactory}();LiveInPlay.LiveStreamingPodViewFactory=LiveStreamingPodViewFactory}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var NameOnlyFixtureFactory=function(){function NameOnlyFixtureFactory(){}return NameOnlyFixtureFactory.prototype.createFixture=function(stem){var name=stem.data.NA;return new LiveInPlay.NameOnlyFixture(new LiveInPlay.SingleLongTeamNameContainer(name))},NameOnlyFixtureFactory}();LiveInPlay.NameOnlyFixtureFactory=NameOnlyFixtureFactory}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var ShowEverythingFilter=function(){function ShowEverythingFilter(){}return ShowEverythingFilter.prototype.filterStemData=function(stem){var _this=this;return stem&&(stem.getChildren()||[]).forEach(function(childStem){var count=0;(childStem.getChildren()||[]).forEach(function(grandChildStem){grandChildStem.filtered?_this.suspendStem(grandChildStem):(_this.unSuspendStem(grandChildStem),count++)});count===0?_this.suspendStem(childStem):_this.unSuspendStem(childStem)}),stem},ShowEverythingFilter.prototype.suspendStem=function(stem){stem.update({SU:"1"})},ShowEverythingFilter.prototype.unSuspendStem=function(stem){stem.update({SU:"0"})},ShowEverythingFilter}();LiveInPlay.ShowEverythingFilter=ShowEverythingFilter}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var ShowAllFilterFactory=function(){function ShowAllFilterFactory(){}return ShowAllFilterFactory.prototype.createStemFilter=function(){return new LiveInPlay.ShowEverythingFilter},ShowAllFilterFactory}();LiveInPlay.ShowAllFilterFactory=ShowAllFilterFactory}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Component=ns_gen5_ui.Component,PodHeaderWithLink=function(_super){function PodHeaderWithLink(textLabel,linkData){var _this=_super.call(this,textLabel)||this;return _this.setupHeaderLink(linkData),_this}return __extends(PodHeaderWithLink,_super),PodHeaderWithLink.prototype.createChildren=function(){this.addStyle("lip-liveInPlayPod_header");this.appendChild(this._headerLink)},PodHeaderWithLink.prototype.setupHeaderLink=function(linkData){this._headerLink=new Component("a");this._headerLink.appendChild(this.textLabel);this.setLinkAttributes(linkData)},PodHeaderWithLink.prototype.setLinkAttributes=function(linkData){linkData&&(linkData.href&&linkData.href!==""&&this._headerLink.setAttribute("href",linkData.href),linkData.onclick&&linkData.onclick!==""&&this._headerLink.setAttribute("onclick",linkData.onclick),linkData.target&&linkData.target!==""&&this._headerLink.setAttribute("target",linkData.target))},PodHeaderWithLink}(LiveInPlay.PodHeader);LiveInPlay.PodHeaderWithLink=PodHeaderWithLink}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var NextNRacesPodViewFactory=function(){function NextNRacesPodViewFactory(headerLink){this._headerLink=headerLink}return NextNRacesPodViewFactory.prototype.createView=function(settings){var stemFilterFactory=new LiveInPlay.ShowAllFilterFactory;return new LiveInPlay.LiveInPlayPodView(new LiveInPlay.PodHeaderWithLink(new LiveInPlay.TextLabel(settings),this._headerLink),new LiveInPlay.TopicSubscriptionCommand,new LiveInPlay.FilteredStemProvider(new LiveInPlay.StemProvider,stemFilterFactory),new LiveInPlay.BlankClassificationFactory(new LiveInPlay.NameOnlyFixtureFactory,settings),stemFilterFactory,new LiveInPlay.VisibleClassificationsProvider,settings)},NextNRacesPodViewFactory}();LiveInPlay.NextNRacesPodViewFactory=NextNRacesPodViewFactory}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var HideEverythingFilter=function(){function HideEverythingFilter(){}return HideEverythingFilter.prototype.filterStemData=function(stem){var _this=this;return stem&&(stem.getChildren()||[]).forEach(function(childStem){_this.suspendStem(childStem);(childStem.getChildren()||[]).forEach(function(grandChildStem){_this.suspendStem(grandChildStem)})}),stem},HideEverythingFilter.prototype.suspendStem=function(stem){stem.update({SU:"1"})},HideEverythingFilter}();LiveInPlay.HideEverythingFilter=HideEverythingFilter}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var MaxItems=function(){function MaxItems(classificationId,maxItems){this.classificationId=classificationId;this.maxItems=maxItems}return MaxItems}();LiveInPlay.MaxItems=MaxItems}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var ResourceProvider=function(){function ResourceProvider(){}return ResourceProvider.prototype.getValue=function(key,defaultValue){return String(Locator.languageResource.getValue(key,defaultValue))},ResourceProvider}();LiveInPlay.ResourceProvider=ResourceProvider}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var VideoAvailableStemProvider=function(){function VideoAvailableStemProvider(stemProvider,videoAvailableFilter){this._stemProvider=stemProvider;this._videoAvailableFilter=videoAvailableFilter}return VideoAvailableStemProvider.prototype.getTree=function(type,subscriptionTopic){var rootStem=this._stemProvider.getTree(type,subscriptionTopic);return this._videoAvailableFilter.filterStemData(rootStem)},VideoAvailableStemProvider}();LiveInPlay.VideoAvailableStemProvider=VideoAvailableStemProvider}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var Settings=function(){function Settings(classificationIdAttribute,title,defaultShowAllLinkText,subscriptionTopic,classificationDisplayConfiguration,classificationMaxItems,isMobilePlatform,displayLiveStreamsOnly){this.classificationIdAttribute=classificationIdAttribute;this.title=title;this._defaultShowAllLinkText=defaultShowAllLinkText;this.subscriptionTopic=subscriptionTopic;this._classificationDisplayConfiguration=classificationDisplayConfiguration;this._classificationMaxItems=classificationMaxItems;this.isMobilePlatform=isMobilePlatform;this.displayLiveStreamsOnly=displayLiveStreamsOnly}return Settings.prototype.getMaxFixtures=function(classificationId){var returnValue=0;return(this._classificationMaxItems||[]).forEach(function(max){max.classificationId===classificationId&&(returnValue=max.maxItems)}),returnValue},Settings.prototype.containsFixtureConfiguration=function(){return this._classificationDisplayConfiguration&&this._classificationDisplayConfiguration.length>0},Settings.prototype.getFixtureConfiguration=function(classificationId){var returnValue;return(this._classificationDisplayConfiguration||[]).forEach(function(classificationConfig){classificationConfig.classificationId===classificationId&&(returnValue=classificationConfig)}),returnValue},Settings.prototype.getShowAllLinkText=function(classificationId){var returnValue=this._defaultShowAllLinkText;return(this._classificationDisplayConfiguration||[]).forEach(function(classificationConfig){classificationConfig.classificationId===classificationId&&(returnValue=classificationConfig.showAllLinkText)}),returnValue},Settings}();LiveInPlay.Settings=Settings}(LiveInPlay||(LiveInPlay={})),function(LiveInPlay){var GenericStemRenderer=ns_gen5_ui.GenericStemRenderer,NextNRacesPodView=function(_super){function NextNRacesPodView(header,subscriber,stemProvider,fixtureFactory,stemFilterFactory,visibleClassificationsProvider,settings){var _this=_super.call(this,header,subscriber,function(event){return _this.subscriptionHandler(event)},stemProvider,stemFilterFactory,visibleClassificationsProvider,settings)||this;return _this._fixtureFactory=fixtureFactory,_this}return __extends(NextNRacesPodView,_super),NextNRacesPodView.prototype.subscriptionHandler=function(event){var _this=this;this.rootStem=this.stemProvider.getTree(event.type,this.settings.subscriptionTopic);this.rootStem&&(this.addEventListeners(this.rootStem),this._content=new GenericStemRenderer,this._content.createChildInstance=function(stem){return _this._fixtureFactory.createFixture(stem)},this._content.stem=this.rootStem,this.appendChild(this._content),this.hideShowView(this.rootStem))},NextNRacesPodView}(LiveInPlay.PodBaseView);LiveInPlay.NextNRacesPodView=NextNRacesPodView}(LiveInPlay||(LiveInPlay={})),function(Typescript){var Components;(function(Components){var Services;(function(Services){var LongDayNames=function(){function LongDayNames(){}return LongDayNames.GetDay=function(day){return LongDayNames._mylanguage||(LongDayNames._mylanguage=LongDayNames.ALL_DAYS[Services.LanguageSettings.getLanguageId()]),LongDayNames._mylanguage[day].toString()},LongDayNames.ALL_DAYS={1:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Today","Yesterday"],2:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","今天","明天"],3:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Hoy","Ayer"],5:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Heute","Gestern"],6:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Oggi","Ieri"],7:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","I dag","I går"],8:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Idag","Igår"],9:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","I dag","I går"],10:["星期天","星期一","星期二","星期三","星期四","星期五","星期六","今天","明天"],19:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота","Днес","Вчера"],20:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο","Σήμερα","Χθες"],21:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","Dzisiaj","Wczoraj"],22:["Domingo","Segunda-Feira","Terça-Feira","Quarta-Feira","Quinta-Feira","Sexta-Feira","Sábado","Hoje","Ontem"],23:["Duminica","Luni","Marti","Miercuri","Joi","Vineri","Sambata","Azi","Ieri"],24:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota","Dnes","Včera"],25:["Vasárnap","Hétfő","Kedd","Szerda"," Csütörtök","Péntek","Szombat","Ma","Tegnap"],26:["Nedeľa","Pondelok","Utorok","Streda","Štvrtok","Piatok","Sobota","Dnes","Včera"],28:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Vandaag","Gisteren"],29:["pühapäev","esmaspäev","teisipäev","kolmapäev","neljapäev","reede","laupäev","Täna","Eile"],30:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},LongDayNames}();Services.LongDayNames=LongDayNames})(Services=Components.Services||(Components.Services={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var Services;(function(Services){var LongMonthNames=function(){function LongMonthNames(){}return LongMonthNames.GetMonthName=function(month){return(LongMonthNames._mylanguage||(LongMonthNames._mylanguage=LongMonthNames.ALL_MONTHS[Services.LanguageSettings.getLanguageId()]),Services.LanguageSettings.getRegionIsAsian())?(month+1+LongMonthNames.CMC).toString():LongMonthNames._mylanguage[month].toString()},LongMonthNames.CMC="月",LongMonthNames.CDC="日",LongMonthNames.ALL_MONTHS={1:["January","February","March","April","May","June","July","August","September","October","November","December"],2:["1","2","3","4","5","6","7","8","9","10","11","12"],3:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],5:["Januar ","Februar ","März","April ","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],6:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],7:["januar","februar","marts","april","maj","juni","juli","august","september","oktober ","november","december"],8:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],9:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],10:["1","2","3","4","5","6","7","8","9","10","11","12"],19:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],20:["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"],21:["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia"],22:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],23:["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie"],24:["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince"],25:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],26:["januára","februára","marca","apríla","mája","júna","júla","augusta","septembra","októbra","novembra","decembra"],28:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],29:["jaanuar","veebruar","märts","aprill","mai","juuni","juuli","august","september","oktoober","november","detsember"],30:["January","February","March","April","May","June","July","August","September","October","November","December"]},LongMonthNames}();Services.LongMonthNames=LongMonthNames})(Services=Components.Services||(Components.Services={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var Services;(function(Services){var ShortDayNames=function(){function ShortDayNames(){}return ShortDayNames.GetDay=function(day){return ShortDayNames._mylanguage||(ShortDayNames._mylanguage=ShortDayNames.ALL_DAYS[Services.LanguageSettings.getLanguageId()]),ShortDayNames._mylanguage[day]},ShortDayNames.ALL_DAYS={1:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],2:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],3:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],5:["So","Mo","Di","Mi","Do","Fr","Sa"],6:["Dom","Lun","Mar","Mer","Giov","Ven","Sab"],7:["Søn","Man","Tir","Ons","Tor","Fre"," Lør"],8:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],9:["Søn","Man","Tirs","Ons","Tors","Fre","Lør"],10:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],19:["Нед","Пон","Вт","Ср","Чет","Пет","Съб"],20:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],21:["N","Pn","Wt","Śr","Cz","Pt","So"],22:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"],23:["D","L","Ma","Mi","J","V","S"],24:["Ne","Po","Út","St","Čt","Pá","So"],25:["Vas","Hét","Kedd","Sze"," Csüt","Pén","Szo"],26:["Ned","Pon","Ut","Str","Štv","Pia","Sob"],28:["zo","ma","di","wo","do","vr","za"],29:["P","E","T","K","N","R","L"],30:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},ShortDayNames}();Services.ShortDayNames=ShortDayNames})(Services=Components.Services||(Components.Services={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Components;(function(Components){var Services;(function(Services){var ShortMonthNames=function(){function ShortMonthNames(){}return ShortMonthNames.GetMonthName=function(month){return(ShortMonthNames._mylanguage||(ShortMonthNames._mylanguage=ShortMonthNames.ALL_MONTHS[Services.LanguageSettings.getLanguageId()]),Services.LanguageSettings.getRegionIsAsian())?String(month+1)+this.CMC:ShortMonthNames._mylanguage[month]},ShortMonthNames.CYC="年",ShortMonthNames.CMC="月",ShortMonthNames.CDC="日",ShortMonthNames.ALL_MONTHS={1:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],2:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],3:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],4:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],5:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],6:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],7:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],8:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],9:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],10:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],14:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],19:["яну","фев","мар","апр","май","юни","юли","авг","сеп","окт","ное","дек"],20:["Ιαν","Φεβ","Μαρ","Απρ","Μαΐου","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],21:["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],22:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Sep","Out","Nov","Dez"],23:["Ian","Feb","Mar","Apr","Mai","Iun","Iul","Aug","Sep","Oct","Nov","Dec"],24:["led","úno","bře","dub","kvě","čer","čvc","srp","zář","říj","lis","pro"],25:["jan","feb","már","ápr","máj","jún","júl","aug","szep","okt","nov","dec"],26:["jan","feb","mar","apr","máj","jún","júl","aug","sep","okt","nov","dec"],28:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],29:["jaan","veebr","märts","apr","mai","juuni","juuli","aug","sept","okt","nov","dets"],30:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},ShortMonthNames}();Services.ShortMonthNames=ShortMonthNames})(Services=Components.Services||(Components.Services={}))})(Components=Typescript.Components||(Typescript.Components={}))}(Typescript||(Typescript={})),function(Typescript){var Specifications;(function(Specifications){var AndSpecification=function(_super){function AndSpecification(specificationOne,specificationTwo){var _this=_super.call(this)||this;return _this._specificationOne=specificationOne,_this._specificationTwo=specificationTwo,_this}return __extends(AndSpecification,_super),AndSpecification.prototype.isSatisfiedBy=function(candidate){return this._specificationOne.isSatisfiedBy(candidate)&&this._specificationTwo.isSatisfiedBy(candidate)},AndSpecification}(Specifications.Specification);Specifications.AndSpecification=AndSpecification})(Specifications=Typescript.Specifications||(Typescript.Specifications={}))}(Typescript||(Typescript={})),function(Typescript){var Specifications;(function(Specifications){var NotSpecification=function(_super){function NotSpecification(originalSpecification){var _this=_super.call(this)||this;return _this._originalSpecification=originalSpecification,_this}return __extends(NotSpecification,_super),NotSpecification.prototype.isSatisfiedBy=function(candidate){return!this._originalSpecification.isSatisfiedBy(candidate)},NotSpecification}(Specifications.Specification);Specifications.NotSpecification=NotSpecification})(Specifications=Typescript.Specifications||(Typescript.Specifications={}))}(Typescript||(Typescript={})),function(Typescript){var Specifications;(function(Specifications){var OrSpecification=function(_super){function OrSpecification(specificationOne,specificationTwo){var _this=_super.call(this)||this;return _this._specificationOne=specificationOne,_this._specificationTwo=specificationTwo,_this}return __extends(OrSpecification,_super),OrSpecification.prototype.isSatisfiedBy=function(candidate){return this._specificationOne.isSatisfiedBy(candidate)||this._specificationTwo.isSatisfiedBy(candidate)},OrSpecification}(Specifications.Specification);Specifications.OrSpecification=OrSpecification})(Specifications=Typescript.Specifications||(Typescript.Specifications={}))}(Typescript||(Typescript={}))