function Application(n,t,i,r,u,f,e){function s(n){if(n._fromExternal===!0)bettingSlip.setBetData(n);else var t=n.betSlipData}var o=this;o.path=n;o.urlPayInPopup="";o.platform=t;o.license=Common.Application.instance.license;o.domInitializer=i;o.isAppMode=!1;o.accountCurrency="";o.languageId=r;o.signalrLiveBettingUrl=u;o.signalrLoggingActive=f;o.isLoggedIn=e;o.showLogin=function(n){if(o.isAppMode)AppCallbackInterface.requestLogin(n);else if(o.platform==Platform.Tablet)global.toggleVisibility("logon-overlay"),n!=null&&$("#logon-form").find("input[name=ReturnUrl]").val(n),window.scrollTo(0,0);else{var t=o.path+"/Account/LogOn";n!=null&&n!=undefined&&(t=t+"?returnUrl="+encodeURIComponent(n));global.changePage(t)}};window.Common&&Common.InputCheck&&Common.InputCheck.initInputCheck(["#search-term-input"],"^[äÄöÖüÜßa-zA-Z0-9+:,\\?\\!._ \\r\\n-]+$",!1);o.initSearch=function(){var n=$("#search-term-input"),i=/[\u0040\+,\/;=[\\\]\^_{|}<>]/gi,t,r;if(n.length>0){t=new Search;r=$("#result-table");t.onSearchComplete=function(t){var f,r,u;if(t==undefined||t.length==0)$("#result-table").html('<tr><td class="search-empty">'+Translation.getTextId("No results found")+"<\/td><\/tr>");else for(f=$("#result-table"),f.children().remove(),r=0;r<t.length;r++){if(r>=10)break;u=$('<tr><td class="type">'+t[r].typeName+"<\/td><td>"+t[r].resultName+'<span class="icon arrow right"><\/span><\/td><\/tr>');u.data("target-url",t[r].targetUrl);u.addHighlight(n.val().replace(i,""));f.append(u)}};$(window).on("load",function(){n.val().length>0&&t.updateSearchText(n.val().replace(i,""))});n.keyup(function(){t.updateSearchText(n.val().replace(i,""))});r.delegate("tr","click",function(){var n=$(this).data("target-url");n!=undefined&&global.changePage(n)}).delegate("tr","mousedown",function(){var n=$(this).data("target-url");n!=undefined&&$(this).addClass("selected")}).delegate("tr","mouseup",function(){$(this).removeClass("selected")})}};o.documentReady=function(){$(document).delegate("form","submit",function(n){var t=$(n.target).find("button[type=submit]");t.hasClass("club-submit-button")||(t.addClass("loading"),t.attr("disabled","disabled"))});global.checkCookies();o.initSearch();$(document).on("click","a.specialSPDetailsLink",function(n){n.preventDefault();n.stopPropagation();var t=$(this).attr("rel");$("#"+t).toggle()});$(document).on("click","a.info-og",function(n){var i=$(this),t;if(i.next().is(".info-og-popup"))i.next().remove();else{$(".info-og-popup").remove();t=$("<div><\/div>");i.after(t);t.addClass("info-og-popup");t.text(i.prop("title"));t.prepend('<a href="javascript:void(0)">x<\/a>');t.on("click","a",function(){t.off("click","a");t.remove()})}return n.preventDefault(),n.stopPropagation(),!1});$(document).on("click",".logo,.logo-svg",function(){Common.Tracking.Event.initial(["Smartphone","Top Menu clicked","Interwetten Logo"])});$(document).on("click",".overlay:not(.noclose)",function(n){var t=$(n.target);n.target.id=="bs-overlay"||n.target.id=="burger-overlay"&&(t.hide(),global.toggleBurgerMenu());(t.is(".overlay")||t.is(".content-dialog"))&&t.addClass("collapsed")});$(document).on("click",".btn-tobetslip,#mnu_cashout",function(n){n.preventDefault();Quickbet.close();this.id=="mnu_cashout"&&global.toggleAccountMenu()});$("#burger-menu-flyout ul li").click(function(){var n=$(this).attr("tracking-data");Common.Tracking.Event.initial(["Navigation","Mobile Burger Button",n])});$(".tracking-event").on("click",function(){var n=JSON.parse($(this).attr("event-tracking"));n.length>2&&Common.Tracking.Event.initial(n)});$(".TRACKING-EVENT").on("click",function(){var n=JSON.parse($(this).attr("event-tracking"));n.length>2&&Common.Tracking.Event.initial(n)});$(".menu-scroller").scroll(function(){var n=$(this),t=n.parent(".menu-container").children(".menu-fade-left");n.scrollLeft()>0?t.show():t.hide()});$(".category-scroller").scroll(function(){var t=$(this),i=t.parent(".category-container").children(".category-fade-left"),n=t.parent(".category-container").children(".category-fade-right"),f=$(".category-fade-right").parent(".category-container").children(".category-scroller").children(".casino-filters"),r=t.scrollLeft(),u;r>0?(u=this.scrollWidth-this.clientWidth,this.scrollWidth<=this.clientWidth||r>=u-1?n.hide():n.show(),i.show()):(i.hide(),this.scrollWidth<=this.clientWidth?n.hide():n.show())});$(document).on("click","a",function(n){if(window.self===window.top&&!global.isPaymentLink(window.location.href)){var t=$(this).attr("href");global.isPaymentLink(t)&&($(".content-dialog,.overlay").addClass("collapsed").css({display:""}),PaymentPopup.show(t.replace(/\/payin/i,"/payinpopup"))&&n.preventDefault())}});$(window).on("resize",function(){var n=$(".category-scroller").parent(".category-container").children(".category-fade-right"),t=$(".category-fade-right").parent(".category-container").children(".category-scroller").children(".casino-filters");n.hide();t.width()<=t.parent(".category-scroller").width()+20?n.hide():n.show()});$("#mnu_Burger").click(function(n){$("#burger-overlay").show();n.preventDefault();global.toggleBurgerMenu()});$("#burger-menu-flyout li").click(function(){$(this).attr("data-close")&&global.toggleBurgerMenu()});$("#burger-menu-flyout .icon-burger").click(function(){global.toggleBurgerMenu();$("#burger-overlay").hide()});o.domInitializer!==undefined&&o.domInitializer!==null&&o.domInitializer.domReady();var n=document.getElementById("betslip_button");n&&n.addEventListener("click",function(){Betting.Mobile.Tabs.openBetslip()});o.initializeDom(document)};o.setNativeAppMode=function(n){o.isAppMode=n};o.initializeDom=function(n){$(".event-offer .menu li").click(function(n){n.preventDefault();n.stopPropagation();var t=$(this).attr("data-category");t=="all"?($(".offer-tg").show(),$(".offer-tg:not(.tg-autoexpand)").addClass("tg-collapsed"),$(".offer-tg[data-category=Main_Bets]").removeClass("tg-collapsed"),$(".offer-tg .list-subtitle").show()):($(".offer-tg").hide(),$("#otg"+t).show(),$("#otg"+t).removeClass("tg-collapsed"),$("#otg"+t+" .list-subtitle").hide());$(".event-offer .menu li").removeClass("menu-active");$(this).addClass("menu-active")});o.domInitializer!=undefined&&o.domInitializer!=null&&o.domInitializer.initializeDom(n)};MessageBroker.subscribe("BetSlipBetAdded",function(n){s(n)});MessageBroker.subscribe("BettingSlipLoaded",function(n){s(n)});MessageBroker.subscribe("BetSlipBetsRemoved",function(n){s(n)});MessageBroker.subscribe("ShowSearch",function(){global.showSearch()});$.ajaxSetup({timeout:45e3,cache:!1});$(function(){o.documentReady();var n=$(".category-scroller").parent(".category-container").children(".category-fade-right"),t=$(".category-fade-right").parent(".category-container").children(".category-scroller").children(".casino-filters");n.hide();t.width()<=t.parent(".category-scroller").width()+20?n.hide():n.show()})}function DateDiff(n,t){function u(n){var t=n.toString();return t.length<2&&(t="0"+t),t}var s=Math.abs(t-n),f=Math.round(s/1e3),i=f%60,e=(f-i)/60,r=e%60,o=(e-r)/60;return{getSeconds:function(){return i},getMinutes:function(){return r},getHours:function(){return o},toString:function(){return u(o)+":"+u(r)+":"+u(i)}}}function parseDouble(n){return typeof n=="number"?n:parseFloat(n.replace(",","."))}function Search(){var n=this;this.preRequestWaitTime=150;this.searchTimeout=0;this.searchRequest=null;this.updateSearchText=function(t){this.searchTimeout!=0&&clearTimeout(this.searchTimeout);n.searchTimeout=setTimeout(function(){n.searchTimeout=0;n.doSearch(t)},n.preRequestWaitTime)};this.doSearch=function(t){n.searchRequest!=null&&(n.searchRequest.abort(),n.searchRequest=null);t==undefined||t===""?n.onSearchComplete!=null&&n.onSearchComplete():n.searchRequest=$.get(app.path+"/search/results",{searchText:t},function(t){if(t.results!=undefined&&n.onSearchComplete!=null)n.onSearchComplete(t.results)},"json")};this.onSearchComplete=null}function BettingOffer(){var n=this;this.toggleEvents=function(n){var i=$.Deferred(),t=$(n),r,u,f;return t.data("events-loading")===!0?(i.resolve(),i.promise()):(r=t.parent().prop("id").toString().substring(1),t.parent().hasClass("events-shown")?(t.parent().next().hide(),t.parent().removeClass("events-shown"),offer.updateHash(r,!0),i.resolve()):(u=$("input#marketingId").val(),u!=undefined&&Common.Tracking.Event.marketing("Sportsbook-League",r,"S"+r,"undefined",u),t.data("eventsLoaded")===!0?(t.parent().next().show(),t.parent().addClass("events-shown"),offer.updateHash(r,!1),i.resolve()):(f=t.prop("href"),t.data("events-loading",!0),$.get(f,function(n){t.parent().after('<li class="events-inline">'+n+"<\/li>");t.parent().addClass("events-shown");t.data("eventsLoaded",!0);offer.updateHash(r,!1)}).always(function(){t.data("events-loading",!1);i.resolve()}))),i.promise())};this.updateHash=function(n,t){var r=Common.UrlHelper.getHashValues(),i=r.hasOwnProperty("open")?r.open.toString().split(",").filter(function(n){return n.length>0}):[];t?i=i.filter(function(t){return t!=n}):i.indexOf(n)<0&&i.push(n);r.open=i.join(",");Modernizr.history&&window.history.replaceState(null,document.title,document.location.pathname+"#"+Common.UrlHelper.createQuery(r))}}function KosFilter(n){function r(n){t.find("input[type=checkbox][value="+n+"]").prop("checked",!0)}function u(n){t.find("input[type=checkbox]").prop("checked",!1);t.find("input[type=checkbox][value="+n+"]").prop("checked",!0);i.selectionChanged.fire()}function f(){t.find("input[name=SelectedKos]").prop("checked",!0);i.selectionChanged.fire()}function e(){t.find("input[name=SelectedKos]").prop("checked",!1);i.selectionChanged.fire()}var i=this,t=$(n);if(this.getSelectedKos=function(){var n=[];return t.find("input[type=checkbox]").each(function(t,i){$(i).is(":checked")&&n.push($(i).val())}),n},this.initSportPagerFiler=function(){var n=i.getSelectedKos();n!=10&&i.selectionChanged.fire()},this.selectionChanged=$.Callbacks(),this.select=function(){for(var n=0;n<arguments.length;n++)r(arguments[n])},t.length){t.find(".kos-filter-selection").on("click","a",function(n){n.preventDefault();var t=$(this).data("kosid");t!=undefined&&u(t)});t.find(".kos-filter-selection").on("change","input[type=checkbox]",function(){i.selectionChanged.fire()});t.find(".kos-select-all").click(function(){f()});t.find(".kos-select-none").click(function(){e()})}}function RegionSelection(n){var t=this,i={},r="";return this.country=n,this.postcode="",this.regionIdSH=0,this.poBoxInfo=[],this.getRegionByPOBox=function(n){var i=t.postcode,u=t.country;global.getPOBoxInfo(i,u).done(function(i){t.poBoxInfo=i.poBoxInfo;r=i.error;n!=undefined&&n(i)})},this.checkForLicViolation=function(n){n!=undefined&&$.get(app.path+"/register/checkregionforlicviolation",{country:t.country,postcode:t.postcode},function(t){n(t.error)})},i.populateCities=function(n){var r=$(n),i;r.empty();i=r.prop("options");i!=null&&$.each(t.poBoxInfo,function(n,t){i[i.length]=new Option(t.city,t.city)});r.trigger("populate")},i.setRegionIdSH=function(n){t.regionIdSH=n},i.getRegionIdSH=function(){return t.regionIdSH},i.validateLicense=function(n){t.checkForLicViolation(n)},i.setCountry=function(n){t.country=n},i.setPostCode=function(n,i){t.postcode=n;t.getRegionByPOBox(i)},i.getPOBoxInfo=function(){return t.poBoxInfo},i.getPOBoxError=function(){return r},i}function SmartphoneInitializer(){function n(n){var e=Common.UrlHelper.getHashValues(),i,r,t,u,f;if(e.hasOwnProperty("open")){for(i=e.open.toString().split(",").filter(function(n){return n.length>0}),r=[],t=0;t<i.length;t++)u=$("#l"+i[t]).children("a"),u.length&&r.push(offer.toggleEvents(u[0]));f=$("#l"+n);f.length&&$.when(r).then(function(){setTimeout(function(){f[0].scrollIntoView(!0)},100)})}}var t=this;this.domReady=function(){var t,i,r,u;$("#sportsbook-content-main").on("click",".leagues-list a,.favorites-list a",function(n){($(this).parent().hasClass("league")||$(this).parent().hasClass("fav-League"))&&(n.preventDefault(),offer.toggleEvents(this))});if(t=$(".leagues-list > ul.catlist > li.cat.open > ul"),t.length>0)for(i=0;i<t.length;i++)r=$(t[i]).find("li"),r!=null&&r.length===1&&offer.toggleEvents(r[0].children[0]);$(".leagues-list > ul.catlist > li.cat > div").on("click",function(){var n=$(this).parent().find("ul > li");n!=null&&n.length===1&&offer.toggleEvents(n[0].children[0]);$(this).parent().toggleClass("open")});u=$("#sportsbook-content-main .leagues-list");u.length&&n(u.data("selectedid"));$(document).on("click","#mnu_cashout",function(n){n.preventDefault();Quickbet.close();this.id=="mnu_cashout"&&global.toggleAccountMenu()})};this.initializeDom=function(){}}function LiveKosGroups(n,t,i,r,u){function o(n){for(var i,r={},t=0;t<n.length;t++)i=n[t].kosID,r.hasOwnProperty(i)?r[i].events.push(n[t]):r[i]={kosId:i,kosName:n[t].kosName,kosOrder:n[t].kosOrder,events:[n[t]]};return r}function s(t){var r=$("#liveEventsGrouped"),o=$("#live-kos-list"),i=r.find("#live-events-"+t.kosId),u,e;i.length?i.data("countries",f(t).join()):(u=l(t),e=c(t),r.insertWithOrder(u,t.kosOrder,"div","kos-order"),o.insertWithOrder(e,t.kosOrder,"li","kos-order"),i=r.find("#live-events-"+t.kosId));v(t,i);h(i.find("ul.live-list"),t.events);i.find(".live-title").children("span").last().text(n.getKosGroupTitle(t.events.length,t.kosName))}function h(t,i){var r=0;$.each(i,function(i,u){var f,e;t.length&&(f=t.children("li[data-event-id="+u.id+"]"),f.length?n.refreshEventLI(f,u):r==0?n.addEventLI(t,u):(e=t.children("li[data-event-id="+r+"]"),n.addEventLI(t,u,e)));r=u.id})}function c(n){return i.replace(/@KOSID/g,n.kosId).replace(/@KOSNAME/,n.kosName).replace(/@URL/,app.path+"/live?kosFilter="+n.kosId)}function l(i){var o=e(i),s="";return o!=""&&(s=o=="N2"?r:u),t.replace(/@KOSID/g,i.kosId).replace(/@COUNTRIES/,f(i).join()).replace(/@KOSORDER/,i.kosOrder).replace(/@KOSCOUNT/,i.events.length).replace(/@KOSNAME/g,i.kosName).replace(/@KOSOFFERHEADER/,s).replace(/@KOSTITLE/,n.getKosGroupTitle(i)).replace(/@RENDERTYPE/,o)}function f(t){var i=[];return $.each(t.events,function(t,r){i=i.concat(n.getCountries(r))}),i.distinct()}function a(t){var r=$("#liveEventsGrouped"),i,u;if(r.length){n.removeEvents(r.find("ul.live-list"),t);i=o(t);for(u in i)s(i[u]);$("#liveEventsGrouped").children("div").each(function(n,t){var i=$(t);i.find("ul.live-list").children("li").length||(i.remove(),$("#live-kos-list").find("a[data-kos-id="+i.data("kosid")+"]").parent().remove())})}}function e(n){var t="";for(var i in n.events)if(n.events[i].mainOfferGroup!=null){t=n.events[i].mainOfferGroup.render;break}return t}function v(n,t){var i=e(n),f=t.find(".type");i!=""&&(i=="N2"||i=="N3")?f.html(i=="N3"?u:r):f.html("")}return{refresh:a}}function LiveEventCalendar(){var n=this;this.eventsRequest=null;this.getSelectedKOSID=function(){return $("#event-calendar-kos").val()};this.getSelectedDate=function(){return $("#event-calendar-date").val()};this.updateEventCalendar=function(t){n.setLoading(!0);n.getEventCalendarPartial(n.getSelectedKOSID(),n.getSelectedDate(),t)};this.scrollToTop=function(){app.platform==Platform.Smartphone&&window.scrollTo(0,0)};this.getEventCalendarPartial=function(t,i,r){this.eventsRequest=$.get(global.appPath+"/live/eventcalendarpartial",{kosId:t,date:i,pageIndex:r},function(r){if(app.platform==Platform.Tablet){var u=PagerCollection["live-upcoming"];u!==undefined&&u.reset({kosId:t,date:i})}else $("#live-calendar-page").replaceWith(r.eventsHtml);n.updateEventCalendarDates(r.dates,r.selectedDate);n.setLoading(!1);n.eventsRequest=null},"json")};this.initTabletPager=function(){var i=n.getSelectedKOSID(),r=n.getSelectedDate(),t=$('[data-pager="live-upcoming"]');t.length&&PagerFactory.createPager(t[0],{kosId:i,date:r})};this.updateEventCalendarDates=function(n,t){var i=$("#event-calendar-date"),r;i.length&&(i.empty(),r=i.prop("options"),$.each(n,function(n,t){r[r.length]=new Option(t.text,t.date)}),i.val(t))};this.setLoading=function(n){n?(app.platform==Platform.Smartphone&&($("#live-calendar-page").hide(),$("#event-calendar-loading").show()),$("#event-calendar-kos").attr("disabled","disabled"),$("#event-calendar-date").attr("disabled","disabled")):(app.platform==Platform.Smartphone&&($("#live-calendar-page").show(),$("#event-calendar-loading").hide()),$("#event-calendar-kos").removeAttr("disabled"),$("#event-calendar-date").removeAttr("disabled"))};this.updateOrientation=function(){window.orientation!==undefined&&(window.orientation==0||window.orientation==180?$(".live-calendar").removeClass("landscape"):$(".live-calendar").addClass("landscape"))}}function FilterTopEvents(n,t){var f=5,r=3,u=t-f-r;if(n.length<=t)return n;var o=n.filter("[data-kosid=10]"),s=n.filter("[data-kosid=11]"),e=n.filter(function(n,t){var i=$(t);return i.data("kosid")!=10&&i.data("kosid")!=11});e.length<u&&(r+=u-e.length);var h=o.slice(0,f),c=s.slice(0,r),l=e.slice(0,u),i=h.add(c).add(l);return i.length<t&&(i=i.add(o.slice(f,f+t-i.length))),i.length<t&&(i=i.add(s.slice(r,r+t-i.length))),i.length<t&&(i=i.add(e.slice(u,u+t-i.length))),i}function RealityCheckHandler(n){function i(t,i){return n.hasOwnProperty(t)?n[t]:i}function f(n){return n.message+i("losstext","Loss")+": "+n.loss+"<br/>"+i("wintext","Win")+": "+n.win}function e(n){return Common.Helper.getNode("<div>"+n+"<\/div>")}function u(n,u,f){var o=e(n),s=f?f:i("title","Reality Check");t?(t.setContent(o),t.title=s):t=new Tools.Dialog({title:s,content:o,width:"320px",onClosed:function(){var n=i("close",null);n!==null&&n(r,u)},buttons:[{text:i("oktext","OK"),click:function(){t.close()}}]});t.open()}function o(n){return u(f(n),null,n.title),!0}function s(n,t){r=!0;var i=n.message;n.errorMessage&&n.errorMessage>""&&(i=n.errorMessage);u(i,t,n.title)}var t=null,r=!1;return n===undefined&&(n={}),{show:o,showSessionEnd:s}}var Platform,offer,DisplayModes,BrowserInfo,FlashMessages,PostCode,TennisOddWrapper,Prematch,Tools,License,Extensions,Translation,MessageBroker,AppCallbackInterface,Content,Common,liveCal,LiveBettingPhone,FreeBet,QuickBet,__assign,Betting,BetAssist,LiveStream,Templates,__extends,LiveBetting,RealityCheck,Blog;!function(n,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=n.document?t(n,!0):function(n){if(!n.document)throw new Error("jQuery requires a window with a document");return t(n)}:t(n)}("undefined"!=typeof window?window:this,function(n,t){"use strict";function br(n,t,i){var r,e,u=(i=i||f).createElement("script");if(u.text=n,t)for(r in oe)(e=t[r]||t.getAttribute&&t.getAttribute(r))&&u.setAttribute(r,e);i.head.appendChild(u).parentNode.removeChild(u)}function ut(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?ri[pr.call(n)]||"object":typeof n}function pi(n){var t=!!n&&"length"in n&&n.length,i=ut(n);return!u(n)&&!rt(n)&&("array"===i||0===t||"number"==typeof t&&0<t&&t-1 in n)}function c(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()}function bi(n,t,r){return u(t)?i.grep(n,function(n,i){return!!t.call(n,i,n)!==r}):t.nodeType?i.grep(n,function(n){return n===t!==r}):"string"!=typeof t?i.grep(n,function(n){return-1<ii.call(t,n)!==r}):i.filter(t,n,r)}function uu(n,t){while((n=n[t])&&1!==n.nodeType);return n}function et(n){return n}function fi(n){throw n;}function fu(n,t,i,r){var f;try{n&&u(f=n.promise)?f.call(n).done(t).fail(i):n&&u(f=n.then)?f.call(n,t,i):t.apply(void 0,[n].slice(r))}catch(n){i.apply(void 0,[n])}}function oi(){f.removeEventListener("DOMContentLoaded",oi);n.removeEventListener("load",oi);i.ready()}function ce(n,t){return t.toUpperCase()}function y(n){return n.replace(se,"ms-").replace(he,ce)}function bt(){this.expando=i.expando+bt.uid++}function ou(n,t,i){var u,r;if(void 0===i&&1===n.nodeType)if(u="data-"+t.replace(ae,"-$&").toLowerCase(),"string"==typeof(i=n.getAttribute(u))){try{i="true"===(r=i)||"false"!==r&&("null"===r?null:r===+r+""?+r:le.test(r)?JSON.parse(r):r)}catch(n){}o.set(n,t,i)}else i=void 0;return i}function hu(n,t,r,u){var s,h,c=20,l=u?function(){return u.cur()}:function(){return i.css(n,t,"")},o=l(),e=r&&r[3]||(i.cssNumber[t]?"":"px"),f=n.nodeType&&(i.cssNumber[t]||"px"!==e&&+o)&&kt.exec(i.css(n,t));if(f&&f[3]!==e){for(o/=2,e=e||f[3],f=+o||1;c--;)i.style(n,t,f+e),(1-h)*(1-(h=l()/o||.5))<=0&&(c=0),f/=h;f*=2;i.style(n,t,f+e);r=r||[]}return r&&(f=+f||+o||0,s=r[1]?f+(r[1]+1)*r[2]:+r[2],u&&(u.unit=e,u.start=f,u.end=s)),s}function ht(n,t){for(var h,f,a,s,c,l,e,o=[],u=0,v=n.length;u<v;u++)(f=n[u]).style&&(h=f.style.display,t?("none"===h&&(o[u]=r.get(f,"display")||null,o[u]||(f.style.display="")),""===f.style.display&&dt(f)&&(o[u]=(e=c=s=void 0,c=(a=f).ownerDocument,l=a.nodeName,(e=ki[l])||(s=c.body.appendChild(c.createElement(l)),e=i.css(s,"display"),s.parentNode.removeChild(s),"none"===e&&(e="block"),ki[l]=e)))):"none"!==h&&(o[u]="none",r.set(f,"display",h)));for(u=0;u<v;u++)null!=o[u]&&(n[u].style.display=o[u]);return n}function s(n,t){var r;return r="undefined"!=typeof n.getElementsByTagName?n.getElementsByTagName(t||"*"):"undefined"!=typeof n.querySelectorAll?n.querySelectorAll(t||"*"):[],void 0===t||t&&c(n,t)?i.merge([n],r):r}function di(n,t){for(var i=0,u=n.length;i<u;i++)r.set(n[i],"globalEval",!t||r.get(t[i],"globalEval"))}function vu(n,t,r,u,f){for(var e,o,p,a,w,v,c=t.createDocumentFragment(),y=[],l=0,b=n.length;l<b;l++)if((e=n[l])||0===e)if("object"===ut(e))i.merge(y,e.nodeType?[e]:e);else if(au.test(e)){for(o=o||c.appendChild(t.createElement("div")),p=(cu.exec(e)||["",""])[1].toLowerCase(),a=h[p]||h._default,o.innerHTML=a[1]+i.htmlPrefilter(e)+a[2],v=a[0];v--;)o=o.lastChild;i.merge(y,o.childNodes);(o=c.firstChild).textContent=""}else y.push(t.createTextNode(e));for(c.textContent="",l=0;e=y[l++];)if(u&&-1<i.inArray(e,u))f&&f.push(e);else if(w=st(e),o=s(c.appendChild(e),"script"),w&&di(o),r)for(v=0;e=o[v++];)lu.test(e.type||"")&&r.push(e);return c}function ct(){return!0}function lt(){return!1}function we(n,t){return n===function(){try{return f.activeElement}catch(n){}}()==("focus"===t)}function gi(n,t,r,u,f,e){var o,s;if("object"==typeof t){for(s in"string"!=typeof r&&(u=u||r,r=void 0),t)gi(n,s,r,u,t[s],e);return n}if(null==u&&null==f?(f=r,u=r=void 0):null==f&&("string"==typeof r?(f=u,u=void 0):(f=u,u=r,r=void 0)),!1===f)f=lt;else if(!f)return n;return 1===e&&(o=f,(f=function(n){return i().off(n),o.apply(this,arguments)}).guid=o.guid||(o.guid=i.guid++)),n.each(function(){i.event.add(this,t,f,u,r)})}function hi(n,t,u){u?(r.set(n,t,!1),i.event.add(n,t,{namespace:!1,handler:function(n){var o,e,f=r.get(this,t);if(1&n.isTrigger&&this[t]){if(f.length)(i.event.special[t]||{}).delegateType&&n.stopPropagation();else if(f=k.call(arguments),r.set(this,t,f),o=u(this,t),this[t](),f!==(e=r.get(this,t))||o?r.set(this,t,!1):e={},f!==e)return n.stopImmediatePropagation(),n.preventDefault(),e.value}else f.length&&(r.set(this,t,{value:i.event.trigger(i.extend(f[0],i.Event.prototype),f.slice(1),this)}),n.stopImmediatePropagation())}})):void 0===r.get(n,t)&&i.event.add(n,t,ct)}function pu(n,t){return c(n,"table")&&c(11!==t.nodeType?t:t.firstChild,"tr")&&i(n).children("tbody")[0]||n}function ge(n){return n.type=(null!==n.getAttribute("type"))+"/"+n.type,n}function no(n){return"true/"===(n.type||"").slice(0,5)?n.type=n.type.slice(5):n.removeAttribute("type"),n}function wu(n,t){var u,s,f,h,c,e;if(1===t.nodeType){if(r.hasData(n)&&(e=r.get(n).events))for(f in r.remove(t,"handle events"),e)for(u=0,s=e[f].length;u<s;u++)i.event.add(t,f,e[f][u]);o.hasData(n)&&(h=o.access(n),c=i.extend({},h),o.set(t,c))}}function at(n,t,f,o){t=yr(t);var a,b,l,v,h,y,c=0,p=n.length,d=p-1,w=t[0],k=u(w);if(k||1<p&&"string"==typeof w&&!e.checkClone&&ke.test(w))return n.each(function(i){var r=n.eq(i);k&&(t[0]=w.call(this,i,r.html()));at(r,t,f,o)});if(p&&(b=(a=vu(t,n[0].ownerDocument,!1,n,o)).firstChild,1===a.childNodes.length&&(a=b),b||o)){for(v=(l=i.map(s(a,"script"),ge)).length;c<p;c++)h=a,c!==d&&(h=i.clone(h,!0,!0),v&&i.merge(l,s(h,"script"))),f.call(n[c],h,c);if(v)for(y=l[l.length-1].ownerDocument,i.map(l,no),c=0;c<v;c++)h=l[c],lu.test(h.type||"")&&!r.access(h,"globalEval")&&i.contains(y,h)&&(h.src&&"module"!==(h.type||"").toLowerCase()?i._evalUrl&&!h.noModule&&i._evalUrl(h.src,{nonce:h.nonce||h.getAttribute("nonce")},y):br(h.textContent.replace(de,""),h,y))}return n}function bu(n,t,r){for(var u,e=t?i.filter(t,n):n,f=0;null!=(u=e[f]);f++)r||1!==u.nodeType||i.cleanData(s(u)),u.parentNode&&(r&&st(u)&&di(s(u,"script")),u.parentNode.removeChild(u));return n}function ni(n,t,r){var o,s,h,f,u=n.style;return(r=r||ci(n))&&(""!==(f=r.getPropertyValue(t)||r[t])||st(n)||(f=i.style(n,t)),!e.pixelBoxStyles()&&nr.test(f)&&to.test(t)&&(o=u.width,s=u.minWidth,h=u.maxWidth,u.minWidth=u.maxWidth=u.width=f,f=r.width,u.width=o,u.minWidth=s,u.maxWidth=h)),void 0!==f?f+"":f}function du(n,t){return{get:function(){if(!n())return(this.get=t).apply(this,arguments);delete this.get}}}function tr(n){var t=i.cssProps[n]||tf[n];return t||(n in nf?n:tf[n]=function(n){for(var i=n[0].toUpperCase()+n.slice(1),t=gu.length;t--;)if((n=gu[t]+i)in nf)return n}(n)||n)}function ff(n,t,i){var r=kt.exec(t);return r?Math.max(0,r[2]-(i||0))+(r[3]||"px"):t}function ir(n,t,r,u,f,e){var o="width"===t?1:0,h=0,s=0;if(r===(u?"border":"content"))return 0;for(;o<4;o+=2)"margin"===r&&(s+=i.css(n,r+b[o],!0,f)),u?("content"===r&&(s-=i.css(n,"padding"+b[o],!0,f)),"margin"!==r&&(s-=i.css(n,"border"+b[o]+"Width",!0,f))):(s+=i.css(n,"padding"+b[o],!0,f),"padding"!==r?s+=i.css(n,"border"+b[o]+"Width",!0,f):h+=i.css(n,"border"+b[o]+"Width",!0,f));return!u&&0<=e&&(s+=Math.max(0,Math.ceil(n["offset"+t[0].toUpperCase()+t.slice(1)]-e-s-h-.5))||0),s}function ef(n,t,r){var f=ci(n),o=(!e.boxSizingReliable()||r)&&"border-box"===i.css(n,"boxSizing",!1,f),s=o,u=ni(n,t,f),h="offset"+t[0].toUpperCase()+t.slice(1);if(nr.test(u)){if(!r)return u;u="auto"}return(!e.boxSizingReliable()&&o||!e.reliableTrDimensions()&&c(n,"tr")||"auto"===u||!parseFloat(u)&&"inline"===i.css(n,"display",!1,f))&&n.getClientRects().length&&(o="border-box"===i.css(n,"boxSizing",!1,f),(s=h in n)&&(u=n[h])),(u=parseFloat(u)||0)+ir(n,t,r||(o?"border":"content"),s,f,u)+"px"}function a(n,t,i,r,u){return new a.prototype.init(n,t,i,r,u)}function rr(){li&&(!1===f.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(rr):n.setTimeout(rr,i.fx.interval),i.fx.tick())}function cf(){return n.setTimeout(function(){vt=void 0}),vt=Date.now()}function ai(n,t){var u,r=0,i={height:n};for(t=t?1:0;r<4;r+=2-t)i["margin"+(u=b[r])]=i["padding"+u]=n;return t&&(i.opacity=i.width=n),i}function lf(n,t,i){for(var u,f=(v.tweeners[t]||[]).concat(v.tweeners["*"]),r=0,e=f.length;r<e;r++)if(u=f[r].call(i,t,n))return u}function v(n,t,r){var o,s,h=0,a=v.prefilters.length,e=i.Deferred().always(function(){delete l.elem}),l=function(){if(s)return!1;for(var o=vt||cf(),t=Math.max(0,f.startTime+f.duration-o),i=1-(t/f.duration||0),r=0,u=f.tweens.length;r<u;r++)f.tweens[r].run(i);return e.notifyWith(n,[f,i,t]),i<1&&u?t:(u||e.notifyWith(n,[f,1,0]),e.resolveWith(n,[f]),!1)},f=e.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{},easing:i.easing._default},r),originalProperties:t,originalOptions:r,startTime:vt||cf(),duration:r.duration,tweens:[],createTween:function(t,r){var u=i.Tween(n,f.opts,t,r,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(u),u},stop:function(t){var i=0,r=t?f.tweens.length:0;if(s)return this;for(s=!0;i<r;i++)f.tweens[i].run(1);return t?(e.notifyWith(n,[f,1,0]),e.resolveWith(n,[f,t])):e.rejectWith(n,[f,t]),this}}),c=f.props;for(!function(n,t){var r,f,e,u,o;for(r in n)if(e=t[f=y(r)],u=n[r],Array.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),(o=i.cssHooks[f])&&"expand"in o)for(r in u=o.expand(u),delete n[f],u)r in n||(n[r]=u[r],t[r]=e);else t[f]=e}(c,f.opts.specialEasing);h<a;h++)if(o=v.prefilters[h].call(f,n,c,f.opts))return u(o.stop)&&(i._queueHooks(f.elem,f.opts.queue).stop=o.stop.bind(o)),o;return i.map(c,lf,f),u(f.opts.start)&&f.opts.start.call(n,f),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always),i.fx.timer(i.extend(l,{elem:n,anim:f,queue:f.opts.queue})),f}function tt(n){return(n.match(l)||[]).join(" ")}function it(n){return n.getAttribute&&n.getAttribute("class")||""}function ur(n){return Array.isArray(n)?n:"string"==typeof n&&n.match(l)||[]}function sr(n,t,r,u){var f;if(Array.isArray(t))i.each(t,function(t,i){r||uo.test(n)?u(n,i):sr(n+"["+("object"==typeof i&&null!=i?t:"")+"]",i,r,u)});else if(r||"object"!==ut(t))u(n,t);else for(f in t)sr(n+"["+f+"]",t[f],r,u)}function gf(n){return function(t,i){"string"!=typeof t&&(i=t,t="*");var r,f=0,e=t.toLowerCase().match(l)||[];if(u(i))while(r=e[f++])"+"===r[0]?(r=r.slice(1)||"*",(n[r]=n[r]||[]).unshift(i)):(n[r]=n[r]||[]).push(i)}}function ne(n,t,r,u){function e(s){var h;return f[s]=!0,i.each(n[s]||[],function(n,i){var s=i(t,r,u);return"string"!=typeof s||o||f[s]?o?!(h=s):void 0:(t.dataTypes.unshift(s),e(s),!1)}),h}var f={},o=n===hr;return e(t.dataTypes[0])||!f["*"]&&e("*")}function lr(n,t){var r,u,f=i.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((f[r]?n:u||(u={}))[r]=t[r]);return u&&i.extend(!0,n,u),n}var p=[],vr=Object.getPrototypeOf,k=p.slice,yr=p.flat?function(n){return p.flat.call(n)}:function(n){return p.concat.apply([],n)},yi=p.push,ii=p.indexOf,ri={},pr=ri.toString,ui=ri.hasOwnProperty,wr=ui.toString,ee=wr.call(Object),e={},u=function(n){return"function"==typeof n&&"number"!=typeof n.nodeType},rt=function(n){return null!=n&&n===n.window},f=n.document,oe={type:!0,src:!0,nonce:!0,noModule:!0},kr="3.5.1",i=function(n,t){return new i.fn.init(n,t)},d,wi,nu,tu,iu,ru,l,eu,ei,ot,dt,ki,h,au,vt,li,yt,of,sf,hf,af,pt,vf,yf,pf,fr,er,te,wt,ie,ar,vi,re,ue,fe;i.fn=i.prototype={jquery:kr,constructor:i,length:0,toArray:function(){return k.call(this)},get:function(n){return null==n?k.call(this):n<0?this[n+this.length]:this[n]},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t},each:function(n){return i.each(this,n)},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},slice:function(){return this.pushStack(k.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(i.grep(this,function(n,t){return(t+1)%2}))},odd:function(){return this.pushStack(i.grep(this,function(n,t){return t%2}))},eq:function(n){var i=this.length,t=+n+(n<0?i:0);return this.pushStack(0<=t&&t<i?[this[t]]:[])},end:function(){return this.prevObject||this.constructor()},push:yi,sort:p.sort,splice:p.splice};i.extend=i.fn.extend=function(){var s,f,e,t,o,c,n=arguments[0]||{},r=1,l=arguments.length,h=!1;for("boolean"==typeof n&&(h=n,n=arguments[r]||{},r++),"object"==typeof n||u(n)||(n={}),r===l&&(n=this,r--);r<l;r++)if(null!=(s=arguments[r]))for(f in s)t=s[f],"__proto__"!==f&&n!==t&&(h&&t&&(i.isPlainObject(t)||(o=Array.isArray(t)))?(e=n[f],c=o&&!Array.isArray(e)?[]:o||i.isPlainObject(e)?e:{},o=!1,n[f]=i.extend(h,c,t)):void 0!==t&&(n[f]=t));return n};i.extend({expando:"jQuery"+(kr+Math.random()).replace(/\D/g,""),isReady:!0,error:function(n){throw new Error(n);},noop:function(){},isPlainObject:function(n){var t,i;return!(!n||"[object Object]"!==pr.call(n))&&(!(t=vr(n))||"function"==typeof(i=ui.call(t,"constructor")&&t.constructor)&&wr.call(i)===ee)},isEmptyObject:function(n){for(var t in n)return!1;return!0},globalEval:function(n,t,i){br(n,{nonce:t&&t.nonce},i)},each:function(n,t){var r,i=0;if(pi(n)){for(r=n.length;i<r;i++)if(!1===t.call(n[i],i,n[i]))break}else for(i in n)if(!1===t.call(n[i],i,n[i]))break;return n},makeArray:function(n,t){var r=t||[];return null!=n&&(pi(Object(n))?i.merge(r,"string"==typeof n?[n]:n):yi.call(r,n)),r},inArray:function(n,t,i){return null==t?-1:ii.call(t,n,i)},merge:function(n,t){for(var u=+t.length,i=0,r=n.length;i<u;i++)n[r++]=t[i];return n.length=r,n},grep:function(n,t,i){for(var u=[],r=0,f=n.length,e=!i;r<f;r++)!t(n[r],r)!==e&&u.push(n[r]);return u},map:function(n,t,i){var e,u,r=0,f=[];if(pi(n))for(e=n.length;r<e;r++)null!=(u=t(n[r],r,i))&&f.push(u);else for(r in n)null!=(u=t(n[r],r,i))&&f.push(u);return yr(f)},guid:1,support:e});"function"==typeof Symbol&&(i.fn[Symbol.iterator]=p[Symbol.iterator]);i.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(n,t){ri["[object "+t+"]"]=t.toLowerCase()});d=function(n){function u(n,t,r,u){var s,y,c,l,p,w,d,v=t&&t.ownerDocument,a=t?t.nodeType:9;if(r=r||[],"string"!=typeof n||!n||1!==a&&9!==a&&11!==a)return r;if(!u&&(b(t),t=t||i,h)){if(11!==a&&(p=ar.exec(n)))if(s=p[1]){if(9===a){if(!(c=t.getElementById(s)))return r;if(c.id===s)return r.push(c),r}else if(v&&(c=v.getElementById(s))&&et(t,c)&&c.id===s)return r.push(c),r}else{if(p[2])return k.apply(r,t.getElementsByTagName(n)),r;if((s=p[3])&&f.getElementsByClassName&&t.getElementsByClassName)return k.apply(r,t.getElementsByClassName(s)),r}if(f.qsa&&!lt[n+" "]&&(!o||!o.test(n))&&(1!==a||"object"!==t.nodeName.toLowerCase())){if(d=n,v=t,1===a&&(er.test(n)||yi.test(n))){for((v=ti.test(n)&&ri(t.parentNode)||t)===t&&f.scope||((l=t.getAttribute("id"))?l=l.replace(pi,wi):t.setAttribute("id",l=e)),y=(w=ft(n)).length;y--;)w[y]=(l?"#"+l:":scope")+" "+pt(w[y]);d=w.join(",")}try{return k.apply(r,v.querySelectorAll(d)),r}catch(t){lt(n,!0)}finally{l===e&&t.removeAttribute("id")}}}return si(n.replace(at,"$1"),t,r,u)}function yt(){var n=[];return function i(r,u){return n.push(r+" ")>t.cacheLength&&delete i[n.shift()],i[r+" "]=u}}function l(n){return n[e]=!0,n}function a(n){var t=i.createElement("fieldset");try{return!!n(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}}function ii(n,i){for(var r=n.split("|"),u=r.length;u--;)t.attrHandle[r[u]]=i}function ki(n,t){var i=t&&n,r=i&&1===n.nodeType&&1===t.nodeType&&n.sourceIndex-t.sourceIndex;if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function yr(n){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===n}}function pr(n){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===n}}function di(n){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===n:t.disabled===n:t.isDisabled===n||t.isDisabled!==!n&&vr(t)===n:t.disabled===n:"label"in t&&t.disabled===n}}function it(n){return l(function(t){return t=+t,l(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ri(n){return n&&"undefined"!=typeof n.getElementsByTagName&&n}function gi(){}function pt(n){for(var t=0,r=n.length,i="";t<r;t++)i+=n[t].value;return i}function wt(n,t,i){var r=t.dir,u=t.next,f=u||r,o=i&&"parentNode"===f,s=nr++;return t.first?function(t,i,u){while(t=t[r])if(1===t.nodeType||o)return n(t,i,u);return!1}:function(t,i,h){var c,l,a,y=[v,s];if(h){while(t=t[r])if((1===t.nodeType||o)&&n(t,i,h))return!0}else while(t=t[r])if(1===t.nodeType||o)if(l=(a=t[e]||(t[e]={}))[t.uniqueID]||(a[t.uniqueID]={}),u&&u===t.nodeName.toLowerCase())t=t[r]||t;else{if((c=l[f])&&c[0]===v&&c[1]===s)return y[2]=c[2];if((l[f]=y)[2]=n(t,i,h))return!0}return!1}}function ui(n){return 1<n.length?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function bt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=null!=t;f<s;f++)(e=n[f])&&(i&&!i(e,r,u)||(o.push(e),h&&t.push(f)));return o}function fi(n,t,i,r,f,o){return r&&!r[e]&&(r=fi(r)),f&&!f[e]&&(f=fi(f,o)),l(function(e,o,s,h){var a,l,v,w=[],p=[],b=o.length,d=e||function(n,t,i){for(var r=0,f=t.length;r<f;r++)u(n,t[r],i);return i}(t||"*",s.nodeType?[s]:s,[]),y=!n||!e&&t?d:bt(d,w,n,s,h),c=i?f||(e?n:b||r)?[]:o:y;if(i&&i(y,c,s,h),r)for(a=bt(c,p),r(a,[],s,h),l=a.length;l--;)(v=a[l])&&(c[p[l]]=!(y[p[l]]=v));if(e){if(f||n){if(f){for(a=[],l=c.length;l--;)(v=c[l])&&a.push(y[l]=v);f(null,c=[],a,h)}for(l=c.length;l--;)(v=c[l])&&-1<(a=f?nt(e,v):w[l])&&(e[a]=!(o[a]=v))}}else c=bt(c===o?c.splice(b,c.length):c),f?f(null,o,c,h):k.apply(o,c)})}function ei(n){for(var o,u,r,s=n.length,h=t.relative[n[0].type],c=h||t.relative[" "],i=h?1:0,l=wt(function(n){return n===o},c,!0),a=wt(function(n){return-1<nt(o,n)},c,!0),f=[function(n,t,i){var r=!h&&(i||t!==ht)||((o=t).nodeType?l(n,t,i):a(n,t,i));return o=null,r}];i<s;i++)if(u=t.relative[n[i].type])f=[wt(ui(f),u)];else{if((u=t.filter[n[i].type].apply(null,n[i].matches))[e]){for(r=++i;r<s;r++)if(t.relative[n[r].type])break;return fi(1<i&&ui(f),1<i&&pt(n.slice(0,i-1).concat({value:" "===n[i-2].type?"*":""})).replace(at,"$1"),u,i<r&&ei(n.slice(i,r)),r<s&&ei(n=n.slice(r)),r<s&&pt(n))}f.push(u)}return ui(f)}var rt,f,t,st,oi,ft,kt,si,ht,w,ut,b,i,s,h,o,d,ct,et,e="sizzle"+1*new Date,c=n.document,v=0,nr=0,hi=yt(),ci=yt(),li=yt(),lt=yt(),dt=function(n,t){return n===t&&(ut=!0),0},tr={}.hasOwnProperty,g=[],ir=g.pop,rr=g.push,k=g.push,ai=g.slice,nt=function(n,t){for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1},gt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",r="[\\x20\\t\\r\\n\\f]",tt="(?:\\\\[\\da-fA-F]{1,6}"+r+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",vi="\\["+r+"*("+tt+")(?:"+r+"*([*^$|!~]?=)"+r+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+tt+"))|)"+r+"*\\]",ni=":("+tt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+vi+")*)|.*)\\)|)",ur=new RegExp(r+"+","g"),at=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),fr=new RegExp("^"+r+"*,"+r+"*"),yi=new RegExp("^"+r+"*([>+~]|"+r+")"+r+"*"),er=new RegExp(r+"|>"),or=new RegExp(ni),sr=new RegExp("^"+tt+"$"),vt={ID:new RegExp("^#("+tt+")"),CLASS:new RegExp("^\\.("+tt+")"),TAG:new RegExp("^("+tt+"|[*])"),ATTR:new RegExp("^"+vi),PSEUDO:new RegExp("^"+ni),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),bool:new RegExp("^(?:"+gt+")$","i"),needsContext:new RegExp("^"+r+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+r+"*((?:-\\d)?\\d*)"+r+"*\\)|)(?=[^-]|$)","i")},hr=/HTML$/i,cr=/^(?:input|select|textarea|button)$/i,lr=/^h\d$/i,ot=/^[^{]+\{\s*\[native \w/,ar=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ti=/[+~]/,y=new RegExp("\\\\[\\da-fA-F]{1,6}"+r+"?|\\\\([^\\r\\n\\f])","g"),p=function(n,t){var i="0x"+n.slice(1)-65536;return t||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},pi=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,wi=function(n,t){return t?"\0"===n?"�":n.slice(0,-1)+"\\"+n.charCodeAt(n.length-1).toString(16)+" ":"\\"+n},bi=function(){b()},vr=wt(function(n){return!0===n.disabled&&"fieldset"===n.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{k.apply(g=ai.call(c.childNodes),c.childNodes);g[c.childNodes.length].nodeType}catch(rt){k={apply:g.length?function(n,t){rr.apply(n,ai.call(t))}:function(n,t){for(var i=n.length,r=0;n[i++]=t[r++];);n.length=i-1}}}for(rt in f=u.support={},oi=u.isXML=function(n){var i=n.namespaceURI,t=(n.ownerDocument||n).documentElement;return!hr.test(i||t&&t.nodeName||"HTML")},b=u.setDocument=function(n){var v,u,l=n?n.ownerDocument||n:c;return l!=i&&9===l.nodeType&&l.documentElement&&(s=(i=l).documentElement,h=!oi(i),c!=i&&(u=i.defaultView)&&u.top!==u&&(u.addEventListener?u.addEventListener("unload",bi,!1):u.attachEvent&&u.attachEvent("onunload",bi)),f.scope=a(function(n){return s.appendChild(n).appendChild(i.createElement("div")),"undefined"!=typeof n.querySelectorAll&&!n.querySelectorAll(":scope fieldset div").length}),f.attributes=a(function(n){return n.className="i",!n.getAttribute("className")}),f.getElementsByTagName=a(function(n){return n.appendChild(i.createComment("")),!n.getElementsByTagName("*").length}),f.getElementsByClassName=ot.test(i.getElementsByClassName),f.getById=a(function(n){return s.appendChild(n).id=e,!i.getElementsByName||!i.getElementsByName(e).length}),f.getById?(t.filter.ID=function(n){var t=n.replace(y,p);return function(n){return n.getAttribute("id")===t}},t.find.ID=function(n,t){if("undefined"!=typeof t.getElementById&&h){var i=t.getElementById(n);return i?[i]:[]}}):(t.filter.ID=function(n){var t=n.replace(y,p);return function(n){var i="undefined"!=typeof n.getAttributeNode&&n.getAttributeNode("id");return i&&i.value===t}},t.find.ID=function(n,t){if("undefined"!=typeof t.getElementById&&h){var r,u,f,i=t.getElementById(n);if(i){if((r=i.getAttributeNode("id"))&&r.value===n)return[i];for(f=t.getElementsByName(n),u=0;i=f[u++];)if((r=i.getAttributeNode("id"))&&r.value===n)return[i]}return[]}}),t.find.TAG=f.getElementsByTagName?function(n,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(n):f.qsa?t.querySelectorAll(n):void 0}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if("*"===n){while(i=u[f++])1===i.nodeType&&r.push(i);return r}return u},t.find.CLASS=f.getElementsByClassName&&function(n,t){if("undefined"!=typeof t.getElementsByClassName&&h)return t.getElementsByClassName(n)},d=[],o=[],(f.qsa=ot.test(i.querySelectorAll))&&(a(function(n){var t;s.appendChild(n).innerHTML="<a id='"+e+"'><\/a><select id='"+e+"-\r\\' msallowcapture=''><option selected=''><\/option><\/select>";n.querySelectorAll("[msallowcapture^='']").length&&o.push("[*^$]="+r+"*(?:''|\"\")");n.querySelectorAll("[selected]").length||o.push("\\["+r+"*(?:value|"+gt+")");n.querySelectorAll("[id~="+e+"-]").length||o.push("~=");(t=i.createElement("input")).setAttribute("name","");n.appendChild(t);n.querySelectorAll("[name='']").length||o.push("\\["+r+"*name"+r+"*="+r+"*(?:''|\"\")");n.querySelectorAll(":checked").length||o.push(":checked");n.querySelectorAll("a#"+e+"+*").length||o.push(".#.+[+~]");n.querySelectorAll("\\\f");o.push("[\\r\\n\\f]")}),a(function(n){n.innerHTML="<a href='' disabled='disabled'><\/a><select disabled='disabled'><option/><\/select>";var t=i.createElement("input");t.setAttribute("type","hidden");n.appendChild(t).setAttribute("name","D");n.querySelectorAll("[name=d]").length&&o.push("name"+r+"*[*^$|!~]?=");2!==n.querySelectorAll(":enabled").length&&o.push(":enabled",":disabled");s.appendChild(n).disabled=!0;2!==n.querySelectorAll(":disabled").length&&o.push(":enabled",":disabled");n.querySelectorAll("*,:x");o.push(",.*:")})),(f.matchesSelector=ot.test(ct=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector))&&a(function(n){f.disconnectedMatch=ct.call(n,"*");ct.call(n,"[s!='']:x");d.push("!=",ni)}),o=o.length&&new RegExp(o.join("|")),d=d.length&&new RegExp(d.join("|")),v=ot.test(s.compareDocumentPosition),et=v||ot.test(s.contains)?function(n,t){var r=9===n.nodeType?n.documentElement:n,i=t&&t.parentNode;return n===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):n.compareDocumentPosition&&16&n.compareDocumentPosition(i)))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},dt=v?function(n,t){if(n===t)return ut=!0,0;var r=!n.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(n.ownerDocument||n)==(t.ownerDocument||t)?n.compareDocumentPosition(t):1)||!f.sortDetached&&t.compareDocumentPosition(n)===r?n==i||n.ownerDocument==c&&et(c,n)?-1:t==i||t.ownerDocument==c&&et(c,t)?1:w?nt(w,n)-nt(w,t):0:4&r?-1:1)}:function(n,t){if(n===t)return ut=!0,0;var r,u=0,o=n.parentNode,s=t.parentNode,f=[n],e=[t];if(!o||!s)return n==i?-1:t==i?1:o?-1:s?1:w?nt(w,n)-nt(w,t):0;if(o===s)return ki(n,t);for(r=n;r=r.parentNode;)f.unshift(r);for(r=t;r=r.parentNode;)e.unshift(r);while(f[u]===e[u])u++;return u?ki(f[u],e[u]):f[u]==c?-1:e[u]==c?1:0}),i},u.matches=function(n,t){return u(n,null,null,t)},u.matchesSelector=function(n,t){if(b(n),f.matchesSelector&&h&&!lt[t+" "]&&(!d||!d.test(t))&&(!o||!o.test(t)))try{var r=ct.call(n,t);if(r||f.disconnectedMatch||n.document&&11!==n.document.nodeType)return r}catch(n){lt(t,!0)}return 0<u(t,i,null,[n]).length},u.contains=function(n,t){return(n.ownerDocument||n)!=i&&b(n),et(n,t)},u.attr=function(n,r){(n.ownerDocument||n)!=i&&b(n);var e=t.attrHandle[r.toLowerCase()],u=e&&tr.call(t.attrHandle,r.toLowerCase())?e(n,r,!h):void 0;return void 0!==u?u:f.attributes||!h?n.getAttribute(r):(u=n.getAttributeNode(r))&&u.specified?u.value:null},u.escape=function(n){return(n+"").replace(pi,wi)},u.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);},u.uniqueSort=function(n){var r,u=[],t=0,i=0;if(ut=!f.detectDuplicates,w=!f.sortStable&&n.slice(0),n.sort(dt),ut){while(r=n[i++])r===n[i]&&(t=u.push(i));while(t--)n.splice(u[t],1)}return w=null,n},st=u.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=st(n)}else if(3===t||4===t)return n.nodeValue}else while(r=n[u++])i+=st(r);return i},(t=u.selectors={cacheLength:50,createPseudo:l,match:vt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(y,p),n[3]=(n[3]||n[4]||n[5]||"").replace(y,p),"~="===n[2]&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),"nth"===n[1].slice(0,3)?(n[3]||u.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*("even"===n[3]||"odd"===n[3])),n[5]=+(n[7]+n[8]||"odd"===n[3])):n[3]&&u.error(n[0]),n},PSEUDO:function(n){var i,t=!n[6]&&n[2];return vt.CHILD.test(n[0])?null:(n[3]?n[2]=n[4]||n[5]||"":t&&or.test(t)&&(i=ft(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){var t=n.replace(y,p).toLowerCase();return"*"===n?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(n){var t=hi[n+" "];return t||(t=new RegExp("(^|"+r+")"+n+"("+r+"|$)"))&&hi(n,function(n){return t.test("string"==typeof n.className&&n.className||"undefined"!=typeof n.getAttribute&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(r){var f=u.attr(r,n);return null==f?"!="===t:!t||(f+="","="===t?f===i:"!="===t?f!==i:"^="===t?i&&0===f.indexOf(i):"*="===t?i&&-1<f.indexOf(i):"$="===t?i&&f.slice(-i.length)===i:"~="===t?-1<(" "+f.replace(ur," ")+" ").indexOf(i):"|="===t&&(f===i||f.slice(0,i.length+1)===i+"-"))}},CHILD:function(n,t,i,r,u){var s="nth"!==n.slice(0,3),o="last"!==n.slice(-4),f="of-type"===t;return 1===r&&0===u?function(n){return!!n.parentNode}:function(t,i,h){var p,d,y,c,a,w,b=s!==o?"nextSibling":"previousSibling",k=t.parentNode,nt=f&&t.nodeName.toLowerCase(),g=!h&&!f,l=!1;if(k){if(s){while(b){for(c=t;c=c[b];)if(f?c.nodeName.toLowerCase()===nt:1===c.nodeType)return!1;w=b="only"===n&&!w&&"nextSibling"}return!0}if(w=[o?k.firstChild:k.lastChild],o&&g){for(l=(a=(p=(d=(y=(c=k)[e]||(c[e]={}))[c.uniqueID]||(y[c.uniqueID]={}))[n]||[])[0]===v&&p[1])&&p[2],c=a&&k.childNodes[a];c=++a&&c&&c[b]||(l=a=0)||w.pop();)if(1===c.nodeType&&++l&&c===t){d[n]=[v,a,l];break}}else if(g&&(l=a=(p=(d=(y=(c=t)[e]||(c[e]={}))[c.uniqueID]||(y[c.uniqueID]={}))[n]||[])[0]===v&&p[1]),!1===l)while(c=++a&&c&&c[b]||(l=a=0)||w.pop())if((f?c.nodeName.toLowerCase()===nt:1===c.nodeType)&&++l&&(g&&((d=(y=c[e]||(c[e]={}))[c.uniqueID]||(y[c.uniqueID]={}))[n]=[v,l]),c===t))break;return(l-=u)===r||l%r==0&&0<=l/r}}},PSEUDO:function(n,i){var f,r=t.pseudos[n]||t.setFilters[n.toLowerCase()]||u.error("unsupported pseudo: "+n);return r[e]?r(i):1<r.length?(f=[n,n,"",i],t.setFilters.hasOwnProperty(n.toLowerCase())?l(function(n,t){for(var e,u=r(n,i),f=u.length;f--;)n[e=nt(n,u[f])]=!(t[e]=u[f])}):function(n){return r(n,0,f)}):r}},pseudos:{not:l(function(n){var t=[],r=[],i=kt(n.replace(at,"$1"));return i[e]?l(function(n,t,r,u){for(var e,o=i(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(t[f]=e))}):function(n,u,f){return t[0]=n,i(t,null,f,r),t[0]=null,!r.pop()}}),has:l(function(n){return function(t){return 0<u(n,t).length}}),contains:l(function(n){return n=n.replace(y,p),function(t){return-1<(t.textContent||st(t)).indexOf(n)}}),lang:l(function(n){return sr.test(n||"")||u.error("unsupported lang: "+n),n=n.replace(y,p).toLowerCase(),function(t){var i;do if(i=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(i=i.toLowerCase())===n||0===i.indexOf(n+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===s},focus:function(n){return n===i.activeElement&&(!i.hasFocus||i.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:di(!1),disabled:di(!0),checked:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&!!n.checked||"option"===t&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,!0===n.selected},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeType<6)return!1;return!0},parent:function(n){return!t.pseudos.empty(n)},header:function(n){return lr.test(n.nodeName)},input:function(n){return cr.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&"button"===n.type||"button"===t},text:function(n){var t;return"input"===n.nodeName.toLowerCase()&&"text"===n.type&&(null==(t=n.getAttribute("type"))||"text"===t.toLowerCase())},first:it(function(){return[0]}),last:it(function(n,t){return[t-1]}),eq:it(function(n,t,i){return[i<0?i+t:i]}),even:it(function(n,t){for(var i=0;i<t;i+=2)n.push(i);return n}),odd:it(function(n,t){for(var i=1;i<t;i+=2)n.push(i);return n}),lt:it(function(n,t,i){for(var r=i<0?i+t:t<i?t:i;0<=--r;)n.push(r);return n}),gt:it(function(n,t,i){for(var r=i<0?i+t:i;++r<t;)n.push(r);return n})}}).pseudos.nth=t.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[rt]=yr(rt);for(rt in{submit:!0,reset:!0})t.pseudos[rt]=pr(rt);return gi.prototype=t.filters=t.pseudos,t.setFilters=new gi,ft=u.tokenize=function(n,i){var e,f,s,o,r,h,c,l=ci[n+" "];if(l)return i?0:l.slice(0);for(r=n,h=[],c=t.preFilter;r;){for(o in e&&!(f=fr.exec(r))||(f&&(r=r.slice(f[0].length)||r),h.push(s=[])),e=!1,(f=yi.exec(r))&&(e=f.shift(),s.push({value:e,type:f[0].replace(at," ")}),r=r.slice(e.length)),t.filter)(f=vt[o].exec(r))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),r=r.slice(e.length));if(!e)break}return i?r.length:r?u.error(n):ci(n,h).slice(0)},kt=u.compile=function(n,r){var s,c,a,o,y,p,w=[],d=[],f=li[n+" "];if(!f){for(r||(r=ft(n)),s=r.length;s--;)(f=ei(r[s]))[e]?w.push(f):d.push(f);(f=li(n,(c=d,o=0<(a=w).length,y=0<c.length,p=function(n,r,f,e,s){var l,nt,d,g=0,p="0",tt=n&&[],w=[],it=ht,rt=n||y&&t.find.TAG("*",s),ut=v+=null==it?1:Math.random()||.1,ft=rt.length;for(s&&(ht=r==i||r||s);p!==ft&&null!=(l=rt[p]);p++){if(y&&l){for(nt=0,r||l.ownerDocument==i||(b(l),f=!h);d=c[nt++];)if(d(l,r||i,f)){e.push(l);break}s&&(v=ut)}o&&((l=!d&&l)&&g--,n&&tt.push(l))}if(g+=p,o&&p!==g){for(nt=0;d=a[nt++];)d(tt,w,r,f);if(n){if(0<g)while(p--)tt[p]||w[p]||(w[p]=ir.call(e));w=bt(w)}k.apply(e,w);s&&!n&&0<w.length&&1<g+a.length&&u.uniqueSort(e)}return s&&(v=ut,ht=it),tt},o?l(p):p))).selector=n}return f},si=u.select=function(n,i,r,u){var o,f,e,l,a,c="function"==typeof n&&n,s=!u&&ft(n=c.selector||n);if(r=r||[],1===s.length){if(2<(f=s[0]=s[0].slice(0)).length&&"ID"===(e=f[0]).type&&9===i.nodeType&&h&&t.relative[f[1].type]){if(!(i=(t.find.ID(e.matches[0].replace(y,p),i)||[])[0]))return r;c&&(i=i.parentNode);n=n.slice(f.shift().value.length)}for(o=vt.needsContext.test(n)?0:f.length;o--;){if(e=f[o],t.relative[l=e.type])break;if((a=t.find[l])&&(u=a(e.matches[0].replace(y,p),ti.test(f[0].type)&&ri(i.parentNode)||i))){if(f.splice(o,1),!(n=u.length&&pt(f)))return k.apply(r,u),r;break}}}return(c||kt(n,s))(u,i,!h,r,!i||ti.test(n)&&ri(i.parentNode)||i),r},f.sortStable=e.split("").sort(dt).join("")===e,f.detectDuplicates=!!ut,b(),f.sortDetached=a(function(n){return 1&n.compareDocumentPosition(i.createElement("fieldset"))}),a(function(n){return n.innerHTML="<a href='#'><\/a>","#"===n.firstChild.getAttribute("href")})||ii("type|href|height|width",function(n,t,i){if(!i)return n.getAttribute(t,"type"===t.toLowerCase()?1:2)}),f.attributes&&a(function(n){return n.innerHTML="<input/>",n.firstChild.setAttribute("value",""),""===n.firstChild.getAttribute("value")})||ii("value",function(n,t,i){if(!i&&"input"===n.nodeName.toLowerCase())return n.defaultValue}),a(function(n){return null==n.getAttribute("disabled")})||ii(gt,function(n,t,i){var r;if(!i)return!0===n[t]?t.toLowerCase():(r=n.getAttributeNode(t))&&r.specified?r.value:null}),u}(n);i.find=d;i.expr=d.selectors;i.expr[":"]=i.expr.pseudos;i.uniqueSort=i.unique=d.uniqueSort;i.text=d.getText;i.isXMLDoc=d.isXML;i.contains=d.contains;i.escapeSelector=d.escape;var ft=function(n,t,r){for(var u=[],f=void 0!==r;(n=n[t])&&9!==n.nodeType;)if(1===n.nodeType){if(f&&i(n).is(r))break;u.push(n)}return u},dr=function(n,t){for(var i=[];n;n=n.nextSibling)1===n.nodeType&&n!==t&&i.push(n);return i},gr=i.expr.match.needsContext;wi=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;i.filter=function(n,t,r){var u=t[0];return r&&(n=":not("+n+")"),1===t.length&&1===u.nodeType?i.find.matchesSelector(u,n)?[u]:[]:i.find.matches(n,i.grep(t,function(n){return 1===n.nodeType}))};i.fn.extend({find:function(n){var t,r,u=this.length,f=this;if("string"!=typeof n)return this.pushStack(i(n).filter(function(){for(t=0;t<u;t++)if(i.contains(f[t],this))return!0}));for(r=this.pushStack([]),t=0;t<u;t++)i.find(n,f[t],r);return 1<u?i.uniqueSort(r):r},filter:function(n){return this.pushStack(bi(this,n||[],!1))},not:function(n){return this.pushStack(bi(this,n||[],!0))},is:function(n){return!!bi(this,"string"==typeof n&&gr.test(n)?i(n):n||[],!1).length}});tu=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(i.fn.init=function(n,t,r){var e,o;if(!n)return this;if(r=r||nu,"string"==typeof n){if(!(e="<"===n[0]&&">"===n[n.length-1]&&3<=n.length?[null,n,null]:tu.exec(n))||!e[1]&&t)return!t||t.jquery?(t||r).find(n):this.constructor(t).find(n);if(e[1]){if(t=t instanceof i?t[0]:t,i.merge(this,i.parseHTML(e[1],t&&t.nodeType?t.ownerDocument||t:f,!0)),wi.test(e[1])&&i.isPlainObject(t))for(e in t)u(this[e])?this[e](t[e]):this.attr(e,t[e]);return this}return(o=f.getElementById(e[2]))&&(this[0]=o,this.length=1),this}return n.nodeType?(this[0]=n,this.length=1,this):u(n)?void 0!==r.ready?r.ready(n):n(i):i.makeArray(n,this)}).prototype=i.fn;nu=i(f);iu=/^(?:parents|prev(?:Until|All))/;ru={children:!0,contents:!0,next:!0,prev:!0};i.fn.extend({has:function(n){var t=i(n,this),r=t.length;return this.filter(function(){for(var n=0;n<r;n++)if(i.contains(this,t[n]))return!0})},closest:function(n,t){var r,f=0,o=this.length,u=[],e="string"!=typeof n&&i(n);if(!gr.test(n))for(;f<o;f++)for(r=this[f];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(e?-1<e.index(r):1===r.nodeType&&i.find.matchesSelector(r,n))){u.push(r);break}return this.pushStack(1<u.length?i.uniqueSort(u):u)},index:function(n){return n?"string"==typeof n?ii.call(i(n),this[0]):ii.call(this,n.jquery?n[0]:n):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){return this.pushStack(i.uniqueSort(i.merge(this.get(),i(n,t))))},addBack:function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))}});i.each({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?t:null},parents:function(n){return ft(n,"parentNode")},parentsUntil:function(n,t,i){return ft(n,"parentNode",i)},next:function(n){return uu(n,"nextSibling")},prev:function(n){return uu(n,"previousSibling")},nextAll:function(n){return ft(n,"nextSibling")},prevAll:function(n){return ft(n,"previousSibling")},nextUntil:function(n,t,i){return ft(n,"nextSibling",i)},prevUntil:function(n,t,i){return ft(n,"previousSibling",i)},siblings:function(n){return dr((n.parentNode||{}).firstChild,n)},children:function(n){return dr(n.firstChild)},contents:function(n){return null!=n.contentDocument&&vr(n.contentDocument)?n.contentDocument:(c(n,"template")&&(n=n.content||n),i.merge([],n.childNodes))}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return"Until"!==n.slice(-5)&&(u=r),u&&"string"==typeof u&&(f=i.filter(u,f)),1<this.length&&(ru[n]||i.uniqueSort(f),iu.test(n)&&f.reverse()),this.pushStack(f)}});l=/[^\x20\t\r\n\f]+/g;i.Callbacks=function(n){var a,h;n="string"==typeof n?(a=n,h={},i.each(a.match(l)||[],function(n,t){h[t]=!0}),h):i.extend({},n);var o,r,v,f,t=[],s=[],e=-1,y=function(){for(f=f||n.once,v=o=!0;s.length;e=-1)for(r=s.shift();++e<t.length;)!1===t[e].apply(r[0],r[1])&&n.stopOnFalse&&(e=t.length,r=!1);n.memory||(r=!1);o=!1;f&&(t=r?[]:"")},c={add:function(){return t&&(r&&!o&&(e=t.length-1,s.push(r)),function f(r){i.each(r,function(i,r){u(r)?n.unique&&c.has(r)||t.push(r):r&&r.length&&"string"!==ut(r)&&f(r)})}(arguments),r&&!o&&y()),this},remove:function(){return i.each(arguments,function(n,r){for(var u;-1<(u=i.inArray(r,t,u));)t.splice(u,1),u<=e&&e--}),this},has:function(n){return n?-1<i.inArray(n,t):0<t.length},empty:function(){return t&&(t=[]),this},disable:function(){return f=s=[],t=r="",this},disabled:function(){return!t},lock:function(){return f=s=[],r||o||(t=r=""),this},locked:function(){return!!f},fireWith:function(n,t){return f||(t=[n,(t=t||[]).slice?t.slice():t],s.push(t),o||y()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!v}};return c};i.extend({Deferred:function(t){var f=[["notify","progress",i.Callbacks("memory"),i.Callbacks("memory"),2],["resolve","done",i.Callbacks("once memory"),i.Callbacks("once memory"),0,"resolved"],["reject","fail",i.Callbacks("once memory"),i.Callbacks("once memory"),1,"rejected"]],o="pending",e={state:function(){return o},always:function(){return r.done(arguments).fail(arguments),this},"catch":function(n){return e.then(null,n)},pipe:function(){var n=arguments;return i.Deferred(function(t){i.each(f,function(i,f){var e=u(n[f[4]])&&n[f[4]];r[f[1]](function(){var n=e&&e.apply(this,arguments);n&&u(n.promise)?n.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[f[0]+"With"](this,e?[n]:arguments)})});n=null}).promise()},then:function(t,r,e){function s(t,r,f,e){return function(){var h=this,c=arguments,l=function(){var n,i;if(!(t<o)){if((n=f.apply(h,c))===r.promise())throw new TypeError("Thenable self-resolution");i=n&&("object"==typeof n||"function"==typeof n)&&n.then;u(i)?e?i.call(n,s(o,r,et,e),s(o,r,fi,e)):(o++,i.call(n,s(o,r,et,e),s(o,r,fi,e),s(o,r,et,r.notifyWith))):(f!==et&&(h=void 0,c=[n]),(e||r.resolveWith)(h,c))}},a=e?l:function(){try{l()}catch(l){i.Deferred.exceptionHook&&i.Deferred.exceptionHook(l,a.stackTrace);o<=t+1&&(f!==fi&&(h=void 0,c=[l]),r.rejectWith(h,c))}};t?a():(i.Deferred.getStackHook&&(a.stackTrace=i.Deferred.getStackHook()),n.setTimeout(a))}}var o=0;return i.Deferred(function(n){f[0][3].add(s(0,n,u(e)?e:et,n.notifyWith));f[1][3].add(s(0,n,u(t)?t:et));f[2][3].add(s(0,n,u(r)?r:fi))}).promise()},promise:function(n){return null!=n?i.extend(n,e):e}},r={};return i.each(f,function(n,t){var i=t[2],u=t[5];e[t[1]]=i.add;u&&i.add(function(){o=u},f[3-n][2].disable,f[3-n][3].disable,f[0][2].lock,f[0][3].lock);i.add(t[3].fire);r[t[0]]=function(){return r[t[0]+"With"](this===r?void 0:this,arguments),this};r[t[0]+"With"]=i.fireWith}),e.promise(r),t&&t.call(r,r),r},when:function(n){var e=arguments.length,t=e,o=Array(t),f=k.call(arguments),r=i.Deferred(),s=function(n){return function(t){o[n]=this;f[n]=1<arguments.length?k.call(arguments):t;--e||r.resolveWith(o,f)}};if(e<=1&&(fu(n,r.done(s(t)).resolve,r.reject,!e),"pending"===r.state()||u(f[t]&&f[t].then)))return r.then();while(t--)fu(f[t],s(t),r.reject);return r.promise()}});eu=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;i.Deferred.exceptionHook=function(t,i){n.console&&n.console.warn&&t&&eu.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,i)};i.readyException=function(t){n.setTimeout(function(){throw t;})};ei=i.Deferred();i.fn.ready=function(n){return ei.then(n)["catch"](function(n){i.readyException(n)}),this};i.extend({isReady:!1,readyWait:1,ready:function(n){(!0===n?--i.readyWait:i.isReady)||(i.isReady=!0)!==n&&0<--i.readyWait||ei.resolveWith(f,[i])}});i.ready.then=ei.then;"complete"===f.readyState||"loading"!==f.readyState&&!f.documentElement.doScroll?n.setTimeout(i.ready):(f.addEventListener("DOMContentLoaded",oi),n.addEventListener("load",oi));var w=function(n,t,r,f,e,o,s){var h=0,l=n.length,c=null==r;if("object"===ut(r))for(h in e=!0,r)w(n,t,h,r[h],!0,o,s);else if(void 0!==f&&(e=!0,u(f)||(s=!0),c&&(s?(t.call(n,f),t=null):(c=t,t=function(n,t,r){return c.call(i(n),r)})),t))for(;h<l;h++)t(n[h],r,s?f:f.call(n[h],h,t(n[h],r)));return e?n:c?t.call(n):l?t(n[0],r):o},se=/^-ms-/,he=/-([a-z])/g;ot=function(n){return 1===n.nodeType||9===n.nodeType||!+n.nodeType};bt.uid=1;bt.prototype={cache:function(n){var t=n[this.expando];return t||(t={},ot(n)&&(n.nodeType?n[this.expando]=t:Object.defineProperty(n,this.expando,{value:t,configurable:!0}))),t},set:function(n,t,i){var r,u=this.cache(n);if("string"==typeof t)u[y(t)]=i;else for(r in t)u[y(r)]=t[r];return u},get:function(n,t){return void 0===t?this.cache(n):n[this.expando]&&n[this.expando][y(t)]},access:function(n,t,i){return void 0===t||t&&"string"==typeof t&&void 0===i?this.get(n,t):(this.set(n,t,i),void 0!==i?i:t)},remove:function(n,t){var u,r=n[this.expando];if(void 0!==r){if(void 0!==t)for(u=(t=Array.isArray(t)?t.map(y):(t=y(t))in r?[t]:t.match(l)||[]).length;u--;)delete r[t[u]];(void 0===t||i.isEmptyObject(r))&&(n.nodeType?n[this.expando]=void 0:delete n[this.expando])}},hasData:function(n){var t=n[this.expando];return void 0!==t&&!i.isEmptyObject(t)}};var r=new bt,o=new bt,le=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ae=/[A-Z]/g;i.extend({hasData:function(n){return o.hasData(n)||r.hasData(n)},data:function(n,t,i){return o.access(n,t,i)},removeData:function(n,t){o.remove(n,t)},_data:function(n,t,i){return r.access(n,t,i)},_removeData:function(n,t){r.remove(n,t)}});i.fn.extend({data:function(n,t){var f,u,e,i=this[0],s=i&&i.attributes;if(void 0===n){if(this.length&&(e=o.get(i),1===i.nodeType&&!r.get(i,"hasDataAttrs"))){for(f=s.length;f--;)s[f]&&0===(u=s[f].name).indexOf("data-")&&(u=y(u.slice(5)),ou(i,u,e[u]));r.set(i,"hasDataAttrs",!0)}return e}return"object"==typeof n?this.each(function(){o.set(this,n)}):w(this,function(t){var r;if(i&&void 0===t)return void 0!==(r=o.get(i,n))?r:void 0!==(r=ou(i,n))?r:void 0;this.each(function(){o.set(this,n,t)})},null,t,1<arguments.length,null,!0)},removeData:function(n){return this.each(function(){o.remove(this,n)})}});i.extend({queue:function(n,t,u){var f;if(n)return t=(t||"fx")+"queue",f=r.get(n,t),u&&(!f||Array.isArray(u)?f=r.access(n,t,i.makeArray(u)):f.push(u)),f||[]},dequeue:function(n,t){t=t||"fx";var r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t);"inprogress"===u&&(u=r.shift(),e--);u&&("fx"===t&&r.unshift("inprogress"),delete f.stop,u.call(n,function(){i.dequeue(n,t)},f));!e&&f&&f.empty.fire()},_queueHooks:function(n,t){var u=t+"queueHooks";return r.get(n,u)||r.access(n,u,{empty:i.Callbacks("once memory").add(function(){r.remove(n,[t+"queue",u])})})}});i.fn.extend({queue:function(n,t){var r=2;return"string"!=typeof n&&(t=n,n="fx",r--),arguments.length<r?i.queue(this[0],n):void 0===t?this:this.each(function(){var r=i.queue(this,n,t);i._queueHooks(this,n);"fx"===n&&"inprogress"!==r[0]&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,t){var u,e=1,o=i.Deferred(),f=this,s=this.length,h=function(){--e||o.resolveWith(f,[f])};for("string"!=typeof n&&(t=n,n=void 0),n=n||"fx";s--;)(u=r.get(f[s],n+"queueHooks"))&&u.empty&&(e++,u.empty.add(h));return h(),o.promise(t)}});var su=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,kt=new RegExp("^(?:([+-])=|)("+su+")([a-z%]*)$","i"),b=["Top","Right","Bottom","Left"],g=f.documentElement,st=function(n){return i.contains(n.ownerDocument,n)},ve={composed:!0};g.getRootNode&&(st=function(n){return i.contains(n.ownerDocument,n)||n.getRootNode(ve)===n.ownerDocument});dt=function(n,t){return"none"===(n=t||n).style.display||""===n.style.display&&st(n)&&"none"===i.css(n,"display")};ki={};i.fn.extend({show:function(){return ht(this,!0)},hide:function(){return ht(this)},toggle:function(n){return"boolean"==typeof n?n?this.show():this.hide():this.each(function(){dt(this)?i(this).show():i(this).hide()})}});var nt,si,gt=/^(?:checkbox|radio)$/i,cu=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,lu=/^$|^module$|\/(?:java|ecma)script/i;nt=f.createDocumentFragment().appendChild(f.createElement("div"));(si=f.createElement("input")).setAttribute("type","radio");si.setAttribute("checked","checked");si.setAttribute("name","t");nt.appendChild(si);e.checkClone=nt.cloneNode(!0).cloneNode(!0).lastChild.checked;nt.innerHTML="<textarea>x<\/textarea>";e.noCloneChecked=!!nt.cloneNode(!0).lastChild.defaultValue;nt.innerHTML="<option><\/option>";e.option=!!nt.lastChild;h={thead:[1,"<table>","<\/table>"],col:[2,"<table><colgroup>","<\/colgroup><\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:[0,"",""]};h.tbody=h.tfoot=h.colgroup=h.caption=h.thead;h.th=h.td;e.option||(h.optgroup=h.option=[1,"<select multiple='multiple'>","<\/select>"]);au=/<|&#?\w+;/;var ye=/^key/,pe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,yu=/^([^.]*)(?:\.(.+)|)/;i.event={global:{},add:function(n,t,u,f,e){var p,a,k,v,w,h,s,c,o,b,d,y=r.get(n);if(ot(n))for(u.handler&&(u=(p=u).handler,e=p.selector),e&&i.find.matchesSelector(g,e),u.guid||(u.guid=i.guid++),(v=y.events)||(v=y.events=Object.create(null)),(a=y.handle)||(a=y.handle=function(t){if("undefined"!=typeof i&&i.event.triggered!==t.type)return i.event.dispatch.apply(n,arguments)}),w=(t=(t||"").match(l)||[""]).length;w--;)o=d=(k=yu.exec(t[w])||[])[1],b=(k[2]||"").split(".").sort(),o&&(s=i.event.special[o]||{},o=(e?s.delegateType:s.bindType)||o,s=i.event.special[o]||{},h=i.extend({type:o,origType:d,data:f,handler:u,guid:u.guid,selector:e,needsContext:e&&i.expr.match.needsContext.test(e),namespace:b.join(".")},p),(c=v[o])||((c=v[o]=[]).delegateCount=0,s.setup&&!1!==s.setup.call(n,f,b,a)||n.addEventListener&&n.addEventListener(o,a)),s.add&&(s.add.call(n,h),h.handler.guid||(h.handler.guid=u.guid)),e?c.splice(c.delegateCount++,0,h):c.push(h),i.event.global[o]=!0)},remove:function(n,t,u,f,e){var y,k,c,v,p,s,h,a,o,b,d,w=r.hasData(n)&&r.get(n);if(w&&(v=w.events)){for(p=(t=(t||"").match(l)||[""]).length;p--;)if(o=d=(c=yu.exec(t[p])||[])[1],b=(c[2]||"").split(".").sort(),o){for(h=i.event.special[o]||{},a=v[o=(f?h.delegateType:h.bindType)||o]||[],c=c[2]&&new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"),k=y=a.length;y--;)s=a[y],!e&&d!==s.origType||u&&u.guid!==s.guid||c&&!c.test(s.namespace)||f&&f!==s.selector&&("**"!==f||!s.selector)||(a.splice(y,1),s.selector&&a.delegateCount--,h.remove&&h.remove.call(n,s));k&&!a.length&&(h.teardown&&!1!==h.teardown.call(n,b,w.handle)||i.removeEvent(n,o,w.handle),delete v[o])}else for(o in v)i.event.remove(n,o+t[p],u,f,!0);i.isEmptyObject(v)&&r.remove(n,"handle events")}},dispatch:function(n){var u,h,c,e,f,l,s=new Array(arguments.length),t=i.event.fix(n),a=(r.get(this,"events")||Object.create(null))[t.type]||[],o=i.event.special[t.type]||{};for(s[0]=t,u=1;u<arguments.length;u++)s[u]=arguments[u];if(t.delegateTarget=this,!o.preDispatch||!1!==o.preDispatch.call(this,t)){for(l=i.event.handlers.call(this,t,a),u=0;(e=l[u++])&&!t.isPropagationStopped();)for(t.currentTarget=e.elem,h=0;(f=e.handlers[h++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!1!==f.namespace&&!t.rnamespace.test(f.namespace)||(t.handleObj=f,t.data=f.data,void 0!==(c=((i.event.special[f.origType]||{}).handle||f.handler).apply(e.elem,s))&&!1===(t.result=c)&&(t.preventDefault(),t.stopPropagation()));return o.postDispatch&&o.postDispatch.call(this,t),t.result}},handlers:function(n,t){var f,h,u,e,o,c=[],s=t.delegateCount,r=n.target;if(s&&r.nodeType&&!("click"===n.type&&1<=n.button))for(;r!==this;r=r.parentNode||this)if(1===r.nodeType&&("click"!==n.type||!0!==r.disabled)){for(e=[],o={},f=0;f<s;f++)void 0===o[u=(h=t[f]).selector+" "]&&(o[u]=h.needsContext?-1<i(u,this).index(r):i.find(u,this,null,[r]).length),o[u]&&e.push(h);e.length&&c.push({elem:r,handlers:e})}return r=this,s<t.length&&c.push({elem:r,handlers:t.slice(s)}),c},addProp:function(n,t){Object.defineProperty(i.Event.prototype,n,{enumerable:!0,configurable:!0,get:u(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[n]},set:function(t){Object.defineProperty(this,n,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(n){return n[i.expando]?n:new i.Event(n)},special:{load:{noBubble:!0},click:{setup:function(n){var t=this||n;return gt.test(t.type)&&t.click&&c(t,"input")&&hi(t,"click",ct),!1},trigger:function(n){var t=this||n;return gt.test(t.type)&&t.click&&c(t,"input")&&hi(t,"click"),!0},_default:function(n){var t=n.target;return gt.test(t.type)&&t.click&&c(t,"input")&&r.get(t,"click")||c(t,"a")}},beforeunload:{postDispatch:function(n){void 0!==n.result&&n.originalEvent&&(n.originalEvent.returnValue=n.result)}}}};i.removeEvent=function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i)};i.Event=function(n,t){if(!(this instanceof i.Event))return new i.Event(n,t);n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||void 0===n.defaultPrevented&&!1===n.returnValue?ct:lt,this.target=n.target&&3===n.target.nodeType?n.target.parentNode:n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget):this.type=n;t&&i.extend(this,t);this.timeStamp=n&&n.timeStamp||Date.now();this[i.expando]=!0};i.Event.prototype={constructor:i.Event,isDefaultPrevented:lt,isPropagationStopped:lt,isImmediatePropagationStopped:lt,isSimulated:!1,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=ct;n&&!this.isSimulated&&n.preventDefault()},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=ct;n&&!this.isSimulated&&n.stopPropagation()},stopImmediatePropagation:function(){var n=this.originalEvent;this.isImmediatePropagationStopped=ct;n&&!this.isSimulated&&n.stopImmediatePropagation();this.stopPropagation()}};i.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(n){var t=n.button;return null==n.which&&ye.test(n.type)?null!=n.charCode?n.charCode:n.keyCode:!n.which&&void 0!==t&&pe.test(n.type)?1&t?1:2&t?3:4&t?2:0:n.which}},i.event.addProp);i.each({focus:"focusin",blur:"focusout"},function(n,t){i.event.special[n]={setup:function(){return hi(this,n,we),!1},trigger:function(){return hi(this,n),!0},delegateType:t}});i.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,r=n.relatedTarget,f=n.handleObj;return r&&(r===this||i.contains(this,r))||(n.type=f.origType,u=f.handler.apply(this,arguments),n.type=t),u}}});i.fn.extend({on:function(n,t,i,r){return gi(this,n,t,i,r)},one:function(n,t,i,r){return gi(this,n,t,i,r,1)},off:function(n,t,r){var u,f;if(n&&n.preventDefault&&n.handleObj)return u=n.handleObj,i(n.delegateTarget).off(u.namespace?u.origType+"."+u.namespace:u.origType,u.selector,u.handler),this;if("object"==typeof n){for(f in n)this.off(f,t,n[f]);return this}return!1!==t&&"function"!=typeof t||(r=t,t=void 0),!1===r&&(r=lt),this.each(function(){i.event.remove(this,n,r,t)})}});var be=/<script|<style|<link/i,ke=/checked\s*(?:[^=]|=\s*.checked.)/i,de=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;i.extend({htmlPrefilter:function(n){return n},clone:function(n,t,r){var u,c,o,f,l,a,v,h=n.cloneNode(!0),y=st(n);if(!(e.noCloneChecked||1!==n.nodeType&&11!==n.nodeType||i.isXMLDoc(n)))for(f=s(h),u=0,c=(o=s(n)).length;u<c;u++)l=o[u],a=f[u],void 0,"input"===(v=a.nodeName.toLowerCase())&&gt.test(l.type)?a.checked=l.checked:"input"!==v&&"textarea"!==v||(a.defaultValue=l.defaultValue);if(t)if(r)for(o=o||s(n),f=f||s(h),u=0,c=o.length;u<c;u++)wu(o[u],f[u]);else wu(n,h);return 0<(f=s(h,"script")).length&&di(f,!y&&s(n,"script")),h},cleanData:function(n){for(var u,t,f,s=i.event.special,e=0;void 0!==(t=n[e]);e++)if(ot(t)){if(u=t[r.expando]){if(u.events)for(f in u.events)s[f]?i.event.remove(t,f):i.removeEvent(t,f,u.handle);t[r.expando]=void 0}t[o.expando]&&(t[o.expando]=void 0)}}});i.fn.extend({detach:function(n){return bu(this,n,!0)},remove:function(n){return bu(this,n)},text:function(n){return w(this,function(n){return void 0===n?i.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=n)})},null,n,arguments.length)},append:function(){return at(this,arguments,function(n){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||pu(this,n).appendChild(n)})},prepend:function(){return at(this,arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pu(this,n);t.insertBefore(n,t.firstChild)}})},before:function(){return at(this,arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return at(this,arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},empty:function(){for(var n,t=0;null!=(n=this[t]);t++)1===n.nodeType&&(i.cleanData(s(n,!1)),n.textContent="");return this},clone:function(n,t){return n=null!=n&&n,t=null==t?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return w(this,function(n){var t=this[0]||{},r=0,u=this.length;if(void 0===n&&1===t.nodeType)return t.innerHTML;if("string"==typeof n&&!be.test(n)&&!h[(cu.exec(n)||["",""])[1].toLowerCase()]){n=i.htmlPrefilter(n);try{for(;r<u;r++)1===(t=this[r]||{}).nodeType&&(i.cleanData(s(t,!1)),t.innerHTML=n);t=0}catch(n){}}t&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(){var n=[];return at(this,arguments,function(t){var r=this.parentNode;i.inArray(this,n)<0&&(i.cleanData(s(this)),r&&r.replaceChild(t,this))},n)}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,f=[],e=i(n),o=e.length-1,r=0;r<=o;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),yi.apply(f,u.get());return this.pushStack(f)}});var nr=new RegExp("^("+su+")(?!px)[a-z%]+$","i"),ci=function(t){var i=t.ownerDocument.defaultView;return i&&i.opener||(i=n),i.getComputedStyle(t)},ku=function(n,t,i){var u,r,f={};for(r in t)f[r]=n.style[r],n.style[r]=t[r];for(r in u=i.call(n),t)n.style[r]=f[r];return u},to=new RegExp(b.join("|"),"i");!function(){function r(){if(t){s.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0";t.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%";g.appendChild(s).appendChild(t);var i=n.getComputedStyle(t);h="1%"!==i.top;v=12===u(i.marginLeft);t.style.right="60%";a=36===u(i.right);c=36===u(i.width);t.style.position="absolute";l=12===u(t.offsetWidth/3);g.removeChild(s);t=null}}function u(n){return Math.round(parseFloat(n))}var h,c,l,a,o,v,s=f.createElement("div"),t=f.createElement("div");t.style&&(t.style.backgroundClip="content-box",t.cloneNode(!0).style.backgroundClip="",e.clearCloneStyle="content-box"===t.style.backgroundClip,i.extend(e,{boxSizingReliable:function(){return r(),c},pixelBoxStyles:function(){return r(),a},pixelPosition:function(){return r(),h},reliableMarginLeft:function(){return r(),v},scrollboxSize:function(){return r(),l},reliableTrDimensions:function(){var t,i,r,u;return null==o&&(t=f.createElement("table"),i=f.createElement("tr"),r=f.createElement("div"),t.style.cssText="position:absolute;left:-11111px",i.style.height="1px",r.style.height="9px",g.appendChild(t).appendChild(i).appendChild(r),u=n.getComputedStyle(i),o=3<parseInt(u.height),g.removeChild(t)),o}}))}();var gu=["Webkit","Moz","ms"],nf=f.createElement("div").style,tf={};var io=/^(none|table(?!-c[ea]).+)/,rf=/^--/,ro={position:"absolute",visibility:"hidden",display:"block"},uf={letterSpacing:"0",fontWeight:"400"};i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=ni(n,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(n,t,r,u){if(n&&3!==n.nodeType&&8!==n.nodeType&&n.style){var f,h,o,c=y(t),l=rf.test(t),s=n.style;if(l||(t=tr(c)),o=i.cssHooks[t]||i.cssHooks[c],void 0===r)return o&&"get"in o&&void 0!==(f=o.get(n,!1,u))?f:s[t];"string"==(h=typeof r)&&(f=kt.exec(r))&&f[1]&&(r=hu(n,t,f),h="number");null!=r&&r==r&&("number"!==h||l||(r+=f&&f[3]||(i.cssNumber[c]?"":"px")),e.clearCloneStyle||""!==r||0!==t.indexOf("background")||(s[t]="inherit"),o&&"set"in o&&void 0===(r=o.set(n,r,u))||(l?s.setProperty(t,r):s[t]=r))}},css:function(n,t,r,u){var f,e,o,s=y(t);return rf.test(t)||(t=tr(s)),(o=i.cssHooks[t]||i.cssHooks[s])&&"get"in o&&(f=o.get(n,!0,r)),void 0===f&&(f=ni(n,t,u)),"normal"===f&&t in uf&&(f=uf[t]),""===r||r?(e=parseFloat(f),!0===r||isFinite(e)?e||0:f):f}});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return!io.test(i.css(n,"display"))||n.getClientRects().length&&n.getBoundingClientRect().width?ef(n,t,u):ku(n,ro,function(){return ef(n,t,u)})},set:function(n,r,u){var s,f=ci(n),h=!e.scrollboxSize()&&"absolute"===f.position,c=(h||u)&&"border-box"===i.css(n,"boxSizing",!1,f),o=u?ir(n,t,u,c,f):0;return c&&h&&(o-=Math.ceil(n["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(f[t])-ir(n,t,"border",!1,f)-.5)),o&&(s=kt.exec(r))&&"px"!==(s[3]||"px")&&(n.style[t]=r,r=i.css(n,t)),ff(0,r,o)}}});i.cssHooks.marginLeft=du(e.reliableMarginLeft,function(n,t){if(t)return(parseFloat(ni(n,"marginLeft"))||n.getBoundingClientRect().left-ku(n,{marginLeft:0},function(){return n.getBoundingClientRect().left}))+"px"});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u="string"==typeof i?i.split(" "):[i];r<4;r++)f[n+b[r]+t]=u[r]||u[r-2]||u[0];return f}};"margin"!==n&&(i.cssHooks[n+t].set=ff)});i.fn.extend({css:function(n,t){return w(this,function(n,t,r){var f,e,o={},u=0;if(Array.isArray(t)){for(f=ci(n),e=t.length;u<e;u++)o[t[u]]=i.css(n,t[u],!1,f);return o}return void 0!==r?i.style(n,t,r):i.css(n,t)},n,t,1<arguments.length)}});((i.Tween=a).prototype={constructor:a,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||i.easing._default;this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=a.propHooks[this.prop];return n&&n.get?n.get(this):a.propHooks._default.get(this)},run:function(n){var t,r=a.propHooks[this.prop];return this.pos=this.options.duration?t=i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):t=n,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):a.propHooks._default.set(this),this}}).init.prototype=a.prototype;(a.propHooks={_default:{get:function(n){var t;return 1!==n.elem.nodeType||null!=n.elem[n.prop]&&null==n.elem.style[n.prop]?n.elem[n.prop]:(t=i.css(n.elem,n.prop,""))&&"auto"!==t?t:0},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):1!==n.elem.nodeType||!i.cssHooks[n.prop]&&null==n.elem.style[tr(n.prop)]?n.elem[n.prop]=n.now:i.style(n.elem,n.prop,n.now+n.unit)}}}).scrollTop=a.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2},_default:"swing"};i.fx=a.prototype.init;i.fx.step={};sf=/^(?:toggle|show|hide)$/;hf=/queueHooks$/;i.Animation=i.extend(v,{tweeners:{"*":[function(n,t){var i=this.createTween(n,t);return hu(i.elem,n,kt.exec(t),i),i}]},tweener:function(n,t){u(n)?(t=n,n=["*"]):n=n.match(l);for(var i,r=0,f=n.length;r<f;r++)i=n[r],v.tweeners[i]=v.tweeners[i]||[],v.tweeners[i].unshift(t)},prefilters:[function(n,t,u){var f,y,w,c,b,h,o,l,k="width"in t||"height"in t,v=this,p={},s=n.style,a=n.nodeType&&dt(n),e=r.get(n,"fxshow");for(f in u.queue||(null==(c=i._queueHooks(n,"fx")).unqueued&&(c.unqueued=0,b=c.empty.fire,c.empty.fire=function(){c.unqueued||b()}),c.unqueued++,v.always(function(){v.always(function(){c.unqueued--;i.queue(n,"fx").length||c.empty.fire()})})),t)if(y=t[f],sf.test(y)){if(delete t[f],w=w||"toggle"===y,y===(a?"hide":"show")){if("show"!==y||!e||void 0===e[f])continue;a=!0}p[f]=e&&e[f]||i.style(n,f)}if((h=!i.isEmptyObject(t))||!i.isEmptyObject(p))for(f in k&&1===n.nodeType&&(u.overflow=[s.overflow,s.overflowX,s.overflowY],null==(o=e&&e.display)&&(o=r.get(n,"display")),"none"===(l=i.css(n,"display"))&&(o?l=o:(ht([n],!0),o=n.style.display||o,l=i.css(n,"display"),ht([n]))),("inline"===l||"inline-block"===l&&null!=o)&&"none"===i.css(n,"float")&&(h||(v.done(function(){s.display=o}),null==o&&(l=s.display,o="none"===l?"":l)),s.display="inline-block")),u.overflow&&(s.overflow="hidden",v.always(function(){s.overflow=u.overflow[0];s.overflowX=u.overflow[1];s.overflowY=u.overflow[2]})),h=!1,p)h||(e?"hidden"in e&&(a=e.hidden):e=r.access(n,"fxshow",{display:o}),w&&(e.hidden=!a),a&&ht([n],!0),v.done(function(){for(f in a||ht([n]),r.remove(n,"fxshow"),p)i.style(n,f,p[f])})),h=lf(a?e[f]:0,f,v),f in e||(e[f]=h.start,a&&(h.end=h.start,h.start=0))}],prefilter:function(n,t){t?v.prefilters.unshift(n):v.prefilters.push(n)}});i.speed=function(n,t,r){var f=n&&"object"==typeof n?i.extend({},n):{complete:r||!r&&t||u(n)&&n,duration:n,easing:r&&t||t&&!u(t)&&t};return i.fx.off?f.duration=0:"number"!=typeof f.duration&&(f.duration=f.duration in i.fx.speeds?i.fx.speeds[f.duration]:i.fx.speeds._default),null!=f.queue&&!0!==f.queue||(f.queue="fx"),f.old=f.complete,f.complete=function(){u(f.old)&&f.old.call(this);f.queue&&i.dequeue(this,f.queue)},f};i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(dt).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,u,f){var s=i.isEmptyObject(n),o=i.speed(t,u,f),e=function(){var t=v(this,i.extend({},n),o);(s||r.get(this,"finish"))&&t.stop(!0)};return e.finish=e,s||!1===o.queue?this.each(e):this.queue(o.queue,e)},stop:function(n,t,u){var f=function(n){var t=n.stop;delete n.stop;t(u)};return"string"!=typeof n&&(u=t,t=n,n=void 0),t&&this.queue(n||"fx",[]),this.each(function(){var s=!0,t=null!=n&&n+"queueHooks",o=i.timers,e=r.get(this);if(t)e[t]&&e[t].stop&&f(e[t]);else for(t in e)e[t]&&e[t].stop&&hf.test(t)&&f(e[t]);for(t=o.length;t--;)o[t].elem!==this||null!=n&&o[t].queue!==n||(o[t].anim.stop(u),s=!1,o.splice(t,1));!s&&u||i.dequeue(this,n)})},finish:function(n){return!1!==n&&(n=n||"fx"),this.each(function(){var t,e=r.get(this),u=e[n+"queue"],o=e[n+"queueHooks"],f=i.timers,s=u?u.length:0;for(e.finish=!0,i.queue(this,n,[]),o&&o.stop&&o.stop.call(this,!0),t=f.length;t--;)f[t].elem===this&&f[t].queue===n&&(f[t].anim.stop(!0),f.splice(t,1));for(t=0;t<s;t++)u[t]&&u[t].finish&&u[t].finish.call(this);delete e.finish})}});i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(ai(t,!0),n,i,u)}});i.each({slideDown:ai("show"),slideUp:ai("hide"),slideToggle:ai("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.timers=[];i.fx.tick=function(){var r,n=0,t=i.timers;for(vt=Date.now();n<t.length;n++)(r=t[n])()||t[n]!==r||t.splice(n--,1);t.length||i.fx.stop();vt=void 0};i.fx.timer=function(n){i.timers.push(n);i.fx.start()};i.fx.interval=13;i.fx.start=function(){li||(li=!0,rr())};i.fx.stop=function(){li=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fn.delay=function(t,r){return t=i.fx&&i.fx.speeds[t]||t,r=r||"fx",this.queue(r,function(i,r){var u=n.setTimeout(i,t);r.stop=function(){n.clearTimeout(u)}})};yt=f.createElement("input");of=f.createElement("select").appendChild(f.createElement("option"));yt.type="checkbox";e.checkOn=""!==yt.value;e.optSelected=of.selected;(yt=f.createElement("input")).value="t";yt.type="radio";e.radioValue="t"===yt.value;pt=i.expr.attrHandle;i.fn.extend({attr:function(n,t){return w(this,i.attr,n,t,1<arguments.length)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})}});i.extend({attr:function(n,t,r){var f,u,e=n.nodeType;if(3!==e&&8!==e&&2!==e)return"undefined"==typeof n.getAttribute?i.prop(n,t,r):(1===e&&i.isXMLDoc(n)||(u=i.attrHooks[t.toLowerCase()]||(i.expr.match.bool.test(t)?af:void 0)),void 0!==r?null===r?void i.removeAttr(n,t):u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:(n.setAttribute(t,r+""),r):u&&"get"in u&&null!==(f=u.get(n,t))?f:null==(f=i.find.attr(n,t))?void 0:f)},attrHooks:{type:{set:function(n,t){if(!e.radioValue&&"radio"===t&&c(n,"input")){var i=n.value;return n.setAttribute("type",t),i&&(n.value=i),t}}}},removeAttr:function(n,t){var i,u=0,r=t&&t.match(l);if(r&&1===n.nodeType)while(i=r[u++])n.removeAttribute(i)}});af={set:function(n,t,r){return!1===t?i.removeAttr(n,r):n.setAttribute(r,r),r}};i.each(i.expr.match.bool.source.match(/\w+/g),function(n,t){var r=pt[t]||i.find.attr;pt[t]=function(n,t,i){var f,e,u=t.toLowerCase();return i||(e=pt[u],pt[u]=f,f=null!=r(n,t,i)?u:null,pt[u]=e),f}});vf=/^(?:input|select|textarea|button)$/i;yf=/^(?:a|area)$/i;i.fn.extend({prop:function(n,t){return w(this,i.prop,n,t,1<arguments.length)},removeProp:function(n){return this.each(function(){delete this[i.propFix[n]||n]})}});i.extend({prop:function(n,t,r){var f,u,e=n.nodeType;if(3!==e&&8!==e&&2!==e)return 1===e&&i.isXMLDoc(n)||(t=i.propFix[t]||t,u=i.propHooks[t]),void 0!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:n[t]=r:u&&"get"in u&&null!==(f=u.get(n,t))?f:n[t]},propHooks:{tabIndex:{get:function(n){var t=i.find.attr(n,"tabindex");return t?parseInt(t,10):vf.test(n.nodeName)||yf.test(n.nodeName)&&n.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}});e.optSelected||(i.propHooks.selected={get:function(n){var t=n.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(n){var t=n.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}});i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this});i.fn.extend({addClass:function(n){var o,t,r,f,e,s,h,c=0;if(u(n))return this.each(function(t){i(this).addClass(n.call(this,t,it(this)))});if((o=ur(n)).length)while(t=this[c++])if(f=it(t),r=1===t.nodeType&&" "+tt(f)+" "){for(s=0;e=o[s++];)r.indexOf(" "+e+" ")<0&&(r+=e+" ");f!==(h=tt(r))&&t.setAttribute("class",h)}return this},removeClass:function(n){var o,r,t,f,e,s,h,c=0;if(u(n))return this.each(function(t){i(this).removeClass(n.call(this,t,it(this)))});if(!arguments.length)return this.attr("class","");if((o=ur(n)).length)while(r=this[c++])if(f=it(r),t=1===r.nodeType&&" "+tt(f)+" "){for(s=0;e=o[s++];)while(-1<t.indexOf(" "+e+" "))t=t.replace(" "+e+" "," ");f!==(h=tt(t))&&r.setAttribute("class",h)}return this},toggleClass:function(n,t){var f=typeof n,e="string"===f||Array.isArray(n);return"boolean"==typeof t&&e?t?this.addClass(n):this.removeClass(n):u(n)?this.each(function(r){i(this).toggleClass(n.call(this,r,it(this),t),t)}):this.each(function(){var t,o,u,s;if(e)for(o=0,u=i(this),s=ur(n);t=s[o++];)u.hasClass(t)?u.removeClass(t):u.addClass(t);else void 0!==n&&"boolean"!==f||((t=it(this))&&r.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===n?"":r.get(this,"__className__")||""))})},hasClass:function(n){for(var t,r=0,i=" "+n+" ";t=this[r++];)if(1===t.nodeType&&-1<(" "+tt(it(t))+" ").indexOf(i))return!0;return!1}});pf=/\r/g;i.fn.extend({val:function(n){var t,r,e,f=this[0];return arguments.length?(e=u(n),this.each(function(r){var u;1===this.nodeType&&(null==(u=e?n.call(this,r,i(this).val()):n)?u="":"number"==typeof u?u+="":Array.isArray(u)&&(u=i.map(u,function(n){return null==n?"":n+""})),(t=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,u,"value")||(this.value=u))})):f?(t=i.valHooks[f.type]||i.valHooks[f.nodeName.toLowerCase()])&&"get"in t&&void 0!==(r=t.get(f,"value"))?r:"string"==typeof(r=f.value)?r.replace(pf,""):null==r?"":r:void 0}});i.extend({valHooks:{option:{get:function(n){var t=i.find.attr(n,"value");return null!=t?t:tt(i.text(n))}},select:{get:function(n){for(var e,t,o=n.options,u=n.selectedIndex,f="select-one"===n.type,s=f?null:[],h=f?u+1:o.length,r=u<0?h:f?u:0;r<h;r++)if(((t=o[r]).selected||r===u)&&!t.disabled&&(!t.parentNode.disabled||!c(t.parentNode,"optgroup"))){if(e=i(t).val(),f)return e;s.push(e)}return s},set:function(n,t){for(var r,u,f=n.options,e=i.makeArray(t),o=f.length;o--;)((u=f[o]).selected=-1<i.inArray(i.valHooks.option.get(u),e))&&(r=!0);return r||(n.selectedIndex=-1),e}}}});i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(n,t){if(Array.isArray(t))return n.checked=-1<i.inArray(i(n).val(),t)}};e.checkOn||(i.valHooks[this].get=function(n){return null===n.getAttribute("value")?"on":n.value})});e.focusin="onfocusin"in n;fr=/^(?:focusinfocus|focusoutblur)$/;er=function(n){n.stopPropagation()};i.extend(i.event,{trigger:function(t,e,o,s){var k,c,l,d,v,y,a,p,w=[o||f],h=ui.call(t,"type")?t.type:t,b=ui.call(t,"namespace")?t.namespace.split("."):[];if(c=p=l=o=o||f,3!==o.nodeType&&8!==o.nodeType&&!fr.test(h+i.event.triggered)&&(-1<h.indexOf(".")&&(h=(b=h.split(".")).shift(),b.sort()),v=h.indexOf(":")<0&&"on"+h,(t=t[i.expando]?t:new i.Event(h,"object"==typeof t&&t)).isTrigger=s?2:3,t.namespace=b.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=o),e=null==e?[t]:i.makeArray(e,[t]),a=i.event.special[h]||{},s||!a.trigger||!1!==a.trigger.apply(o,e))){if(!s&&!a.noBubble&&!rt(o)){for(d=a.delegateType||h,fr.test(d+h)||(c=c.parentNode);c;c=c.parentNode)w.push(c),l=c;l===(o.ownerDocument||f)&&w.push(l.defaultView||l.parentWindow||n)}for(k=0;(c=w[k++])&&!t.isPropagationStopped();)p=c,t.type=1<k?d:a.bindType||h,(y=(r.get(c,"events")||Object.create(null))[t.type]&&r.get(c,"handle"))&&y.apply(c,e),(y=v&&c[v])&&y.apply&&ot(c)&&(t.result=y.apply(c,e),!1===t.result&&t.preventDefault());return t.type=h,s||t.isDefaultPrevented()||a._default&&!1!==a._default.apply(w.pop(),e)||!ot(o)||v&&u(o[h])&&!rt(o)&&((l=o[v])&&(o[v]=null),i.event.triggered=h,t.isPropagationStopped()&&p.addEventListener(h,er),o[h](),t.isPropagationStopped()&&p.removeEventListener(h,er),i.event.triggered=void 0,l&&(o[v]=l)),t.result}},simulate:function(n,t,r){var u=i.extend(new i.Event,r,{type:n,isSimulated:!0});i.event.trigger(u,null,t)}});i.fn.extend({trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){var r=this[0];if(r)return i.event.trigger(n,t,r,!0)}});e.focusin||i.each({focus:"focusin",blur:"focusout"},function(n,t){var u=function(n){i.event.simulate(t,n.target,i.event.fix(n))};i.event.special[t]={setup:function(){var i=this.ownerDocument||this.document||this,f=r.access(i,t);f||i.addEventListener(n,u,!0);r.access(i,t,(f||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,f=r.access(i,t)-1;f?r.access(i,t,f):(i.removeEventListener(n,u,!0),r.remove(i,t))}}});var ti=n.location,wf={guid:Date.now()},or=/\?/;i.parseXML=function(t){var r;if(!t||"string"!=typeof t)return null;try{r=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){r=void 0}return r&&!r.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+t),r};var uo=/\[\]$/,bf=/\r?\n/g,fo=/^(?:submit|button|image|reset|file)$/i,eo=/^(?:input|select|textarea|keygen)/i;i.param=function(n,t){var r,f=[],e=function(n,t){var i=u(t)?t():t;f[f.length]=encodeURIComponent(n)+"="+encodeURIComponent(null==i?"":i)};if(null==n)return"";if(Array.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){e(this.name,this.value)});else for(r in n)sr(r,n[r],t,e);return f.join("&")};i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&eo.test(this.nodeName)&&!fo.test(n)&&(this.checked||!gt.test(n))}).map(function(n,t){var r=i(this).val();return null==r?null:Array.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(bf,"\r\n")}}):{name:t.name,value:r.replace(bf,"\r\n")}}).get()}});var oo=/%20/g,so=/#.*$/,ho=/([?&])_=[^&]*/,co=/^(.*?):[ \t]*([^\r\n]*)$/gm,lo=/^(?:GET|HEAD)$/,ao=/^\/\//,kf={},hr={},df="*/".concat("*"),cr=f.createElement("a");return cr.href=ti.href,i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ti.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ti.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":df,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?lr(lr(n,i.ajaxSettings),t):lr(i.ajaxSettings,n)},ajaxPrefilter:gf(kf),ajaxTransport:gf(hr),ajax:function(t,r){function b(t,r,f,c){var v,rt,b,p,g,l=r;s||(s=!0,d&&n.clearTimeout(d),a=void 0,k=c||"",e.readyState=0<t?4:0,v=200<=t&&t<300||304===t,f&&(p=function(n,t,i){for(var e,u,f,o,s=n.contents,r=n.dataTypes;"*"===r[0];)r.shift(),void 0===e&&(e=n.mimeType||t.getResponseHeader("Content-Type"));if(e)for(u in s)if(s[u]&&s[u].test(e)){r.unshift(u);break}if(r[0]in i)f=r[0];else{for(u in i){if(!r[0]||n.converters[u+" "+r[0]]){f=u;break}o||(o=u)}f=f||o}if(f)return f!==r[0]&&r.unshift(f),i[f]}(u,e,f)),!v&&-1<i.inArray("script",u.dataTypes)&&(u.converters["text script"]=function(){}),p=function(n,t,i,r){var h,u,f,s,e,o={},c=n.dataTypes.slice();if(c[1])for(f in n.converters)o[f.toLowerCase()]=n.converters[f];for(u=c.shift();u;)if(n.responseFields[u]&&(i[n.responseFields[u]]=t),!e&&r&&n.dataFilter&&(t=n.dataFilter(t,n.dataType)),e=u,u=c.shift())if("*"===u)u=e;else if("*"!==e&&e!==u){if(!(f=o[e+" "+u]||o["* "+u]))for(h in o)if((s=h.split(" "))[1]===u&&(f=o[e+" "+s[0]]||o["* "+s[0]])){!0===f?f=o[h]:!0!==o[h]&&(u=s[0],c.unshift(s[1]));break}if(!0!==f)if(f&&n.throws)t=f(t);else try{t=f(t)}catch(n){return{state:"parsererror",error:f?n:"No conversion from "+e+" to "+u}}}return{state:"success",data:t}}(u,p,e,v),v?(u.ifModified&&((g=e.getResponseHeader("Last-Modified"))&&(i.lastModified[o]=g),(g=e.getResponseHeader("etag"))&&(i.etag[o]=g)),204===t||"HEAD"===u.type?l="nocontent":304===t?l="notmodified":(l=p.state,rt=p.data,v=!(b=p.error))):(b=l,!t&&l||(l="error",t<0&&(t=0))),e.status=t,e.statusText=(r||l)+"",v?tt.resolveWith(h,[rt,l,e]):tt.rejectWith(h,[e,l,b]),e.statusCode(w),w=void 0,y&&nt.trigger(v?"ajaxSuccess":"ajaxError",[e,u,v?rt:b]),it.fireWith(h,[e,l]),y&&(nt.trigger("ajaxComplete",[e,u]),--i.active||i.event.trigger("ajaxStop")))}"object"==typeof t&&(r=t,t=void 0);r=r||{};var a,o,k,v,d,c,s,y,g,p,u=i.ajaxSetup({},r),h=u.context||u,nt=u.context&&(h.nodeType||h.jquery)?i(h):i.event,tt=i.Deferred(),it=i.Callbacks("once memory"),w=u.statusCode||{},rt={},ut={},ft="canceled",e={readyState:0,getResponseHeader:function(n){var t;if(s){if(!v)for(v={};t=co.exec(k);)v[t[1].toLowerCase()+" "]=(v[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=v[n.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return s?k:null},setRequestHeader:function(n,t){return null==s&&(n=ut[n.toLowerCase()]=ut[n.toLowerCase()]||n,rt[n]=t),this},overrideMimeType:function(n){return null==s&&(u.mimeType=n),this},statusCode:function(n){var t;if(n)if(s)e.always(n[e.status]);else for(t in n)w[t]=[w[t],n[t]];return this},abort:function(n){var t=n||ft;return a&&a.abort(t),b(0,t),this}};if(tt.promise(e),u.url=((t||u.url||ti.href)+"").replace(ao,ti.protocol+"//"),u.type=r.method||r.type||u.method||u.type,u.dataTypes=(u.dataType||"*").toLowerCase().match(l)||[""],null==u.crossDomain){c=f.createElement("a");try{c.href=u.url;c.href=c.href;u.crossDomain=cr.protocol+"//"+cr.host!=c.protocol+"//"+c.host}catch(t){u.crossDomain=!0}}if(u.data&&u.processData&&"string"!=typeof u.data&&(u.data=i.param(u.data,u.traditional)),ne(kf,u,r,e),s)return e;for(g in(y=i.event&&u.global)&&0==i.active++&&i.event.trigger("ajaxStart"),u.type=u.type.toUpperCase(),u.hasContent=!lo.test(u.type),o=u.url.replace(so,""),u.hasContent?u.data&&u.processData&&0===(u.contentType||"").indexOf("application/x-www-form-urlencoded")&&(u.data=u.data.replace(oo,"+")):(p=u.url.slice(o.length),u.data&&(u.processData||"string"==typeof u.data)&&(o+=(or.test(o)?"&":"?")+u.data,delete u.data),!1===u.cache&&(o=o.replace(ho,"$1"),p=(or.test(o)?"&":"?")+"_="+wf.guid+++p),u.url=o+p),u.ifModified&&(i.lastModified[o]&&e.setRequestHeader("If-Modified-Since",i.lastModified[o]),i.etag[o]&&e.setRequestHeader("If-None-Match",i.etag[o])),(u.data&&u.hasContent&&!1!==u.contentType||r.contentType)&&e.setRequestHeader("Content-Type",u.contentType),e.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+("*"!==u.dataTypes[0]?", "+df+"; q=0.01":""):u.accepts["*"]),u.headers)e.setRequestHeader(g,u.headers[g]);if(u.beforeSend&&(!1===u.beforeSend.call(h,e,u)||s))return e.abort();if(ft="abort",it.add(u.complete),e.done(u.success),e.fail(u.error),a=ne(hr,u,r,e)){if(e.readyState=1,y&&nt.trigger("ajaxSend",[e,u]),s)return e;u.async&&0<u.timeout&&(d=n.setTimeout(function(){e.abort("timeout")},u.timeout));try{s=!1;a.send(rt,b)}catch(t){if(s)throw t;b(-1,t)}}else b(-1,"No Transport");return e},getJSON:function(n,t,r){return i.get(n,t,r,"json")},getScript:function(n,t){return i.get(n,void 0,t,"script")}}),i.each(["get","post"],function(n,t){i[t]=function(n,r,f,e){return u(r)&&(e=e||f,f=r,r=void 0),i.ajax(i.extend({url:n,type:t,dataType:e,data:r,success:f},i.isPlainObject(n)&&n))}}),i.ajaxPrefilter(function(n){for(var t in n.headers)"content-type"===t.toLowerCase()&&(n.contentType=n.headers[t]||"")}),i._evalUrl=function(n,t,r){return i.ajax({url:n,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(n){i.globalEval(n,t,r)}})},i.fn.extend({wrapAll:function(n){var t;return this[0]&&(u(n)&&(n=n.call(this[0])),t=i(n,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var n=this;n.firstElementChild;)n=n.firstElementChild;return n}).append(this)),this},wrapInner:function(n){return u(n)?this.each(function(t){i(this).wrapInner(n.call(this,t))}):this.each(function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=u(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(n){return this.parent(n).not("body").each(function(){i(this).replaceWith(this.childNodes)}),this}}),i.expr.pseudos.hidden=function(n){return!i.expr.pseudos.visible(n)},i.expr.pseudos.visible=function(n){return!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length)},i.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}},te={0:200,1223:204},wt=i.ajaxSettings.xhr(),e.cors=!!wt&&"withCredentials"in wt,e.ajax=wt=!!wt,i.ajaxTransport(function(t){var i,r;if(e.cors||wt&&!t.crossDomain)return{send:function(u,f){var o,e=t.xhr();if(e.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)e[o]=t.xhrFields[o];for(o in t.mimeType&&e.overrideMimeType&&e.overrideMimeType(t.mimeType),t.crossDomain||u["X-Requested-With"]||(u["X-Requested-With"]="XMLHttpRequest"),u)e.setRequestHeader(o,u[o]);i=function(n){return function(){i&&(i=r=e.onload=e.onerror=e.onabort=e.ontimeout=e.onreadystatechange=null,"abort"===n?e.abort():"error"===n?"number"!=typeof e.status?f(0,"error"):f(e.status,e.statusText):f(te[e.status]||e.status,e.statusText,"text"!==(e.responseType||"text")||"string"!=typeof e.responseText?{binary:e.response}:{text:e.responseText},e.getAllResponseHeaders()))}};e.onload=i();r=e.onerror=e.ontimeout=i("error");void 0!==e.onabort?e.onabort=r:e.onreadystatechange=function(){4===e.readyState&&n.setTimeout(function(){i&&r()})};i=i("abort");try{e.send(t.hasContent&&t.data||null)}catch(u){if(i)throw u;}},abort:function(){i&&i()}}}),i.ajaxPrefilter(function(n){n.crossDomain&&(n.contents.script=!1)}),i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(n){return i.globalEval(n),n}}}),i.ajaxPrefilter("script",function(n){void 0===n.cache&&(n.cache=!1);n.crossDomain&&(n.type="GET")}),i.ajaxTransport("script",function(n){var r,t;if(n.crossDomain||n.scriptAttrs)return{send:function(u,e){r=i("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",t=function(n){r.remove();t=null;n&&e("error"===n.type?404:200,n.type)});f.head.appendChild(r[0])},abort:function(){t&&t()}}}),ar=[],vi=/(=)\?(?=&|$)|\?\?/,i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=ar.pop()||i.expando+"_"+wf.guid++;return this[n]=!0,n}}),i.ajaxPrefilter("json jsonp",function(t,r,f){var e,o,s,h=!1!==t.jsonp&&(vi.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&vi.test(t.data)&&"data");if(h||"jsonp"===t.dataTypes[0])return e=t.jsonpCallback=u(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,h?t[h]=t[h].replace(vi,"$1"+e):!1!==t.jsonp&&(t.url+=(or.test(t.url)?"&":"?")+t.jsonp+"="+e),t.converters["script json"]=function(){return s||i.error(e+" was not called"),s[0]},t.dataTypes[0]="json",o=n[e],n[e]=function(){s=arguments},f.always(function(){void 0===o?i(n).removeProp(e):n[e]=o;t[e]&&(t.jsonpCallback=r.jsonpCallback,ar.push(e));s&&u(o)&&o(s[0]);s=o=void 0}),"script"}),e.createHTMLDocument=((ie=f.implementation.createHTMLDocument("").body).innerHTML="<form><\/form><form><\/form>",2===ie.childNodes.length),i.parseHTML=function(n,t,r){return"string"!=typeof n?[]:("boolean"==typeof t&&(r=t,t=!1),t||(e.createHTMLDocument?((s=(t=f.implementation.createHTMLDocument("")).createElement("base")).href=f.location.href,t.head.appendChild(s)):t=f),u=!r&&[],(o=wi.exec(n))?[t.createElement(o[1])]:(o=vu([n],t,u),u&&u.length&&i(u).remove(),i.merge([],o.childNodes)));var s,o,u},i.fn.load=function(n,t,r){var f,s,h,e=this,o=n.indexOf(" ");return-1<o&&(f=tt(n.slice(o)),n=n.slice(0,o)),u(t)?(r=t,t=void 0):t&&"object"==typeof t&&(s="POST"),0<e.length&&i.ajax({url:n,type:s||"GET",dataType:"html",data:t}).done(function(n){h=arguments;e.html(f?i("<div>").append(i.parseHTML(n)).find(f):n)}).always(r&&function(n,t){e.each(function(){r.apply(this,h||[n.responseText,t,n])})}),this},i.expr.pseudos.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length},i.offset={setOffset:function(n,t,r){var v,o,s,h,e,c,l=i.css(n,"position"),a=i(n),f={};"static"===l&&(n.style.position="relative");e=a.offset();s=i.css(n,"top");c=i.css(n,"left");("absolute"===l||"fixed"===l)&&-1<(s+c).indexOf("auto")?(h=(v=a.position()).top,o=v.left):(h=parseFloat(s)||0,o=parseFloat(c)||0);u(t)&&(t=t.call(n,r,i.extend({},e)));null!=t.top&&(f.top=t.top-e.top+h);null!=t.left&&(f.left=t.left-e.left+o);"using"in t?t.using.call(n,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),a.css(f))}},i.fn.extend({offset:function(n){if(arguments.length)return void 0===n?this:this.each(function(t){i.offset.setOffset(this,n,t)});var r,u,t=this[0];if(t)return t.getClientRects().length?(r=t.getBoundingClientRect(),u=t.ownerDocument.defaultView,{top:r.top+u.pageYOffset,left:r.left+u.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var n,r,u,t=this[0],f={top:0,left:0};if("fixed"===i.css(t,"position"))r=t.getBoundingClientRect();else{for(r=this.offset(),u=t.ownerDocument,n=t.offsetParent||u.documentElement;n&&(n===u.body||n===u.documentElement)&&"static"===i.css(n,"position");)n=n.parentNode;n&&n!==t&&1===n.nodeType&&((f=i(n).offset()).top+=i.css(n,"borderTopWidth",!0),f.left+=i.css(n,"borderLeftWidth",!0))}return{top:r.top-f.top-i.css(t,"marginTop",!0),left:r.left-f.left-i.css(t,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent;n&&"static"===i.css(n,"position");)n=n.offsetParent;return n||g})}}),i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,t){var r="pageYOffset"===t;i.fn[n]=function(i){return w(this,function(n,i,u){var f;if(rt(n)?f=n:9===n.nodeType&&(f=n.defaultView),void 0===u)return f?f[t]:n[i];f?f.scrollTo(r?f.pageXOffset:u,r?u:f.pageYOffset):n[i]=u},n,i,arguments.length)}}),i.each(["top","left"],function(n,t){i.cssHooks[t]=du(e.pixelPosition,function(n,r){if(r)return r=ni(n,t),nr.test(r)?i(n).position()[t]+"px":r})}),i.each({Height:"height",Width:"width"},function(n,t){i.each({padding:"inner"+n,content:t,"":"outer"+n},function(r,u){i.fn[u]=function(f,e){var o=arguments.length&&(r||"boolean"!=typeof f),s=r||(!0===f||!0===e?"margin":"border");return w(this,function(t,r,f){var e;return rt(t)?0===u.indexOf("outer")?t["inner"+n]:t.document.documentElement["client"+n]:9===t.nodeType?(e=t.documentElement,Math.max(t.body["scroll"+n],e["scroll"+n],t.body["offset"+n],e["offset"+n],e["client"+n])):void 0===f?i.css(t,r,s):i.style(t,r,f,s)},t,o?f:void 0,o)}})}),i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}}),i.fn.extend({bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return 1===arguments.length?this.off(n,"**"):this.off(t,n||"**",i)},hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)}}),i.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return 0<arguments.length?this.on(t,null,n,i):this.trigger(t)}}),re=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,i.proxy=function(n,t){var r,f,e;if("string"==typeof t&&(r=n[t],t=n,n=r),u(n))return f=k.call(arguments,2),(e=function(){return n.apply(t||this,f.concat(k.call(arguments)))}).guid=n.guid=n.guid||i.guid++,e},i.holdReady=function(n){n?i.readyWait++:i.ready(!0)},i.isArray=Array.isArray,i.parseJSON=JSON.parse,i.nodeName=c,i.isFunction=u,i.isWindow=rt,i.camelCase=y,i.type=ut,i.now=Date.now,i.isNumeric=function(n){var t=i.type(n);return("number"===t||"string"===t)&&!isNaN(n-parseFloat(n))},i.trim=function(n){return null==n?"":(n+"").replace(re,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return i}),ue=n.jQuery,fe=n.$,i.noConflict=function(t){return n.$===i&&(n.$=fe),t&&n.jQuery===i&&(n.jQuery=ue),i},"undefined"==typeof t&&(n.jQuery=n.$=i),i});!function(n){function i(n,t){for(var i=window,r=(n||"").split(".");i&&r.length;)i=i[r.shift()];return"function"==typeof i?i:(t.push(n),Function.constructor.apply(null,t))}function u(n){return"GET"===n||"POST"===n}function e(n,t){u(t)||n.setRequestHeader("X-HTTP-Method-Override",t)}function o(t,i,r){var u;r.indexOf("application/x-javascript")===-1&&(u=(t.getAttribute("data-ajax-mode")||"").toUpperCase(),n(t.getAttribute("data-ajax-update")).each(function(t,r){switch(u){case"BEFORE":n(r).prepend(i);break;case"AFTER":n(r).append(i);break;case"REPLACE-WITH":n(r).replaceWith(i);break;default:n(r).html(i)}}))}function f(t,r){var c,l,f,a,s,h;(c=t.getAttribute("data-ajax-confirm"),!c||window.confirm(c))&&(l=n(t.getAttribute("data-ajax-loading")),a=parseInt(t.getAttribute("data-ajax-loading-duration"),10)||0,n.extend(r,{type:t.getAttribute("data-ajax-method")||void 0,url:t.getAttribute("data-ajax-url")||void 0,cache:"true"===(t.getAttribute("data-ajax-cache")||"").toLowerCase(),beforeSend:function(n){var r;return e(n,f),r=i(t.getAttribute("data-ajax-begin"),["xhr"]).apply(t,arguments),r!==!1&&l.show(a),r},complete:function(){l.hide(a);i(t.getAttribute("data-ajax-complete"),["xhr","status"]).apply(t,arguments)},success:function(n,r,u){o(t,n,u.getResponseHeader("Content-Type")||"text/html");i(t.getAttribute("data-ajax-success"),["data","status","xhr"]).apply(t,arguments)},error:function(){i(t.getAttribute("data-ajax-failure"),["xhr","status","error"]).apply(t,arguments)}}),r.data.push({name:"X-Requested-With",value:"XMLHttpRequest"}),f=r.type.toUpperCase(),u(f)||(r.type="POST",r.data.push({name:"X-HTTP-Method-Override",value:f})),s=n(t),s.is("form")&&"multipart/form-data"==s.attr("enctype")&&(h=new FormData,n.each(r.data,function(n,t){h.append(t.name,t.value)}),n("input[type=file]",s).each(function(){var t=this;n.each(t.files,function(n,i){h.append(t.name,i)})}),n.extend(r,{processData:!1,contentType:!1,data:h})),n.ajax(r))}function s(t){var i=n(t).data(h);return!i||!i.validate||i.validate()}var t="unobtrusiveAjaxClick",r="unobtrusiveAjaxClickTarget",h="unobtrusiveValidation";n(document).on("click","a[data-ajax=true]",function(n){n.preventDefault();f(this,{url:this.href,type:"GET",data:[]})});n(document).on("click","form[data-ajax=true] input[type=image]",function(i){var r=i.target.name,u=n(i.target),f=n(u.parents("form")[0]),e=u.offset();f.data(t,[{name:r+".x",value:Math.round(i.pageX-e.left)},{name:r+".y",value:Math.round(i.pageY-e.top)}]);setTimeout(function(){f.removeData(t)},0)});n(document).on("click","form[data-ajax=true] :submit",function(i){var f=i.currentTarget.name,e=n(i.target),u=n(e.parents("form")[0]);u.data(t,f?[{name:f,value:i.currentTarget.value}]:[]);u.data(r,e);setTimeout(function(){u.removeData(t);u.removeData(r)},0)});n(document).on("submit","form[data-ajax=true]",function(i){var e=n(this).data(t)||[],u=n(this).data(r),o=u&&(u.hasClass("cancel")||void 0!==u.attr("formnovalidate"));i.preventDefault();(o||s(this))&&f(this,{url:this.action,type:this.method||"GET",data:e.concat(n(this).serializeArray())})})}(jQuery),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?module.exports=n(require("jquery")):n(jQuery)}(function(n){function i(n){return t.raw?n:encodeURIComponent(n)}function f(n){return t.raw?n:decodeURIComponent(n)}function e(n){return i(t.json?JSON.stringify(n):String(n))}function o(n){n.indexOf('"')===0&&(n=n.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return n=decodeURIComponent(n.replace(u," ")),t.json?JSON.parse(n):n}catch(i){}}function r(i,r){var u=t.raw?i:o(i);return n.isFunction(r)?r(u):u}var u=/\+/g,t=n.cookie=function(u,o,s){var v,c;if(arguments.length>1&&!n.isFunction(o))return s=n.extend({},t.defaults,s),typeof s.expires=="number"&&(v=s.expires,c=s.expires=new Date,c.setMilliseconds(c.getMilliseconds()+v*864e5)),document.cookie=[i(u),"=",e(o),s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("");for(var l=u?undefined:{},y=document.cookie?document.cookie.split("; "):[],a=0,b=y.length;a<b;a++){var p=y[a].split("="),w=f(p.shift()),h=p.join("=");if(u===w){l=r(h,o);break}u||(h=r(h))===undefined||(l[w]=h)}return l};t.defaults={};n.removeCookie=function(t,i){return n.cookie(t,"",n.extend({},i,{expires:-1})),!n.cookie(t)}}),function(n,t,i,r){var u=n(t);n.fn.lazyload=function(f){function s(){var t=0;o.each(function(){var i=n(this);if((!e.skip_invisible||i.is(":visible"))&&!n.abovethetop(this,e)&&!n.leftofbegin(this,e))if(n.belowthefold(this,e)||n.rightoffold(this,e)){if(++t>e.failure_limit)return!1}else i.trigger("appear"),t=0})}var o=this,h,e={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:t,data_attribute:"original",skip_invisible:!0,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return f&&(r!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),r!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),n.extend(e,f)),h=e.container===r||e.container===t?u:n(e.container),0===e.event.indexOf("scroll")&&h.bind(e.event,function(){return s()}),this.each(function(){var i=this,t=n(i);i.loaded=!1;(t.attr("src")===r||t.attr("src")===!1)&&t.is("img")&&t.attr("src",e.placeholder);t.one("appear",function(){if(!this.loaded){if(e.appear){var r=o.length;e.appear.call(i,r,e)}n("<img />").bind("load",function(){var r=t.attr("data-"+e.data_attribute),u,f;t.hide();t.is("img")?t.attr("src",r):t.css("background-image","url('"+r+"')");t[e.effect](e.effect_speed);i.loaded=!0;u=n.grep(o,function(n){return!n.loaded});o=n(u);e.load&&(f=o.length,e.load.call(i,f,e))}).attr("src",t.attr("data-"+e.data_attribute))}});0!==e.event.indexOf("scroll")&&t.bind(e.event,function(){i.loaded||t.trigger("appear")})}),u.bind("resize",function(){s()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&u.bind("pageshow",function(t){t.originalEvent&&t.originalEvent.persisted&&o.each(function(){n(this).trigger("appear")})}),n(i).ready(function(){s()}),this};n.belowthefold=function(i,f){var e;return e=f.container===r||f.container===t?(t.innerHeight?t.innerHeight:u.height())+u.scrollTop():n(f.container).offset().top+n(f.container).height(),e<=n(i).offset().top-f.threshold};n.rightoffold=function(i,f){var e;return e=f.container===r||f.container===t?u.width()+u.scrollLeft():n(f.container).offset().left+n(f.container).width(),e<=n(i).offset().left-f.threshold};n.abovethetop=function(i,f){var e;return e=f.container===r||f.container===t?u.scrollTop():n(f.container).offset().top,e>=n(i).offset().top+f.threshold+n(i).height()};n.leftofbegin=function(i,f){var e;return e=f.container===r||f.container===t?u.scrollLeft():n(f.container).offset().left,e>=n(i).offset().left+f.threshold+n(i).width()};n.inviewport=function(t,i){return!n.rightoffold(t,i)&&!n.leftofbegin(t,i)&&!n.belowthefold(t,i)&&!n.abovethetop(t,i)};n.extend(n.expr[":"],{"below-the-fold":function(t){return n.belowthefold(t,{threshold:0})},"above-the-top":function(t){return!n.belowthefold(t,{threshold:0})},"right-of-screen":function(t){return n.rightoffold(t,{threshold:0})},"left-of-screen":function(t){return!n.rightoffold(t,{threshold:0})},"in-viewport":function(t){return n.inviewport(t,{threshold:0})},"above-the-fold":function(t){return!n.belowthefold(t,{threshold:0})},"right-of-fold":function(t){return n.rightoffold(t,{threshold:0})},"left-of-fold":function(t){return!n.rightoffold(t,{threshold:0})}})}(jQuery,window,document),function(n){n.fn.subscribeDebounce=function(n,t,i){var r=0,u=this;this.on(n,function(){r>0&&clearTimeout(r);r=setTimeout(function(){i.call(u,n)},t)});return this};n.fn.maxLength=function(n){if(!this.length)return this;var i=this,t=this.val();t.length>n&&(t=t.substring(0,n),i.val(t));this.on("keyup input",function(){i.val().length>n?i.val(t):t=i.val()});return this};n.fn.forceNumeric=function(){if(!this.length)return this;var t=this;t.on("keydown",function(t){n.inArray(t.keyCode,[46,8,9,27,13,110])!==-1||t.keyCode==65&&(t.ctrlKey===!0||t.metaKey===!0)||t.keyCode==67&&(t.ctrlKey===!0||t.metaKey===!0)||t.keyCode==88&&(t.ctrlKey===!0||t.metaKey===!0)||t.keyCode>=35&&t.keyCode<=39||(t.shiftKey||t.keyCode<48||t.keyCode>57)&&(t.keyCode<96||t.keyCode>105)&&t.preventDefault()})};n.fn.addHighlight=function(t){function i(t,r){var o=0,f,e,u;switch(t.nodeType){case 1:if(t.childNodes&&!/(script|style)/i.test(t.tagName))for(f=0;f<t.childNodes.length;++f)f+=i(t.childNodes[f],r);break;case 3:e=t.data;u=e.toLowerCase().indexOf(r.toLowerCase());u>-1&&(n(t).parent().html(e.substring(0,u)+'<span class="searchhighlight">'+e.substring(u,r.length+u)+"<\/span>"+e.substring(r.length+u)),o=1)}return o}return this.each(function(){i(this,t)})}}(jQuery),function(){(function(n){var r=this||eval("this"),i=r.document,f=r.navigator,t=r.jQuery,u=r.JSON;t||"undefined"==typeof jQuery||(t=jQuery),function(n){"function"==typeof define&&define.amd?define(["exports","require"],n):"object"==typeof exports&&"object"==typeof module?n(module.exports||exports):n(r.ko={})}(function(e,o){function b(n,t){return null===n||typeof n in d?n===t:!1}function g(t,i){var r;return function(){r||(r=s.a.setTimeout(function(){r=n;t()},i))}}function nt(n,t){var i;return function(){clearTimeout(i);i=s.a.setTimeout(n,t)}}function tt(n,t){t&&"change"!==t?"beforeChange"===t?this.pc(n):this.gb(n,t):this.qc(n)}function it(n,t){null!==t&&t.s&&t.s()}function rt(n,t){var i=this.qd,r=i[h];r.ra||(this.Qb&&this.mb[t]?(i.uc(t,n,this.mb[t]),this.mb[t]=null,--this.Qb):r.I[t]||i.uc(t,n,r.J?{da:n}:i.$c(n)),n.Ja&&n.gd())}var s="undefined"!=typeof e?e:{},d,l,v,a,y,h,p,k,w;s.b=function(n,t){for(var i=n.split("."),r=s,u=0;u<i.length-1;u++)r=r[i[u]];r[i[i.length-1]]=t};s.L=function(n,t,i){n[t]=i};s.version="3.5.1";s.b("version",s.version);s.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1};s.a=function(){function o(n,t){for(var i in n)h.call(n,i)&&t(i,n[i])}function v(n,t){if(t)for(var i in t)h.call(t,i)&&(n[i]=t[i]);return n}function y(n,t){return n.__proto__=t,n}function p(n,t,i,r){var u=n[t].match(l)||[];s.a.D(i.match(l),function(n){s.a.Na(u,n,r)});n[t]=u.join(" ")}var h=Object.prototype.hasOwnProperty,w={__proto__:[]}instanceof Array,k="function"==typeof Symbol,c={},b={};c[f&&/Firefox\/2/i.test(f.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"];c.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" ");o(c,function(n,t){if(t.length)for(var i=0,r=t.length;i<r;i++)b[t[i]]=n});var d={propertychange:!0},e=i&&function(){for(var t=3,r=i.createElement("div"),u=r.getElementsByTagName("i");r.innerHTML="<!--[if gt IE "+ ++t+"]><i><\/i><![endif]-->",u[0];);return 4<t?t:n}(),l=/\S+/g,a;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(n,t,i){for(var r=0,u=n.length;r<u;r++)t.call(i,n[r],r,n)},A:"function"==typeof Array.prototype.indexOf?function(n,t){return Array.prototype.indexOf.call(n,t)}:function(n,t){for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1},Lb:function(t,i,r){for(var u=0,f=t.length;u<f;u++)if(i.call(r,t[u],u,t))return t[u];return n},Pa:function(n,t){var i=s.a.A(n,t);0<i?n.splice(i,1):0===i&&n.shift()},wc:function(n){var t=[];return n&&s.a.D(n,function(n){0>s.a.A(t,n)&&t.push(n)}),t},Mb:function(n,t,i){var u=[],r,f;if(n)for(r=0,f=n.length;r<f;r++)u.push(t.call(i,n[r],r));return u},jb:function(n,t,i){var u=[],r,f;if(n)for(r=0,f=n.length;r<f;r++)t.call(i,n[r],r)&&u.push(n[r]);return u},Nb:function(n,t){if(t instanceof Array)n.push.apply(n,t);else for(var i=0,r=t.length;i<r;i++)n.push(t[i]);return n},Na:function(n,t,i){var r=s.a.A(s.a.bc(n),t);0>r?i&&n.push(t):i||n.splice(r,1)},Ba:w,extend:v,setPrototypeOf:y,Ab:w?y:v,P:o,Ga:function(n,t,i){if(!n)return n;var u={};for(var r in n)h.call(n,r)&&(u[r]=t.call(i,n[r],r,n));return u},Tb:function(n){for(;n.firstChild;)s.removeNode(n.firstChild)},Yb:function(n){n=s.a.la(n);for(var r=(n[0]&&n[0].ownerDocument||i).createElement("div"),t=0,u=n.length;t<u;t++)r.appendChild(s.oa(n[t]));return r},Ca:function(n,t){for(var r,i=0,f=n.length,u=[];i<f;i++)r=n[i].cloneNode(!0),u.push(t?s.oa(r):r);return u},va:function(n,t){if(s.a.Tb(n),t)for(var i=0,r=t.length;i<r;i++)n.appendChild(t[i])},Xc:function(n,t){var r=n.nodeType?[n]:n;if(0<r.length){for(var f=r[0],e=f.parentNode,i=0,u=t.length;i<u;i++)e.insertBefore(t[i],f);for(i=0,u=r.length;i<u;i++)s.removeNode(r[i])}},Ua:function(n,t){if(n.length){for(t=8===t.nodeType&&t.parentNode||t;n.length&&n[0].parentNode!==t;)n.splice(0,1);for(;1<n.length&&n[n.length-1].parentNode!==t;)n.length--;if(1<n.length){var i=n[0],r=n[n.length-1];for(n.length=0;i!==r;)n.push(i),i=i.nextSibling;n.push(r)}}return n},Zc:function(n,t){7>e?n.setAttribute("selected",t):n.selected=t},Db:function(t){return null===t||t===n?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(n,t){return n=n||"",t.length>n.length?!1:n.substring(0,t.length)===t},vd:function(n,t){if(n===t)return!0;if(11===n.nodeType)return!1;if(t.contains)return t.contains(1!==n.nodeType?n.parentNode:n);if(t.compareDocumentPosition)return 16==(t.compareDocumentPosition(n)&16);for(;n&&n!=t;)n=n.parentNode;return!!n},Sb:function(n){return s.a.vd(n,n.ownerDocument.documentElement)},kd:function(n){return!!s.a.Lb(n,s.a.Sb)},R:function(n){return n&&n.tagName&&n.tagName.toLowerCase()},Ac:function(n){return s.onError?function(){try{return n.apply(this,arguments)}catch(t){throw s.onError&&s.onError(t),t;}}:n},setTimeout:function(n,t){return setTimeout(s.a.Ac(n),t)},Gc:function(n){setTimeout(function(){s.onError&&s.onError(n);throw n;},0)},B:function(n,i,r){var u=s.a.Ac(r),f,e;if(r=d[i],s.options.useOnlyNativeEvents||r||!t)if(r||"function"!=typeof n.addEventListener)if("undefined"!=typeof n.attachEvent)f=function(t){u.call(n,t)},e="on"+i,n.attachEvent(e,f),s.a.K.za(n,function(){n.detachEvent(e,f)});else throw Error("Browser doesn't support addEventListener or attachEvent");else n.addEventListener(i,u,!1);else a||(a="function"==typeof t(n).on?"on":"bind"),t(n)[a](i,u)},Fb:function(n,u){if(!n||!n.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var f;if("input"===s.a.R(n)&&n.type&&"click"==u.toLowerCase()?(f=n.type,f="checkbox"==f||"radio"==f):f=!1,s.options.useOnlyNativeEvents||!t||f)if("function"==typeof i.createEvent)if("function"==typeof n.dispatchEvent)f=i.createEvent(b[u]||"HTMLEvents"),f.initEvent(u,!0,!0,r,0,0,0,0,0,!1,!1,!1,!1,0,n),n.dispatchEvent(f);else throw Error("The supplied element doesn't support dispatchEvent");else if(f&&n.click)n.click();else if("undefined"!=typeof n.fireEvent)n.fireEvent("on"+u);else throw Error("Browser doesn't support triggering events");else t(n).trigger(u)},f:function(n){return s.O(n)?n():n},bc:function(n){return s.O(n)?n.v():n},Eb:function(n,t,i){var r;t&&("object"==typeof n.classList?(r=n.classList[i?"add":"remove"],s.a.D(t.match(l),function(t){r.call(n.classList,t)})):"string"==typeof n.className.baseVal?p(n.className,"baseVal",t,i):p(n,"className",t,i))},Bb:function(t,i){var r=s.a.f(i),u;(null===r||r===n)&&(r="");u=s.h.firstChild(t);!u||3!=u.nodeType||s.h.nextSibling(u)?s.h.va(t,[t.ownerDocument.createTextNode(r)]):u.data=r;s.a.Ad(t)},Yc:function(n,t){if(n.name=t,7>=e)try{var r=n.name.replace(/[&<>'"]/g,function(n){return"&#"+n.charCodeAt(0)+";"});n.mergeAttributes(i.createElement("<input name='"+r+"'/>"),!1)}catch(u){}},Ad:function(n){9<=e&&(n=1==n.nodeType?n:n.parentNode,n.style&&(n.style.zoom=n.style.zoom))},wd:function(n){if(e){var t=n.style.width;n.style.width=0;n.style.width=t}},Pd:function(n,t){n=s.a.f(n);t=s.a.f(t);for(var r=[],i=n;i<=t;i++)r.push(i);return r},la:function(n){for(var i=[],t=0,r=n.length;t<r;t++)i.push(n[t]);return i},Da:function(n){return k?Symbol(n):n},Zd:6===e,$d:7===e,W:e,Lc:function(n,t){for(var r=s.a.la(n.getElementsByTagName("input")).concat(s.a.la(n.getElementsByTagName("textarea"))),f="string"==typeof t?function(n){return n.name===t}:function(n){return t.test(n.name)},u=[],i=r.length-1;0<=i;i--)f(r[i])&&u.push(r[i]);return u},Nd:function(n){return"string"==typeof n&&(n=s.a.Db(n))?u&&u.parse?u.parse(n):new Function("return "+n)():null},hc:function(n,t,i){if(!u||!u.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return u.stringify(s.a.f(n),t,i)},Od:function(n,t,r){var v,e,h,f,u,c;r=r||{};var l=r.params||{},a=r.includeFields||this.Jc,v=n;if("object"==typeof n&&"form"===s.a.R(n))for(v=n.action,e=a.length-1;0<=e;e--)for(h=s.a.Lc(n,a[e]),f=h.length-1;0<=f;f--)l[h[f].name]=h[f].value;t=s.a.f(t);u=i.createElement("form");u.style.display="none";u.action=v;u.method="post";for(c in t)n=i.createElement("input"),n.type="hidden",n.name=c,n.value=s.a.hc(s.a.f(t[c])),u.appendChild(n);o(l,function(n,t){var r=i.createElement("input");r.type="hidden";r.name=n;r.value=t;u.appendChild(r)});i.body.appendChild(u);r.submitter?r.submitter(u):u.submit();setTimeout(function(){u.parentNode.removeChild(u)},0)}}}();s.b("utils",s.a);s.b("utils.arrayForEach",s.a.D);s.b("utils.arrayFirst",s.a.Lb);s.b("utils.arrayFilter",s.a.jb);s.b("utils.arrayGetDistinctValues",s.a.wc);s.b("utils.arrayIndexOf",s.a.A);s.b("utils.arrayMap",s.a.Mb);s.b("utils.arrayPushAll",s.a.Nb);s.b("utils.arrayRemoveItem",s.a.Pa);s.b("utils.cloneNodes",s.a.Ca);s.b("utils.createSymbolOrString",s.a.Da);s.b("utils.extend",s.a.extend);s.b("utils.fieldsIncludedWithJsonPost",s.a.Jc);s.b("utils.getFormFields",s.a.Lc);s.b("utils.objectMap",s.a.Ga);s.b("utils.peekObservable",s.a.bc);s.b("utils.postJson",s.a.Od);s.b("utils.parseJson",s.a.Nd);s.b("utils.registerEventHandler",s.a.B);s.b("utils.stringifyJson",s.a.hc);s.b("utils.range",s.a.Pd);s.b("utils.toggleDomNodeCssClass",s.a.Eb);s.b("utils.triggerEvent",s.a.Fb);s.b("utils.unwrapObservable",s.a.f);s.b("utils.objectForEach",s.a.P);s.b("utils.addOrRemoveItem",s.a.Na);s.b("utils.setTextContent",s.a.Bb);s.b("unwrap",s.a.f);Function.prototype.bind||(Function.prototype.bind=function(n){var t=this,i;return 1===arguments.length?function(){return t.apply(n,arguments)}:(i=Array.prototype.slice.call(arguments,1),function(){var r=i.slice(0);return r.push.apply(r,arguments),t.apply(n,r)})});s.a.g=new function(){var f=0,t="__ko__"+(new Date).getTime(),r={},i,u;return s.a.W?(i=function(i,u){var e=i[t];if(!e||"null"===e||!r[e]){if(!u)return n;e=i[t]="ko"+f++;r[e]={}}return r[e]},u=function(n){var i=n[t];return i?(delete r[i],n[t]=null,!0):!1}):(i=function(n,i){var r=n[t];return!r&&i&&(r=n[t]={}),r},u=function(n){return n[t]?(delete n[t],!0):!1}),{get:function(n,t){var r=i(n,!1);return r&&r[t]},set:function(t,r,u){(t=i(t,u!==n))&&(t[r]=u)},Ub:function(n,t,r){return n=i(n,!0),n[t]||(n[t]=r)},clear:u,Z:function(){return f+++t}}};s.b("utils.domData",s.a.g);s.b("utils.domData.clear",s.a.g.clear);s.a.K=new function(){function i(t,i){var u=s.a.g.get(t,r);return u===n&&i&&(u=[],s.a.g.set(t,r,u)),u}function u(n){var t=i(n,!1),r;if(t)for(t=t.slice(0),r=0;r<t.length;r++)t[r](n);s.a.g.clear(n);s.a.K.cleanExternalData(n);e[n.nodeType]&&f(n.childNodes,!0)}function f(n,t){for(var r=[],f,i=0;i<n.length;i++)if((!t||8===n[i].nodeType)&&(u(r[r.length]=f=n[i]),n[i]!==f))for(;i--&&-1==s.a.A(r,n[i]););}var r=s.a.g.Z(),o={1:!0,8:!0,9:!0},e={1:!0,9:!0};return{za:function(n,t){if("function"!=typeof t)throw Error("Callback must be a function");i(n,!0).push(t)},yb:function(t,u){var f=i(t,!1);f&&(s.a.Pa(f,u),0==f.length&&s.a.g.set(t,r,n))},oa:function(n){return s.u.G(function(){o[n.nodeType]&&(u(n),e[n.nodeType]&&f(n.getElementsByTagName("*")))}),n},removeNode:function(n){s.oa(n);n.parentNode&&n.parentNode.removeChild(n)},cleanExternalData:function(n){t&&"function"==typeof t.cleanData&&t.cleanData([n])}}};s.oa=s.a.K.oa;s.removeNode=s.a.K.removeNode;s.b("cleanNode",s.oa);s.b("removeNode",s.removeNode);s.b("utils.domNodeDisposal",s.a.K);s.b("utils.domNodeDisposal.addDisposeCallback",s.a.K.za);s.b("utils.domNodeDisposal.removeDisposeCallback",s.a.K.yb),function(){var h=[0,"",""],u=[1,"<table>","<\/table>"],f=[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],e=[1,"<select multiple='multiple'>","<\/select>"],c={thead:u,tbody:u,tfoot:u,tr:[2,"<table><tbody>","<\/tbody><\/table>"],td:f,th:f,option:e,optgroup:e},o=8>=s.a.W;s.a.ua=function(n,u){var f,e;if(t){if(t.parseHTML)f=t.parseHTML(n,u)||[];else if((f=t.clean([n],u))&&f[0]){for(e=f[0];e.parentNode&&11!==e.parentNode.nodeType;)e=e.parentNode;e.parentNode&&e.parentNode.removeChild(e)}}else{(f=u)||(f=i);var e=f.parentWindow||f.defaultView||r,v=s.a.Db(n).toLowerCase(),l=f.createElement("div"),a;for(a=(v=v.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&c[v[1]]||h,v=a[0],a="ignored<div>"+a[1]+n+a[2]+"<\/div>","function"==typeof e.innerShiv?l.appendChild(e.innerShiv(a)):(o&&f.body.appendChild(l),l.innerHTML=a,o&&l.parentNode.removeChild(l));v--;)l=l.lastChild;f=s.a.la(l.lastChild.childNodes)}return f};s.a.Md=function(n,t){var i=s.a.ua(n,t);return i.length&&i[0].parentElement||s.a.Yb(i)};s.a.fc=function(i,r){if(s.a.Tb(i),r=s.a.f(r),null!==r&&r!==n)if("string"!=typeof r&&(r=r.toString()),t)t(i).html(r);else for(var f=s.a.ua(r,i.ownerDocument),u=0;u<f.length;u++)i.appendChild(f[u])}}();s.b("utils.parseHtmlFragment",s.a.ua);s.b("utils.setHtml",s.a.fc);s.aa=function(){function i(n,t){var r;if(n)if(8==n.nodeType)r=s.aa.Uc(n.nodeValue),null!=r&&t.push({ud:n,Kd:r});else if(1==n.nodeType)for(var r=0,u=n.childNodes,f=u.length;r<f;r++)i(u[r],t)}var t={};return{Xb:function(n){if("function"!=typeof n)throw Error("You can only pass a function to ko.memoization.memoize()");var i=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return t[i]=n,"<!--[ko_memo:"+i+"]-->"},bd:function(i,r){var u=t[i];if(u===n)throw Error("Couldn't find any memo with ID "+i+". Perhaps it's already been unmemoized.");try{return u.apply(null,r||[]),!0}finally{delete t[i]}},cd:function(n,t){var f=[],u,o,r,e;for(i(n,f),u=0,o=f.length;u<o;u++)r=f[u].ud,e=[r],t&&s.a.Nb(e,t),s.aa.bd(f[u].Kd,e),r.nodeValue="",r.parentNode&&r.parentNode.removeChild(r)},Uc:function(n){return(n=n.match(/^\[ko_memo\:(.*?)\]$/))?n[1]:null}}}();s.b("memoization",s.aa);s.b("memoization.memoize",s.aa.Xb);s.b("memoization.unmemoize",s.aa.bd);s.b("memoization.parseMemoText",s.aa.Uc);s.b("memoization.unmemoizeDomNodeAndDescendants",s.aa.cd);s.na=function(){function f(){if(n)for(var i=n,r=0,f;t<n;)if(f=u[t++]){if(t>i){if(5e3<=++r){t=n;s.a.Gc(Error("'Too much recursion' after processing "+r+" task groups."));break}i=n}try{f()}catch(e){s.a.Gc(e)}}}function e(){f();t=n=u.length=0}var o,u=[],n=0,h=1,t=0;return o=r.MutationObserver?function(n){var t=i.createElement("div");return new MutationObserver(n).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(e):i&&"onreadystatechange"in i.createElement("script")?function(n){var t=i.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null;i.documentElement.removeChild(t);t=null;n()};i.documentElement.appendChild(t)}:function(n){setTimeout(n,0)},{scheduler:o,zb:function(t){return n||s.na.scheduler(e),u[n++]=t,h++},cancel:function(i){i=i-(h-n);i>=t&&i<n&&(u[i]=null)},resetForTesting:function(){var i=n-t;return t=n=u.length=0,i},Sd:f}}();s.b("tasks",s.na);s.b("tasks.schedule",s.na.zb);s.b("tasks.runEarly",s.na.Sd);s.Ta={throttle:function(n,t){n.throttleEvaluation=t;var i=null;return s.$({read:n,write:function(r){clearTimeout(i);i=s.a.setTimeout(function(){n(r)},t)}})},rateLimit:function(n,t){var r,i,u;"number"==typeof t?r=t:(r=t.timeout,i=t.method);n.Hb=!1;u="function"==typeof i?i:"notifyWhenChangesStop"==i?nt:g;n.ub(function(n){return u(n,r,t)})},deferred:function(t,i){if(!0!==i)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");t.Hb||(t.Hb=!0,t.ub(function(i){var u,r=!1;return function(){if(!r){s.na.cancel(u);u=s.na.zb(i);try{r=!0;t.notifySubscribers(n,"dirty")}finally{r=!1}}}}))},notify:function(n,t){n.equalityComparer="always"==t?null:b}};d={undefined:1,boolean:1,number:1,string:1};s.b("extenders",s.Ta);s.ic=function(n,t,i){this.da=n;this.lc=t;this.mc=i;this.Ib=!1;this.fb=this.Jb=null;s.L(this,"dispose",this.s);s.L(this,"disposeWhenNodeIsRemoved",this.l)};s.ic.prototype.s=function(){this.Ib||(this.fb&&s.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)};s.ic.prototype.l=function(n){this.Jb=n;s.a.K.za(n,this.fb=this.s.bind(this))};s.T=function(){s.a.Ab(this,l);l.qb(this)};l={qb:function(n){n.U={change:[]};n.sc=1},subscribe:function(n,t,i){var r=this,u;return i=i||"change",u=new s.ic(r,t?n.bind(t):n,function(){s.a.Pa(r.U[i],u);r.hb&&r.hb(i)}),r.Qa&&r.Qa(i),r.U[i]||(r.U[i]=[]),r.U[i].push(u),u},notifySubscribers:function(n,t){var u,i,r;if(t=t||"change","change"===t&&this.Gb(),this.Wa(t)){u="change"===t&&this.ed||this.U[t].slice(0);try{for(s.u.xc(),i=0;r=u[i];++i)r.Ib||r.lc(n)}finally{s.u.end()}}},ob:function(){return this.sc},Dd:function(n){return this.ob()!==n},Gb:function(){++this.sc},ub:function(n){var t=this,h=s.O(t),f,e,r,i,u,o;t.gb||(t.gb=t.notifySubscribers,t.notifySubscribers=tt);o=n(function(){t.Ja=!1;h&&i===t&&(i=t.nc?t.nc():t());var n=e||u&&t.sb(r,i);u=e=f=!1;n&&t.gb(r=i)});t.qc=function(n,r){r&&t.Ja||(u=!r);t.ed=t.U.change.slice(0);t.Ja=f=!0;i=n;o()};t.pc=function(n){f||(r=n,t.gb(n,"beforeChange"))};t.rc=function(){u=!0};t.gd=function(){t.sb(r,t.v(!0))&&(e=!0)}},Wa:function(n){return this.U[n]&&this.U[n].length},Bd:function(n){if(n)return this.U[n]&&this.U[n].length||0;var t=0;return s.a.P(this.U,function(n,i){"dirty"!==n&&(t+=i.length)}),t},sb:function(n,t){return!this.equalityComparer||!this.equalityComparer(n,t)},toString:function(){return"[object Object]"},extend:function(n){var t=this;return n&&s.a.P(n,function(n,i){var r=s.Ta[n];"function"==typeof r&&(t=r(t,i)||t)}),t}};s.L(l,"init",l.qb);s.L(l,"subscribe",l.subscribe);s.L(l,"extend",l.extend);s.L(l,"getSubscriptionsCount",l.Bd);s.a.Ba&&s.a.setPrototypeOf(l,Function.prototype);s.T.fn=l;s.Qc=function(n){return null!=n&&"function"==typeof n.subscribe&&"function"==typeof n.notifySubscribers};s.b("subscribable",s.T);s.b("isSubscribable",s.Qc);s.S=s.u=function(){function t(t){r.push(n);n=t}function i(){n=r.pop()}var r=[],n,u=0;return{xc:t,end:i,cc:function(t){if(n){if(!s.Qc(t))throw Error("Only subscribable things can act as dependencies");n.od.call(n.pd,t,t.fd||(t.fd=++u))}},G:function(n,r,u){try{return t(),n.apply(r,u||[])}finally{i()}},qa:function(){if(n)return n.o.qa()},Va:function(){if(n)return n.o.Va()},Ya:function(){if(n)return n.Ya},o:function(){if(n)return n.o}}}();s.b("computedContext",s.S);s.b("computedContext.getDependenciesCount",s.S.qa);s.b("computedContext.getDependencies",s.S.Va);s.b("computedContext.isInitial",s.S.Ya);s.b("computedContext.registerDependency",s.S.cc);s.b("ignoreDependencies",s.Yd=s.u.G);v=s.a.Da("_latestValue");s.ta=function(n){function t(){return 0<arguments.length?(t.sb(t[v],arguments[0])&&(t.ya(),t[v]=arguments[0],t.xa()),this):(s.u.cc(t),t[v])}return t[v]=n,s.a.Ba||s.a.extend(t,s.T.fn),s.T.fn.qb(t),s.a.Ab(t,a),s.options.deferUpdates&&s.Ta.deferred(t,!0),t};a={equalityComparer:b,v:function(){return this[v]},xa:function(){this.notifySubscribers(this[v],"spectate");this.notifySubscribers(this[v])},ya:function(){this.notifySubscribers(this[v],"beforeChange")}};s.a.Ba&&s.a.setPrototypeOf(a,s.T.fn);y=s.ta.Ma="__ko_proto__";a[y]=s.ta;s.O=function(n){if((n="function"==typeof n&&n[y])&&n!==a[y]&&n!==s.o.fn[y])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!n};s.Za=function(n){return"function"==typeof n&&(n[y]===a[y]||n[y]===s.o.fn[y]&&n.Nc)};s.b("observable",s.ta);s.b("isObservable",s.O);s.b("isWriteableObservable",s.Za);s.b("isWritableObservable",s.Za);s.b("observable.fn",a);s.L(a,"peek",a.v);s.L(a,"valueHasMutated",a.xa);s.L(a,"valueWillMutate",a.ya);s.Ha=function(n){if(n=n||[],"object"!=typeof n||!("length"in n))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return n=s.ta(n),s.a.Ab(n,s.Ha.fn),n.extend({trackArrayChanges:!0})};s.Ha.fn={remove:function(n){for(var u,i=this.v(),r=[],f="function"!=typeof n||s.O(n)?function(t){return t===n}:n,t=0;t<i.length;t++)if(u=i[t],f(u)){if(0===r.length&&this.ya(),i[t]!==u)throw Error("Array modified during remove; cannot remove item");r.push(u);i.splice(t,1);t--}return r.length&&this.xa(),r},removeAll:function(t){if(t===n){var i=this.v(),r=i.slice(0);return this.ya(),i.splice(0,i.length),this.xa(),r}return t?this.remove(function(n){return 0<=s.a.A(t,n)}):[]},destroy:function(n){var r=this.v(),u="function"!=typeof n||s.O(n)?function(t){return t===n}:n,t,i;for(this.ya(),t=r.length-1;0<=t;t--)i=r[t],u(i)&&(i._destroy=!0);this.xa()},destroyAll:function(t){return t===n?this.destroy(function(){return!0}):t?this.destroy(function(n){return 0<=s.a.A(t,n)}):[]},indexOf:function(n){var t=this();return s.a.A(t,n)},replace:function(n,t){var i=this.indexOf(n);0<=i&&(this.ya(),this.v()[i]=t,this.xa())},sorted:function(n){var t=this().slice(0);return n?t.sort(n):t.sort()},reversed:function(){return this().slice(0).reverse()}};s.a.Ba&&s.a.setPrototypeOf(s.Ha.fn,s.ta.fn);s.a.D("pop push reverse shift sort splice unshift".split(" "),function(n){s.Ha.fn[n]=function(){var t=this.v(),i;return this.ya(),this.zc(t,n,arguments),i=t[n].apply(t,arguments),this.xa(),i===t?this:i}});s.a.D(["slice"],function(n){s.Ha.fn[n]=function(){var t=this();return t[n].apply(t,arguments)}});s.Pc=function(n){return s.O(n)&&"function"==typeof n.remove&&"function"==typeof n.push};s.b("observableArray",s.Ha);s.b("isObservableArray",s.Pc);s.Ta.trackArrayChanges=function(t,i){function a(){function n(){if(u){var i=[].concat(t.v()||[]),n;t.Wa("arrayChange")&&((!r||1<u)&&(r=s.a.Pb(h,i,t.Ob)),n=r);h=i;r=null;u=0;n&&n.length&&t.notifySubscribers(n,"arrayChange")}}f?n():(f=!0,o=t.subscribe(function(){++u},null,"spectate"),h=[].concat(t.v()||[]),r=null,e=t.subscribe(n))}if(t.Ob={},i&&"object"==typeof i&&s.a.extend(t.Ob,i),t.Ob.sparse=!0,!t.zc){var f=!1,r=null,e,o,u=0,h,c=t.Qa,l=t.hb;t.Qa=function(n){c&&c.call(t,n);"arrayChange"===n&&a()};t.hb=function(i){l&&l.call(t,i);"arrayChange"!==i||t.Wa("arrayChange")||(e&&e.s(),o&&o.s(),o=e=null,f=!1,h=n)};t.zc=function(n,t,i){function c(n,t,i){return l[l.length]={status:n,value:t,index:i}}if(f&&!u){var l=[],e=n.length,h=i.length,o=0;switch(t){case"push":o=e;case"unshift":for(t=0;t<h;t++)c("added",i[t],o+t);break;case"pop":o=e-1;case"shift":e&&c("deleted",n[o],o);break;case"splice":t=Math.min(Math.max(0,0>i[0]?e+i[0]:i[0]),e);for(var e=1===h?e:Math.min(t+(i[1]||0),e),h=t+h-2,o=Math.max(e,h),a=[],v=[],y=2;t<o;++t,++y)t<e&&v.push(c("deleted",n[t],t)),t<h&&a.push(c("added",i[y],t));s.a.Kc(v,a);break;default:return}r=l}}}};h=s.a.Da("_state");s.o=s.$=function(t,i,r){function f(){if(0<arguments.length){if("function"==typeof e)e.apply(u.nb,arguments);else throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return this}return u.ra||s.u.cc(f),(u.ka||u.J&&f.Xa())&&f.ha(),u.X}if("object"==typeof t?r=t:(r=r||{},t&&(r.read=t)),"function"!=typeof r.read)throw Error("Pass a function that returns the value of the ko.computed");var e=r.write,u={X:n,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:r.read,nb:i||r.owner,l:r.disposeWhenNodeIsRemoved||r.l||null,Sa:r.disposeWhen||r.Sa,Rb:null,I:{},V:0,Ic:null};return f[h]=u,f.Nc="function"==typeof e,s.a.Ba||s.a.extend(f,s.T.fn),s.T.fn.qb(f),s.a.Ab(f,c),r.pure?(u.wb=!0,u.J=!0,s.a.extend(f,ut)):r.deferEvaluation&&s.a.extend(f,ft),s.options.deferUpdates&&s.Ta.deferred(f,!0),u.l&&(u.jc=!0,u.l.nodeType||(u.l=null)),u.J||r.deferEvaluation||f.ha(),u.l&&f.ja()&&s.a.K.za(u.l,u.Rb=function(){f.s()}),f};var c={equalityComparer:b,qa:function(){return this[h].V},Va:function(){var n=[];return s.a.P(this[h].I,function(t,i){n[i.Ka]=i.da}),n},Vb:function(n){if(!this[h].V)return!1;var t=this.Va();return-1!==s.a.A(t,n)?!0:!!s.a.Lb(t,function(t){return t.Vb&&t.Vb(n)})},uc:function(n,t,i){if(this[h].wb&&t===this)throw Error("A 'pure' computed must not be called recursively");this[h].I[n]=i;i.Ka=this[h].V++;i.La=t.ob()},Xa:function(){var t,n,i=this[h].I;for(t in i)if(Object.prototype.hasOwnProperty.call(i,t)&&(n=i[t],this.Ia&&n.da.Ja||n.da.Dd(n.La)))return!0},Jd:function(){this.Ia&&!this[h].rb&&this.Ia(!1)},ja:function(){var n=this[h];return n.ka||0<n.V},Rd:function(){this.Ja?this[h].ka&&(this[h].sa=!0):this.Hc()},$c:function(n){if(n.Hb){var t=n.subscribe(this.Jd,this,"dirty"),i=n.subscribe(this.Rd,this);return{da:n,s:function(){t.s();i.s()}}}return n.subscribe(this.Hc,this)},Hc:function(){var n=this,t=n.throttleEvaluation;t&&0<=t?(clearTimeout(this[h].Ic),this[h].Ic=s.a.setTimeout(function(){n.ha(!0)},t)):n.Ia?n.Ia(!0):n.ha(!0)},ha:function(n){var t=this[h],i=t.Sa,r=!1;if(!t.rb&&!t.ra){if(t.l&&!s.a.Sb(t.l)||i&&i()){if(!t.jc){this.s();return}}else t.jc=!1;t.rb=!0;try{r=this.zd(n)}finally{t.rb=!1}return r}},zd:function(t){var i=this[h],r=!1,f=i.wb?n:!i.V,r={qd:this,mb:i.I,Qb:i.V},u;return s.u.xc({pd:r,od:rt,o:this,Ya:f}),i.I={},i.V=0,u=this.yd(i,r),i.V?r=this.sb(i.X,u):(this.s(),r=!0),r&&(i.J?this.Gb():this.notifySubscribers(i.X,"beforeChange"),i.X=u,this.notifySubscribers(i.X,"spectate"),!i.J&&t&&this.notifySubscribers(i.X),this.rc&&this.rc()),f&&this.notifySubscribers(i.X,"awake"),r},yd:function(n,t){try{var i=n.Wc;return n.nb?i.call(n.nb):i()}finally{s.u.end();t.Qb&&!n.J&&s.a.P(t.mb,it);n.sa=n.ka=!1}},v:function(n){var t=this[h];return(t.ka&&(n||!t.V)||t.J&&this.Xa())&&this.ha(),t.X},ub:function(n){s.T.fn.ub.call(this,n);this.nc=function(){return this[h].J||(this[h].sa?this.ha():this[h].ka=!1),this[h].X};this.Ia=function(n){this.pc(this[h].X);this[h].ka=!0;n&&(this[h].sa=!0);this.qc(this,!n)}},s:function(){var t=this[h];!t.J&&t.I&&s.a.P(t.I,function(n,t){t.s&&t.s()});t.l&&t.Rb&&s.a.K.yb(t.l,t.Rb);t.I=n;t.V=0;t.ra=!0;t.sa=!1;t.ka=!1;t.J=!1;t.l=n;t.Sa=n;t.Wc=n;this.Nc||(t.nb=n)}},ut={Qa:function(n){var i=this,t=i[h],r;!t.ra&&t.J&&"change"==n&&(t.J=!1,t.sa||i.Xa()?(t.I=null,t.V=0,i.ha()&&i.Gb()):(r=[],s.a.P(t.I,function(n,t){r[t.Ka]=n}),s.a.D(r,function(n,r){var f=t.I[n],u=i.$c(f.da);u.Ka=r;u.La=f.La;t.I[n]=u}),i.Xa()&&i.ha()&&i.Gb()),t.ra||i.notifySubscribers(t.X,"awake"))},hb:function(t){var i=this[h];i.ra||"change"!=t||this.Wa("change")||(s.a.P(i.I,function(n,t){t.s&&(i.I[n]={da:t.da,Ka:t.Ka,La:t.La},t.s())}),i.J=!0,this.notifySubscribers(n,"asleep"))},ob:function(){var n=this[h];return n.J&&(n.sa||this.Xa())&&this.ha(),s.T.fn.ob.call(this)}},ft={Qa:function(n){"change"!=n&&"beforeChange"!=n||this.v()}};s.a.Ba&&s.a.setPrototypeOf(c,s.T.fn);p=s.ta.Ma;c[p]=s.o;s.Oc=function(n){return"function"==typeof n&&n[p]===c[p]};s.Fd=function(n){return s.Oc(n)&&n[h]&&n[h].wb};s.b("computed",s.o);s.b("dependentObservable",s.o);s.b("isComputed",s.Oc);s.b("isPureComputed",s.Fd);s.b("computed.fn",c);s.L(c,"peek",c.v);s.L(c,"dispose",c.s);s.L(c,"isActive",c.ja);s.L(c,"getDependenciesCount",c.qa);s.L(c,"getDependencies",c.Va);s.xb=function(n,t){return"function"==typeof n?s.o(n,t,{pure:!0}):(n=s.a.extend({},n),n.pure=!0,s.o(n,t))};s.b("pureComputed",s.xb),function(){function i(u,f,e){if(e=e||new t,u=f(u),"object"!=typeof u||null===u||u===n||u instanceof RegExp||u instanceof Date||u instanceof String||u instanceof Number||u instanceof Boolean)return u;var o=u instanceof Array?[]:{};return e.save(u,o),r(u,function(t){var r=f(u[t]),s;switch(typeof r){case"boolean":case"number":case"string":case"function":o[t]=r;break;case"object":case"undefined":s=e.get(r);o[t]=s!==n?s:i(r,f,e)}}),o}function r(n,t){if(n instanceof Array){for(var i=0;i<n.length;i++)t(i);"function"==typeof n.toJSON&&t("toJSON")}else for(i in n)t(i)}function t(){this.keys=[];this.values=[]}s.ad=function(n){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return i(n,function(n){for(var t=0;s.O(n)&&10>t;t++)n=n();return n})};s.toJSON=function(n,t,i){return n=s.ad(n),s.a.hc(n,t,i)};t.prototype={constructor:t,save:function(n,t){var i=s.a.A(this.keys,n);0<=i?this.values[i]=t:(this.keys.push(n),this.values.push(t))},get:function(t){return t=s.a.A(this.keys,t),0<=t?this.values[t]:n}}}();s.b("toJS",s.ad);s.b("toJSON",s.toJSON);s.Wd=function(n,t,i){function r(t){var r=s.xb(n,i).extend({ma:"always"}),u=r.subscribe(function(n){n&&(u.s(),t(n))});return r.notifySubscribers(r.v()),u}return"function"!=typeof Promise||t?r(t.bind(i)):new Promise(r)};s.b("when",s.Wd),function(){s.w={M:function(t){switch(s.a.R(t)){case"option":return!0===t.__ko__hasDomDataOptionValue__?s.a.g.get(t,s.c.options.$b):7>=s.a.W?t.getAttributeNode("value")&&t.getAttributeNode("value").specified?t.value:t.text:t.value;case"select":return 0<=t.selectedIndex?s.w.M(t.options[t.selectedIndex]):n;default:return t.value}},cb:function(t,i,r){switch(s.a.R(t)){case"option":"string"==typeof i?(s.a.g.set(t,s.c.options.$b,n),"__ko__hasDomDataOptionValue__"in t&&delete t.__ko__hasDomDataOptionValue__,t.value=i):(s.a.g.set(t,s.c.options.$b,i),t.__ko__hasDomDataOptionValue__=!0,t.value="number"==typeof i?i:"");break;case"select":(""===i||null===i)&&(i=n);for(var u=-1,f=0,o=t.options.length,e;f<o;++f)if(e=s.w.M(t.options[f]),e==i||""===e&&i===n){u=f;break}(r||0<=u||i===n&&1<t.size)&&(t.selectedIndex=u,6===s.a.W&&s.a.setTimeout(function(){t.selectedIndex=u},0));break;default:(null===i||i===n)&&(i="");t.value=i}}}}();s.b("selectExtensions",s.w);s.b("selectExtensions.readValue",s.w.M);s.b("selectExtensions.writeValue",s.w.cb);s.m=function(){function t(n){var c,r,t;n=s.a.Db(n);123===n.charCodeAt(0)&&(n=n.slice(1,-1));n+="\n,";var a=[],l=n.match(i),o,u=[],h=0;if(1<l.length){for(c=0;r=l[c];++c){if(t=r.charCodeAt(0),44===t){if(0>=h){a.push(o&&u.length?{key:o,value:u.join("")}:{unknown:o||u.join("")});o=h=0;u=[];continue}}else if(58===t){if(!h&&!o&&1===u.length){o=u.pop();continue}}else if(47===t&&1<r.length&&(47===r.charCodeAt(1)||42===r.charCodeAt(1)))continue;else 47===t&&c&&1<r.length?(t=l[c-1].match(f))&&!e[t[0]]&&(n=n.substr(n.indexOf(r)+1),l=n.match(i),c=-1,r="/"):40===t||123===t||91===t?++h:41===t||125===t||93===t?--h:o||u.length||34!==t&&39!==t||(r=r.slice(1,-1));u.push(r)}if(0<h)throw Error("Unbalanced parentheses, braces, or brackets");}return a}var r=["true","false","null","undefined"],u=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,i=RegExp("\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|`(?:\\\\.|[^`])*`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*\n|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,\"'`{}()/:[\\]]*[^\\s,\"'`{}()/:[\\]]|[^\\s]","g"),f=/[\])"'A-Za-z0-9_$]+$/,e={"in":1,"return":1,"typeof":1},n={};return{Ra:[],wa:n,ac:t,vb:function(i,f){function e(t,i){var a,f;if(!l){if(f=s.getBindingHandler(t),f&&f.preprocess&&!(i=f.preprocess(i,t,e)))return;(f=n[t])&&(a=i,0<=s.a.A(r,a)?a=!1:(f=a.match(u),a=null===f?!1:f[1]?"Object("+f[1]+")"+f[2]:a),f=a);f&&o.push("'"+("string"==typeof n[t]?n[t]:t)+"':function(_z){"+a+"=_z}")}c&&(i="function(){return "+i+" }");h.push("'"+t+"':"+i)}f=f||{};var h=[],o=[],c=f.valueAccessors,l=f.bindingParams,a="string"==typeof i?t(i):i;return s.a.D(a,function(n){e(n.key||n.unknown,n.value)}),o.length&&e("_ko_property_writers","{"+o.join(",")+" }"),h.join(",")},Id:function(n,t){for(var i=0;i<n.length;i++)if(n[i].key==t)return!0;return!1},eb:function(n,t,i,r,u){n&&s.O(n)?!s.Za(n)||u&&n.v()===r||n(r):(n=t.get("_ko_property_writers"))&&n[i]&&n[i](r)}}}();s.b("expressionRewriting",s.m);s.b("expressionRewriting.bindingRewriteValidators",s.m.Ra);s.b("expressionRewriting.parseObjectLiteral",s.m.ac);s.b("expressionRewriting.preProcessBindings",s.m.vb);s.b("expressionRewriting._twoWayBindings",s.m.wa);s.b("jsonExpressionRewriting",s.m);s.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",s.m.vb),function(){function n(n){return 8==n.nodeType&&e.test(r?n.text:n.nodeValue)}function t(n){return 8==n.nodeType&&h.test(r?n.text:n.nodeValue)}function u(i,r){for(var u=i,f=1,e=[];u=u.nextSibling;){if(t(u)&&(s.a.g.set(u,o,!0),f--,0===f))return e;e.push(u);n(u)&&f++}if(!r)throw Error("Cannot find closing comment tag to match: "+i.nodeValue);return null}function f(n,t){var i=u(n,t);return i?0<i.length?i[i.length-1].nextSibling:n.nextSibling:null}var r=i&&"<!--test-->"===i.createComment("test").text,e=r?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,h=r?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,c={ul:!0,ol:!0},o="__ko_matchedEndComment__";s.h={ea:{},childNodes:function(t){return n(t)?u(t):t.childNodes},Ea:function(t){if(n(t)){t=s.h.childNodes(t);for(var i=0,r=t.length;i<r;i++)s.removeNode(t[i])}else s.a.Tb(t)},va:function(t,i){if(n(t)){s.h.Ea(t);for(var u=t.nextSibling,r=0,f=i.length;r<f;r++)u.parentNode.insertBefore(i[r],u)}else s.a.va(t,i)},Vc:function(t,i){var r;n(t)?(r=t.nextSibling,t=t.parentNode):r=t.firstChild;r?i!==r&&t.insertBefore(i,r):t.appendChild(i)},Wb:function(t,i,r){r?(r=r.nextSibling,n(t)&&(t=t.parentNode),r?i!==r&&t.insertBefore(i,r):t.appendChild(i)):s.h.Vc(t,i)},firstChild:function(i){if(n(i))return!i.nextSibling||t(i.nextSibling)?null:i.nextSibling;if(i.firstChild&&t(i.firstChild))throw Error("Found invalid end comment, as the first child of "+i);return i.firstChild},nextSibling:function(i){if(n(i)&&(i=f(i)),i.nextSibling&&t(i.nextSibling)){var r=i.nextSibling;if(t(r)&&!s.a.g.get(r,o))throw Error("Found end comment without a matching opening comment, as child of "+i);return null}return i.nextSibling},Cd:n,Vd:function(n){return(n=(r?n.text:n.nodeValue).match(e))?n[1]:null},Sc:function(i){var o,r,u,e;if(c[s.a.R(i)]&&(o=i.firstChild,o))do if(1===o.nodeType){if(r=o.firstChild,u=null,r)do u?u.push(r):n(r)?(e=f(r,!0),e?r=e:u=[r]):t(r)&&(u=[r]);while(r=r.nextSibling);if(r=u)for(u=o.nextSibling,e=0;e<r.length;e++)u?i.insertBefore(r[e],u):i.appendChild(r[e])}while(o=o.nextSibling)}}}();s.b("virtualElements",s.h);s.b("virtualElements.allowedBindings",s.h.ea);s.b("virtualElements.emptyNode",s.h.Ea);s.b("virtualElements.insertAfter",s.h.Wb);s.b("virtualElements.prepend",s.h.Vc);s.b("virtualElements.setDomNodeChildren",s.h.va),function(){s.ga=function(){this.nd={}};s.a.extend(s.ga.prototype,{nodeHasBindings:function(n){switch(n.nodeType){case 1:return null!=n.getAttribute("data-bind")||s.j.getComponentNameForNode(n);case 8:return s.h.Cd(n);default:return!1}},getBindings:function(n,t){var i=this.getBindingsString(n,t),i=i?this.parseBindingsString(i,t,n):null;return s.j.tc(i,n,t,!1)},getBindingAccessors:function(n,t){var i=this.getBindingsString(n,t),i=i?this.parseBindingsString(i,t,n,{valueAccessors:!0}):null;return s.j.tc(i,n,t,!0)},getBindingsString:function(n){switch(n.nodeType){case 1:return n.getAttribute("data-bind");case 8:return s.h.Vd(n);default:return null}},parseBindingsString:function(n,t,i,r){var u,f,e,h,c;try{return u=this.nd,f=n+(r&&r.valueAccessors||""),(e=u[f])||(c="with($context){with($data||{}){return{"+s.m.vb(n,r)+"}}}",h=new Function("$context","$element",c),e=u[f]=h),e(t,i)}catch(o){throw o.message="Unable to parse bindings.\nBindings value: "+n+"\nMessage: "+o.message,o;}}});s.ga.instance=new s.ga}();s.b("bindingProvider",s.ga),function(){function v(n){var t=(n=s.a.g.get(n,f))&&n.N;t&&(n.N=null,t.Tc())}function o(n,t,i){this.node=n;this.yc=t;this.kb=[];this.H=!1;t.N||s.a.K.za(n,v);i&&i.N&&(i.N.kb.push(n),this.Kb=i)}function d(n){return function(){return n}}function l(n){return n()}function y(n){return s.a.Ga(s.u.G(n),function(t,i){return function(){return n()[i]}})}function g(n,t,i){return"function"==typeof n?y(n.bind(null,t,i)):s.a.Ga(n,d)}function nt(n,t){return y(this.getBindings.bind(this,n,t))}function p(n,t){var i=s.h.firstChild(t),r,u,f;if(i){if(u=s.ga.instance,f=u.preprocessNode,f){for(;r=i;)i=s.h.nextSibling(r),f.call(u,r);i=s.h.firstChild(t)}for(;r=i;)i=s.h.nextSibling(r),w(n,r)}s.i.ma(t,s.i.H)}function w(n,t){var i=n,r=1===t.nodeType;r&&s.h.Sc(t);(r||s.ga.instance.nodeHasBindings(t))&&(i=b(t,null,n).bindingContextForDescendants);i&&!k[s.a.R(t)]&&p(i,t)}function tt(n){var i=[],r={},t=[];return s.a.P(n,function u(f){if(!r[f]){var e=s.getBindingHandler(f);e&&(e.after&&(t.push(f),s.a.D(e.after,function(i){if(n[i]){if(-1!==s.a.A(t,i))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+t.join(", "));u(i)}}),t.length--),i.push({key:f,Mc:e}));r[f]=!0}}),i}function b(t,i,r){var o=s.a.g.Ub(t,f,{}),w=o.hd,e,h,y,v,p;if(!i){if(w)throw Error("You cannot apply bindings multiple times to the same element.");o.hd=!0}if(w||(o.context=r),o.Zb||(o.Zb={}),i&&"function"!=typeof i)e=i;else{var b=s.ga.instance,k=b.getBindingAccessors||nt,c=s.$(function(){return(e=i?i(r,t):k.call(b,t,r))&&(r[u]&&r[u](),r[a]&&r[a]()),e},null,{l:t});e&&c.ja()||(c=null)}return h=r,e&&(v=function(){return s.a.Ga(c?c():e,l)},p=c?function(n){return function(){return l(c()[n])}}:function(n){return e[n]},v.get=function(n){return e[n]&&l(p(n))},v.has=function(n){return n in e},s.i.H in e&&s.i.subscribe(t,s.i.H,function(){var i=e[s.i.H](),n;i&&(n=s.h.childNodes(t),n.length&&i(n,s.Ec(n[0])))}),s.i.pa in e&&(h=s.i.Cb(t,r),s.i.subscribe(t,s.i.pa,function(){var n=e[s.i.pa]();n&&s.h.firstChild(t)&&n(t)})),o=tt(e),s.a.D(o,function(i){var f=i.Mc.init,o=i.Mc.update,r=i.key;if(8===t.nodeType&&!s.h.ea[r])throw Error("The binding '"+r+"' cannot be used with virtual elements");try{"function"==typeof f&&s.u.G(function(){var i=f(t,p(r),v,h.$data,h);if(i&&i.controlsDescendantBindings){if(y!==n)throw Error("Multiple bindings ("+y+" and "+r+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");y=r}});"function"==typeof o&&s.$(function(){o(t,p(r),v,h.$data,h)},null,{l:t})}catch(u){throw u.message='Unable to process binding "'+r+": "+e[r]+'"\nMessage: '+u.message,u;}})),o=y===n,{shouldBindDescendants:o,bindingContextForDescendants:o&&h}}function h(t,i){return t&&t instanceof s.fa?t:new s.fa(t,n,n,i)}var u=s.a.Da("_subscribable"),e=s.a.Da("_ancestorBindingInfo"),a=s.a.Da("_dataDependency"),k,c,f;s.c={};k={script:!0,textarea:!0,template:!0};s.getBindingHandler=function(n){return s.c[n]};c={};s.fa=function(t,i,r,f,o){function y(){var t=b?v():v,n=s.a.f(t);return i?(s.a.extend(h,i),e in i&&(h[e]=i[e])):(h.$parents=[],h.$root=n,h.ko=s),h[u]=l,p?n=h.$data:(h.$rawData=t,h.$data=n),r&&(h[r]=n),f&&f(h,i,n),i&&i[u]&&!s.S.o().Vb(i[u])&&i[u](),w&&(h[a]=w),h.$data}var h=this,p=t===c,v=p?n:t,b="function"==typeof v&&!s.O(v),l,w=o&&o.dataDependency;o&&o.exportDependencies?y():(l=s.xb(y),l.v(),l.ja()?l.equalityComparer=null:h[u]=n)};s.fa.prototype.createChildContext=function(n,t,i,r){if(!r&&t&&"object"==typeof t&&(r=t,t=r.as,i=r.extend),t&&r&&r.noChildContext){var u="function"==typeof n&&!s.O(n);return new s.fa(c,this,null,function(r){i&&i(r);r[t]=u?n():n},r)}return new s.fa(n,this,t,function(n,t){n.$parentContext=t;n.$parent=t.$data;n.$parents=(t.$parents||[]).slice(0);n.$parents.unshift(n.$parent);i&&i(n)},r)};s.fa.prototype.extend=function(n,t){return new s.fa(c,this,null,function(t){s.a.extend(t,"function"==typeof n?n(t):n)},t)};f=s.a.g.Z();o.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)};o.prototype.sd=function(n){s.a.Pa(this.kb,n);!this.kb.length&&this.H&&this.Cc()};o.prototype.Cc=function(){this.H=!0;this.yc.N&&!this.kb.length&&(this.yc.N=null,s.a.K.yb(this.node,v),s.i.ma(this.node,s.i.pa),this.Tc())};s.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(n,t,i,r,u){var e=s.a.g.Ub(n,f,{});return e.Fa||(e.Fa=new s.T),u&&u.notifyImmediately&&e.Zb[t]&&s.u.G(i,r,[n]),e.Fa.subscribe(i,r,t)},ma:function(t,i){var r=s.a.g.get(t,f);if(r&&(r.Zb[i]=!0,r.Fa&&r.Fa.notifySubscribers(t,i),i==s.i.H))if(r.N)r.N.Cc();else if(r.N===n&&r.Fa&&r.Fa.Wa(s.i.pa))throw Error("descendantsComplete event not supported for bindings on this node");},Cb:function(n,t){var i=s.a.g.Ub(n,f,{});return i.N||(i.N=new o(n,i,t[e])),t[e]==i?t:t.extend(function(n){n[e]=i})}};s.Td=function(n){return(n=s.a.g.get(n,f))&&n.context};s.ib=function(n,t,i){return 1===n.nodeType&&s.h.Sc(n),b(n,t,h(i))};s.ld=function(n,t,i){return i=h(i),s.ib(n,g(t,i,n),i)};s.Oa=function(n,t){1!==t.nodeType&&8!==t.nodeType||p(h(n),t)};s.vc=function(n,u,f){if(!t&&r.jQuery&&(t=r.jQuery),2>arguments.length){if(u=i.body,!u)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?");}else if(!u||1!==u.nodeType&&8!==u.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");w(h(n,f),u)};s.Dc=function(t){return!t||1!==t.nodeType&&8!==t.nodeType?n:s.Td(t)};s.Ec=function(t){return(t=s.Dc(t))?t.$data:n};s.b("bindingHandlers",s.c);s.b("bindingEvent",s.i);s.b("bindingEvent.subscribe",s.i.subscribe);s.b("bindingEvent.startPossiblyAsyncContentBinding",s.i.Cb);s.b("applyBindings",s.vc);s.b("applyBindingsToDescendants",s.Oa);s.b("applyBindingAccessorsToNode",s.ib);s.b("applyBindingsToNode",s.ld);s.b("contextFor",s.Dc);s.b("dataFor",s.Ec)}(),function(n){function u(t,u){var e=Object.prototype.hasOwnProperty.call(i,t)?i[t]:n,o;e?e.subscribe(u):(e=i[t]=new s.T,e.subscribe(u),f(t,function(n,u){var f=!(!u||!u.synchronous);r[t]={definition:n,Gd:f};delete i[t];o||f?e.notifySubscribers(n):s.na.zb(function(){e.notifySubscribers(n)})}),o=!0)}function f(n,i){t("getConfig",[n],function(r){r?t("loadComponent",[n,r],function(n){i(n,r)}):i(null,null)})}function t(i,r,u,f){var e,o,h;if(f||(f=s.j.loaders.slice(0)),e=f.shift(),e)if(o=e[i],o){if(h=!1,o.apply(e,r.concat(function(n){h?u(null):null!==n?u(n):t(i,r,u,f)}))!==n&&(h=!0,!e.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");}else t(i,r,u,f);else u(null)}var i={},r={};s.j={get:function(t,i){var f=Object.prototype.hasOwnProperty.call(r,t)?r[t]:n;f?f.Gd?s.u.G(function(){i(f.definition)}):s.na.zb(function(){i(f.definition)}):u(t,i)},Bc:function(n){delete r[n]},oc:t};s.j.loaders=[];s.b("components",s.j);s.b("components.get",s.j.get);s.b("components.clearCachedDefinition",s.j.Bc)}(),function(){function l(n,i,r,f){function e(){0==--c&&f(o)}var o={},c=2,h=r.template;r=r.viewModel;h?u(i,h,function(t){s.j.oc("loadTemplate",[n,t],function(n){o.template=n;e()})}):e();r?u(i,r,function(i){s.j.oc("loadViewModel",[n,i],function(n){o[t]=n;e()})}):e()}function e(n,i,r){if("function"==typeof i)r(function(n){return new i(n)});else if("function"==typeof i[t])r(i[t]);else if("instance"in i){var u=i.instance;r(function(){return u})}else"viewModel"in i?e(n,i.viewModel,r):n("Unknown viewModel value: "+i)}function h(n){switch(s.a.R(n)){case"script":return s.a.ua(n.text);case"textarea":return s.a.ua(n.value);case"template":if(c(n.content))return s.a.Ca(n.content.childNodes)}return s.a.Ca(n.childNodes)}function c(n){return r.DocumentFragment?n instanceof DocumentFragment:n&&11===n.nodeType}function u(n,t,i){"string"==typeof t.require?o||r.require?(o||r.require)([t.require],function(n){n&&"object"==typeof n&&n.Xd&&n["default"]&&(n=n["default"]);i(n)}):n("Uses require, but no AMD loader is present"):i(t)}function f(n){return function(t){throw Error("Component '"+n+"': "+t);}}var n={},t;s.j.register=function(t,i){if(!i)throw Error("Invalid configuration for "+t);if(s.j.tb(t))throw Error("Component "+t+" is already registered");n[t]=i};s.j.tb=function(t){return Object.prototype.hasOwnProperty.call(n,t)};s.j.unregister=function(t){delete n[t];s.j.Bc(t)};s.j.Fc={getConfig:function(t,i){i(s.j.tb(t)?n[t]:null)},loadComponent:function(n,t,i){var r=f(n);u(r,t,function(t){l(n,r,t,i)})},loadTemplate:function(n,t,u){if(n=f(n),"string"==typeof t)u(s.a.ua(t));else if(t instanceof Array)u(t);else if(c(t))u(s.a.la(t.childNodes));else if(t.element)if(t=t.element,r.HTMLElement?t instanceof HTMLElement:t&&t.tagName&&1===t.nodeType)u(h(t));else if("string"==typeof t){var e=i.getElementById(t);e?u(h(e)):n("Cannot find element with ID "+t)}else n("Unknown element type: "+t);else n("Unknown template value: "+t)},loadViewModel:function(n,t,i){e(f(n),t,i)}};t="createViewModel";s.b("components.register",s.j.register);s.b("components.isRegistered",s.j.tb);s.b("components.unregister",s.j.unregister);s.b("components.defaultLoader",s.j.Fc);s.j.loaders.push(s.j.Fc);s.j.dd=n}(),function(){function n(n,i){var r=n.getAttribute("params");if(r){var r=t.parseBindingsString(r,i,n,{valueAccessors:!0,bindingParams:!0}),r=s.a.Ga(r,function(t){return s.o(t,null,{l:n})}),u=s.a.Ga(r,function(t){var i=t.v();return t.ja()?s.o({read:function(){return s.a.f(t())},write:s.Za(i)&&function(n){t()(n)},l:n}):i});return Object.prototype.hasOwnProperty.call(u,"$raw")||(u.$raw=r),u}return{$raw:{}}}s.j.getComponentNameForNode=function(n){var t=s.a.R(n);if(s.j.tb(t)&&(-1!=t.indexOf("-")||"[object HTMLUnknownElement]"==""+n||8>=s.a.W&&n.tagName===t))return t};s.j.tc=function(t,i,r,u){var f,e;if(1===i.nodeType&&(f=s.j.getComponentNameForNode(i),f)){if(t=t||{},t.component)throw Error('Cannot use the "component" binding on a custom element matching a component');e={name:f,params:n(i,r)};t.component=u?function(){return e}:e}return t};var t=new s.ga;9>s.a.W&&(s.j.register=function(n){return function(){return n.apply(this,arguments)}}(s.j.register),i.createDocumentFragment=function(n){return function(){var t=n(),i=s.j.dd;for(var r in i);return t}}(i.createDocumentFragment))}(),function(){function n(n,t,i){if(t=t.template,!t)throw Error("Component '"+n+"' has no template");n=s.a.Ca(t);s.h.va(i,n)}function t(n,t,i){var r=n.createViewModel;return r?r.call(n,t,i):t}var i=0;s.c.component={init:function(r,u,f,e,o){function a(){var n=h&&h.dispose;"function"==typeof n&&n.call(h);c&&c.s();l=h=c=null}var h,l,c,v=s.a.la(s.h.childNodes(r));return s.h.Ea(r),s.a.K.za(r,a),s.o(function(){var e=s.a.f(u()),f,y,p,w;if("string"==typeof e?f=e:(f=s.a.f(e.name),y=s.a.f(e.params)),!f)throw Error("No component name specified");p=s.i.Cb(r,o);w=l=++i;s.j.get(f,function(i){if(l===w){if(a(),!i)throw Error("Unknown component '"+f+"'");n(f,i,r);var u=t(i,y,{element:r,templateNodes:v});i=p.createChildContext(u,{extend:function(n){n.$component=u;n.$componentTemplateNodes=v}});u&&u.koDescendantsComplete&&(c=s.i.subscribe(r,s.i.pa,u.koDescendantsComplete,u));h=u;s.Oa(i,r)}})},null,{l:r}),{controlsDescendantBindings:!0}}};s.h.ea.component=!0}();k={"class":"className","for":"htmlFor"};s.c.attr={update:function(t,i){var r=s.a.f(i())||{};s.a.P(r,function(i,r){r=s.a.f(r);var u=i.indexOf(":"),u="lookupNamespaceURI"in t&&0<u&&t.lookupNamespaceURI(i.substr(0,u)),f=!1===r||null===r||r===n;f?u?t.removeAttributeNS(u,i):t.removeAttribute(i):r=r.toString();8>=s.a.W&&i in k?(i=k[i],f?t.removeAttribute(i):t[i]=r):f||(u?t.setAttributeNS(u,i,r):t.setAttribute(i,r));"name"===i&&s.a.Yc(t,f?"":r)})}},function(){s.c.checked={after:["value","attr"],init:function(t,i,r){function l(){var v=t.checked,h=f(),l,y,p;s.S.Ya()||!v&&(o||s.S.qa())||(l=s.u.G(i),u?(y=a?l.v():l,p=c,c=h,p!==h?v&&(s.a.Na(y,h,!0),s.a.Na(y,p,!1)):s.a.Na(y,h,v),a&&s.Za(l)&&l(y)):(e&&(h===n?h=v:v||(h=n)),s.m.eb(l,r,"checked",h,!0)))}function v(){var r=s.a.f(i()),o=f();u?(t.checked=0<=s.a.A(r,o),c=o):t.checked=e&&o===n?!!r:f()===r}var f=s.xb(function(){return r.has("checkedValue")?s.a.f(r.get("checkedValue")):y?r.has("value")?s.a.f(r.get("value")):t.value:void 0}),e="checkbox"==t.type,o="radio"==t.type;if(e||o){var h=i(),u=e&&s.a.f(h)instanceof Array,a=!(u&&h.push&&h.splice),y=o||u,c=u?f():n;o&&!t.name&&s.c.uniqueName.init(t,function(){return!0});s.o(l,null,{l:t});s.a.B(t,"click",l);s.o(v,null,{l:t});h=n}}};s.m.wa.checked=!0;s.c.checkedValue={update:function(n,t){n.value=s.a.f(t())}}}();s.c["class"]={update:function(n,t){var i=s.a.Db(s.a.f(t()));s.a.Eb(n,n.__ko__cssValue,!1);n.__ko__cssValue=i;s.a.Eb(n,i,!0)}};s.c.css={update:function(n,t){var i=s.a.f(t());null!==i&&"object"==typeof i?s.a.P(i,function(t,i){i=s.a.f(i);s.a.Eb(n,t,i)}):s.c["class"].update(n,t)}};s.c.enable={update:function(n,t){var i=s.a.f(t());i&&n.disabled?n.removeAttribute("disabled"):i||n.disabled||(n.disabled=!0)}};s.c.disable={update:function(n,t){s.c.enable.update(n,function(){return!s.a.f(t())})}};s.c.event={init:function(n,t,i,r,u){var f=t()||{};s.a.P(f,function(f){"string"==typeof f&&s.a.B(n,f,function(n){var o,h=t()[f],e;if(h){try{e=s.a.la(arguments);r=u.$data;e.unshift(r);o=h.apply(r,e)}finally{!0!==o&&(n.preventDefault?n.preventDefault():n.returnValue=!1)}!1===i.get(f+"Bubble")&&(n.cancelBubble=!0,n.stopPropagation&&n.stopPropagation())}})})}};s.c.foreach={Rc:function(n){return function(){var i=n(),t=s.a.bc(i);return!t||"number"==typeof t.length?{foreach:i,templateEngine:s.ba.Ma}:(s.a.f(i),{foreach:t.data,as:t.as,noChildContext:t.noChildContext,includeDestroyed:t.includeDestroyed,afterAdd:t.afterAdd,beforeRemove:t.beforeRemove,afterRender:t.afterRender,beforeMove:t.beforeMove,afterMove:t.afterMove,templateEngine:s.ba.Ma})}},init:function(n,t){return s.c.template.init(n,s.c.foreach.Rc(t))},update:function(n,t,i,r,u){return s.c.template.update(n,s.c.foreach.Rc(t),i,r,u)}};s.m.Ra.foreach=!1;s.h.ea.foreach=!0;s.c.hasfocus={init:function(n,t,i){function r(r){var u,f;if(n.__ko_hasfocusUpdating=!0,u=n.ownerDocument,"activeElement"in u){try{f=u.activeElement}catch(e){f=u.body}r=f===n}u=t();s.m.eb(u,i,"hasfocus",r,!0);n.__ko_hasfocusLastValue=r;n.__ko_hasfocusUpdating=!1}var u=r.bind(null,!0),f=r.bind(null,!1);s.a.B(n,"focus",u);s.a.B(n,"focusin",u);s.a.B(n,"blur",f);s.a.B(n,"focusout",f);n.__ko_hasfocusLastValue=!1},update:function(n,t){var i=!!s.a.f(t());n.__ko_hasfocusUpdating||n.__ko_hasfocusLastValue===i||(i?n.focus():n.blur(),!i&&n.__ko_hasfocusLastValue&&n.ownerDocument.body.focus(),s.u.G(s.a.Fb,null,[n,i?"focusin":"focusout"]))}};s.m.wa.hasfocus=!0;s.c.hasFocus=s.c.hasfocus;s.m.wa.hasFocus="hasfocus";s.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(n,t){s.a.fc(n,t())}},function(){function n(n,t,i){s.c[n]={init:function(n,r,u,f,e){var a,c,o={},v,y,h,l;return t&&(f=u.get("as"),l=u.get("noChildContext"),h=!(f&&l),o={as:f,noChildContext:l,exportDependencies:h}),y=(v="render"==u.get("completeOn"))||u.has(s.i.pa),s.o(function(){var f=s.a.f(r()),u=!i!=!f,l=!c,p;(h||u!==a)&&(y&&(e=s.i.Cb(n,e)),u&&((!t||h)&&(o.dataDependency=s.S.o()),p=t?e.createChildContext("function"==typeof f?f:r,o):s.S.qa()?e.extend(null,o):e),l&&s.S.qa()&&(c=s.a.Ca(s.h.childNodes(n),!0)),u?(l||s.h.va(n,s.a.Ca(c)),s.Oa(p,n)):(s.h.Ea(n),v||s.i.ma(n,s.i.H)),a=u)},null,{l:n}),{controlsDescendantBindings:!0}}};s.m.Ra[n]=!1;s.h.ea[n]=!0}n("if");n("ifnot",!1,!0);n("with",!0)}();s.c.let={init:function(n,t,i,r,u){return t=u.extend(t),s.Oa(t,n),{controlsDescendantBindings:!0}}};s.h.ea.let=!0;w={};s.c.options={init:function(n){if("select"!==s.a.R(n))throw Error("options binding applies only to SELECT elements");for(;0<n.length;)n.remove(0);return{controlsDescendantBindings:!0}},update:function(t,i,r){function a(){return s.a.jb(t.options,function(n){return n.selected})}function v(n,t,i){var r=typeof t;return"function"==r?t(n):"string"==r?n[t]:i}function y(n,i){if(o&&e)s.i.ma(t,s.i.H);else if(f.length){var r=0<=s.a.A(f,s.w.M(i[0]));s.a.Zc(i[0],r);o&&!r&&s.u.G(s.a.Fb,null,[t,"change"])}}var h=t.multiple,c=0!=t.length&&h?t.scrollTop:null,u=s.a.f(i()),e=r.get("valueAllowUnset")&&r.has("value"),b=r.get("optionsIncludeDestroyed"),l,f,o,p;i={};f=[];e||(h?f=s.a.Mb(a(),s.w.M):0<=t.selectedIndex&&f.push(s.w.M(t.options[t.selectedIndex])));u&&("undefined"==typeof u.length&&(u=[u]),l=s.a.jb(u,function(t){return b||t===n||null===t||!s.a.f(t._destroy)}),r.has("optionsCaption")&&(u=s.a.f(r.get("optionsCaption")),null!==u&&u!==n&&l.unshift(w)));o=!1;i.beforeRemove=function(n){t.removeChild(n)};u=y;r.has("optionsAfterRender")&&"function"==typeof r.get("optionsAfterRender")&&(u=function(t,i){y(0,i);s.u.G(r.get("optionsAfterRender"),null,[i[0],t!==w?t:n])});s.a.ec(t,l,function(i,u,h){return h.length&&(f=!e&&h[0].selected?[s.w.M(h[0])]:[],o=!0),u=t.ownerDocument.createElement("option"),i===w?(s.a.Bb(u,r.get("optionsCaption")),s.w.cb(u,n)):(h=v(i,r.get("optionsValue"),i),s.w.cb(u,s.a.f(h)),i=v(i,r.get("optionsText"),h),s.a.Bb(u,i)),[u]},i,u);e||(p=h?f.length&&a().length<f.length:f.length&&0<=t.selectedIndex?s.w.M(t.options[t.selectedIndex])!==f[0]:f.length||0<=t.selectedIndex,p&&s.u.G(s.a.Fb,null,[t,"change"]));(e||s.S.Ya())&&s.i.ma(t,s.i.H);s.a.wd(t);c&&20<Math.abs(c-t.scrollTop)&&(t.scrollTop=c)}};s.c.options.$b=s.a.g.Z();s.c.selectedOptions={init:function(n,t,i){function r(){var u=t(),r=[];s.a.D(n.getElementsByTagName("option"),function(n){n.selected&&r.push(s.w.M(n))});s.m.eb(u,i,"selectedOptions",r)}function f(){var i=s.a.f(t()),r=n.scrollTop;i&&"number"==typeof i.length&&s.a.D(n.getElementsByTagName("option"),function(n){var t=0<=s.a.A(i,s.w.M(n));n.selected!=t&&s.a.Zc(n,t)});n.scrollTop=r}if("select"!=s.a.R(n))throw Error("selectedOptions binding applies only to SELECT elements");var u;s.i.subscribe(n,s.i.H,function(){u?r():(s.a.B(n,"change",r),u=s.o(f,null,{l:n}))},null,{notifyImmediately:!0})},update:function(){}};s.m.wa.selectedOptions=!0;s.c.style={update:function(i,r){var u=s.a.f(r()||{});s.a.P(u,function(r,u){if(u=s.a.f(u),(null===u||u===n||!1===u)&&(u=""),t)t(i).css(r,u);else if(/^--/.test(r))i.style.setProperty(r,u);else{r=r.replace(/-(\w)/g,function(n,t){return t.toUpperCase()});var f=i.style[r];i.style[r]=u;u===f||i.style[r]!=f||isNaN(u)||(i.style[r]=u+"px")}})}};s.c.submit={init:function(n,t,i,r,u){if("function"!=typeof t())throw Error("The value for a submit binding must be a function");s.a.B(n,"submit",function(i){var r,f=t();try{r=f.call(u.$data,n)}finally{!0!==r&&(i.preventDefault?i.preventDefault():i.returnValue=!1)}})}};s.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(n,t){s.a.Bb(n,t())}};s.h.ea.text=!0,function(){var i,u,f,e,o,t,h;if(r&&r.navigator&&(i=function(n){if(n)return parseFloat(n[1])},u=r.navigator.userAgent,(f=r.opera&&r.opera.version&&parseInt(r.opera.version()))||(h=i(u.match(/Edge\/([^ ]+)$/)))||i(u.match(/Chrome\/([^ ]+)/))||(e=i(u.match(/Version\/([^ ]+) Safari/)))||(o=i(u.match(/Firefox\/([^ ]+)/)))||(t=s.a.W||i(u.match(/MSIE ([^ ]+)/)))||(t=i(u.match(/rv:([^ )]+)/)))),8<=t&&10>t)var c=s.a.g.Z(),l=s.a.g.Z(),v=function(n){var t=this.activeElement;(t=t&&s.a.g.get(t,l))&&t(n)},a=function(n,t){var i=n.ownerDocument;s.a.g.get(i,c)||(s.a.g.set(i,c,!0),s.a.B(i,"selectionchange",v));s.a.g.set(n,l,t)};s.c.textInput={init:function(i,r,u){function c(n,t){s.a.B(i,n,t)}function d(){var t=s.a.f(r());(null===t||t===n)&&(t="");p!==n&&t===p?s.a.setTimeout(d,4):i.value!==t&&(k=!0,i.value=t,k=!1,w=i.value)}function v(){y||(p=i.value,y=s.a.setTimeout(l,4))}function l(){clearTimeout(y);p=y=n;var t=i.value;w!==t&&(w=t,s.m.eb(r(),u,"textInput",t))}var w=i.value,y,p,b=9==s.a.W?v:l,k=!1;t&&c("keypress",l);11>t&&c("propertychange",function(n){k||"value"!==n.propertyName||b(n)});8==t&&(c("keyup",l),c("keydown",l));a&&(a(i,b),c("dragend",v));(!t||9<=t)&&c("input",b);5>e&&"textarea"===s.a.R(i)?(c("keydown",v),c("paste",v),c("cut",v)):11>f?c("keydown",v):4>o?(c("DOMAutoComplete",l),c("dragdrop",l),c("drop",l)):h&&"number"===i.type&&c("keydown",v);c("change",l);c("blur",l);s.o(d,null,{l:i})}};s.m.wa.textInput=!0;s.c.textinput={preprocess:function(n,t,i){i("textInput",n)}}}();s.c.uniqueName={init:function(n,t){if(t()){var i="ko_unique_"+ ++s.c.uniqueName.rd;s.a.Yc(n,i)}}};s.c.uniqueName.rd=0;s.c.using={init:function(n,t,i,r,u){var f;return i.has("as")&&(f={as:i.get("as"),noChildContext:i.get("noChildContext")}),t=u.createChildContext(t,f),s.Oa(t,n),{controlsDescendantBindings:!0}}};s.h.ea.using=!0;s.c.value={init:function(t,i,r){var l=s.a.R(t),a="input"==l,u,f,v;if(a&&("checkbox"==t.type||"radio"==t.type))s.ib(t,{checkedValue:i});else{var e=[],o=r.get("valueUpdate"),h=!1,c=null;o&&(e="string"==typeof o?[o]:s.a.wc(o),s.a.Pa(e,"change"));u=function(){c=null;h=!1;var n=i(),u=s.w.M(t);s.m.eb(n,r,"value",u)};s.a.W&&a&&"text"==t.type&&"off"!=t.autocomplete&&(!t.form||"off"!=t.form.autocomplete)&&-1==s.a.A(e,"propertychange")&&(s.a.B(t,"propertychange",function(){h=!0}),s.a.B(t,"focus",function(){h=!1}),s.a.B(t,"blur",function(){h&&u()}));s.a.D(e,function(n){var i=u;s.a.Ud(n,"after")&&(i=function(){c=s.w.M(t);s.a.setTimeout(u,0)},n=n.substring(5));s.a.B(t,n,i)});f=a&&"file"==t.type?function(){var r=s.a.f(i());null===r||r===n||""===r?t.value="":s.u.G(u)}:function(){var e=s.a.f(i()),o=s.w.M(t);null!==c&&e===c?s.a.setTimeout(f,0):(e!==o||o===n)&&("select"===l?(o=r.get("valueAllowUnset"),s.w.cb(t,e,o),o||e===s.w.M(t)||s.u.G(u)):s.w.cb(t,e))};"select"===l?s.i.subscribe(t,s.i.H,function(){v?r.get("valueAllowUnset")?f():u():(s.a.B(t,"change",u),v=s.o(f,null,{l:t}))},null,{notifyImmediately:!0}):(s.a.B(t,"change",u),s.o(f,null,{l:t}))}},update:function(){}};s.m.wa.value=!0;s.c.visible={update:function(n,t){var i=s.a.f(t()),r="none"!=n.style.display;i&&!r?n.style.display="":!i&&r&&(n.style.display="none")}};s.c.hidden={update:function(n,t){s.c.visible.update(n,function(){return!s.a.f(t())})}},function(n){s.c[n]={init:function(t,i,r,u,f){return s.c.event.init.call(this,t,function(){var t={};return t[n]=i(),t},r,u,f)}}}("click");s.ca=function(){};s.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource");};s.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock");};s.ca.prototype.makeTemplateSource=function(n,t){if("string"==typeof n){t=t||i;var r=t.getElementById(n);if(!r)throw Error("Cannot find template with ID "+n);return new s.C.F(r)}if(1==n.nodeType||8==n.nodeType)return new s.C.ia(n);throw Error("Unknown template type: "+n);};s.ca.prototype.renderTemplate=function(n,t,i,r){return n=this.makeTemplateSource(n,r),this.renderTemplateSource(n,t,i,r)};s.ca.prototype.isTemplateRewritten=function(n,t){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(n,t).data("isRewritten")};s.ca.prototype.rewriteTemplate=function(n,t,i){n=this.makeTemplateSource(n,i);t=t(n.text());n.text(t);n.data("isRewritten",!0)};s.b("templateEngine",s.ca);s.kc=function(){function n(n,t,i,r){var o,f,u,e;for(n=s.m.ac(n),o=s.m.Ra,f=0;f<n.length;f++)if(u=n[f].key,Object.prototype.hasOwnProperty.call(o,u))if(e=o[u],"function"==typeof e){if(u=e(n[f].value))throw Error(u);}else if(!e)throw Error("This template engine does not support the '"+u+"' binding within its templates");return i="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+s.m.vb(n,{valueAccessors:!0})+" } })()},'"+i.toLowerCase()+"')",r.createJavaScriptEvaluatorBlock(i)+t}var t=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,i=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(n,t,i){t.isTemplateRewritten(n,i)||t.rewriteTemplate(n,function(n){return s.kc.Ld(n,t)},i)},Ld:function(r,u){return r.replace(t,function(t,i,r,f,e){return n(e,i,r,u)}).replace(i,function(t,i){return n(i,"<!-- ko -->","#comment",u)})},md:function(n,t){return s.aa.Xb(function(i,r){var u=i.nextSibling;u&&u.nodeName.toLowerCase()===t&&s.ib(u,n,r)})}}}();s.b("__tr_ambtns",s.kc.md),function(){var i,t;s.C={};s.C.F=function(n){if(this.F=n){var t=s.a.R(n);this.ab="script"===t?1:"textarea"===t?2:"template"==t&&n.content&&11===n.content.nodeType?3:4}};s.C.F.prototype.text=function(){var n=1===this.ab?"text":2===this.ab?"value":"innerHTML",t;if(0==arguments.length)return this.F[n];t=arguments[0];"innerHTML"===n?s.a.fc(this.F,t):this.F[n]=t};i=s.a.g.Z()+"_";s.C.F.prototype.data=function(n){if(1===arguments.length)return s.a.g.get(this.F,i+n);s.a.g.set(this.F,i+n,arguments[1])};t=s.a.g.Z();s.C.F.prototype.nodes=function(){var i=this.F,r,u,f;if(0==arguments.length)return r=s.a.g.get(i,t)||{},u=r.lb||(3===this.ab?i.content:4===this.ab?i:n),(!u||r.jd)&&(f=this.text(),f&&f!==r.bb&&(u=s.a.Md(f,i.ownerDocument),s.a.g.set(i,t,{lb:u,bb:f,jd:!0}))),u;r=arguments[0];this.ab!==n&&this.text("");s.a.g.set(i,t,{lb:r})};s.C.ia=function(n){this.F=n};s.C.ia.prototype=new s.C.F;s.C.ia.prototype.constructor=s.C.ia;s.C.ia.prototype.text=function(){if(0==arguments.length){var i=s.a.g.get(this.F,t)||{};return i.bb===n&&i.lb&&(i.bb=i.lb.innerHTML),i.bb}s.a.g.set(this.F,t,{bb:arguments[0]})};s.b("templateSources",s.C);s.b("templateSources.domElement",s.C.F);s.b("templateSources.anonymousTemplate",s.C.ia)}(),function(){function t(n,t,i){var r;for(t=s.h.nextSibling(t);n&&(r=n)!==t;)n=s.h.nextSibling(r),i(r,n)}function e(n,i){if(n.length){var r=n[0],u=n[n.length-1],f=r.parentNode,e=s.ga.instance,o=e.preprocessNode;if(o){if(t(r,u,function(n,t){var f=n.previousSibling,i=o.call(e,n);i&&(n===r&&(r=i[0]||t),n===u&&(u=i[i.length-1]||f))}),n.length=0,!r)return;r===u?n.push(r):(n.push(r,u),s.a.Ua(n,f))}t(r,u,function(n){1!==n.nodeType&&8!==n.nodeType||s.vc(i,n)});t(r,u,function(n){1!==n.nodeType&&8!==n.nodeType||s.aa.cd(n,[i])});s.a.Ua(n,f)}}function i(n){return n.nodeType?n:0<n.length?n[0]:null}function o(n,t,u,f,o){o=o||{};var h=(n&&i(n)||u||{}).ownerDocument,c=o.templateEngine||r;if(s.kc.xd(u,c,h),u=c.renderTemplate(u,f,o,h),"number"!=typeof u.length||0<u.length&&"number"!=typeof u[0].nodeType)throw Error("Template engine must return an array of DOM nodes");h=!1;switch(t){case"replaceChildren":s.h.va(n,u);h=!0;break;case"replaceNode":s.a.Xc(n,u);h=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+t);}return h&&(e(u,f),o.afterRender&&s.u.G(o.afterRender,null,[u,f[o.as||"$data"]]),"replaceChildren"==t&&s.i.ma(n,s.i.H)),u}function h(n,t,i){return s.O(n)?n():"function"==typeof n?n(t,i):n}var r,u,f;s.gc=function(t){if(t!=n&&!(t instanceof s.ca))throw Error("templateEngine must inherit from ko.templateEngine");r=t};s.dc=function(t,u,f,e,c){if(f=f||{},(f.templateEngine||r)==n)throw Error("Set a template engine before calling renderTemplate");if(c=c||"replaceChildren",e){var l=i(e);return s.$(function(){var n=u&&u instanceof s.fa?u:new s.fa(u,null,null,null,{exportDependencies:!0}),r=h(t,n.$data,n),n=o(e,c,r,n,f);"replaceNode"==c&&(e=n,l=i(e))},null,{Sa:function(){return!l||!s.a.Sb(l)},l:l&&"replaceNode"==c?l.parentNode:l})}return s.aa.Xb(function(n){s.dc(t,u,f,n,"replaceNode")})};s.Qd=function(t,i,r,u,f){function l(n,t){s.u.G(s.a.ec,null,[u,n,w,r,p,t]);s.i.ma(u,s.i.H)}function p(n,t){e(t,c);r.afterRender&&r.afterRender(t,n);c=null}function w(n,i){c=f.createChildContext(n,{as:a,noChildContext:r.noChildContext,extend:function(n){n.$index=i;a&&(n[a+"Index"]=i)}});var e=h(t,n,c);return o(u,"ignoreTargetNode",e,c,r)}var c,a=r.as,y=!1===r.includeDestroyed||s.options.foreachHidesDestroyed&&!r.includeDestroyed,v;return y||r.beforeRemove||!s.Pc(i)?s.$(function(){var t=s.a.f(i)||[];"undefined"==typeof t.length&&(t=[t]);y&&(t=s.a.jb(t,function(t){return t===n||null===t||!s.a.f(t._destroy)}));l(t)},null,{l:u}):(l(i.v()),v=i.subscribe(function(n){l(i(),n)},null,"arrayChange"),v.l(u),v)};u=s.a.g.Z();f=s.a.g.Z();s.c.template={init:function(n,t){var i=s.a.f(t()),r;if("string"==typeof i||"name"in i)s.h.Ea(n);else if("nodes"in i){if(i=i.nodes||[],s.O(i))throw Error('The "nodes" option must be a plain, non-observable array.');r=i[0]&&i[0].parentNode;r&&s.a.g.get(r,f)||(r=s.a.Yb(i),s.a.g.set(r,f,!0));new s.C.ia(n).nodes(r)}else if(i=s.h.childNodes(n),0<i.length)r=s.a.Yb(i),new s.C.ia(n).nodes(r);else throw Error("Anonymous template defined, but no template content was provided");return{controlsDescendantBindings:!0}},update:function(t,i,r,f,e){var o=i();i=s.a.f(o);r=!0;f=null;"string"==typeof i?i={}:(o="name"in i?i.name:t,"if"in i&&(r=s.a.f(i["if"])),r&&"ifnot"in i&&(r=!s.a.f(i.ifnot)),r&&!o&&(r=!1));"foreach"in i?f=s.Qd(o,r&&i.foreach||[],i,t,e):r?(r=e,"data"in i&&(r=e.createChildContext(i.data,{as:i.as,noChildContext:i.noChildContext,exportDependencies:!0})),f=s.dc(o,r,i,t)):s.h.Ea(t);e=f;(i=s.a.g.get(t,u))&&"function"==typeof i.s&&i.s();s.a.g.set(t,u,!e||e.ja&&!e.ja()?n:e)}};s.m.Ra.template=function(n){return n=s.m.ac(n),1==n.length&&n[0].unknown||s.m.Id(n,"name")?null:"This template engine does not support anonymous templates nested within its templates"};s.h.ea.template=!0}();s.b("setTemplateEngine",s.gc);s.b("renderTemplate",s.dc);s.a.Kc=function(n,t,i){if(n.length&&t.length)for(var o,r,f,e,u=o=0;(!i||u<i)&&(f=n[o]);++o){for(r=0;e=t[r];++r)if(f.value===e.value){f.moved=e.index;e.moved=f.index;t.splice(r,1);u=r=0;break}u+=r}};s.a.Pb=function(){function n(n,t,i,r,u){for(var o=Math.min,l=Math.max,a=[],c=n.length,f,h=t.length,v=h-c||1,w=c+h+1,y,p,b,e=0;e<=c;e++)for(p=y,a.push(y=[]),b=o(h,e+v),f=l(0,e-1);f<=b;f++)y[f]=f?e?n[e-1]===t[f-1]?p[f-1]:o(p[f]||w,y[f-1]||w)+1:f+1:e+1;for(o=[],l=[],v=[],e=c,f=h;e||f;)h=a[e][f]-1,f&&h===a[e][f-1]?l.push(o[o.length]={status:i,value:t[--f],index:f}):e&&h===a[e-1][f]?v.push(o[o.length]={status:r,value:n[--e],index:e}):(--f,--e,u.sparse||o.push({status:"retained",value:t[f]}));return s.a.Kc(v,l,!u.dontLimitMoves&&10*c),o.reverse()}return function(t,i,r){return r="boolean"==typeof r?{dontLimitMoves:r}:r||{},t=t||[],i=i||[],t.length<i.length?n(t,i,"added","deleted",r):n(i,t,"deleted","added",r)}}();s.b("utils.compareArrays",s.a.Pb),function(){function r(t,i,r,u,f){var e=[],o=s.$(function(){var n=i(r,f,s.a.Ua(e,t))||[];0<e.length&&(s.a.Xc(e,n),u&&s.u.G(u,null,[r,n,f]));e.length=0;s.a.Nb(e,n)},null,{l:t,Sa:function(){return!s.a.kd(e)}});return{Y:e,$:o.ja()?o:n}}var t=s.a.g.Z(),i=s.a.g.Z();s.a.ec=function(u,f,e,o,h,c){function st(n){l={Aa:n,pb:s.ta(b++)};y.push(l);ht||ct.push(l)}function d(n){l=w[n];b!==l.pb.v()&&et.push(l);l.pb(b++);s.a.Ua(l.Y,u);y.push(l)}function g(n,t){if(n)for(var i=0,r=t.length;i<r;i++)s.a.D(t[i].Y,function(r){n(r,i,t[i].Aa)})}var a,k,tt,ot,p,it,rt;f=f||[];"undefined"==typeof f.length&&(f=[f]);o=o||{};var w=s.a.g.get(u,t),ht=!w,y=[],v=0,b=0,ut=[],ft=[],nt=[],et=[],ct=[],l,lt=0;if(ht)s.a.D(f,st);else{for((!c||w&&w._countWaitingForRemove)&&(a=s.a.Mb(w,function(n){return n.Aa}),c=s.a.Pb(a,f,{dontLimitMoves:o.dontLimitMoves,sparse:!0})),a=0;k=c[a];a++)switch(tt=k.moved,ot=k.index,k.status){case"deleted":for(;v<ot;)d(v++);tt===n&&(l=w[v],l.$&&(l.$.s(),l.$=n),s.a.Ua(l.Y,u).length&&(o.beforeRemove&&(y.push(l),lt++,l.Aa===i?l=null:nt.push(l)),l&&ut.push.apply(ut,l.Y)));v++;break;case"added":for(;b<ot;)d(v++);tt!==n?(ft.push(y.length),d(tt)):st(k.value)}for(;b<f.length;)d(v++);y._countWaitingForRemove=lt}s.a.g.set(u,t,y);g(o.beforeMove,et);s.a.D(ut,o.beforeRemove?s.oa:s.removeNode);try{rt=u.ownerDocument.activeElement}catch(at){}if(ft.length)for(;(a=ft.shift())!=n;){for(l=y[a],p=n;a;)if((it=y[--a].Y)&&it.length){p=it[it.length-1];break}for(f=0;v=l.Y[f];p=v,f++)s.h.Wb(u,v,p)}for(a=0;l=y[a];a++){for(l.Y||s.a.extend(l,r(u,e,l.Aa,h,l.pb)),f=0;v=l.Y[f];p=v,f++)s.h.Wb(u,v,p);!l.Ed&&h&&(h(l.Aa,l.Y,l.pb),l.Ed=!0,p=l.Y[l.Y.length-1])}for(rt&&u.ownerDocument.activeElement!=rt&&rt.focus(),g(o.beforeRemove,nt),a=0;a<nt.length;++a)nt[a].Aa=i;g(o.afterMove,et);g(o.afterAdd,ct)}}();s.b("utils.setDomNodeChildrenFromArrayMapping",s.a.ec);s.ba=function(){this.allowTemplateRewriting=!1};s.ba.prototype=new s.ca;s.ba.prototype.constructor=s.ba;s.ba.prototype.renderTemplateSource=function(n,t,i,r){return(t=(9>s.a.W?0:n.nodes)?n.nodes():null)?s.a.la(t.cloneNode(!0).childNodes):(n=n.text(),s.a.ua(n,r))};s.ba.Ma=new s.ba;s.gc(s.ba.Ma);s.b("nativeTemplateEngine",s.ba),function(){s.$a=function(){var n=this.Hd=function(){if(!t||!t.tmpl)return 0;try{if(0<=t.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(n){}return 1}();this.renderTemplateSource=function(r,u,f,e){if(e=e||i,f=f||{},2>n)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var o=r.data("precompiled");return o||(o=r.text()||"",o=t.template(null,"{{ko_with $item.koBindingContext}}"+o+"{{/ko_with}}"),r.data("precompiled",o)),r=[u.$data],u=t.extend({koBindingContext:u},f.templateOptions),u=t.tmpl(o,r,u),u.appendTo(e.createElement("div")),t.fragments={},u};this.createJavaScriptEvaluatorBlock=function(n){return"{{ko_code ((function() { return "+n+" })()) }}"};this.addTemplate=function(n,t){i.write("<script type='text/html' id='"+n+"'>"+t+"<\/script>")};0<n&&(t.tmpl.tag.ko_code={open:"__.push($1 || '');"},t.tmpl.tag.ko_with={open:"with($1) {",close:"} "})};s.$a.prototype=new s.ca;s.$a.prototype.constructor=s.$a;var n=new s.$a;0<n.Hd&&s.gc(n);s.b("jqueryTmplTemplateEngine",s.$a)}()})})()}();ko.bindingHandlers.money={update:function(n,t){var i=ko.utils.unwrapObservable(t()),r=Common.Helper.getFormatedMoney(i);$(n).text(r)}};ko.bindingHandlers.kosIcon={update:function(n,t){var i=ko.utils.unwrapObservable(t());$(n).addClass("kos");$(n).addClass("icon_"+i)}};ko.bindingHandlers.skipChilds={init:function(n,t){var i=ko.utils.unwrapObservable(t());return{controlsDescendantBindings:i}}};ko.bindingHandlers.grColsText={update:function(n,t,i){var u=ko.utils.unwrapObservable(t()),r=i().count;r!=undefined&&r>1?$(n).text(r+" x "+Translation.getTextId("text columns").Format(u,1)):$(n).text(Translation.getTextId("text columns").Format(u,1))}};ko.bindingHandlers.grPossibleWin={update:function(n,t,i){var r=Common.Application.instance.license,e=ko.utils.unwrapObservable(t()),u=e.stake(),f;u==null?$(n).text(r.formatAmount(0)):(f=i().quote,r.showTotalWin?$(n).text(r.formatAmount(e.betSlip().calculateWin(u,f))):$(n).text(r.formatAmount(u*f)))}};ko.bindingHandlers.disabled={update:function(n,t){ko.utils.unwrapObservable(t())?n.setAttribute("disabled",!0):n.removeAttribute("disabled")}};ko.bindingHandlers.cssClass={update:function(n,t){n.__ko__previousClassValue__&&$(n).removeClass(n.__ko__previousClassValue__);var i=ko.utils.unwrapObservable(t());$(n).addClass(i);n.__ko__previousClassValue__=i}};ko.pauseableComputed=function(n,t){var r="",u=ko.observable(!1),i=ko.computed(function(){return u()?r:n.call(t)},t);return i.pause=function(){r=this();u(!0)}.bind(i),i.resume=function(){r="";u(!1)},i};!function(n){"use strict";function f(n,t,i){"addEventListener"in window?n.addEventListener(t,i,!1):"attachEvent"in window&&n.attachEvent("on"+t,i)}function vt(n,t,i){"removeEventListener"in window?n.removeEventListener(t,i,!1):"detachEvent"in window&&n.detachEvent("on"+t,i)}function yt(){for(var t=["moz","webkit","o","ms"],n=0;n<t.length&&!o;n+=1)o=window[t[n]+"RequestAnimationFrame"];o||i("setup","RequestAnimationFrame not supported")}function pt(n){var t="Host page: "+n;return window.top!==window.self&&(t=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+n:"Nested host page: "+n),t}function wt(n){return h+"["+pt(n)+"]"}function k(n){return t[n]?t[n].log:lt}function i(n,t){l("log",n,t,k(n))}function d(n,t){l("info",n,t,k(n))}function e(n,t){l("warn",n,t,!0)}function l(n,t,i,r){!0===r&&"object"==typeof console&&console[n](wt(t),i)}function bt(n){function y(){function n(){ut(c);tt(o);v("resizedCallback",c)}w("Height");w("Width");ft(n,c,"init")}function lt(){var n=l.substr(p).split(":");return{iframe:t[n[0]]&&t[n[0]].iframe,id:n[0],height:n[1],width:n[2],type:n[3]}}function w(n){var f=Number(t[o]["max"+n]),e=Number(t[o]["min"+n]),r=n.toLowerCase(),u=Number(c[r]);i(o,"Checking "+r+" is in range "+e+"-"+f);e>u&&(u=e,i(o,"Set "+r+" to min value"));u>f&&(u=f,i(o,"Set "+r+" to max value"));c[r]=""+u}function at(){function f(){function n(){var n=0,t=!1;for(i(o,"Checking connection is from allowed list of origins: "+r);n<r.length;n++)if(r[n]===u){t=!0;break}return t}function f(){var n=t[o]&&t[o].remoteHost;return i(o,"Checking connection is from: "+n),u===n}return r.constructor===Array?n():f()}var u=n.origin,r=t[o]&&t[o].checkOrigin;if(r&&""+u!="null"&&!f())throw new Error("Unexpected message received from: "+u+" for "+c.iframe.id+". Message was: "+n.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}function yt(){return h===(""+l).substr(0,p)&&l.substr(p).split(":")[0]in t}function pt(){var n=c.type in{"true":1,"false":1,undefined:1};return n&&i(o,"Ignoring init message from meta parent page"),n}function k(n){return l.substr(l.indexOf(":")+ni+n)}function wt(n){i(o,"MessageCallback passed: {iframe: "+c.iframe.id+", message: "+n+"}");v("messageCallback",{iframe:c.iframe,message:JSON.parse(n)});i(o,"--")}function bt(){var t=document.body.getBoundingClientRect(),n=c.iframe.getBoundingClientRect();return JSON.stringify({iframeHeight:n.height,iframeWidth:n.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(n.top-t.top,10),offsetLeft:parseInt(n.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset})}function ot(n,t){function i(){u("Send Page Info","pageInfo:"+bt(),n,t)}s(i,32)}function kt(){function r(r,f){function e(){t[n]?ot(t[n].iframe,n):u()}["scroll","resize"].forEach(function(t){i(n,r+t+" listener for sendPageInfo");f(window,t,e)})}function u(){r("Remove ",vt)}function e(){r("Add ",f)}var n=o;e();t[n]&&(t[n].stopPageInfo=u)}function dt(){t[o]&&t[o].stopPageInfo&&(t[o].stopPageInfo(),delete t[o].stopPageInfo)}function gt(){var n=!0;return null===c.iframe&&(e(o,"IFrame ("+c.id+") not found"),n=!1),n}function st(n){var t=n.getBoundingClientRect();return nt(o),{x:Math.floor(Number(t.left)+Number(r.x)),y:Math.floor(Number(t.top)+Number(r.y))}}function ht(n){function f(){r=u;ct();i(o,"--")}function s(){return{x:Number(c.width)+t.x,y:Number(c.height)+t.y}}function h(){window.parentIFrame?window.parentIFrame["scrollTo"+(n?"Offset":"")](u.x,u.y):e(o,"Unable to scroll to requested position, window.parentIFrame not found")}var t=n?st(c.iframe):{x:0,y:0},u=s();i(o,"Reposition requested from iFrame (offset x:"+t.x+" y:"+t.y+")");window.top!==window.self?h():f()}function ct(){!1!==v("scrollCallback",r)?tt(o):it()}function ti(n){function e(){var n=st(f);i(o,"Moving to in page link (#"+t+") at x: "+n.x+" y: "+n.y);r={x:n.x,y:n.y};ct();i(o,"--")}function s(){window.parentIFrame?window.parentIFrame.moveToAnchor(t):i(o,"In page link #"+t+" not found and window.parentIFrame not found")}var t=n.split("#")[1]||"",u=decodeURIComponent(t),f=document.getElementById(u)||document.getElementsByName(u)[0];f?e():window.top!==window.self?s():i(o,"In page link #"+t+" not found")}function v(n,t){return a(o,n,t)}function ii(){switch(t[o]&&t[o].firstRun&&fi(),c.type){case"close":t[o].closeRequestCallback?a(o,"closeRequestCallback",t[o].iframe):g(c.iframe);break;case"message":wt(k(6));break;case"scrollTo":ht(!1);break;case"scrollToOffset":ht(!0);break;case"pageInfo":ot(t[o]&&t[o].iframe,o);kt();break;case"pageInfoStop":dt();break;case"inPageLink":ti(k(9));break;case"reset":rt(c);break;case"init":y();v("initCallback",c.iframe);break;default:y()}}function ri(n){var i=!0;return t[n]||(i=!1,e(c.type+" No settings for "+n+". Message was: "+l)),i}function ui(){for(var n in t)u("iFrame requested init",et(n),document.getElementById(n),n)}function fi(){t[o]&&(t[o].firstRun=!1)}var l=n.data,c={},o=null;"[iFrameResizerChild]Ready"===l?ui():yt()?(c=lt(),o=b=c.id,t[o]&&(t[o].loaded=!0),!pt()&&ri(o)&&(i(o,"Received: "+l),gt()&&at()&&ii())):d(o,"Ignored: "+l)}function a(n,i,r){var u=null,f=null;if(t[n]){if(u=t[n][i],"function"!=typeof u)throw new TypeError(i+" on iFrame["+n+"] is not a function");f=u(r)}return f}function g(n){var r=n.id;i(r,"Removing iFrame: "+r);n.parentNode&&n.parentNode.removeChild(n);a(r,"closedCallback",r);i(r,"--");delete t[r]}function nt(t){null===r&&(r={x:window.pageXOffset!==n?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==n?window.pageYOffset:document.documentElement.scrollTop},i(t,"Get page position: "+r.x+","+r.y))}function tt(n){null!==r&&(window.scrollTo(r.x,r.y),i(n,"Set page position: "+r.x+","+r.y),it())}function it(){r=null}function rt(n){function t(){ut(n);u("reset","reset",n.iframe,n.id)}i(n.id,"Size reset requested by "+("init"===n.type?"host page":"iFrame"));nt(n.id);ft(t,n,"reset")}function ut(n){function f(t){n.iframe.style[t]=n[t]+"px";i(n.id,"IFrame ("+r+") "+t+" set to "+n[t]+"px")}function e(t){at||"0"!==n[t]||(at=!0,i(r,"Hidden iFrame detected, creating visibility listener"),kt())}function u(n){f(n);e(n)}var r=n.iframe.id;t[r]&&(t[r].sizeHeight&&u("height"),t[r].sizeWidth&&u("width"))}function ft(n,t,r){r!==t.type&&o?(i(t.id,"Requesting animation frame"),o(n)):n()}function u(n,r,u,f,o){function c(){var e=t[f]&&t[f].targetOrigin;i(f,"["+n+"] Sending msg to iframe["+f+"] ("+r+") targetOrigin: "+e);u.contentWindow.postMessage(h+r,e)}function l(){e(f,"["+n+"] IFrame("+f+") not found")}function a(){u&&"contentWindow"in u&&null!==u.contentWindow?c():l()}function v(){function n(){!t[f]||t[f].loaded||s||(s=!0,e(f,"IFrame has not responded within "+t[f].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ingored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}o&&t[f]&&t[f].warningTimeout&&(t[f].msgTimeout=setTimeout(n,t[f].warningTimeout))}var s=!1;f=f||u.id;t[f]&&(a(),v())}function et(n){return n+":"+t[n].bodyMarginV1+":"+t[n].sizeWidth+":"+t[n].log+":"+t[n].interval+":"+t[n].enablePublicMethods+":"+t[n].autoResize+":"+t[n].bodyMargin+":"+t[n].heightCalculationMethod+":"+t[n].bodyBackground+":"+t[n].bodyPadding+":"+t[n].tolerance+":"+t[n].inPageLinks+":"+t[n].resizeFrom+":"+t[n].widthCalculationMethod}function ot(r,o){function h(){function n(n){1/0!==t[s][n]&&0!==t[s][n]&&(r.style[n]=t[s][n]+"px",i(s,"Set "+n+" = "+t[s][n]+"px"))}function u(n){if(t[s]["min"+n]>t[s]["max"+n])throw new Error("Value for min"+n+" can not be greater than max"+n);}u("Height");u("Width");n("maxHeight");n("minHeight");n("maxWidth");n("minWidth")}function l(){var n=o&&o.id||c.id+ct++;return null!==document.getElementById(n)&&(n+=ct++),n}function a(n){return b=n,""===n&&(r.id=n=l(),lt=(o||{}).log,b=n,i(n,"Added missing iframe ID: "+n+" ("+r.src+")")),n}function v(){switch(i(s,"IFrame scrolling "+(t[s]&&t[s].scrolling?"enabled":"disabled")+" for "+s),r.style.overflow=!1===(t[s]&&t[s].scrolling)?"hidden":"auto",t[s]&&t[s].scrolling){case!0:r.scrolling="yes";break;case!1:r.scrolling="no";break;default:r.scrolling=t[s]?t[s].scrolling:"no"}}function y(){("number"==typeof(t[s]&&t[s].bodyMargin)||"0"===(t[s]&&t[s].bodyMargin))&&(t[s].bodyMarginV1=t[s].bodyMargin,t[s].bodyMargin=""+t[s].bodyMargin+"px")}function p(){var n=t[s]&&t[s].firstRun,i=t[s]&&t[s].heightCalculationMethod in ti;!n&&i&&rt({iframe:r,height:0,width:0,type:"init"})}function w(){Function.prototype.bind&&t[s]&&(t[s].iframe.iFrameResizer={close:g.bind(null,t[s].iframe),resize:u.bind(null,"Window resize","resize",t[s].iframe),moveToAnchor:function(n){u("Move to anchor","moveToAnchor:"+n,t[s].iframe,s)},sendMessage:function(n){n=JSON.stringify(n);u("Send Message","message:"+n,t[s].iframe,s)}})}function k(t){function i(){u("iFrame.onload",t,r,n,!0);p()}f(r,"load",i);u("init",t,r,n,!0)}function d(n){if("object"!=typeof n)throw new TypeError("Options is not an object");}function nt(n){for(var i in c)c.hasOwnProperty(i)&&(t[s][i]=n.hasOwnProperty(i)?n[i]:c[i])}function tt(n){return""===n||"file://"===n?"*":n}function it(n){n=n||{};t[s]={firstRun:!0,iframe:r,remoteHost:r.src.split("/").slice(0,3).join("/")};d(n);nt(n);t[s]&&(t[s].targetOrigin=!0===t[s].checkOrigin?tt(t[s].remoteHost):"*")}function ut(){return s in t&&"iFrameResizer"in r}var s=a(r.id);ut()?e(s,"Ignored iFrame, already setup."):(it(o),v(),h(),y(),k(et(s)),w())}function s(n,t){null===w&&(w=setTimeout(function(){w=null;n()},t))}function kt(){function r(){function n(n){function i(i){return"0px"===(t[n]&&t[n].iframe.style[i])}function r(n){return null!==n.offsetParent}t[n]&&r(t[n].iframe)&&(i("height")||i("width"))&&u("Visibility change","resize",t[n].iframe,n)}for(var i in t)n(i)}function f(n){i("window","Mutation observed: "+n[0].target+" "+n[0].type);s(r,16)}function e(){var t=document.querySelector("body"),i=new n(f);i.observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0})}var n=window.MutationObserver||window.WebKitMutationObserver;n&&e()}function v(n){function t(){ht("Window "+n,"resize")}i("window","Trigger event: "+n);s(t,16)}function st(){function n(){ht("Tab Visable","resize")}"hidden"!==document.visibilityState&&(i("document","Trigger event: Visiblity change"),s(n,16))}function ht(n,i){function f(n){return t[n]&&"parent"===t[n].resizeFrom&&t[n].autoResize&&!t[n].firstRun}for(var r in t)f(r)&&u(n,i,document.getElementById(r),r)}function dt(){f(window,"message",bt);f(window,"resize",function(){v("resize")});f(document,"visibilitychange",st);f(document,"-webkit-visibilitychange",st);f(window,"focusin",function(){v("focus")});f(window,"focus",function(){v("focus")})}function y(){function i(n,i){function r(){if(!i.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==i.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+i.tagName+">");}i&&(r(),ot(i,n),t.push(i))}function r(n){n&&n.enablePublicMethods&&e("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}var t;return yt(),dt(),function(u,f){switch(t=[],r(u),typeof f){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(f||"iframe"),i.bind(n,u));break;case"object":i(u,f);break;default:throw new TypeError("Unexpected data type ("+typeof f+")");}return t}}function gt(n){n.fn?n.fn.iFrameResize||(n.fn.iFrameResize=function(n){function t(t,i){ot(i,n)}return this.filter("iframe").each(t).end()}):d("","Unable to bind to jQuery, it is not fully loaded.")}if("undefined"!=typeof window){var ct=0,lt=!1,at=!1,ni=7,h="[iFrameSizer]",p=h.length,r=null,o=window.requestAnimationFrame,ti={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},t={},w=null,b="Host Page",c={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",closedCallback:function(){},initCallback:function(){},messageCallback:function(){e("MessageCallback function not defined")},resizedCallback:function(){},scrollCallback:function(){return!0}};window.jQuery&&gt(window.jQuery);"function"==typeof define&&define.amd?define([],y):"object"==typeof module&&"object"==typeof module.exports?module.exports=y():window.iFrameResize=window.iFrameResize||y()}}();!function(n){"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?module.exports=n():window.noUiSlider=n()}(function(){"use strict";function p(n){return n.filter(function(n){return this[n]?!1:this[n]=!0},{})}function w(n,t){return Math.round(n/t)*t}function o(n){var i=n.getBoundingClientRect(),u=n.ownerDocument,r=u.documentElement,t=a();return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(t.x=0),{top:i.top+t.y-r.clientTop,left:i.left+t.x-r.clientLeft}}function r(n){return"number"==typeof n&&!isNaN(n)&&isFinite(n)}function b(n){var t=Math.pow(10,7);return Number((Math.round(n*t)/t).toFixed(7))}function l(t,i,r){n(t,i);setTimeout(function(){f(t,i)},r)}function s(n){return Math.max(Math.min(n,100),0)}function u(n){return Array.isArray(n)?n:[n]}function k(n){var t=n.split(".");return t.length>1?t[1].length:0}function n(n,t){n.classList?n.classList.add(t):n.className+=" "+t}function f(n,t){n.classList?n.classList.remove(t):n.className=n.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function d(n,t){n.classList?n.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(n.className)}function a(){var n=void 0!==window.pageXOffset,t="CSS1Compat"===(document.compatMode||""),i=n?window.pageXOffset:t?document.documentElement.scrollLeft:document.body.scrollLeft,r=n?window.pageYOffset:t?document.documentElement.scrollTop:document.body.scrollTop;return{x:i,y:r}}function g(n){n.stopPropagation()}function nt(n){return function(t){return n+t}}function h(n,t){return 100/(t-n)}function c(n,t){return 100*t/(n[1]-n[0])}function tt(n,t){return c(n,n[0]<0?t+Math.abs(n[0]):t-n[0])}function it(n,t){return t*(n[1]-n[0])/100+n[0]}function e(n,t){for(var i=1;n>=t[i];)i+=1;return i}function rt(n,t,i){if(i>=n.slice(-1)[0])return 100;var f,o,u,s,r=e(i,n);return f=n[r-1],o=n[r],u=t[r-1],s=t[r],u+tt([f,o],i)/h(u,s)}function ut(n,t,i){if(i>=100)return n.slice(-1)[0];var f,o,u,s,r=e(i,t);return f=n[r-1],o=n[r],u=t[r-1],s=t[r],it([f,o],(i-u)*h(u,s))}function ft(n,t,i,r){if(100===r)return r;var f,o,u=e(r,n);return i?(f=n[u-1],o=n[u],r-f>(o-f)/2?o:f):t[u-1]?n[u-1]+w(r-n[u-1],t[u-1]):r}function et(n,t,i){var u;if("number"==typeof t&&(t=[t]),"[object Array]"!==Object.prototype.toString.call(t))throw new Error("noUiSlider: 'range' contains invalid value.");if(u="min"===n?0:"max"===n?100:parseFloat(n),!r(u)||!r(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");i.xPct.push(u);i.xVal.push(t[0]);u?i.xSteps.push(isNaN(t[1])?!1:t[1]):isNaN(t[1])||(i.xSteps[0]=t[1])}function ot(n,t,i){return t?void(i.xSteps[n]=c([i.xVal[n],i.xVal[n+1]],t)/h(i.xPct[n],i.xPct[n+1])):!0}function t(n,t,i,r){this.xPct=[];this.xVal=[];this.xSteps=[r||!1];this.xNumSteps=[!1];this.snap=t;this.direction=i;var u,f=[];for(u in n)n.hasOwnProperty(u)&&f.push([n[u],u]);for(f.length&&"object"==typeof f[0][0]?f.sort(function(n,t){return n[0][0]-t[0][0]}):f.sort(function(n,t){return n[0]-t[0]}),u=0;u<f.length;u++)et(f[u][1],f[u][0],this);for(this.xNumSteps=this.xSteps.slice(0),u=0;u<this.xNumSteps.length;u++)ot(u,this.xNumSteps[u],this)}function st(n,t){if(!r(t))throw new Error("noUiSlider: 'step' is not numeric.");n.singleStep=t}function ht(n,i){if("object"!=typeof i||Array.isArray(i))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===i.min||void 0===i.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");if(i.min===i.max)throw new Error("noUiSlider: 'range' 'min' and 'max' cannot be equal.");n.spectrum=new t(i,n.snap,n.dir,n.singleStep)}function ct(n,t){if(t=u(t),!Array.isArray(t)||!t.length||t.length>2)throw new Error("noUiSlider: 'start' option is incorrect.");n.handles=t.length;n.start=t}function lt(n,t){if(n.snap=t,"boolean"!=typeof t)throw new Error("noUiSlider: 'snap' option must be a boolean.");}function at(n,t){if(n.animate=t,"boolean"!=typeof t)throw new Error("noUiSlider: 'animate' option must be a boolean.");}function vt(n,t){if("lower"===t&&1===n.handles)n.connect=1;else if("upper"===t&&1===n.handles)n.connect=2;else if(t===!0&&2===n.handles)n.connect=3;else{if(t!==!1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");n.connect=0}}function yt(n,t){switch(t){case"horizontal":n.ort=0;break;case"vertical":n.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.");}}function pt(n,t){if(!r(t))throw new Error("noUiSlider: 'margin' option must be numeric.");if(n.margin=n.spectrum.getMargin(t),!n.margin)throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.");}function wt(n,t){if(!r(t))throw new Error("noUiSlider: 'limit' option must be numeric.");if(n.limit=n.spectrum.getMargin(t),!n.limit)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders.");}function bt(n,t){switch(t){case"ltr":n.dir=0;break;case"rtl":n.dir=1;n.connect=[0,2,1,3][n.connect];break;default:throw new Error("noUiSlider: 'direction' option was not recognized.");}}function kt(n,t){if("string"!=typeof t)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var u=t.indexOf("tap")>=0,i=t.indexOf("drag")>=0,f=t.indexOf("fixed")>=0,r=t.indexOf("snap")>=0,e=t.indexOf("hover")>=0;if(i&&!n.connect)throw new Error("noUiSlider: 'drag' behaviour must be used with 'connect': true.");n.events={tap:u||r,drag:i,fixed:f,snap:r,hover:e}}function dt(n,t){var i;if(t!==!1)if(t===!0)for(n.tooltips=[],i=0;i<n.handles;i++)n.tooltips.push(!0);else{if(n.tooltips=u(t),n.tooltips.length!==n.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");n.tooltips.forEach(function(n){if("boolean"!=typeof n&&("object"!=typeof n||"function"!=typeof n.to))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.");})}}function gt(n,t){if(n.format=t,"function"==typeof t.to&&"function"==typeof t.from)return!0;throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");}function ni(n,t){if(void 0!==t&&"string"!=typeof t)throw new Error("noUiSlider: 'cssPrefix' must be a string.");n.cssPrefix=t}function v(n){var i,t={margin:0,limit:0,animate:!0,format:y},r;return i={step:{r:!1,t:st},start:{r:!0,t:ct},connect:{r:!0,t:vt},direction:{r:!0,t:bt},snap:{r:!1,t:lt},animate:{r:!1,t:at},range:{r:!0,t:ht},orientation:{r:!1,t:yt},margin:{r:!1,t:pt},limit:{r:!1,t:wt},behaviour:{r:!0,t:kt},format:{r:!1,t:gt},tooltips:{r:!1,t:dt},cssPrefix:{r:!1,t:ni}},r={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal"},Object.keys(i).forEach(function(u){if(void 0===n[u]&&void 0===r[u]){if(i[u].r)throw new Error("noUiSlider: '"+u+"' is required.");return!0}i[u].t(t,void 0===n[u]?r[u]:n[u])}),t.pips=n.pips,t.style=t.ort?"top":"left",t}function ti(t,r){function yt(n,t,i){var r=n+t[0],u=n+t[1];return i?(0>r&&(u+=Math.abs(r)),u>100&&(r-=u-100),[s(r),s(u)]):[r,u]}function pt(n,t){n.preventDefault();var r,u,o=0===n.type.indexOf("touch"),e=0===n.type.indexOf("mouse"),f=0===n.type.indexOf("pointer"),i=n;return 0===n.type.indexOf("MSPointer")&&(f=!0),o&&(r=n.changedTouches[0].pageX,u=n.changedTouches[0].pageY),t=t||a(),(e||f)&&(r=n.clientX+t.x,u=n.clientY+t.y),i.pageOffset=t,i.points=[r,u],i.cursor=e||f,i}function wt(t,i){var r=document.createElement("div"),u=document.createElement("div"),f=["-lower","-upper"];return t&&f.reverse(),n(u,h[3]),n(u,h[3]+f[i]),n(r,h[2]),r.appendChild(u),r}function bt(t,i,r){switch(t){case 1:n(i,h[7]);n(r[0],h[6]);break;case 3:n(r[1],h[6]);case 2:n(r[0],h[7]);case 0:n(i,h[6])}}function kt(n,t,i){for(var u=[],r=0;n>r;r+=1)u.push(i.appendChild(wt(t,r)));return u}function dt(t,i,r){n(r,h[0]);n(r,h[8+t]);n(r,h[4+i]);var u=document.createElement("div");return n(u,h[1]),r.appendChild(u),u}function gt(n,t){if(!r.tooltips[t])return!1;var i=document.createElement("div");return i.className=h[18],n.firstChild.appendChild(i)}function ni(){r.dir&&r.tooltips.reverse();var n=e.map(gt);r.dir&&(n.reverse(),r.tooltips.reverse());vt("update",function(t,i,u){n[i]&&(n[i].innerHTML=r.tooltips[i]===!0?t[i]:r.tooltips[i].to(u[i]))})}function ti(n,t,i){if("range"===n||"steps"===n)return c.xVal;if("count"===n){var r,u=100/(t-1),f=0;for(t=[];(r=f++*u)<=100;)t.push(r);n="positions"}return"positions"===n?t.map(function(n){return c.fromStepping(i?c.getStep(n):n)}):"values"===n?i?t.map(function(n){return c.fromStepping(c.getStep(c.toStepping(n)))}):t:void 0}function ii(n,t,i){function h(n,t){return(n+t).toFixed(7)/1}var l=c.direction,r={},f=c.xVal[0],e=c.xVal[c.xVal.length-1],o=!1,s=!1,u=0;return c.direction=0,i=p(i.slice().sort(function(n,t){return n-t})),i[0]!==f&&(i.unshift(f),o=!0),i[i.length-1]!==e&&(i.push(e),s=!0),i.forEach(function(f,e){var a,l,v,y,w,g,b,nt,k,tt,d=f,p=i[e+1];if("steps"===t&&(a=c.xNumSteps[e]),a||(a=p-d),d!==!1&&void 0!==p)for(l=d;p>=l;l=h(l,a)){for(y=c.toStepping(l),w=y-u,nt=w/n,k=Math.round(nt),tt=w/k,v=1;k>=v;v+=1)g=u+v*tt,r[g.toFixed(5)]=["x",0];b=i.indexOf(l)>-1?1:"steps"===t?2:0;!e&&o&&(b=0);l===p&&s||(r[y.toFixed(5)]=[l,b]);u=y}}),c.direction=l,r}function ui(t,i,u){function s(n){return["-normal","-large","-sub"][n]}function e(n,t,i){return'class="'+t+" "+t+"-"+o+" "+t+s(i[1])+'" style="'+r.style+": "+n+'%"'}function l(n,t){c.direction&&(n=100-n);t[1]=t[1]&&i?i(t[0],t[1]):t[1];f.innerHTML+="<div "+e(n,h[21],t)+"><\/div>";t[1]&&(f.innerHTML+="<div "+e(n,h[22],t)+">"+u.to(t[0])+"<\/div>")}var o=["horizontal","vertical"][r.ort],f=document.createElement("div");return n(f,h[20]),n(f,h[20]+"-"+o),Object.keys(t).forEach(function(n){l(n,t[n])}),f}function fi(n){var t=n.mode,i=n.density||1,r=n.filter||!1,u=n.values||!1,f=n.stepped||!1,e=ti(t,u,f),o=ii(i,t,e),s=n.format||{to:Math.round};return w.appendChild(ui(o,r,s))}function ot(){return tt["offset"+["Width","Height"][r.ort]]}function y(n,t,i){void 0!==t&&1!==r.handles&&(t=Math.abs(t-r.dir));Object.keys(it).forEach(function(r){var f=r.split(".")[0];n===f&&it[r].forEach(function(n){n.call(ft,u(lt()),t,u(st(Array.prototype.slice.call(et))),i||!1)})})}function st(n){return 1===n.length?n[0]:r.dir?n.reverse():n}function rt(n,t,u,f){var e=function(t){return w.hasAttribute("disabled")?!1:d(w,h[14])?!1:(t=pt(t,f.pageOffset),n===i.start&&void 0!==t.buttons&&t.buttons>1?!1:f.hover&&t.buttons?!1:(t.calcPoint=t.points[r.ort],void u(t,f)))},o=[];return n.split(" ").forEach(function(n){t.addEventListener(n,e,!1);o.push([n,e])}),o}function ei(n,t){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===n.buttons&&0!==t.buttonsProperty)return ht(n,t);var f,r,i=t.handles||e,u=!1,s=100*(n.calcPoint-t.start)/t.baseSize,o=i[0]===e[0]?0:1;if(f=yt(s,t.positions,i.length>1),u=ut(i[0],f[o],1===i.length),i.length>1){if(u=ut(i[1],f[o?0:1],!1)||u)for(r=0;r<t.handles.length;r++)y("slide",r)}else u&&y("slide",o)}function ht(n,t){var r=tt.querySelector("."+h[15]),u=t.handles[0]===e[0]?0:1,i;null!==r&&f(r,h[15]);n.cursor&&(document.body.style.cursor="",document.body.removeEventListener("selectstart",document.body.noUiListener));i=document.documentElement;i.noUiListeners.forEach(function(n){i.removeEventListener(n[0],n[1])});f(w,h[12]);y("set",u);y("change",u);void 0!==t.handleNumber&&y("end",t.handleNumber)}function oi(n,t){"mouseout"===n.type&&"HTML"===n.target.nodeName&&null===n.relatedTarget&&ht(n,t)}function ct(t,r){var u=document.documentElement,f;if(1===r.handles.length&&(n(r.handles[0].children[0],h[15]),r.handles[0].hasAttribute("disabled")))return!1;t.preventDefault();t.stopPropagation();var o=rt(i.move,u,ei,{start:t.calcPoint,baseSize:ot(),pageOffset:t.pageOffset,handles:r.handles,handleNumber:r.handleNumber,buttonsProperty:t.buttons,positions:[b[0],b[e.length-1]]}),s=rt(i.end,u,ht,{handles:r.handles,handleNumber:r.handleNumber}),c=rt("mouseout",u,oi,{handles:r.handles,handleNumber:r.handleNumber});(u.noUiListeners=o.concat(s,c),t.cursor)&&(document.body.style.cursor=getComputedStyle(t.target).cursor,e.length>1&&n(w,h[12]),f=function(){return!1},document.body.noUiListener=f,document.body.addEventListener("selectstart",f,!1));void 0!==r.handleNumber&&y("start",r.handleNumber)}function si(n){var t,u,i=n.calcPoint,f=0;return n.stopPropagation(),e.forEach(function(n){f+=o(n)[r.style]}),t=f/2>i||1===e.length?0:1,i-=o(tt)[r.style],u=100*i/ot(),r.events.snap||l(w,h[14],300),e[t].hasAttribute("disabled")?!1:(ut(e[t],u),y("slide",t,!0),y("set",t,!0),y("change",t,!0),void(r.events.snap&&ct(n,{handles:[e[t]]})))}function hi(n){var t=n.calcPoint-o(tt)[r.style],i=c.getStep(100*t/ot()),u=c.fromStepping(i);Object.keys(it).forEach(function(n){"hover"===n.split(".")[0]&&it[n].forEach(function(n){n.call(ft,u)})})}function ci(t){var r,u;if(!t.fixed)for(r=0;r<e.length;r+=1)rt(i.start,e[r].children[0],ct,{handles:[e[r]],handleNumber:r});if(t.tap&&rt(i.start,tt,si,{handles:e}),t.hover)for(rt(i.move,tt,hi,{hover:!0}),r=0;r<e.length;r+=1)["mousemove MSPointerMove pointermove"].forEach(function(n){e[r].children[0].addEventListener(n,g,!1)});t.drag&&(u=[tt.querySelector("."+h[7])],n(u[0],h[10]),t.fixed&&u.push(e[u[0]===e[0]?1:0].children[0]),u.forEach(function(n){rt(i.start,n,ct,{handles:e})}))}function ut(t,i,u){var o=t!==e[0]?1:0,l=b[0]+r.margin,a=b[1]-r.margin,v=b[0]+r.limit,p=b[1]-r.limit;return e.length>1&&(i=o?Math.max(i,l):Math.min(i,a)),u!==!1&&r.limit&&e.length>1&&(i=o?Math.min(i,v):Math.max(i,p)),i=c.getStep(i),i=s(parseFloat(i.toFixed(7))),i===b[o]?!1:(window.requestAnimationFrame?window.requestAnimationFrame(function(){t.style[r.style]=i+"%"}):t.style[r.style]=i+"%",t.previousSibling||(f(t,h[17]),i>50&&n(t,h[17])),b[o]=i,et[o]=c.fromStepping(i),y("update",o),!0)}function li(n,t){var u,f,i;for(r.limit&&(n+=1),u=0;n>u;u+=1)f=u%2,i=t[f],null!==i&&i!==!1&&("number"==typeof i&&(i=String(i)),i=r.format.from(i),(i===!1||isNaN(i)||ut(e[f],c.toStepping(i),u===3-r.dir)===!1)&&y("update",f))}function at(n){var i,t,f=u(n);for(r.dir&&r.handles>1&&f.reverse(),r.animate&&-1!==b[0]&&l(w,h[14],300),i=e.length>1?3:1,1===f.length&&(i=1),li(i,f),t=0;t<e.length;t++)y("set",t)}function lt(){for(var t=[],n=0;n<r.handles;n+=1)t[n]=r.format.to(et[n]);return st(t)}function ai(){h.forEach(function(n){n&&f(w,n)});w.innerHTML="";delete w.noUiSlider}function vi(){var n=b.map(function(n,t){var i=c.getApplicableStep(n),r=k(String(i[2])),u=et[t],f=100===n?null:i[2],e=Number((u-i[2]).toFixed(r)),o=0===n?null:e>=i[1]?i[2]:i[0]||!1;return[o,f]});return st(n)}function vt(n,t){it[n]=it[n]||[];it[n].push(t);"update"===n.split(".")[0]&&e.forEach(function(n,t){y("update",t)})}function yi(n){var t=n.split(".")[0],i=n.substring(t.length);Object.keys(it).forEach(function(n){var r=n.split(".")[0],u=n.substring(r.length);t&&t!==r||i&&i!==u||delete it[n]})}function pi(n){var t,i=lt(),u=v({start:[0,0],margin:n.margin,limit:n.limit,step:n.step,range:n.range,animate:n.animate,snap:void 0===n.snap?r.snap:n.snap});for(["margin","limit","step","range","animate"].forEach(function(t){void 0!==n[t]&&(r[t]=n[t])}),c=u.spectrum,b=[-1,-1],at(i),t=0;t<e.length;t++)y("update",t)}var tt,e,ft,w=t,b=[-1,-1],c=r.spectrum,et=[],it={},h=["target","base","origin","handle","horizontal","vertical","background","connect","ltr","rtl","draggable","","state-drag","","state-tap","active","","stacking","tooltip","","pips","marker","value"].map(nt(r.cssPrefix||ri));if(w.noUiSlider)throw new Error("Slider was already initialized.");return tt=dt(r.dir,r.ort,w),e=kt(r.handles,r.dir,tt),bt(r.connect,w,e),r.pips&&fi(r.pips),r.tooltips&&ni(),ft={destroy:ai,steps:vi,on:vt,off:yi,get:lt,set:at,updateOptions:pi},ci(r.events),ft}function ii(n,t){if(!n.nodeName)throw new Error("noUiSlider.create requires a single element.");var r=v(t,n),i=ti(n,r);return i.set(r.start),n.noUiSlider=i,i}var i=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},ri="noUi-",y;return t.prototype.getMargin=function(n){return 2===this.xPct.length?c(this.xVal,n):!1},t.prototype.toStepping=function(n){return n=rt(this.xVal,this.xPct,n),this.direction&&(n=100-n),n},t.prototype.fromStepping=function(n){return this.direction&&(n=100-n),b(ut(this.xVal,this.xPct,n))},t.prototype.getStep=function(n){return this.direction&&(n=100-n),n=ft(this.xPct,this.xSteps,this.snap,n),this.direction&&(n=100-n),n},t.prototype.getApplicableStep=function(n){var t=e(n,this.xPct),i=100===n?2:1;return[this.xNumSteps[t-2],this.xVal[t-i],this.xNumSteps[t-i]]},t.prototype.convert=function(n){return this.getStep(this.toStepping(n))},y={to:function(n){return void 0!==n&&n.toFixed(2)},from:Number},{create:ii}});String.prototype.ToBoolean=function(){return/^true$/i.test(this)};String.prototype.Contains=function(n){return this.indexOf(n)!=-1};String.prototype.Format=function(){var t=this,n;if(arguments.length>0)for(n=0;n<arguments.length;n++)t=t.replace("{"+n+"}",arguments[n]);return t};String.prototype.Empty="";String.prototype.RTrim=function(){return this.replace(/((\s*\S+)*)\s*/,"$1")};String.prototype.endsWith=function(n){return this.indexOf(n,this.length-n.length)!==-1};Array.prototype.contains=function(n){for(var i=!1,t=0;t<this.length;t++)if(this[t]==n){i=!0;break}return i};Array.prototype.index=function(n){var i=!1,t=0;for(t;t<this.length;t++)if(this[t]==n){i=!0;break}return i==!0?t:-1};Array.prototype.deleteAt=function(n){this.splice(n,1)};Array.prototype.equals=function(n){if(!n||this.length!=n.length)return!1;for(var t=0,i=this.length;t<i;t++)if(this[t]instanceof Array&&n[t]instanceof Array){if(!this[t].equals(n[t]))return!1}else if(this[t]!=n[t])return!1;return!0};Array.prototype.distinct=function(n){for(var u,f,i=[],r=this,t=0;t<r.length;t++)u=!1,$.isFunction(n)?(f=i.filter(function(i){return n(i,r[t])}),u=f.length>0):u=i.indexOf(r[t])>=0,u||i.push(r[t]);return i};!function(n,t,i){function e(n,t){return typeof n===t}function ct(){var i,n,u,f,o,s,t;for(var h in c)if(c.hasOwnProperty(h)){if(i=[],n=c[h],n.name&&(i.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.options.aliases.length))for(u=0;u<n.options.aliases.length;u++)i.push(n.options.aliases[u].toLowerCase());for(f=e(n.fn,"function")?n.fn():n.fn,o=0;o<i.length;o++)s=i[o],t=s.split("."),1===t.length?r[t[0]]=f:(!r[t[0]]||r[t[0]]instanceof Boolean||(r[t[0]]=new Boolean(r[t[0]])),r[t[0]][t[1]]=f),ft.push((f?"":"no-")+t.join("-"))}}function g(n){var t=o.className,i=r._config.classPrefix||"",u;(h&&(t=t.baseVal),r._config.enableJSClass)&&(u=new RegExp("(^|\\s)"+i+"no-js(\\s|$)"),t=t.replace(u,"$1"+i+"js$2"));r._config.enableClasses&&(t+=" "+i+n.join(" "+i),h?o.className.baseVal=t:o.className=t)}function nt(n,t){var u,i,f;if("object"==typeof n)for(u in n)et(n,u)&&nt(u,n[u]);else{if(n=n.toLowerCase(),i=n.split("."),f=r[i[0]],2==i.length&&(f=f[i[1]]),"undefined"!=typeof f)return r;t="function"==typeof t?t():t;1==i.length?r[i[0]]=t:(!r[i[0]]||r[i[0]]instanceof Boolean||(r[i[0]]=new Boolean(r[i[0]])),r[i[0]][i[1]]=t);g([(t&&0!=t?"":"no-")+i.join("-")]);r._trigger(n,t)}return r}function tt(n){return n.replace(/([a-z])-([a-z])/g,function(n,t,i){return t+i.toUpperCase()}).replace(/^-/,"")}function lt(n,t){return!!~(""+n).indexOf(t)}function s(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):h?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function at(){var n=t.body;return n||(n=s(h?"svg":"body"),n.fake=!0),n}function it(n,i,r,u){var e,a,c,v,l="modernizr",h=s("div"),f=at();if(parseInt(r,10))for(;r--;)c=s("div"),c.id=u?u[r]:l+(r+1),h.appendChild(c);return e=s("style"),e.type="text/css",e.id="s"+l,(f.fake?f:h).appendChild(e),f.appendChild(h),e.styleSheet?e.styleSheet.cssText=n:e.appendChild(t.createTextNode(n)),h.id=l,f.fake&&(f.style.background="",f.style.overflow="hidden",v=o.style.overflow,o.style.overflow="hidden",o.appendChild(f)),a=i(h,n),f.fake?(f.parentNode.removeChild(f),o.style.overflow=v,o.offsetHeight):h.parentNode.removeChild(h),!!a}function vt(n,t){return function(){return n.apply(t,arguments)}}function yt(n,t,i){var r;for(var u in n)if(n[u]in t)return i===!1?n[u]:(r=t[n[u]],e(r,"function")?vt(r,i||t):r);return!1}function rt(n){return n.replace(/([A-Z])/g,function(n,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function pt(t,i,r){var u,f,e;return"getComputedStyle"in n?(u=getComputedStyle.call(n,t,i),f=n.console,null!==u?r&&(u=u.getPropertyValue(r)):f&&(e=f.error?"error":"log",f[e].call(f,"getComputedStyle returning null, its possible modernizr test results are inaccurate"))):u=!i&&t.currentStyle&&t.currentStyle[r],u}function wt(t,r){var f=t.length,u;if("CSS"in n&&"supports"in n.CSS){for(;f--;)if(n.CSS.supports(rt(t[f]),r))return!0;return!1}if("CSSSupportsRule"in n){for(u=[];f--;)u.push("("+rt(t[f])+":"+r+")");return u=u.join(" or "),it("@supports ("+u+") { #modernizr { position: absolute; } }",function(n){return"absolute"==pt(n,null,"position")})}return i}function ut(n,t,r,u){function c(){v&&(delete f.style,delete f.modElem)}var l,v,h,y,o,p,a;if((u=e(u,"undefined")?!1:u,!e(r,"undefined"))&&(l=wt(n,r),!e(l,"undefined")))return l;for(a=["modernizr","tspan","samp"];!f.style&&a.length;)v=!0,f.modElem=s(a.shift()),f.style=f.modElem.style;for(y=n.length,h=0;y>h;h++)if(o=n[h],p=f.style[o],lt(o,"-")&&(o=tt(o)),f.style[o]!==i){if(u||e(r,"undefined"))return c(),"pfx"==t?o:!0;try{f.style[o]=r}catch(w){}if(f.style[o]!=p)return c(),"pfx"==t?o:!0}return c(),!1}function l(n,t,i,r,u){var f=n.charAt(0).toUpperCase()+n.slice(1),o=(n+" "+b.join(f+" ")+f).split(" ");return e(t,"string")||e(t,"undefined")?ut(o,t,r,u):(o=(n+" "+w.join(f+" ")+f).split(" "),yt(o,t,i))}function a(n,t,r){return l(n,i,i,t,r)}var ft=[],c=[],u={_version:"3.5.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(n,t){var i=this;setTimeout(function(){t(i[n])},0)},addTest:function(n,t,i){c.push({name:n,fn:t,options:i})},addAsyncTest:function(n){c.push({name:null,fn:n})}},r=function(){},v,o,h,p,w,et,ot,st,b,k,ht,d,f,y;for(r.prototype=u,r=new r,r.addTest("history",function(){var t=navigator.userAgent;return-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone")||"file:"===location.protocol?n.history&&"pushState"in n.history:!1}),r.addTest("svg",!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),r.addTest("localstorage",function(){var n="modernizr";try{return localStorage.setItem(n,n),localStorage.removeItem(n),!0}catch(t){return!1}}),r.addTest("sessionstorage",function(){var n="modernizr";try{return sessionStorage.setItem(n,n),sessionStorage.removeItem(n),!0}catch(t){return!1}}),v=u._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""],u._prefixes=v,o=t.documentElement,h="svg"===o.nodeName.toLowerCase(),h||!function(n,t){function v(n,t){var i=n.createElement("p"),r=n.getElementsByTagName("head")[0]||n.documentElement;return i.innerHTML="x<style>"+t+"<\/style>",r.insertBefore(i.lastChild,r.firstChild)}function h(){var n=i.elements;return"string"==typeof n?n.split(" "):n}function y(n,t){var r=i.elements;"string"!=typeof r&&(r=r.join(" "));"string"!=typeof n&&(n=n.join(" "));i.elements=r+" "+n;f(t)}function u(n){var t=a[n[l]];return t||(t={},s++,n[l]=s,a[s]=t),t}function c(n,i,f){if(i||(i=t),r)return i.createElement(n);f||(f=u(i));var e;return e=f.cache[n]?f.cache[n].cloneNode():k.test(n)?(f.cache[n]=f.createElem(n)).cloneNode():f.createElem(n),!e.canHaveChildren||b.test(n)||e.tagUrn?e:f.frag.appendChild(e)}function p(n,i){if(n||(n=t),r)return n.createDocumentFragment();i=i||u(n);for(var e=i.frag.cloneNode(),f=0,o=h(),s=o.length;s>f;f++)e.createElement(o[f]);return e}function w(n,t){t.cache||(t.cache={},t.createElem=n.createElement,t.createFrag=n.createDocumentFragment,t.frag=t.createFrag());n.createElement=function(r){return i.shivMethods?c(r,n,t):t.createElem(r)};n.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+h().join().replace(/[\w\-:]+/g,function(n){return t.createElem(n),t.frag.createElement(n),'c("'+n+'")'})+");return n}")(i,t.frag)}function f(n){n||(n=t);var f=u(n);return!i.shivCSS||e||f.hasCSS||(f.hasCSS=!!v(n,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),r||w(n,f),n}var e,r,o=n.html5||{},b=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,k=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,l="_html5shiv",s=0,a={},i;!function(){try{var n=t.createElement("a");n.innerHTML="<xyz><\/xyz>";e="hidden"in n;r=1==n.childNodes.length||function(){t.createElement("a");var n=t.createDocumentFragment();return"undefined"==typeof n.cloneNode||"undefined"==typeof n.createDocumentFragment||"undefined"==typeof n.createElement}()}catch(i){e=!0;r=!0}}();i={elements:o.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:"3.7.3",shivCSS:o.shivCSS!==!1,supportsUnknownElements:r,shivMethods:o.shivMethods!==!1,type:"default",shivDocument:f,createElement:c,createDocumentFragment:p,addElements:y};n.html5=i;f(t);"object"==typeof module&&module.exports&&(module.exports=i)}("undefined"!=typeof n?n:this,t),p="Moz O ms Webkit",w=u._config.usePrefixes?p.toLowerCase().split(" "):[],u._domPrefixes=w,!function(){var n={}.hasOwnProperty;et=e(n,"undefined")||e(n.call,"undefined")?function(n,t){return t in n&&e(n.constructor.prototype[t],"undefined")}:function(t,i){return n.call(t,i)}}(),u._l={},u.on=function(n,t){this._l[n]||(this._l[n]=[]);this._l[n].push(t);r.hasOwnProperty(n)&&setTimeout(function(){r._trigger(n,r[n])},0)},u._trigger=function(n,t){if(this._l[n]){var i=this._l[n];setTimeout(function(){for(var r,n=0;n<i.length;n++)(r=i[n])(t)},0);delete this._l[n]}},r._q.push(function(){u.addTest=nt}),ot=("CSS"in n)&&("supports"in n.CSS),st=("supportsCSS"in n),r.addTest("supports",ot||st),b=u._config.usePrefixes?p.split(" "):[],u._cssomPrefixes=b,k=function(t){var u,s=v.length,f=n.CSSRule,r,e,o;if("undefined"==typeof f)return i;if(!t)return!1;if(t=t.replace(/^@/,""),u=t.replace(/-/g,"_").toUpperCase()+"_RULE",u in f)return"@"+t;for(r=0;s>r;r++)if(e=v[r],o=e.toUpperCase()+"_"+u,o in f)return"@-"+e.toLowerCase()+"-"+t;return!1},u.atRule=k,ht=u.testStyles=it,d={elem:s("modernizr")},r._q.push(function(){delete d.elem}),f={style:d.elem.style},r._q.unshift(function(){delete f.style}),u.testProp=function(n,t,r){return ut([n],i,t,r)},u.testAllProps=l,u.prefixed=function(n,t,i){return 0===n.indexOf("@")?k(n):(-1!=n.indexOf("-")&&(n=tt(n)),t?l(n,t,i):l(n,"pfx"))},u.testAllProps=a,r.addTest("csstransforms",function(){return-1===navigator.userAgent.indexOf("Android 2.")&&a("transform","scale(1)",!0)}),r.addTest("csstransforms3d",function(){var t=!!a("perspective","1px",!0),i=r._config.usePrefixes,n,u;return t&&(!i||"webkitPerspective"in o.style)&&(u="#modernizr{width:0;height:0}",r.supports?n="@supports (perspective: 1px)":(n="@media (transform-3d)",i&&(n+=",(-webkit-transform-3d)")),n+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}",ht(u+n,function(n){t=7===n.offsetWidth&&18===n.offsetHeight})),t}),r.addTest("flexbox",a("flexBasis","1px",!0)),ct(),g(ft),delete u.addTest,delete u.addAsyncTest,y=0;y<r._q.length;y++)r._q[y]();n.Modernizr=r}(window,document);Platform={WebSite:0,Mobile:1,Smartphone:2,Internal:3,Tablet:4};offer=new BettingOffer;DisplayModes={tablet:"tablet",smartPhone:"phone"},function(n){n.fn.insertWithOrder=function(t,i,r,u){var e=this.children(r),f,o;if(e.length)for(f=0;f<e.length;f++)if(o=n(e[f]),i<o.data(u)){o.before(t);break}else f==e.length-1&&this.append(t);else this.append(t);return this}}(jQuery);var Enum={ServiceTypes:{SportsBook:"SportsBook",Poker:"Poker",Casino:"Casino",Games:"Games",NetEntCasino:"NetEntCasino"},Types:{Undefined:"undefined",Object:"object",Input:"input",CheckBox:"checkbox"},TagNames:{Td:"td",Tr:"tr",Table:"table",Input:"input",Button:"button",Anchor:"a",Div:"div",Span:"span",Font:"font",Var:"var",Img:"img",P:"p"},DisplayTypes:{Empty:"",Block:"block",None:"none",Hidden:"hidden",Visible:"visible",Static:"Static",Dynamic:"Dynamic",Inline:"inline",IBlock:"inline-block"},Browser:{FireFox:"FIREFOX",InternetExplorer:"MSIE",Opera:"OPERA",Safari:"SAFARI",Chrome:"CHROME"},DataTypes:{Text:"text",Json:"json",JsonP:"jsonp",Html:"html",Script:"script"},Keys:{Enter:13,Tab:9}},global={disableSearch:!1,appPath:"",displayMode:DisplayModes.smartPhone,logonCallback:null,getKeyCodeFromEvent:function(n){return n.charCode?n.charCode:n.keyCode?n.keyCode:0},round:function(n,t){var i=n,r;return t>=0&&t<15&&(r=Math.pow(10,t),i=(Math.round(n*r)/r).toString(),t>0&&(i.indexOf(".")==-1&&(i+="."),i+=r.toString().substring(1),i=i.substring(0,i.indexOf(".")+t+1))),i},formatMoney:function(n){var t=2;return n.toLocaleString(License.CurrentLicense.get().currentCulture(),{minimumFractionDigits:t,maximumFractionDigits:t})},formatQuote:function(n){var t=n.toString();return t=t.replace(/[^\d\.]/g,"")*1,isNaN(t)&&(t=0),t.toFixed(2).replace(".",",")},formatAmountInput:function(n){var t=parseDouble($(n).val());$(n).val(this.round(t,2))},selectAll:function(n){var t=$(n).val().length;if(t>0)try{n.setSelectionRange(0,t)}catch(i){n.select()}},changePage:function(n){var t,i;if(app.platform==Platform.Tablet&&n.match(/\/Home\/Content/i)){global.openContentPage(n);return}t=!1;n.indexOf("#")>=0&&(i=window.location.href,window.location.href.indexOf("#")>=0&&(i=window.location.href.split("#")[0]),t=i.endsWith(n.split("#")[0]));window.location.href=n.match(/^http/i)||n.match(/^www\./i)?n:n.indexOf(this.appPath)>=0?n:this.appPath+n;t&&window.location.reload()},goBack:function(){history.go(-1)},changeTab:function(n,t,i){$(n).parent().children(".active").removeClass("active");$(n).addClass("active");var r=$("#"+i);r.children(".active").removeClass("active");r.children("#"+t).addClass("active")},setLoginCallback:function(n){global.logonCallback=n},showSearch:function(){global.disableSearch||($("#search-dialog").length?global.showElement("search-dialog"):window.location.href=app.path+"/search")},hideSearch:function(){global.hideElement("search-dialog");var n=$("#btnSearch");n&&n.removeClass("active")},showLogin:function(n){app.showLogin(n)},logout:function(){global.changePage("/Account/LogOff")},showBetSlip:function(){Betting.Mobile.Tabs.openBetslip()},isContentLink:function(n){return(n.match(/(\/Home)?\/Content/i)||n.match(/\/LandingPages\/TermsAndConditions/i)||n.match(/\/Register\/TermsAndConditions/i))&&n.indexOf("OpenInNewPage=true")<0?!0:!1},isPaymentLink:function(n){if(n==null)return!1;return n.match(/\/PayIn/i)&&n.indexOf("javascript:")<0},openContentPage:function(n,t,i,r){var u=$(r==undefined?"#content-dialog":r);(i===undefined||i===null)&&(i="json");u.length?(t===undefined?u.find(".dialog-title").children("span:first").html("&nbsp;"):u.find(".dialog-title").children("span:first").text(t),u.find(".content-wrapper").html('<div style="text-align: center"><img src="'+global.appPath+'/Content/images/loading.gif")" alt="loading" /><\/div>'),u.removeClass("collapsed"),$.get(n,null,function(n){i==="json"?(n.title!==""&&u.find(".dialog-title").children("span:first").text(n.title),u.find(".content-wrapper").html(n.bodyHtml)):i==="html"&&u.find(".content-wrapper").html(n)},i)):window.location.href=n},hideContentPage:function(n){var t=$(n===undefined?"#content-dialog":n);t.addClass("collapsed")},hidePopover:function(){$("#popover-dialog").hide()},closeBookmarkPopup:function(){$("#bookmark-popup").remove();$.post(global.appPath+"/Home/BookmarkPopupClosed")},closeStickyBanner:function(n,t){return $("#reg-banner").remove(),$.post(global.appPath+"/Home/StickyBannerClosed?key="+n+"&source="+t)},toogleVflBetOffers:function(n,t,i){var r=$("#"+t),u;global.toggleVisibility(i);u=global.toggleVisibility(n);u?r.removeClass("arrow").addClass("arrow_down"):r.removeClass("arrow_down").addClass("arrow")},toggleFurtherKos:function(n){var t=global.toggleVisibility("further-kos-list");t?$(n).children("span.arrow:first").removeClass("arrow").addClass("arrow_down"):$(n).children("span.arrow_down:first").removeClass("arrow_down").addClass("arrow")},toggleAccountMenu:function(){var n=global.toggleVisibility("account-menu-flyout")},toggleBurgerMenu:function(){var n=global.toggleVisibility("burger-menu-flyout");n||$("#burger-overlay").hide()},togglebetstools:function(n){var t=global.toggleVisibility("nav-privacy");app.platform==Platform.Tablet?t?($(".list-livescores").toggle().css("display","none"),$(".list-statistics").toggle().css("display","none"),$(".list-privaresultscy").toggle().css("display","none")):($(".list-livescores").toggle().css("display","inline-block"),$(".list-statistics").toggle().css("display","inline-block"),$(".list-results").toggle().css("display","inline-block")):($(n).find(".arrow").toggleClass("down").toggleClass("right"),$(".list-livescores").toggle(),$(".list-statistics").toggle(),$(".list-results").toggle())},toggleinterwettenmenu:function(n){$(n).find(".arrowLegal").toggleClass("arrow_up").toggleClass("arrow_down");$(".nav-company").toggle();$(".nav-payin").toggle();$(".nav-bonus").toggle();$(".nav-sponsoring").toggle()},togglehelpmenu:function(n){$(n).find(".arrowLegal").toggleClass("arrow_up").toggleClass("arrow_down");$(".nav-help").toggle();$(".nav-ppp").toggle();$(".nav-privacy").toggle();$(".nav-casinohelp").toggle();$(".nav-respgaming").toggle();$(".nav-fairplay").toggle();$(".nav-playfaircode").toggle();$(".nav-heartbeat").toggle();$(".nav-impressum").toggle()},toggleversionmenu:function(n){$(n).find(".arrowLegal").toggleClass("arrow_up").toggleClass("arrow_down");$(".nav-platform-tablet").toggle();$(".nav-platform-phone").toggle();$(".nav-platform-desktop").toggle();$(".nav-mobile-offer").toggle()},positionAccountMenu:function(){var n=$("#account-menu-flyout"),i=$("#mnu_Account"),f;if(n.length&&i.length){var e=window.innerWidth,t=i[0].getBoundingClientRect().left+i.width()/2,r=n.width()/2,u=e-t;r<t-10&&r<u-10?(f=t-r,n.css({left:f+"px",right:"auto"})):u<t?n.css({right:"5px",left:"auto"}):n.css({left:"5px",right:"auto"})}},hideElement:function(n){var t=$("#"+n);t.length&&t.addClass("collapsed")},showElement:function(n){var t=$("#"+n);t.length&&t.removeClass("collapsed")},scrollElementIntoView:function(n,t){(n.offsetTop<window.pageYOffset||n.offsetTop>window.pageYOffset+window.innerHeight||t)&&(n.scrollIntoView(!0),app.platform==Platform.Tablet&&window.scrollBy(0,-42))},toggleVisibility:function(n){var t=$("#"+n);if(t.length)return t.hasClass("collapsed")?(t.removeClass("collapsed"),!0):(t.addClass("collapsed"),!1)},enable:function(n,t){t?$(n).removeAttr("disabled"):$(n).attr("disabled","disabled");$(n).toggleClass("disabled",!t)},readOnly:function(n,t){var i=$(n);t?i.attr("readonly","readonly"):i.removeAttr("readonly");i.toggleClass("read-only",t)},closeLoginMsg:function(n){$("#"+n).remove()},checkCookies:function(){navigator.cookieEnabled||$(".cookie-msg").show();window.location.href.match("/CMS/BannerPreview")&&$(".cookie-msg").hide()},refreshBalance:function(){$.get(app.path+"/home/accountbalance",function(n){n.balance!=undefined&&global.setAccountBalance(n.balance)})},refreshWallets:function(n){n.forEach(function(n){document.querySelectorAll("#"+n.key).forEach(function(t){t&&(t.innerText=n.value)})})},setAccountBalance:function(n){document.querySelectorAll("#acc-balance").forEach(function(t){t&&(t.innerText=n)})},refreshAccountBalance:function(n,t){t.length>0?this.refreshWallets(t):this.setAccountBalance(n)},showTVDialog:function(n){$(".tv-dialog").hide();$(n).next(".tv-dialog").show()},getKeyCode:function(n){return BrowserInfo.FIREFOX?n.charCode:n.keyCode},IsKeyCodeValid:function(n,t){var r=!1,i=this.getKeyCode(t);switch(n){case 1:r=i>47&&i<58||i==46||i==44||i==8;break;case 2:r=i>47&&i<58}return BrowserInfo.FIREFOX&&t.keyCode>0?r=!0:BrowserInfo.OPERA&&(t.keyCode==8||t.keyCode==46)&&(r=!0),r},isDecimal:function(n,t,i){var r=global.IsKeyCodeValid(n,t),u=this.getKeyCode(t);return r&&i!=null&&(i.value.Contains(".")&&u==46&&(r=!1),i.value.Contains(",")&&u==46&&(r=!1),i.value.Contains(",")&&u==44&&(r=!1)),r},formatNumber:function(n,t){return t=t.replace(/\./g,","),t=t.replace(/[,]/,"."),t=t.replace(/[,]/g,""),n==1&&(t=t.replace(/\./g,",")),t},updateTopLinkData:function(n,t){var i=$(t);$.get(i.data("url")+"?topLinkId="+n+"&sportId="+i.val(),function(n){$(".toplink").replaceWith(n)})},getPOBoxInfo:function(n,t){return $.get(app.path+"/register/poboxinfo",{country:t,postcode:n})},createErrorLog:function(n,t){var i=app.path+"/Error/LogError";$.ajax({type:"POST",url:i,data:{message:n,detail:t},dataType:"json",success:function(){}})},createWarningLog:function(n,t){var i=app.path+"/Error/LogWarning";$.ajax({type:"POST",url:i,data:{message:n,detail:t},dataType:"json",success:function(){}})},createInfoLog:function(n,t){var i=app.path+"/Error/LogInfo";$.ajax({type:"POST",url:i,data:{message:n,detail:t},dataType:"json",success:function(){}})},updateReturnUrl:function(n){$("#ReturnUrl").val(n);var t=$("li.lang a,#btn-logoff");t.each(function(){var t=$(this),i=t.attr("href").replace(/(returnUrl=).*(&)?/,"$1"+encodeURIComponent(n)+"$2");t.attr("href",i)})},getUnauthorizedResult:function(n){if(n.status===401)if(n.responseJSON!==undefined){if(n.responseJSON.isSessionTimeout)return{isUnauthorized:!0,isSessionTimeout:!0,errorMessage:n.responseJSON.errorMessage}}else return n.getResponseHeader("X-IW-UnauthorizedReason")==="SessionLimitExceeded"?{isUnauthorized:!0,isSessionTimeout:!0,errorMessage:Translation.getTextId("Session limit timeout")}:{isUnauthorized:!0,isSessionTimeout:!1};return{isUnauthorized:!1}},requestFullscreen:function(){document.documentElement.requestFullscreen?document.documentElement.requestFullscreen():document.documentElement.msRequestFullscreen?document.documentElement.msRequestFullscreen():document.documentElement.mozRequestFullScreen?document.documentElement.mozRequestFullScreen():document.documentElement.webkitRequestFullscreen&&document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)},toggleContent:function(n){$(n).parent().toggleClass("active")}},PaymentPopup=function(){function t(){var i,r,t;if($("#paymentframe").attr("src","about:blank"),$("#payment-popover").addClass("collapsed"),$(".payment-popover").removeClass("frame-success"),n=0,i=$($("#paymentframe")[0].contentDocument),i.length&&(r=i.find(".dlg-payment"),t=r.data("bonusinfo-url"),t!==undefined&&t!=="")){e=!0;s(t);return}document.location=document.location}function h(){return u||window.location.href.match(/\/acceptagb/i)!==null?!1:!0}function o(n){return global.isPaymentLink(n)||n.indexOf("javascript:")===0||n.indexOf("#")===0||n==="about:blank"}function s(n){$("#bonus-info-content").length?global.openContentPage(n,null,null,"#bonus-info-content"):$.get(app.path+"/payin/bonusinfopopover",function(t){$("body").append(t);global.openContentPage(n,null,null,"#bonus-info-content")})}var i=0,r=!0,n=0,u=!1,f=!1,e=!1;return $(window).scroll(function(){var i,t,r;n>0&&(i=$("#payment-popover"),t=i.find(".btn-totop"),t.length&&(r=window.pageYOffset||document.scrollTop,t.toggle(r>=n+100)))}),{initPayMenu:function(n){$(n).find(".providers-collapse a").click(function(n){n.preventDefault();$(this).parents(".pay-providers").toggleClass("list-collapsed");var t=document.querySelector(".providers-collapse a .icon");t&&(t.classList.contains("arrow-down")?(t.classList.remove("arrow-down"),t.classList.add("arrow-up")):(t.classList.remove("arrow-up"),t.classList.add("arrow-down")))})},show:function(u){if(h()){if(f)return window.location.href=u.replace(/popup/i,""),!0}else return!1;var e=$("#payment-popover"),c='<div class="overlay" id="payment-popover"><div class="icon btn-totop" style="display: none;"><\/div><div class="payment-popover loading"><button type="button" class="icon dialog-close"><\/button><div class="popover-loading"><span class="icon fa-spinner fa-pulse"><\/span><\/div><iframe id="paymentframe" src="'+u+'" ><\/iframe><\/div ><\/div > ',s=!1;if(e.length)e.removeClass("collapsed"),e.find(".payment-popover").removeClass("frame-success").addClass("loading"),$("#paymentframe").attr("src",u);else{$("body").prepend(c);$("#paymentframe").iFrameResize({minHeight:i,scrolling:!0,messageCallback:function(i){i.message==="payinsuccess"?global.refreshBalance():i.message==="close"?t():i.message==="showbonus"&&(i.iframe.iFrameResizer.moveToAnchor("bonus-anchor"),n=$(i.iframe.contentDocument).find(".bonus-info").offset().top,s=!0)},resizedCallback:function(n){s&&(s=!1,n.iframe.iFrameResizer.moveToAnchor("bonus-anchor"));$("#paymentframe")[0].iFrameResizer.sendMessage("resized")}});$("#payment-popover").find(".dialog-close").click(function(){t()});$("#payment-popover").find(".btn-totop").click(function(){window.scrollTo(0,0);$(this).hide()});$("#paymentframe").on("load",function(){r&&window.scrollTo(0,0);var n=this.contentWindow.location.href;o(n)?$(this).parent(".payment-popover").removeClass("loading"):document.location.href=n})}return!0},close:t,showBonusInfo:s,closeBonusInfo:function(){e?document.location=document.location:global.hideContentPage("#bonus-info-content")},options:function(n){"minHeight"in n&&(i=n.minHeight);"scrollToTop"in n&&(r=n.scrollToTop)},disable:function(n){u=n},redirect:function(n){f=n},isValidUrl:o}}();BrowserInfo={OPERA:!1,FIREFOX:!1,MSIE:!1,MSIEVERSION:11,SAFARI:!1,CHROME:!1,CHROMEVERSION:0,Name:"",Check:function(){var n=(window.navigator.userAgent+window.navigator.vendor).toUpperCase();this.FIREFOX=n.indexOf(Enum.Browser.FireFox)!=-1;this.MSIE=n.indexOf(Enum.Browser.InternetExplorer)!=-1;this.OPERA=n.indexOf(Enum.Browser.Opera)!=-1;this.SAFARI=n.indexOf(Enum.Browser.Safari)!=-1;this.CHROME=n.indexOf(Enum.Browser.Chrome)!=-1;switch(!0){case this.FIREFOX:this.Name=Enum.Browser.FireFox;break;case this.OPERA:this.Name=Enum.Browser.Opera;break;case this.CHROME:this.Name=Enum.Browser.Chrome;break;case this.MSIE:this.Name=Enum.Browser.InternetExplorer;break;case this.SAFARI:this.Name=Enum.Browser.Safari}this.CHROME&&(this.CHROMEVERSION=n.substr(n.indexOf(Enum.Browser.Chrome)+7,10).split(".")[0]);this.MSIE&&(this.MSIEVERSION=parseInt(window.navigator.appVersion.substr(window.navigator.appVersion.toUpperCase().indexOf(Enum.Browser.InternetExplorer)+5,10).split(".")[0],10))}};BrowserInfo.Check();FlashMessages=function(){$(function(){$(".flash-messages").on("click",".dialog-close",function(){$(this).parents(".flash-message").attr("data-name")==="maintenance"?$(this).parents('.flash-message[data-name="maintenance"]').hide():$(this).parents(".flash-message").remove()})})}();PostCode=function(){var n={};return{init:function(t,i){var r=this;return n={cities:{txt:$(i.cities.txt),ddb:$(i.cities.ddb)},regions:{txt:$(i.regions.txt),ddb:$(i.regions.ddb),hdd:$(i.regions.hdd)},postCode:$(i.postcode)},n.populate=n.cities.ddb,n.postCode.subscribeDebounce("keyup",800,function(){r.Send(t)}),n.postCode.blur(function(){r.Send(t,function(){r.ShowError(t)})}),n.regions.ddb.change(function(){n.regions.hdd.val(n.regions.ddb.val())}),n},ShowError:function(t){var i=t.getPOBoxError(),r;i!==""&&n.postCode.val()!==""&&(r={PostCode:i},$("#RegisterForm").validate().showErrors(r))},Send:function(t,i){var r=this;t.setPostCode(n.postCode.val(),function(r){t.populateCities(n.populate);r.poBoxInfo.length>0&&(n.populate.get(0).tagName.toLowerCase()=="input"?n.cities.txt.val(r.poBoxInfo[0].city):(n.cities.txt.val(n.cities.ddb.val()),$("#City").length&&$.isFunction($("#City").valid)&&$("#City").valid()));n.regions.ddb.empty();r.regions.length>0&&($.each(r.regions,function(t,i){n.regions.ddb.append(new Option(i.value,i.key))}),n.regions.hdd.val(n.regions.ddb.val()),n.regions.ddb.valid());n.regions.ddb.trigger("populate");$.isFunction(i)&&i()})}}}();TennisOddWrapper={getQuote:function(n){return Format.Odd(Global.Round(n/100,2),gBS.GetOddFormat())},isActiveTab:function(n){return gBS.GetBet(n)!=null}};$("#accountLogoutBtn").on("click",function(){sessionStorage.removeItem("casinofilterSearchtext");sessionStorage.removeItem("casinofilterMinstake");sessionStorage.removeItem("casinofilterMaxstake");sessionStorage.removeItem("casinofilterVM")});var Actions={Participate:function(n,t,i){$.ajax({type:"POST",url:"/Calendar/CustomerParticipate",data:{category:t,listname:i,url:document.URL},dataType:"json",success:function(t){t.success&&$(n).children("a").remove()}})}},FlutterwaveBankTransferPayout=function(){function n(){}function t(n){return $("#BankBranchFilter").html(""),$.get(app.path+"/payout/loadflutterwavebankbranches",{bankId:n},function(n){$("#bank-branches-container").html(n)}).always(function(){$("#BankBranchFilter").prop("disabled",!1)})}return{init:n,loadBankBrankches:t}}(),InputLabels=function(){function t(t,i){i.is("select")?t.toggleClass(n,i.children("option:selected").text()!==""):i.is(":focus")?t.toggleClass(n,!0):i.prop("type")==="number"&&i[0].validity?t.toggleClass(n,i.val()!==""||i.val()===""&&!i[0].validity.valid):t.toggleClass(n,i.val()!=="")}var n="withvalue";return{init:function(){InputLabels.initWithRoot(document)},initWithRoot:function(i){$(i).find(".input").each(function(){var i=$(this);if(i.hasClass("withvalue")||t(i,i.find("input,textarea,select")),i.find("input,textarea,select").length){i.children("input,textarea").on("focus",function(){i.addClass(n)});i.children("input,textarea").on("blur change input",function(){t(i,$(this))});i.children("select").on("change",function(){t(i,$(this))})}i.children("select").on("populate",function(){t(i,$(this))})})},refresh:function(n){var i=$(n).parents(".input");i.length&&t(i,$(n))}}}();InputLabels.init(),function(n){var t=function(){function n(n,t){var e=this,i,o;this.eventsUrl=n;this.numberOfPages=t;this._scrollingActive=!1;this._offerIsLoading=!1;this._currentPageIndex=0;this._lazyLoadingDelay=250;this._$todayEvents=$("#todayEvents");var r=Common.UrlHelper.getHashValues(),u=r.hasOwnProperty("kosId")?parseInt(r.kosId):10,f=r.hasOwnProperty("page")?parseInt(r.page):0;(u!=10||f!=0)&&(i=this.cache,i?(o=(new Date).valueOf()-i.time,i.kos==u&&i.page==f&&f>0&&o<=6e5?(this._$todayEvents.html(i.content),this._currentPageIndex=i.page,this.updateKosHtml(i.kos)):this.getTodaysEvents(u)):this.getTodaysEvents(u));$(window).scroll(function(){e._scrollingActive=!0});setInterval(function(){e.checkLazyLoading()},this._lazyLoadingDelay)}return n.prototype.checkLazyLoading=function(){if(this._scrollingActive&&!this._offerIsLoading){this._scrollingActive=!1;var n=$("#lazy-div").offset().top,t=$("#lazy-div").outerHeight(),i=$(window).height(),r=$(window).scrollTop();r>n+t-i&&this.numberOfPages>this._currentPageIndex+1&&this.getTodaysEventsLazy()}},Object.defineProperty(n.prototype,"cacheKey",{get:function(){return"_events_cache_"+this.eventsUrl},enumerable:!1,configurable:!0}),n.prototype.updateKos=function(){var n=this.getSelectedKos();this.getTodaysEvents(n,0)},n.prototype.updateKosHtml=function(n){$("#today-kos").val(n.toString());$("#kosSelectIcon").attr("class","kos icon_"+n)},n.prototype.getSelectedKos=function(){return $("#today-kos").val()},n.prototype.setLoadingState=function(n){n?($("#today-offertype").attr("disabled","disabled"),$("#today-kos").attr("disabled","disabled")):($("#today-offertype").removeAttr("disabled"),$("#today-kos").removeAttr("disabled"))},n.prototype.getTodaysEventsLazy=function(){var n=this.getSelectedKos();this.getTodaysEvents(n,this._currentPageIndex+1)},n.prototype.getTodaysEvents=function(n,t){var i=this;t===void 0&&(t=0);this._eventsRequest!=null&&this._eventsRequest.abort();this.setLoadingState(!0);this._eventsRequest=$.get(this.eventsUrl,{kosId:n,pageIndex:t},function(r){i.numberOfPages=r.pageCount;t==0&&(i._$todayEvents.empty(),i.setOfferTypeAndHeader(r.selectedOfferTypeId,r.offerGroupHeaderItems),(n!=null||n==0)&&Common.UrlHelper.setHashValue("kosId",n.toString()));i._$todayEvents.append(r.eventsHtml);i.updateKosHtml(n);i.setLoadingState(!1);i._currentPageIndex=t;i._eventsRequest=null;t>0?(Common.UrlHelper.setHashValue("page",t.toString()),i.cache={content:i._$todayEvents.html(),kos:n,page:t,time:(new Date).valueOf()}):(Common.UrlHelper.setHashValue("page",null),i.cache=undefined)},"json")},Object.defineProperty(n.prototype,"cache",{get:function(){if(window.sessionStorage){var n=sessionStorage.getItem(this.cacheKey);if(n!=null)return JSON.parse(n)}},set:function(n){window.sessionStorage&&(n?sessionStorage.setItem(this.cacheKey,JSON.stringify(n)):sessionStorage.removeItem(this.cacheKey))},enumerable:!1,configurable:!0}),n.prototype.setOfferTypeAndHeader=function(n,t){var u=$("#today-offertype"),r,i;for(u.val(n),r="",i=0;i<t.length;i++)r+="<div class='offeritem description'>"+t[i]+"<\/div>";$("#divDescription").html(r)},n}();n.MobileSportIndex=t}(Prematch||(Prematch={})),function(n){var t=function(){function n(n){var t=this;this._onClosed=n.onClosed;this.create(n);this._dialog=this._element.querySelector(".dialog");document.body.appendChild(this._element);n.content&&this.setContent(n.content);n.open&&n.open.addEventListener("click",function(){t.open()});window.addEventListener("resize",function(){t.setPosition()})}return Object.defineProperty(n.prototype,"title",{set:function(n){var t=this._element.querySelector(".dialog-title > span");t&&(t.innerText=n)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dialogClass",{get:function(){return this._dialog.classList},enumerable:!1,configurable:!0}),n.prototype.setContent=function(n){this._contentElement=this._element.querySelector(".dialog-content");this._contentElement&&(this._content&&this._content.remove(),n!=null&&(this._content=Common.Helper.getNode(n),this._content.style.display="block",this._contentElement.appendChild(this._content)),this.setPosition())},n.prototype.open=function(){this._element.classList.remove("collapsed");this.setPosition()},n.prototype.close=function(){this._element.classList.contains("collapsed")||(this._element.classList.add("collapsed"),this._onClosed&&this._onClosed())},n.prototype.create=function(n){var u,f=this,e='<div class="overlay dlg-overlay abs collapsed"><div class="dialog">'+this.titleElement(n.title)+'<div class="dialog-content" style="overflow:auto;"><\/div><\/div><\/div>',t=Common.Helper.getNode(e.trim()),i=t.querySelector(".dialog"),r;this._element=t;this.setContent(n.content);n.cssClass&&(u=i.classList).add.apply(u,n.cssClass.split(" "));n.width&&(i.style.width=n.width);n.maxWidth&&(i.style.maxWidth=n.maxWidth);this._contentElement!=null&&(n.height&&(this._contentElement.style.height=n.height),n.maxHeight&&(this._contentElement.style.maxHeight=n.maxHeight));r=t.querySelector(".dialog-title .dialog-close");r&&r.addEventListener("click",function(){f.close()});t.addEventListener("click",function(n){n.target==t&&f.close()});n.buttons&&i.appendChild(this.buttonsElement(n.buttons))},n.prototype.buttonsElement=function(n){for(var t,i,u,f=Common.Helper.getNode('<div class="dialog-buttons"><\/div>'),r=0,e=n;r<e.length;r++)t=e[r],i=Common.Helper.getNode('<button type="button" class="button"><\/button>\''),i.innerText=t.text,t.dataCy&&i.setAttribute("data-cy",t.dataCy),t.cssClass&&(u=i.classList).add.apply(u,t.cssClass.split(" ")),t.id&&(i.id=t.id),t.click&&i.addEventListener("click",t.click),f.appendChild(i);return f},n.prototype.titleElement=function(n){return'<h2 class="dialog-title"><span>'+(n||"")+'<\/span> <button type="button" class="icon dialog-close" data-cy="x-close"><\/button><\/h2>'},n.prototype.setPosition=function(){var n=this._element.querySelector(".dialog");n&&(this._contentElement.style.maxHeight=window.innerHeight-120+"px",n.style.top=window.innerHeight/2-n.offsetHeight/2+"px",n.style.left=window.innerWidth/2-n.offsetWidth/2+"px")},n}();n.Dialog=t}(Tools||(Tools={})),function(n){function i(n,i){i.style.display="block";var r=i.offsetHeight;i.style.maxHeight="0px";i.style.transition="max-height 0.3s, padding 0.3s";i.style.overflow="hidden";n.classList.add(t);setTimeout(function(){i.style.maxHeight=r+"px"},1);setTimeout(function(){i.style.maxHeight=""},300)}function r(n,i){var r=i.offsetHeight;i.style.maxHeight=r+"px";i.style.padding="0";n.classList.remove(t);setTimeout(function(){i.style.maxHeight="0px"},1);setTimeout(function(){i.style.display="none";i.style.maxHeight="";i.style.padding=""},300)}function u(n){if(n){var t=n.querySelectorAll("h1, h2, h3");t.forEach(function(n){var t=n.nextElementSibling;t&&t.tagName=="DIV"&&(t.style.display="none",n.addEventListener("click",function(){t.style.display=="block"?r(n,t):i(n,t)}))})}}var t="accordion-active";n.accordion=u}(Tools||(Tools={})),function(n){var t=function(){function n(n){var t=this,i;this.options=n;this.inputelement=document.getElementById(n.targetId);this.parent=document.getElementById(n.parentId);this.minLength=n.minlength?n.minlength:2;this.highlight=n.highlight?n.highlight:!1;this.inputelement&&this.parent&&(i=Common.Helper.debounce(function(){t.inputelement.value.length>=t.minLength&&n.source(t.inputelement.value,function(n){t.createResults(n)})},n.debounceTime?n.debounceTime:500),this.inputelement.addEventListener("input",i),this.inputelement.addEventListener("blur",function(){t.hideResults()}))}return n.prototype.hideResults=function(){this.resultsElement&&(this.resultsElement.style.display="none")},n.prototype.showResults=function(){this.resultsElement&&document.activeElement==this.inputelement&&(this.resultsElement.style.display="block")},n.prototype.createResults=function(n){var r=this,u,f,i,t;if(this.resultsElement?this.resultsElement.innerHTML="":(this.resultsElement=Common.Helper.getNode('<ul class="autocomplete-results" style="display: none;"><\/ul>'),this.resultsElement.addEventListener("mousedown",function(n){var t=n.target.closest("li"),i;if(r.inputelement.value=t.getAttribute("data-value"),r.options.onSelect){i=t.getAttribute("data-key");r.options.onSelect(i)}r.hideResults();n.preventDefault()}),this.parent.appendChild(this.resultsElement)),n&&n.length){for(u=0,f=n;u<f.length;u++)i=f[u],t=document.createElement("li"),t.setAttribute("tabindex","-1"),t.setAttribute("data-value",i.value),i.key&&t.setAttribute("data-key",i.key),t.innerHTML=this.itemHtml(i.value),this.resultsElement.appendChild(t);this.showResults()}else this.hideResults()},n.prototype.itemHtml=function(n){var s=document.createElement("div"),e=function(n){return s.innerText=n,s.innerHTML},i,t,f;if(!this.highlight)return e(n);for(var r=[],u=0,o=this.inputelement.value;u<n.length;)if(i=u==0?n:n.substr(u),t=i.toLowerCase().indexOf(o.toLowerCase()),t<0){r.push(e(i));break}else t>0&&r.push(e(i.substr(0,t))),f=document.createElement("span"),f.classList.add("searchhighlight"),f.innerText=i.substr(t,o.length),r.push(f.outerHTML),u+=t+o.length;return r.join("")},n}();n.Autocomplete=t}(Tools||(Tools={})),function(n){var t;(function(n){function t(n,t){var i=document.querySelector("input[name="+t+"_state]");i&&(i.value=n.open?"True":"False")}n.toggle=t})(t=n.Expander||(n.Expander={}))}(Tools||(Tools={})),function(n){var t=function(){function n(t){this.options=t;n._tooltips.push(this);this.create(t);this.setContent(t.content)}return n.prototype.create=function(n){var t,i=this;this._element=Common.Helper.getNode('<div class="tooltip collapsed"><\/div>');n.parent?n.parent.appendChild(this._element):document.body.appendChild(this._element);n.cssClass!==undefined&&(t=this._element.classList).add.apply(t,n.cssClass.split(" "));this._element.addEventListener("click",function(n){n.target instanceof HTMLLabelElement&&n.target.classList.contains("close")&&i.hide()})},n.prototype.setContent=function(n){this._element.innerHTML="";typeof n=="string"&&(n="<div>"+n+"<\/div>");this._element.appendChild(Common.Helper.getNode('<label class="icon close"><\/label>'));this._element.appendChild(Common.Helper.getNode(n))},n.prototype.hide=function(){this._element.classList.add("collapsed")},n.prototype.show=function(t){n._tooltips.forEach(function(n){return n.hide()});var i=t.getBoundingClientRect(),r=i.top+i.height+10;this.options.parent||(r+=window.pageYOffset);this._element.style.top=r+"px";this._element.classList.remove("collapsed")},n._tooltips=[],n}();n.Tooltip=t}(Tools||(Tools={})),function(n){var f,u,i,w,b,k,e,d,o,s,t,h,r,c,l,a,v,y,p,g;(function(n){n[n.Web=0]="Web";n[n.Mobile=1]="Mobile";n[n.Smartphone=2]="Smartphone";n[n.Tablet=3]="Tablet"})(f=n.Platform||(n.Platform={})),function(n){n[n.Info=0]="Info";n[n.Warning=1]="Warning";n[n.Error=2]="Error"}(u=n.WebLogType||(n.WebLogType={})),function(n){n[n.EU=0]="EU";n[n.US=1]="US";n[n.UK=2]="UK"}(i=n.OddFormat||(n.OddFormat={})),function(n){n[n.Text=0]="Text";n[n.Xml=1]="Xml";n[n.Json=2]="Json";n[n.JsonP=3]="JsonP";n[n.Html=4]="Html";n[n.Script=5]="Script"}(w=n.DataTypes||(n.DataTypes={})),function(n){n[n.None=-1]="None";n[n.Sportsbook=0]="Sportsbook";n[n.Casino=1]="Casino";n[n.Games=2]="Games";n[n.Live=3]="Live";n[n.LiveCasino=4]="LiveCasino";n[n.VirtualSports=5]="VirtualSports";n[n.Mobile=6]="Mobile";n[n.ESports=8]="ESports";n[n.Anniversary=9]="Anniversary";n[n.Christmas=10]="Christmas";n[n.QuickLive=11]="QuickLive";n[n.VirtualSport=12]="VirtualSport";n[n.Slots=13]="Slots"}(b=n.ProductTab||(n.ProductTab={})),function(n){n[n.None=0]="None";n[n.Microgaming=-1]="Microgaming";n[n.NetEnt=-3]="NetEnt";n[n.NeoGames=7]="NeoGames";n[n.Evolution=10]="Evolution";n[n.NetEntLiveCasino=13]="NetEntLiveCasino";n[n.ISoftBet=14]="ISoftBet";n[n.BetSoft=16]="BetSoft";n[n.PragmaticPlay=18]="PragmaticPlay";n[n.Yggdrasil=19]="Yggdrasil";n[n.PlaynGo=20]="PlaynGo";n[n.Quickspin=21]="Quickspin";n[n.VirtualSport=22]="VirtualSport";n[n.RedTiger=23]="RedTiger";n[n.GoldenRace=24]="GoldenRace";n[n.ProbabilityJones=25]="ProbabilityJones"}(k=n.Provider||(n.Provider={})),function(n){n[n.Float=1]="Float";n[n.Integer=2]="Integer"}(e=n.KeyCodeMode||(n.KeyCodeMode={})),function(n){n[n.LI=0]="LI";n[n.MA=1]="MA";n[n.SB=2]="SB";n[n.CA=3]="CA";n[n.MI=4]="MI"}(d=n.SegmentationType||(n.SegmentationType={}));o=function(){function n(){}return n.create=function(n,t,i){var f=r.instance.path+r.instance.language+"/Error/";switch(n){case u.Info:f+="LogInfo/";break;case u.Warning:f+="LogWarning/";break;case u.Error:f+="LogError/"}$.ajax({type:"POST",url:f,data:{message:encodeURI(t).replace(/\'/gi,""),detail:encodeURI(i).replace(/\'/gi,"")},dataType:"json",success:function(){}})},n}();n.WebLog=o;s=function(){function i(){}return i.round=function(n,t,i){var r,u,f;return t===void 0&&(t=0),i===void 0&&(i=!0),r=n.toString(),t>0&&t<15&&(u=Math.pow(10,t),f=i?Math.round(n*u):Math.floor(n*u),r=(f/u).toString(),r.indexOf(".")==-1&&(r+="."),r+=u.toString().substring(1),r=r.substring(0,r.indexOf(".")+t+1)),r},i.getFormatedOdd=function(n){return t.oddLocale(n/100,i.getOddFormat(r.instance.oddFormat))},i.getFormatedMoney=function(n,i){return i===void 0&&(i=2),t.numberLocale(n,i)},i.getFormatedNumber=function(n,i){return i===void 0&&(i=2),t.number(""+Number(this.round(n,i)))},i.getStake=function(n){var t="";return n>0&&(t=this.getFormatedMoney(n)),t},i.getOddFormat=function(t){switch(t.toLowerCase()){case"uk":return n.OddFormat.UK;case"us":return n.OddFormat.US;case"eu":default:return n.OddFormat.EU}},i.isKeyCodeValid=function(n,t){var u=String.fromCharCode(typeof t.which=="number"?t.which:t.keyCode),i=null,f,r;switch(n){case e.Integer:i="^[0-9]$";break;case e.Float:i="^[0-9.,\b]$"}return f=new RegExp(i),r=f.exec(u),r!=null&&u==r[0]},i.toggle=function(n,t,i){n&&(n.classList.contains(t)?(n.classList.remove(t),n.classList.add(i)):(n.classList.remove(i),n.classList.add(t)))},i.isFunction=function(n){return n&&{}.toString.call(n)==="[object Function]"},i.getNode=function(n){if(n instanceof HTMLElement)return n;var t=document.createElement("div");return t.innerHTML=n,t.firstElementChild},i.copyInput=function(n){if(n&&(n.select(),n.setSelectionRange(0,n.value.length),document.execCommand("copy"),document.getSelection)){var t=document.getSelection();t.removeAllRanges&&document.getSelection().removeAllRanges()}},i.debounce=function(n,t){var i;return function(){for(var u=[],r=0;r<arguments.length;r++)u[r]=arguments[r];i&&clearTimeout(i);i=setTimeout(function(){i=0;n.apply(void 0,u)},t)}},i}();n.Helper=s;t=function(){function n(){}return n.money=function(n){var t=n.toString().replace(/[^\d\.]/g,""),i;for(n=Number(t),isNaN(n)&&(n=0),t=n.toFixed(2).replace(".",","),i=t.length-6;i>0;i-=3)t=t.substr(0,i)+"."+t.substr(i);return t},n.number=function(n,t){t===void 0&&(t=0);var i=n.toString().replace(/\./g,",");return i=i.replace(/[,]/,"."),i=i.replace(/[,]/g,""),t==1&&(i=i.replace(/\./g,",")),i},n.numberLocale=function(n,t){return t===void 0&&(t=2),n.toLocaleString(License.CurrentLicense.get().currentCulture(),{minimumFractionDigits:t,maximumFractionDigits:t})},n.odd=function(n,t){switch(t){case i.UK:return this.getUkFormat(Number(n));case i.US:var r=this.getUsFormat(Number(n));return r>0?"+"+r.toString():r.toString()}return this.number(n,1)},n.oddLocale=function(n,t){switch(t){case i.UK:return this.getUkFormat(n);case i.US:var r=this.getUsFormat(n);return r>0?"+"+r.toString():r.toString()}return this.numberLocale(n).replace(",",".")},n.getUkFormat=function(n){if(n<=1)return"0/1";return new h((n-1)*100,100).convertToString()},n.getUsFormat=function(n){return n<=1?0:n<2?this.abs((this.invert(n)-1)*-100):this.abs((n-1)*100)},n.invert=function(n){return 1/(n-1)+1},n.abs=function(n){var t=Math.round(Number(s.round(n,2)));return parseInt(t.toString(),10)},n}();n.Format=t;h=function(){function n(n,t){this._num=n;this._den=t}return n.prototype.convertToString=function(){var n=t.abs(this._num),i=t.abs(this._den),r=this.ggt(n,i);return""+(this._num<0||this._den<0?"-":"")+n/r+"/"+i/r},n.prototype.ggt=function(n,t){return n>0?this.ggt(t%n,n):t},n}();n.Fraction=h;r=function(){function t(){this._path="";this._country="";this._language="";this._oddFormat="";this._currency="";this._platform=f.Web;this._betRadarwidgetIframeUrl="";this._eSportsIds=[1077,1078,1079,1080,1082,1083,1084,1088];this._license=License.CurrentLicense.get()}return Object.defineProperty(t,"instance",{get:function(){return this._instance==null&&(this._instance=new t),this._instance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"platform",{get:function(){return this._platform},set:function(n){this._platform=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"country",{get:function(){return this._country},set:function(n){this._country=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currency",{get:function(){return this._currency},set:function(n){this._currency=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"license",{get:function(){return this._license},set:function(n){this._license=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLivePage",{get:function(){return this._isLivePage},set:function(n){this._isLivePage=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"language",{get:function(){return this._language},set:function(n){switch(n.toLowerCase()){case"sp":this._language="es";break;case"gr":this._language="el";break;default:this._language=n}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLoggedIn",{get:function(){return this._isLoggedIn},set:function(n){this._isLoggedIn=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"points",{get:function(){return this._points},set:function(n){this._points=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"accountBalance",{get:function(){return this._accountBalance},set:function(n){this._accountBalance=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stakeEntry",{get:function(){return this._stakeEntry},set:function(n){this._stakeEntry=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"segmentation",{get:function(){return this._segmentation==null&&(this._segmentation=new n.Account.Segmentation({kos:0,casino:"MI"})),this._segmentation},set:function(t){this._segmentation==null&&(this._segmentation=new n.Account.Segmentation(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"languageIW",{get:function(){switch(this._language){case"el":return"gr";case"es":return"sp"}return this._language},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this._path},set:function(n){this._path=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"oddFormat",{get:function(){return this._oddFormat},set:function(n){this._oddFormat=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"eSportsIds",{get:function(){return this._eSportsIds},set:function(n){this._eSportsIds=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"betRadarwidgetIframeUrl",{get:function(){return this._betRadarwidgetIframeUrl},set:function(n){this._betRadarwidgetIframeUrl=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isInterWettenUser",{get:function(){return this._isInterWettenUser},set:function(n){this._isInterWettenUser=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visualizationEnabled",{get:function(){return this._visualizationEnabled},set:function(n){this._visualizationEnabled=n},enumerable:!1,configurable:!0}),t._instance=null,t}();n.Application=r;c=function(){function n(){}return n.track=function(n,t,i,r){r===void 0&&(r=!1);try{appInsights.trackException(new Error("Connection Hub Error"),"BaseClient.Hub.Error",{message:t,detail:i})}catch(u){r&&o.create(n,t,i)}},n}();n.AppInsights=c;l=function(){function n(){}return n.open=function(n){if(n){var t=["no","yes"],f=n.name&&n.name.length>0?n.name:"__blank",i=n.width&&n.width>0?n.width:640,r=n.height&&n.height>0?n.height:480,e=t[Number(n.resizable||!1)],o=t[Number(n.statusbar||!1)],s=t[Number(n.scrollbars||!1)],h=window.screen.availHeight/2-r/2,c=window.screen.availWidth/2-i/2,l=Extensions.String.Format("width=@0,height=@1,scrollbars=@2,resizable=@3,status=@4,left=@5,top=@6",[i,r,s,e,o,c,h]),u=window.open(n.url,f,l);u&&u.focus()}},n}();n.Popup=l;a=function(){function t(){}return t.get=function(t,i,r,u,f){return u===void 0&&(u=500),f===void 0&&(f=!0),this._dialog=n.JqueryUi.dialog({ids:{target:t,cancel:null},css:r,titleBarText:i,width:this.getWidth(u),height:"auto",isClosest:f,isEscape:!0}),this._dialog},t.getWidth=function(t){if(t==0)switch(n.Application.instance.platform){case f.Smartphone:return"90%";default:return 500}else return t},t}();n.Dialog=a;v=function(){function n(){}return n.write=function(n,t){t===void 0&&(t=!1);var r="divDebugWindow",i=$("#"+r);i.length==0&&(i=$("<div><\/div>").attr("id",r).css({position:"fixed",bottom:"1px",left:"1px",backgroundColor:"#eeeeee",border:"1px #d3d3d3 solid",padding:"5px",zIndex:1010}).appendTo(document.body));t?i.html((i.html().length>0?i.html()+"<br/>":"")+n):i.html(n)},n}();n.Debug=v;y=function(){function n(){}return n.show=function(n){var r=this,t=document.getElementById(n),i;t&&(i=t.children.item(0),i&&(t.classList.remove("none"),this.setPosition(n),i.addEventListener("click",function(){r.close(n)}),window.addEventListener("resize",function(){r.setPosition(n)})))},n.setPosition=function(n){var t=document.getElementById(n);t&&(t.style.left=window.innerWidth/2-t.offsetWidth/2+"px")},n.close=function(n){var t=document.getElementById(n);t&&t.classList.add("none")},n}();n.MessageBox=y;p=function(){function n(){}return n.validateElements=function(n,t,i){return n!==undefined&&t!==undefined&&i!==undefined},n.validateMaxHeight=function(n,t){return n<=0||t<=0?!1:n>=t?!1:!0},n.init=function(t,i,r,u,f){var e=document.getElementsByClassName(t)[0],o=document.getElementsByClassName(i)[0],s=document.getElementsByClassName(r)[0];if(n.validateElements(e,o,s)&&n.validateMaxHeight(u,f)){if(e.clientHeight<u){o.style.display="none";return}o.addEventListener("click",function(){e.style.maxHeight=f+"px";this.style.display="none";s.style.display="block"});s.addEventListener("click",function(){e.style.maxHeight=u+"px";this.style.display="none";o.style.display="block"})}},n}();n.CustomContent=p,function(t){function r(t){var i="";t&&(t.addEventListener("paste",function(n){n.preventDefault()}),t.addEventListener("keypress",function(r){var f=t.value,u=String.fromCharCode(r.which?r.which:r.keyCode);if(u){switch(u){case n.Application.instance.license.separator.tochange:u=n.Application.instance.license.separator.allowed;case n.Application.instance.license.separator.allowed:f.length<t.maxLength&&f.indexOf(u)==-1&&(f.length==0?f=0+u:f+=u,t.value=f);r.preventDefault();break;default:isNaN(Number(u))&&r.preventDefault()}i=t.value}}),t.addEventListener("input",function(){t.value.match("["+n.Application.instance.license.separator.allowed+"]\\d{3}$")&&(t.value=i)}))}function u(n,t,r,u){var f=String.fromCharCode(n.charCode?n.charCode:n.which);if(!t.test(f))return n.preventDefault(),u&&i("invalidChars",r,!0),!1;u&&i("invalidChars",r,!1)}function f(n,t,r,u){var f=null,e;if(f=n instanceof ClipboardEvent?n.clipboardData.getData("text"):n.data,!t.test(f))return n.cancelable?n.preventDefault():(e=n.currentTarget,e.value=e.value.slice(0,-f.length)),u&&i("invalidChars",r,!0),!1;u&&i("invalidChars",r,!1)}function i(n,t,i){var u=document.getElementById(t),r=null;u?(r=u.parentElement.querySelector('.boxmsg[data-placeholderId="'+n+'"]'),r||(r=u.parentElement.parentElement.querySelector('.boxmsg[data-placeholderId="'+n+'"]'))):r=document.querySelector('.boxmsg[data-placeholderId="'+n+'"]');r.style.display=i?"block":"none"}t.toMoney=r;t.checkInputChar=u;t.checkInputString=f;t.ShowInvalidCharsMessage=i}(g=n.Validate||(n.Validate={}))}(Common||(Common={})),function(n){var t;(function(n){function t(n,t){for(var u,f,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];n&&(t?(u=n.classList).add.apply(u,r):(f=n.classList).remove.apply(f,r))}n.setClass=t})(t=n.DOM||(n.DOM={}))}(Common||(Common={})),function(n){var t,i;(function(n){n[n.GET=0]="GET";n[n.POST=1]="POST"})(t=n.AjaxCallType||(n.AjaxCallType={}));i=function(){function i(n){n===void 0&&(n=null);this._args={type:t[t.POST],contentType:"application/json;charset=utf-8",dataType:"Json",overwrite:!0,async:!0};n!=null?(this._args.controller=n.controller||"",this._args.queue=n.queue||"",this._args.type=t[n.type]||t[t.POST]):(this._args.controller="",this._args.queue="")}return Object.defineProperty(i.prototype,"args",{get:function(){return this._args},enumerable:!1,configurable:!0}),i.prototype.execute=function(t,i,r){return i===void 0&&(i=null),r===void 0&&(r=null),this._args.overwrite&&(this._args.url=this._args.controller.length>0?this.basicPath+n.Application.instance.path+this._args.controller+"/"+t:ajaxBasicPath+"/"+t),this._args.data=r||null,this._args.success=i||function(){},this._args.queue.length==0?$.ajax(this._args):$.ajaxq(this._args.queue,this._args)},Object.defineProperty(i.prototype,"basicPath",{get:function(){return n.Application.instance.path.charAt(0)=="/"?"":"/"},enumerable:!1,configurable:!0}),i}();n.AjaxCall=i}(Common||(Common={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var i,c,t,r,u,f,e,o,s,h;(function(n){n[n.Common=0]="Common";n[n.Spain=7]="Spain";n[n.Betworld=12]="Betworld";n[n.Greece=13]="Greece";n[n.Sweden=17]="Sweden";n[n.CoteDiVoire=18]="CoteDiVoire";n[n.Nigeria=19]="Nigeria"})(i=n.LicenseType||(n.LicenseType={}));c=function(){function n(){}return n.set=function(n,t){t===void 0&&(t=!1);switch(n){case i.Spain:this._license=new u(n);break;case i.Greece:this._license=new e(n);break;case i.Nigeria:this._license=new f(n,t);break;case i.Betworld:case i.CoteDiVoire:this._license=new o(n);break;case i.Sweden:this._license=new s(n);break;default:this._license=new r(n)}},n.get=function(){return this._license},n}();n.CurrentLicense=c;t=function(){function n(n){this._url=new h;this._decimalPositions=2;this._helpHost="help.interwetten.com";this._liveScoreCss="bg y";this._licenseType=n;this._currentCulture="de-DE";this._currentLocale="de";this._separator={allowed:",",tochange:"."};this._cssEvenOdd=!1;this._enableLiveStats=!0;this._isCounterRequired=!0;this._isStreamAvailable=!0;this._furtherHelpAllowed=!0;this._shareaBet=!1;this._maxBets=20}return Object.defineProperty(n.prototype,"url",{get:function(){return this._url},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"licenseType",{get:function(){return this._licenseType},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"helpHost",{get:function(){return this._helpHost},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"showLiveIcon",{get:function(){return this._showLiveIcon},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"showBetAssist",{get:function(){return this._showBetAssist},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"currentSystemBetAmount",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"liveScoreCss",{get:function(){return this._liveScoreCss},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"separator",{get:function(){return this._separator},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"cssEvenOdd",{get:function(){return this._cssEvenOdd},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"deleteLimits",{get:function(){return this._deleteLimits},set:function(n){this._deleteLimits=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"showTotalWin",{get:function(){return this._showTotalWin},set:function(n){this._showTotalWin=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"enableLiveStats",{get:function(){return this._enableLiveStats},set:function(n){this._enableLiveStats=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isCounterRequired",{get:function(){return this._isCounterRequired},set:function(n){this._isCounterRequired=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shareaBet",{get:function(){return this._shareaBet},set:function(n){this._shareaBet=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isStreamAvailable",{get:function(){return this._isStreamAvailable},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"decimalPositions",{set:function(n){this._decimalPositions=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"maxBets",{get:function(){return this._maxBets},set:function(n){this._maxBets=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"furtherHelpAllowed",{get:function(){return this._furtherHelpAllowed},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"addTransparentToFavoriteStar",{get:function(){return this._addTransparentToFavoriteStar},enumerable:!1,configurable:!0}),n.prototype.getTaxFactor=function(n){return n===void 0&&(n=0),n},n.prototype.formatAmount=function(n){return Common.Helper.getFormatedMoney(n,this._decimalPositions)},n.prototype.currentCulture=function(){return this._currentCulture},n.prototype.currentLocale=function(){return this._currentLocale},n}();n.Base=t;r=function(n){function t(t){var i=n.call(this,t)||this;return i._showBetAssist=!0,i}return __extends(t,n),t}(t);n.LicenseCommon=r;u=function(n){function t(t){var i=n.call(this,t)||this;return i._deleteLimits=!0,i._showBetAssist=!0,i}return __extends(t,n),t}(t);n.LicenseSpain=u;f=function(n){function t(t,i){i===void 0&&(i=!1);var r=n.call(this,t)||this;return r._isStreamAvailable=!0,r._useLocalization=i,r._furtherHelpAllowed=!1,r._separator.allowed=".",r._separator.tochange=",",r._maxBets=40,i&&(r._currentCulture="en-NG",r._currentLocale="en"),r}return __extends(t,n),t}(t);n.LicenseNigeria=f;e=function(n){function t(t){var i=n.call(this,t)||this;return i._showTotalWin=!0,i._showBetAssist=!0,i}return __extends(t,n),t.prototype.getTaxFactor=function(n){var r=0,i=0,t=100;return n>t&&(i=.15,r=(n-t)*i),t=500,n>t&&(r-=(n-t)*i,i=.2,r+=(n-t)*i),r},t}(t);n.LicenseGreece=e;o=function(n){function t(t){var i=n.call(this,t)||this;return i._helpHost="help.betworld.com",i._liveScoreCss="bg z",i._cssEvenOdd=!0,i._isCounterRequired=!1,i._isStreamAvailable=!1,i._showLiveIcon=!0,i._showBetAssist=!1,i.url.statistic="s5.sir.sportradar.com/betworld/@0/@1/@2",i.url.liveScores="ls.sir.sportradar.com/betworld/",i.url.eSportstatistic="s5.sir.sportradar.com/betworld/@0/@1/@2",i.url.eSportlivescores="ls.sir.sportradar.com/betworld/",i.url.tennisVisualisationCss="/Common/css/licenses/BW_lmtvisualization.css",i.url.bannerImage="/img/betworld/BW_Logo_515x90.png",i._addTransparentToFavoriteStar=!0,i}return __extends(t,n),t}(t);n.LicenseBetworld=o;s=function(n){function t(t){var i=n.call(this,t)||this;return i._showBetAssist=!0,i}return __extends(t,n),t}(t);n.LicenseSweden=s;h=function(){function n(){this._https="https://";this._rules="interwetten-game.casinomodule.com/";this._statistic="s5.sir.sportradar.com/interwettensir/@0/@1/@2";this._eSportstatistic="s5.sir.sportradar.com/interwettenesports/@0/@1/@2";this._liveScores="ls.sir.sportradar.com/interwettensir/@0";this._eSportlivescores="ls.sir.sportradar.com/interwettenesports/@0";this._tennisVisualisationCss="/Common/css/lmtvisualization.css";this._bannerImage="/img/interwetten/ic_logo.png"}return Object.defineProperty(n.prototype,"rules",{get:function(){return this._https+this._rules},set:function(n){this._rules=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"liveScores",{get:function(){return this._https+this._liveScores},set:function(n){this._liveScores=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"statistic",{get:function(){return this._https+this._statistic},set:function(n){this._statistic=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"eSportstatistic",{get:function(){return this._https+this._eSportstatistic},set:function(n){this._eSportstatistic=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"eSportlivescores",{get:function(){return this._https+this._eSportlivescores},set:function(n){this._eSportlivescores=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tennisVisualisationCss",{get:function(){return this._tennisVisualisationCss},set:function(n){this._tennisVisualisationCss=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"bannerImage",{get:function(){return this._bannerImage},set:function(n){this._bannerImage=n},enumerable:!1,configurable:!0}),n}();n.Url=h}(License||(License={})),function(n){var t;(function(n){function t(n,t){for(var i=0;i<t.length;i++)n=n.indexOf("{")!=-1&&n.indexOf("}")!=-1?n.replace("{"+i+"}",t[i]):n.replace(new RegExp("@"+i,"g"),t[i]);return n}function i(n,t){return n.toString().toLowerCase().indexOf(t.toLowerCase())!=-1}function r(n,t){t===void 0&&(t=!0);var r=new Date(n),i=r.toLocaleString(License.CurrentLicense.get().currentCulture(),{month:"2-digit",day:"2-digit",year:"numeric"});return t?i.substring(0,10):i.indexOf("/")>0?i.substring(0,5):i.substring(0,6)}function u(n){var r=new Date(n),t=r.getMinutes().toString(),i=r.getHours().toString();return t.length==1&&(t="0"+t),i.length==1&&(i="0"+i),i+":"+t}function f(n){var t=n.getFullYear(),i=n.getMonth()+1,r=n.getDate();return""+(r<10?"0"+r:r)+(i<10?"0"+i:i)+(t<10?"0"+t:t)}function e(n){var t=n.getFullYear(),i=n.getMonth()+1,r=n.getDate(),u=n.getHours(),f=n.getMinutes();return""+(t<10?"0"+t:t)+(i<10?"0"+i:i)+(r<10?"0"+r:r)+(u<10?"0"+u:u)+(f<10?"0"+f:f)}function o(n){var f="",t={one:",",all:/\,/gi},i={one:".",all:/\./gi},r,u;return Common.Application.instance.license.currentLocale()==="en"?f=n.toString().replace(t.all,""):(r={matches:(""+n).match(i.all),index:(""+n).indexOf(i.one)},u={matches:(""+n).match(t.all),index:(""+n).indexOf(t.one)},u.matches?r.matches?n=r.index<u.index?n.toString().replace(i.all,""):n.toString().replace(t.all,""):u.matches.length>1&&(n=n.toString().replace(t.one,"")):r.matches&&r.matches.length>1&&(n=n.toString().replace(i.one,"")),f=n.toString().replace(t.one,i.one)),Number(Common.Helper.round(Number(f),2))}function s(n){return n=="Y"||Boolean(n)==!0||(n===null||n===void 0?void 0:n.toLowerCase())=="true"}n.Format=t;n.Contains=i;n.ToShortDate=r;n.ToShortTime=u;n.ToDateNumberReverse=f;n.ToDateTimeNumber=e;n.ToNumber=o;n.ToBoolean=s})(t=n.String||(n.String={}))}(Extensions||(Extensions={})),function(n){var t;(function(n){var i=function(){function n(){}return n.initial=function(n){window.dataLayer!=null&&window.dataLayer.push({event:"GAEvent",eventCategory:n[0]||"",eventAction:n[1]||"",eventLabel:n[2]||"",eventValue:n[3]||"undefined"})},n.marketing=function(n,t,i,r,u){var f="";switch(n){case"Casino-Gamestart":f="C"+i+"#"+r;break;case"Sportsbook-League":f=i}window.dataLayer!=null&&u!=null&&window.dataLayer.push({event:"GAEvent",eventCategory:n,eventAction:t,eventLabel:f,eventValue:u})},n.EECpromotionClick=function(n){window.dataLayer!=null&&window.dataLayer.push({event:"EECpromotionClick",ecommerce:{promoClick:{promotions:[{id:n[1]||"",name:n[2]||"",creative:n[0]||"",position:"undefined"}]}}})},n.EECpromotionImpression=function(n){typeof dataLayer!=null&&window.dataLayer.push({event:"EECpromotionImpression",ecommerce:{promoClick:{promotions:[{id:n[1]||"",name:n[2]||"",creative:n[0]||"",position:"undefined"}]}}})},n.link=function(n){window.dataLayer!=null&&(document.cookie="__IW_EVENT="+escape(n[0])+"|"+escape(n[1])+"|"+escape(n[2])+(n.length>3?"|"+n[3]:"")+"; path=/; expires="+new Date((new Date).getTime()+6e4).toUTCString())},n.BettingSlipCashout=function(n){window.dataLayer!=null&&(window.dataLayer.push({event:"GAEvent",eventCategory:"Betting Slip",eventAction:"Submit Cashout",eventLabel:undefined,cashoutStake:n[0],cashoutPossibleWinnings:n[1],cashoutAmount:n[2],cashoutOdd:n[3]}),window.dataLayer.push({cashoutStake:n[0],cashoutPossibleWinnings:n[1],cashoutAmount:n[2],cashoutOdd:n[3]}))},n}(),t;n.Event=i;t=function(){function n(){}return n.initial=function(n){window.dataLayer!=null&&window.dataLayer.push({event:"VirtualPageview",virtualPageURL:n})},n.virtual=function(n){window.dataLayer!=null&&window.dataLayer.push({event:"VirtualPageviewOnly",virtualPageURL:n.replace("#","/")})},n}();n.Page=t})(t=n.Tracking||(n.Tracking={}))}(Common||(Common={})),function(n){var t=function(){function n(){this._textIds=[]}return Object.defineProperty(n.prototype,"textIds",{get:function(){return this._textIds},enumerable:!1,configurable:!0}),n.prototype.addTextId=function(n,t){this.textIds[n.toLowerCase()]=t},n.prototype.getTextId=function(n){var t=this.textIds[n.toLowerCase()];return t?t:""},n}();n.Translation=t}(Common||(Common={}));Translation=new Common.Translation,function(n){var t=function(){function n(){}return n.getCurrentPathAndQuery=function(){return window.location.pathname+window.location.search},n.getHashValues=function(){if(window.location.hash){var n=window.location.hash.substr(1);return this.parseQuery(n)}return{}},n.getHashAsInt=function(n,t){var r=this.getHashValues(),i;return r.hasOwnProperty(n)&&(i=parseInt(r[n]),!isNaN(i))?i:t},n.setHashValue=function(n,t){var i=this.getHashValues();t!==null?i[n]=t:i.hasOwnProperty(n)&&delete i[n];Modernizr.history?history.replaceState(null,null,"#"+this.createQuery(i)):window.location.hash=this.createQuery(i)},n.parseQuery=function(n){for(var t,r={},u=n.split("&"),i=0;i<u.length;i++)t=u[i].split("="),r[decodeURIComponent(t[0])]=t.length==2?decodeURIComponent(t[1]):null;return r},n.createQuery=function(n){var i=[];for(var t in n)n.hasOwnProperty(t)&&i.push(t+"="+n[t]);return i.join("&")},n}();n.UrlHelper=t}(Common||(Common={})),function(n){function r(n){Common.Helper.isFunction(n)&&i.push(n)}function u(n,i){Common.Helper.isFunction(i)&&n.length>0&&n.split(",").forEach(function(n){var r=[];t.hasOwnProperty(n)?r=t[n]:t[n]=r;r.push(i)})}function f(n,r){t.hasOwnProperty(n)&&t[n].forEach(function(n){n(r)});i.forEach(function(t){t(n,r)})}var t={},i=[],e;n.subscribeAll=r;n.subscribe=u;n.fire=f,function(n){n.BetslipVisibilityChanged="BetslipVisibilityChanged";n.MessageSent="messageSent";n.BetAdded="betAdded";n.BetRemoved="betRemoved";n.BetCountChanged="betCountChanged";n.AccountBalanceChanged="accountBalanceChanged";n.RequestBetSlipOpen="requestBetSlipOpen";n.RequestLogin="requestLogin";n.RefreshSessionData="refreshSessionData";n.Fullscreen="setFullscreen";n.GetMenuCompleted="getMenuCompleted";n.DoLoginCompleted="doLoginCompleted";n.ClosePopover="closePopover";n.AccountData="accountData";n.BetSlipBetsSubmitted="BetSlipBetsSubmitted";n.BetSlipLoaded="BettingSlipLoaded"}(e=n.Messages||(n.Messages={}))}(MessageBroker||(MessageBroker={}));AppCallbackInterface=function(n){function u(){if(r!=null)while(i.length>0){var n=i.shift();r.postMessage(n)}}function t(n,t){i.push({message:n,data:t});u()}var i=[],r=null;return n.subscribeAll(function(n,i){(i==undefined||i._fromExternal!==!0)&&t("messageSent",{message:n,payload:i})}),{postMessage:t,setMessageRelay:function(n){r=n;u()},betAdded:function(n,i){t("betAdded",{count:n,betSlipData:i})},betCountChanged:function(n){t("betCountChanged",{count:n})},accountBalanceChanged:function(n,i){t("accountBalanceChanged",{balance:n,accountBalance:i})},requestBetSlipOpen:function(n){t("requestBetSlipOpen",{showCashout:n})},requestLogin:function(n){t("requestLogin",{returnURL:n})},refreshSessionData:function(n){t("accountData",n)},fullscreen:function(n){t("setFullscreen",{fullScreenEnabled:n})}}}(MessageBroker),function(n){var t,i;(function(n){n[n.Banner=0]="Banner";n[n.Dialog=1]="Dialog"})(t=n.StickyDisplayType||(n.StickyDisplayType={})),function(n){function o(){return/(iPhone|iPod|iPad)/i.test(navigator.userAgent)&&/OS [1-4]_[_\d]* like Mac OS X/i.test(navigator.userAgent)}function f(){return window.pageYOffset+window.innerHeight-i.offsetHeight+"px"}function e(n,t,i){i===void 0&&(i="");try{Common.Tracking.Event.initial([n,t,i])}catch(r){}}function u(n,t){n===void 0&&(n=!1);t===void 0&&(t="");new Common.AjaxCall({controller:"Home"}).execute("StickyBannerClosed",function(){n&&(e("StickyBanner","Click"),window.location.href=t)})}function s(n){if(i=document.getElementById(n.contentId),i){var s=document.getElementById(n.closeId);s&&s.addEventListener("click",function(){e("StickyBanner","Close");n.displayType===t.Dialog?r.close():(u(),i.remove())});i.querySelectorAll("a").forEach(function(i){i.addEventListener("click",function(r){n.displayType===t.Dialog&&(r.preventDefault(),u(!0,i.getAttribute("href")))})});o()&&(i.style.position="absolute",i.style.bottom="auto",i.style.top=f(),window.addEventListener("scroll",function(){i.style.top=f()}));n.displayType===t.Dialog&&(r=new Tools.Dialog({content:i,width:"auto",maxWidth:"90%",cssClass:"no-header no-border",onClosed:u.bind(this)}),r.open())}}var r,i;n.init=s}(i=n.Sticky||(n.Sticky={}))}(Content||(Content={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i,u,r,f,e,o;(function(n){n[n.None=-1]="None";n[n.Days=1]="Days";n[n.Hours=2]="Hours";n[n.Minutes=3]="Minutes";n[n.Seconds=4]="Seconds"})(i=t.DateType||(t.DateType={})),function(n){n[n.None=-1]="None";n[n.Table=1]="Table";n[n.Banner=2]="Banner"}(u=t.CountDownType||(t.CountDownType={}));r=function(){function n(n){this._keyTimeOut=-1;this._element=$(n)}return n.prototype.format=function(n){return n<10?"0"+n:n},n}();t.Base=r;f=function(t){function i(i){var r=t.call(this,i)||this;return r._started=!1,r._element.length>0&&(r._date=new n.AdvancedDateTime(r._element.html())),r}return __extends(i,t),i.prototype.start=function(){this._started||(this._element.length>0&&this.tick(),this._started=!0)},i.prototype.tick=function(){var n=this;this._keyTimeOut=setTimeout(function(){n.tick()},1e3);this._element.html(this._date.addSeconds(1))},i}(r);t.Clock=f;e=function(t){function i(n){return t.call(this,n)||this}return __extends(i,t),i.prototype.start=function(t,i){if(i===void 0&&(i=null),n.Application.instance.license.isCounterRequired&&(i&&(this._method=i),this._element.length>0||this._method)){window.loadStarted!=null&&(t+=Math.round(((new Date).valueOf()-window.loadStarted)/1e3));var r=t/60;this._hours=Math.floor(r/60);this._minutes=Math.floor(r)-60*this._hours;this._seconds=t-3600*this._hours-60*this._minutes;this.tick()}},i.prototype.tick=function(){var t=this,n;this._keyTimeOut=setTimeout(function(){t.tick()},1e3);n=this.format(this._hours)+":"+this.format(this._minutes)+":"+this.format(this._seconds);this._element.length>0?this._element.html(n):this._method&&this._method(n);++this._seconds==60&&(this._seconds=0,++this._minutes==60&&(this._minutes=0,++this._hours))},i}(r);t.Counter=e;o=function(n){function t(t){var i=n.call(this,t.id)||this;return i._date=t.date,i._type=t.type,i.prepare(),i}return __extends(t,n),t.prototype.tick=function(n){switch(n){case i.Days:this._date.days=this.check(this._date.days,i.None);break;case i.Hours:this._date.hours=this.check(this._date.hours,i.Days);break;case i.Minutes:this._date.minutes=this.check(this._date.minutes,i.Hours);break;case i.Seconds:this.summary>0&&(this._date.seconds=this.check(this._date.seconds,i.Minutes),this.html())}},t.prototype.check=function(n,t){return n===0&&(n=60,this.tick(t)),--n},t.prototype.html=function(){var n=this;this._keyTimeOut=setTimeout(function(){n.tick(i.Seconds)},1e3);switch(this._type){case u.Table:this._element.find(".days").html(this.format(this._date.days));this._element.find(".hours").html(this.format(this._date.hours));this._element.find(".minutes").html(this.format(this._date.minutes));this._element.find(".seconds").html(this.format(this._date.seconds));break;case u.Banner:this.summary>0?this._element.html(this.format(24*this._date.days+this._date.hours)+" : "+this.format(this._date.minutes)+" : "+this.format(this._date.seconds)):this._element.closest("div").hide();break;default:this._element.html(this.format(this._date.days)+" : "+this.format(this._date.hours)+" : "+this.format(this._date.minutes)+" : "+this.format(this._date.seconds))}},t.prototype.prepare=function(){this._date.days<=0&&(this._date.days=0);this._date.hours<=0&&(this._date.hours=0);this._date.minutes<=0&&(this._date.minutes=0);this._date.seconds<=0&&(this._date.seconds=0)},Object.defineProperty(t.prototype,"summary",{get:function(){return this._date.seconds+this._date.minutes+this._date.hours+this._date.days},enumerable:!1,configurable:!0}),t}(r);t.CountDown=o})(t=n.Time||(n.Time={}))}(Common||(Common={})),function(n){var t;(function(n){var t=function(){function n(){}return n.showDialog=function(n,t,i,r){var u=new Tools.Dialog({content:document.querySelector(n),cssClass:"messageDialog",title:i,width:r}),f=document.querySelector(t);f&&f.addEventListener("click",function(){u.close()});u.open()},n}();n.Swiss=t})(t=n.LogOn||(n.LogOn={}))}(Common||(Common={})),function(n){var t,i;(function(n){n[n.waitingForInput=0]="waitingForInput";n[n.selected=1]="selected"})(t=n.NumpadStates||(n.NumpadStates={}));i=function(){function i(n){var t=this;this._maxLength=12;this.init(n);this._keybordKeys=document.querySelectorAll(n.keybordKeys);this._keybordKeys&&this._keybordKeys.forEach(function(n){n.addEventListener("touchend",function(){n.classList.remove("pressed");t._holdKeyTimeoutReached||t.doKeyPress(n.dataset.val);t._buttonState="";t.clearHoldTimeout()});n.addEventListener("touchstart",function(i){t._buttonState=n.dataset.val;n.classList.add("pressed");i.preventDefault();t._holdKeyTimeoutReached=!1;t.holdTimeout(400)})});this.updateField()}return i.instance=function(n){return this._instance==null?new i(n):(this._instance.init(n),this._instance)},i.prototype.init=function(n){var i=this;this._buttonState="";this._currentInput="10,00";this._holdKeyTimeoutReached=!1;this._holdKeyTimeout=-1;this._model=n;this._currentState=t.waitingForInput;this._input=document.getElementById(n.inputId);this._input&&(this._input.removeEventListener("click",function(){}),this._input.addEventListener("click",function(){i.setState(t.selected)}))},i.prototype.change=function(){n.Helper.isFunction(this._model.delegates.change)&&this._model.delegates.change()},i.prototype.take=function(){n.Helper.isFunction(this._model.delegates.take)&&this._model.delegates.take()},i.prototype.select=function(){this.setState(t.selected)},i.prototype.setValue=function(t){this._currentInput=t>0?n.Helper.getFormatedMoney(t):"";this.updateField();this.change()},i.prototype.getValue=function(){return this._currentInput.length==0?0:Extensions.String.ToNumber(this._currentInput)},i.prototype.setState=function(n){this._currentState=n;n==t.selected?this._input.parentElement.classList.add("value-selected"):this._input.parentElement.classList.remove("value-selected")},i.prototype.doKeyPress=function(i){var r=this._currentInput;this._currentState==t.selected&&(this.setState(t.waitingForInput),this._currentInput="");switch(i){case"del":this._currentInput.length>0&&(this._currentInput=this._currentInput.substring(0,this._currentInput.length-1));break;case n.Application.instance.license.separator.tochange:i=n.Application.instance.license.separator.allowed;case n.Application.instance.license.separator.allowed:this._currentInput.indexOf(i)==-1&&(this._currentInput.length==0?this._currentInput="0"+i:this._currentInput+=i);break;default:this._currentInput.match(this.regEx)||this._currentInput.length==0&&i=="0"||this._currentInput.indexOf(n.Application.instance.license.separator.allowed)==-1&&this._currentInput.length>=this._maxLength||(this._currentInput+=i)}this.updateField();r!==this._currentInput&&this.change()},Object.defineProperty(i.prototype,"regEx",{get:function(){if(this._regExp)return this._regExp;switch(n.Application.instance.license.separator.allowed){case".":this._regExp=new RegExp(/[.]\d{2}$/);break;default:this._regExp=new RegExp(/,\d{2}$/)}return this._regExp},enumerable:!1,configurable:!0}),i.prototype.clearHoldTimeout=function(){this._holdKeyTimeout>-1&&clearTimeout(this._holdKeyTimeout)},i.prototype.holdTimeout=function(n){var t=this;this.clearHoldTimeout();this._holdKeyTimeout=setTimeout(function(){t._holdKeyTimeoutReached=!0;t._buttonState.length>0&&(t.doKeyPress(t._buttonState),t.holdTimeout(80))},n)},i.prototype.updateField=function(){this._input.innerText=this._currentInput.length==0?"0":this._currentInput},i}();n.NumPad=i}(Common||(Common={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i=function(){function n(){}return n.init=function(n){this._element=$(n)},n}(),r,u,f,e;t.Base=i;r=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),i.refresh=function(t,i){var r=this;t===void 0&&(t="");i===void 0&&(i=1);new n.AjaxCall({controller:"Account"}).execute("RefreshAccountBalance",function(n){r.init(t);r.refreshWallets(n.list);n.html.length>0&&(r._element.html($(n.html).filter("#"+r._element.prop("id")).first().html()),AjaxControl.create({type:"ToolTip",targetId:"#"+$(".bar").first().prop("id"),track:!1,delay:0,top:15,left:0,css:"toolTipProgress shadowbig"}))})},i.refreshAll=function(n,t){n.forEach(function(n){document.querySelectorAll("#"+n).forEach(function(n){n&&(n.innerText=t)})})},i.refreshWallets=function(n){n.forEach(function(n){document.querySelectorAll("#"+n.key).forEach(function(t){t.innerText=n.value})})},i}(i);t.Balance=r;u=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.button=function(n){this.init(n);this._element.length>0&&(this._element.hasClass("reload")&&this._element.hasClass("bl")?this._element.addClass("gr").removeClass("bl").parent().addClass("click"):this._element.addClass("bl").removeClass("gr").parent().removeClass("click"))},t.detail=function(n){this.init(n);this._element.toggleClass("none")},t.balances=function(n){this.init(n);var t=this._element.find("label.icon");document.cookie=Extensions.String.Format("iw_showbalance={0};path=/",[t.hasClass("arrow-up")]);t.toggleClass("arrow-up").toggleClass("arrow-down").closest(this._element).next().toggle()},t}(i);t.Toggle=u;f=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.refresh=function(n){this._element.html(n)},t.html=function(){return this._element.html()},t}(i);t.Points=f;e=function(){function n(n){this._args=n}return Object.defineProperty(n.prototype,"casino",{get:function(){return this._args.casino},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"kos",{get:function(){return this._args.kos},enumerable:!1,configurable:!0}),n}();t.Segmentation=e})(t=n.Account||(n.Account={}))}(Common||(Common={})),function(n){var t=function(){function n(){}return n.prototype.init=function(n){var t=this;this._model=n;this._model.btn.addEventListener("click",function(){var i=n.bs();i&&(i.removeBet({allBets:!0}),t._model.offerList.forEach(function(n){n.click()}),t.open())})},n.prototype.open=function(){},n}();n.TopBets=t}(Betting||(Betting={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t.prototype.init=function(t){n.prototype.init.call(this,t)},t.prototype.open=function(){if(this._model.open){var n=this._model.bs();n&&n.elements.header.btn.click()}},t}(n.TopBets);n.TopBetsMobile=t}(Betting||(Betting={})),function(n){var t;(function(t){var u=function(){function n(){}return n.init=function(n){this._element=$(n)},n}(),i,r;t.Base=u;i=function(){function n(n){this.container=document.querySelector(n);this.container&&(this.deleteBox=this.container.querySelector("#check-delete"),this.dailyHours=this.container.querySelector("#LimitDailyHours"),this.dailyMinutes=this.container.querySelector("#LimitDailyMinutes"),this.weeklyHours=this.container.querySelector("#LimitWeeklyHours"),this.weeklyMinutes=this.container.querySelector("#LimitWeeklyMinutes"),this.monthlyHours=this.container.querySelector("#LimitMonthlyHours"),this.monthlyMinutes=this.container.querySelector("#LimitMonthlyMinutes"),this.initializeEvents())}return n.prototype.initializeEvents=function(){var n=this;this.container.querySelectorAll("input[type=text]").forEach(function(n){n.addEventListener("keypress",function(n){if(n.keyCode===13)return n.preventDefault(),$(n.target).blur().focus()})});this.container.querySelectorAll("button").forEach(function(t){t.addEventListener("click",function(t){if(!n.validateForm())return t.preventDefault(),!1})});this.container.querySelectorAll(".check-label").forEach(function(n){n.addEventListener("click",function(){n.parentElement.querySelectorAll("input").forEach(function(n){n.click()})})});this.deleteBox.addEventListener("click",function(){n.toggleEnabled()});this.dailyHours.addEventListener("change",function(){n.suggestOthers()});this.dailyHours.addEventListener("change",function(){n.suggestOthers()});this.dailyMinutes.addEventListener("change",function(){n.limitMinutes(n.dailyMinutes);n.suggestOthers()});this.weeklyMinutes.addEventListener("change",function(){n.limitMinutes(n.weeklyMinutes)});this.monthlyMinutes.addEventListener("change",function(){n.limitMinutes(n.monthlyMinutes)})},n.prototype.limitMinutes=function(n){var t=59,i=Number(n.value);i>t&&(n.value=t.toString())},n.prototype.validateForm=function(){return this.deleteBox.checked?!0:this.getDailyTotal()<=0?(this.dailyHours.focus(),!1):this.getWeeklyTotal()<=0?(this.weeklyHours.focus(),!1):this.getMonthlyTotal()<=0?(this.monthlyHours.focus(),!1):!0},n.prototype.getDailyTotal=function(){var n=Number(this.dailyHours.value),t=Number(this.dailyMinutes.value);return n*60+t},n.prototype.getWeeklyTotal=function(){var n=Number(this.weeklyHours.value),t=Number(this.weeklyMinutes.value);return n*60+t},n.prototype.getMonthlyTotal=function(){var n=Number(this.monthlyHours.value),t=Number(this.monthlyMinutes.value);return n*60+t},n.prototype.suggestOthers=function(){var n=this.getDailyTotal(),t=n*7,i=Math.floor(t/60),f=t-i*60;this.weeklyHours.value=i.toString();this.weeklyMinutes.value=f.toString();var r=n*30,u=Math.floor(r/60),e=r-u*60;this.monthlyHours.value=u.toString();this.monthlyMinutes.value=e.toString()},n.prototype.toggleEnabled=function(){var n=this;this.container.querySelectorAll("input[type=text]").forEach(function(t){n.deleteBox.checked&&(t.value="");t.disabled=n.deleteBox.checked})},n}();t.SessionTimeLimit=i;r=function(){function t(n){this._htmlElements=n.htmlElements;this._translations=n.translations;this._htmlElementSelectors=n.htmlElementSelectors;this._buttonsCSSClasses=n.buttonsCSSClasses;var t=this;this._htmlElements.openSelfExclusionFormButton&&this.setOpenDialogClick(this._htmlElements.openSelfExclusionFormButton,this._translations.dialogTitle,this._translations)}return t.prototype.setOpenDialogClick=function(t,i,r){var u=this;t.addEventListener("click",function(){new n.AjaxCall({controller:"Account",type:n.AjaxCallType.GET}).execute("GetSlotsExclusionForm",function(n){if(n.success&&n.html.length>0){u._htmlElements.contentTarget.innerHTML=n.html;var t=document.getElementById(u._htmlElementSelectors.countdown);if(!t)return;u.openDialog({target:"#dlgSlotsExclusionPopOver",css:"ui-dialog-slotsexclusion-message",title:i,closeMessage:r.dialogClose,cancelMessage:r.dialogCancel,width:400});u.countdown(t,function(){u.submitSelfExclusion()})}})})},t.prototype.openDialog=function(n){var t=document.querySelector(n.target),i=this,r;t&&(r=new Tools.Dialog({content:t,cssClass:n.css,title:n.title,buttons:[{text:n.closeMessage,cssClass:i._buttonsCSSClasses.close,dataCy:"close-button",click:function(){window.location.reload()}}],onClosed:function(){clearInterval(i._intervalHandler);window.location.reload()}}),t.classList.remove("none"),r.open())},t.prototype.countdown=function(n,t){var r=this,i=5;this._intervalHandler=setInterval(function(){i===-1?(clearInterval(r._intervalHandler),t&&t()):(n.innerHTML=i.toString(),i-=1)},1e3)},t.prototype.submitSelfExclusion=function(){var t=this;new n.AjaxCall({controller:"Account"}).execute("DoSlotsExclusion",function(n){if(t.removeCountdownInfo(),n.status!=="Ok"){t.handleError(n);return}t.manageDialogButtons();document.querySelector(".slots-selfexclusion .message.Ok").classList.remove("none");document.querySelector(".slots-selfexclusion .message.Ok .message-text").innerHTML=n.message})},t.prototype.handleError=function(n){this.manageDialogButtons();document.querySelector(".slots-selfexclusion .message.Error").classList.remove("none");document.querySelector(".slots-selfexclusion .message.Error .message-text").innerHTML=n.message},t.prototype.removeCountdownInfo=function(){var n=document.getElementById(this._htmlElementSelectors.countdownInfo);n&&n.remove()},t.prototype.manageDialogButtons=function(){var n=document.querySelector(".ui-dialog-slotsexclusion-message .dialog-buttons");n&&n.children&&n.children.length>0&&(n.style.display="block",n.children[0].classList.remove("none"))},t}();t.SlotsExclusion=r})(t=n.AccountLimit||(n.AccountLimit={}))}(Common||(Common={})),function(n){var t;(function(t){var i=function(){function t(n,t){var i=this;this._htmlElements=n;this._data=t;t.showWalletLimitInfo&&this.initWalletLimiInfoOverlay();t.formError||(this.initAmountSelection(),this.initWalletSeletction(),this.initTransferButton());document.querySelectorAll(".wallet-transfer.transfer .close span").forEach(function(n){n.addEventListener("click",function(){t.formError||(document.querySelector(".message.Ok").classList.add("none"),document.querySelector(".message.Error").classList.add("none"));i._htmlElements.overlay.classList.add("none")})});this._htmlElements.openWalletFormButton&&this.setOpenFormEvents(this._htmlElements.openWalletFormButton);this._htmlElements.quicklinkOpenWalletForm&&this.setOpenFormEvents(this._htmlElements.quicklinkOpenWalletForm)}return t.prototype.setOpenFormEvents=function(t){var i=this;t.addEventListener("click",function(){new n.AjaxCall({controller:"Account"}).execute("GetBalances",function(n){i.updateBalances(n);i._htmlElements.overlay.classList.remove("none")})})},t.prototype.disableEnableForm=function(n){this._htmlElements.submitTransferButton.disabled=n;document.querySelectorAll(".transferDirection input[name=amount-transfer]").forEach(function(t){t.disabled=n});document.querySelector("#"+this._htmlElements.submitTransferButton.id+" .icon.fa-spinner").style.display=n?"block":"none";document.querySelector("#"+this._htmlElements.submitTransferButton.id+" .icon.arrow").style.display=n?"none":"block"},t.prototype.initTransferButton=function(){var n=this;this._htmlElements.submitTransferButton&&this._htmlElements.submitTransferButton.addEventListener("click",function(){n.disableEnableForm(!0);n.submitWalletTransfer()})},t.prototype.submitWalletTransfer=function(){var t,r,i;if(document.querySelector(".message.Ok").classList.add("none"),document.querySelector(".message.Error").classList.add("none"),t=this._htmlElements.amountInput.value,r=document.querySelector(".transferDirection input[name=amount-transfer]:checked").value,t==""){this.handleError({message:this._data.invalidAmountMessage});return}if(Number(t)<=0){this.handleError({message:this._data.balanceToLowMessage});return}this.checkPossibleAmount(Number(t),r)&&(i=this,new n.AjaxCall({controller:"Account"}).execute("DoWalletTransfer",function(t){if(t.status!="Ok"||t.returnType!=1){i.handleError(t);return}document.querySelector(".message.Ok .message-text").innerHTML=t.message;document.querySelector(".message.Ok").classList.remove("none");i.disableEnableForm(!1);i.updateBalances(t.balances);document.documentElement.scrollTop=0;n.Application.instance.platform==n.Platform.Web&&n.Account.Balance.refresh()},JSON.stringify({amount:Number(t),toMainWallet:r=="2"})))},t.prototype.updateBalances=function(n){var t;if(((t=n.message)===null||t===void 0?void 0:t.length)>0){this.handleError(n);this._htmlElements.walletTransferForm&&this._htmlElements.walletTransferForm.classList.add("none");return}this._htmlElements.walletTransferForm&&this._htmlElements.walletTransferForm.classList.remove("none");this._htmlElements.walletAmount!=null&&(this._htmlElements.walletAmount.innerHTML=n.walletFormattedAmount);this._htmlElements.mainWalletAmount!=null&&(this._htmlElements.mainWalletAmount.innerHTML=n.mainWalletFormattedAmount);this._htmlElements.mainWalletPossibleAmount!=null&&(this._htmlElements.mainWalletPossibleAmount.innerHTML=n.mainWalletPossibleAmountFormatted);this._htmlElements.walletPossibleAmount!=null&&(this._htmlElements.walletPossibleAmount.innerHTML=n.walletPossibleAmountFormatted);this._htmlElements.mainWalletPossibleAmountText!=null&&(this._htmlElements.mainWalletPossibleAmountText.innerHTML=n.mainWalletPossibleAmountFormatted);this._htmlElements.walletPossibleAmountText!=null&&(this._htmlElements.walletPossibleAmountText.innerHTML=n.walletPossibleAmountFormatted);this._htmlElements.mainWalletBlockedAmount!=null&&(this._htmlElements.mainWalletBlockedAmount.innerHTML=n.mainWalletBlockedAmountFormatted);this._htmlElements.walletBlockedAmount!=null&&(this._htmlElements.walletBlockedAmount.innerHTML=n.walletBlockedAmountFormatted);n.hasPayPalWallet&&this._htmlElements.payPalInfo.classList.remove("none");this._data.maxPossibleTansferAmountMainWallet=Number(n.mainWalletPossibleAmount);this._data.maxPossibleTansferAmountWallet=Number(n.walletPossibleAmount);this._htmlElements.amountInput.value="";n.showPayinButton?document.querySelector(".message.Payin").classList.remove("none"):document.querySelector(".message.Payin").classList.add("none");document.querySelectorAll("#"+this._htmlElements.preSelectButtons.id+" li").forEach(function(n){n.classList.remove("selected")})},t.prototype.handleError=function(n){this.disableEnableForm(!1);var t=n.message;document.querySelector(".message.Error .message-text").innerHTML=unescape(t);document.querySelector(".message.Error").classList.remove("none");document.documentElement.scrollTop=0},t.prototype.initWalletSeletction=function(){var n=this;document.querySelectorAll(".transferDirection label").forEach(function(t){t.addEventListener("click",function(){document.querySelectorAll(".transferDirection label").forEach(function(n){n.classList.remove("active")});var i=document.querySelector(".transferDirection input[name=amount-transfer]:checked").value;n._htmlElements.mainWalletBlockedInfo.classList.add("none");n._htmlElements.walletBlockedInfo.classList.add("none");n._htmlElements.sportTransferInfo.classList.add("none");n._htmlElements.slotTransferInfo.classList.add("none");t.classList.contains("slot")&&(n._htmlElements.mainWalletBlockedInfo.classList.remove("none"),n._htmlElements.slotTransferInfo.classList.remove("none"));t.classList.contains("main")&&(n._htmlElements.walletBlockedInfo.classList.remove("none"),n._htmlElements.sportTransferInfo.classList.remove("none"));t.classList.add("active")})})},t.prototype.initAmountSelection=function(){var n=this,t;this._htmlElements.preSelectButtons!=null&&this._htmlElements.amountInput!=null&&(this._htmlElements.preSelectButtons.childNodes.forEach(function(i){i.addEventListener("click",function(){n._htmlElements.submitTransferButton.disabled||(t=i,document.querySelectorAll("#"+n._htmlElements.preSelectButtons.id+" li").forEach(function(n){n.classList.remove("selected")}),n.setSelectedAmountToAmountInput(t.getAttribute("data-value")),t.classList.add("selected"))})}),this._htmlElements.amountInput&&this._htmlElements.amountInput.addEventListener("keydown",function(){document.querySelectorAll("#"+n._htmlElements.preSelectButtons.id+" li").forEach(function(n){n.classList.remove("selected")});typeof InputLabels!="undefined"&&InputLabels.refresh(n._htmlElements.amountInput.id)}))},t.prototype.setSelectedAmountToAmountInput=function(n){this._htmlElements.amountInput.value=n;typeof InputLabels!="undefined"&&InputLabels.refresh(this._htmlElements.amountInput.id)},t.prototype.checkPossibleAmount=function(n,t){try{if(Number(t)==1)return n>this._data.maxPossibleTansferAmountMainWallet?(this.handleError({message:this._data.possibleMainWalletAmountMessage}),!1):!0;if(Number(t)==2)return n>this._data.maxPossibleTansferAmountWallet?(this.handleError({message:this._data.possibleWalletAmountMessage}),!1):!0}catch(i){return!1}return!1},t.prototype.initWalletLimiInfoOverlay=function(){var n=this;document.querySelectorAll(".wallet-limit-info .button.closewindow").forEach(function(t){t.addEventListener("click",function(){n.setWalletLimitInfoTimeStamp(!0);n._htmlElements.walletLimitOverlay.classList.add("none")})});document.querySelectorAll(".wallet-limit-info .button.g").forEach(function(t){t.addEventListener("click",function(){n.setWalletLimitInfoTimeStamp(!1);n._htmlElements.walletLimitOverlay.classList.add("none")})})},t.prototype.setWalletLimitInfoTimeStamp=function(t){var i=this;new n.AjaxCall({controller:"Account"}).execute("SetWalletLimiInfoTimeStamp",function(){t||(document.location.href=i._data.limitPageUrl)})},t}();t.Wallet=i})(t=n.Account||(n.Account={}))}(Common||(Common={})),function(n){var t=function(){function t(){}return t.initInputCheck=function(t,i,r){r===void 0&&(r=!1);document.querySelectorAll(t.toString()).forEach(function(t){t&&(t.addEventListener("input",function(u){n.Validate.checkInputString(u,new RegExp(i),t.id,r)}),t.addEventListener("paste",function(u){n.Validate.checkInputString(u,new RegExp(i),t.id,r)}))})},t}();n.InputCheck=t}(Common||(Common={}));LiveBetting=function(){function v(){n.indexRequest!=null&&(n.indexRequest.abort(),n.indexRequest=null);var t=n.refreshIndex();t.always(function(){y()});n.indexRequest=t}function o(){n.eventRequest!=null&&(n.eventRequest.abort(),n.eventRequest=null);var t=n.refreshEvent(n.refreshEventId,n.eventTimeStamp);t.always(function(){p()});n.eventRequest=t}function y(){n.options.autoRefreshEnabled&&(n.indexUpdateTimeout>0&&(clearTimeout(n.indexUpdateTimeout),n.indexUpdateTimeout=0),n.indexUpdateTimeout=setTimeout(function(){n.options.autoRefreshEnabled&&v()},n.options.autoRefreshTimeIndex))}function p(){n.options.autoRefreshEnabled&&(n.eventUpdateTimeout>0&&(clearTimeout(n.eventUpdateTimeout),n.eventUpdateTimeout=0),n.eventUpdateTimeout=setTimeout(function(){n.options.autoRefreshEnabled&&o()},n.options.autoRefreshTimeEvent))}function d(){$(function(){$(".live-kos-filter, .live-kos-selection").on("click","a",function(n){var f;n.preventDefault();var t=$(this).data("kos-id")!=undefined?$(this).data("kos-id").toString().split(",").map(function(n){return n}):[],i=$(this).data("country-id"),r=$(this).data("stream-id");(t==undefined&&(t=[]),i==undefined&&(i=null),r==undefined&&(r=null),i!=null?Common.Tracking.Event.initial(["Live-Events","Filter clicked","",i]):r!=null?Common.Tracking.Event.initial(["Live-Events","Filter clicked","",r]):Common.Tracking.Event.initial(["Live-Events","Filter clicked","",t.join(",")]),$.isFunction(u)&&(f=u(t),f===!1))||live.setFilter(t,i,r)})})}function w(n,t,i){var r=s(n);r[t]=i;g(r,n)}function s(n){if(Modernizr.sessionstorage){var r="live_"+n+"_expands",t=sessionStorage[r],i={};return t!=null&&(i=JSON.parse(t)),i}return k}function g(n,t){if(Modernizr.sessionstorage){var i="live_"+t+"_expands";sessionStorage.setItem(i,JSON.stringify(n))}}function h(){var t=$(".live-kos-filter, .live-kos-selection");t.find(".active").removeClass("active");n.getEvent()!=0?t.find('a[data-kos-id="-1"]').parents("li").addClass("active"):n.countryFilter!=null?(t.find("a[data-country-id="+n.countryFilter+"]").parents("li").addClass("active"),t.find("a[data-country-id="+n.countryFilter+"].kos-selection-country").addClass("active")):n.streamFilter!=null?(t.find("a[data-stream-id="+n.streamFilter+"]").parents("li").addClass("active"),t.find("a[data-stream-id="+n.streamFilter+"].kos-selection-stream").addClass("active")):t.find('a[data-kos-id="'+n.kosFilter.join()+'"]').parents("li").addClass("active")}function b(i){t(i);app.platform==Platform.Smartphone&&i.parent().append(n.templates.betNowButton.replace("@EVENTID",event.id).replace("@LANGUAGE",Common.Application.instance._language).replace("@TEXT",Translation.getTextId("BetNowButton")));i.remove()}function nt(n){if(n)for(var i=0;i<n.length;i++)t(null,n[i])}function t(n,t){var u,e,f,i,o,s;if(bettingSlip)if(t&&t.offers)for(i=0;i<t.offers.length;i++)u=t.offers[i],r(u.id,u.state==="D",u.quote,u.isLocked);else if(n&&n.length>0&&(e=n.get(0),e&&e.childElementCount>0&&(f=e.firstElementChild,f&&f.children.length>0)))for(i=0;i<f.children.length;i++)o=f.children[i],o&&(s=parseInt(o.className.substring(1,o.className.length-1),10),r(s,!0,0,!1))}function r(n,t,i,r){bettingSlip.hasBet(n)&&bettingSlip.updateLiveBet({id:n,isExpired:t,quote:i,isLocked:r})}function tt(t){var i,r;$("#Log-"+t.LogId).length>=1||(i=$(".liveticker"),i.length&&(r=n.templates.logEntry.replace(/@ID/,t.LogId).replace(/@IMG/,t.Css).replace(/@TIME/,t.Time).replace(/@MESSAGE/,t.Message),i.children("ul").prepend(r),$(".scoreboard-ticker,.scoreboard-wrapper").removeClass("ticker-empty")))}function it(n){var t=$(".liveticker");t.length&&$("#Log-"+n.LogId).remove()}var n=this,c=!1;this.options={autoRefreshTimeEvent:5e3,autoRefreshTimeIndex:5e3,autoRefreshEnabled:!1,autoRefreshUserEnabled:!1,countryFilterEnabled:!1,quoteTrendDuration:2e3,quoteTrendIconDuration:4e3,lockBtnClass:"quote-lock",hideQuoteClass:"quote-hide",btnClass:"quote-btn"};this.templates={title:'<h2 class="list-subtitle">@OFFERNAME<\/h2>',spacer:'<div class="spacer"><\/div>',templateGroup:'<div id="@OTGID" class="offer-tg@COLLAPSED" data-order="@ORDER"><h2 class="list-subtitle"><span>@OTGNAME <span class="otg-bog-count">(@GROUPCOUNT)<\/span><\/span><span class="otg-toggle"><span class="icon arrow_down"><\/span><span class="icon arrow_up"><\/span><\/span><\/h2><div class="offer-groups">@OFFERGROUPS<\/div><\/div>',group:'<div class="og" id="og@OFFERGROUPID" data-order="@ORDER"><div class="og-name"><div>@OFFERNAME<\/div><\/div>@OFFERCONTAINER<\/div>',groupInfo:'<a href="javascript:void(0)" class="info-og" title="@INFOTEXT"><span class="icon info-og-icon"><\/span><\/a>',srWidget:'<div id="@SRWIDGETID" class="sr-widget"><\/div>',offerContainer:'<span class="event-score"><span class="score live score@EVENTID"><\/span><\/span><div class="offercontainer"><div class="@CLASS">@BUTTONS<\/div><\/div>',offerContainerLegacy:'<div class="offer-container"><div class="@CLASS">@BUTTONS<\/div><\/div>',button:'<div class="o@OFFERID @CLASS" data-order="@ORDER" onclick="@HANDLER"><span class="tip"><\/span><span class="icon trend-icon"><\/span>@LOCKICON<span class="quota" data-quote-val="@QUOTEVAL">@QUOTE<\/span><\/div>',buttonLegacy:'<div class="o@OFFERID @CLASS" data-order="@ORDER" onclick="@HANDLER"><span class="tip">@TIP<\/span><span class="tip-name">@OFFERNAME<\/span><span class="icon trend-icon"><\/span>@LOCKICON<span class="quota" data-quote-val="@QUOTEVAL">@QUOTE<\/span><\/div>',logEntry:'<li id="Log-@ID"><span class="sp_ac icon @IMG"><\/span> <span class="log-time">@TIME<\/span> <span class="log-message">@MESSAGE<\/span><\/li>',filterItem:'<li class="liveKosTabs kosTab-@KOSID"><a data-kos-id="@KOSID" href="@URL"><span class="kos @ICONCOLOR icon_@KOSID"><\/span><span class="kos-name">@KOSNAME<\/span><span class="count">(@COUNT)<\/span><\/a><\/li>',furtherKosFilter:'<li><a data-kos-id="@KOSID" href="#"> + <span class="count">(@COUNT)<\/span><\/a><\/li>',countryFilterItem:'<li><a data-country-id="@COUNTRY" href="#"><span class="flag @COUNTRY"><\/span><span class="count">(@COUNT)<\/span><\/a><\/li>',streamFilterItem:'<li><a data-stream-id="stream" href="#"><span class="event-stream"><\/span><span class="count">(@COUNT)<\/span><\/a><\/li>',betNowButton:'<div class="empty-bet"><a href="/@LANGUAGE/live/event/@EVENTID" rel="nofollow" class="betnow"><span class="quote-btn empty">@TEXT<\/span><\/a><\/div>'};var l=$.Callbacks(),k={},i=null,u=null,a=!0,f=!1,e="";this.refreshInterval=null;this.refreshEventId=0;this.brWidgetHandles=[];this.indexUpdateTimeout=0;this.eventUpdateTimeout=0;this.kosFilter=[];this.countryFilter=null;this.streamFilter=null;this.eventRequest=null;this.indexRequest=null;this.eventTimeStamp="";this.iFrameUrl="";this.iPlayerUrl="";this.eventkosid=0;this.betradareventid=0;this.liveBettingClient=null;this.liveVisualizationClient=null;this.eventDeltaUrlOverride="";this.loadUpcomingEvents=function(){var t=$("#live-upcoming");t.length&&$.get(app.path+n.getLiveArea()+"/upcomingevents",{kosId:n.getFilter().join(","),country:n.getCountryFilter(),stream:n.getStreamFilter()},function(n){t.html(n)})};this.setIsOverView=function(n){c=n};this.setCulture=function(n){e=n};this.getLiveArea=function(){return f?"/esports":"/live"};this.getIsEsports=function(){return f};this.setIsEsports=function(n){f=n};this.getEvent=function(){return n.refreshEventId};this.setEvent=function(t,i){if(n.refreshEventId=t,n.eventTimeStamp=i,h(),app.platform==Platform.Tablet)try{t>0&&$(document).ready(function(){n.liveBettingClient||LiveBetting.Event.Instance({connection:$.connection,signalrHubUrl:app.signalrLiveBettingUrl,events:[t],eventCountSelector:".LiveEventsCount",navigation:{events:"#LiveBettingNavigation",isOpen:!0},scoreboardBackgroundsKosId:[],betTypes:"1,2,3,4"}).init()})}catch(r){global.createWarningLog("Error SignalR subscribe Event failed","Subscribe failed, EventId: "+t+" Error: "+r.message)}};this.setAutoRefreshTimeIndex=function(t){n.options.autoRefreshTimeIndex=t};this.setAutoRefreshTimeEvent=function(t){n.options.autoRefreshTimeEvent=t};this.setAutoRefreshUserSetting=function(t){n.options.autoRefreshUserEnabled=t};this.getKosGroupTitle=function(n,t){var i=Translation.getTextId(n==1?"Now Kos Event LIVE":"Now Kos Events LIVE");return i.Format(n,t)};this.enableAutoRefresh=function(){n.options.autoRefreshUserEnabled&&n.options.autoRefreshEnabled===!1&&(n.options.autoRefreshEnabled=!0,($("#liveEventsIndex,#liveEventsList,#liveEventsGrouped,.live-kos-tabs").length||$("#live-scroller").length)&&y(),n.refreshEventId>0&&p())};this.onEventRemoved=function(){setTimeout(function(){global.changePage("/live")},5e3)};this.onRefreshCompleted=function(){};this.disableAutoRefresh=function(){n.options.autoRefreshEnabled===!0&&(n.options.autoRefreshEnabled=!1,n.indexUpdateTimeout>0&&(clearTimeout(n.indexUpdateTimeout),n.indexUpdateTimeout=0),n.eventUpdateTimeout>0&&(clearTimeout(n.eventUpdateTimeout),n.eventUpdateTimeout=0))};this.setCountryFilterEnabled=function(t){n.options.countryFilterEnabled=t};this.setFilterFunction=function(n){i=n};this.setBeforeApplyFilter=function(n){u=n};this.setFilter=function(t,i,r){var u=[].concat(t),f;if(n.kosFilter.join()!=u.join()||n.countryFilter!=i||n.streamFilter!=r)if(document.cookie="iw_liveKosFilter="+u.join()+";path=/",n.kosFilter=u,n.countryFilter=i,n.streamFilter=r,a)n.applyFilter(),n.onFilterChanged();else{if(f=n.refreshIndex(),f==""){n.applyFilter();n.onFilterChanged();return}f.done(function(){n.applyFilter();n.onFilterChanged()})}};this.getFilter=function(){return n.kosFilter};this.setClientSideFilter=function(n){a=n};this.getCountryFilter=function(){return n.countryFilter};this.getStreamFilter=function(){return n.streamFilter};this.checkFilter=function(t){var i=n.getFilter(),u=n.getCountryFilter(),r=i.map(function(i){return n.getEventCount(i,t.eventCountByKos)}).reduce(function(n,t){return n+t},0);i.length>0&&r==0&&n.setFilter(0,null)};this.applyFilter=function(){var t=0;$.isFunction(i)?($(".live-events-filtered").children().hide(),$(".live-events-filtered").each(function(){var r;r=n.kosFilter.length==0||n.kosFilter[0]==0?i($(this).children("li"),10):i($(this).children("li").filter(function(){return n.kosFilter.indexOf($(this).data("kosid"))>=0}),10);r.show();t=r.length})):$(".live-events-filtered").children().each(function(){var i=$(this),r=i.data("countries")==null?"":i.data("countries"),u=i.data("stream")==null?"":i.data("stream");(n.kosFilter.indexOf(i.data("kosid").toString())>=0||n.kosFilter.length==0||n.kosFilter[0]==0)&&(r.indexOf(n.countryFilter)>=0||n.countryFilter==null)&&(u.indexOf(n.streamFilter)>=0||n.streamFilter==null)?(i.show(),t++):i.hide()});n.applyFilterCompleted(t);h()};this.applyFilterCompleted=function(){};this.onFilterChanged=function(){n.loadUpcomingEvents()};this.doRefreshAll=function(){o();v()};this.doEventRefresh=function(){o()};this.refreshEvent=function(t,i){return n.refreshBettingOffers(t,i)};this.refreshIndex=function(){};this.raiseIndexLoaded=function(n,t){l.fire(n,t)};this.addIndexLoadedListener=function(n){l.add(n)};this.updateFilterCount=function(t,i,r,u,f,e,o,s,c){var f,y,l,a,v,p;if(i!=null){for(r==undefined&&(r=5),f=n.options.countryFilterEnabled&&u!=null&&u!=""&&f,f&&(r=r-1),y=!1,i.length>r&&s===!0&&(y=!0,r=r-1),l=$(".live-filter-tabs,.live-kos-tabs"),l.find("a[data-kos-id=0] .count").text("("+t+")"),l.find('a[data-stream-id="stream"] .count').text("("+e+")"),l.children("li").filter(function(){var n=$(this).children("a");return n.data("kos-id")>0||n.data("kos-id")!=undefined&&n.data("kos-id").toString().indexOf(",")>=0||n.data("country-id")!=null}).remove(),a=0;a<i.length;a++){if(a>=r&&r>0)break;v=n.templates.filterItem.replace(/@KOSID/g,i[a].kosId).replace(/@ICONCOLOR/,c?"w":"").replace(/@KOSNAME/,i[a].kosName+" ").replace(/@URL/,app.path+"/live?kosFilter="+i[a].kosId).replace(/@COUNT/,i[a].count);l.append(v)}if(y){var w=i.slice(r,i.length),b=w.map(function(n){return n.count}).reduce(function(n,t){return n+t}),v=n.templates.furtherKosFilter.replace(/@KOSID/g,w.map(function(n){return n.kosId}).join()).replace(/@COUNT/,b);l.append(v)}f&&(app.platform==Platform.Smartphone&&(v=n.templates.countryFilterItem.replace(/@COUNTRY/g,u).replace(/@COUNT/,o),l.append(v),l.children("li").last().find(".count").toggle(o>0)),p=$(".live-kos-selection .kos-selection-country .count"),p.text("("+o+")"),p.toggle(o>0));h()}};this.getEventCount=function(n,t){for(var i=0;i<t.length;i++)if(t[i].kosId==n)return t[i].count;return 0};this.refreshBettingOffers=function(t,i){var r="/live/eventdelta";return n.eventDeltaUrlOverride!==""&&(r=n.eventDeltaUrlOverride),$.get(global.appPath+r,{eventId:t,timeStamp:i},function(i){var o,h,r,c,u,f,e;if(!i.success||i.removed)n.onEventRemoved(t,!0);else if(i.changed){for(n.eventkosid=i.kosid,n.betradareventid=i.betradareventid,$("#scoreboard").is(":visible")?$("#scoreboard").replaceWith(i.scoreboardHtml):($("#scoreboard").replaceWith(i.scoreboardHtml),$("#scoreboard").hide()),o=$(".streamBoardWrapper"),o.replaceWith(i.streamboardHtml),$(".live-stats-container").hasClass("show-stream")&&$(".streamBoardWrapper").show(),h=0,$("#quickbet").length&&(h=$("#quickbet").find("input[name=OfferID]").val()),r=[],c=s(i.eventId),$.each(i.offerTemplateGroups,function(t,u){var f=$("#otg"+u.key);f.length?n.refreshOfferTemplateGroupDom(u,i.eventId,f,c):r.push(u)}),u=0;u<r.length;u++)n.addOfferTemplateGroupDom(r[u],i.eventId);n.eventTimeStamp=i.timeStamp;n.onRefreshCompleted(t);n.trendTimeout();f=$("#iwlvc"+i.eventId);f.length>0&&($.cookie("iw_UseScoreBoard")!=="false"||f.hasClass("failed")||(e=f.find(".container").length==1,e&&i.visualizationEnabled===!1&&(n.runScoreboard(i.eventId,!1),$("#iwlvc"+i.eventId).html("")),e||!i.visualizationEnabled||$("#iwlvc"+t).hasClass("active")||(n.runTennisLiveVisualization(i.eventId),$(".scoreboardcontainer").show())))}},"json")};this.findOfferGroup=function(n,t){var i=null;return $.each(n,function(n,r){r.id==t&&(i=r)}),i};this.findOffer=function(n,t){var i=null;return $.each(n.offers,function(n,r){r.id==t&&(i=r)}),i};this.refreshOfferTemplateGroupDom=function(t,i,r,u){var f,e;r.length&&(r.data("order",t.order),u!=undefined&&u["otg"+t.key]==undefined&&(t.isExpanded?r.removeClass("tg-collapsed"):r.addClass("tg-collapsed")),$.each(t.offerGroups,function(t,u){var f=r.find("#og"+u.id);f.length?n.refreshOfferGroupDom(u,i,f):n.addOfferGroupDom(u,r,i)}),f=r.find(".offer-groups").children().length,f===0?(e=r.next(".spacer"),r.remove(),e.remove()):r.find(".otg-bog-count").text("("+f+")"))};this.addOfferTemplateGroupDom=function(i,r){var e=n.createOtgDom(i,r),o,f,s,u;if(e!==""){if(o=$("#LiveBettingList"),f=o.children(".offer-tg"),i.order!=1&&f.length)for(u=0;u<f.length;u++)if(s=$(f[u]),i.order<s.data("order")){s.before(e);break}else u==f.length-1&&o.append(e);else o.prepend(e);for(nt(i.offerGroups),u=0;u<i.offerGroups.length;u++)t(null,i.offerGroups[u])}};this.createOtgDom=function(t,i){var r="",u=0,t;return($.each(t.offerGroups,function(t,f){r+=n.createOfferGroup(f,i);u++}),r==="")?"":(t=n.templates.templateGroup.replace(/@OTGID/,"otg"+t.key).replace(/@GROUPCOUNT/,u).replace(/@ORDER/,t.order).replace(/@COLLAPSED/,t.isExpanded?"":" tg-collapsed").replace(/@OTGNAME/,t.name).replace(/@OFFERGROUPS/,r),t+n.templates.spacer)};this.refreshOfferGroupDom=function(t,i,u){u.length&&($.each(t.offers,function(f,e){var l=u.find(n.showLegacyOffers()?".offer-container":".offercontainer"),o=u.find(".o"+e.id),s,h,c;if(r(e.id,e.state==="D",e.quote,e.isLocked),e.state==="D")o.remove();else if(o.length)n.refreshOfferButton(o,e,!0);else if(o.length)n.refreshOfferButton(o,e,!0);else if(l.remove(),o=n.createOfferButton(e,t,i,f),s=u.children("div."+n.options.btnClass),e.order!=1&&s.length)for(h=0;h<s.length;h++)if(c=$(s[h]),e.order<c.data("order")){c.before(o);break}else h==s.length-1&&c.after(o);else u.prepend(o);l.find("div."+n.options.btnClass).length||(n.showLegacyOffers()?u.remove():l.remove())}),t.betAssistName!=""&&t.betAssistName!=undefined&&t.betAssistName!=null&&n.betradareventid>0&&Common.Application.instance.license.showBetAssist&&n.hideWidgets(t.betAssistName,n.betradareventid))};this.showLegacyOffers=function(){return app.platform===Platform.Tablet||window.location.pathname.toLowerCase().indexOf("/live/event")>-1||window.location.pathname.toLowerCase().indexOf("/esports/event")>-1};this.addOfferGroupDom=function(i,r,u){var s=n.createOfferGroup(i,u),f,e,o,h;if(s!==""){if(f=r.children(".offer-groups"),e=f.children(".og"),i.order!=1&&e.length)for(o=0;o<e.length;o++)if(h=$(e[o]),i.order<h.data("order")){h.before(s);break}else o==e.length-1&&f.append(s);else f.prepend(s);t(f,i);i.betAssistName!=""&&i.betAssistName!=null&&i.betAssistName!=undefined&&n.betradareventid>0&&Common.Application.instance.license.showBetAssist&&n.hideWidgets(i.betAssistName,n.betradareventid)}};this.createOfferGroup=function(t,i){var f=n.createOfferContainer(t,i),e="",r,u,o;return f!==""&&(r="",u="",t.infoText!=null&&t.infoText!==""&&(r=n.templates.groupInfo.replace(/@INFOTEXT/,t.infoText)),t.betAssistName!=""&&t.betAssistName!=null&&t.betAssistName!=undefined&&Common.Application.instance.license.showBetAssist&&(o="sr-widget-"+t.betAssistName,u=n.templates.srWidget.replace(/@SRWIDGETID/,o)),e=n.templates.group.replace(/@OFFERNAME/,t.name+r+u).replace(/@OFFERGROUPID/,t.id).replace(/@ORDER/,t.order).replace(/@OFFERCONTAINER/,f)),e};this.createOfferContainer=function(t,i){var r="",f="",u;return t!=null&&t.offers!=null&&($.each(t.offers,function(u,f){f.state=="E"&&(r+=n.createOfferButton(f,t,i,u))}),r!==""&&(u="",u=n.showLegacyOffers()?"liveog-"+t.render:"event-offers",f=(n.showLegacyOffers()?n.templates.offerContainerLegacy:n.templates.offerContainer).replace(/@EVENTID/,i).replace(/@CLASS/,u).replace(/@BUTTONS/,r))),f};this.offerHighlight=function(){return""};this.createOfferButton=function(t,i,r){var f="",u=n.options.btnClass+this.offerHighlight(t.id),e;return t.isLocked&&(u+=" "+n.options.lockBtnClass,f='<span class="icon locked-icon"><\/span>'),t.quote==1&&(u+=" "+n.options.hideQuoteClass),t.hasFreebet&&(u+=" freebet"),e=n.showLegacyOffers()?n.templates.buttonLegacy:n.templates.button,e.replace(/@CLASS/,u).replace(/@LOCKICON/,f).replace(/@OFFERID/g,t.id).replace(/@HANDLER/,LiveBetting.Helper.QuickBet.getHandler(r,i.id,t.id,!0)).replace(/@TIP/,t.tip).replace(/@OFFERNAME/,t.name).replace(/@QUOTEVAL/,t.quote).replace(/@QUOTE/,t.formattedQuote).replace(/@ORDER/,t.order).replace(/@FREEBET/,t.hasFreebet)};this.refreshOfferButton=function(t,i,u){var f,e,s,o;u==null&&(i.tip!=null&&t.find(".tip").text(i.tip),i.name!=null&&t.find(".tip-name").text(i.name));f=t.find(".quota");e=parseDouble(f.attr("data-quote-val"));f.attr("data-quote-val",i.quote);f.text(i.formattedQuote);i.isLocked?(t.addClass(n.options.lockBtnClass),s=t.find(".icon.locked-icon"),s.length==0&&f.before('<span class="icon locked-icon"><\/span>')):(t.removeClass(n.options.lockBtnClass),t.find(".icon.locked-icon").remove(),o=i.quote,o>e?(t.addClass("trend-up"),t.find(".trend-icon").addClass("trend-icon-up")):o<e&&(t.addClass("trend-down"),t.find(".trend-icon").addClass("trend-icon-down")));i.hasFreebet?t.addClass("freebet"):t.removeClass("freebet");i.quote<=1?t.addClass(n.options.hideQuoteClass):t.removeClass(n.options.hideQuoteClass);r(i.id,i.state==="D",i.quote,i.isLocked)};this.refreshOfferGroup=function(t,i){var r=$("#g"+t.id);n.refreshOfferGroupDom(t,i,r)};this.refreshEventLI=function(i,r){var e,u,f;if(app.platform==Platform.Tablet?i.find(".gametime-col").text(r.gameTime):(e="",r.liveStream&&(e='<span class="event-stream"><\/span>'),i.find(".gametime"+r.id).html(r.gameTime+" "+e)),u=i.find(n.showLegacyOffers()?".offer-container":".offercontainer"),u.length)if(r.mainOfferGroup!=null)if(c)switch(r.mainOfferGroup.render){case"N2":case"N3":n.refreshOfferGroupDom(r.mainOfferGroup,r.id,u.parent());break;default:b(u)}else n.refreshOfferGroupDom(r.mainOfferGroup,r.id,u.parent());else b(u);else r.mainOfferGroup!=null&&(r.mainOfferGroup.template==2||r.mainOfferGroup.template==3)&&(i.find(".bet-col,.live-main-bet").html(n.createOfferContainer(r.mainOfferGroup,r.id)),t(u,r.mainOfferGroup));f=i.find(".score");n.showLegacyOffers()?f.text(r.score.currentScore.scoreValue):f.html(r.score.currentScore.scoreValue.replace(":","<br />"));r.score.currentScore.scoreValue==null||r.score.currentScore.scoreValue===""?f.hide():f.show()};this.addEventLI=function(i,r,u,f,o){var s="";o===undefined&&(o=!1);r.mainOfferGroup!=null&&(r.mainOfferGroup.template==2||r.mainOfferGroup.template==3)?s=n.createOfferContainer(r.mainOfferGroup,r.id):app.platform==Platform.Smartphone&&(s=n.templates.betNowButton.replace("@EVENTID",r.id).replace("@LANGUAGE",Common.Application.instance._language).replace("@TEXT",Translation.getTextId("BetNowButton")));(f===undefined||f==null)&&(f=n.templates.eventListItem);var c=e===""?"":"/"+e,l=r.liveStream?'<span class="event-stream"><\/span>':"",a=r.liveStream?"stream":"",h=f.replace(/@EVENTID/g,r.id).replace(/@EVENTURL/g,global.appPath+c+n.getLiveArea()+"/Event/"+r.id).replace(/@KOSID/g,r.kosID).replace("@KOSNAME",r.kosName).replace("@SCORE",r.score.currentScore.scoreValue).replace("@EVENTNAME",r.name).replace("@LEAGUE",r.league).replace("@PLAYER1",r.player1).replace("@PLAYER2",r.player2).replace("@GAMETIME",r.gameTime).replace("@STREAM",l).replace("@LIVE",a).replace("@OFFERGROUP",s).replace("@COUNTRIES",n.getCountries(r).join()).replace("@EVENTCLASS",r.isContest?" event-contest":"").replace("@ICONCOLORWHITE",o?"w":"");u===undefined?i.prepend(h):u.after(h);t(null,r.mainOfferGroup);(r.score.currentScore.scoreValue==null||r.score.currentScore.scoreValue===""||r.isContest)&&i.find("[data-event-id="+r.id+"]").find(".score").hide()};this.removeEvents=function(t,i){t.length&&t.children("li").each(function(t,r){var u=$(r),e,f;u.data("event-id")!=undefined&&(e=parseInt(u.data("event-id")),n.findEvent(e,i)==null&&(f=u.next(),f.hasClass("spacer")&&f.remove(),u.remove()))})};this.findEvent=function(n,t){for(var i=0;i<t.length;i++)if(t[i].id===n)return t[i];return null};this.getCountries=function(n){var t=n.playerIds.filter(function(n){return n.country!=null&&n.country!=""}).map(function(n){return n.country});return t.distinct()};this.trendTimeout=function(){setTimeout(function(){$(".trend-up,.trend-down").removeClass("trend-up").removeClass("trend-down")},n.options.quoteTrendDuration);setTimeout(function(){$(".trend-icon-up,.trend-icon-down").removeClass("trend-icon-up").removeClass("trend-icon-down")},n.options.quoteTrendIconDuration)};this.startLiveVisualization=function(t,i,r,u){n.srLiveAddWidgets(t,i,r,u);$(".visualizationIcon").addClass("active");$.cookie("iw_UseScoreBoard")==="true"&&(n.toggleLiveVisualization(),$(".scoreboardIcon").removeClass("active"))};this.srLiveAddWidgets=function(){};this.srAddWidgetHandle=function(t){n.brWidgetHandles.push(t)};this.stopLiveVisualization=function(){while(n.brWidgetHandles.length>0)var t=n.brWidgetHandles.pop();this.refreshEventId>0&&objTennisVisualization.teardown(this.refreshEventId)};this.toggleLiveVisualization=function(n){var t=$(".live-stats-container"),i;t.length&&(t.hasClass("show-visualization")?(Common.Tracking.Event.initial(["Scoreboard","Click","Open"]),t.removeClass("show-visualization"),t.addClass("show-scoreboard"),$.cookie("iw_UseScoreBoard","true"),$("#scoreboard").is(":visible")||$("#scoreboard").show(),$(".scoreboard-wrapper").css("display")==="none"&&($(".scoreboard-wrapper").show(),$(".error-box.e-sports-stream").hide(),$(".e-sports-stream .error-box").remove())):(Common.Tracking.Event.initial(["Visualization","Click","Open"]),t.addClass("show-visualization"),t.removeClass("show-scoreboard"),$.cookie("iw_UseScoreBoard","false"),($("#SRLive").css("display")==="none"||$("#SRLive").children().length==0)&&($(".iwlvc").css("display")==="none"&&($(".iwlvc").show(),$(".error-box.e-sports-stream").hide(),$(".e-sports-stream .error-box").remove()),i=$("#iwlvc"+n+" .container").length==1,i?n!=null&&($("#iwlvc"+n+" .container div.tabs").tabs("option","active",1),$("#iwlvc"+n+" .container div.tabs").tabs("option","active",0)):this.runTennisLiveVisualization(n))))};this.toggleBetRadarVisualization=function(n){var t=$(".live-stats-container");t.length&&(Common.Tracking.Event.initial(["Visualization","Click","Open"]),t.addClass("show-visualization"),t.removeClass("show-scoreboard"),t.removeClass("show-stream"),$(".streamBoardWrapper").hide(),$(".error-box.e-sports-stream").hide(),$(".e-sports-stream .error-box").remove(),$.cookie("iw_UseScoreBoard","false"),$(".srw-container").show(),$(".scoreboardIcon").removeClass("active"),$(".event-stream").removeClass("active"),$(".visualizationIcon").addClass("active"),LiveStream.Mobile.StreamPlayer.Instance.Stop(n))};this.toggleTennisLiveVisualization=function(n){var t=$(".live-stats-container"),i;t.length&&(Common.Tracking.Event.initial(["Tennis-Visualization","Click","Open"]),t.addClass("show-visualization"),t.removeClass("show-scoreboard"),$(".scoreboardIcon").removeClass("active"),$(".event-stream").removeClass("active"),$(".visualizationIcon").addClass("active"),$(".iwlvc").css("display")==="none"&&($(".iwlvc").show(),$(".error-box.e-sports-stream").hide(),$(".e-sports-stream .error-box").remove()),i=$("#iwlvc"+n+" .container").length==1,i?n!=null&&($("li.tab-visualization-"+n).hasClass("none")?$("#iwlvc"+n+" .container div.tabs").tabs("option","active",1):$("#iwlvc"+n+" .container div.tabs").tabs("option","active",0)):($.cookie("iw_UseScoreBoard","false"),this.runTennisLiveVisualization(n)),LiveStream.Mobile.StreamPlayer.Instance.Stop(n))};this.toggleScoreboard=function(n){var t=$(".live-stats-container");t.length&&(Common.Tracking.Event.initial(["Scoreboard","Click","Open"]),t.removeClass("show-visualization"),t.removeClass("show-stream"),$(".streamBoardWrapper").hide(),t.addClass("show-scoreboard"),$(".scoreboardIcon").addClass("active"),$(".event-stream").removeClass("active"),$(".visualizationIcon").removeClass("active"),$(".scoreboard-wrapper").css("display")==="none"&&($(".scoreboard-wrapper").show(),$(".error-box.e-sports-stream").hide(),$(".e-sports-stream .error-box").remove()),LiveStream.Mobile.StreamPlayer.Instance.Stop(n),$(".scoreboard-common").show(),$("#scoreboard").show())};this.restoreOTGState=function(){if(n.refreshEventId>0){var r=s(n.refreshEventId),t=[],i=[];for(key in r)r[key]?t.push("#"+key):i.push("#"+key);t.length>0&&$(t.join()).removeClass("tg-collapsed");i.length>0&&$(i.join()).addClass("tg-collapsed")}};this.Test=function(t){n.liveVisualizationClient=new LiveVisualizationClient;n.liveVisualizationClient.getStatistics(t)};this.runTennisLiveVisualization=function(t){if($.cookie("iw_UseScoreBoard")==="false"||$.cookie("iw_UseScoreBoard")===undefined){if($("#SRLive").toggle(),this.showLoadingTennisVisualization("#iwlvc"+t),$("#iwlvc"+t).addClass("active"),this.liveVisualizationClient==null){objTennisVisualization.translations=Translation.textIds;LiveBetting.Event.subscribeTennisVisualization(t);var i={};i.runScoreboard=function(t){n.runScoreboard(t,!1)};i.logError=function(n,t){global.createWarningLog(n,t)};i.forceReload=function(t){n.liveVisualizationClient!=null&&n.liveVisualizationClient.reloadEvent(t)};i.getTennisStatistics=function(t){n.liveVisualizationClient=new LiveVisualizationClient;n.liveVisualizationClient.getStatistics(t)};objTennisVisualization.delegateObject=i}else LiveBetting.Event.subscribeTennisVisualization(t);$.cookie("iw_UseScoreBoard","false");$(".scoreboard-buttons .visualizationIcon").length>0&&($(".scoreboard-buttons .visualizationIcon").addClass("active"),$(".scoreboard-buttons .scoreboardIcon").removeClass("active"))}else $(".live-stats-container").removeClass("show-visualization"),$(".live-stats-container").addClass("show-scoreboard")};this.runScoreboard=function(n,t){var i=$(".live-stats-container");i.length&&i.hasClass("show-visualization")&&(i.removeClass("show-visualization"),i.addClass("show-scoreboard"));t&&$.cookie("iw_UseScoreBoard","true")};this.showLoadingTennisVisualization=function(n){if(!($("#loadingElmContainer").length>0))$(n).html('<div class="loadingcontainer"><span id="loadingElmContainer"><span class="loadingCircle" id="loading1"><\/span><span class="loadingCircle" id="loading2"><\/span><span class="loadingCircle" id="loading3"><\/span><span class="loadingCircle" id="loading4"><\/span><span class="loadingCircle" id="loading5"><\/span><span class="loadingCircle" id="loading6"><\/span><span class="loadingCircle" id="loading7"><\/span><span class="loadingCircle" id="loading8"><\/span><\/span><\/div>')};this.IsLiveVisualizationEnabledForKos=function(n,t){if(n==11&&t=="LMT")return!0;switch(parseInt(n)){case 10:case 13:case 15:case 1012:case 1016:case 1017:case 40:case 1002:case 1015:return!0;default:return!1}};this.IsLMTEnabledForKOS=function(n){switch(n){case 10:case 13:case 14:case 40:case 15:case 1002:case 1012:case 1015:case 1017:case 11:return!0;default:return!1}};this.IsLiveStreamingEnabledForKos=function(n){var t=!1;switch(parseInt(n)){case 1077:case 1078:case 1079:case 1080:case 1082:case 1083:case 1084:case 1088:t=!0}return t};this.hideWidgets=function(n,t){var i,r;if(BetAssist.addWidget(n,t),i=document.querySelectorAll("sr-widget-"+n),i&&i.length>0)for(r=0;r<i.length;r++)i[r].style.display=r==0?"inline-block":"none"};this.updateGameLog=function(n){n.State==="E"&&tt(n);n.State==="D"&&it(n)};this.collapseHeader=function(){$.post(app.path+"/Live/CollapseHeader",{value:!0})};this.collapseEsportsHeader=function(){$.post(app.path+"/eSports/CollapseHeader",{value:!0})};this.overrideEventDeltaUrl=function(t){t!==undefined&&t!==""&&(n.eventDeltaUrlOverride=t)};d();$(function(){$(document).on("click",".offer-tg .list-subtitle",function(){var t=$(this).parents(".offer-tg");t.hasClass("tg-collapsed")?(t.removeClass("tg-collapsed"),w(n.refreshEventId,t.prop("id"),!0)):(t.addClass("tg-collapsed"),w(n.refreshEventId,t.prop("id"),!1))})})};liveCal=new LiveEventCalendar;LiveBettingPhone=function(){function t(t){var i=$("#liveEventsList"),r;i.length&&(n.removeEvents(i,t),r=0,$.each(t,function(t,u){var e,f;i.length&&(e=i.children("li[data-event-id="+u.id+"]"),e.length?n.refreshEventLI(e,u):r==0?n.addEventLI(i,u):(f=i.children("li[data-event-id="+r+"]"),n.addEventLI(i,u,f.next().hasClass("spacer")?f.next():f)));r=u.id}))}var n=this;this.options={indexTopEvents:!1,includeAllEventsInTopEvents:!1,maxFilterTabs:5,kosGroupingEnabled:!0};n.templates.eventListItem='<li class="quick-bet-event event-li@EVENTCLASS" data-event-id="@EVENTID" data-kosid="@KOSID" data-countries="@COUNTRIES"><div class="eventcontainer" style="border: none; position: relative;"><div class="matchcontainer"><a href="@EVENTURL" rel="nofollow"><div class="team">@PLAYER1<\/div><div class="team">@PLAYER2<\/div><div class="addinfo">@LEAGUE<\/div><div class="addinfo gametime@EVENTID">@GAMETIME @STREAM<\/div><\/a><\/div><div class="live-main-bet">@OFFERGROUP<\/div><\/li>';n.templates.kosGroup='<div id="live-events-@KOSID" data-kosid="@KOSID" data-kos-order="@KOSORDER" data-kosname="@KOSNAME" data-countries="@COUNTRIES"><span class="sportsHeader"><span class="desc"><span class="kos icon_@KOSID"><\/span><span class="kosname">@KOSNAME<\/span><\/span><span class="desc"><\/span><span class="type">@KOSOFFERHEADER<\/span><\/span><ul class="live-list live-events-filtered @RENDERTYPE"><\/ul><div class="spacer"><\/div><\/div>';n.templates.kosFilterButton='<li data-kos-order="@KOSORDER"><a data-kos-id="@KOSID" href="@URL"><span class="kos-button"><span class="kos large icon_@KOSID"><\/span><\/span><span class="kos-text">@KOSNAME<\/span><span class="active-indicator"><\/span><\/a><\/li>';n.templates.threeWayHeader="<span>1<\/span><span>X<\/span><span>2<\/span>";n.templates.twoWayHeader="<span>1<\/span><span>2<\/span>";LiveBettingPhone.prototype.refreshIndex=function(){var i=n.getFilter(),u=n.getCountryFilter(),r;if(n.options.indexTopEvents)try{return r=i.length==1?i[0]:"live",LiveBetting.LiveBettingBox._instance._liveBettingBoxClient.smartphoneGetStartPageEvent(r),""}catch(f){}return $.ajax({url:global.appPath+"/live",data:{kosId:n.getFilter()[0],stream:n.getStreamFilter()},dataType:"json",cache:!1,success:function(i){var f=new LiveKosGroups(n,n.templates.kosGroup,n.templates.kosFilterButton,n.templates.twoWayHeader,n.templates.threeWayHeader),r,u;f.refresh(i.events);t(i.events);r=i.totalEventCount;u=r==1?"Live Betting Now 1 Game":"Live Betting Now X Games";$(".live-title .live-title-count").text(Translation.getTextId(u).replace(/\{0\}/,r));n.updateFilterCount(r,i.eventCountByKos,n.options.maxFilterTabs,i.userCountry,i.showCountryFilter,i.streamEventCount,i.userCountryEventCount,n.options.kosGroupingEnabled,i.iconColorWhite);n.checkFilter(i);n.applyFilter();n.trendTimeout();n.raiseIndexLoaded(i,document.getElementById("liveEventsGrouped"))}})};LiveBettingPhone.prototype.applyFilterCompleted=function(){$("#liveEventsGrouped > div:visible").each(function(t,i){var r=$(i),u=r.children(".live-list").children(":visible").length;r.find(".live-title").children("span").last().text(n.getKosGroupTitle(u,r.data("kosname")))})};LiveBettingPhone.prototype.srLiveAddWidgets=function(t,i,r,u){var h=n.iFrameUrl.replace("{@matchId}",t),c='<iframe src="'+h+'" width="100%" height="100%" name="srlive'+t+'" frameborder="0" scrolling="no" />',o=$('div[id="srlive_container"]'),e,s,f;o.length==1?n.IsLMTEnabledForKOS(i)?(e="lmtvisualization",document.getElementById(e)||(s=document.getElementsByTagName("head")[0],f=document.createElement("link"),f.id=e,f.rel="stylesheet",f.type="text/css",f.href=u=="Betworld"?"/Content/css/licenses/BW_lmtvisualization.css":"/Content/css/lmtvisualization.css",$("#srlive_container").css({maxWidth:"519px"}),f.media="all",s.appendChild(f)),SIR("addWidget","#srlive_container","match.lmtPlus",{matchId:t,smallLayout:"vertical",tabsPosition:"top",layout:"single",scoreboard:"compact",momentum:"compact",activeSwitcher:"scoreDetails",collapseTo:"momentum",goalBannerImage:u=="Betworld"?"/Content/images/BW_Logo_515x90.png":"/Content/images/ic_logo.png",silent:!0,forceTeamInvert:!1})):(o.html(c),$(".sc-matchscoreboard").css("display","none")):n.stopLiveVisualization();n.srAddWidgetHandle(t)}};LiveBettingPhone.prototype=new LiveBetting;jQuery.ajaxq=function(n,t){var f=null,i,r,u;if(typeof document.ajaxq=="undefined"&&(document.ajaxq={q:{},r:null}),typeof document.ajaxq.q[n]=="undefined"&&(document.ajaxq.q[n]=[]),typeof t!="undefined"){i={};for(r in t)i[r]=t[r];t=i;u=t.complete;t.complete=function(t,i){document.ajaxq.q[n].shift();document.ajaxq.r=null;u&&u(t,i);document.ajaxq.q[n].length>0&&(document.ajaxq.r=jQuery.ajax(document.ajaxq.q[n][0]))};document.ajaxq.q[n].push(t);document.ajaxq.q[n].length==1&&(f=document.ajaxq.r=jQuery.ajax(t))}else document.ajaxq.r&&(document.ajaxq.r.abort(),document.ajaxq.r=null),document.ajaxq.q[n]=[];return f},function(n){var t;(function(n){function t(n,t){document.querySelectorAll(t.id).forEach(function(i){n?i.classList.add(t.css):i.classList.remove(t.css)})}function i(n){var i,t;for(i in n.singleBets)t=n.singleBets[i],t!=null&&t.addHighLight()}n.highlightOdd=t;n.highlightOdds=i})(t=n.UI||(n.UI={}))}(Betting||(Betting={})),function(n){var t=function(){function t(t){this._bs=t;this._type=n.BetTypes.SB;this._id="";this._quote=0;this._amount=0;this._maxLength=12}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"amount",{get:function(){return this._amount},set:function(n){this._amount=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"win",{get:function(){return this.calculateProfit()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quote",{get:function(){return this._quote},set:function(n){this._quote=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasValidAmount",{get:function(){return this.checkValidAmount()},enumerable:!1,configurable:!0}),t.prototype.checkValidAmount=function(){var n=document.getElementById(this.amountId);return n?n.value.length==0||!isNaN(Number(n.value)):!1},t.prototype.clearAmount=function(n){return n===void 0&&(n=0),this.amount=n,this.resetAmount(this._id,this.amount)},t.prototype.resetAmount=function(n,t){n===void 0&&(n="");t===void 0&&(t=0);var i=document.getElementById(n);return i?(this.isAmountDifferent(i.value,t)&&(i.value=Common.Application.instance.platform==Common.Platform.Web?Common.Helper.getFormatedMoney(t):Common.Helper.getStake(t)),!0):!1},Object.defineProperty(t.prototype,"amountId",{get:function(){return this._elementIds[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonId",{get:function(){return this._elementIds[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"columnId",{get:function(){return this._elementIds[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"winValueId",{get:function(){return this._elementIds[3]},enumerable:!1,configurable:!0}),t.prototype.checkKeyCode=function(t,i){return i===void 0&&(i=n.BetTypes.SB),isNaN(t)?this.amount=t=0:t>0&&(this.amount=t),t},t.prototype.checkErrors=function(t,i){var r={model:new n.BetErrorModel,error:n.ResultType[t.error],isClearAmountRequired:!1,isResetAmountRequired:!1};switch(r.error){case n.ResultType.StakeLimitMaximum:this.amount=t.maxLimit;break;case n.ResultType.StakeLimitMinimum:this.amount=0;break;case n.ResultType.AmountFormatError:this.amount=0;r.isResetAmountRequired=!0;i==n.ResultType.None&&(r.model.resultType=r.error);break;case n.ResultType.NoWinningPossible:case n.ResultType.AccountBalanceLimit:this.amount=0;i==n.ResultType.None&&(r.model.resultType=r.error);r.model.result=!0}return this.setTotalWinColumns(),r},t.prototype.setAmountFromField=function(n){this.amount=n.amount>0?n.amount:0;this.setTotalWinColumns()},t.prototype.getPossiblePreviewWin=function(n){var t=this._amount;return this._amount=n,this.win},t.prototype.calculateProfit=function(){var i=0,r=0,n,t;return this._bs.taxInfo&&(i=this._bs.taxInfo.factor,r=this._bs.taxInfo.maxOdd),n=this.quote,t=this.amount,n*t-(n<r?n*t*i:0)},t.prototype.calculateTax=function(n,t){var i=Math.floor(t),r=t-i,u=this._bs.license.getTaxFactor(n-1)*i;return r>0&&(u+=this._bs.license.getTaxFactor((n-1)*r)),u},t.prototype.setTotalWinColumns=function(n){n===void 0&&(n=0);this.setTotalColumns(n)&&this.setTotalWin(Common.Helper.getFormatedMoney(this.win))},t.prototype.calculateProfitForWinColumns=function(n){return this.quote*this._amount-n},t.prototype.setTotalColumns=function(n){var t,i;return((t=this._bs.license)===null||t===void 0?void 0:t.showTotalWin)?(i=document.getElementById(this.columnId),i&&(i.innerHTML=this.getTotalColumnsValue(n)),!0):Common.Application.instance.platform!=Common.Platform.Web},t.prototype.getTotalColumnsValue=function(n){return Extensions.String.Format(Translation.getTextId("TextColumns"),[Common.Helper.getFormatedMoney(n),1])},t.prototype.setTotalWin=function(n){var t=document.getElementById(this.winValueId);t&&(t.innerText=n)},t.prototype.isAmountDifferent=function(n,t){return Extensions.String.ToNumber(n)!=Extensions.String.ToNumber(Common.Helper.round(t,2))},Object.defineProperty(t.prototype,"htmlWinColumnLabel",{get:function(){return'<span id="'+this.columnId+'" class="column">'+Extensions.String.Format(Translation.getTextId("TextColumns"),[Common.Helper.getFormatedNumber(this._amount),1])+"<\/span>"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlWinInfoLabel",{get:function(){return'<label title="'+Translation.getTextId("InfoTax")+'">'+Translation.getTextId("TotalWin")+"*<\/label>"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlWinValueLabel",{get:function(){return'<label id="'+this.winValueId+'">'+Common.Helper.getFormatedMoney(this.win)+"<\/label>"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlWinCurrency",{get:function(){return"<span>&nbsp;"+Common.Application.instance.currency+"<\/span>"},enumerable:!1,configurable:!0}),t}();n.BetBase=t}(Betting||(Betting={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t=function(t){function i(n){var i=t.call(this,n.bs)||this;i._quoteNew=0;i._isLocked=!1;i._freebetBonusId=0;i._quoteHasChanged=!1;i._isExpired=!1;i._data=n;i._id=""+n.id;i._quote=n.quote;i._amount=n.amount;i._freebetBonusId=n.freebetBonusId;switch(i._data.tip){default:i._data.tip="";case"1":case"X":case"2":}return i._elementIds=["amount_"+i._data.id,"btn_single_"+i._data.id,"wincolumn_"+i._data.id,"winvalue_"+i._data.id],i}return __extends(i,t),Object.defineProperty(i.prototype,"html",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"quoteNew",{get:function(){return this._quoteNew},set:function(n){this._quoteNew=n},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isLocked",{get:function(){return this._isLocked},set:function(n){this._isLocked=n},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isExpired",{get:function(){return this._isExpired},set:function(n){this._isExpired=n},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"freebetBonusId",{get:function(){return this._freebetBonusId},set:function(n){this._freebetBonusId=n},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"disabled",{get:function(){return this._disabled},set:function(n){this._disabled=n},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isBankChecked",{get:function(){var n=this.cbBank;return n?this._bs.isBankVisible&&n.checked:!1},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"cbBank",{get:function(){return this._cbBank==null&&(this._cbBank=document.getElementById(this.bankId)),this._cbBank},enumerable:!1,configurable:!0}),i.prototype.isQuoteChanged=function(n){var t=Common.Helper.round(this._quote,2),i=Common.Helper.round(n,2);return n>1&&i<t?!0:!1},Object.defineProperty(i.prototype,"quoteHasChanged",{get:function(){return this._quoteHasChanged},set:function(n){this._quoteHasChanged=n},enumerable:!1,configurable:!0}),i.prototype.acceptQuote=function(){this._quoteHasChanged&&this.setNewQuote()},i.prototype.updateAmount=function(){var t=this._id+"|"+this._amount+"|"+this.freebetBonusId;return this._bs.sendCommandToServer(n.RequestCommands.SetSingleAmount,t)},i.prototype.setNewQuote=function(){if(this._quoteNew>0){this._quoteHasChanged=!1;this._quote=this._quoteNew;var n=document.getElementById(this.offerId);n&&(n.innerHTML=Common.Helper.getFormatedOdd(this._quote*100));this.setTotalWinColumns();this.updateInfoLine()}},i.prototype.showBank=function(n){if(this._bs.elements.body){var t=this.cbBank;t&&(n?t.classList.remove("none"):(t.classList.add("none"),t.checked=!1))}},i.prototype.setBank=function(){var u=0,i,t,r;for(i in this._bs.systemBets)t=this._bs.systemBets[i],t&&(t.amount=0,t.setBank(this._data.id,this.isBankChecked),t.calculate(),u++);this._bs.updateSystemBets();r=this.isBankChecked?n.RequestCommands.SetBank:n.RequestCommands.UnSetBank;this._bs.sendCommandToServer(r,this.id)},i.prototype.setExpired=function(t){t===void 0&&(t=!1);this._isExpired=!0;this.updateInfoLine();this._bs.setSubmitButtonText(n.States.Expired)},i.prototype.updateInfoLine=function(){var n="",i=!1,t=document.getElementById(this.errortextId);return this._isExpired?(n=Translation.getTextId("Expired"),i=!0):this._isLocked?(n=Translation.getTextId("Locked"),i=!0):this._quoteHasChanged&&(n=Translation.getTextId("OddChange"),i=!0),t&&(n.length>0?(t.innerHTML="["+n+"]",t.classList.remove("none")):t.classList.contains("none")||t.classList.add("none")),i},i.prototype.updateQuote=function(n){this._quoteHasChanged==!1&&n>0&&Common.Helper.round(n,2)!=Common.Helper.round(this._quote,2)&&(this._quoteNew=n,this._quoteHasChanged=!0)},i.prototype.create=function(n){this.updateData(n)},i.prototype.calculateProfit=function(){return this._bs.license.showTotalWin?this.calculateProfitForWinColumns(this.calculateTax(this._quote,this._amount)):t.prototype.calculateProfit.call(this)},i.prototype.checkErrors=function(i,r){var u=t.prototype.checkErrors.call(this,i,r);return u.error==n.ResultType.AccountBalanceLimit&&(u.isResetAmountRequired=!0),u},i.prototype.setTotalWinColumns=function(n){n===void 0&&(n=0);t.prototype.setTotalWinColumns.call(this,this.amount)},i.prototype.resetAmount=function(){return t.prototype.resetAmount.call(this,this.amountId,this.amount)?(this.data.isFreeBet&&(this._bs.hasFreebet=!0),this.setTotalWinColumns(),!0):!1},i.prototype.remove=function(){this._data.id=-1;this._data.groupId=-1;this.removeHighLight();var n=document.getElementById(this.betId);n&&n.remove()},i.prototype.addHighLight=function(){n.UI.highlightOdd(!0,this._highlight)},i.prototype.removeHighLight=function(){n.UI.highlightOdd(!1,this._highlight)},i.prototype.setBankHandler=function(){var t=this,n=document.getElementById(this.bankId);n&&n.addEventListener("click",function(){t.setBank()})},i.prototype.updateData=function(n){this._data.isBank=n.isBank;this._data.isLongTerm=n.isLongTerm;this._data.isFreeBet=n.isFreeBet;this._data.start=n.start;this._data.tip=n.tip.trim();this._data.flagLongTerm=n.flagLongTerm;this._data.innerMarketCombi=n.innerMarketCombi},Object.defineProperty(i.prototype,"betId",{get:function(){return"bet_"+this._id},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"bankId",{get:function(){return"bank_"+this._id},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"checkboxId",{get:function(){return"betchecked_"+this._id},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"offerId",{get:function(){return"betodd_"+this._id},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"errortextId",{get:function(){return"errortext_"+this._id},enumerable:!1,configurable:!0}),i}(n.BetBase);n.SingleBetBase=t}(Betting||(Betting={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var r=function(t){function r(i){var r=t.call(this,i)||this;return r._errorLongTermCombi=!1,r._needCheck=!1,r._needCheckCombiPool=!1,r._freebetBonusId=0,r._isMultiBet=!1,r._id="combi",r._readOnly="",r._placeHolder="",r.resetProperties(),r._betsInCombi={},r._type=n.BetTypes.CB,r._errorServer=n.ResultType.OK,r._elementIds=["amount_"+r._id,"btn_"+r._id,"wincolumn_"+r._id,"winvalue_"+r._id],r._knownErrors=[n.ResultType.CombiPoolError,n.ResultType.LongTermMix,n.ResultType.LongTermCombiError,n.ResultType.SelfLimitError],r}return __extends(r,t),r.prototype.render=function(){},Object.defineProperty(r.prototype,"combiBet",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"html",{get:function(){if(this._bs.elements.body){var n="";return this._count.bet==0?this._amount=0:n=this.combiBet,n}return""},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"bets",{get:function(){return this._betsInCombi},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"quote",{get:function(){return this.check(),this._quote},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"quoteUnchecked",{get:function(){return this._quote},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"countBets",{get:function(){return this.check(),this._count.bet},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"countBank",{get:function(){return this.check(),this._count.bank},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"valid",{get:function(){return!(this.hasError||this.isMultiBet)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isMultiBet",{get:function(){switch(this._errorServer){case n.ResultType.LongTermCombiError:this._errorLongTermCombi=!0;case n.ResultType.InvalidBet:return!0}return this.check(),this._isMultiBet},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"disabled",{get:function(){return this._disabled},set:function(n){this._disabled=n},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasError",{get:function(){var t=this,n=!1;return this._knownErrors.forEach(function(i){t._errorServer==i&&(n=!0)}),n||this._errorLongTermCombi},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"freebetBonusId",{get:function(){return this._freebetBonusId},set:function(n){this._freebetBonusId=n},enumerable:!1,configurable:!0}),r.prototype.hasBetInList=function(n){var i,t;for(i in n)if(t=n[Number(i)],t&&this._betsInCombi[t.id])return!0;return!1},r.prototype.updateAmount=function(){return this._bs.sendCommandToServer(n.RequestCommands.SetCombiAmount,this._amount+"|"+this._freebetBonusId)},r.prototype.addBet=function(n){this._needCheck=!0;this._betsInCombi[n.data.id]=n},r.prototype.addBetFromList=function(n){var i,t;for(i in n)t=n[Number(i)],t&&this.addBet(t)},r.prototype.refillBets=function(n){var i,t;this.resetProperties();this._betsInCombi={};for(i in n)t=n[Number(i)],t&&t.data.isChecked&&t.quote>1&&this.addBet(t)},r.prototype.checkErrors=function(i,r){var u=t.prototype.checkErrors.call(this,i,r);return u.error==n.ResultType.AccountBalanceLimit&&(u.isResetAmountRequired=!0),u},r.prototype.clone=function(){var i=n.Bet.combiBet(this._bs),r,t;for(r in this._betsInCombi)t=this._betsInCombi[Number(r)],t&&i.addBet(t);return i},r.prototype.removeBet=function(n){this._needCheck=!0;this._betsInCombi[n]=null},r.prototype.setServerError=function(t){switch(t){case n.ResultType.OK:if(this._errorServer!=t){this.resetServerError();return}case n.ResultType.StakeLimitMaximum:case n.ResultType.StakeLimitMinimum:break;default:this.amount=0}this._errorServer=t},r.prototype.resetServerError=function(){this._errorServer=n.ResultType.OK},r.prototype.multiBetInnerCheck=function(){var r={},u={},f=!0,e,n,t,i;for(e in this._betsInCombi)if(n=this._betsInCombi[Number(e)],n)if(t=n.data.eventId,i=n.data.groupId,r[t]){if(u[i]==null){f=!1;break}}else r[t]=!0,u[i]=!0;return f},r.prototype.check=function(){var f,n;if(this._needCheck){var u={},i={},t="";this.resetProperties();for(f in this._betsInCombi)if(n=this._betsInCombi[Number(f)],n&&n.data.isChecked){n.data.isBank&&this._count.bank++;var e=n.data.eventId,r=n.data.groupId,o=i[r]!=null;u[e]?(this._isMultiBet=this._isMultiBet||o&&!n.data.innerMarketCombi,o==!1&&(this._needCheckCombiPool=!0,i[r]=!0)):(i[r]=!0,u[e]=!0);n.data.isLongTerm?(this._count.longTerm++,t.length==0&&(t=n.data.flagLongTerm),this._errorLongTermCombi=this._errorLongTermCombi||this._count.noLongTerm!=0||t=="N"||t!=n.data.flagLongTerm):(this._count.noLongTerm++,this._errorLongTermCombi=this._count.longTerm!=0);this._count.bet++;this._quote=this._quote*n.quote}}this._count.bet<2&&(this.amount=0)},r.prototype.calculateProfit=function(){return this._bs.license.showTotalWin?this.calculateProfitForWinColumns(this.calculateTax(this._quote,this._amount)):t.prototype.calculateProfit.call(this)},r.prototype.setTotalWinColumns=function(n){n===void 0&&(n=0);t.prototype.setTotalWinColumns.call(this,this.amount)},r.prototype.resetAmount=function(){return t.prototype.resetAmount.call(this,this.amountId,this.amount)?(this.setTotalWinColumns(),!0):!1},r.prototype.resetProperties=function(){this._quote=1;this._count=new i;this._needCheck=!1;this._needCheckCombiPool=!1;this._isMultiBet=!1;this._errorLongTermCombi=!1},Object.defineProperty(r.prototype,"placeHolder",{get:function(){return this._placeHolder.length>0?'placeholder="'+this._placeHolder+'"':this._placeHolder},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"readOnly",{get:function(){return this._readOnly.length>0?" "+this._readOnly+" ":this._readOnly},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"combiDescription",{get:function(){return"<span>\n\t\t\t\t\t"+this.combiText+"\n\t\t\t\t\t"+this.totalWinText+"\n\t\t\t\t\t<\/span>"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"combiInput",{get:function(){return'<span class="amount">'+this.inputField+this._buttonComboBox+"<\/span>"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"combiText",{get:function(){return"<span>\n\t\t\t\t\t"+Extensions.String.Format(Translation.getTextId("CombineAll"),[this._count.bet,Common.Helper.getFormatedOdd(this._quote*100)])+"\n\t\t\t\t\t<\/span>"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"methodBlur",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"totalWinText",{get:function(){return this._bs.license.showTotalWin?"<span>\n\t\t\t\t\t\t"+this.totalWinColumnLabel+"\n\t\t\t\t\t\t"+this.totalWinInfoLabel+"&nbsp;"+this.totalWinProfitLabel+"\n\t\t\t\t\t\t<\/span>":(Translation.addTextId("InfoColumns",""),"")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"totalWinColumnLabel",{get:function(){return'<label id="'+this.columnId+'" class="column">'+Extensions.String.Format(Translation.getTextId("TextColumns"),[Common.Helper.getFormatedNumber(this._amount),1])+"<\/label>"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"totalWinInfoLabel",{get:function(){return'<label title="'+Translation.getTextId("InfoTax")+'">'+Translation.getTextId("TotalWin")+"*<\/label>"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"totalWinProfitLabel",{get:function(){var n=Common.Helper.getFormatedMoney(this.win);return'<label id="'+this.winValueId+'">'+n+"<\/label><label>€<\/label>"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"inputField",{get:function(){return'<input id="'+this.amountId+'" type="text" class="'+Common.Application.instance.language+(this.disabled?" disabled":"")+'" maxlength="'+this._maxLength+'"'+this.readOnly+this.placeHolder+" "+this.methodBlur+' size="4" value="'+this._bs.license.formatAmount(this._amount)+'" title="'+Extensions.String.Format(Translation.getTextId("InfoColumns"),[1])+'" />'},enumerable:!1,configurable:!0}),r}(n.BetBase),i;t.CombiBetBase=r;i=function(){function n(){this.bet=0;this.bank=0;this.longTerm=0;this.noLongTerm=0}return n}();t.Count=i})(t=n.Desktop||(n.Desktop={}))}(Betting||(Betting={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var i=function(i){function r(t,r,u,f){var e=i.call(this,t)||this;return e._countBank=0,e._calculatedCombiCount=0,e._calculatedWinningCombiCount=0,e._countBets=0,e._basis=0,e._combination=0,e._amountRow=0,e._isMultiBet=!1,e._basis=r,e._combination=u,e._bets=f,e._betsBank={},e._betsInSystem={},e._type=n.BetTypes.SYS,e._combiOdds=[],e._elementIds=["sbamount_full_"+e.elementId,"btn_full_system_"+e.elementId,"wincolumn_"+e.elementId,"winvalue_"+e.elementId],e.allocateBets(),e}return __extends(r,i),Object.defineProperty(r.prototype,"html",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"id",{get:function(){return this._combination+"/"+this._basis},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"elementId",{get:function(){return this._combination+"_"+this._basis},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"amount",{get:function(){return this._amount},set:function(n){this._amount=n;this._amountRow=n/this.countBets},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"amountRow",{get:function(){return this._amountRow},set:function(n){this._amountRow=n;this._amount=n*this.countBets},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"combiOdds",{get:function(){return this._combiOdds},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasValidAmount",{get:function(){var n=document.getElementById(this.amountRowId);return n?i.prototype.checkValidAmount.call(this)&&(n.value.length==0||!isNaN(Number(n.value))):!1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"quote",{get:function(){return this._quote==0&&this.calculate(),this._quote/this.countBets},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"combination",{get:function(){return this._combination},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"countBets",{get:function(){return this._countBets==0&&(this._countBets=this.factorial(this._basis-this.countBank)/(this.factorial(this._combination-this.countBank)*this.factorial(this._basis-this._combination))),this._countBets},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"countBank",{get:function(){var t,n;this._countBank=0;this._betsBank={};for(t in this._betsInSystem)n=this._betsInSystem[Number(t)],this._countBank+=Number(n&&n.data.isBank);return this._countBank},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"amountRowId",{get:function(){return"sbamount_row_"+this.elementId},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"buttonRowId",{get:function(){return"btn_system_"+this.elementId},enumerable:!1,configurable:!0}),r.prototype.setBank=function(n,t){var i=this._betsInSystem[n];i&&(this._quote=0,this._countBets=0,i.data.isBank=t,this._betsBank[n]=t?i:null)},r.prototype.calculate=function(){var h=n.Bet.combiBet(this._bs),r={},e={},u={},f={},c=0,o=0,l=this._combination-this.countBank,s,t,i;this._calculatedCombiBets={};this._calculatedCombiCount=0;this._calculatedWinningCombiCount=0;this._quote=0;this._countBank=0;this._isMultiBet=this._bs.combi.isMultiBet;for(s in this._betsInSystem)t=this._betsInSystem[Number(s)],t&&(t.data.isBank==!1?r[c++]=t:(e[t.data.id]=t,this._countBank++)),i=u[t.data.groupId],i?i.quote>t.quote?f[o++]=t:(f[o++]=i,u[t.data.groupId]=t):u[t.data.groupId]=t;this._combiOdds=[];this._countBank==0&&this._isMultiBet==!1?this.calculateQuoteCycleSimple(r):(this.calculateQuoteCycle(r,e,f,-1,h,this._countBank),this._countBets=this._calculatedCombiCount)},r.prototype.setAmountFromField=function(t){var i,r;switch(t.type){case n.BetTypes.SYS:t.amount>0?(this.amount=t.amount,t.amount=this.amountRow):this.amount=0;t.amountId=this.amountRowId;break;case n.BetTypes.SYSROW:t.amount>0?(this.amount=Number(Common.Helper.round(t.amount*this._countBets,2)),t.amount=this.amount):this.amount=0;t.amountId=this.amountId}i=document.getElementById(t.amountId);i&&(r=Extensions.String.ToNumber(i.value),r!=t.amount&&(i.value=Common.Helper.getFormatedMoney(t.amount),this.setTotalWinColumns()))},r.prototype.calculateProfit=function(){var t,r,n;if(this._bs.license.showTotalWin){for(t=0,r=this.combiOdds,n=0;n<r.length;n++)t+=this.calculateTax(r[n],this.amountRow);return this.calculateProfitForWinColumns(t)}return i.prototype.calculateProfit.call(this)},r.prototype.checkErrors=function(t,r){var u=i.prototype.checkErrors.call(this,t,r);return u.error==n.ResultType.NoWinningPossible&&(u.isClearAmountRequired=!0),u},r.prototype.resetAmount=function(){var n=!1;return n=i.prototype.resetAmount.call(this,this.amountId,this.amount),n=i.prototype.resetAmount.call(this,this.amountRowId,this.amountRow),n&&this.setTotalWinColumns(),n},Object.defineProperty(r.prototype,"multiBetQuote",{get:function(){var n=0;return this._combiOdds.length>0?(this._combiOdds.forEach(function(t){n=n+t}),Common.Helper.round(n/this._combiOdds.length,2)):"---"},enumerable:!1,configurable:!0}),r.prototype.checkBetsAndQuote=function(){var n=this.quote;return this.countBets>0&&isNaN(n)==!1&&n>1},r.prototype.allocateBets=function(){var t,n;for(t in this._bets)n=this._bets[Number(t)],n&&n.data.isChecked&&(this._betsInSystem[Number(t)]=n,n.data.isBank&&(this._betsBank[Number(t)]=n))},r.prototype.factorial=function(n){for(var i=1,t=2;t<=n;t++)i*=t;return i},r.prototype.calculateQuoteCycleSimple=function(n){for(var f=!0,e=new t(this._basis,this._combination),u,i,r;f;){for(u=e.applyTo(n),i=1,r=0;r<u.length;r++)i*=u[r].quote;this._quote+=i;this._combiOdds.push(i);f=e.successor()}},r.prototype.calculateQuoteCycle=function(t,i,r,u,f,e){if(u++,u<this._basis-this._countBank&&e<this._combination)this.calculateQuoteCycle(t,i,r,u,f.clone(),e),f.addBet(t[u]),this.calculateQuoteCycle(t,i,r,u,f.clone(),e+1);else if(e==this._combination){if(f.addBetFromList(i),f.isMultiBet==!1&&f.multiBetInnerCheck()&&(this._calculatedCombiBets[this._calculatedCombiCount++]=f,f.hasBetInList(r)==!1)){var o=f.quote;this._quote+=o;this._combiOdds.push(o);this._calculatedWinningCombiCount++}f=n.Bet.combiBet(this._bs)}},r}(n.BetBase),t;n.SystemBetBase=i;t=function(){function n(n,t){this._n=0;this._k=0;(this._n<0||this._k<0)&&Common.Debug.write("Negative parameter in constructor");this._n=n;this._k=t;this._data=new Array(t);for(var i=0;i<t;++i)this._data[i]=i}return n.prototype.applyTo=function(n){for(var i=[],t=0;t<this._k;++t)i[t]=n[this._data[t]];return i},n.prototype.successor=function(){var n,t;if(this._data.length==0||this._data[0]==this._n-this._k)return!1;for(n=0,n=this._k-1;n>0&&this._data[n]==this._n-this._k+n;--n);for(++this._data[n],t=n;t<this._k-1;++t)this._data[t+1]=this._data[t]+1;return!0},n}();n.NewCombinations=t}(Betting||(Betting={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i=function(n){function t(t){var i=n.call(this,t)||this;return i._highlight={id:".o"+i._id,css:"selected"},i}return __extends(t,n),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(n){this._disabled=n;Common.DOM.setClass(this._stake,n,"disabled")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stake",{set:function(n){this._amount=n;this._stake&&(this._stake.value=Common.Helper.getStake(n));this.setTotalWinColumns()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bettingSlip",{get:function(){return this._bs},enumerable:!1,configurable:!0}),t.prototype.create=function(t){var i,r=document.getElementById(this.betId);r||(this._data.kosId=t.kosId,this._data.name=t.name,this._data.groupName=t.groupName,this._data.shortName=t.shortName,n.prototype.create.call(this,t),((i=this._bs.elements)===null||i===void 0?void 0:i.single)&&this._bs.elements.single.one.appendChild(Common.Helper.getNode(this.html)),this._stake=document.getElementById(this.amountId),this._stake&&(this._stake.value=Common.Helper.getStake(t.amount)),this._bs.checkSystemBetsCount(!0),this.setHandler())},t.prototype.setHandler=function(){var n=this,t;this.setBankHandler();t=document.getElementById("delete_"+this._id);t&&t.addEventListener("click",function(){n._bs.removeBet({boId:n._data.id})});this._stake&&this._stake.addEventListener("click",function(){n._bs.isSending||n._disabled||n._bs.stakeEntry.show({target:n._stake,value:n.amount,disablePossibleWin:!1,delegates:{change:function(t){return n.amount=t,Common.Helper.getFormatedMoney(n.getPossiblePreviewWin(n._amount))},take:function(){n.updateAmount()}}})})},t.prototype.showBank=function(n){var t=document.getElementById(this.bankId);t&&(n?t.parentElement.classList.remove("none"):(t.parentElement.classList.add("none"),t.checked=!1))},t.prototype.updateInfoLine=function(t){var i,r;return t===void 0&&(t=!1),i=n.prototype.updateInfoLine.call(this),t&&i&&(this.setPositionForScrolling(),r=this._data.bs,r.showGoTo()),i},t.prototype.setPositionForScrolling=function(){var i,n=document.getElementById(this.errortextId),t,r;n&&(t=this._data.bs.elements.settings.scroll,t.container==null&&(t.container=n.closest(".betslip-dialog-content.bets")),n.offsetTop>0&&((i=t.container)===null||i===void 0?void 0:i.scrollTop)>n.offsetTop?(r=document.getElementById(this.betId),r&&(this._data.bs.elements.settings.scroll.position=r.offsetTop)):this._data.bs.elements.settings.scroll.position=0)},Object.defineProperty(t.prototype,"html",{get:function(){return'<div id="bet_'+this._data.id+'" class="bet">\n\t\t\t\t\t'+this.htmlMainSingleRow+"\n\t\t\t\t\t"+this.htmlInfoSingleRow+"\n\t\t\t\t\t"+this.htmlErrorSingleRow+"\n\t\t\t\t\t"+this.htmlWinSingleRow+"\n\t\t\t\t\t<\/div>"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlMainSingleRow",{get:function(){return'<div class="main-data content">\n\t\t\t\t\t'+this.htmlIconDelete+"\n\t\t\t\t\t"+this.htmlName+"\n\t\t\t\t\t"+this.htmlOffer+"\n\t\t\t\t\t<\/div>"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlWinRow",{get:function(){return Common.Application.instance.license.showTotalWin?'<span id="win_'+this._data.id+'" class="greece">\n\t\t\t\t\t\t'+this.htmlWinColumnLabel+"\n\t\t\t\t\t\t"+this.htmlWinInfoLabel+"\n\t\t\t\t\t\t"+this.htmlWinValueLabel+"\n\t\t\t\t\t\t"+this.htmlWinCurrency+"\n\t\t\t\t\t\t<\/span>":"<span>"+Translation.getTextId("Win")+":&nbsp;<\/span>"+this.htmlWinValueLabel+this.htmlWinCurrency},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlInfoSingleRow",{get:function(){return'<div class="info-data content">\n\t\t\t\t\t\t<div>'+this.htmlIconLive+this.htmlIconKos+this.htmlInfo+"<\/div>"+this.htmlAmount+"\n\t\t\t\t\t<\/div>"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlErrorSingleRow",{get:function(){return'<div id="errortext_'+this._data.id+'" class="error-data warning none"><\/div>'},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlWinSingleRow",{get:function(){return'<div class="win-data">'+this.htmlBankSingle+"<div>"+this.htmlWinRow+"<\/div><\/div>"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlBankSingle",{get:function(){return'<div class="bank-data'+(this._bs.isBankVisible?"":" none")+'">'+this.htmlBank+"<\/div>"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlBank",{get:function(){return'<input type="checkbox" id="bank_'+this._data.id+'" '+(this._data.isBank?'checked ="checked"':"")+'><label class="icon square" for="bank_'+this._data.id+'"><\/label><label for="bank_'+this._data.id+'">'+Translation.getTextId("Bank")+"<\/label>"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlName",{get:function(){return'<strong id="txt_'+this._data.id+'" class="txt">'+this._data.shortName+"<\/strong>"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlOffer",{get:function(){return'<span id="BO'+this._data.id+'" class="quote">\n\t\t\t\t\t'+this.htmlIconTrend+"\n\t\t\t\t\t"+this.htmlOdd+"\n\t\t\t\t\t<\/span>"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlOdd",{get:function(){return'<strong id="betodd_'+this._data.id+'" class="quote">'+Common.Helper.getFormatedOdd(this._quote*100)+"<\/strong>"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlIconDelete",{get:function(){return'<label id="delete_'+this._data.id+'" class="icon close"><\/label>'},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlIconTrend",{get:function(){return'<label id="trend_'+this._data.id+'" class="icon trend"><\/label>'},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlIconLive",{get:function(){return this._data.isLive?'<label class="icon live"><\/label>':""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlIconKos",{get:function(){return'<label class="kos icon_'+this._data.kosId+'"><\/label>'},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlInfo",{get:function(){return"<span>"+this._data.groupName+"<\/span>&nbsp;|&nbsp;<span>"+Translation.getTextId("Tip")+": "+this._data.name+"<\/span>"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlAmount",{get:function(){return'<div><input type="text" id="amount_'+this._data.id+'" class="'+Common.Application.instance.language+(this.disabled?" disabled":"")+'" value="'+Common.Helper.getStake(this._amount)+'" onfocus="this.blur()" readonly placeholder="'+Translation.getTextId("Stake")+'" /><\/div>'},enumerable:!1,configurable:!0}),t}(n.SingleBetBase);t.SingleBet=i})(t=n.Mobile||(n.Mobile={}))}(Betting||(Betting={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i=function(n){function t(t){var i=n.call(this,t)||this;return i._readOnly="readonly",i._placeHolder=Translation.getTextId("Stake"),i._bs.elements.single&&(i._container=i._bs.elements.single.combi.closest("details")),i._buttonComboBox="",i}return __extends(t,n),t.prototype.hide=function(){this._container.classList.add("none")},t.prototype.show=function(){this._container.classList.remove("none")},Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(n){this._disabled=n;Common.DOM.setClass(this._stake,n,"disabled")},enumerable:!1,configurable:!0}),t.prototype.setField=function(){this._stake=document.getElementById(this.amountId);this.stake=this._amount;this.setHandler()},Object.defineProperty(t.prototype,"combiBet",{get:function(){return'<div class="main-data">'+this.combiDescription+" "+this.combiInput+'<\/div><div class="win-data"><div>'+this.htmlWinRow+"<\/div><\/div>"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"combiDescription",{get:function(){return"<span>\n\t\t\t\t\t"+this.combiText+"\n\t\t\t\t\t<\/span>"},enumerable:!1,configurable:!0}),t.prototype.setHandler=function(){var n=this;this._stake&&this._stake.addEventListener("click",function(){n._bs.isSending||n._disabled||n._bs.stakeEntry.show({target:n._stake,value:n.amount,disablePossibleWin:!1,delegates:{change:function(t){return n.amount=t,Common.Helper.getFormatedMoney(n.getPossiblePreviewWin(n.amount))},take:function(){n.updateAmount()}}})})},t.prototype.render=function(){this._bs.elements.body&&(this._count.bet<2||this.hasError||this._isMultiBet?this.hide():(this._bs.elements.single.combi.innerHTML=this.html,this.setField(),this.show()))},Object.defineProperty(t.prototype,"stake",{set:function(n){this._amount=n;this._stake&&(this._stake.value=Common.Helper.getStake(n));this.setTotalWinColumns()},enumerable:!1,configurable:!0}),t.prototype.refresh=function(n){this.amount=n.amount;this.render()},Object.defineProperty(t.prototype,"methodBlur",{get:function(){return'onfocus="this.blur()"'},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlWinRow",{get:function(){return Common.Application.instance.license.showTotalWin?'<span id="win_combi" class="greece">\n\t\t\t\t\t\t'+this.htmlWinColumnLabel+"\n\t\t\t\t\t\t"+this.htmlWinInfoLabel+"\n\t\t\t\t\t\t"+this.htmlWinValueLabel+"\n\t\t\t\t\t\t"+this.htmlWinCurrency+"\n\t\t\t\t\t\t<\/span>":"<span>"+Translation.getTextId("Win")+":&nbsp;<\/span>"+this.htmlWinValueLabel+this.htmlWinCurrency},enumerable:!1,configurable:!0}),t}(n.Desktop.CombiBetBase);t.CombiBet=i})(t=n.Mobile||(n.Mobile={}))}(Betting||(Betting={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i=function(t){function i(n,i,r,u){return t.call(this,n,i,r,u)||this}return __extends(i,t),Object.defineProperty(i.prototype,"stake",{set:function(n){this.amount=n;this._stake.value=Common.Helper.getStake(this._amountRow);this.setTotalWinColumns()},enumerable:!1,configurable:!0}),i.prototype.render=function(n){var t;this.checkBetsAndQuote()&&(n--,t=Common.Helper.getNode(this.html),this._bs.elements.single.system.appendChild(t),this._stake=document.getElementById(this.amountRowId));this.setHandler()},i.prototype.setTotalWinColumns=function(n){n===void 0&&(n=0);t.prototype.setTotalWinColumns.call(this,this.amount)},i.prototype.setHandler=function(){var t=this;this._stake&&this._stake.addEventListener("click",function(){t._bs.isSending||t._bs.stakeEntry.show({target:t._stake,value:t.amountRow,disablePossibleWin:!1,delegates:{change:function(n){return t.amountRow=n,Common.Helper.getFormatedMoney(t.getPossiblePreviewWin(t.amount))},take:function(){t._bs.sendCommandToServer(n.RequestCommands.SetSysAmount,t.id+"|"+t.amount)}}})})},Object.defineProperty(i.prototype,"html",{get:function(){return'<li id="bs_system'+this.elementId+'" ><div>'+this.columnInfo+this.columnAmount+"<\/div>"+this.htmlWinRow+"<\/li>"},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"htmlWinRow",{get:function(){return this._bs.license.showTotalWin?'<div class="win-data"><span>'+this.htmlWinColumnLabel+this.htmlWinInfoLabel+this.htmlWinValueLabel+this.htmlWinCurrency+"<\/span><\/div>":""},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"columnInfo",{get:function(){this._quote>0&&(this._quote=0);var n=Common.Helper.getFormatedOdd(this.quote*100);return this._isMultiBet&&(n=Common.Helper.getFormatedOdd(Number(this.multiBetQuote)*100)),'<span class="text"><strong>'+Translation.getTextId("System")+"&nbsp;"+this._combination+"/"+this._basis+'<\/strong>&nbsp;<span id="txtOdd'+this.elementId+'" >('+Translation.getTextId("Quote")+" "+n+")<\/span><\/span>"},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"columnAmount",{get:function(){return"<span>"+this.countBets+'<\/span><span>&nbsp;x&nbsp;<\/span><span class="stake">'+this.input+"<\/span>"},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"input",{get:function(){return'<input id="'+this.amountRowId+'" type="text" class="'+Common.Application.instance.language+'" size="4" maxlength="'+this._maxLength+'" value="'+Common.Helper.getStake(this._amountRow)+'" onfocus="this.blur()" readonly placeholder="'+Translation.getTextId("Stake")+'" >'},enumerable:!1,configurable:!0}),i.prototype.getButton=function(n){return'<span id="'+n+'"><label class="icon bl arrow-down"><\/label><\/span>'},i}(n.SystemBetBase);t.SystemBet=i})(t=n.Mobile||(n.Mobile={}))}(Betting||(Betting={})),function(n){var t;(function(t){var i=function(){function i(t){var i=this;this._data=t;this._outcomeId=t.bet.id;this._containerId="quickbet";this._css={down:"arrow-down",up:"arrow-up",none:"none",active:"active",tax:"tax",error:"error",success:"success",info:"info",freebetList:"qb-freebets"};this._isSending=!1;this._currentState=n.States.Submit;this.clearMessageViewModel();this._freebetList=new n.FreebetSelection({freebets:t.freebets,prefix:"qb",onChange:function(n){i.setFreebet(n)}})}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container==null&&(this._container=Common.Helper.getNode(this.html),this.appendFreeBetList()),this._container},enumerable:!1,configurable:!0}),i.prototype.init=function(){this.setSubmitText();this.setHandler()},Object.defineProperty(i.prototype,"isFreebet",{get:function(){return this._selectedFreebet!==undefined},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"id",{get:function(){return this._outcomeId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"exist",{get:function(){return this.get()!=null},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"preselect",{get:function(){return document.getElementById(this.preselectId)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"bs",{set:function(n){this._bs=n},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isExpired",{set:function(t){t&&(this._currentState=n.States.Close,this._messageViewModel.error=!1,this._messageViewModel.requestCommand=n.RequestCommands.AddBet,this._messageViewModel.resultType=n.ResultType.BetExpired,this._messageViewModel.message=Translation.getTextId("BetExpired"),this.setMessageView(this._messageViewModel))},enumerable:!1,configurable:!0}),i.prototype.remove=function(){var n=this.get();n&&(n.remove(),this._freebetList.hideTooltip())},Object.defineProperty(i.prototype,"eStake",{get:function(){return this._stake==null&&(this._stake=document.getElementById(this.stakeId)),this._stake},enumerable:!1,configurable:!0}),i.prototype.setSubmitText=function(){var n=this.eSubmitText;n&&(n.innerHTML=this.submitText)},Object.defineProperty(i.prototype,"stake",{get:function(){var n,t;return Extensions.String.ToNumber((t=(n=this.eStake)===null||n===void 0?void 0:n.value)!==null&&t!==void 0?t:"0")},set:function(n){var t=this.eStake;t&&(t.value=n.toString())},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"singleBet",{get:function(){return this._singleBet},enumerable:!1,configurable:!0}),i.prototype.setWin=function(){var n=this.eWin,t;return n&&this._singleBet?(t=this._singleBet.amount,this.setOdd(this._singleBet.quote),this._singleBet.amount=this.stake,n.innerText=Common.Helper.getFormatedMoney(this._singleBet.win),this._singleBet.clearAmount(t),n.innerText):Common.Helper.getFormatedMoney(0)},i.prototype.appendFreeBetList=function(){var n,t=(n=this._container)===null||n===void 0?void 0:n.querySelector("."+this._css.freebetList);t&&t.appendChild(this._freebetList.Element)},i.prototype.setFreebet=function(n){n===null?(this._selectedFreebet=undefined,this.eStake.classList.remove("disabled")):(this._selectedFreebet=n,this.stake=n.bonusLeft,this.eStake.classList.add("disabled"));this.setSubmitText()},i.prototype.setMessageView=function(t){var i,r,u=this._css.error;if(this.eError){if((i=this.eAni)===null||i===void 0?void 0:i.classList.add(this._css.none),t.error)(r=this.eSummary)===null||r===void 0?void 0:r.classList.remove(this._css.none),this.eError.classList.remove(this._css.none),this.eError.classList.add(this._css.error),this.setSubmitText();else{if(t.requestCommand==n.RequestCommands.DoLiveSubmit&&t.resultType==n.ResultType.OK)u=this._css.success;else if(this._currentState==n.States.Submit)return this.hideError(this.eError);this.showError(u,t.message)}this.setMessage(t.message)}return u!=this._css.error},i.prototype.showError=function(n,t){if(t.length>0&&this.eError&&this.eSummary){this.clearError(this.eError);this.eSummary.classList.add(this._css.none);this.eError.classList.remove(this._css.none);switch(n){case this._css.info:case this._css.success:this.eError.classList.add(n);break;case this._css.error:this._isSending=!1;this.setCloseIcon(this.eError);this.eError.classList.add(this._css.error)}this.setSubmitText();this.setMessage(t)}},i.prototype.hideError=function(n){if(this.eSummary){var t=document.getElementById(this.nameId);t&&this.setCloseIcon(t.parentElement);this.setSubmitText();n.classList.add(this._css.none);this.clearError(n);this.eSummary.classList.remove(this._css.none)}return!0},i.prototype.clearError=function(n){n&&(n.classList.remove(this._css.error),n.classList.remove(this._css.success),n.classList.remove(this._css.info))},i.prototype.setCloseIcon=function(n){if(n){var t=document.getElementById(this.closeId);t&&n.append(t)}},i.prototype.setMessage=function(n){var t=document.getElementById(this.errorTextId);t&&(t.innerHTML=n)},i.prototype.add=function(t){this._singleBet=n.Bet.singleBet(t)},i.prototype.create=function(n){this._outcomeId==Number(n.id)&&(this.setName(n.groupName+": "+n.name),this.setOdd(n.quote),this._freebetList.validate([n]),this.setWin(),this.setSubmitText())},i.prototype.changeState=function(){var t=this.setStateAndMessage({isLocked:this._singleBet.isLocked,isExpired:this._singleBet.isExpired,quoteHasChanged:this._singleBet.quoteHasChanged});t.message.length>0&&(this._messageViewModel.message=t.message,this._messageViewModel.resultType=t.type,this._messageViewModel.requestCommand=n.RequestCommands.DoLiveSubmit,this.setMessageView(this._messageViewModel),this.clearMessageViewModel())},i.prototype.processResult=function(t){var i=this,r;if(t===null||t===void 0?void 0:t.global){if(r=n.RequestCommands.None,t.settings&&(r=n.RequestCommands[t.settings.requestCommand]),r==n.RequestCommands.RemoveBet){this.remove();return}this._messageViewModel.error=t.global.error.has;this._messageViewModel.resultType=n.ResultType[t.global.additionalInfo];this._messageViewModel.requestCommand=n.RequestCommands[t.settings.requestCommand];t.singleBets.forEach(function(u){if(i._outcomeId==u.id){t.global.error.has&&(i.eStake.value=Common.Helper.getFormatedMoney(i._data.defaultAmount),t.global.error.accBalance?i.appendWallet():t.global.error.limitMax?i.eStake.value=Common.Helper.getFormatedMoney(u.maxLimit):t.global.error.limitMin&&(i.eStake.value=Common.Helper.getFormatedMoney(i._data.defaultAmount)),i.setWin());var f=i.setStateAndMessage({isLocked:u.hasLockedBets,isExpired:t.global.expiredBets.indexOf(i._outcomeId)!=-1,quoteHasChanged:u.quoteHasChanged});if(f.message.length>0?t.global.error.message=f.message:i._currentState=n.States.Submit,i._messageViewModel.message=t.global.error.message,i.setMessageView(i._messageViewModel))switch(r){case n.RequestCommands.RefreshQuotes:i._singleBet.updateQuote(u.quoteAdded);i._singleBet.acceptQuote();i.setWin();break;case n.RequestCommands.SetQuickBetAmount:Common.Helper.isFunction(i._data.handleQuickBet)&&(i._isSending=!0,i._data.handleQuickBet({QuickBetCommands:n.Mobile.QuickBetCommands.RequestBet,offerId:i._outcomeId}));break;case n.RequestCommands.RequestLiveSubmit:i._isSending&&(i.toggleAnimation(!0,Translation.getTextId("QuickBet-BetTransfer")),i._data.handleQuickBet({QuickBetCommands:n.Mobile.QuickBetCommands.SubmitBet,offerId:i._outcomeId,delay:t.global.liveDelay}));break;case n.RequestCommands.DoLiveSubmit:t.global.isSaved&&(i._singleBet&&i._singleBet.bettingSlip.refreshAccountBalance(t.global.accBalance,t.global.accBalanceList),i.toggleAnimation(!1,t.global.error.message),u.freebetBonusId>0&&n.Mobile.removeCssFreeBet(),n.FreeBets.instance().load(!0));break;case n.RequestCommands.AddBet:case n.RequestCommands.RemoveBet:i._data.isApp&&AppCallbackInterface&&AppCallbackInterface.betAdded(t.singleBets.length,null)}}})}},i.prototype.get=function(){return document.getElementById(this._containerId)},Object.defineProperty(i.prototype,"eOdd",{get:function(){return this._odd==null&&(this._odd=document.getElementById(this.oddId)),this._odd},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"eAni",{get:function(){return this._ani==null&&(this._ani=document.getElementById(this.aniId)),this._ani},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"eWin",{get:function(){return this._win==null&&(this._win=document.getElementById(this.winId)),this._win},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"eError",{get:function(){return this._error==null&&(this._error=document.getElementById(this.errorId)),this._error},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"eSummary",{get:function(){return this._summary==null&&(this._summary=document.getElementById(this.summaryId)),this._summary},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"eReject",{get:function(){return this._reject==null&&(this._reject=document.getElementById(this.rejectId)),this._reject},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"eGroup",{get:function(){return this._group==null&&(this._group=document.getElementById(this.nameId)),this._group},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"eSubmitText",{get:function(){return this._submitText==null&&(this._submitText=document.getElementById(this.submitTextId)),this._submitText},enumerable:!1,configurable:!0}),i.prototype.clearMessageViewModel=function(){this._messageViewModel={error:!1,resultType:n.ResultType.OK,requestCommand:n.RequestCommands.None,message:""}},i.prototype.close=function(){this._data.isApp&&AppCallbackInterface&&AppCallbackInterface.postMessage(MessageBroker.Messages.ClosePopover);this.remove()},i.prototype.setHandler=function(){var t=this,i=this.preselect,u,f,r,e;i&&i.addEventListener("click",function(){var n=document.getElementById(t.preselectContainerId);n&&(n.classList.contains(t._css.none)&&!t.isFreebet?(n.classList.remove(t._css.none),t.switchIcon(i,!0)):(n.classList.add(t._css.none),t.switchIcon(i,!1)))});u=document.getElementById(this.submitId);u&&u.addEventListener("click",function(){var i,r,u;Common.Helper.isFunction(t._data.handleQuickBet)&&t._isSending==!1&&(u=t.submitCommand,t.isEligibleToExecute(u)?t._data.handleQuickBet({QuickBetCommands:u,amount:t.stake,offerId:t._outcomeId,freebet:(r=(i=t._selectedFreebet)===null||i===void 0?void 0:i.bonusId)!==null&&r!==void 0?r:0}):t._data.handleQuickBet({QuickBetCommands:n.Mobile.QuickBetCommands.Login,offerId:t._outcomeId}))});f=document.getElementById(this.closeId);f&&f.addEventListener("click",function(){t.close()});r=this.eStake;r&&r.addEventListener("click",function(){t._data.stakeEntry&&!t.isFreebet&&t._data.stakeEntry.show({target:t._stake,value:t.stake,disablePossibleWin:!1,delegates:{change:function(n){return r.value=Common.Helper.getFormatedMoney(n),t.setWin()},take:function(){t.setWin()}}})});e=document.getElementById(this.taxId);e&&e.addEventListener("click",function(){t.toggleTaxInfo()})},i.prototype.isEligibleToExecute=function(n){return n==t.QuickBetCommands.AddAmount&&!Common.Application.instance.isLoggedIn?!1:!0},i.prototype.setStateAndMessage=function(t){var i={message:"",type:n.ResultType.None};return t.isLocked?(this._currentState=n.States.Locked,i.message=Translation.getTextId("QuickBet-Locked"),i.type=n.ResultType.HasLockedBets):t.quoteHasChanged?(this._currentState=n.States.HasChanged,i.message=Translation.getTextId("QuickBet-OddChange"),i.type=n.ResultType.HasChanged):t.isExpired&&(this._currentState=n.States.Expired,i.message=Translation.getTextId("DeleteExpired"),i.type=n.ResultType.BetExpired),i},i.prototype.setTaxCss=function(){return this._data.taxinfo?this._css.tax:""},i.prototype.setOdd=function(n){var t=this.eOdd;t&&(t.innerText=Common.Helper.getFormatedOdd(n*100))},i.prototype.setName=function(n){var t=this.eGroup;t&&(t.innerText=n)},i.prototype.switchIcon=function(n,t){var i=n.querySelector(".icon");i&&(t?(i.classList.remove(this._css.down),i.classList.add(this._css.up)):(i.classList.remove(this._css.up),i.classList.add(this._css.down)))},i.prototype.toggleTaxInfo=function(){this._data.taxinfo&&(this._data.taxinfo.classList.contains(this._css.active)?this._data.taxinfo.classList.remove(this._css.active):this._data.taxinfo.classList.add(this._css.active))},i.prototype.toggleAnimation=function(t,i){var r=this._css.info;this.eAni&&(t?(this._freebetList.hideTooltip(),this._currentState=n.States.BetTransfer,this.eAni.classList.remove(this._css.none),this.eReject&&this.eReject.classList.add(this._css.none)):(this._currentState=n.States.Close,this._isSending=!1,this.eAni.classList.add(this._css.none),r=this._css.success),this.showError(r,i))},Object.defineProperty(i.prototype,"submitCommand",{get:function(){switch(this._currentState){case n.States.Locked:case n.States.Expired:return t.QuickBetCommands.RemoveBet;case n.States.HasChanged:return t.QuickBetCommands.RefreshQuote;case n.States.Close:return this.close(),t.QuickBetCommands.RemoveBet;default:return t.QuickBetCommands.AddAmount}},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"submitText",{get:function(){switch(this._currentState){case n.States.Locked:return Translation.getTextId("DeleteLocked");case n.States.Expired:return Translation.getTextId("DeleteExpired");case n.States.HasChanged:return Translation.getTextId("Refresh");case n.States.BetTransfer:return Translation.getTextId("QuickBet-PleaseWait");case n.States.Close:return Translation.getTextId("Close");default:return this._selectedFreebet?Translation.getTextId("SubmitFreebet"):Translation.getTextId("QuickBet-PlaceBet")}},enumerable:!1,configurable:!0}),i.prototype.appendWallet=function(){this.toggleWallet();this._data.walletInfo&&this.eSummary&&(this.eSummary.append(this._data.walletInfo),this.toggleWallet(!0))},i.prototype.toggleWallet=function(n){n===void 0&&(n=!1);this._data.walletInfo&&(n?this._data.walletInfo.classList.add(this._css.active):this._data.walletInfo.classList.remove(this._css.active))},Object.defineProperty(i.prototype,"oddId",{get:function(){return"qb_odd_"+this._outcomeId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"winId",{get:function(){return"qb_win_"+this._outcomeId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"aniId",{get:function(){return"qb_ani_"+this._outcomeId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"taxId",{get:function(){return"qb_tax_"+this._outcomeId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"nameId",{get:function(){return"qb_name_"+this._data.bet.groupId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"stakeId",{get:function(){return"qb_stake_"+this._outcomeId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"closeId",{get:function(){return"qb_close_"+this._outcomeId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"summaryId",{get:function(){return"qb_detail_"+this._outcomeId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"preselectId",{get:function(){return"qb_pre_selected_"+this._outcomeId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"preselectContainerId",{get:function(){return"qb_pre_selected_container"+this._outcomeId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"submitId",{get:function(){return"qb_submit_"+this._outcomeId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"submitTextId",{get:function(){return"qb_submit_text_"+this._outcomeId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"errorId",{get:function(){return"qb_error_"+this._outcomeId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"rejectId",{get:function(){return"qb_reject_"+this._outcomeId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"errorTextId",{get:function(){return"qb_error_text_"+this._outcomeId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"infoId",{get:function(){return"qb_info_"+this._outcomeId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"tooltipId",{get:function(){return"qb_tool_tip_"+this._outcomeId},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"html",{get:function(){return'<div id="'+this._containerId+'">'+this.summary+this.error+this.button+"<\/div>"},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"summary",{get:function(){return'<div id="'+this.summaryId+'" class="detail">'+this.event+this.freebetlist+this.amount+this.preselectContainer+this.win+"<\/div>"},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"event",{get:function(){return'<div class="line"><strong id="'+this.nameId+'" ><\/strong><span id="'+this.closeId+'" class="icon close"><\/span ><\/div>'},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"amount",{get:function(){return'<div class="line"><strong>'+Translation.getTextId("Quote")+':<\/strong>&nbsp;<strong id="'+this.oddId+'">'+Common.Helper.getFormatedOdd(this._data.bet.quote)+'<\/strong><strong>&nbsp;x<\/strong><input id="'+this.stakeId+'" type="text" readonly value="'+Common.Helper.getFormatedMoney(this._data.defaultAmount)+'">'+this.arrow+this.currency+"<\/div>"},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"win",{get:function(){return'<div class="line"><a id="'+this.taxId+'" class="'+this.setTaxCss()+'"><strong>'+Translation.getTextId("Win")+'<\/strong>:<\/a>&nbsp;<strong id="'+this.winId+'">'+Common.Helper.getFormatedMoney(0)+"<\/strong>&nbsp;"+this.currency+"<\/div>"},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"preselectContainer",{get:function(){return'<div id="'+this.preselectContainerId+'" class="preselected none"><\/div>'},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"arrow",{get:function(){return'<a id="'+this.preselectId+'"><span class="icon arrow-down"><\/span><\/a>'},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"button",{get:function(){return'<span class="quick-bet-slip bs-buttons"><button type="button" id="'+this.submitId+'">'+this.text+this.ani+'<span class="icon arrow-right"><\/span><\/button><\/span>'},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"text",{get:function(){return'<span id="'+this.submitTextId+'" ><\/span>'},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"ani",{get:function(){return'<span id="'+this.aniId+'" class="circle fa fa-spinner fa-spin none"><\/span>'},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"icon",{get:function(){return'<span class="icon arrow-right"><\/span>'},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"error",{get:function(){return'<span id="'+this.errorId+'" class="betting-slip quick-bet-slip message-box none"><label class="icon signal"><\/label>'+this.message+"<\/span>"},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"message",{get:function(){return'<span id="'+this.errorTextId+'"><\/span>'},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"currency",{get:function(){return"<strong>"+Common.Application.instance.currency+"<\/strong>"},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"freebetlist",{get:function(){return'<div class="line '+this._css.freebetList+'"><\/div>'},enumerable:!1,configurable:!0}),i}();t.QuickBet=i})(t=n.Mobile||(n.Mobile={}))}(Betting||(Betting={})),function(n){var t=function(){function t(){}return t.singleBet=function(t){switch(Common.Application.instance.platform){case Common.Platform.Smartphone:case Common.Platform.Tablet:return new n.Mobile.SingleBet(t);default:return new n.Desktop.SingleBet(t)}},t.combiBet=function(t){switch(Common.Application.instance.platform){case Common.Platform.Smartphone:case Common.Platform.Tablet:return new n.Mobile.CombiBet(t);default:return new n.Desktop.CombiBet(t)}},t.systemBet=function(t,i,r,u){switch(Common.Application.instance.platform){case Common.Platform.Smartphone:case Common.Platform.Tablet:return new n.Mobile.SystemBet(t,i,r,u);default:return new n.Desktop.SystemBet(t,i,r,u)}},t}();n.Bet=t}(Betting||(Betting={})),function(n){var t;(function(n){function u(){var n=document.getElementById("quickbet");n&&(n.style.display="none");document.querySelectorAll(".selected").forEach(function(n){n.classList.remove("selected")})}function f(n){$.post(global.appPath+"/BettingSlip/FreeBetReject",{freebetID:n}).done(i).fail(r);t()}function t(){document.querySelectorAll(".main-bet").forEach(function(n){n.classList.remove("freebet")});document.querySelectorAll(".offer-container").forEach(function(n){n.classList.remove("freebet")});document.querySelectorAll(".offeritem").forEach(function(n){n.classList.remove("freebet")})}function i(){window.location.reload()}function r(n,t){n&&n==="timeout"?alert("The request timed out. \nPlease try again."):n&&n!=="abort"&&(t?alert(t+"\nPlease try again."):alert("An error occured. Please try again."));u()}n.reject=f;n.clearFreeBet=t;n.rejectSuccess=i;n.errorCallback=r})(t=n.Mobile||(n.Mobile={}))}(FreeBet||(FreeBet={})),function(n){var t=function(){function t(){var n=this;this._list=null;this._timeKey=0;this._delay=6e5;this._productId=1;this._onFreebetsLoaded=$.Callbacks();this._ac=new Common.AjaxCall({controller:"BettingSlip"});this._events={};this._args={};this._types={live:"L",main:"M",both:"B",del:"D"};this._timeKey=setInterval(function(){n.load()},this._delay)}return Object.defineProperty(t.prototype,"onLoaded",{get:function(){return this._onFreebetsLoaded},enumerable:!1,configurable:!0}),t.instance=function(n){return n===void 0&&(n=null),this._instance==null&&(this._instance=new t),this._instance},t.prototype.getFreebets=function(n){var t=$.Deferred();return this._list&&!n&&t.resolve(this._list),this.load(n).done(function(n){t.resolve(n.freebetList)}).fail(function(){t.reject()}),t.promise()},Object.defineProperty(t.prototype,"list",{get:function(){return this._list},set:function(n){this._list=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"productId",{set:function(n){this._productId=n},enumerable:!1,configurable:!0}),t.prototype.addEvent=function(n){this._events[n.eventId]==null&&(this._events[n.eventId]=n)},t.prototype.isFreeBet=function(n,t,i,r){var f,u=n,e;switch(n.productId){case 1:e=u.betType!=this._types.live&&t.cloneId!=null&&t.cloneId>0?t.cloneId:t.eventId;f=(u.sports.indexOf(t.kosId)>=0||u.leagueId==t.leagueId||u.eventId==e)&&(u.betType==this._types.live&&t.isLive||u.betType==this._types.main&&!t.isLive||n.betType==this._types.both)&&(u.combiType=="B"||(u.combiType=="S"||u.combiType===undefined)&&!r||u.combiType=="C"&&r)&&u.status.toUpperCase()!=this._types.del&&u.bonusLeft>0;break;case 11:case 15:f=!0}return f&&u.minimumQuote*100<=i},t.prototype.check=function(n,t){var u=!1,r,i;if(this._list!=null&&(r=this._list.slice(0),n!=null))for(i=0;i<r.length;i++)if(this.isFreeBet(r[i],n,t,!1)){this._productId==1&&this.addEvent(n);u=!0;break}return u},t.prototype.recheck=function(n,t){switch(this._productId){case 1:this._events[n]!=null?(this._args.event=this._events[n],this._args.quote=t):(this._args.event=null,this._args.quote=0);case 11:case 15:this.load(!0)}},t.prototype.reject=function(){this._ac.execute("RejectFreeBet",function(n){n!=null&&n.success&&(window.location.href=Common.Application.instance.path)},JSON.stringify({type:n.Types[n.Types.HTML]}))},t.prototype.load=function(n){var t=this;return n===void 0&&(n=!1),this._list=[],this._ac.execute("GetFreeBets",function(n){n!=null&&(t._list=n.freebetList,t._onFreebetsLoaded.fire())},JSON.stringify({reload:n,productId:this._productId}))},t.prototype.getFreeBetModel=function(t,i,r,u,f){f===void 0&&(f=0);var e=new n.FreeBet.Event;return e.cloneId=f,e.kosId=i,e.eventId=t,e.leagueId=r,e.isLive=u,e},t}();n.FreeBets=t}(Betting||(Betting={})),function(n){var t;(function(n){var t=function(){function n(){}return n}();n.Event=t})(t=n.FreeBet||(n.FreeBet={}))}(Betting||(Betting={})),function(n){var t;(function(n){function u(){var n,i;if(Common.Application.instance.platform==Common.Platform.Smartphone&&t){for(n=0,i=t;i!=null;i=i.offsetParent)n+=i.offsetTop;n=n-100;n<0&&(n=0);window.scrollTo(0,n)}}function f(n){var t=!0;return["quote-lock","locked"].forEach(function(i){n.classList.contains(i)&&(t=!1)}),t}function e(n){var i=0,t=n.querySelector(".quota");return t&&t.dataset&&(i=Number(t.getAttribute("data-quote-val"))/100),i}function o(n,t){r(t);n.stopPropagation()}function r(n){var s;if(n.sender&&f(n.sender)&&(s=document.getElementById("BS_QuickBet_Wallet_Info"),typeof bettingSlip=="object"&&bettingSlip)){var o=bettingSlip,l=n.hideQB||!1,h=n.isLive&&!l,r=null,c={id:n.id,isLive:n.isLive,eventId:n.eventId,groupId:n.groupId,isFreeBet:!1,quote:e(n.sender)};o.quickBet.isEnabled=!1;o.sender=n.sender;o.type=Betting.Types.HTML;Betting.FreeBets.instance(o).getFreebets(!1).then(function(f){if(h){o.type=Betting.Types.QUICK;r==null&&(r=o.quickBet);var e={bet:c,defaultAmount:o.defaultStake,sender:n.sender,freebets:f};r.taxinfo=o.taxinfo;r.walletInfo||(r.walletInfo=s);r.walletInfo&&o.walletInfo&&r.walletInfo.append(o.walletInfo.list);r.init(e)}r&&(r.isEnabled=h,r.bet&&(t=r.bet.get()));i&&(o.removeBet({boId:n.id}),i=!1);bettingSlip.addBet(c).then(function(t){t===!0?r?(r.show(),u()):n.isRotatorOffer:r&&r.remove()})})}}function s(n){var t=document.querySelector(".o"+n);t&&(i=!0,t.click())}function h(){new Common.AjaxCall({controller:"BettingSlip"}).execute("RejectFreeBet",function(n){n.success?FreeBet.Mobile.rejectSuccess():FreeBet.Mobile.errorCallback();FreeBet.Mobile.clearFreeBet()})}var t,i=!1;n.rotator=o;n.partial=r;n.reopen=s;n.rejectFreeBet=h})(t=n.Init||(n.Init={}))}(QuickBet||(QuickBet={})),function(n){var t,i,r;(function(n){n[n.Undefined=-3]="Undefined";n[n.None=-2]="None";n[n.OK=-1]="OK";n[n.Saved=0]="Saved";n[n.NotSaved=1]="NotSaved";n[n.HasChanged=2]="HasChanged";n[n.Login=3]="Login";n[n.LimitMin=4]="LimitMin";n[n.LimitMax=5]="LimitMax";n[n.AmountFormatError=6]="AmountFormatError";n[n.AccountBalanceLow=7]="AccountBalanceLow";n[n.AccountBalanceLimit=8]="AccountBalanceLimit";n[n.SystemBetsAmountError=9]="SystemBetsAmountError";n[n.NoWinningPossible=9]="NoWinningPossible";n[n.HasToManyBets=10]="HasToManyBets";n[n.SelfLimitError=11]="SelfLimitError";n[n.LicenceError=12]="LicenceError";n[n.InvalidBet=13]="InvalidBet";n[n.StakeLimitMinimum=14]="StakeLimitMinimum";n[n.StakeLimitMaximum=15]="StakeLimitMaximum";n[n.CombiPoolError=16]="CombiPoolError";n[n.LongTermMix=17]="LongTermMix";n[n.LongTermCombiError=18]="LongTermCombiError";n[n.DataBaseError=19]="DataBaseError";n[n.SuperLeagueError=20]="SuperLeagueError";n[n.SuperLeagueCombinationError=21]="SuperLeagueCombinationError";n[n.HasLockedBets=22]="HasLockedBets";n[n.HasExpiredBets=23]="HasExpiredBets";n[n.QuoteHasChanged=24]="QuoteHasChanged";n[n.EqualBetError=25]="EqualBetError";n[n.NothingToSave=26]="NothingToSave";n[n.BettingSlipHasErrors=27]="BettingSlipHasErrors";n[n.BetExpired=28]="BetExpired";n[n.InvalidFreeBet=29]="InvalidFreeBet";n[n.WalletRequired=30]="WalletRequired";n[n.Error=31]="Error";n[n.TimeDurationError=32]="TimeDurationError"})(t=n.ResultType||(n.ResultType={}));i=function(){function n(n){this._bs=n;this._errorTypes={};this._errorTypes[t.Saved]="bsSaved";this._errorTypes[t.NotSaved]="bsNotSaved";this._errorTypes[t.AmountFormatError]="bsAmountFormatError";this._errorTypes[t.HasChanged]="bsHasChanged";this._errorTypes[t.QuoteHasChanged]="bsHasChanged";this._errorTypes[t.Login]="bsErrorLogin";this._errorTypes[t.LimitMin]="bsErrorMinLimit";this._errorTypes[t.LimitMax]="bsErrorMaxLimit";this._errorTypes[t.StakeLimitMinimum]="bsErrorMinLimit";this._errorTypes[t.StakeLimitMaximum]="bsErrorMaxLimit";this._errorTypes[t.AccountBalanceLow]="bsErrorBalance";this._errorTypes[t.SelfLimitError]="bsSelfLimitError";this._errorTypes[t.LicenceError]="bsErrorNotRegisteredBets";this._errorTypes[t.AccountBalanceLimit]="bsErrorAccountBalanceLimit";this._errorTypes[t.NoWinningPossible]="bsErrorNoWinningPossible";this._errorTypes[t.HasToManyBets]="bsErrorHasTooManyBets";this._errorTypes[t.InvalidFreeBet]="bsInvalidFreeBet";this._errorTypes[t.WalletRequired]="bsWalletRequired";this._errorTypes[t.NothingToSave]="bsNothingToSave";this._errorTypes[t.TimeDurationError]="bsTimeNotYetExpired";this._errorMessageText=document.getElementById("bs-message-text")}return n.instance=function(t){return this._instance==null&&(this._instance=new n(t)),this._instance},Object.defineProperty(n.prototype,"hasTooManyBets",{get:function(){return this._errorTypes[t.HasToManyBets]},enumerable:!1,configurable:!0}),n.prototype.show=function(n){var r=this,i;this.hide();this._bs.elements.body&&(this._errorField=this._errorTypes[n],n==t.Saved&&(this._bs.elements.error&&(this._bs.elements.error.classList.remove("warning"),this._bs.elements.error.classList.add("success")),setTimeout(function(){r.hide()},5e3)),this._errorField!=null&&this._errorField.length>0?this._bs.elements.error&&(this._bs.elements.error.classList.remove("none"),i=this._bs.elements.error.querySelector("#"+this._errorField),i&&(i.className="")):window.console&&window.console.error("Interwetten - Common.Error.show :: Type '"+n+"' wird momentan nicht unterstützt!"))},n.prototype.hide=function(){this._bs.elements.body&&this._bs.elements.error&&(this._bs.elements.error.className="boxmsg warning none",this._bs.elements.error.childNodes.forEach(function(n){n.id&&n.id.length>0&&n.classList.add("none")}))},n.prototype.showMessage=function(n,i){var r=this;this._bs.elements.error&&this._errorMessageText&&(this._bs.elements.error.classList.remove("none"),n==t.Saved?(this._bs.elements.error.classList.remove("error"),this._bs.elements.error.classList.add("success"),setTimeout(function(){r.hideMessage()},5e3)):(this._bs.elements.error.classList.remove("success"),this._bs.elements.error.classList.add("error")),this._errorMessageText.innerHTML=i)},n.prototype.hideMessage=function(){var n;((n=this._bs.elements)===null||n===void 0?void 0:n.error)&&this._errorMessageText&&(this._bs.elements.error.classList.remove("success"),this._bs.elements.error.classList.remove("error"),this._bs.elements.error.classList.add("none"),this._errorMessageText.innerHTML="")},n._instance=null,n}();n.Error=i;r=function(){function n(){this._resultType=t.None}return Object.defineProperty(n.prototype,"resultType",{get:function(){return this._resultType},set:function(n){this._resultType=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"result",{get:function(){return this._result},set:function(n){this._result=n},enumerable:!1,configurable:!0}),n}();n.BetErrorModel=r}(Betting||(Betting={})),function(n){var t=function(){function t(n){this.options=n;this._selected=null;this._enabled=!0}return Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},enumerable:!1,configurable:!0}),t.prototype.create=function(){return Common.Helper.getNode('<ul class="freebet-list">'+this.itemsHtml()+"<\/ul>")},t.prototype.checkboxId=function(n){return this.options.prefix+"-freebet-"+n},t.prototype.itemsHtml=function(){var n=this,t;return this.options.freebets&&this.options.freebets.length?(t=this.options.freebets.map(function(t){var i=n.checkboxId(t.bonusId),r=n._selected!=null&&n._selected.bonusId==t.bonusId?'checked="checked"':"";return'<li><input type="checkbox" name="'+i+'" id="'+i+'" data-bonus-id="'+t.bonusId+'" '+r+'/><label for="'+i+'">'+t.name+'<\/label><label class="icon info"><\/label><span><label for="'+i+'" class="icon square"><\/label><\/span><\/li>'}),t.join("")):""},t.prototype.selectById=function(n){if(this._selected===null||this._selected.bonusId!=n){var t=this.options.freebets.filter(function(t){return t.bonusId==n});t.length==1&&this.change(t[0])}},t.prototype.update=function(n){var t=this;this.options.freebets=n;this._selected!=null&&this.options.freebets.filter(function(n){return n.bonusId===t._selected.bonusId}).length==0&&this.change(null);this._element.innerHTML=this.itemsHtml()},Object.defineProperty(t.prototype,"Element",{get:function(){return this._element||(this._element=this.create(),this.setEventHandler()),this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{set:function(n){var t=this;this._enabled=n;n||(this.options.freebets.forEach(function(n){return t.updateFreebet(n,!1)}),this._selected!=null&&this.change(null))},enumerable:!1,configurable:!0}),t.prototype.updateFreebet=function(n,t){var i=this._element.querySelector('input[type="checkbox"][data-bonus-id="'+n.bonusId+'"]');i&&(t&&this._enabled?i.removeAttribute("disabled"):i.setAttribute("disabled","disabled"))},t.prototype.hideTooltip=function(){var n;(n=this._tooltip)===null||n===void 0?void 0:n.hide()},t.prototype.validate=function(t,i){var r=this;this.options.freebets.forEach(function(u){var f=!0;t.forEach(function(t){f&&(f=n.FreeBets.instance().isFreeBet(u,n.FreeBets.instance().getFreeBetModel(t.eventId,t.kosId,t.leagueId,t.isLive),(i!==null&&i!==void 0?i:t.quote)*100,i!==undefined))});r.updateFreebet(u,f)})},t.prototype.change=function(n){if(this._element.querySelectorAll('input[type="checkbox"]').forEach(function(t){var i=t;n===null||i.dataset.bonusId!==n.bonusId.toString()?i.checked=!1:n!==null&&i.dataset.bonusId===n.bonusId.toString()&&(i.checked=!0)}),this.hideTooltip(),this._selected!=n){this._selected=n;this.options.onChange(n)}},t.prototype.setEventHandler=function(){var n=this;this._element&&(this._element.addEventListener("change",function(t){var i=t.target,u,r;i&&i.dataset.bonusId!==undefined&&(u=parseInt(i.dataset.bonusId),r=n.options.freebets.filter(function(n){return n.bonusId==u})[0],r&&n.change(i.checked?r:null))}),this._element.addEventListener("click",function(t){var i=t.target,r=i.closest("li").querySelector("input"),u,f;i.classList.contains("info")?(t.preventDefault(),u=parseInt(r.dataset.bonusId),f=n.options.freebets.filter(function(n){return n.bonusId==u})[0],n.showFreebetTooltip(f,i)):i instanceof HTMLLabelElement&&r.hasAttribute("disabled")&&(t.preventDefault(),n.showTooltipUnavailable(i))}))},t.prototype.showTooltipUnavailable=function(n){var t=Common.Helper.getNode("<div><\/div>");t.innerText=Translation.getTextId("Freebet not valid");this.showTooltip(t,n)},t.prototype.showFreebetTooltip=function(n,t){var i=this;new Common.AjaxCall({controller:"Freebet"}).execute("Tooltip",function(n){i.showTooltip(n.html,t)},JSON.stringify({id:n.bonusId}))},t.prototype.showTooltip=function(n,t){this._tooltip?this._tooltip.setContent(n):this._tooltip=new Tools.Tooltip({content:n,cssClass:this.options.prefix+"-tooltip",parent:this.options.tooltipParent});this._tooltip.show(t)},t}();n.FreebetSelection=t}(Betting||(Betting={})),function(n){function y(n){o.add(n)}var i,f,c,t,s,l,e,u,a,v,o,h,r;(function(n){n[n.None=-1]="None";n[n.RequestLiveSubmit=0]="RequestLiveSubmit";n[n.DoLiveSubmit=1]="DoLiveSubmit";n[n.RemoveBet=2]="RemoveBet";n[n.AddBet=3]="AddBet";n[n.AddToCombiSystem=4]="AddToCombiSystem";n[n.RemoveFromCombiSystem=5]="RemoveFromCombiSystem";n[n.SetBank=6]="SetBank";n[n.SetSingleAmount=7]="SetSingleAmount";n[n.SetSysAmount=8]="SetSysAmount";n[n.SetCombiAmount=9]="SetCombiAmount";n[n.ShowBank=10]="ShowBank";n[n.RefreshQuotes=11]="RefreshQuotes";n[n.UnSetBank=12]="UnSetBank";n[n.Load=13]="Load";n[n.SetGlobalSingleAmount=14]="SetGlobalSingleAmount";n[n.SetCurrentTab=15]="SetCurrentTab";n[n.BookBet=16]="BookBet";n[n.SetQuickBetAmount=17]="SetQuickBetAmount"})(i=n.RequestCommands||(n.RequestCommands={})),function(n){n[n.HTML=0]="HTML";n[n.VFL=1]="VFL";n[n.VTO=2]="VTO";n[n.QUICK=3]="QUICK"}(f=n.Types||(n.Types={})),function(n){n[n.none=-1]="none";n[n.single=0]="single";n[n.combi=1]="combi";n[n.system=2]="system";n[n.mybets=3]="mybets";n[n.betslip=4]="betslip";n[n.cashout=5]="cashout";n[n.live=6]="live";n[n.open=7]="open";n[n.settled=8]="settled"}(c=n.TabType||(n.TabType={})),function(n){n[n.Submit=0]="Submit";n[n.Refresh=1]="Refresh";n[n.Locked=2]="Locked";n[n.Login=3]="Login";n[n.HasChanged=4]="HasChanged";n[n.SubmitFreebet=5]="SubmitFreebet";n[n.Expired=6]="Expired";n[n.BetTransfer=7]="BetTransfer";n[n.Close=8]="Close"}(t=n.States||(n.States={})),function(n){n[n.Single=0]="Single";n[n.Multi=1]="Multi";n[n.Freebet=2]="Freebet";n[n.Confirm=3]="Confirm"}(s=n.Modes||(n.Modes={})),function(n){n[n.SB=0]="SB";n[n.CB=1]="CB";n[n.SYS=2]="SYS";n[n.SYSROW=3]="SYSROW"}(l=n.BetTypes||(n.BetTypes={})),function(n){n[n.None=0]="None";n[n.Unknown=1]="Unknown";n[n.NoTax=2]="NoTax";n[n.Win=3]="Win";n[n.Greek=4]="Greek"}(e=n.TaxMode||(n.TaxMode={})),function(n){n[n.Open=0]="Open";n[n.Close=1]="Close";n[n.Show=2]="Show";n[n.Hide=3]="Hide";n[n.InvalidId=4]="InvalidId"}(u=n.WalletCommand||(n.WalletCommand={})),function(n){n[n.Open=1]="Open";n[n.Settled=12]="Settled"}(a=n.JournalType||(n.JournalType={})),function(n){n[n.None=0]="None";n[n.All=1]="All";n[n.High=2]="High"}(v=n.QuoteChangeTypes||(n.QuoteChangeTypes={}));o=$.Callbacks();n.bettingSlipReady=y;h=function(){function h(){this._elements={};this._submitIfPossible=!1;this._stopLiveSubmit=!1;this._type=f.HTML;this._mode=s.Single;this._liveDelay=5;this._liveTimer=-1;this._sendCount=0;this._cashoutCount=0;this._defaultStake=0;this._systembetCount=0;this._singlebetCount=0;this._gmaxSystemBets=12;this._isSending=!1;this._isLiveMode=!1;this._isLivePage=!1;this._isLoggedIn=!1;this._needRefresh=!1;this._isBankVisible=!1;this._isSubmittable=!1;this._removeFreeBet=!1;this._removeAllBets=!1;this._submitRunning=!1;this._submitLiveRunning=!1;this._requiredAmountToClean=!1;this._singleBets={};this._systemBets={};this._ajaxCallBackError=this.serverCallBackError;this._error=n.Error.instance(this);this._singleBetIds=[];this._ac=new Common.AjaxCall({queue:"BETTINGSLIP"});this._tabsCollection={main:[],bs:[],mybets:[]}}return Object.defineProperty(h.prototype,"idsToComboBox",{get:function(){return},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"singleBetContainer",{get:function(){return},enumerable:!1,configurable:!0}),h.prototype.addBetData=function(){},h.prototype.removeFreeBet=function(){},h.prototype.createComboBoxes=function(){},h.prototype.renderSystemBets=function(n){n===void 0&&(n=!1)},h.prototype.openBetSlip=function(){},h.prototype.showGoTo=function(){},h.prototype.init=function(t){var i=this;this._gmaxBets=Common.Application.instance.license.maxBets;this._elements=t;this.setHeaderCount(0);this.initializeObjects();this.loadFreebets(!1);n.FreeBets.instance().onLoaded.add(function(){i.updateFreebets(n.FreeBets.instance().list)});o.fire()},Object.defineProperty(h.prototype,"CountElements",{get:function(){var r=this,t,i,n;return this._countElements||(this._countElements=[],n=(i=(t=this._elements)===null||t===void 0?void 0:t.header)===null||i===void 0?void 0:i.count,n instanceof HTMLElement?this._countElements.push(n):document.querySelectorAll(n).forEach(function(n){return r._countElements.push(n)})),this._countElements},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"elements",{get:function(){return this._elements},set:function(n){this._elements=n},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"license",{get:function(){return this._license},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"taxInfo",{get:function(){return this._taxInfo},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"singleBetCount",{get:function(){return this._singlebetCount},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"combi",{get:function(){return this._combi},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isBankVisible",{get:function(){return this._isBankVisible},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"singleBetIds",{get:function(){return this._singleBetIds},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"hasLiveBet",{get:function(){return this.hasLiveBetCheck()},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"hasFreebet",{get:function(){var n,t;return((n=this._singleFreebetSelection)===null||n===void 0?void 0:n.selected)!=null||((t=this._combiFreebetSelection)===null||t===void 0?void 0:t.selected)!=null},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"selectedFreebetKind",{get:function(){var n;return this.hasFreebet?((n=this._singleFreebetSelection)===null||n===void 0?void 0:n.selected)!==null?"single":"combi":""},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"tabs",{get:function(){return this._elements.tabs},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"viewMode",{get:function(){return this._mode},set:function(n){this._mode=n},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"liveDelay",{get:function(){return this._liveDelay},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"type",{get:function(){return this._type},set:function(n){this._type=n},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"singleBets",{get:function(){return this._singleBets},enumerable:!1,configurable:!0}),h.prototype.getSingleBetsArray=function(){var n=[];for(var t in this.singleBets)this.singleBets[t]&&n.push(this.singleBets[t]);return n},Object.defineProperty(h.prototype,"systemBets",{get:function(){return this._systemBets},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isLiveMode",{get:function(){return this._isLiveMode},set:function(n){this._isLiveMode=n},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isApp",{get:function(){return this._isApp},set:function(n){this._isApp=n},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isSending",{get:function(){return this._isSending},set:function(n){this._isSending=n},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"cashoutCount",{get:function(){return this._cashoutCount},set:function(n){this._cashoutCount=n},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"idsToRefreshBalance",{get:function(){return this._idsToRefreshBalance},set:function(n){this._idsToRefreshBalance=n},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isSubmittable",{set:function(n){this._isSubmittable=n},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isLoggedIn",{set:function(n){this._isLoggedIn=n},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isLivePage",{set:function(n){this._isLivePage=n},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"urlToRedirect",{set:function(n){this._urlToRedirect=n},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"amountValues",{set:function(n){this._amountValues=n},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"walletInfo",{get:function(){return this._walletInfo},set:function(n){this._walletInfo=n},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"sender",{set:function(n){this._sender=n},enumerable:!1,configurable:!0}),h.prototype.getIdsToRefreshBalance=function(){return this._idsToRefreshBalance},h.prototype.hasBet=function(n){return this._singleBets[n]!=null},h.prototype.handleSubmit=function(){this._elements.submit&&this.handleSubmitObject(this._elements.submit)},h.prototype.handleSubmitObject=function(n){var t=this;n&&n.addEventListener("click",function(){var n,i,r;(r=(i=(n=t._elements.settings)===null||n===void 0?void 0:n.scroll)===null||i===void 0?void 0:i.btn)===null||r===void 0?void 0:r.classList.add("none");t.submit()})},h.prototype.initHandlers=function(){var t=this,i,r,u,f,e,o,s,h;this._elements.share&&((r=(i=this._elements.share)===null||i===void 0?void 0:i.copy)===null||r===void 0?void 0:r.addEventListener("click",function(){n.ShareBet.instance.copy()}),(f=(u=this._elements.share)===null||u===void 0?void 0:u.copyCode)===null||f===void 0?void 0:f.addEventListener("click",function(){n.ShareBet.instance.copyCode()}),(o=(e=this._elements.share)===null||e===void 0?void 0:e.button)===null||o===void 0?void 0:o.addEventListener("click",function(){n.ShareBet.instance.share().done(function(){t.showShare=!0})}),(h=(s=this._elements.share)===null||s===void 0?void 0:s.buttonClose)===null||h===void 0?void 0:h.addEventListener("click",function(){n.ShareBet.instance.close();t.showShare=!1}),this._elements.share.btnBook&&this._elements.share.codeInput&&this._elements.share.bookForm&&this._elements.share.btnBook.addEventListener("click",function(){var n=t._elements.share.bookForm.querySelector(".field-validation-error");n&&n.classList.add("none");t.bookBet(t._elements.share.codeInput.value).then(function(i){i.valid===!1?(n.innerText=i.errorMessage,n.classList.remove("none")):t._elements.share.codeInput.value=""})}))},h.prototype.bookBet=function(t){var i=this;return this.clear(!1,!0,!1).then(function(){return n.ShareBet.instance.getBettingData(t)}).then(function(n){var t,r,u;if(n.valid===!0)for(t=0,r=n.bets;t<r.length;t++)u=r[t],i.addBet(u);return n})},h.prototype.addBet=function(n){var t=$.Deferred();return n.isChecked=n.isChecked||!0,n.amount=n.amount||0,n.isLoaded?(this.addBetData(n),t.resolve(!1)):(this.addBetData(n,!1),this.sendCommandToServer(i.AddBet,n.id+"|"+n.groupId+"|"+n.eventId+"|"+n.amount+"|"+n.isLive+"|"+n.isFreeBet).done(function(){t.resolve(!0)}).fail(function(){t.reject()})),t.promise()},h.prototype.updateCount=function(n,t){this._isApp&&t&&AppCallbackInterface.betCountChanged(n);this.setHeaderCount(n)},h.prototype.setHeaderCount=function(n){var i,r,u,f,e,t=n==0;this.CountElements.forEach(function(i){i.innerText=n.toString();Common.DOM.setClass(i,t,"none")});Common.DOM.setClass(this._elements.empty,t,"active");Common.DOM.setClass((i=this._elements.share)===null||i===void 0?void 0:i.bookForm,!t,"none");Common.DOM.setClass((u=(r=this._elements.sum)===null||r===void 0?void 0:r.main)===null||u===void 0?void 0:u.closest(".betslip-summary"),t,"none");Common.DOM.setClass((e=(f=this._elements.settings)===null||f===void 0?void 0:f.remove)===null||e===void 0?void 0:e.closest(".settings"),t,"none")},h.prototype.setOpenBetsCount=function(){},h.prototype.setCashOutCount=function(n){this._cashoutCount=n},h.prototype.showBank=function(n,t){var r,i;t===void 0&&(t=!1);for(r in this._singleBets)i=this._singleBets[Number(r)],i&&i.showBank(n)},h.prototype.stopLiveSubmit=function(n){n===void 0&&(n=!1);this._elements.body&&(n&&this.showProgressBar(!1),this._submitLiveRunning=!1,clearTimeout(this._liveTimer),this._liveTimer=-1)},h.prototype.showProgressBar=function(n){n&&(this._submitLiveRunning||this._submitRunning)?this._elements.ani.classList.remove("none"):this._elements.ani.classList.add("none")},h.prototype.toggleBankVisibility=function(n,t){n===void 0&&(n=null);t===void 0&&(t=!0);this._isBankVisible=n!=null?n:!this._isBankVisible;this.showBank(this._isBankVisible,!1)},h.prototype.updateComplete=function(){this._combi.refillBets(this._singleBets);this.update();this.setSubmitButtonText(this.currentState)},h.prototype.update=function(n){n===void 0&&(n=!0);this._combi.check();this._combi.render();this.updateSystemBets(n)},h.prototype.updateSummary=function(n){n===void 0&&(n=!1);this._elements.body&&(this.clearSummaryValues(),this.calcSingleBetsProfit(),this.calcCombiBetProfit(),this.calcSystemBetsBetsProfit(),this.setSummaryProfit(),this._elements.sum.txt&&(this._elements.sum.txt.innerHTML=r.bets==1?Translation.getTextId("Bet"):Translation.getTextId("Bets")),this._elements.sum.count.global&&(this._elements.sum.count.global.innerHTML=""+r.bets))},h.prototype.completeBetCreation=function(){this.createSystemBets()},h.prototype.updateSystemBets=function(n){n===void 0&&(n=!0);this.renderSystemBets()},h.prototype.resetBankVisibilty=function(){return this._singlebetCount==0?(this.toggleBankVisibility(!1,!1),!0):!1},h.prototype.checkRefreshCombiSystem=function(n){n&&(this._combi.check(),this._combi.render(),this.renderSystemBets(!0))},h.prototype.onCashoutDisplayed=function(n){$(document).trigger("CashoutDisplayed",n)},h.prototype.checkSingleBet=function(t,r){var u=t.checkErrors(r,this._resultType);if(u.model.result&&(this._stopLiveSubmit=!0),u.model.resultType!=n.ResultType.None&&(this._resultType=u.model.resultType),r.hasLockedBets?(t.isLocked=!0,this._stopLiveSubmit=!0):t.isLocked=!1,r.quoteHasChanged)this._stopLiveSubmit=!0,this._submitRunning=!1,this._submitIfPossible=!1,t.quoteHasChanged=!0;else switch(this._requestCommand){case i.AddBet:t.quote>r.quote&&(t.quoteHasChanged=!0);break;case i.RefreshQuotes:t.quoteNew=r.quote;u.isUpdateRequired=t.quoteHasChanged;t.acceptQuote()}return t.updateInfoLine(this._submitLiveRunning||this._requestCommand==i.DoLiveSubmit),u},h.prototype.checkClearSubmit=function(){return this._elements.settings&&this._elements.settings.clear.cb?this._elements.settings.clear.cb.checked:!1},h.prototype.checkLiveSubmit=function(n){n===void 0&&(n=!1);n&&(r.ok&&this.hasValidAmount?this.requestLiveSubmit():alert(Translation.getTextId("NothingToSave")))},h.prototype.hasLiveBetCheck=function(){var t,n;for(t in this._singleBets)if(n=this._singleBets[Number(t)],n&&n.data.isLive)return!0;return!1},h.prototype.clearAmounts=function(){var i,n,r,t;for(i in this._singleBets)n=this._singleBets[Number(i)],n&&n.clearAmount();this.combi&&this.combi.clearAmount();for(r in this._systemBets)t=this._systemBets[r],t&&t.clearAmount()},h.prototype.resetAmounts=function(){var t,i,n;for(t in this._singleBets)n=this._singleBets[Number(t)],n&&n.resetAmount();this._combi&&this._combi.resetAmount();for(i in this._systemBets)n=this._systemBets[i],n&&n.resetAmount()},Object.defineProperty(h.prototype,"htmlSystemBets",{get:function(){var r=this._combi.countBets,i={valid:!1,html:""},n,t;if(this._systemBets==null||r==0||this._combi.hasError)this.setHtml(this._elements.single.system);else{for(n=0,n=2;n<r;n++)t=this._systemBets[n+"/"+r],t&&t.quote>1&&t.countBets>1&&(i=this.setSystemBet(i,t,n));i.valid=!0}return i},enumerable:!1,configurable:!0}),h.prototype.setSystemBet=function(n,t,i){return n.html+=t.render(i),n},h.prototype.setWalletInfoRequired=function(){this._submitIfPossible=!0},h.prototype.initializeLiveSubmit=function(){var n=this;this._liveTimer=setTimeout(function(){n.submitLive()},this.liveDelay*1e3)},Object.defineProperty(h.prototype,"showShare",{set:function(n){var t;Common.DOM.setClass((t=this._elements.share)===null||t===void 0?void 0:t.border,!n,"none")},enumerable:!1,configurable:!0}),h.prototype.submit=function(n){var i,f,e,r;if(n===void 0&&(n=!0),i=!0,this._submitIfPossible=!1,this._isSending)return this._submitIfPossible=!0,i;if(this.handleWalletInfo(u.InvalidId))return this.setWalletInfoRequired(),i;if(n){this._submitLiveRunning&&this.stopLiveSubmit(!0);f=!1;for(e in this._singleBets)r=this._singleBets[Number(e)],r&&r.isExpired&&(this.removeBet({boId:r.data.id}),f=!0);if(f)return this._isLiveMode?(this.updateOdds(),this.setSubmitButtonText(this.currentState),i):(this.setSubmitButtonText(t.Submit),i);this.hasErrorState()==!1&&(this._isLoggedIn?this.checkLiveSubmit():i=!1)}else i=!1;return i},h.prototype.submitLive=function(){this._liveTimer>-1&&this._submitLiveRunning&&(this.sendCommandToServer(i.DoLiveSubmit,""+this.liveDelay*1e3),this.stopLiveSubmit())},h.prototype.requestLiveSubmit=function(){this._isSending===!1&&(this.hideFreebetTooltips(),this.sendCommandToServer(i.RequestLiveSubmit,""+this.liveDelay,!1,this.checkClearSubmit()))},h.prototype.removeBet=function(n){this._submitLiveRunning&&this.stopLiveSubmit(!0);this._removeAllBets=!1;n.boId=n.boId||0;n.allBets=n.allBets||this._singlebetCount>0&&this._singlebetCount==1;n.doRefresh=n.doRefresh||!1;n.isFreeBet=n.isFreeBet||!1},h.prototype.setSubmitButtonText=function(n){var t;((t=this.elements)===null||t===void 0?void 0:t.submit)&&(this.elements.submit.innerHTML=this.getLgFromState(n))},h.prototype.sendCommandToServer=function(t,r,u,e){var h=this,s,o;return r===void 0&&(r=""),u===void 0&&(u=!1),e===void 0&&(e=!1),s=$.Deferred(),o=this._ac.basicPath+Common.Application.instance.path+"BettingSlip.iw?format=json",o+="&BetSlipType="+f[this._type],o+="&sendCount="+ ++this._sendCount,o+="&"+i[t]+"="+r,o+="&chk="+(new Date).getTime(),o+="&reset="+(u||!1),o+="&clear="+(e||!1),o+="&platform="+Common.Application.instance.platform,this._ac!=null&&(this._isSending=!0,this._ac.args.overwrite=!1,this._ac.args.type="POST",this._ac.args.url=o,this._ac.args.error=function(n){h._ajaxCallBackError(n);s.reject()},this._ac.execute(null,function(n){h._ajaxCallBack(n);s.resolve(n)})),n.ShareBet&&(t==i.AddBet||t==i.RemoveBet)&&(this.showShare=!1,n.ShareBet.instance.close()),s.promise()},h.prototype.refreshQuotes=function(){this.sendCommandToServer(i.RefreshQuotes,"ALL")},h.prototype.updateLiveBet=function(n){var t,i,e=!1,r=!1,u,f;return((i=(t=n.bet)===null||t===void 0?void 0:t.data)===null||i===void 0?void 0:i.isLive)&&(u=n.quote/100,f=n.bet.isQuoteChanged(u),this._submitLiveRunning&&(f||n.isLocked||n.isExpired)&&(r=!0,this.stopLiveSubmit(r)),n.bet.updateQuote(u),n.bet.isLocked=n.isLocked,n.bet.isExpired=n.isExpired,f||n.isLocked||n.bet.isExpired?(this.setSubmitButtonText(this.currentState),e=!0):(n.bet.acceptQuote(),this.updateComplete()),n.bet.updateInfoLine(r)),e},h.prototype.updateOdds=function(){var t,n;for(t in this._singleBets)n=this._singleBets[Number(t)],n&&n.acceptQuote();this.updateComplete()},h.prototype.openWalletInfo=function(){this._singlebetCount==0&&this.handleWalletInfo(u.Open)},h.prototype.handleWalletInfo=function(n,t){if(t===void 0&&(t=!1),this._walletInfo)switch(n){case u.Open:this._walletInfo.open(t);break;case u.Close:this._walletInfo.close();break;case u.Show:this._walletInfo.show();break;case u.Hide:this._walletInfo.hide();break;case u.InvalidId:return this._walletInfo.hasInvalidId&&!this.hasFreebet}return!1},h.prototype.redirectToSummaryPage=function(){r.ok&&(window.location.href=decodeURIComponent(this._urlToRedirect))},h.prototype.checkSystemBetsCount=function(n){n===void 0&&(n=!1);var t=0;return this.combi&&(t=this.combi.countBets),(n&&t>2||!n)&&(this._systemBets=this.getPossibleSystems(t,this.combi.countBank)),t},h.prototype.createSystemBets=function(){this._combi&&(this._combi.refillBets(this._singleBets),this.checkSystemBetsCount(!0)>2&&this.renderSystemBets(!0))},h.prototype.generateSystems=function(){var t,n,r,i;if(this._singlebetCount>2){this._systemBets=this.getPossibleSystems(this._combi.countBets,0);for(t in this._singleBets)if(n=this._singleBets[Number(t)],n&&n.data.isBank){n.data.isBank=!1;for(r in this._systemBets)i=this._systemBets[r],i.setBank(Number(t),n.isBankChecked),i.calculate()}this.updateSystemBets()}},h.prototype.refreshAccountBalance=function(n,t){if(n>-1){var i=Common.Helper.getFormatedMoney(n);t&&t.length>0?this.handleWalletInfo(u.InvalidId)?Common.Account.Balance.refreshAll(this._idsToRefreshBalance,i):(Common.Account.Balance.refreshWallets(t),this.handleWalletInfo(u.Close)):Common.Account.Balance.refreshAll(this._idsToRefreshBalance,i);this._isApp&&AppCallbackInterface&&AppCallbackInterface.accountBalanceChanged(n,i)}},h.prototype.initializeObjects=function(){this._license=Common.Application.instance.license;this._isLoggedIn=Common.Application.instance.isLoggedIn;this._combi=n.Bet.combiBet(this)},h.prototype.loadFreebets=function(t){n.FreeBets.instance(this).getFreebets(t)},h.prototype.updateFreebets=function(t){var o=this,r,u,f,e,i;this._freebets=t;this._singleFreebetSelection?this._singleFreebetSelection.update(t):((u=(r=this._elements)===null||r===void 0?void 0:r.freebet)===null||u===void 0?void 0:u.single)!=null&&(this._singleFreebetSelection=new n.FreebetSelection({freebets:t,prefix:"single",onChange:function(n){o.setSingleFreebet(n)},tooltipParent:this._elements.body}),this._elements.freebet.single.appendChild(this._singleFreebetSelection.Element));this._combiFreebetSelection?this._combiFreebetSelection.update(t):((e=(f=this._elements)===null||f===void 0?void 0:f.freebet)===null||e===void 0?void 0:e.combi)!=null&&(this._combiFreebetSelection=new n.FreebetSelection({freebets:t,prefix:"combi",onChange:function(n){o.setCombiFreebet(n)},tooltipParent:this._elements.body}),this._elements.freebet.combi.appendChild(this._combiFreebetSelection.Element),Common.DOM.setClass(this._elements.freebet.combi,!1,"none"));this.validateFreebet();i=this.getSingleBetsArray();i.length==1&&i[0].freebetBonusId>0?this._singleFreebetSelection.selectById(i[0].freebetBonusId):this.combi.freebetBonusId>0&&this._combiFreebetSelection.selectById(this.combi.freebetBonusId)},h.prototype.validateFreebet=function(){var i,r,n=this.getSingleBetsArray(),t;n.length&&(this._singleFreebetSelection!=null&&(t=n.length==1,this._singleFreebetSelection.enabled=t,Common.DOM.setClass((r=(i=this._elements)===null||i===void 0?void 0:i.freebet)===null||r===void 0?void 0:r.single,!t,"none"),t&&this._singleFreebetSelection.validate([n[0].data])),this._combiFreebetSelection!=null&&(this._combiFreebetSelection.enabled=this.combi.valid,this.combi.valid&&this._combiFreebetSelection.validate(n.map(function(n){return n.data}),this.combi.quote)))},h.prototype.setSingleFreebet=function(n){var i,t;for(i in this.singleBets)if(t=this.singleBets[i],t!=null){n?(t.freebetBonusId=n.bonusId,t.amount=n.bonusLeft):t.freebetBonusId=0;t.disabled=n!==null;t.updateAmount();break}this.updateWalletState()},h.prototype.setCombiFreebet=function(n){var r=this,t;n?(this.combi.freebetBonusId=n.bonusId,this.combi.amount=n.bonusLeft):this.combi.freebetBonusId=0;this.combi.disabled=n!==null;for(t in this.singleBets)this.singleBets[t].disabled=n!==null;n!=null?this.sendCommandToServer(i.SetGlobalSingleAmount,"0|true").then(function(){r.combi.updateAmount()}):this.combi.updateAmount();this.updateWalletState()},h.prototype.updateWalletState=function(){this.walletInfo&&(this.walletInfo.disabled=this.hasFreebet,this.hasFreebet&&this.walletInfo.close())},h.prototype.hideFreebetTooltips=function(){var n,t;(n=this._singleFreebetSelection)===null||n===void 0?void 0:n.hideTooltip();(t=this._combiFreebetSelection)===null||t===void 0?void 0:t.hideTooltip()},h.prototype.checkSubmit=function(n){(this.existExpiredBets(n.global.expiredBets)||n.global.quoteHasChanged)&&(this._submitRunning=!1,this._submitIfPossible=!1)},h.prototype.existExpiredBets=function(n){return n.length>0?(this.setExpiredBets(n),!0):!1},h.prototype.setExpiredBets=function(n){var t=this;n.forEach(function(n){t.setExpiredBet(n)})},h.prototype.setExpiredBet=function(n){var t=this._singleBets[n];return t?!0:!1},Object.defineProperty(h.prototype,"currentState",{get:function(){var i,n;if(this._needRefresh)return t.HasChanged;for(i in this._singleBets)if(n=this._singleBets[Number(i)],n){if(n.isExpired)return t.Expired;if(n.isLocked)return t.Locked;if(n.quoteHasChanged)return t.Refresh}return this.hasFreebet?t.SubmitFreebet:t.Submit},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"hasTooManyBets",{get:function(){var n=0;for(var t in this._singleBets)if(this._singleBets[Number(t)]&&++n>this._gmaxBets-1)return!0;return!1},enumerable:!1,configurable:!0}),h.prototype.hasValidServerData=function(t){return(this._stopLiveSubmit=!1,this._requiredAmountToClean=!1,this._resultType=n.ResultType.None,this._requestCommand=n.RequestCommands.None,t.global==null||t.global.modTimeStamp==null||t.combiBet==null||t.combiBet.error==null)?!1:Number(t.global.transId)<this._sendCount?!1:(t.global.liveDelay>0&&(this._liveDelay=t.global.liveDelay),t.settings&&(this._requestCommand=i[t.settings.requestCommand],this._needRefresh=t.settings.needRefresh),t.global.isSaved&&this.refreshAccountBalance(t.global.accBalance,t.global.accBalanceList),!0)},h.prototype.checkAmountsToClean=function(n){var t=!0;return(this._requiredAmountToClean&&(this.clearAmounts(),t=!1),n)?(t&&this.clearAmounts(),!0):!1},h.prototype.setTaxInfo=function(n){return n?(this._taxInfo=n,e[this._taxInfo.mode]!=e.Win&&(this._taxInfo.factor=0),!0):!1},h.prototype.calcSingleBetsProfit=function(){var t,n;if(this._singlebetCount>0)for(t in this._singleBets)n=this._singleBets[Number(t)],n&&n.amount>0&&n.quote>0&&this.calcSummaryProfit(n,1)},h.prototype.calcCombiBetProfit=function(){this._combi.amount>0&&this._combi.hasError==!1&&this.calcSummaryProfit(this._combi,1)},h.prototype.calcSystemBetsBetsProfit=function(){var t,n;if(this._systembetCount>0)for(t in this._systemBets)n=this._systemBets[t],n&&n.amount>0&&n.quote>0&&this.calcSummaryProfit(n,n.countBets)},h.prototype.resetClient=function(n,i){var u,r;for(u in this._singleBets)r=this._singleBets[Number(u)],r&&r.removeHighLight();this._singlebetCount=0;this._removeAllBets=!0;this._singleBets={};this._systemBets={};this._singleBetIds=[];this.updateCount(0,i);this.setSubmitButtonText(t.Submit)},h.prototype.clear=function(n,t,r){return t===void 0&&(t=!1),r===void 0&&(r=!0),this.resetClient(n,r),this._elements.settings.clear.cb&&(t=t&&this._elements.settings.clear.cb.checked),this.sendCommandToServer(i.RemoveBet,"ALL",!1,t)},h.prototype.clearSummaryValues=function(){r.amount=0;r.bets=0;r.win=0},h.prototype.getPossibleSystems=function(t,i){var e=i==0?2:1+i,u={},r,f;if((this._systembetCount=0,t>this._gmaxSystemBets)||t<=2||t>this._gmaxSystemBets)return u;for(r=t-1;r>=e;r--)f=n.Bet.systemBet(this,t,r,this._combi.bets),u[f.id]=f,this._systembetCount++;return u},h.prototype.checkCombiAndSystem=function(n){if(this.combi&&this.combi.hasError)return this._systemBets={},this.refreshCombiAndSystem(),!0;switch(this._requestCommand){case i.AddBet:case i.RemoveBet:this.refreshCombiAndSystem()}return n},h.prototype.setSummaryProfit=function(){var n;((n=this._elements)===null||n===void 0?void 0:n.sum)&&(this.setHtml(this._elements.sum.amount,Common.Helper.getFormatedMoney(r.amount)),this.setHtml(this._elements.sum.win,Common.Helper.getFormatedMoney(r.win)))},h.prototype.setHtml=function(n,t){t===void 0&&(t="");n&&(n.innerHTML=t)},h.prototype.hasErrorState=function(){switch(this.currentState){case t.Locked:this.deleteLockedLiveBets();break;case t.Refresh:this.refreshQuotes();break;case t.HasChanged:this.deleteMainBookBets();break;default:return!1}return!0},h.prototype.getDataFromJournal=function(n,t,i){i.innerHTML=this.spinner;new Common.AjaxCall({controller:"Journal"}).execute("GetBetSlipJournalContent",function(n){n.success?i.classList.remove("no-bets-available"):i.classList.add("no-bets-available");n.html.length>0&&(i.innerHTML=n.html)},JSON.stringify({betAccountDataType:n,mode:t}))},h.prototype.isTabValid=function(n,t){return t?n.classList.contains("disabled")==!1:!0},h.prototype.clearTabsAndContents=function(n){n.tabs.forEach(function(n){n.classList.remove("active")});n.contents.forEach(function(n){n.classList.remove("active")})},h.prototype.deleteLockedLiveBets=function(){var t,n;for(t in this._singleBets)n=this._singleBets[Number(t)],n&&n.isLocked&&this.removeBet({boId:n.data.id});this.updateComplete()},h.prototype.deleteMainBookBets=function(){var t,n;for(t in this._singleBets)n=this._singleBets[Number(t)],n&&!n.data.isLive&&($.inArray(n.data.id,this._singleBetIds)||this.removeBet({boId:n.data.id}));this._needRefresh=!1;this._singleBetIds=[];this.setSubmitButtonText(this.currentState)},h.prototype.calcSummaryProfit=function(n,t){r.bets+=t;r.amount+=n.amount;r.win+=n.win},h.prototype.hasValidAmount=function(){var i,n,r,t;for(i in this._singleBets)if(n=this._singleBets[Number(i)],n&&n.hasValidAmount==!1)return!1;if(this._combi&&!this._combi.hasValidAmount)return!1;for(r in this._systemBets)if(t=this._systemBets[r],t&&t.hasValidAmount==!1)return!1;return!0},h.prototype.getLgFromState=function(n){switch(n){case t.Submit:return Translation.getTextId("Submit");case t.SubmitFreebet:return Translation.getTextId("SubmitFreebet");case t.Locked:return Translation.getTextId("DeleteLocked");case t.Refresh:return Translation.getTextId("Refresh");case t.Expired:return Translation.getTextId("DeleteExpired");default:return window.console&&window.console.error("Interwetten - Betting.BettingSlipBase.getLgFromState :: State '"+n+"' hat keine textliche Unterstützung!"),Translation.getTextId("Submit")}},h.prototype.refreshCombiAndSystem=function(){this.combi.render();this.renderSystemBets()},h.prototype.serverCallBackError=function(){},Object.defineProperty(h.prototype,"spinner",{get:function(){return'<div class="load"><label class="circle fa-spinner fa-spin" ><\/label><\/div>'},enumerable:!1,configurable:!0}),h}();n.BettingSlipBase=h;r=function(){function n(){}return Object.defineProperty(n,"ok",{get:function(){return this._bets>0&&this.amount>0},enumerable:!1,configurable:!0}),Object.defineProperty(n,"amount",{get:function(){return this._amount},set:function(n){this._amount=n},enumerable:!1,configurable:!0}),Object.defineProperty(n,"bets",{get:function(){return this._bets},set:function(n){this._bets=n},enumerable:!1,configurable:!0}),Object.defineProperty(n,"win",{get:function(){return this._win},set:function(n){this._win=n},enumerable:!1,configurable:!0}),n._amount=0,n._bets=0,n._win=0,n}();n.summary=r}(Betting||(Betting={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){function u(){[".main-bet",".offer-container",".quote-btn",".offeritem"].forEach(function(n){document.querySelectorAll(n).forEach(function(n){n&&(n.classList.remove("selected"),n.classList.remove("freebet"))})})}var i,r;(function(n){n[n.None=-1]="None";n[n.AddAmount=0]="AddAmount";n[n.RequestBet=1]="RequestBet";n[n.SubmitBet=2]="SubmitBet";n[n.RemoveBet=3]="RemoveBet";n[n.Login=4]="Login";n[n.RefreshQuote=5]="RefreshQuote"})(i=t.QuickBetCommands||(t.QuickBetCommands={}));t.removeCssFreeBet=u;r=function(r){function u(){var n=r.call(this)||this;return n._ajaxCallBack=function(t){n._quickbetIsRunning?n._quickBet&&(n._isSending=!1,n._quickbetIsRunning=!1,n._quickBet.processResult(n.getQuickBetResult(t))):n.serverCallBack(t)},n._defaultStake=0,n._isOpen=!1,n._activeClickOnTab=!0,n._betSlipRefresh=0,n._keyPossibleCombi=0,n._quickbetIsRunning=!1,n}return __extends(u,r),Object.defineProperty(u,"instance",{get:function(){return this._instance==null&&(this._instance=new n.Mobile.BettingSlip),this._instance},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"quickBet",{get:function(){var t=this;return this._quickBet==null&&(this._quickBet=new n.QuickBet.BettingSlip({amountValues:this._amountValues,handleQuickBet:function(n){t.handleQuickBet(n)},stakeEntry:this._stakeEntry,isApp:this.isApp})),this._quickBet},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"taxinfo",{get:function(){var n=this._elements;return n.taxinfo.box?n.taxinfo.box.cloneNode(!0):null},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"singleBetContainer",{get:function(){var n,t,i;if((i=(t=(n=this._elements)===null||n===void 0?void 0:n.single)===null||t===void 0?void 0:t.one)!==null&&i!==void 0)return i.closest("details")},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"singleBetCount",{get:function(){return this._singlebetCount},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"stakeEntry",{get:function(){return this._stakeEntry},set:function(n){this._stakeEntry=n},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"liveDelay",{get:function(){return this.hasLiveBet?this._liveDelay:0},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"stake",{get:function(){return this._stake},set:function(n){this._stakeField&&(this._stakeField.value=Common.Helper.getStake(n));this._stake=n},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"defaultStake",{get:function(){return this._defaultStake},set:function(n){this._defaultStake=n},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"combi",{get:function(){return this._combi},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"isQuickBet",{get:function(){return this._isQuickBet},set:function(n){this._isQuickBet=n},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"tabsCollection",{set:function(n){this._tabsCollection=n},enumerable:!1,configurable:!0}),u.prototype.getStakeEntry=function(){return this._stakeEntry},u.prototype.init=function(t){var i=this,u,f,e,o;r.prototype.init.call(this,t);this._combiHeaderOdd=t.oddCombi;this._stakeField=t.single.stake;this._stakeField&&this._stakeField.addEventListener("click",function(){i._isSending||i.hasFreebet||i._stakeEntry.show({target:i._stakeField,value:i.stake,disablePossibleWin:!1,delegates:{change:function(n){return i.stake=n,Common.Helper.getFormatedMoney(i.possiblePreviewWin)},take:function(){i.sendCommandToServer(n.RequestCommands.SetGlobalSingleAmount,i._stake+"|true")}}})});t.header.close&&t.header.close.forEach(function(n){n.addEventListener("click",function(){i.close()})});u=0;f=5e3;t.settings.remove&&t.settings.remove.childNodes.forEach(function(n){n.addEventListener("click",function(){t.settings.remove.classList.contains("full")?(clearTimeout(u),t.settings.remove.classList.remove("full"),i.removeBet({boId:0,allBets:!0}),t.settings.change.btn&&t.settings.change.btn.classList.remove("none")):(t.settings.remove.classList.add("full"),t.settings.change.btn&&t.settings.change.btn.classList.add("none"),u=setTimeout(function(){t.settings.change.btn&&t.settings.change.btn.classList.remove("none");t.settings.remove.classList.remove("full")},f))})});e=0;t.settings.change.btn&&t.settings.change.btn.childNodes.forEach(function(n){n.addEventListener("click",function(){if(t.settings.change.btn.classList.contains("full")){if(clearTimeout(e),t.settings.change.container){t.settings.change.container.classList.remove("none");var n=t.settings.change.container.closest(".betslip-dialog-content.bets");n&&(n.scrollTop=n.scrollHeight)}t.settings.change.btn.classList.remove("full");t.settings.change.btn.classList.add("none")}else t.settings.change.btn.classList.add("full"),t.settings.remove&&t.settings.remove.classList.add("none"),e=setTimeout(function(){t.settings.change.btn.classList.remove("full");t.settings.remove&&t.settings.remove.classList.remove("none")},f)})});t.settings.change.container&&(o=t.settings.change.container.querySelector(".icon.close"),o&&o.addEventListener("click",function(){t.settings.change.container.classList.add("none");t.settings.change.btn&&t.settings.change.btn.classList.remove("none");t.settings.remove&&t.settings.remove.classList.remove("none")}));t.settings.scroll.btn&&t.settings.scroll.btn.addEventListener("click",function(){t.settings.scroll.container&&(t.settings.scroll.container.scrollTop=t.settings.scroll.position);t.settings.scroll.btn.classList.add("none")});document.getElementsByName(t.settings.change.radio).forEach(function(t){t.addEventListener("click",function(){var r;((r=t.dataset)===null||r===void 0?void 0:r.type)&&(i._quoteChangeType=n.QuoteChangeTypes[t.dataset.type])})});t.bank&&t.bank.addEventListener("click",function(){i.toggleBankVisibility()});t.taxinfo.link&&t.taxinfo.link.addEventListener("click",function(){t.taxinfo.box&&t.taxinfo.box.classList.toggle("active")});t.success.back&&t.success.back.addEventListener("click",function(){i.closeSuccess()});this.handleSubmit();this.initHandlers()},u.prototype.handleSubmit=function(){var n,t;((n=this._elements.submit)===null||n===void 0?void 0:n.parentElement)&&this.handleSubmitObject((t=this._elements.submit)===null||t===void 0?void 0:t.parentElement)},u.prototype.reload=function(){return this.sendCommandToServer(n.RequestCommands.Load,"1")},u.prototype.setBetData=function(n){var u,i,f,r,e,o,t;for(this.resetClient(!1,!1),i=0,f=n.bets;i<f.length;i++)t=f[i],this.addBetData(t,!0);for(this.setBankVisibility(n.showBank),this.combi.render(),this.combi.stake=n.combiBet.amount,this.combi.freebetBonusId=(u=n.combiBet.freebetBonusId)!==null&&u!==void 0?u:0,this.showPossibleCombi(),this.generateSystems(),r=0,e=n.systemBets;r<e.length;r++)o=e[r],t=this.systemBets[o.id],t&&(t.amount=o.amount);this.resetAmounts();this.updateSummary(!0)},u.prototype.addBet=function(n){var t=!1,i=this._singleBets[n.id];if(i)this.removeBet({boId:n.id,doRefresh:!0,isFreeBet:i.data.isFreeBet});else return this._stake&&(n.amount=this._stake),this.handleBetSlipType(n)?r.prototype.addBet.call(this,n):$.Deferred().resolve(t).promise();return $.Deferred().resolve(t).promise()},u.prototype.addBetData=function(t,i){if(i===void 0&&(i=!0),this.handleBetSlipType(t,!0)){t.bs=this;var r=n.Bet.singleBet(t);this.quickBet.isEnabled&&(r=this._quickBet.bet.singleBet);r.addHighLight();this._combi&&this._combi.addBet(r);this.openWalletInfo();this._singlebetCount++;i&&r.create(t);this.hasFreebet&&(r.disabled=!0);this._singleBets[r.data.id]=r;this.updateCount(this._singlebetCount,!0);this._singleFreebetSelection&&t.freebetBonusId>0&&this._singleFreebetSelection.selectById(t.freebetBonusId)}},u.prototype.initializeLiveSubmit=function(){this._liveTimer==-1&&r.prototype.initializeLiveSubmit.call(this)},u.prototype.setHeaderCount=function(n){var i,u,t,f;n>-1&&(n>0&&this.toggleStakeContainer(n>1),t=n==0,f=Common.Application.instance.license.shareaBet?"empty":"none",r.prototype.setHeaderCount.call(this,n),Common.DOM.setClass(this.singleBetContainer,t,"none"),Common.DOM.setClass((i=this._elements.header)===null||i===void 0?void 0:i.btnHeader,t,f),Common.DOM.setClass((u=this._elements.header)===null||u===void 0?void 0:u.btn,t,"none"))},u.prototype.setOpenBetsCount=function(t){n.Mobile.Tabs.setOpenBetsCount(t)},u.prototype.open=function(){var n=this._elements;this.quickBet&&this.quickBet.remove();this._walletInfo&&this._walletInfo.check();!Common.Application.instance.isLivePage&&this.hasLiveBet&&this.enableAutoRefresh();this._isApp&&(MessageBroker.fire(MessageBroker.Messages.BetslipVisibilityChanged,{isVisible:!0}),AppCallbackInterface.requestBetSlipOpen(0));this._isOpen=!0},u.prototype.handleQuickBet=function(t){this._quickbetIsRunning=!0;switch(t.QuickBetCommands){case i.AddAmount:this.clearAmounts();this.sendCommandToServer(n.RequestCommands.SetQuickBetAmount,t.offerId+"|"+t.amount+"|"+t.freebet);break;case i.RequestBet:this.requestLiveSubmit();break;case i.SubmitBet:this._liveDelay=t.delay;this.initializeLiveSubmit();break;case i.RemoveBet:this.removeBet({boId:t.offerId});break;case i.RefreshQuote:this.refreshQuotes();break;case i.Login:this._elements.handler.quickbet.login(t.offerId)}},u.prototype.requestLiveSubmit=function(){this.disableAutoRefresh();r.prototype.requestLiveSubmit.call(this);this._submitLiveRunning=!0},u.prototype.removeBet=function(t){if(r.prototype.removeBet.call(this,t),t.allBets)this.clear(!0);else{var i=this._singleBets[t.boId];i&&(i.remove(),this._singleBets[t.boId]=null,delete this._singleBets[t.boId],this._combi.removeBet(t.boId),this.checkSystemBetsCount(!1),this.updateCount(--this._singlebetCount,!0),this.hasLiveBet||this.disableAutoRefresh(),this.showPossibleCombi());this.checkRefreshCombiSystem(t.doRefresh);this.sendCommandToServer(n.RequestCommands.RemoveBet,""+t.boId);this.setSubmitButtonText(this.currentState)}},u.prototype.renderSystemBets=function(n){if(n===void 0&&(n=!1),this._elements.single&&this._elements.single.system){this.setHtml(this._elements.single.system);var t=this.htmlSystemBets;t.valid?this.enableSystemContainer(this._elements.single.system.children.length>0):this.enableSystemContainer(t.valid);this._elements.bank&&(this._combi.isMultiBet?(this._elements.bank.checked=!1,this.toggleBankVisibility(!1,!1),this._elements.bank.parentElement.classList.add("none")):this._elements.bank.parentElement.classList.remove("none"))}},u.prototype.sendCommandToServer=function(n,t,i,u){return t===void 0&&(t=""),i===void 0&&(i=!1),u===void 0&&(u=!1),this._error.hideMessage(),r.prototype.sendCommandToServer.call(this,n,t,i,u)},u.prototype.submit=function(){var n=r.prototype.submit.call(this);return!n&&this._elements.handler&&(Common.Application.instance.platform==Common.Platform.Tablet&&this.close(),this._elements.handler.mobile.login()),n},u.prototype.toggleBankVisibility=function(t,i){t===void 0&&(t=null);i===void 0&&(i=!0);r.prototype.toggleBankVisibility.call(this,t);i&&(this.generateSystems(),this.sendCommandToServer(n.RequestCommands.ShowBank,""+this._isBankVisible))},u.prototype.openBetSlip=function(){this.updateBetSlipSummary();this.open()},u.prototype.showPossibleCombi=function(){var n=this;this._keyPossibleCombi>0&&clearTimeout(this._keyPossibleCombi);this._combiHeaderOdd&&this._singlebetCount>1&&this._combi.valid?(this._combiHeaderOdd.innerText=Common.Helper.getFormatedOdd(this._combi.quoteUnchecked*100),this._elements.header.btn.classList.add("combi"),this._keyPossibleCombi=setTimeout(function(){n.hidePossibleCombi()},5e3)):this.hidePossibleCombi()},u.prototype.updateSummary=function(n){n===void 0&&(n=!1);r.prototype.updateSummary.call(this)},u.prototype.updateSystemBets=function(n){n===void 0&&(n=!0);r.prototype.updateSystemBets.call(this);n&&this.updateBetSlipSummary()},u.prototype.clearServer=function(t){return t===void 0&&(t=!1),this.sendCommandToServer(n.RequestCommands.RemoveBet,"ALL",!1,t)},u.prototype.setBankVisibility=function(n){this.toggleBankVisibility(n,!1);this._elements.bank&&(this._elements.bank.checked=n)},u.prototype.updateLiveBet=function(n){var t,i;return this._isOpen?n.bet=this.singleBets[n.id]:((t=this._quickBet)===null||t===void 0?void 0:t.isEnabled)&&this._quickBet.isValidId(n.id)&&(n.bet=this.quickBet.bet.singleBet),i=r.prototype.updateLiveBet.call(this,n),i&&(this._quickbetIsRunning&&!this._isSending&&(this._quickbetIsRunning=!1,this.quickBet.changeState()),this._isSending=!1),i},u.prototype.checkLiveSubmit=function(){(this.currentState==n.States.Submit||this.currentState==n.States.SubmitFreebet)&&this.requestLiveSubmit()},u.prototype.hasLiveBetCheck=function(){return this._type==n.Types.QUICK?!0:r.prototype.hasLiveBetCheck.call(this)},u.prototype.resetClient=function(t,i){this._combi=n.Bet.combiBet(this);r.prototype.resetClient.call(this,t,i);this.removeBetsFromContainer();this.updateSummary(t);i&&this.close();this.disableAutoRefresh()},u.prototype.setSystemBet=function(n,t,i){return t.render(i),n},u.prototype.setWalletInfoRequired=function(){this._error.showMessage(n.ResultType.Error,this._walletInfo.messageRequired);r.prototype.setWalletInfoRequired.call(this)},u.prototype.setCombiFreebet=function(n){r.prototype.setCombiFreebet.call(this,n);this.updateStakeField()},u.prototype.setSingleFreebet=function(n){r.prototype.setSingleFreebet.call(this,n);this.updateStakeField()},u.prototype.updateStakeField=function(){Common.DOM.setClass(this._stakeField,this.hasFreebet,"disabled")},u.prototype.setExpiredBet=function(n){return r.prototype.setExpiredBet.call(this,n)?(this._isOpen?this._singleBets[n].setExpired(!0):this._quickBet&&(this._quickBet.isEnabled?this._quickBet.isExpired=!0:this._quickBet.showErrorMessage(this._sender,Translation.getTextId("ExpiredBet")),this.removeBet({boId:n})),!0):!1},u.prototype.setTooManyBets=function(){this._quickBet&&this._quickBet.showErrorMessage(this._sender,Translation.getTextId("TooManyBets"))},u.prototype.removeBetsFromContainer=function(){this._elements.body&&(this._elements.body.classList.remove("active"),this._elements.settings.remove&&this._elements.settings.remove.classList.remove("active"),this._elements.single.one.innerHTML="")},u.prototype.updateBetSlipSummary=function(){this.updateSummary();this.stake=this.totalSingleBetStake},Object.defineProperty(u.prototype,"possiblePreviewWin",{get:function(){var t=0,i,n;for(i in this._singleBets)n=this._singleBets[Number(i)],n&&n.quote>0&&(t+=n.getPossiblePreviewWin(this._stake));return t},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"totalSingleBetStake",{get:function(){var t,n;for(t in this._singleBets)if(n=this._singleBets[t],n&&this._stake!=n.amount)return 0;return this._stake},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"firstBet",{get:function(){for(var n in this._singleBets)return this._singleBets[n];return null},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(this.isApp)AppCallbackInterface&&AppCallbackInterface.postMessage(MessageBroker.Messages.ClosePopover);else{var n=this._elements;n.body&&!n.body.classList.contains("collapsed")&&(t.Tabs.setAccountBalanceElement(),n.body.classList.add("collapsed"),this.hideFreebetTooltips());document.body.classList.contains("no-scroll")&&document.body.classList.remove("no-scroll");this.showShare=!1}this.closeSuccess();this._isOpen=!1},u.prototype.serverCallBack=function(t){var i=t.main,f,r,u;if(i&&this.hasValidServerData(i)){f=this._combi&&this._combi.hasError;r={isUpdateRequired:!1,isResetAmountRequired:!1};i.global.error.has&&(r.isResetAmountRequired=!0,i.global.error.accBalance&&(this.handleWalletInfo(n.WalletCommand.Open,!0),this._requiredAmountToClean=!0,r.isResetAmountRequired=!1));u=this.setTaxInfo(i.taxInfo);r=this.checkSingleBets(i.singleBets,r);r=this.checkCombiBet(i.combiBet,r);r=this.checkSystemBets(i.systemBets,r);(t===null||t===void 0?void 0:t.quick)&&this.checkQuickBet(t.quick.singleBets);switch(this._requestCommand){case n.RequestCommands.AddBet:case n.RequestCommands.RemoveBet:this.validateFreebet();this._isApp&&AppCallbackInterface.betAdded(this._singleBetIds.length,null)}this.showPossibleCombi();r.isResetAmountRequired&&(this._submitIfPossible=!1,this.resetAmounts());this.setSubmitButtonText(this.currentState);u=this.checkCombiAndSystem(u);(this.existExpiredBets(i.global.expiredBets)||i.global.quoteHasChanged)&&(i.global.error.has=!0);switch(this._requestCommand){case n.RequestCommands.Load:this.setBetData({bets:i.singleBets,showBank:i.settings.showBank,combiBet:i.combiBet,systemBets:i.systemBets});this._isSending=!1;break;case n.RequestCommands.RequestLiveSubmit:this._needRefresh=!1;i.global.error.has?this._stopLiveSubmit=i.global.isSaved==!1:(this.showProgressBar(!0),this.initializeLiveSubmit());break;case n.RequestCommands.DoLiveSubmit:this.showProgressBar(!1);i.global.isSaved&&(this._stake=0,this.cloneSuccessSummary(),this.loadFreebets(!0),this.hasFreebet&&n.Mobile.removeCssFreeBet());this.checkAmountsToClean(i.global.isSaved)&&(this.toggleSuccess(!0),this._isApp&&MessageBroker.fire(MessageBroker.Messages.BetSlipBetsSubmitted,{offerIds:this._singleBetIds}),this.clearAndClose());default:this.checkAmountsToClean(!1);this._isSending=!1}this._stopLiveSubmit&&this._submitLiveRunning&&this.stopLiveSubmit(!0);r.isUpdateRequired?this.updateComplete():u&&this.updateBetSlipSummary();i.global.error.has&&(i.global.error.message.length>0&&this._error.showMessage(n.ResultType.Error,i.global.error.message),this._isSending=!1);this._isApp&&MessageBroker.fire(MessageBroker.Messages.BetSlipLoaded,{bets:i.singleBets,showBank:i.settings.showBank,combiBet:i.combiBet,systemBets:i.systemBets})}},u.prototype.showGoTo=function(){var t,n=this._elements.settings.scroll;(n===null||n===void 0?void 0:n.position)>0&&((t=n.btn)===null||t===void 0?void 0:t.classList.remove("none"))},u.prototype.closeSuccess=function(){this.toggleSuccess(!1);this.clearSuccessSummary();this.updateCount(this.singleBetCount,!0)},u.prototype.toggleSuccess=function(n){var t=this._elements;t.success.layer&&(n?(this.toggleButtonBack(),t.success.layer.classList.add("open"),t.success.layer.classList.remove("close")):(t.success.layer.classList.add("close"),t.success.layer.classList.remove("open")))},u.prototype.cloneSuccessSummary=function(){var n=this._elements;n.sum.main&&n.success.summary&&(this.clearSuccessSummary(),n.success.summary.append(n.sum.main.cloneNode(!0)))},u.prototype.clearSuccessSummary=function(){var n=this._elements;n.sum.main&&(n.success.summary.innerHTML="")},u.prototype.toggleButtonBack=function(){var n=this._elements;n.success.back&&(this.checkClearSubmit()?n.success.back.classList.add("none"):n.success.back.classList.remove("none"))},u.prototype.toggleStakeContainer=function(n){var t,i,r=(i=(t=this._elements.single)===null||t===void 0?void 0:t.stake)===null||i===void 0?void 0:i.parentElement;r&&(n?r.classList.remove("none"):r.classList.add("none"))},u.prototype.clearAndClose=function(){this.checkClearSubmit()&&(this.removeBetsFromContainer(),this.clear(!0,!0,!1))},u.prototype.checkSingleBets=function(t,i){var r=this,u,f;return this._singleBetIds=[],f=0,t&&t.forEach(function(t){var u=r._singleBets[Number(t.id)],e;if(r._singleBetIds.push(Number(t.id)),u){switch(r._requestCommand){case n.RequestCommands.AddBet:u.create(t);break;case n.RequestCommands.SetSingleAmount:case n.RequestCommands.SetGlobalSingleAmount:u.stake=t.amount}e=r.checkSingleBet(u,t);i.isUpdateRequired=i.isUpdateRequired||e.isUpdateRequired;i.isResetAmountRequired=i.isResetAmountRequired||e.isResetAmountRequired}f+=Number(t.amount>0)}),((u=this._elements)===null||u===void 0?void 0:u.sum)&&(this._elements.sum.count.single.innerHTML=""+f),i},u.prototype.checkCombiBet=function(t,i){var r,u;return t&&this._combi&&(r=this._combi.checkErrors(t,this._resultType),r.model.result&&(this._stopLiveSubmit=!0),r.model.resultType!=n.ResultType.None&&(this._resultType=r.model.resultType),u=n.ResultType[t.error],u&&this.combi.setServerError(u),this._requestCommand==n.RequestCommands.SetCombiAmount&&(this._combi.stake=t.amount),i.isUpdateRequired=i.isUpdateRequired||r.isUpdateRequired,i.isResetAmountRequired=i.isResetAmountRequired||r.isResetAmountRequired),i},u.prototype.checkQuickBet=function(n){var u=this,t,i,r;this._quickBet&&this._quickBet.isEnabled&&(r=!1,(n===null||n===void 0?void 0:n.length)>0?n.forEach(function(n){var t;((t=u._quickBet)===null||t===void 0?void 0:t.bet.id)==n.id&&(u._quickBet.bet.create(n),r=!0)}):this._quickBet.isEnabled=!1,r==!1&&((i=(t=this._quickBet)===null||t===void 0?void 0:t.bet)===null||i===void 0?void 0:i.remove()))},u.prototype.checkBankState=function(n){var t;((t=this._elements.bank)===null||t===void 0?void 0:t.checked)&&n==0&&this._elements.bank.click()},u.prototype.getQuickBetResult=function(t){return t.quick==null&&n.RequestCommands[t.main.settings.requestCommand]==n.RequestCommands.RemoveBet?t.main:t.quick},u.prototype.checkSystemBets=function(t,i){var r=this,u;return this._systembetCount=0,t&&(u=0,this._systembetCount=t.length,t.forEach(function(t){var i=r._systemBets[t.id],f;i&&(f=i.checkErrors(t,r._resultType),f.model.result&&(r._stopLiveSubmit=!0),f.model.resultType!=n.ResultType.None&&(r._resultType=f.model.resultType),r._requiredAmountToClean=r._requiredAmountToClean||f.isClearAmountRequired,i.amount>0&&(u=u+i.countBets),r._requestCommand==n.RequestCommands.SetSysAmount&&(i.stake=t.amount))})),this.checkBankState(this._systembetCount),i},u.prototype.enableSystemContainer=function(n){var t=this._elements.single.system.closest("details"),i;t&&(n?(i=t.querySelector("summary strong"),i&&(i.innerText=this._combi.isMultiBet?Translation.getTextId("SystemBets-Multi"):Translation.getTextId("SystemBets")),t.classList.remove("none")):t.classList.add("none"))},u.prototype.toggleTabView=function(n,t){n&&(t?n.classList.contains("disabled")&&n.classList.remove("disabled"):n.classList.contains("disabled")==!1&&n.classList.add("disabled"))},u.prototype.getselectedTab=function(n,i){i===void 0&&(i=this._tabsCollection.bs);var r=null;return i.forEach(function(i){i.classList.contains(t.TabType[n])&&(r=i)}),r},u.prototype.hidePossibleCombi=function(){this._combiHeaderOdd&&this._elements.header.btn.classList.remove("combi")},u.prototype.handleBetSlipType=function(t,i){var r,u;if(i===void 0&&(i=!1),i)return!this.hasTooManyBets;switch(this._type){case n.Types.HTML:if(this.hasTooManyBets)return this.setTooManyBets(t.id),!1;case n.Types.QUICK:t.bs=this;(u=(r=this.quickBet)===null||r===void 0?void 0:r.bet)===null||u===void 0?void 0:u.add(t)}return!0},u.prototype.enableAutoRefresh=function(){var n=this;this.disableAutoRefresh();this._betSlipRefresh=setInterval(function(){n._ac!=null&&(n._ac.args.overwrite=!1,n._ac.args.type="GET",n._ac.args.url=n._ac.basicPath+Common.Application.instance.path+"bettingslip",n._ac.execute(null,function(t){t.singleBets&&t.singleBets.forEach(function(t){n.updateLiveBet({id:t.offerId,quote:t.quote*100,isLocked:t.isLocked,isExpired:t.isExpired})})}))},3e3)},u.prototype.disableAutoRefresh=function(){this._betSlipRefresh>0&&(clearInterval(this._betSlipRefresh),this._betSlipRefresh=0)},u}(n.BettingSlipBase);t.BettingSlip=r})(t=n.Mobile||(n.Mobile={}))}(Betting||(Betting={}));__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},__assign.apply(this,arguments)},function(n){var t;(function(t){var i=function(){function t(n){this._lastGroupId=0;this._args=n}return Object.defineProperty(t.prototype,"id",{get:function(){return this._model.id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bet",{get:function(){return this._bet},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFreeBet",{get:function(){return this._model.isFreeBet},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(n){this._isEnabled=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isExpired",{set:function(n){this._bet&&(this._bet.isExpired=n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taxinfo",{set:function(n){this._taxinfo=n;this._taxinfo&&(this._taxinfo.removeAttribute("id"),this._taxinfo.classList.add("tax-info"))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"walletInfo",{get:function(){return this._walletInfo},set:function(n){this._walletInfo=n},enumerable:!1,configurable:!0}),t.prototype.init=function(t){var i=this,r;this.remove();this._model=t.bet;this._defaultStake=t.defaultAmount;this._sender=t.sender;r=__assign(__assign({},t),{taxinfo:this._taxinfo,stakeEntry:this._args.stakeEntry,walletInfo:this._walletInfo,isApp:this._args.isApp,handleQuickBet:function(n){Common.Helper.isFunction(i._args.handleQuickBet)&&i._args.handleQuickBet(n)}});this._bet=new n.Mobile.QuickBet(r);this._bet.bs=this;this.append()},t.prototype.isValidId=function(n){var t,i;return Number((i=(t=this._bet)===null||t===void 0?void 0:t.singleBet)===null||i===void 0?void 0:i.id)==n},t.prototype.show=function(){this._bet&&this._bet.container.classList.remove("none")},t.prototype.showErrorMessage=function(n,t){var r="BS_QuickBet_Error_Message",i=document.getElementById(r);i==null&&(i=Common.Helper.getNode(this.errorMessageContainer(r,t)));i&&(this.insert(n,i),i.classList.remove("none"))},t.prototype.append=function(){var n,t;this._bet&&(n=this._bet.container,this.insert(this._sender,n),this._bet.init(),this.appendTaxInfo(n.querySelector(".detail")),this._stakeField=this.bet.eStake,this._preselect=this._bet.preselect,t=document.getElementById(this._bet.preselectContainerId),t&&t.appendChild(this.preselectList))},t.prototype.appendTaxInfo=function(n){this._taxinfo&&n.appendChild(this._taxinfo)},t.prototype.remove=function(){this._bet&&this._bet.exist&&this._bet.remove()},t.prototype.processResult=function(n){this._bet.processResult(n)},t.prototype.setMessageView=function(n){return this._bet.setMessageView(n)},t.prototype.changeState=function(){this._bet.changeState()},t.prototype.insert=function(n,t){var i=n.parentElement,u=[1,2,3,4],f=!1,r;i?(u.forEach(function(n){i.classList.contains("liveog-"+u[n]+"1")&&(f=!0)}),f?n.after(t):Common.Application.instance.platform==Common.Platform.Smartphone?(r=i.closest(".eventcontainer"),r?r.after(t):i.after(t)):i.after(t)):Common.Debug.write("parent element of offer "+n.innerText+" is not existent!!")},Object.defineProperty(t.prototype,"preselectList",{get:function(){var n=this;return this._preselectList==null?(this._preselectList=document.createElement("ul"),this._args.amountValues&&this._args.amountValues.forEach(function(t){n._preselectList.appendChild(n.listEntry(t))}),this._preselectList):this.resetList()},enumerable:!1,configurable:!0}),t.prototype.listEntry=function(n){var i=this,t=document.createElement("li");return n==this._defaultStake&&t.classList.add("checked"),t.setAttribute("data-stake-value",n.toString()),t.innerHTML="<strong>"+n+"&nbsp;"+Common.Application.instance.currency+'<\/strong><span class="icon checked"><\/span>',t.addEventListener("click",function(){t.parentElement.childNodes.forEach(function(n){n.removeAttribute("class")});t.classList.add("checked");i._stakeField&&(i._stakeField.value=Common.Helper.getFormatedMoney(Number(t.getAttribute("data-stake-value"))),i._bet.setWin());i._preselect&&i._preselect.click()}),t},t.prototype.resetList=function(){var n=this;return this._preselectList.childNodes.forEach(function(t){Number(t.getAttribute("data-stake-value"))==n._defaultStake?t.classList.add("checked"):t.removeAttribute("class")}),this._preselectList},t.prototype.errorMessageContainer=function(n,t){return'<div id="'+n+'" class="expired-message">\n\t\t\t\t\t'+this.errorMessageContent(t)+"\n\t\t\t\t\t"+this.errorMessageButton+"\n\t\t\t\t\t<\/div>"},t.prototype.errorMessageContent=function(n){return'<span class="quick-bet-slip betting-slip message-box error"><label class="icon ico signal" ><\/label><span>'+n+"<\/span > <\/span>"},Object.defineProperty(t.prototype,"errorMessageButton",{get:function(){return'<div class="quick-bet-slip bs-buttons"><button class="button" onclick=\'this.closest("div.expired-message").classList.add("none");\'><span>'+Translation.getTextId("Close")+'<\/span><span class="circle fa fa-spinner fa-spin none"><\/span ><span class="icon arrow-right"><\/span><\/button><\/div>'},enumerable:!1,configurable:!0}),t}();t.BettingSlip=i})(t=n.QuickBet||(n.QuickBet={}))}(Betting||(Betting={})),function(n){var t=function(){function t(){}return t.get=function(t){t===void 0&&(t=!1);switch(Common.Application.instance.platform){case Common.Platform.Smartphone:case Common.Platform.Tablet:return n.Mobile.BettingSlip.instance;default:return n.Desktop.BettingSlip.instance}},t}();n.BettingSlip=t}(Betting||(Betting={})),function(n){var t=function(){function n(n){var t=this;this._elements=n;this._elements.overlay&&this._elements.overlay.addEventListener("click",function(){t.dismiss()});this._elements.stakeEntry&&this._elements.stakeEntry.addEventListener("click",function(n){n.stopPropagation()});this._elements.button.cancel&&this._elements.button.cancel.addEventListener("click",function(){t.cancel()});this._elements.button.dismiss&&this._elements.button.dismiss.addEventListener("click",function(){t.dismiss()});this._elements.preselected.buttons&&this._elements.preselected.buttons.forEach(function(n){n.addEventListener("click",function(){t._numPad.setValue(Number(n.dataset.val));t._numPad.select()})})}return n.prototype.showPredefined=function(n){n?this._elements.preselected.container.removeAttribute("style"):this._elements.preselected.container.style.display="none"},n.prototype.show=function(n){var t=this,i;this._model=n;i=!0;this._numPad=Common.NumPad.instance({inputId:this._elements.inputId,keybordKeys:this._elements.keybordKeys,delegates:{change:function(){Common.Helper.isFunction(t._model.delegates.change)&&(t._model.disablePossibleWin?t._model.delegates.change(t.currentValue()):t._elements.maxWin.innerText=t._model.delegates.change(t.currentValue()))},take:function(){Common.Helper.isFunction(t._model.delegates.take)&&t._model.delegates.take()}}});n.disablePossibleWin&&(this._elements.maxWin.parentElement.style.display="none");this._elements.overlay.style.display="block";this._numPad.setValue(this._model.value);this._numPad.select()},n.prototype.setLabel=function(n){this._elements.numpadLabel&&(this._elements.numpadLabel.innerText=n)},n.prototype.cancel=function(){this.close(!0)},n.prototype.dismiss=function(){this.close(!1)},n.prototype.currentValue=function(){return this._numPad.getValue()},n.prototype.close=function(n){n?this._numPad.setValue(this._model.value):(this._model.target.value=Common.Helper.getFormatedMoney(this.currentValue()),this._numPad.take());this._elements.overlay.removeAttribute("style")},n}();n.StakeEntry=t}(Betting||(Betting={})),function(n){var t;(function(t){var i,r,u;(function(n){n[n.single=0]="single";n[n.mybets=3]="mybets";n[n.betslip=4]="betslip";n[n.cashout=5]="cashout";n[n.live=6]="live";n[n.open=7]="open";n[n.settled=8]="settled"})(i=t.TabType||(t.TabType={})),function(n){n[n.Open=1]="Open";n[n.Settled=15]="Settled"}(r=t.JournalType||(t.JournalType={})),function(t){function v(){return'<div class="abs load"><label class="circle fa-spinner fa-spin" ><\/label><\/div>'}function y(n){n.tabs.forEach(function(n){n.classList.remove("active")});n.contents.forEach(function(n){n.classList.remove("active")})}function e(n,t,i){i.innerHTML=v();new Common.AjaxCall({controller:"Journal"}).execute("GetBetSlipJournalContent",function(n){n.success?i.classList.remove("no-bets-available"):i.classList.add("no-bets-available");n.html.length>0&&(i.innerHTML=n.html)},JSON.stringify({betAccountDataType:n,mode:t}))}function s(n){n.tabs.forEach(function(t){t.addEventListener("click",function(){y(n);var u=document.querySelectorAll("."+t.getAttribute("content"));u.length>0&&(u.forEach(function(n){n&&(t.classList.contains(i[i.cashout])?$(document).trigger("CashoutDisplayed",!0):t.classList.contains(i[i.open])?e(r.Open,0,n):t.classList.contains(i[i.live])?e(r.Open,2,n):t.classList.contains(i[i.settled])&&e(r.Settled,1,n),n.classList.add("active"))}),t.classList.add("active"))})})}function h(n,t){var r=null;return t.forEach(function(t){t.classList.contains(i[n])&&(r=t)}),r}function p(n){switch(n){case i.betslip:return f.bs;case i.mybets:return f.mybets}}function c(){f.main.length>0&&(u.bettingSlip.singleBetCount>0||Common.Application.instance.license.shareaBet?f.main[0].classList.remove("none"):f.main[0].classList.add("none"))}function l(){if(u.accountBalance.element){var n=u.accountBalance.container;u.accountBalance.container=u.accountBalance.element.parentElement;n.append(u.accountBalance.element)}}function o(n,t){var i=h(n,f.main),r=p(n);i&&r&&(i.click(),i=h(t,r),i&&i.click(),u.overlay&&u.overlay.classList.contains("collapsed")&&(l(),u.overlay.classList.remove("collapsed")),u.bettingSlip.isApp||document.body.classList.contains("no-scroll")||document.body.classList.add("no-scroll"))}function a(){c();o(i.betslip,i.single);u.bettingSlip.type=n.Types.HTML;u.bettingSlip.openBetSlip()}function w(n){u.mybets&&(u.mybets.innerHTML=n.toString())}function b(n){f.main=n.tabs;s(n)}function k(n){f.mybets=n.tabs;s(n)}function d(n){u=n;f={main:[],bs:[],mybets:[]};n.btn&&n.btn.addEventListener("click",function(){a()});n.mybets&&n.mybets.parentElement.addEventListener("click",function(){var t=i.open;n.bettingSlip.cashoutCount>0&&(t=i.cashout);c();o(i.mybets,t)});n.idsToRefreshBalance&&n.idsToRefreshBalance.length>0&&(u.accountBalance.element=document.getElementById(n.idsToRefreshBalance[0]))}var f,u;t.setAccountBalanceElement=l;t.activate=o;t.openBetslip=a;t.setOpenBetsCount=w;t.handleMain=b;t.handleMyBets=k;t.init=d}(u=t.Tabs||(t.Tabs={}))})(t=n.Mobile||(n.Mobile={}))}(Betting||(Betting={})),function(n){var t=function(){function n(n){var t=this;this._inputs=[];this._currentWalletId=n.id;this._isLoggedIn=Common.Application.instance.isLoggedIn;this._list=n.container;this._detail=document.getElementById(n.detail);this._displayName=document.getElementById(n.displayName);n.required&&(this._messageRequired=n.required);document.querySelectorAll(n.radio).forEach(function(n){t._inputs.push(n);n.addEventListener("click",function(){var i=Number(n.dataset.id);i!=t._currentWalletId&&(t._currentWalletId=i,t._displayName&&(t._displayName.innerText=n.dataset.name),t.saveWallet(i))})})}return Object.defineProperty(n.prototype,"hasInvalidId",{get:function(){return this._isLoggedIn&&this._currentWalletId<0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"list",{get:function(){return this._list},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"messageRequired",{get:function(){return this._messageRequired||""},enumerable:!1,configurable:!0}),n.prototype.open=function(n){n===void 0&&(n=!1);this._isLoggedIn&&(this._currentWalletId<0||this._currentWalletId>-1&&n)&&this._detail!=null&&this._detail.setAttribute("open","open")},n.prototype.close=function(){this._isLoggedIn&&this._detail&&this._detail.removeAttribute("open")},n.prototype.show=function(){this._isLoggedIn&&this._detail!=null&&this._detail.classList.remove("none")},n.prototype.hide=function(){this._isLoggedIn&&this._detail!=null&&this._detail.classList.add("none")},n.prototype.check=function(){this._detail&&this._list.parentElement!=this._detail&&this._detail.append(this._list)},Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(n){this._disabled=n;this._inputs.forEach(function(t){t.disabled=n})},enumerable:!1,configurable:!0}),n.prototype.saveWallet=function(n){new Common.AjaxCall({controller:"Account"}).execute("SaveWallet",function(){},JSON.stringify({walletId:n}))},n.Dialog=function(n){var t,i;n.checkbox.addEventListener("click",function(){new Common.AjaxCall({controller:"Account"}).execute("HideWalletMessage",function(){},JSON.stringify({hide:n.checkbox.checked}))});t=document.querySelector(n.target);t&&(i=new Tools.Dialog({content:t,cssClass:n.css,title:n.title}),t.classList.remove("none"),i.open())},n.ToolTip=function(n){var t=document.getElementById(n.header);n.dialogValid&&(n.target=n.target.cloneNode(!0),n.target.classList.add("none"),t.parentElement.append(n.target));t.addEventListener("mouseover",function(){n.target.classList.add("tooltip")});t.addEventListener("mouseout",function(){n.target.classList.remove("tooltip")})},n}();n.WalletInfo=t}(Betting||(Betting={})),function(n){var t=function(){function t(){var n=this;this._list=null;this._timeKey=0;this._delay=6e5;this._productId=1;this._onFreebetsLoaded=$.Callbacks();this._ac=new Common.AjaxCall({controller:"BettingSlip"});this._events={};this._args={};this._types={live:"L",main:"M",both:"B",del:"D"};this._timeKey=setInterval(function(){n.load()},this._delay)}return Object.defineProperty(t.prototype,"onLoaded",{get:function(){return this._onFreebetsLoaded},enumerable:!1,configurable:!0}),t.instance=function(n){return n===void 0&&(n=null),this._instance==null&&(this._instance=new t),this._instance},t.prototype.getFreebets=function(n){var t=$.Deferred();return this._list&&!n&&t.resolve(this._list),this.load(n).done(function(n){t.resolve(n.freebetList)}).fail(function(){t.reject()}),t.promise()},Object.defineProperty(t.prototype,"list",{get:function(){return this._list},set:function(n){this._list=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"productId",{set:function(n){this._productId=n},enumerable:!1,configurable:!0}),t.prototype.addEvent=function(n){this._events[n.eventId]==null&&(this._events[n.eventId]=n)},t.prototype.isFreeBet=function(n,t,i,r){var f,u=n,e;switch(n.productId){case 1:e=u.betType!=this._types.live&&t.cloneId!=null&&t.cloneId>0?t.cloneId:t.eventId;f=(u.sports.indexOf(t.kosId)>=0||u.leagueId==t.leagueId||u.eventId==e)&&(u.betType==this._types.live&&t.isLive||u.betType==this._types.main&&!t.isLive||n.betType==this._types.both)&&(u.combiType=="B"||(u.combiType=="S"||u.combiType===undefined)&&!r||u.combiType=="C"&&r)&&u.status.toUpperCase()!=this._types.del&&u.bonusLeft>0;break;case 11:case 15:f=!0}return f&&u.minimumQuote*100<=i},t.prototype.check=function(n,t){var u=!1,r,i;if(this._list!=null&&(r=this._list.slice(0),n!=null))for(i=0;i<r.length;i++)if(this.isFreeBet(r[i],n,t,!1)){this._productId==1&&this.addEvent(n);u=!0;break}return u},t.prototype.recheck=function(n,t){switch(this._productId){case 1:this._events[n]!=null?(this._args.event=this._events[n],this._args.quote=t):(this._args.event=null,this._args.quote=0);case 11:case 15:this.load(!0)}},t.prototype.reject=function(){this._ac.execute("RejectFreeBet",function(n){n!=null&&n.success&&(window.location.href=Common.Application.instance.path)},JSON.stringify({type:n.Types[n.Types.HTML]}))},t.prototype.load=function(n){var t=this;return n===void 0&&(n=!1),this._list=[],this._ac.execute("GetFreeBets",function(n){n!=null&&(t._list=n.freebetList,t._onFreebetsLoaded.fire())},JSON.stringify({reload:n,productId:this._productId}))},t.prototype.getFreeBetModel=function(t,i,r,u,f){f===void 0&&(f=0);var e=new n.FreeBet.Event;return e.cloneId=f,e.kosId=i,e.eventId=t,e.leagueId=r,e.isLive=u,e},t}();n.FreeBets=t}(Betting||(Betting={})),function(n){var t;(function(n){var t=function(){function n(){}return n}();n.Event=t})(t=n.FreeBet||(n.FreeBet={}))}(Betting||(Betting={}));BetAssist=function(){$(document).on("click",".sr-widget",function(){$(".overlaybetassist").show()});$(document).on("click",".sr-bb .sr-ba-button__close",function(){$(".overlaybetassist").hide()});$(document).click(function(n){var t=n.target;$(t).is(".overlaybetassist")&&$(".overlaybetassist").hide()});var n=!1;return{loadWidgetLoaderScript:function(t){n||(n=!0,function(n,t,i,r,u,f,e,o,s){n[u]||(s=n[u]=function(){(n[u].q=n[u].q||[]).push(arguments)},s.l=1*new Date,s.o=f,e=t.createElement(i),o=t.getElementsByTagName(i)[0],e.async=1,e.src=r,e.setAttribute("n",u),o.parentNode.insertBefore(e,o))}(window,document,"script","https://widgets.sir.sportradar.com/c7dd1939865b8cef4491ad76d0e519b8/widgetloader","SIR",{language:t=="sv"?"se":t}))},addWidget:function(n,t){SIR("addWidget","#sr-widget-"+n,"betAssist.button",{matchId:t,market:n,label:" "})},removeWidget:function(n){SIR("removeWidget","#sr-widget-"+n)}}}(),function(n,t){typeof exports=="object"&&typeof module=="object"?module.exports=t():typeof define=="function"&&define.amd?define([],t):typeof exports=="object"?exports.signalR=t():n.signalR=t()}(window,function(){return function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};return t.m=n,t.c=i,t.d=function(n,i,r){t.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:r})},t.r=function(n){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,i){var r,u;if((i&1&&(n=t(n)),i&8)||i&4&&typeof n=="object"&&n&&n.__esModule)return n;if(r=Object.create(null),t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),i&2&&typeof n!="string")for(u in n)t.d(r,u,function(t){return n[t]}.bind(null,u));return r},t.n=function(n){var i=n&&n.__esModule?function(){return n["default"]}:function(){return n};return t.d(i,"a",i),i},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=0)}([function(n,t,i){"use strict";i.r(t);var u=i(1),f=i.n(u),r=i(3);i.d(t,"VERSION",function(){return r.VERSION});i.d(t,"AbortError",function(){return r.AbortError});i.d(t,"HttpError",function(){return r.HttpError});i.d(t,"TimeoutError",function(){return r.TimeoutError});i.d(t,"HttpClient",function(){return r.HttpClient});i.d(t,"HttpResponse",function(){return r.HttpResponse});i.d(t,"DefaultHttpClient",function(){return r.DefaultHttpClient});i.d(t,"HubConnection",function(){return r.HubConnection});i.d(t,"HubConnectionState",function(){return r.HubConnectionState});i.d(t,"HubConnectionBuilder",function(){return r.HubConnectionBuilder});i.d(t,"MessageType",function(){return r.MessageType});i.d(t,"LogLevel",function(){return r.LogLevel});i.d(t,"HttpTransportType",function(){return r.HttpTransportType});i.d(t,"TransferFormat",function(){return r.TransferFormat});i.d(t,"NullLogger",function(){return r.NullLogger});i.d(t,"JsonHubProtocol",function(){return r.JsonHubProtocol});i.d(t,"Subject",function(){return r.Subject});Uint8Array.prototype.indexOf||Object.defineProperty(Uint8Array.prototype,"indexOf",{value:Array.prototype.indexOf,writable:!0});Uint8Array.prototype.slice||Object.defineProperty(Uint8Array.prototype,"slice",{value:function(n,t){return new Uint8Array(Array.prototype.slice.call(this,n,t))},writable:!0});Uint8Array.prototype.forEach||Object.defineProperty(Uint8Array.prototype,"forEach",{value:Array.prototype.forEach,writable:!0})},function(n,t,i){(function(t){var r;(function(t,i){n.exports=i()})(this,function(){"use strict";function kt(n){var t=typeof n;return n!==null&&(t==="object"||t==="function")}function et(n){return typeof n=="function"}function dt(n){d=n}function gt(n){e=n}function ii(){return function(){return process.nextTick(h)}}function ri(){return typeof k!="undefined"?function(){k(h)}:g()}function ui(){var n=0,i=new lt(h),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function fi(){var n=new MessageChannel;return n.port1.onmessage=h,function(){return n.port2.postMessage(0)}}function g(){var n=setTimeout;return function(){return n(h,1)}}function h(){for(var t,i,n=0;n<s;n+=2)t=o[n],i=o[n+1],t(i),o[n]=undefined,o[n+1]=undefined;s=0}function ei(){try{var t=r,n=i(!function(){var n=new Error("Cannot find module 'vertx'");n.code="MODULE_NOT_FOUND";throw n;}());return k=n.runOnLoop||n.runOnContext,ri()}catch(f){return g()}}function tt(n,t){var u=this,i=new this.constructor(c),r,f;return i[v]===undefined&&wt(i),r=u._state,r?(f=arguments[r-1],e(function(){return pt(r,i,f,u._result)})):rt(u,i,n,t),i}function it(n){var i=this,t;return n&&typeof n=="object"&&n.constructor===i?n:(t=new i(c),w(t,n),t)}function c(){}function oi(){return new TypeError("You cannot resolve a promise with itself")}function si(){return new TypeError("A promises callback cannot return that same promise.")}function at(n){try{return n.then}catch(t){return p.error=t,p}}function hi(n,t,i,r){try{n.call(t,i,r)}catch(u){return u}}function ci(n,t,i){e(function(n){var r=!1,e=hi(i,t,function(i){r||(r=!0,t!==i?w(n,i):f(n,i))},function(t){r||(r=!0,u(n,t))},"Settle: "+(n._label||" unknown promise"));!r&&e&&(r=!0,u(n,e))},n)}function li(n,t){t._state===y?f(n,t._result):t._state===a?u(n,t._result):rt(t,undefined,function(t){return w(n,t)},function(t){return u(n,t)})}function vt(n,t,i){t.constructor===n.constructor&&i===tt&&t.constructor.resolve===it?li(n,t):i===p?(u(n,p.error),p.error=null):i===undefined?f(n,t):et(i)?ci(n,t,i):f(n,t)}function w(n,t){n===t?u(n,oi()):kt(t)?vt(n,t,at(t)):f(n,t)}function ai(n){n._onerror&&n._onerror(n._result);ut(n)}function f(n,t){n._state===l&&(n._result=t,n._state=y,n._subscribers.length!==0&&e(ut,n))}function u(n,t){n._state===l&&(n._state=a,n._result=t,e(ai,n))}function rt(n,t,i,r){var u=n._subscribers,f=u.length;n._onerror=null;u[f]=t;u[f+y]=i;u[f+a]=r;f===0&&n._state&&e(ut,n)}function ut(n){var i=n._subscribers,f=n._state,t;if(i.length!==0){var r=void 0,u=void 0,e=n._result;for(t=0;t<i.length;t+=3)r=i[t],u=i[t+f],r?pt(f,r,u,e):u(e);n._subscribers.length=0}}function yt(){this.error=null}function vi(n,t){try{return n(t)}catch(i){return b.error=i,b}}function pt(n,t,i,r){var s=et(i),e=void 0,h=void 0,o=void 0,c=void 0;if(s){if(e=vi(i,r),e===b?(c=!0,h=e.error,e.error=null):o=!0,t===e){u(t,si());return}}else e=r,o=!0;t._state!==l||(s&&o?w(t,e):c?u(t,h):n===y?f(t,e):n===a&&u(t,e))}function yi(n,t){try{t(function(t){w(n,t)},function(t){u(n,t)})}catch(i){u(n,i)}}function pi(){return ft++}function wt(n){n[v]=ft++;n._state=undefined;n._result=undefined;n._subscribers=[]}function wi(){return new Error("Array Methods must be provided an Array")}function wi(){return new Error("Array Methods must be provided an Array")}function bi(n){return new bt(this,n).promise}function ki(n){var t=this;return st(n)?new t(function(i,r){for(var f=n.length,u=0;u<f;u++)t.resolve(n[u]).then(i,r)}):new t(function(n,t){return t(new TypeError("You must pass an array to race."))})}function di(n){var i=this,t=new i(c);return u(t,n),t}function gi(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");}function nr(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");}function tr(){var i=void 0,r,u;if(typeof t!="undefined")i=t;else if(typeof self!="undefined")i=self;else try{i=Function("return this")()}catch(f){throw new Error("polyfill failed because global object is unavailable in this environment");}if(r=i.Promise,r){u=null;try{u=Object.prototype.toString.call(r.resolve())}catch(f){}if(u==="[object Promise]"&&!r.cast)return}i.Promise=n}var ot=void 0,o,nt,v,b,ft,bt,n;ot=Array.isArray?Array.isArray:function(n){return Object.prototype.toString.call(n)==="[object Array]"};var st=ot,s=0,k=void 0,d=void 0,e=function(n,t){o[s]=n;o[s+1]=t;s+=2;s===2&&(d?d(h):nt())};var ht=typeof window!="undefined"?window:undefined,ct=ht||{},lt=ct.MutationObserver||ct.WebKitMutationObserver,ni=typeof self=="undefined"&&typeof process!="undefined"&&{}.toString.call(process)==="[object process]",ti=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";o=new Array(1e3);nt=void 0;nt=ni?ii():lt?ui():ti?fi():ht===undefined&&!0?ei():g();v=Math.random().toString(36).substring(16);var l=void 0,y=1,a=2,p=new yt;return b=new yt,ft=0,bt=function(){function t(n,t){this._instanceConstructor=n;this.promise=new n(c);this.promise[v]||wt(this.promise);st(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),this.length===0?f(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),this._remaining===0&&f(this.promise,this._result))):u(this.promise,wi())}return t.prototype._enumerate=function(n){for(var t=0;this._state===l&&t<n.length;t++)this._eachEntry(n[t],t)},t.prototype._eachEntry=function(t,i){var r=this._instanceConstructor,e=r.resolve,u,f;e===it?(u=at(t),u===tt&&t._state!==l?this._settledAt(t._state,i,t._result):typeof u!="function"?(this._remaining--,this._result[i]=t):r===n?(f=new r(c),vt(f,t,u),this._willSettleAt(f,i)):this._willSettleAt(new r(function(n){return n(t)}),i)):this._willSettleAt(e(t),i)},t.prototype._settledAt=function(n,t,i){var r=this.promise;r._state===l&&(this._remaining--,n===a?u(r,i):this._result[t]=i);this._remaining===0&&f(r,this._result)},t.prototype._willSettleAt=function(n,t){var i=this;rt(n,undefined,function(n){return i._settledAt(y,t,n)},function(n){return i._settledAt(a,t,n)})},t}(),n=function(){function n(t){this[v]=pi();this._result=this._state=undefined;this._subscribers=[];c!==t&&(typeof t!="function"&&gi(),this instanceof n?yi(this,t):nr())}return n.prototype.catch=function(n){return this.then(null,n)},n.prototype.finally=function(n){var t=this,i=t.constructor;return t.then(function(t){return i.resolve(n()).then(function(){return t})},function(t){return i.resolve(n()).then(function(){throw t;})})},n}(),n.prototype.then=tt,n.all=bi,n.race=ki,n.resolve=it,n.reject=di,n._setScheduler=dt,n._setAsap=gt,n._asap=e,n.polyfill=tr,n.Promise=n,n.polyfill(),n})}).call(this,i(2))},function(n){var t=function(){return this}();try{t=t||new Function("return this")()}catch(i){typeof window=="object"&&(t=window)}n.exports=t},function(n,t,i){"use strict";var r,u,o,f,s,h,c,e,l,a,v,y;i.r(t);i.d(t,"VERSION",function(){return y});r=i(4);i.d(t,"AbortError",function(){return r.AbortError});i.d(t,"HttpError",function(){return r.HttpError});i.d(t,"TimeoutError",function(){return r.TimeoutError});u=i(5);i.d(t,"HttpClient",function(){return u.HttpClient});i.d(t,"HttpResponse",function(){return u.HttpResponse});o=i(6);i.d(t,"DefaultHttpClient",function(){return o.DefaultHttpClient});f=i(10);i.d(t,"HubConnection",function(){return f.HubConnection});i.d(t,"HubConnectionState",function(){return f.HubConnectionState});s=i(17);i.d(t,"HubConnectionBuilder",function(){return s.HubConnectionBuilder});h=i(15);i.d(t,"MessageType",function(){return h.MessageType});c=i(9);i.d(t,"LogLevel",function(){return c.LogLevel});e=i(20);i.d(t,"HttpTransportType",function(){return e.HttpTransportType});i.d(t,"TransferFormat",function(){return e.TransferFormat});l=i(14);i.d(t,"NullLogger",function(){return l.NullLogger});a=i(25);i.d(t,"JsonHubProtocol",function(){return a.JsonHubProtocol});v=i(16);i.d(t,"Subject",function(){return v.Subject});y="3.1.0"},function(n,t,i){"use strict";i.r(t);i.d(t,"HttpError",function(){return u});i.d(t,"TimeoutError",function(){return f});i.d(t,"AbortError",function(){return e});var r=undefined&&undefined.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),u=function(n){function t(t,i){var u=this.constructor,r=this,f=u.prototype;return r=n.call(this,t)||this,r.statusCode=i,r.__proto__=f,r}return r(t,n),t}(Error),f=function(n){function t(t){var u=this.constructor,i,r;return t===void 0&&(t="A timeout occurred."),i=this,r=u.prototype,i=n.call(this,t)||this,i.__proto__=r,i}return r(t,n),t}(Error),e=function(n){function t(t){var u=this.constructor,i,r;return t===void 0&&(t="An abort occurred."),i=this,r=u.prototype,i=n.call(this,t)||this,i.__proto__=r,i}return r(t,n),t}(Error)},function(n,t,i){"use strict";i.r(t);i.d(t,"HttpResponse",function(){return u});i.d(t,"HttpClient",function(){return f});var r=undefined&&undefined.__assign||Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},u=function(){function n(n,t,i){this.statusCode=n;this.statusText=t;this.content=i}return n}(),f=function(){function n(){}return n.prototype.get=function(n,t){return this.send(r({},t,{method:"GET",url:n}))},n.prototype.post=function(n,t){return this.send(r({},t,{method:"POST",url:n}))},n.prototype.delete=function(n,t){return this.send(r({},t,{method:"DELETE",url:n}))},n.prototype.getCookieString=function(){return""},n}()},function(n,t,i){"use strict";i.r(t);i.d(t,"DefaultHttpClient",function(){return s});var r=i(4),u=i(5),f=i(7),e=i(8),o=undefined&&undefined.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),s=function(n){function t(t){var i=n.call(this)||this;return i.httpClient=typeof XMLHttpRequest!="undefined"?new e.XhrHttpClient(t):new f.NodeHttpClient(t),i}return o(t,n),t.prototype.send=function(n){return n.abortSignal&&n.abortSignal.aborted?Promise.reject(new r.AbortError):n.method?n.url?this.httpClient.send(n):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t.prototype.getCookieString=function(n){return this.httpClient.getCookieString(n)},t}(u.HttpClient)},function(n,t,i){"use strict";i.r(t);i.d(t,"NodeHttpClient",function(){return f});var r=i(5),u=undefined&&undefined.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),f=function(n){function t(){return n.call(this)||this}return u(t,n),t.prototype.send=function(){return Promise.reject(new Error("If using Node either provide an XmlHttpRequest polyfill or consume the cjs or esm script instead of the browser/signalr.js one."))},t}(r.HttpClient)},function(n,t,i){"use strict";i.r(t);i.d(t,"XhrHttpClient",function(){return o});var r=i(4),u=i(5),f=i(9),e=undefined&&undefined.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),o=function(n){function t(t){var i=n.call(this)||this;return i.logger=t,i}return e(t,n),t.prototype.send=function(n){var t=this;return n.abortSignal&&n.abortSignal.aborted?Promise.reject(new r.AbortError):n.method?n.url?new Promise(function(i,e){var o=new XMLHttpRequest,s;o.open(n.method,n.url,!0);o.withCredentials=!0;o.setRequestHeader("X-Requested-With","XMLHttpRequest");o.setRequestHeader("Content-Type","text/plain;charset=UTF-8");s=n.headers;s&&Object.keys(s).forEach(function(n){o.setRequestHeader(n,s[n])});n.responseType&&(o.responseType=n.responseType);n.abortSignal&&(n.abortSignal.onabort=function(){o.abort();e(new r.AbortError)});n.timeout&&(o.timeout=n.timeout);o.onload=function(){n.abortSignal&&(n.abortSignal.onabort=null);o.status>=200&&o.status<300?i(new u.HttpResponse(o.status,o.statusText,o.response||o.responseText)):e(new r.HttpError(o.statusText,o.status))};o.onerror=function(){t.logger.log(f.LogLevel.Warning,"Error from HTTP request. "+o.status+": "+o.statusText+".");e(new r.HttpError(o.statusText,o.status))};o.ontimeout=function(){t.logger.log(f.LogLevel.Warning,"Timeout from HTTP request.");e(new r.TimeoutError)};o.send(n.content||"")}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t}(u.HttpClient)},function(n,t,i){"use strict";i.r(t);i.d(t,"LogLevel",function(){return r});var r;(function(n){n[n.Trace=0]="Trace";n[n.Debug=1]="Debug";n[n.Information=2]="Information";n[n.Warning=3]="Warning";n[n.Error=4]="Error";n[n.Critical=5]="Critical";n[n.None=6]="None"})(r||(r={}))},function(n,t,i){"use strict";var h;i.r(t);i.d(t,"HubConnectionState",function(){return u});i.d(t,"HubConnection",function(){return h});var c=i(11),f=i(15),r=i(9),l=i(16),s=i(13),e=undefined&&undefined.__awaiter||function(n,t,i,r){return new(i||(i=Promise))(function(u,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?u(n.value):new i(function(t){t(n.value)}).then(o,s)}e((r=r.apply(n,t||[])).next())})},o=undefined&&undefined.__generator||function(n,t){function o(n){return function(t){return s([n,t])}}function s(e){if(f)throw new TypeError("Generator is already executing.");while(r)try{if(f=1,u&&(i=e[0]&2?u["return"]:e[0]?u["throw"]||((i=u["return"])&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;(u=0,i)&&(e=[e[0]&2,i.value]);switch(e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(e[0]===6||e[0]===2)){r=0;continue}if(e[0]===3&&(!i||e[1]>i[0]&&e[1]<i[3])){r.label=e[1];break}if(e[0]===6&&r.label<i[1]){r.label=i[1];i=e;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(e);break}i[2]&&r.ops.pop();r.trys.pop();continue}e=t.call(n,r)}catch(o){e=[6,o];u=0}finally{f=i=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},f,u,i,e;return e={next:o(0),"throw":o(1),"return":o(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e},a=3e4,v=15e3,u;(function(n){n.Disconnected="Disconnected";n.Connecting="Connecting";n.Connected="Connected";n.Disconnecting="Disconnecting";n.Reconnecting="Reconnecting"})(u||(u={}));h=function(){function n(n,t,i,r){var e=this;s.Arg.isRequired(n,"connection");s.Arg.isRequired(t,"logger");s.Arg.isRequired(i,"protocol");this.serverTimeoutInMilliseconds=a;this.keepAliveIntervalInMilliseconds=v;this.logger=t;this.protocol=i;this.connection=n;this.reconnectPolicy=r;this.handshakeProtocol=new c.HandshakeProtocol;this.connection.onreceive=function(n){return e.processIncomingData(n)};this.connection.onclose=function(n){return e.connectionClosed(n)};this.callbacks={};this.methods={};this.closedCallbacks=[];this.reconnectingCallbacks=[];this.reconnectedCallbacks=[];this.invocationId=0;this.receivedHandshakeResponse=!1;this.connectionState=u.Disconnected;this.connectionStarted=!1;this.cachedPingMessage=this.protocol.writeMessage({type:f.MessageType.Ping})}return n.create=function(t,i,r,u){return new n(t,i,r,u)},Object.defineProperty(n.prototype,"state",{get:function(){return this.connectionState},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"connectionId",{get:function(){return this.connection?this.connection.connectionId||null:null},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"baseUrl",{get:function(){return this.connection.baseUrl||""},set:function(n){if(this.connectionState!==u.Disconnected&&this.connectionState!==u.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!n)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=n},enumerable:!0,configurable:!0}),n.prototype.start=function(){return this.startPromise=this.startWithStateTransitions(),this.startPromise},n.prototype.startWithStateTransitions=function(){return e(this,void 0,void 0,function(){var n;return o(this,function(t){switch(t.label){case 0:if(this.connectionState!==u.Disconnected)return[2,Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."))];this.connectionState=u.Connecting;this.logger.log(r.LogLevel.Debug,"Starting HubConnection.");t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.startInternal()];case 2:return t.sent(),this.connectionState=u.Connected,this.connectionStarted=!0,this.logger.log(r.LogLevel.Debug,"HubConnection connected successfully."),[3,4];case 3:return n=t.sent(),this.connectionState=u.Disconnected,this.logger.log(r.LogLevel.Debug,"HubConnection failed to start successfully because of error '"+n+"'."),[2,Promise.reject(n)];case 4:return[2]}})})},n.prototype.startInternal=function(){return e(this,void 0,void 0,function(){var t,i,n,u=this;return o(this,function(f){switch(f.label){case 0:return this.stopDuringStartError=undefined,this.receivedHandshakeResponse=!1,t=new Promise(function(n,t){u.handshakeResolver=n;u.handshakeRejecter=t}),[4,this.connection.start(this.protocol.transferFormat)];case 1:f.sent();f.label=2;case 2:return f.trys.push([2,5,,7]),i={protocol:this.protocol.name,version:this.protocol.version},this.logger.log(r.LogLevel.Debug,"Sending handshake request."),[4,this.sendMessage(this.handshakeProtocol.writeHandshakeRequest(i))];case 3:return f.sent(),this.logger.log(r.LogLevel.Information,"Using HubProtocol '"+this.protocol.name+"'."),this.cleanupTimeout(),this.resetTimeoutPeriod(),this.resetKeepAliveInterval(),[4,t];case 4:if(f.sent(),this.stopDuringStartError)throw this.stopDuringStartError;return[3,7];case 5:return n=f.sent(),this.logger.log(r.LogLevel.Debug,"Hub handshake failed with error '"+n+"' during start(). Stopping HubConnection."),this.cleanupTimeout(),this.cleanupPingTimer(),[4,this.connection.stop(n)];case 6:f.sent();throw n;case 7:return[2]}})})},n.prototype.stop=function(){return e(this,void 0,void 0,function(){var n,t;return o(this,function(i){switch(i.label){case 0:return n=this.startPromise,this.stopPromise=this.stopInternal(),[4,this.stopPromise];case 1:i.sent();i.label=2;case 2:return i.trys.push([2,4,,5]),[4,n];case 3:return i.sent(),[3,5];case 4:return t=i.sent(),[3,5];case 5:return[2]}})})},n.prototype.stopInternal=function(n){return this.connectionState===u.Disconnected?(this.logger.log(r.LogLevel.Debug,"Call to HubConnection.stop("+n+") ignored because it is already in the disconnected state."),Promise.resolve()):this.connectionState===u.Disconnecting?(this.logger.log(r.LogLevel.Debug,"Call to HttpConnection.stop("+n+") ignored because the connection is already in the disconnecting state."),this.stopPromise):(this.connectionState=u.Disconnecting,this.logger.log(r.LogLevel.Debug,"Stopping HubConnection."),this.reconnectDelayHandle)?(this.logger.log(r.LogLevel.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this.reconnectDelayHandle),this.reconnectDelayHandle=undefined,this.completeClose(),Promise.resolve()):(this.cleanupTimeout(),this.cleanupPingTimer(),this.stopDuringStartError=n||new Error("The connection was stopped before the hub handshake could complete."),this.connection.stop(n))},n.prototype.stream=function(n){for(var r=this,e=[],u=1;u<arguments.length;u++)e[u-1]=arguments[u];var s=this.replaceStreamingParams(e),h=s[0],c=s[1],i=this.createStreamInvocation(n,e,c),o,t=new l.Subject;return t.cancelCallback=function(){var n=r.createCancelInvocation(i.invocationId);return delete r.callbacks[i.invocationId],o.then(function(){return r.sendWithProtocol(n)})},this.callbacks[i.invocationId]=function(n,i){if(i){t.error(i);return}n&&(n.type===f.MessageType.Completion?n.error?t.error(new Error(n.error)):t.complete():t.next(n.item))},o=this.sendWithProtocol(i).catch(function(n){t.error(n);delete r.callbacks[i.invocationId]}),this.launchStreams(h,o),t},n.prototype.sendMessage=function(n){return this.resetKeepAliveInterval(),this.connection.send(n)},n.prototype.sendWithProtocol=function(n){return this.sendMessage(this.protocol.writeMessage(n))},n.prototype.send=function(n){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];var r=this.replaceStreamingParams(i),f=r[0],e=r[1],u=this.sendWithProtocol(this.createInvocation(n,i,!0,e));return this.launchStreams(f,u),u},n.prototype.invoke=function(n){for(var t=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var e=this.replaceStreamingParams(r),o=e[0],s=e[1],u=this.createInvocation(n,r,!1,s);return new Promise(function(n,i){t.callbacks[u.invocationId]=function(t,r){if(r){i(r);return}t&&(t.type===f.MessageType.Completion?t.error?i(new Error(t.error)):n(t.result):i(new Error("Unexpected message type: "+t.type)))};var r=t.sendWithProtocol(u).catch(function(n){i(n);delete t.callbacks[u.invocationId]});t.launchStreams(o,r)})},n.prototype.on=function(n,t){n&&t&&(n=n.toLowerCase(),this.methods[n]||(this.methods[n]=[]),this.methods[n].indexOf(t)===-1)&&this.methods[n].push(t)},n.prototype.off=function(n,t){var i,r;n&&(n=n.toLowerCase(),i=this.methods[n],i)&&(t?(r=i.indexOf(t),r!==-1&&(i.splice(r,1),i.length===0&&delete this.methods[n])):delete this.methods[n])},n.prototype.onclose=function(n){n&&this.closedCallbacks.push(n)},n.prototype.onreconnecting=function(n){n&&this.reconnectingCallbacks.push(n)},n.prototype.onreconnected=function(n){n&&this.reconnectedCallbacks.push(n)},n.prototype.processIncomingData=function(n){var s,i,u,t,e,o;if(this.cleanupTimeout(),this.receivedHandshakeResponse||(n=this.processHandshakeResponse(n),this.receivedHandshakeResponse=!0),n)for(s=this.protocol.parseMessages(n,this.logger),i=0,u=s;i<u.length;i++){t=u[i];switch(t.type){case f.MessageType.Invocation:this.invokeClientMethod(t);break;case f.MessageType.StreamItem:case f.MessageType.Completion:e=this.callbacks[t.invocationId];e&&(t.type===f.MessageType.Completion&&delete this.callbacks[t.invocationId],e(t));break;case f.MessageType.Ping:break;case f.MessageType.Close:this.logger.log(r.LogLevel.Information,"Close message received from server.");o=t.error?new Error("Server returned an error on close: "+t.error):undefined;t.allowReconnect===!0?this.connection.stop(o):this.stopPromise=this.stopInternal(o);break;default:this.logger.log(r.LogLevel.Warning,"Invalid message type: "+t.type+".")}}this.resetTimeoutPeriod()},n.prototype.processHandshakeResponse=function(n){var u,f,e,t,i;try{u=this.handshakeProtocol.parseHandshakeResponse(n);e=u[0];f=u[1]}catch(o){t="Error parsing handshake response: "+o;this.logger.log(r.LogLevel.Error,t);i=new Error(t);this.handshakeRejecter(i);throw i;}if(f.error){t="Server returned handshake error: "+f.error;this.logger.log(r.LogLevel.Error,t);i=new Error(t);this.handshakeRejecter(i);throw i;}else this.logger.log(r.LogLevel.Debug,"Server handshake complete.");return this.handshakeResolver(),e},n.prototype.resetKeepAliveInterval=function(){var n=this;this.cleanupPingTimer();this.pingServerHandle=setTimeout(function(){return e(n,void 0,void 0,function(){var n;return o(this,function(t){switch(t.label){case 0:if(!(this.connectionState===u.Connected))return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.sendMessage(this.cachedPingMessage)];case 2:return t.sent(),[3,4];case 3:return n=t.sent(),this.cleanupPingTimer(),[3,4];case 4:return[2]}})})},this.keepAliveIntervalInMilliseconds)},n.prototype.resetTimeoutPeriod=function(){var n=this;this.connection.features&&this.connection.features.inherentKeepAlive||(this.timeoutHandle=setTimeout(function(){return n.serverTimeout()},this.serverTimeoutInMilliseconds))},n.prototype.serverTimeout=function(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))},n.prototype.invokeClientMethod=function(n){var u=this,i=this.methods[n.target.toLowerCase()],t;if(i){try{i.forEach(function(t){return t.apply(u,n.arguments)})}catch(f){this.logger.log(r.LogLevel.Error,"A callback for the method "+n.target.toLowerCase()+" threw error '"+f+"'.")}n.invocationId&&(t="Server requested a response, which is not supported in this version of the client.",this.logger.log(r.LogLevel.Error,t),this.stopPromise=this.stopInternal(new Error(t)))}else this.logger.log(r.LogLevel.Warning,"No client method with the name '"+n.target+"' found.")},n.prototype.connectionClosed=function(n){this.logger.log(r.LogLevel.Debug,"HubConnection.connectionClosed("+n+") called while in state "+this.connectionState+".");this.stopDuringStartError=this.stopDuringStartError||n||new Error("The underlying connection was closed before the hub handshake could complete.");this.handshakeResolver&&this.handshakeResolver();this.cancelCallbacksWithError(n||new Error("Invocation canceled due to the underlying connection being closed."));this.cleanupTimeout();this.cleanupPingTimer();this.connectionState===u.Disconnecting?this.completeClose(n):this.connectionState===u.Connected&&this.reconnectPolicy?this.reconnect(n):this.connectionState===u.Connected&&this.completeClose(n)},n.prototype.completeClose=function(n){var t=this;if(this.connectionStarted){this.connectionState=u.Disconnected;this.connectionStarted=!1;try{this.closedCallbacks.forEach(function(i){return i.apply(t,[n])})}catch(i){this.logger.log(r.LogLevel.Error,"An onclose callback called with error '"+n+"' threw error '"+i+"'.")}}},n.prototype.reconnect=function(n){return e(this,void 0,void 0,function(){var h,i,e,t,f,s=this;return o(this,function(o){switch(o.label){case 0:if(h=Date.now(),i=0,e=n!==undefined?n:new Error("Attempting to reconnect due to a unknown error."),t=this.getNextRetryDelay(i++,0,e),t===null)return this.logger.log(r.LogLevel.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this.completeClose(n),[2];if(this.connectionState=u.Reconnecting,n?this.logger.log(r.LogLevel.Information,"Connection reconnecting because of error '"+n+"'."):this.logger.log(r.LogLevel.Information,"Connection reconnecting."),this.onreconnecting){try{this.reconnectingCallbacks.forEach(function(t){return t.apply(s,[n])})}catch(c){this.logger.log(r.LogLevel.Error,"An onreconnecting callback called with error '"+n+"' threw error '"+c+"'.")}if(this.connectionState!==u.Reconnecting)return this.logger.log(r.LogLevel.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting."),[2]}o.label=1;case 1:return(t!==null)?(this.logger.log(r.LogLevel.Information,"Reconnect attempt number "+i+" will start in "+t+" ms."),[4,new Promise(function(n){s.reconnectDelayHandle=setTimeout(n,t)})]):[3,7];case 2:if(o.sent(),this.reconnectDelayHandle=undefined,this.connectionState!==u.Reconnecting)return this.logger.log(r.LogLevel.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting."),[2];o.label=3;case 3:return o.trys.push([3,5,,6]),[4,this.startInternal()];case 4:if(o.sent(),this.connectionState=u.Connected,this.logger.log(r.LogLevel.Information,"HubConnection reconnected successfully."),this.onreconnected)try{this.reconnectedCallbacks.forEach(function(n){return n.apply(s,[s.connection.connectionId])})}catch(c){this.logger.log(r.LogLevel.Error,"An onreconnected callback called with connectionId '"+this.connection.connectionId+"; threw error '"+c+"'.")}return[2];case 5:return(f=o.sent(),this.logger.log(r.LogLevel.Information,"Reconnect attempt failed because of error '"+f+"'."),this.connectionState!==u.Reconnecting)?(this.logger.log(r.LogLevel.Debug,"Connection left the reconnecting state during reconnect attempt. Done reconnecting."),[2]):(e=f instanceof Error?f:new Error(f.toString()),t=this.getNextRetryDelay(i++,Date.now()-h,e),[3,6]);case 6:return[3,1];case 7:return this.logger.log(r.LogLevel.Information,"Reconnect retries have been exhausted after "+(Date.now()-h)+" ms and "+i+" failed attempts. Connection disconnecting."),this.completeClose(),[2]}})})},n.prototype.getNextRetryDelay=function(n,t,i){try{return this.reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:n,retryReason:i})}catch(u){return this.logger.log(r.LogLevel.Error,"IRetryPolicy.nextRetryDelayInMilliseconds("+n+", "+t+") threw error '"+u+"'."),null}},n.prototype.cancelCallbacksWithError=function(n){var t=this.callbacks;this.callbacks={};Object.keys(t).forEach(function(i){var r=t[i];r(null,n)})},n.prototype.cleanupPingTimer=function(){this.pingServerHandle&&clearTimeout(this.pingServerHandle)},n.prototype.cleanupTimeout=function(){this.timeoutHandle&&clearTimeout(this.timeoutHandle)},n.prototype.createInvocation=function(n,t,i,r){if(i)return{arguments:t,streamIds:r,target:n,type:f.MessageType.Invocation};var u=this.invocationId;return this.invocationId++,{arguments:t,invocationId:u.toString(),streamIds:r,target:n,type:f.MessageType.Invocation}},n.prototype.launchStreams=function(n,t){var i=this,r,u;if(n.length!==0){t||(t=Promise.resolve());r=function(r){n[r].subscribe({complete:function(){t=t.then(function(){return i.sendWithProtocol(i.createCompletionMessage(r))})},error:function(n){var u;u=n instanceof Error?n.message:n&&n.toString?n.toString():"Unknown error";t=t.then(function(){return i.sendWithProtocol(i.createCompletionMessage(r,u))})},next:function(n){t=t.then(function(){return i.sendWithProtocol(i.createStreamItemMessage(r,n))})}})};for(u in n)r(u)}},n.prototype.replaceStreamingParams=function(n){for(var i,r,u=[],f=[],t=0;t<n.length;t++)i=n[t],this.isObservable(i)&&(r=this.invocationId,this.invocationId++,u[r]=i,f.push(r.toString()),n.splice(t,1));return[u,f]},n.prototype.isObservable=function(n){return n&&n.subscribe&&typeof n.subscribe=="function"},n.prototype.createStreamInvocation=function(n,t,i){var r=this.invocationId;return this.invocationId++,{arguments:t,invocationId:r.toString(),streamIds:i,target:n,type:f.MessageType.StreamInvocation}},n.prototype.createCancelInvocation=function(n){return{invocationId:n,type:f.MessageType.CancelInvocation}},n.prototype.createStreamItemMessage=function(n,t){return{invocationId:n,item:t,type:f.MessageType.StreamItem}},n.prototype.createCompletionMessage=function(n,t,i){return t?{error:t,invocationId:n,type:f.MessageType.Completion}:{invocationId:n,result:i,type:f.MessageType.Completion}},n}()},function(n,t,i){"use strict";i.r(t);i.d(t,"HandshakeProtocol",function(){return f});var r=i(12),u=i(13),f=function(){function n(){}return n.prototype.writeHandshakeRequest=function(n){return r.TextMessageFormat.write(JSON.stringify(n))},n.prototype.parseHandshakeResponse=function(n){var c,o,s,f,e,i,t,l,h;if(Object(u.isArrayBuffer)(n)||typeof Buffer!="undefined"&&n instanceof Buffer){if(f=new Uint8Array(n),i=f.indexOf(r.TextMessageFormat.RecordSeparatorCode),i===-1)throw new Error("Message is incomplete.");t=i+1;o=String.fromCharCode.apply(null,f.slice(0,t));s=f.byteLength>t?f.slice(t).buffer:null}else{if(e=n,i=e.indexOf(r.TextMessageFormat.RecordSeparator),i===-1)throw new Error("Message is incomplete.");t=i+1;o=e.substring(0,t);s=e.length>t?e.substring(t):null}if(l=r.TextMessageFormat.parse(o),h=JSON.parse(l[0]),h.type)throw new Error("Expected a handshake response from the server.");return c=h,[s,c]},n}()},function(n,t,i){"use strict";i.r(t);i.d(t,"TextMessageFormat",function(){return r});var r=function(){function n(){}return n.write=function(t){return""+t+n.RecordSeparator},n.parse=function(t){if(t[t.length-1]!==n.RecordSeparator)throw new Error("Message is incomplete.");var i=t.split(n.RecordSeparator);return i.pop(),i},n.RecordSeparatorCode=30,n.RecordSeparator=String.fromCharCode(n.RecordSeparatorCode),n}()},function(n,t,i){"use strict";function e(n,t){var i="";return f(n)?(i="Binary data of length "+n.byteLength,t&&(i+=". Content: '"+o(n)+"'")):typeof n=="string"&&(i="String data of length "+n.length,t&&(i+=". Content: '"+n+"'")),i}function o(n){var i=new Uint8Array(n),t="";return i.forEach(function(n){var i=n<16?"0":"";t+="0x"+i+n.toString(16)+" "}),t.substr(0,t.length-1)}function f(n){return n&&typeof ArrayBuffer!="undefined"&&(n instanceof ArrayBuffer||n.constructor&&n.constructor.name==="ArrayBuffer")}function y(n,t,i,u,o,s,h){return c(this,void 0,void 0,function(){var c,v,a,y,p;return l(this,function(l){switch(l.label){case 0:return o?[4,o()]:[3,2];case 1:a=l.sent();a&&(v=(c={},c.Authorization="Bearer "+a,c));l.label=2;case 2:return n.log(r.LogLevel.Trace,"("+t+" transport) sending data. "+e(s,h)+"."),y=f(s)?"arraybuffer":"text",[4,i.post(u,{content:s,headers:v,responseType:y})];case 3:return p=l.sent(),n.log(r.LogLevel.Trace,"("+t+" transport) request complete. Response status: "+p.statusCode+"."),[2]}})})}function p(n){return n===undefined?new u(r.LogLevel.Information):n===null?h.NullLogger.instance:n.log?n:new u(n)}var s,u;i.r(t);i.d(t,"Arg",function(){return a});i.d(t,"Platform",function(){return v});i.d(t,"getDataDetail",function(){return e});i.d(t,"formatArrayBuffer",function(){return o});i.d(t,"isArrayBuffer",function(){return f});i.d(t,"sendMessage",function(){return y});i.d(t,"createLogger",function(){return p});i.d(t,"SubjectSubscription",function(){return s});i.d(t,"ConsoleLogger",function(){return u});var r=i(9),h=i(14),c=undefined&&undefined.__awaiter||function(n,t,i,r){return new(i||(i=Promise))(function(u,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?u(n.value):new i(function(t){t(n.value)}).then(o,s)}e((r=r.apply(n,t||[])).next())})},l=undefined&&undefined.__generator||function(n,t){function o(n){return function(t){return s([n,t])}}function s(e){if(f)throw new TypeError("Generator is already executing.");while(r)try{if(f=1,u&&(i=e[0]&2?u["return"]:e[0]?u["throw"]||((i=u["return"])&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;(u=0,i)&&(e=[e[0]&2,i.value]);switch(e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(e[0]===6||e[0]===2)){r=0;continue}if(e[0]===3&&(!i||e[1]>i[0]&&e[1]<i[3])){r.label=e[1];break}if(e[0]===6&&r.label<i[1]){r.label=i[1];i=e;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(e);break}i[2]&&r.ops.pop();r.trys.pop();continue}e=t.call(n,r)}catch(o){e=[6,o];u=0}finally{f=i=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},f,u,i,e;return e={next:o(0),"throw":o(1),"return":o(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e},a=function(){function n(){}return n.isRequired=function(n,t){if(n===null||n===undefined)throw new Error("The '"+t+"' argument is required.");},n.isIn=function(n,t,i){if(!(n in t))throw new Error("Unknown "+i+" value: "+n+".");},n}(),v=function(){function n(){}return Object.defineProperty(n,"isBrowser",{get:function(){return typeof window=="object"},enumerable:!0,configurable:!0}),Object.defineProperty(n,"isWebWorker",{get:function(){return typeof self=="object"&&"importScripts"in self},enumerable:!0,configurable:!0}),Object.defineProperty(n,"isNode",{get:function(){return!this.isBrowser&&!this.isWebWorker},enumerable:!0,configurable:!0}),n}();s=function(){function n(n,t){this.subject=n;this.observer=t}return n.prototype.dispose=function(){var n=this.subject.observers.indexOf(this.observer);n>-1&&this.subject.observers.splice(n,1);this.subject.observers.length===0&&this.subject.cancelCallback&&this.subject.cancelCallback().catch(function(){})},n}();u=function(){function n(n){this.minimumLogLevel=n;this.outputConsole=console}return n.prototype.log=function(n,t){if(n>=this.minimumLogLevel)switch(n){case r.LogLevel.Critical:case r.LogLevel.Error:this.outputConsole.error("["+(new Date).toISOString()+"] "+r.LogLevel[n]+": "+t);break;case r.LogLevel.Warning:this.outputConsole.warn("["+(new Date).toISOString()+"] "+r.LogLevel[n]+": "+t);break;case r.LogLevel.Information:this.outputConsole.info("["+(new Date).toISOString()+"] "+r.LogLevel[n]+": "+t);break;default:this.outputConsole.log("["+(new Date).toISOString()+"] "+r.LogLevel[n]+": "+t)}},n}()},function(n,t,i){"use strict";i.r(t);i.d(t,"NullLogger",function(){return r});var r=function(){function n(){}return n.prototype.log=function(){},n.instance=new n,n}()},function(n,t,i){"use strict";i.r(t);i.d(t,"MessageType",function(){return r});var r;(function(n){n[n.Invocation=1]="Invocation";n[n.StreamItem=2]="StreamItem";n[n.Completion=3]="Completion";n[n.StreamInvocation=4]="StreamInvocation";n[n.CancelInvocation=5]="CancelInvocation";n[n.Ping=6]="Ping";n[n.Close=7]="Close"})(r||(r={}))},function(n,t,i){"use strict";i.r(t);i.d(t,"Subject",function(){return u});var r=i(13),u=function(){function n(){this.observers=[]}return n.prototype.next=function(n){for(var r,t=0,i=this.observers;t<i.length;t++)r=i[t],r.next(n)},n.prototype.error=function(n){for(var r,t=0,i=this.observers;t<i.length;t++)r=i[t],r.error&&r.error(n)},n.prototype.complete=function(){for(var i,n=0,t=this.observers;n<t.length;n++)i=t[n],i.complete&&i.complete()},n.prototype.subscribe=function(n){return this.observers.push(n),new r.SubjectSubscription(this,n)},n}()},function(n,t,i){"use strict";function v(n){var t=a[n.toLowerCase()];if(typeof t!="undefined")return t;throw new Error("Unknown log level: "+n);}function y(n){return n.log!==undefined}var o;i.r(t);i.d(t,"HubConnectionBuilder",function(){return o});var f=i(18),s=i(19),h=i(10),r=i(9),c=i(25),l=i(14),u=i(13),e=undefined&&undefined.__assign||Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},a={trace:r.LogLevel.Trace,debug:r.LogLevel.Debug,info:r.LogLevel.Information,information:r.LogLevel.Information,warn:r.LogLevel.Warning,warning:r.LogLevel.Warning,error:r.LogLevel.Error,critical:r.LogLevel.Critical,none:r.LogLevel.None};o=function(){function n(){}return n.prototype.configureLogging=function(n){if(u.Arg.isRequired(n,"logging"),y(n))this.logger=n;else if(typeof n=="string"){var t=v(n);this.logger=new u.ConsoleLogger(t)}else this.logger=new u.ConsoleLogger(n);return this},n.prototype.withUrl=function(n,t){return u.Arg.isRequired(n,"url"),this.url=n,this.httpConnectionOptions=typeof t=="object"?e({},this.httpConnectionOptions,t):e({},this.httpConnectionOptions,{transport:t}),this},n.prototype.withHubProtocol=function(n){return u.Arg.isRequired(n,"protocol"),this.protocol=n,this},n.prototype.withAutomaticReconnect=function(n){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return this.reconnectPolicy=n?Array.isArray(n)?new f.DefaultReconnectPolicy(n):n:new f.DefaultReconnectPolicy,this},n.prototype.build=function(){var n=this.httpConnectionOptions||{},t;if(n.logger===undefined&&(n.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");return t=new s.HttpConnection(this.url,n),h.HubConnection.create(t,this.logger||l.NullLogger.instance,this.protocol||new c.JsonHubProtocol,this.reconnectPolicy)},n}()},function(n,t,i){"use strict";i.r(t);i.d(t,"DefaultReconnectPolicy",function(){return u});var r=[0,2e3,1e4,3e4,null],u=function(){function n(n){this.retryDelays=n!==undefined?n.concat([null]):r}return n.prototype.nextRetryDelayInMilliseconds=function(n){return this.retryDelays[n.previousRetryCount]},n}()},function(n,t,i){"use strict";function d(n,t){return!n||(t&n)!=0}var l,p,a,s;i.r(t);i.d(t,"HttpConnection",function(){return p});i.d(t,"TransportSendQueue",function(){return a});var w=i(6),r=i(9),u=i(20),v=i(21),b=i(23),f=i(13),k=i(24),o=undefined&&undefined.__awaiter||function(n,t,i,r){return new(i||(i=Promise))(function(u,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?u(n.value):new i(function(t){t(n.value)}).then(o,s)}e((r=r.apply(n,t||[])).next())})},e=undefined&&undefined.__generator||function(n,t){function o(n){return function(t){return s([n,t])}}function s(e){if(f)throw new TypeError("Generator is already executing.");while(r)try{if(f=1,u&&(i=e[0]&2?u["return"]:e[0]?u["throw"]||((i=u["return"])&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;(u=0,i)&&(e=[e[0]&2,i.value]);switch(e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(e[0]===6||e[0]===2)){r=0;continue}if(e[0]===3&&(!i||e[1]>i[0]&&e[1]<i[3])){r.label=e[1];break}if(e[0]===6&&r.label<i[1]){r.label=i[1];i=e;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(e);break}i[2]&&r.ops.pop();r.trys.pop();continue}e=t.call(n,r)}catch(o){e=[6,o];u=0}finally{f=i=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},f,u,i,e;return e={next:o(0),"throw":o(1),"return":o(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e},y=100,h=null,c=null;f.Platform.isNode&&!0&&(l=require,h=l("ws"),c=l("eventsource"));p=function(){function n(n,t){t===void 0&&(t={});this.features={};this.negotiateVersion=1;f.Arg.isRequired(n,"url");this.logger=Object(f.createLogger)(t.logger);this.baseUrl=this.resolveUrl(n);t=t||{};t.logMessageContent=t.logMessageContent||!1;f.Platform.isNode||typeof WebSocket=="undefined"||t.WebSocket?f.Platform.isNode&&!t.WebSocket&&h&&(t.WebSocket=h):t.WebSocket=WebSocket;f.Platform.isNode||typeof EventSource=="undefined"||t.EventSource?f.Platform.isNode&&!t.EventSource&&typeof c!="undefined"&&(t.EventSource=c):t.EventSource=EventSource;this.httpClient=t.httpClient||new w.DefaultHttpClient(this.logger);this.connectionState="Disconnected";this.connectionStarted=!1;this.options=t;this.onreceive=null;this.onclose=null}return n.prototype.start=function(n){return o(this,void 0,void 0,function(){var t;return e(this,function(i){switch(i.label){case 0:return(n=n||u.TransferFormat.Binary,f.Arg.isIn(n,u.TransferFormat,"transferFormat"),this.logger.log(r.LogLevel.Debug,"Starting connection with transfer format '"+u.TransferFormat[n]+"'."),this.connectionState!=="Disconnected")?[2,Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."))]:(this.connectionState="Connecting ",this.startInternalPromise=this.startInternal(n),[4,this.startInternalPromise]);case 1:return(i.sent(),!(this.connectionState==="Disconnecting"))?[3,3]:(t="Failed to start the HttpConnection before stop() was called.",this.logger.log(r.LogLevel.Error,t),[4,this.stopPromise]);case 2:return i.sent(),[2,Promise.reject(new Error(t))];case 3:if(this.connectionState!=="Connected")return t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!",this.logger.log(r.LogLevel.Error,t),[2,Promise.reject(new Error(t))];i.label=4;case 4:return this.connectionStarted=!0,[2]}})})},n.prototype.send=function(n){return this.connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this.sendQueue||(this.sendQueue=new a(this.transport)),this.sendQueue.send(n))},n.prototype.stop=function(n){return o(this,void 0,void 0,function(){var t=this;return e(this,function(i){switch(i.label){case 0:return this.connectionState==="Disconnected"?(this.logger.log(r.LogLevel.Debug,"Call to HttpConnection.stop("+n+") ignored because the connection is already in the disconnected state."),[2,Promise.resolve()]):this.connectionState==="Disconnecting"?(this.logger.log(r.LogLevel.Debug,"Call to HttpConnection.stop("+n+") ignored because the connection is already in the disconnecting state."),[2,this.stopPromise]):(this.connectionState="Disconnecting",this.stopPromise=new Promise(function(n){t.stopPromiseResolver=n}),[4,this.stopInternal(n)]);case 1:return i.sent(),[4,this.stopPromise];case 2:return i.sent(),[2]}})})},n.prototype.stopInternal=function(n){return o(this,void 0,void 0,function(){var u,t,i;return e(this,function(f){switch(f.label){case 0:this.stopError=n;f.label=1;case 1:return f.trys.push([1,3,,4]),[4,this.startInternalPromise];case 2:return f.sent(),[3,4];case 3:return u=f.sent(),[3,4];case 4:if(!this.sendQueue)return[3,9];f.label=5;case 5:return f.trys.push([5,7,,8]),[4,this.sendQueue.stop()];case 6:return f.sent(),[3,8];case 7:return t=f.sent(),this.logger.log(r.LogLevel.Error,"TransportSendQueue.stop() threw error '"+t+"'."),[3,8];case 8:this.sendQueue=undefined;f.label=9;case 9:if(!this.transport)return[3,14];f.label=10;case 10:return f.trys.push([10,12,,13]),[4,this.transport.stop()];case 11:return f.sent(),[3,13];case 12:return i=f.sent(),this.logger.log(r.LogLevel.Error,"HttpConnection.transport.stop() threw error '"+i+"'."),this.stopConnection(),[3,13];case 13:return this.transport=undefined,[3,15];case 14:this.logger.log(r.LogLevel.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.");this.stopConnection();f.label=15;case 15:return[2]}})})},n.prototype.startInternal=function(n){return o(this,void 0,void 0,function(){var i,t,o,h,f,s;return e(this,function(c){switch(c.label){case 0:i=this.baseUrl;this.accessTokenFactory=this.options.accessTokenFactory;c.label=1;case 1:return(c.trys.push([1,12,,13]),!this.options.skipNegotiation)?[3,5]:(this.options.transport===u.HttpTransportType.WebSockets)?(this.transport=this.constructTransport(u.HttpTransportType.WebSockets),[4,this.startTransport(i,n)]):[3,3];case 2:return c.sent(),[3,4];case 3:throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");case 4:return[3,11];case 5:t=null;o=0;h=function(){var n;return e(this,function(r){switch(r.label){case 0:return[4,f.getNegotiationResponse(i)];case 1:if(t=r.sent(),f.connectionState==="Disconnecting"||f.connectionState==="Disconnected")throw new Error("The connection was stopped during negotiation.");if(t.error)throw new Error(t.error);if(t.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");return t.url&&(i=t.url),t.accessToken&&(n=t.accessToken,f.accessTokenFactory=function(){return n}),o++,[2]}})};f=this;c.label=6;case 6:return[5,h()];case 7:c.sent();c.label=8;case 8:if(t.url&&o<y)return[3,6];c.label=9;case 9:if(o===y&&t.url)throw new Error("Negotiate redirection limit exceeded.");return[4,this.createTransport(i,this.options.transport,t,n)];case 10:c.sent();c.label=11;case 11:return this.transport instanceof v.LongPollingTransport&&(this.features.inherentKeepAlive=!0),this.connectionState==="Connecting "&&(this.logger.log(r.LogLevel.Debug,"The HttpConnection connected successfully."),this.connectionState="Connected"),[3,13];case 12:return s=c.sent(),this.logger.log(r.LogLevel.Error,"Failed to start the connection: "+s),this.connectionState="Disconnected",this.transport=undefined,[2,Promise.reject(s)];case 13:return[2]}})})},n.prototype.getNegotiationResponse=function(n){return o(this,void 0,void 0,function(){var u,h,f,o,i,t,s;return e(this,function(e){switch(e.label){case 0:return this.accessTokenFactory?[4,this.accessTokenFactory()]:[3,2];case 1:f=e.sent();f&&(h=(u={},u.Authorization="Bearer "+f,u));e.label=2;case 2:o=this.resolveNegotiateUrl(n);this.logger.log(r.LogLevel.Debug,"Sending negotiation request: "+o+".");e.label=3;case 3:return e.trys.push([3,5,,6]),[4,this.httpClient.post(o,{content:"",headers:h})];case 4:return(i=e.sent(),i.statusCode!==200)?[2,Promise.reject(new Error("Unexpected status code returned from negotiate "+i.statusCode))]:(t=JSON.parse(i.content),(!t.negotiateVersion||t.negotiateVersion<1)&&(t.connectionToken=t.connectionId),[2,t]);case 5:return s=e.sent(),this.logger.log(r.LogLevel.Error,"Failed to complete negotiation with the server: "+s),[2,Promise.reject(s)];case 6:return[2]}})})},n.prototype.createConnectUrl=function(n,t){return t?n+(n.indexOf("?")===-1?"?":"&")+("id="+t):n},n.prototype.createTransport=function(n,t,i,u){return o(this,void 0,void 0,function(){var c,o,p,f,l,a,s,h,w,v,y;return e(this,function(e){switch(e.label){case 0:return(c=this.createConnectUrl(n,i.connectionToken),!this.isITransport(t))?[3,2]:(this.logger.log(r.LogLevel.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,[4,this.startTransport(c,u)]);case 1:return e.sent(),this.connectionId=i.connectionId,[2];case 2:o=[];p=i.availableTransports||[];f=i;l=0;a=p;e.label=3;case 3:return(l<a.length)?(s=a[l],h=this.resolveTransportOrError(s,t,u),!(h instanceof Error))?[3,4]:(o.push(s.transport+" failed: "+h),[3,12]):[3,13];case 4:if(!this.isITransport(h))return[3,12];if(this.transport=h,!!f)return[3,9];e.label=5;case 5:return e.trys.push([5,7,,8]),[4,this.getNegotiationResponse(n)];case 6:return f=e.sent(),[3,8];case 7:return w=e.sent(),[2,Promise.reject(w)];case 8:c=this.createConnectUrl(n,f.connectionToken);e.label=9;case 9:return e.trys.push([9,11,,12]),[4,this.startTransport(c,u)];case 10:return e.sent(),this.connectionId=f.connectionId,[2];case 11:return(v=e.sent(),this.logger.log(r.LogLevel.Error,"Failed to start the transport '"+s.transport+"': "+v),f=undefined,o.push(s.transport+" failed: "+v),this.connectionState!=="Connecting ")?(y="Failed to select transport before stop() was called.",this.logger.log(r.LogLevel.Debug,y),[2,Promise.reject(new Error(y))]):[3,12];case 12:return l++,[3,3];case 13:return o.length>0?[2,Promise.reject(new Error("Unable to connect to the server with any of the available transports. "+o.join(" ")))]:[2,Promise.reject(new Error("None of the transports supported by the client are supported by the server."))]}})})},n.prototype.constructTransport=function(n){switch(n){case u.HttpTransportType.WebSockets:if(!this.options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new k.WebSocketTransport(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.WebSocket);case u.HttpTransportType.ServerSentEvents:if(!this.options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new b.ServerSentEventsTransport(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.EventSource);case u.HttpTransportType.LongPolling:return new v.LongPollingTransport(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1);default:throw new Error("Unknown transport: "+n+".");}},n.prototype.startTransport=function(n,t){var i=this;return this.transport.onreceive=this.onreceive,this.transport.onclose=function(n){return i.stopConnection(n)},this.transport.connect(n,t)},n.prototype.resolveTransportOrError=function(n,t,i){var f=u.HttpTransportType[n.transport],e;if(f===null||f===undefined)return this.logger.log(r.LogLevel.Debug,"Skipping transport '"+n.transport+"' because it is not supported by this client."),new Error("Skipping transport '"+n.transport+"' because it is not supported by this client.");if(d(t,f))if(e=n.transferFormats.map(function(n){return u.TransferFormat[n]}),e.indexOf(i)>=0)if((f!==u.HttpTransportType.WebSockets||this.options.WebSocket)&&(f!==u.HttpTransportType.ServerSentEvents||this.options.EventSource)){this.logger.log(r.LogLevel.Debug,"Selecting transport '"+u.HttpTransportType[f]+"'.");try{return this.constructTransport(f)}catch(o){return o}}else return this.logger.log(r.LogLevel.Debug,"Skipping transport '"+u.HttpTransportType[f]+"' because it is not supported in your environment.'"),new Error("'"+u.HttpTransportType[f]+"' is not supported in your environment.");else return this.logger.log(r.LogLevel.Debug,"Skipping transport '"+u.HttpTransportType[f]+"' because it does not support the requested transfer format '"+u.TransferFormat[i]+"'."),new Error("'"+u.HttpTransportType[f]+"' does not support "+u.TransferFormat[i]+".");else return this.logger.log(r.LogLevel.Debug,"Skipping transport '"+u.HttpTransportType[f]+"' because it was disabled by the client."),new Error("'"+u.HttpTransportType[f]+"' is disabled by the client.")},n.prototype.isITransport=function(n){return n&&typeof n=="object"&&"connect"in n},n.prototype.stopConnection=function(n){if(this.logger.log(r.LogLevel.Debug,"HttpConnection.stopConnection("+n+") called while in state "+this.connectionState+"."),this.transport=undefined,n=this.stopError||n,this.stopError=undefined,this.connectionState==="Disconnected"){this.logger.log(r.LogLevel.Debug,"Call to HttpConnection.stopConnection("+n+") was ignored because the connection is already in the disconnected state.");return}if(this.connectionState==="Connecting "){this.logger.log(r.LogLevel.Warning,"Call to HttpConnection.stopConnection("+n+") was ignored because the connection hasn't yet left the in the connecting state.");return}if(this.connectionState==="Disconnecting"&&this.stopPromiseResolver(),n?this.logger.log(r.LogLevel.Error,"Connection disconnected with error '"+n+"'."):this.logger.log(r.LogLevel.Information,"Connection disconnected."),this.connectionId=undefined,this.connectionState="Disconnected",this.onclose&&this.connectionStarted){this.connectionStarted=!1;try{this.onclose(n)}catch(t){this.logger.log(r.LogLevel.Error,"HttpConnection.onclose("+n+") threw error '"+t+"'.")}}},n.prototype.resolveUrl=function(n){if(n.lastIndexOf("https://",0)===0||n.lastIndexOf("http://",0)===0)return n;if(!f.Platform.isBrowser||!window.document)throw new Error("Cannot resolve '"+n+"'.");var t=window.document.createElement("a");return t.href=n,this.logger.log(r.LogLevel.Information,"Normalizing '"+n+"' to '"+t.href+"'."),t.href},n.prototype.resolveNegotiateUrl=function(n){var i=n.indexOf("?"),t=n.substring(0,i===-1?n.length:i);return t[t.length-1]!=="/"&&(t+="/"),t+="negotiate",t+=i===-1?"":n.substring(i),t.indexOf("negotiateVersion")===-1&&(t+=i===-1?"?":"&",t+="negotiateVersion="+this.negotiateVersion),t},n}();a=function(){function n(n){this.transport=n;this.buffer=[];this.executing=!0;this.sendBufferedData=new s;this.transportResult=new s;this.sendLoopPromise=this.sendLoop()}return n.prototype.send=function(n){return this.bufferData(n),this.transportResult||(this.transportResult=new s),this.transportResult.promise},n.prototype.stop=function(){return this.executing=!1,this.sendBufferedData.resolve(),this.sendLoopPromise},n.prototype.bufferData=function(n){if(this.buffer.length&&typeof this.buffer[0]!=typeof n)throw new Error("Expected data to be of type "+typeof this.buffer+" but was of type "+typeof n);this.buffer.push(n);this.sendBufferedData.resolve()},n.prototype.sendLoop=function(){return o(this,void 0,void 0,function(){var t,i,r;return e(this,function(u){switch(u.label){case 0:return[4,this.sendBufferedData.promise];case 1:if(u.sent(),!this.executing)return this.transportResult&&this.transportResult.reject("Connection stopped."),[3,6];this.sendBufferedData=new s;t=this.transportResult;this.transportResult=undefined;i=typeof this.buffer[0]=="string"?this.buffer.join(""):n.concatBuffers(this.buffer);this.buffer.length=0;u.label=2;case 2:return u.trys.push([2,4,,5]),[4,this.transport.send(i)];case 3:return u.sent(),t.resolve(),[3,5];case 4:return r=u.sent(),t.reject(r),[3,5];case 5:return[3,0];case 6:return[2]}})})},n.concatBuffers=function(n){for(var i,e=n.map(function(n){return n.byteLength}).reduce(function(n,t){return n+t}),r=new Uint8Array(e),u=0,t=0,f=n;t<f.length;t++)i=f[t],r.set(new Uint8Array(i),u),u+=i.byteLength;return r},n}();s=function(){function n(){var n=this;this.promise=new Promise(function(t,i){var r;return r=[t,i],n.resolver=r[0],n.rejecter=r[1],r})}return n.prototype.resolve=function(){this.resolver()},n.prototype.reject=function(n){this.rejecter(n)},n}()},function(n,t,i){"use strict";var r,u;i.r(t);i.d(t,"HttpTransportType",function(){return r});i.d(t,"TransferFormat",function(){return u}),function(n){n[n.None=0]="None";n[n.WebSockets=1]="WebSockets";n[n.ServerSentEvents=2]="ServerSentEvents";n[n.LongPolling=4]="LongPolling"}(r||(r={})),function(n){n[n.Text=1]="Text";n[n.Binary=2]="Binary"}(u||(u={}))},function(n,t,i){"use strict";i.r(t);i.d(t,"LongPollingTransport",function(){return c});var h=i(22),o=i(4),r=i(9),s=i(20),u=i(13),f=undefined&&undefined.__awaiter||function(n,t,i,r){return new(i||(i=Promise))(function(u,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?u(n.value):new i(function(t){t(n.value)}).then(o,s)}e((r=r.apply(n,t||[])).next())})},e=undefined&&undefined.__generator||function(n,t){function o(n){return function(t){return s([n,t])}}function s(e){if(f)throw new TypeError("Generator is already executing.");while(r)try{if(f=1,u&&(i=e[0]&2?u["return"]:e[0]?u["throw"]||((i=u["return"])&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;(u=0,i)&&(e=[e[0]&2,i.value]);switch(e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(e[0]===6||e[0]===2)){r=0;continue}if(e[0]===3&&(!i||e[1]>i[0]&&e[1]<i[3])){r.label=e[1];break}if(e[0]===6&&r.label<i[1]){r.label=i[1];i=e;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(e);break}i[2]&&r.ops.pop();r.trys.pop();continue}e=t.call(n,r)}catch(o){e=[6,o];u=0}finally{f=i=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},f,u,i,e;return e={next:o(0),"throw":o(1),"return":o(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e},c=function(){function n(n,t,i,r){this.httpClient=n;this.accessTokenFactory=t;this.logger=i;this.pollAbort=new h.AbortController;this.logMessageContent=r;this.running=!1;this.onreceive=null;this.onclose=null}return Object.defineProperty(n.prototype,"pollAborted",{get:function(){return this.pollAbort.aborted},enumerable:!0,configurable:!0}),n.prototype.connect=function(n,t){return f(this,void 0,void 0,function(){var i,c,h,f;return e(this,function(e){switch(e.label){case 0:if(u.Arg.isRequired(n,"url"),u.Arg.isRequired(t,"transferFormat"),u.Arg.isIn(t,s.TransferFormat,"transferFormat"),this.url=n,this.logger.log(r.LogLevel.Trace,"(LongPolling transport) Connecting."),t===s.TransferFormat.Binary&&typeof XMLHttpRequest!="undefined"&&typeof(new XMLHttpRequest).responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");return i={abortSignal:this.pollAbort.signal,headers:{},timeout:1e5},t===s.TransferFormat.Binary&&(i.responseType="arraybuffer"),[4,this.getAccessToken()];case 1:return c=e.sent(),this.updateHeaderToken(i,c),h=n+"&_="+Date.now(),this.logger.log(r.LogLevel.Trace,"(LongPolling transport) polling: "+h+"."),[4,this.httpClient.get(h,i)];case 2:return f=e.sent(),f.statusCode!==200?(this.logger.log(r.LogLevel.Error,"(LongPolling transport) Unexpected response code: "+f.statusCode+"."),this.closeError=new o.HttpError(f.statusText||"",f.statusCode),this.running=!1):this.running=!0,this.receiving=this.poll(this.url,i),[2]}})})},n.prototype.getAccessToken=function(){return f(this,void 0,void 0,function(){return e(this,function(n){switch(n.label){case 0:return this.accessTokenFactory?[4,this.accessTokenFactory()]:[3,2];case 1:return[2,n.sent()];case 2:return[2,null]}})})},n.prototype.updateHeaderToken=function(n,t){if(n.headers||(n.headers={}),t){n.headers.Authorization="Bearer "+t;return}n.headers.Authorization&&delete n.headers.Authorization},n.prototype.poll=function(n,t){return f(this,void 0,void 0,function(){var h,s,i,f;return e(this,function(e){switch(e.label){case 0:e.trys.push([0,,8,9]);e.label=1;case 1:return this.running?[4,this.getAccessToken()]:[3,7];case 2:h=e.sent();this.updateHeaderToken(t,h);e.label=3;case 3:return e.trys.push([3,5,,6]),s=n+"&_="+Date.now(),this.logger.log(r.LogLevel.Trace,"(LongPolling transport) polling: "+s+"."),[4,this.httpClient.get(s,t)];case 4:if(i=e.sent(),i.statusCode===204)this.logger.log(r.LogLevel.Information,"(LongPolling transport) Poll terminated by server."),this.running=!1;else if(i.statusCode!==200)this.logger.log(r.LogLevel.Error,"(LongPolling transport) Unexpected response code: "+i.statusCode+"."),this.closeError=new o.HttpError(i.statusText||"",i.statusCode),this.running=!1;else if(i.content){if(this.logger.log(r.LogLevel.Trace,"(LongPolling transport) data received. "+Object(u.getDataDetail)(i.content,this.logMessageContent)+"."),this.onreceive)this.onreceive(i.content)}else this.logger.log(r.LogLevel.Trace,"(LongPolling transport) Poll timed out, reissuing.");return[3,6];case 5:return f=e.sent(),this.running?f instanceof o.TimeoutError?this.logger.log(r.LogLevel.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this.closeError=f,this.running=!1):this.logger.log(r.LogLevel.Trace,"(LongPolling transport) Poll errored after shutdown: "+f.message),[3,6];case 6:return[3,1];case 7:return[3,9];case 8:return this.logger.log(r.LogLevel.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this.raiseOnClose(),[7];case 9:return[2]}})})},n.prototype.send=function(n){return f(this,void 0,void 0,function(){return e(this,function(){return this.running?[2,Object(u.sendMessage)(this.logger,"LongPolling",this.httpClient,this.url,this.accessTokenFactory,n,this.logMessageContent)]:[2,Promise.reject(new Error("Cannot send until the transport is connected"))]})})},n.prototype.stop=function(){return f(this,void 0,void 0,function(){var n,t;return e(this,function(i){switch(i.label){case 0:this.logger.log(r.LogLevel.Trace,"(LongPolling transport) Stopping polling.");this.running=!1;this.pollAbort.abort();i.label=1;case 1:return i.trys.push([1,,5,6]),[4,this.receiving];case 2:return i.sent(),this.logger.log(r.LogLevel.Trace,"(LongPolling transport) sending DELETE request to "+this.url+"."),n={headers:{}},[4,this.getAccessToken()];case 3:return t=i.sent(),this.updateHeaderToken(n,t),[4,this.httpClient.delete(this.url,n)];case 4:return i.sent(),this.logger.log(r.LogLevel.Trace,"(LongPolling transport) DELETE request sent."),[3,6];case 5:return this.logger.log(r.LogLevel.Trace,"(LongPolling transport) Stop finished."),this.raiseOnClose(),[7];case 6:return[2]}})})},n.prototype.raiseOnClose=function(){if(this.onclose){var n="(LongPolling transport) Firing onclose event.";this.closeError&&(n+=" Error: "+this.closeError);this.logger.log(r.LogLevel.Trace,n);this.onclose(this.closeError)}},n}()},function(n,t,i){"use strict";i.r(t);i.d(t,"AbortController",function(){return r});var r=function(){function n(){this.isAborted=!1;this.onabort=null}return n.prototype.abort=function(){this.isAborted||(this.isAborted=!0,this.onabort&&this.onabort())},Object.defineProperty(n.prototype,"signal",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"aborted",{get:function(){return this.isAborted},enumerable:!0,configurable:!0}),n}()},function(n,t,i){"use strict";i.r(t);i.d(t,"ServerSentEventsTransport",function(){return s});var u=i(9),f=i(20),r=i(13),e=undefined&&undefined.__awaiter||function(n,t,i,r){return new(i||(i=Promise))(function(u,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?u(n.value):new i(function(t){t(n.value)}).then(o,s)}e((r=r.apply(n,t||[])).next())})},o=undefined&&undefined.__generator||function(n,t){function o(n){return function(t){return s([n,t])}}function s(e){if(f)throw new TypeError("Generator is already executing.");while(r)try{if(f=1,u&&(i=e[0]&2?u["return"]:e[0]?u["throw"]||((i=u["return"])&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;(u=0,i)&&(e=[e[0]&2,i.value]);switch(e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(e[0]===6||e[0]===2)){r=0;continue}if(e[0]===3&&(!i||e[1]>i[0]&&e[1]<i[3])){r.label=e[1];break}if(e[0]===6&&r.label<i[1]){r.label=i[1];i=e;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(e);break}i[2]&&r.ops.pop();r.trys.pop();continue}e=t.call(n,r)}catch(o){e=[6,o];u=0}finally{f=i=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},f,u,i,e;return e={next:o(0),"throw":o(1),"return":o(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e},s=function(){function n(n,t,i,r,u){this.httpClient=n;this.accessTokenFactory=t;this.logger=i;this.logMessageContent=r;this.eventSourceConstructor=u;this.onreceive=null;this.onclose=null}return n.prototype.connect=function(n,t){return e(this,void 0,void 0,function(){var e,i=this;return o(this,function(o){switch(o.label){case 0:return(r.Arg.isRequired(n,"url"),r.Arg.isRequired(t,"transferFormat"),r.Arg.isIn(t,f.TransferFormat,"transferFormat"),this.logger.log(u.LogLevel.Trace,"(SSE transport) Connecting."),this.url=n,!this.accessTokenFactory)?[3,2]:[4,this.accessTokenFactory()];case 1:e=o.sent();e&&(n+=(n.indexOf("?")<0?"?":"&")+("access_token="+encodeURIComponent(e)));o.label=2;case 2:return[2,new Promise(function(e,o){var h=!1,s,c;if(t!==f.TransferFormat.Text){o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}r.Platform.isBrowser||r.Platform.isWebWorker?s=new i.eventSourceConstructor(n,{withCredentials:!0}):(c=i.httpClient.getCookieString(n),s=new i.eventSourceConstructor(n,{withCredentials:!0,headers:{Cookie:c}}));try{s.onmessage=function(n){if(i.onreceive)try{i.logger.log(u.LogLevel.Trace,"(SSE transport) data received. "+Object(r.getDataDetail)(n.data,i.logMessageContent)+".");i.onreceive(n.data)}catch(t){i.close(t);return}};s.onerror=function(n){var t=new Error(n.data||"Error occurred");h?i.close(t):o(t)};s.onopen=function(){i.logger.log(u.LogLevel.Information,"SSE connected to "+i.url);i.eventSource=s;h=!0;e()}}catch(l){o(l);return}})]}})})},n.prototype.send=function(n){return e(this,void 0,void 0,function(){return o(this,function(){return this.eventSource?[2,Object(r.sendMessage)(this.logger,"SSE",this.httpClient,this.url,this.accessTokenFactory,n,this.logMessageContent)]:[2,Promise.reject(new Error("Cannot send until the transport is connected"))]})})},n.prototype.stop=function(){return this.close(),Promise.resolve()},n.prototype.close=function(n){if(this.eventSource&&(this.eventSource.close(),this.eventSource=undefined,this.onclose))this.onclose(n)},n}()},function(n,t,i){"use strict";i.r(t);i.d(t,"WebSocketTransport",function(){return s});var u=i(9),f=i(20),r=i(13),e=undefined&&undefined.__awaiter||function(n,t,i,r){return new(i||(i=Promise))(function(u,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?u(n.value):new i(function(t){t(n.value)}).then(o,s)}e((r=r.apply(n,t||[])).next())})},o=undefined&&undefined.__generator||function(n,t){function o(n){return function(t){return s([n,t])}}function s(e){if(f)throw new TypeError("Generator is already executing.");while(r)try{if(f=1,u&&(i=e[0]&2?u["return"]:e[0]?u["throw"]||((i=u["return"])&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;(u=0,i)&&(e=[e[0]&2,i.value]);switch(e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(e[0]===6||e[0]===2)){r=0;continue}if(e[0]===3&&(!i||e[1]>i[0]&&e[1]<i[3])){r.label=e[1];break}if(e[0]===6&&r.label<i[1]){r.label=i[1];i=e;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(e);break}i[2]&&r.ops.pop();r.trys.pop();continue}e=t.call(n,r)}catch(o){e=[6,o];u=0}finally{f=i=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},f,u,i,e;return e={next:o(0),"throw":o(1),"return":o(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e},s=function(){function n(n,t,i,r,u){this.logger=i;this.accessTokenFactory=t;this.logMessageContent=r;this.webSocketConstructor=u;this.httpClient=n;this.onreceive=null;this.onclose=null}return n.prototype.connect=function(n,t){return e(this,void 0,void 0,function(){var e,i=this;return o(this,function(o){switch(o.label){case 0:return(r.Arg.isRequired(n,"url"),r.Arg.isRequired(t,"transferFormat"),r.Arg.isIn(t,f.TransferFormat,"transferFormat"),this.logger.log(u.LogLevel.Trace,"(WebSockets transport) Connecting."),!this.accessTokenFactory)?[3,2]:[4,this.accessTokenFactory()];case 1:e=o.sent();e&&(n+=(n.indexOf("?")<0?"?":"&")+("access_token="+encodeURIComponent(e)));o.label=2;case 2:return[2,new Promise(function(e,o){n=n.replace(/^http/,"ws");var s,h=i.httpClient.getCookieString(n),c=!1;r.Platform.isNode&&h&&(s=new i.webSocketConstructor(n,undefined,{headers:{Cookie:""+h}}));s||(s=new i.webSocketConstructor(n));t===f.TransferFormat.Binary&&(s.binaryType="arraybuffer");s.onopen=function(){i.logger.log(u.LogLevel.Information,"WebSocket connected to "+n+".");i.webSocket=s;c=!0;e()};s.onerror=function(n){var t=null;t=typeof ErrorEvent!="undefined"&&n instanceof ErrorEvent?n.error:new Error("There was an error with the transport.");o(t)};s.onmessage=function(n){if(i.logger.log(u.LogLevel.Trace,"(WebSockets transport) data received. "+Object(r.getDataDetail)(n.data,i.logMessageContent)+"."),i.onreceive)i.onreceive(n.data)};s.onclose=function(n){if(c)i.close(n);else{var t=null;t=typeof ErrorEvent!="undefined"&&n instanceof ErrorEvent?n.error:new Error("There was an error with the transport.");o(t)}}})]}})})},n.prototype.send=function(n){return this.webSocket&&this.webSocket.readyState===this.webSocketConstructor.OPEN?(this.logger.log(u.LogLevel.Trace,"(WebSockets transport) sending data. "+Object(r.getDataDetail)(n,this.logMessageContent)+"."),this.webSocket.send(n),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")},n.prototype.stop=function(){return this.webSocket&&(this.webSocket.onclose=function(){},this.webSocket.onmessage=function(){},this.webSocket.onerror=function(){},this.webSocket.close(),this.webSocket=undefined,this.close(undefined)),Promise.resolve()},n.prototype.close=function(n){if(this.logger.log(u.LogLevel.Trace,"(WebSockets transport) socket closed."),this.onclose)if(n&&(n.wasClean===!1||n.code!==1e3))this.onclose(new Error("WebSocket closed with status code: "+n.code+" ("+n.reason+")."));else this.onclose()},n}()},function(n,t,i){"use strict";i.r(t);i.d(t,"JsonHubProtocol",function(){return h});var r=i(15),f=i(9),e=i(20),o=i(14),u=i(12),s="json",h=function(){function n(){this.name=s;this.version=1;this.transferFormat=e.TransferFormat.Text}return n.prototype.parseMessages=function(n,t){var c,s,e,h,l,i;if(typeof n!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!n)return[];for(t===null&&(t=o.NullLogger.instance),c=u.TextMessageFormat.parse(n),s=[],e=0,h=c;e<h.length;e++){if(l=h[e],i=JSON.parse(l),typeof i.type!="number")throw new Error("Invalid payload.");switch(i.type){case r.MessageType.Invocation:this.isInvocationMessage(i);break;case r.MessageType.StreamItem:this.isStreamItemMessage(i);break;case r.MessageType.Completion:this.isCompletionMessage(i);break;case r.MessageType.Ping:break;case r.MessageType.Close:break;default:t.log(f.LogLevel.Information,"Unknown message type '"+i.type+"' ignored.");continue}s.push(i)}return s},n.prototype.writeMessage=function(n){return u.TextMessageFormat.write(JSON.stringify(n))},n.prototype.isInvocationMessage=function(n){this.assertNotEmptyString(n.target,"Invalid payload for Invocation message.");n.invocationId!==undefined&&this.assertNotEmptyString(n.invocationId,"Invalid payload for Invocation message.")},n.prototype.isStreamItemMessage=function(n){if(this.assertNotEmptyString(n.invocationId,"Invalid payload for StreamItem message."),n.item===undefined)throw new Error("Invalid payload for StreamItem message.");},n.prototype.isCompletionMessage=function(n){if(n.result&&n.error)throw new Error("Invalid payload for Completion message.");!n.result&&n.error&&this.assertNotEmptyString(n.error,"Invalid payload for Completion message.");this.assertNotEmptyString(n.invocationId,"Invalid payload for Completion message.")},n.prototype.assertNotEmptyString=function(n,t){if(typeof n!="string"||n==="")throw new Error(t);},n}()}])});__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var l=function(){function n(){}return n.isESports=function(n){switch(n){case 1077:case 1078:case 1079:case 1080:case 1082:case 1083:case 1084:case 1088:return!0}return!1},n}(),r,u,f,e,o,s,t,h,c,i;n.ESports=l;r=function(){function n(){}return n.sortByOrder=function(n,t){var i=Number($(n).data("order")),r=Number($(t).data("order"));return i-r},n.sortByOrderAttribute=function(n,t){var i=Number($(n).attr("data-order")),r=Number($(t).attr("data-order"));return i-r},n}();n.Sorter=r;u=function(){function n(){}return n.getHandler=function(n,t,i,r,u,f){u===void 0&&(u=!1);f===void 0&&(f=!1);var e="QuickBet.Init.partial({";return e+="sender:this,",e+="eventId:"+n+",",e+="groupId:"+t+",",e+="id:"+i+",",e+="isLive:"+r+",",e+="isUnified: "+u+",",e+("hideQB:"+f+"});")},n}();n.QuickBet=u;f=function(){function n(){}return n.getId=function(n,t){var i;t===void 0&&(t=.2);i=999999;n.league.order>i&&(n.league.order=i);var r=this.getSportOrderId(n)+t,u=String(n.league.order/1e6).split(".")[1],f=Extensions.String.ToDateTimeNumber(new Date(n.start));return""+r+u+f},n.getHeaderId=function(n,t){return this.getSportOrderId(n)+"."+t},n.getSportOrderId=function(n){var t=n.sport.order*this.getMultiplicator(n.sport.id);return t==0?t:parseFloat(""+t+n.sport.id)},n.getMultiplicator=function(n){return Number(n!=Common.Application.instance.segmentation.kos)*1},n}();n.Order=f;e=function(){function n(n,t){this._bs=n;this._modifier=t;this._count=0}return n.instance=function(t,i){return this._instance==null&&(this._instance=new n(t,i)),this._instance},n.prototype.setOfferEvents=function(n,t){var i=this;$(n).off("click").on("click",function(n){var r=$(this),o;if(r.hasClass("hl")&&!r.hasClass("locked")){var f=JSON.parse(r.attr("data-betting")),u=JSON.parse(r.closest("tr").attr("data-betting")),e=i._modifier.getQuoteFromHtml($(this));Betting.FreeBets.instance(Betting.BettingSlip.get()).check({kosId:r.closest("tr").data("kos"),leagueId:r.closest("tr").data("league"),eventId:u[0],cloneId:u[0],isLive:u[2]},e);o=i._bs;o.addBet({id:f[0],name:f[1],groupId:f[2],groupName:f[3],isFreeBet:f[4],eventId:u[0],shortName:u[1],isLive:u[2],quote:e,innerMarketCombi:!1});Common.Tracking.Event.initial(["Live-Calendar","Add-Bet",t])}n.stopPropagation();n.preventDefault()})},n}();n.Handler=e;o=function(){function n(){this._live=[];this._navi=[]}return Object.defineProperty(n.prototype,"tip",{get:function(){return this._tip},set:function(n){this._tip=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"css",{get:function(){return this._css},set:function(n){this._css=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"html",{get:function(){return this._html},set:function(n){this._html=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"index",{get:function(){return this._index},set:function(n){this._index=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"main",{get:function(){return this._main},set:function(n){this._main=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"live",{get:function(){return this._live},set:function(n){this._live=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"navi",{get:function(){return this._navi},set:function(n){this._navi=n},enumerable:!1,configurable:!0}),n.prototype.setHtml=function(n,t){this._live.length>0&&$(this._live[this._index]).attr("data-betting",Helpers.BettingData.instance(!1).getOutComeValue(n,t)).attr("data-order",n.order).html(this._html).attr("class",this._css);this.main&&this._navi.length>0&&$(this._navi[this._index]).attr("data-betting",Helpers.BettingData.instance(!1).getOutComeValue(n,t)).attr("data-order",n.order).html("<span>"+this._tip+"<\/span> "+this._html).attr("class",this._css).closest("table").removeClass("none")},n.prototype.setCss=function(n){this.addCss($(this._live[this._index]),n,"bo");this.main&&this.addCss($(this._navi[this._index]),n,"bo");this._index++},n.prototype.setInfo=function(n,t,i){n==0&&i.length>0&&this.addCss($(this.live[n]),t).html(i);this._index++},n.prototype.addCss=function(n,t,i){return i===void 0&&(i=""),n.is("[class*='BOG']")||n.addClass("BOG"+t),n.addClass(i+" calc")},n}();n.OutComeData=o;s=function(){function n(n){this._adding=!0;this._adding=n}return n.instance=function(t){return t===void 0&&(t=!0),this._instance==null?this._instance=new n(t):this._instance.adding=t,this._instance},Object.defineProperty(n.prototype,"adding",{get:function(){return this._adding},set:function(n){this._adding=n},enumerable:!1,configurable:!0}),n.prototype.getEventValue=function(n){var t=n.isLive?n.id:n.prematchId!=null&&n.prematchId>0?n.prematchId:n.id;return this.addBettingData("["+t+', "'+n.name.shortName+'", '+(n.isLive||!1)+"]")},n.prototype.getOutComeValue=function(n,t){return this.addBettingData("["+t.id+', "'+t.name.text+'", '+n.id+', "'+n.name.text+'", '+n.freeBet+"]")},n.prototype.addBettingData=function(n){return this._adding&&n.length>0&&(n='data-betting="'+n.replace(/\"/gi,"&quot;")+'"'),n},n._instance=null,n}();n.BettingData=s;t=function(){function n(){this._name=new i}return Object.defineProperty(n.prototype,"id",{get:function(){return this._id},set:function(n){this._id=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),n}();n.ModelBase=t;h=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(t);n.MarketModel=h;c=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"odd",{get:function(){return this._odd},set:function(n){this._odd=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tip",{get:function(){return this._tip},set:function(n){this._tip=n},enumerable:!1,configurable:!0}),t}(t);n.OutcomeModel=c;i=function(){function n(){}return Object.defineProperty(n.prototype,"text",{get:function(){return this._text},set:function(n){this._text=n},enumerable:!1,configurable:!0}),n}();n.LanguageModel=i})(t=n.Helper||(n.Helper={}))}(LiveBetting||(LiveBetting={})),function(n){var t=Common.Platform,i=function(){function i(i){i.event=this;this._scoreboardBackgroundsKosId=i.scoreboardBackgroundsKosId;this._bettingSlip=i.bs;this._eventClient=new n.SignalR.EventClient(i);var u=$.cookie("iw_liveevents"),r;u!=undefined?(r=u.split(","),r.filter(function(n){return n==i.events}).length==0&&r.push(i.events),i.events=r):i.events=[i.events];this._eventClient.init(i.signalrHubUrl,i.events);Common.Application.instance.platform==t.Web&&(this._navigationEvents=$(i.navigation.events),this._navigation=new n.Navigation.Event({count:$(i.eventCountSelector),selector:".box.live.navigation",eventClient:this._eventClient,selectedEventIds:i.events,isOpen:{navi:i.navigation.isOpen}}),this._navigation.init(i.bs,this.modifier))}return i.Instance=function(n){return n===void 0&&(n=null),this._instance==null&&(this._instance=new i(n)),this._instance},Object.defineProperty(i.prototype,"modifier",{get:function(){var i=this,r;if(this._modifier!=null)return this._modifier;switch(Common.Application.instance.platform){case t.Smartphone:case t.Tablet:this._modifier=new n.Modifier.SmartphoneEvent({args:{bs:this._bettingSlip,navigationEvents:this._navigationEvents,navigation:this._navigation},prefix:{bo:".BO",event:".event",score:".score",state:".gametime"},eventClient:this._eventClient,scoreboardBackgroundsKosId:this._scoreboardBackgroundsKosId});objTennisVisualization.translations=Translation.textIds;r={runScoreboard:function(n){i._modifier.runScoreBoard(n)},logError:function(n,t){Common.WebLog.create(Common.WebLogType.Warning,n,t)},forceReload:function(n){i._eventClient!=null&&i._eventClient.reloadTennisVisualization(n)},freebetCheck:function(n,t,i,r){var u=Betting.FreeBets.instance(Betting.BettingSlip.get()),f=$("#lei"+n).data("leagueid"),e;return(f==undefined&&(f=r),u!=null&&(Common.Application.instance.isLoggedIn&&u.list==null&&u.load(),u.list!=null))?(e=u.getFreeBetModel(n,i,f,!0),u.check(e,t)):!1},event:this};objTennisVisualization.delegateObject=r;break;case t.Web:default:this._modifier=new n.Modifier.DesktopEvent({args:{bs:this._bettingSlip,navigationEvents:this._navigationEvents,navigation:this._navigation},prefix:{bo:".BO",event:".event",score:".score",state:".gametime"},eventClient:this._eventClient,scoreboardBackgroundsKosId:this._scoreboardBackgroundsKosId});objTennisVisualization.translations=Translation.textIds;r={runScoreboard:function(n){i._modifier.runScoreBoard(n)},logError:function(n,t){Common.WebLog.create(Common.WebLogType.Warning,n,t)},forceReload:function(n){i._eventClient!=null&&i._eventClient.reloadTennisVisualization(n)},freebetCheck:function(n,t,i,r){var u=Betting.FreeBets.instance(Betting.BettingSlip.get()),f=$("#lei"+n).data("leagueid"),e;return(f==undefined&&(f=r),u!=null&&(Common.Application.instance.isLoggedIn&&u.list==null&&u.load(),u.list!=null))?(e=u.getFreeBetModel(n,i,f,!0),u.check(e,t)):!1},event:this};objTennisVisualization.delegateObject=r}return this._modifier},enumerable:!1,configurable:!0}),i.prototype.getTennisStatistics=function(n){try{this._eventClient.getTennisStatistics(n)}catch(t){Common.WebLog.create(Common.WebLogType.Warning,"TennisVisualization: Error getTennisStatistics failed",t)}},i.prototype.init=function(){$(".event-gamelog-list").on("click",function(){var n=$("#LogList-"+$(this).attr("data-id"));n.children().length>0&&(n.toggleClass("open"),$(this.nextSibling).toggleClass("arrow-up").toggleClass("arrow-down"))})},i.closeEvent=function(n){this._instance._navigation.closeEvent(n)},i.unSubscribeEvent=function(n,t){this._instance._eventClient.unSubscribeEvent(n);t&&this._instance._eventClient.unSubscribeTennisVisualization(n)},i.subscribeTennisVisualization=function(n){this._instance!=undefined&&this._instance._eventClient!=undefined&&this._instance._eventClient.subscribeTennisVisualization(n)},i}();n.Event=i}(LiveBetting||(LiveBetting={})),function(n){var t=function(){function n(n,t){this.EventId=n;this.Player=t}return Object.defineProperty(n.prototype,"EventId",{get:function(){return this._eventId},set:function(n){this._eventId=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"Player",{get:function(){return this._player},set:function(n){this._player=n},enumerable:!1,configurable:!0}),n}(),i;n.Videoplayer=t;i=function(){function n(){this._runningEventId=0}return Object.defineProperty(n.prototype,"Container",{get:function(){return this._container},set:function(n){this._container=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"VideoElement",{get:function(){return'<div id="@ID" class="streamcontainer"><video><source src="@URL"><\/video><\/div>'},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"Player",{get:function(){return this._player},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"RunningEventId",{get:function(){return this._runningEventId},set:function(n){this._runningEventId=n},enumerable:!1,configurable:!0}),n.prototype.CallBack=function(n,i,r,u,f){if(this.Container=$("#LiveStream"+this.RunningEventId),n.success&&this.Container.length>0){var e="LiveStream"+this.RunningEventId+"Stream",o={id:e,allowFullScreen:!1,mute:!0,autoplay:i};if(r=r.replace("@ID",e).replace("@URL",n.url),f==1)try{this.Container.html(r).show();this._player=avvpl.setupPlayer(o);this._playerList==null&&(this._playerList=[]);this._playerList.push(new t(this.RunningEventId,this._player))}catch(s){alert(s)}else this.Container.html(r).show(),this._player=avvpl.setupPlayer(o)}else this.RunningEventId=0,this.Container.html(u.replace("@TEXT",n.message)).show()},n.prototype.Run=function(n){this.RunningEventId=n},n.prototype.Stop=function(n){this.RunningEventId==n&&(this.Player!=null&&this.Player.pauseVideo(),this.RunningEventId=0);this.Clear(n)},n.prototype.Clear=function(n){var t=$("#LiveStream"+n);t!=null&&t.html().length>0&&t.html("").hide()},n.prototype.TennisStop=function(n){var i=$("#LiveStream"+n),t;i.length>0&&this._playerList!=null&&(t=this._playerList.filter(function(t){return t.EventId==n}),t.length>0&&t[0].Player!=null&&t[0].Player.pauseVideo(),i.html("").hide)},n}();n.Base=i}(LiveStream||(LiveStream={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t._loginMessageId="",t}return __extends(t,n),Object.defineProperty(t.prototype,"MessageElement",{get:function(){return'<div class="boxmsg warning"><span class="sp icon x2222">&nbsp;<\/span><span>@TEXT<\/span><\/div>'},enumerable:!1,configurable:!0}),Object.defineProperty(t,"Instance",{get:function(){return this._instance},enumerable:!1,configurable:!0}),t.prototype.SetLoginMessage=function(n){this._loginMessageId=n},t.prototype.ShowLoginMessage=function(){$(this._loginMessageId).show();$("html,body").scrollTop(0)},t.prototype.RefreshIfId=function(n){this.RunningEventId==n&&this.Run(this.RunningEventId)},t.prototype.CallBack=function(t){n.prototype.CallBack.call(this,t,!0,this.VideoElement,this.MessageElement,1)},t.prototype.Run=function(t){var i=this;n.prototype.Run.call(this,t);$("#lei"+t+" .btn.scoreboard").removeClass("closed");$("#lei"+t+" .btn.stream").addClass("closed");new Common.AjaxCall({controller:"Live"}).execute("GetBetRadarLiveStreamUrl",function(n){i.CallBack(n)},JSON.stringify({eventId:t}))},t.prototype.IsAvailableForKos=function(n){return LiveBetting.Helper.ESports.isESports(n)},t._instance=new t,t}(n.Base);t.StreamPlayer=i})(t=n.Web||(n.Web={}))}(LiveStream||(LiveStream={})),function(n){var t;(function(t){function i(t){return t==Common.Platform.Web?n.Web.Html.Log:n.Mobile.Html.Log}function r(){return n.Web.Html.Calendar}function u(){return n.Web.Html.Bet}t.Log=i;t.Calendar=r;t.Bet=u})(t=n.Html||(n.Html={}))}(Templates||(Templates={})),function(n){var t;(function(n){var t=function(){function n(){}return Object.defineProperty(n,"Log",{get:function(){return{Row:{Default:'<li id="Log-@0" data-id="@0"><span class="@1"><\/span><span class="log-time">@2<\/span><span class="log-message">@3<\/span><\/li>'}}},enumerable:!1,configurable:!0}),n}();n.Html=t})(t=n.Mobile||(n.Mobile={}))}(Templates||(Templates={})),function(n){var t=function(){function t(t){t.liveBettingBox=this;this._startPage=t.startPage;this._eventUrl=t.eventUrlBase;this._liveBettingBoxClient=new n.SignalR.LiveBettingBoxClient(t);this._liveBettingBoxClient.init(t.signalrHubUrl)}return t.Instance=function(n){return n===void 0&&(n=null),this._instance==null&&(this._instance=new t(n)),this._instance},t.test=function(n){return this._instance==null&&(this._instance=new t(n)),this._instance},Object.defineProperty(t.prototype,"modifier",{get:function(){return this._modifier!=null?this._modifier:(this._modifier=new n.Modifier.LiveBettingBox(Common.Application.instance.platform,this._startPage,null,!1,this._eventUrl),this._modifier)},enumerable:!1,configurable:!0}),t}();n.LiveBettingBox=t}(LiveBetting||(LiveBetting={})),function(n){var t;(function(t){var i=function(){function t(t,i,r,u,f){this._startPage=!1;this._addToBetSlip=!1;this._platform=Common.Platform.Web;this._startPage=i;this._platform=t;this._delegateObject=r;this._addToBetSlip=u;switch(t){case Common.Platform.Web:this._html=new n.Html.Desktop;break;case Common.Platform.Smartphone:this._html=new n.Html.Smartphone(f);break;case Common.Platform.Tablet:this._html=new n.Html.Tablet;break;default:this._html=new n.Html.Desktop}}return t.prototype.updateMarket=function(n,t,i){i.isDeleted!=undefined&&i.isDeleted&&(this.checkOutcomes(t,[]),this.deleteMarket(n,t))},t.prototype.updateOdd=function(n,t,i){var l,o,a,v,e;if(i.isDeleted){this.deleteOdd(t,n);return}var u=0,f=!1,s=!1;if(i.odd!=null&&(u=i.odd),u===0){this.deleteOdd(t,n);return}i.locked==!0&&(f=!0);var r=$(".o"+t),h=r.find(".trend"),c=r.find(".quote");(f&&(r.addClass("locked"),this._platform==Common.Platform.Tablet&&r.find(".icon.locked-icon").length===0&&r.prepend('<span class="icon locked-icon"><\/span>'),this._platform==Common.Platform.Web&&(l=r.find(".icon.locked"),l.removeClass("none"))),!f&&(r.hasClass("locked")||r.hasClass("quote-lock"))&&(s=!0,r.removeClass("locked"),this._platform==Common.Platform.Tablet&&(o=r.find(".icon.locked-icon"),o.length>0&&o.remove(),r.removeClass("quote-lock")),this._platform==Common.Platform.Web&&(a=r.find(".icon.locked"),a.addClass("none"))),v=Common.Helper.getFormatedOdd(u),c.html(v),r.length>0&&(this.changeQuotefromElementData(r.get(0),u),Betting.BettingSlip.get().updateLiveBet({id:t,isExpired:!1,quote:u,isLocked:f})),this._platform==Common.Platform.Tablet&&(u<=100?r.addClass("quote-lock quote-hide"):r.removeClass("quote-lock quote-hide"),c.data("quote-val",u)),f||s)||(e=i.up?"up":"down",r.addClass(e),h.addClass(e),setTimeout(function(){r.removeClass(e)},2e3),setTimeout(function(){h.removeClass(e)},4e3))},t.prototype.updateScore=function(n,t){var i=$(".score"+n);if(this._platform===Common.Platform.Smartphone){i.html(this._html.getformatScore(t.value).replace(":","<br />"));return}i.html(this._html.getformatScore(t.value))},t.prototype.addMarket=function(n,t,i,r){var u,f;if(this._startPage&&r.mainBet){if(u=void 0,this._platform==Common.Platform.Smartphone&&(u=$("#MainBet"+i)),this._platform==Common.Platform.Tablet&&(u=$("#eventId"+i+" .offer-container")),this._platform==Common.Platform.Web&&(u=$("#MainBet"+i),u.addClass("bog"+r.id),this._addToBetSlip&&(f=r.outcomes[0].name.shortName,u.attr("data-betting","["+r.id+","+i+', "'+f+'", "'+r.name.text+'", false, "N", true, '+r.offerTypeId+", 1]"))),u==null||u.length<=0)return;u.html(this.renderBets(i,n,t,r));this.checkOutcomes(r.id,r.outcomes)}},t.prototype.updateEvent=function(n,t){if(t.isDeleted==!0){$(".event"+n).remove();return}},t.prototype.addEvent=function(n,t){var u;if(this._startPage){var i=t.league.id,f=$("#TBL_Content_LiveBetting_"+i).length>0,r=this.createStartPageEventRow(t,"");f?$("#TBL_Content_LiveBetting_"+i).append(r):(u=this.createLeaguePageTable(i,r),$("#trLive_"+i).find("td:first-child").html(u))}},t.prototype.updateStartPage=function(n,t,i){var u;i===void 0&&(i="");switch(this._platform){case Common.Platform.Web:if(n.groups==null)return;var f=n.groups["10"],e=n.groups["11"],r=n.groups.OTHER;r==undefined&&(r=n.groups.other);u=0;f!=undefined&&(u+=f.count);e!=undefined&&(u+=e.count);r!=undefined&&(u+=r.count);this.createStartPageEventForWebSite(f,10);this.createStartPageEventForWebSite(e,11);this.createStartPageEventForWebSite(r,1);$(".liveEventsCount").html(u.toString());break;case Common.Platform.Smartphone:if(t==null)return;this.createStartPageEventForSmartphone(t,i);break;case Common.Platform.Tablet:if(n.groups==null)return;this.createStartPageEventForTablet(n);break;default:return}},t.prototype.updateEventStatus=function(n,t){var i;this._platform==Common.Platform.Web?(i=t.gameTime.indexOf(":")>-1||t.gameTime.indexOf("P")>-1?t.status.text:t.gameTime,$(".gametime"+n).html(i),$(".gametime"+n).parent().attr("title",i)):(i=t.gameTime.indexOf("P")>-1?"("+t.status.text+")":t.gameTime+(t.status.text!=""?" ("+t.status.text+")":""),$(".gametime"+n).html(i))},t.prototype.changeQuotefromElementData=function(n,t){var i,r;n.dataset.betting?(i=JSON.parse(n.dataset.betting),i[4]=Common.Format.number(Common.Helper.round(t/100,2),1),n.dataset.betting=JSON.stringify(i)):(r=n.querySelector("span.quota"),r&&r.setAttribute("data-quote-val",t.toString()))},t.prototype.createStartPageEventForWebSite=function(n,t){var r,i,u,e;if(n!=null&&n.events.length>0){var f=n.events,o="",s="";for($(".kosEventList"+t).html(""),r=0;r<f.length;r++)Common.Application.instance.license.cssEvenOdd&&(s=r%2>0?"even":"odd"),o+=this.createStartPageEventRow(f[r],s);$(".kosEventList"+t).html("<tbody>"+o+"<\/tbody>");$(".headerContainer.kos"+t).removeClass("none");i=$(".headerContainer.kos"+t).find("h2");i.length===1&&(u='<label id="liveEvCount'+t+'"><\/label>',e=f[0].sport.name.text,n.count>1?t===1?(i.html(Translation.getTextId("NowOtherEvents").replace("{0}",u)),i.attr("title",Translation.getTextId("NowOtherEvents").replace("{0}",n.count.toString()))):(i.html(Translation.getTextId("NowKosEvents").replace("{0}",u).replace("{1}",e)),i.attr("title",Translation.getTextId("NowOtherEvents").replace("{0}",n.count.toString()))):t===1?(i.html(Translation.getTextId("NowOtherEvent").replace("{0}",u)),i.attr("title",Translation.getTextId("NowOtherEvent").replace("{0}",n.count.toString()))):(i.html(Translation.getTextId("NowKosEvent").replace("{0}",u).replace("{1}",e)),i.attr("title",Translation.getTextId("NowKosEvent").replace("{0}",n.count.toString()))));$("#liveEvCount"+t).html(n.count.toString())}else $(".headerContainer.kos"+t).addClass("none");EventHandler.Init.Live(Betting.BettingSlip.get(),"LiveBettingBox")},t.prototype.createStartPageEventForTablet=function(n){var f=n.groups["10"],e=n.groups["11"],i=n.groups.OTHER,t,o,u,r,s;if(i==undefined&&(i=n.groups.other),t=[],t=t.concat(f.events,e.events,i.events),t.length>0){for(o=f.count+e.count+i.count,u="",r=0;r<t.length;r++)u+=this.createStartPageEventRow(t[r],"");$("#liveEventsIndex").html(u);s=Translation.getTextId("Live Betting Now X Games").replace(/\{0\}/,o.toString());$(".live-title-count").html(s)}},t.prototype.createStartPageEventForSmartphone=function(n,t){var r,i,f,u;$(".LiveEventList").html("");var e="",o="",s=0;for(r=0;r<n.length;r++)if(i=n[r].value,i.name=="LIVE"&&(s=i.count),f="",i.events!=null&&!(i.events.length<=0)){for(o="",u=0;u<i.events.length;u++)o+=this.createStartPageEventRow(i.events[u],""),f==""&&i.events[u].mainMarket!=null&&(f=i.events[u].mainMarket.render);e+=this.getSmartphoneHtmlSportsContainer(n[r].key,i.name,f);e+='<ul class="list '+f+'" id="liveEventsList_groups'+n[r].key+'">'+o+"<\/ul>"}$(".LiveEventList").html(e);s>0&&$(".count.all").html(s.toString());this.createStartPageKosTabs(n,t)},t.prototype.getSmartphoneHtmlSportsContainer=function(n,t,i){var r="";switch(i){case"N3":r="<span>1<\/span><span>X<\/span><span>2<\/span>";break;case"N2":r="<span>1<\/span><span>2<\/span>"}return'<span class="sportsHeader">\n\t\t\t<span class="desc">\n\t\t\t\t<span class="kos icon_'+n+'"><\/span>\n\t\t\t\t<span class="kosname">'+t+'<\/span>\n\t\t\t<\/span>\n\t\t\t<span class="type">'+r+"<\/span>\n\t\t<\/span>"},t.prototype.createStartPageKosTabs=function(n,t){var u,i,f,r;for($(".liveKosTabs").remove(),u="",i=0;i<n.length;i++)(f=n[i].key,f!="LIVE")&&(r=n[i].value,r.count>0&&(u+=this._html.getStartPageKosTab(f,r.count,app.languageId.toLowerCase(),r.name)));$(".live-filter-tabs.live-kos-filter").append(u);$(".live-filter-tabs.live-kos-filter li.kosTab-"+t).addClass("active")},t.prototype.createLeaguePageTable=function(n,t){return this._html.getLeaguePageTable(n,t)},t.prototype.createStartPageEventRow=function(n,t){return this._html.getStartPageRow(n,this.renderBets(n.id,n.sport.id,n.league.id,n.mainMarket,n.name.text),t,this._addToBetSlip)},t.prototype.getDummyObjectForFreebetCheck=function(n,t){return{kosId:n.toString(),leagueId:t.toString(),GetLive:function(){return!0}}},t.prototype.deleteOdd=function(n,t){if(this._startPage){var i=$(".bog"+t);i.html("");i.html(this.getDefaultButton(0))}},t.prototype.deleteMarket=function(n,t){var i=$(".bog"+t);i.html("");this._platform==Common.Platform.Web&&i.html(this.getDefaultButton(n));this._platform==Common.Platform.Smartphone&&this.deleteMarketSmartphone(n)},t.prototype.deleteMarketSmartphone=function(n){var t=$("#MainBet"+n);t.html(this.getDefaultButton(n))},t.prototype.checkOutcomes=function(n,t){var u=Betting.BettingSlip.get(),r,i,f;if(t.length>0)t.forEach(function(n){u.hasBet(n.id)&&u.updateLiveBet({id:n.id,isExpired:!1,quote:n.odd,isLocked:n.locked})});else if(r=document.querySelector(".BOG"+n+".market"),r===null||r===void 0?void 0:r.firstElementChild)for(i=r.firstElementChild;i;)f=parseInt(i.className.substring(1,i.className.length-1),10),isNaN(f)||u.hasBet(f)&&u.updateLiveBet({id:f,isExpired:!0,quote:0,isLocked:!1}),i=i.nextElementSibling},t.prototype.getDefaultButton=function(n){return this._platform==Common.Platform.Smartphone?'<a href="/'+Common.Application.instance.languageIW+"/live/event/"+n+'" rel="nofollow" class="betnow"><span class="quote-btn empty">'+Translation.getTextId("BetNowButton")+"<\/span><\/a>":'<strong class="empty fvg">'+Translation.getTextId("goToGame")+"<\/strong>"},t.prototype.renderBets=function(n,t,i,r,u){var s,l,p,v,h;if(u===void 0&&(u=""),r!=null&&(r.render==="N2"||r.render==="N3")){var e="",f=null,o=void 0,a="",c=!1,y=!1;for(y=this._platform==Common.Platform.Web?Common.Application.instance.isLoggedIn:app.isLoggedIn,s=0;s<r.outcomes.length;s++)c=!1,o="quote hl bo TRACKING-LINK fvg",f=r.outcomes[s],(f.locked||f.odd<=100)&&(o+=" locked",c=!0),y&&(l=Betting.FreeBets.instance(),l&&(p=l.getFreeBetModel(n,t,i,!0),l.check(p,f.odd)&&(o+=" fb"))),v=Betting.BettingSlip.get(),v&&this._platform==Common.Platform.Web&&(o+=v.singleBets[f.id]?" active":""),this._startPage&&(h=f.name!=null&&f.name.text!=null?f.name.text:"",this._addToBetSlip?(h===""&&(h=u),a=this._html.getStartPageBetForBetSlip(n,f.id,r.id,Common.Helper.getFormatedOdd(f.odd),o,f.tip,c,h,f.odd)):a=this._html.getStartPageBet(n,f.id,r.id,Common.Helper.getFormatedOdd(f.odd),o,f.tip,c,h,f.odd)),e+=a,this._platform==Common.Platform.Web&&r.render=="N2"&&s==0&&(e+=this._html.getEmptyBet());return this._platform==Common.Platform.Tablet&&(e=this._html.getStartPageBetContainer(e,r.render,r.id)),this._platform==Common.Platform.Smartphone&&(e='<div class="liveog-'+r.render+" BOG"+r.id+' market" data-market-id="'+r.id+'">'+e+"<\/div>"),e}return this.getDefaultButton(n)},t}();t.LiveBettingBox=i})(t=n.Modifier||(n.Modifier={}))}(LiveBetting||(LiveBetting={}));var __awaiter=this&&this.__awaiter||function(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})},__generator=this&&this.__generator||function(n,t){function o(n){return function(t){return s([n,t])}}function s(e){if(f)throw new TypeError("Generator is already executing.");while(r)try{if(f=1,u&&(i=e[0]&2?u["return"]:e[0]?u["throw"]||((i=u["return"])&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;(u=0,i)&&(e=[e[0]&2,i.value]);switch(e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(e[0]===6||e[0]===2)){r=0;continue}if(e[0]===3&&(!i||e[1]>i[0]&&e[1]<i[3])){r.label=e[1];break}if(e[0]===6&&r.label<i[1]){r.label=i[1];i=e;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(e);break}i[2]&&r.ops.pop();r.trys.pop();continue}e=t.call(n,r)}catch(o){e=[6,o];u=0}finally{f=i=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},f,u,i,e;return e={next:o(0),"throw":o(1),"return":o(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e},Helpers=LiveBetting.Helper,LiveBetting;(function(n){var t;(function(n){var t=function(){function n(){this._partner=0}return n.prototype.init=function(n,t){var i=(new signalR.HubConnectionBuilder).withUrl(n.url).withAutomaticReconnect([2e3,5e3,5e3,5e3,1e4,1e4,1e4,1e4,1e4,1e4]).configureLogging(signalR.LogLevel.Information).build(),r=this;try{i.start().then(function(){t()}).catch(function(n){r.showReloadPageDialog(n,"BaseClient","Error at BaseClient connection")})}catch(u){this.showReloadPageDialog(u,"BaseClient","Error at BaseClient Init")}return i},n.prototype.initAsync=function(n){return __awaiter(this,void 0,void 0,function(){var t,i;return __generator(this,function(r){switch(r.label){case 0:t=(new signalR.HubConnectionBuilder).withUrl(n).withAutomaticReconnect().configureLogging(signalR.LogLevel.Information).build();r.label=1;case 1:return r.trys.push([1,3,,4]),[4,t.start().catch(function(n){Common.WebLog.create(Common.WebLogType.Warning," Error Init",n)})];case 2:return r.sent(),[3,4];case 3:return i=r.sent(),this.showReloadPageDialog(i,"BaseClient","Error at BaseClient Init"),[3,4];case 4:return[2,t]}})})},n.prototype.showReloadPageDialog=function(n,t,i,r){i===void 0&&(i="");r===void 0&&(r=!0);try{if(Common.Application.instance.platform==Common.Platform.Web&&r&&Common.MessageBox.show("refreshPageDialog"),n!=null){var u=n.stack!=null?n.stack:"stack undefined",f=n.message!=null?n.message:"message undefined",e="Error-Message: "+f+" Stack:"+u;Common.WebLog.create(Common.WebLogType.Warning,t+" - Message:"+i,e)}else Common.WebLog.create(Common.WebLogType.Warning,t+" - Connection Lost","detail is null \n"+i)}catch(o){Common.WebLog.create(Common.WebLogType.Error,t+" :: Exception on showReloadPageDialog!","Exception:"+o+" Message: "+i)}},n}();n.BaseClient=t})(t=n.SignalR||(n.SignalR={}))})(LiveBetting||(LiveBetting={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var t=function(n){function t(t){var i=n.call(this,t)||this;return i._event=null,i._event=t.event,i._betTypes=t.betTypes,i}return __extends(t,n),t.prototype.addEvent=function(n,t){t.isLive=t.isLive||!1;t.visible=t.visible||!1;t.visible&&(t.isLive?(this._event.modifier.addEvent(n,t),t.mainMarket&&this._event.modifier.addMarket({kosId:t.sport.id,eventId:n,leagueId:t.league.id},t.mainMarket)):this._event.modifier.updateEvent(n,{name:t.name,status:t.status,sport:t.sport,startTime:t.start,streamAvailable:t.streamAvailable,visualizationEnabled:t.visualizationEnabled,isDeleted:!0,isLive:t.isLive,delay:t.delay}))},t.prototype.init=function(t,i){var r=this,u={url:t,error:{method:"CreateInfoLog",detail:"Restart hub (stop/start). Error: ",message:"Error SignalR Hub Error"},maxattempts:{message:"Error SignalR Hub restart Error",method:"CreateWarningLog"}};this._connection=n.prototype.init.call(this,u,function(){r.startHubSuccessfully(i)});this.initEventReceiverMessage();this.initTennisVisualizationMessages();this._connection.onreconnected(function(){r._connection.state==signalR.HubConnectionState.Connected&&r.startHubSuccessfully(i)});this._connection.onclose(function(){r._connection.state==signalR.HubConnectionState.Disconnected&&(r._connection=n.prototype.init.call(r,u,function(){r.startHubSuccessfully(i)}),r.initEventReceiverMessage(),r.initTennisVisualizationMessages())})},t.prototype.initEventReceiverMessage=function(){var n=this;this._connection.on("addEvent",function(t,i){n.addEvent(t,i)});this._connection.on("promoteEvent",function(t,i){n.addEvent(t,i)});this._connection.on("updateEvent",function(t,i){i.isLive=i.isLive||!1;i.isDeleted=i.isDeleted||!1;n._event.modifier.updateEvent(t,i)});this._connection.on("updateEventLog",function(t,i){if(i.id>0){n._event.modifier.checkLogIdForCorrectOrder(i.id)||n.createEventLog(t);n._event.modifier.updateGameLog(t,i);return}});this._connection.on("addMarket",function(t,i,r,u){var f=new Betting.FreeBet.Event;f.cloneId=-1;f.kosId=t;f.eventId=r;f.leagueId=i;f.isLive=!0;n._event.modifier.addMarket(f,u)});this._connection.on("updateOutcome",function(t,i,r,u){n._event!=null&&n._event.modifier.updateOutcome(t,i,r,u)});this._connection.on("updateMarket",function(t,i,r){n._event.modifier.updateMarket(t,i,r)});this._connection.on("addMarketGroup",function(t,i){n._event.modifier.addMarketGroup(t,i)});this._connection.on("updateMarketGroup",function(t,i,r){n._event.modifier.updateMarketGroup(t,i,r)});this._connection.on("addOrUpdateScore",function(t,i){i.isDeleted=i.isDeleted||!1;n._event.modifier.updateScore(t,i)});this._connection.on("updateEventStatus",function(t,i){n._event.modifier.updateEventStatus(t,i)});this._connection.on("updateMarketCount",function(){})},t.prototype.initTennisVisualizationMessages=function(){var n=this;this._connection.on("updateMatchStatus",function(n){objTennisVisualization.updateMatchState(n);objTennisVisualization.setVisualizationState(n.EventId,n.Status.ES)});this._connection.on("addPointData",function(n){objTennisVisualization.setVisualizationAction(n);objTennisVisualization.addPointbyPoint(n)});this._connection.on("updateScore",function(n){objTennisVisualization.updateHeaderScoreData(n)});this._connection.on("updateStatistics",function(n){objTennisVisualization.updateMatchStatistics(n)});this._connection.on("forceReload",function(t){if(t!=null){var i=t.EventId;if(n._connection.state==signalR.HubConnectionState.Connecte&&i>0){n._connection.invoke("VisualizationGetMatchData",i).catch(function(n){var t="EventId: "+i+" "+n.message;n.stack!=undefined&&n.stack!=null&&(t+=" Stack: "+n.stack);Common.WebLog.create(Common.WebLogType.Warning,"Error SignalR forceReload (VisualizationGetMatchData) failed",t)}).then(function(n){objTennisVisualization.teardown(i);$("#iwlvc"+i).html("");$("#iwlvc"+i).remove();objTennisVisualization.initGameVisualization(i,n,Common.Application.instance.platform!=Common.Platform.Web)});return}}})},t.prototype.startHubSuccessfully=function(n){var i,t;if(this.subscribe(Common.Application.instance.license.licenseType),n!=null)for(i=n.length>1,t=0;t<n.length;t++)this.subscribeEvent(parseInt(n[t]),i)},Object.defineProperty(t.prototype,"gameLog",{get:function(){return this._gameLog},enumerable:!1,configurable:!0}),t.prototype.unSubscribeEvent=function(n){var t=this;this._connection.invoke("UnSubscribeEventV2",Common.Application.instance.license.licenseType,n,Common.Application.instance.languageIW.toUpperCase()).then(function(){t._event.modifier.unSubscribeLMTVisualization(n)}).catch(function(n){t.showReloadPageDialog(n,"EventClient","Source: UnSubscribeEvent")})},t.prototype.subscribeEvent=function(n,t){var i=this;t===void 0&&(t=!1);this._connection.invoke("SubscribeEvent",Common.Application.instance.license.licenseType,n,Common.Application.instance.languageIW.toUpperCase(),Common.Application.instance.country).then(function(t){i._event.modifier.renderEvent(n,t)}).catch(function(r){t?console.info("Failed to subscribe for event "+n+"."):i.showReloadPageDialog(r,"EventClient","Source: subscribeEvent - Error on EventId: "+n)})},t.prototype.subscribeTennisVisualization=function(n){var t=this;this._connection.state==signalR.HubConnectionState.Connected&&this._connection.invoke("VisualizationSubscribeEvent",n).then(function(t){objTennisVisualization.initGameVisualization(n,t,Common.Application.instance.platform!=Common.Platform.Web)}).catch(function(i){t._event.modifier.runScoreBoard(n);Common.WebLog.create(Common.WebLogType.Warning,"Error at VisualizationSubscribeEvent "+i.source+" - "+i.message,i.stack)})},t.prototype.unSubscribeTennisVisualization=function(n){var t=this;objTennisVisualization.teardown(n);this._connection.invoke("VisualizationUnSubscribeEvent",n).catch(function(i){t._event.modifier.runScoreBoard(n);Common.WebLog.create(Common.WebLogType.Warning,"Error at VisualizationUnSubscribeEvent "+i.source+" - "+i.message,i.stack)})},t.prototype.reloadTennisVisualization=function(n){var t=this;this._connection.invoke("VisualizationGetMatchData",n).then(function(t){objTennisVisualization.teardown(n);$("#iwlvc"+n).html("");$("#iwlvc"+n).remove();objTennisVisualization.initGameVisualization(n,t,Common.Application.instance.platform!=Common.Platform.Web)}).catch(function(i){t._event.modifier.runScoreBoard(n);Common.WebLog.create(Common.WebLogType.Warning,"Error at VisualizationGetMatchData "+i.source+" - "+i.message,i.stack)})},t.prototype.getTennisStatistics=function(n){var t=this;this._connection.invoke("VisualizationGetStatistics",n).then(function(t){objTennisVisualization.reCreateStatistics(n,t)}).catch(function(i){t._event.modifier.runScoreBoard(n);Common.WebLog.create(Common.WebLogType.Warning,"Error at VisualizationGetStatistics "+i.source+" - "+i.message,i.stack)})},t.prototype.createEventLog=function(n){var t=this;this._connection.eventHub.server.getEventLog(n,Common.Application.instance.language).done(function(i){t._gameLog.create(n,i)})},t.prototype.subscribe=function(n){var t=this;this._connection.invoke("SubscribeLiveBetting",n,Common.Application.instance.language,Common.Application.instance.country,this._betTypes).catch(function(n){t.showReloadPageDialog(n,"EventClient","Source: subscribe")})},t.prototype.unSubscribe=function(n){var t=this;this._connection.invoke("UnSubscribe",n,Common.Application.instance.language).catch(function(n){t.showReloadPageDialog(n,"EventClient","Source: UnSubscribe")})},t}(n.BaseClient);n.EventClient=t})(t=n.SignalR||(n.SignalR={}))}(LiveBetting||(LiveBetting={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var t=function(n){function t(t){var i=n.call(this,t)||this;return i._liveBettingBox=null,i._currentTab=t.currentGroup,i._liveBettingBox=t.liveBettingBox,i._betTypes=t.betTypes,i._startPage=t.startPage,i._leagueIds=t.leagueIds,i._liveBettingdelay=t.liveBettingdelay,i}return __extends(t,n),t.prototype.init=function(t){var i=this,r={url:t,error:{method:"CreateInfoLog",detail:"Restart hub (stop/start). Error: ",message:"Error SignalR Hub Error"},maxattempts:{message:"Error SignalR Hub restart Error",method:"CreateWarningLog"}};this._connection=n.prototype.init.call(this,r,function(){i.startHubSuccessfully()});this.initStartPageMessages();this._connection.onreconnected(function(){i._connection.state==signalR.HubConnectionState.Connected&&i.startHubSuccessfully()});this._connection.onclose(function(n){i._connection.state==signalR.HubConnectionState.Disconnected&&i.showReloadPageDialog(n,"EventDetail")})},t.prototype.startHubSuccessfully=function(){try{Common.Application.instance.isLoggedIn&&Betting.FreeBets.instance().load()}catch(t){}if(this._startPage){if(Common.Application.instance.platform==Common.Platform.Smartphone){this.subscribeMobileStartpage(Common.Application.instance.license.licenseType,this._currentTab);return}this.subscribe(Common.Application.instance.license.licenseType);return}if(!this._startPage){var n=this;this._leagueIds.forEach(function(t){n.subscribeLeague(Common.Application.instance.license.licenseType,t)});return}},t.prototype.initStartPageMessages=function(){var n=this;this._connection.on("updateStartPage",function(){var t=n;if(Common.Application.instance.platform==Common.Platform.Smartphone){n.smartphoneGetStartPageEvent(t._currentTab,!0);return}setTimeout(function(){$.ajax({url:"/live/getstartpageliveevents",dataType:"json",cache:!1,success:function(n){n!=null&&t._liveBettingBox.modifier.updateStartPage(n,null)}})},n._liveBettingdelay)});this._connection.on("updateEvent",function(t,i){n._liveBettingBox.modifier.updateEvent(t,i)});this._connection.on("addEvent",function(t,i){n._liveBettingBox.modifier.addEvent(t,i)});this._connection.on("updateEventStatus",function(t,i){n._liveBettingBox.modifier.updateEventStatus(t,i)});this._connection.on("updateOutcome",function(t,i,r,u){n._liveBettingBox.modifier.updateOdd(i,r,u)});this._connection.on("addMarket",function(t,i,r,u){n._liveBettingBox.modifier.addMarket(t,i,r,u)});this._connection.on("addOrUpdateScore",function(t,i){n._liveBettingBox.modifier.updateScore(t,i)});this._connection.on("updateMarket",function(t,i,r){n._liveBettingBox.modifier.updateMarket(t,i,r)});this._connection.on("updateMarketCount",function(){})},t.prototype.subscribe=function(n){var t=this;this._connection.invoke("SubscribeStartpage",n,Common.Application.instance.language,Common.Application.instance.country).catch(function(n){t.showReloadPageDialog(n,"EventClient","Source: SubscribeStartpage",!1)})},t.prototype.unSubscribe=function(n){var t=this;this._connection.invoke("UnSubscribeStartpage",n,Common.Application.instance.language).catch(function(n){t.showReloadPageDialog(n,"EventClient","Source: SubscribeStartpage",!1)})},t.prototype.subscribeLeague=function(n,t){var i=this;this._connection.invoke("SubscribeLeague",n,Common.Application.instance.language,t,Common.Application.instance.country).catch(function(n){i.showReloadPageDialog(n,"EventClient","Source: subscribeLeague",!1)})},t.prototype.subscribeMobileStartpage=function(n,t){var i=this;this._currentTab=t;t=t=="live"?t.toUpperCase():t;this._connection.invoke("SubscribeMobileStartpage",n,Common.Application.instance.language,Common.Application.instance.country,t).catch(function(n){i.showReloadPageDialog(n,"EventClient","Source: SubscribeMobileStartpage",!1)})},t.prototype.unSubscribeMobileStartpage=function(n,t){var i=this;this._connection.invoke("UnSubscribeMobileStartpage",n,Common.Application.instance.language,Common.Application.instance.country,t).catch(function(n){i.showReloadPageDialog(n,"EventClient","Source: UnSubscribeMobileStartpage",!1)})},t.prototype.smartphoneGetStartPageEvent=function(n,t){var i,u,r;t===void 0&&(t=!1);i=this;u=t?this._liveBettingdelay:0;n==""&&(r=$(".liveKosTabs.active"),r.length==1&&(n=$(r).data("kos-id")));setTimeout(function(){$.ajax({url:"/live/getstartpageliveevents",dataType:"json",data:{tab:n},cache:!1,success:function(t){t!=null&&(i._liveBettingBox.modifier.updateStartPage(null,t,n),i._currentTab!=n&&(i.unSubscribeMobileStartpage(Common.Application.instance.license.licenseType,i._currentTab),i.subscribeMobileStartpage(Common.Application.instance.license.licenseType,n)))}})},u)},t}(n.BaseClient);n.LiveBettingBoxClient=t})(t=n.SignalR||(n.SignalR={}))}(LiveBetting||(LiveBetting={})),function(n){var t;(function(n){var t=function(){function n(){}return n.prototype.getformatScore=function(n){var t=new RegExp("[a-zA-Z]");return t.test(n)?n:(n||"").replace(/ /g,"")},n}();n.Platform=t})(t=n.Html||(n.Html={}))}(LiveBetting||(LiveBetting={})),function(n){var t;(function(n){var t=function(){function n(n){n!==null&&(this._args=n.args,this._prefix=n.prefix,this._args.count=$(n.args.count),this._allowedRenders=["N2","N3"])}return n.prototype.addEvent=function(n,t){this._args.navigation.addEvent(t,this.getScore(t.scores))},n.prototype.updateEvent=function(n,t){t.isDeleted?(this.deleteAllLiveEvents(n),this._args.navigation.updateEvent(t)):t.isLive&&this.updateNavigationStatus(1,n,t.status,Extensions.String.ToShortTime(t.startTime))},n.prototype.updateEventStatus=function(n,t){this.updateNavigationStatus(1,n,t.status,t.gameTime)},n.prototype.updateEventScore=function(n,t){t.value=this.getformatScore(t.value);t.isDeleted?$(this._prefix.score+n).html(""):$(this._prefix.score+n).html(t.value)},n.prototype.deleteAllLiveEvents=function(n){var t=$(this._prefix.event+"."+n);return t.length>0&&t.remove(),t},n.prototype.addMarket=function(n,t){if(t.calCol==1){var i=this._args.navigationEvents.find(".BO"+n.eventId+".group-1");this.setMarket(n,t,i,!0)&&this._args.navigation.setMarketHandler(n.eventId,t.id)}},n.prototype.updateMarket=function(n,t,i,r){r===void 0&&(r=!0);var u=this.getGroup(t);u.length>1&&(i.calCol=Number(u.first().attr("data-group")),i.calCol>0&&(this.clearOutComes(n,u,i),r&&i.calCol==1&&this._args.navigation.updateMarket(n)))},n.prototype.updateOutcome=function(n,t,i,r){var u=this.getOffer(i);u.length>0&&(this.updateLockStatus(u,this.isLocked(r))||this.updateTrend(u,r.up,r.odd),this.updateOdd(u,r.odd||0),this.updateBet(i,r.odd||0,r.isDeleted||!1))},n.prototype.getQuoteFromHtml=function(n){return Extensions.String.ToNumber(n.find(".quote").html())},n.prototype.getNavigationeRow=function(n){return this._args.navigationEvents.find("."+n)},n.prototype.getEmptyMarket=function(n,t,i){for(var r="",u=0;u<n;u++)r+='<td class="BO'+t+" group-"+i+'" data-group="'+i+'"><\/td>';return r},n.prototype.setMarket=function(n,t,i,r){var f=this,u;return(r===void 0&&(r=!1),t.mainBet=t.mainBet||!1,u=new Helpers.OutComeData,u.main=t.mainBet,i.length>1)?(r?u.navi=i:u.live=i,t.outcomes.forEach(function(i,r){var e=t.calendarInfo||"";t.freeBet=Betting.FreeBets.instance(Betting.BettingSlip.get()).check(n,i.odd);u.index=r;u.tip=i.tip;u.html=f.getOddHtml(i.odd);u.css=f.getOutComeCss(i,t);switch(t.render){case"N2":e.length>0?u.setInfo(r,t.id,e):u.index==1&&u.setCss(t.id);break;case"21":u.setInfo(r,t.id,e)}u.setHtml(t,i);f._args.bs.hasBet(i.id)&&f.updateBet(i.id,i.odd,!1)}),!0):!1},n.prototype.updateLockStatus=function(n,t){return t?n.addClass("locked"):n.hasClass("locked")&&n.removeClass("locked"),t},n.prototype.getScore=function(n){return n.length>0&&n[0].main?this.getformatScore(n[0].value):""},n.prototype.getStatus=function(n,t,i){var r=this.getStatusText(t),u=this.getGameTime(i);switch(n){case 1:return r+(r.length>0&&u.length>0?", ":"")+u;case 2:return u+(r.length>0&&u.length>0?"\n\n":"")+r;default:return this.isGameTime(u)?u:r.length>0?r:""}},n.prototype.updateOdd=function(n,t){t>0&&n.find(".quote").html(Common.Helper.getFormatedOdd(t))},n.prototype.updateTrend=function(n,t,i){var f=this.getQuoteFromHtml(n),r=t?"up":"down",u=n.find(".trend");f!=i/100&&(n.addClass(r),u.addClass(r),setTimeout(function(){n.removeClass(r)},2e3),setTimeout(function(){u.removeClass(r)},4e3))},n.prototype.updateBet=function(n,t,i){var r,u,f;i===void 0&&(i=!1);r=this.getOffer(n);u=this._args.bs.singleBets[n];u&&r.length>0&&(f=r.hasClass("locked"),this._args.bs.updateLiveBet({id:n,isLocked:f,quote:t,isExpired:i}))},n.prototype.getOffer=function(n){return $(".BO"+n)},n.prototype.getGroup=function(n){return $(".BOG"+n)},n.prototype.clearOutComes=function(n,t,i){var r=this;t.each(function(t,u){var f=$(u),e=f.attr("data-betting");if(e){var s=JSON.parse(e),o=Number(s[0]),h=r.getQuoteFromHtml(f);r._args.bs.hasBet(o)&&r.updateBet(o,100*h,!0)}r.removeOutComeProperties(f,n,i.calCol)})},n.prototype.removeOutComeProperties=function(n,t,i){n.length>0&&n.removeAttr("class").removeAttr("data-group").removeAttr("data-betting").attr("class","BO"+t+" group-"+i).attr("data-group",i).html("")},n.prototype.getOddHtml=function(n){return'<strong class="quote">'+Common.Helper.getFormatedOdd(n)+'<\/strong><label class="icon trend"><\/label>'},n.prototype.getOutComeCss=function(n,t){return("BO"+n.id+" group-"+t.calCol+" BOG"+t.id+" bo hl"+(t.freeBet?" fb":"")+(this.isLocked(n)?" locked":"")+(this._args.bs.hasBet(n.id)?" active":"")).replace(/  /gi," ").trim()},n.prototype.getformatScore=function(n){var t=new RegExp("[a-zA-Z]");return t.test(n)?n:(n||"").replace(/ /g,"")},n.prototype.isLocked=function(n){return n.locked||n.odd/100==1||!1},n.prototype.getGameTime=function(n){var t=n.toLowerCase().match("p");return n!=null&&n.length>0&&t==null?n:""},n.prototype.updateNavigationStatus=function(n,t,i,r){this._args.navigationEvents.find(this._prefix.state+t).html(this.getStatus(n,i,r))},n.prototype.isGameTime=function(n){var t=parseInt(n,10),i=n.match(":");return i!=null&&i.length==1?!1:n.length>0&&!isNaN(t)&&t>0},n.prototype.getStatusText=function(n){return n!=null&&n.text!=null&&n.text.length>0?n.text:""},n}();n.Base=t})(t=n.Modifier||(n.Modifier={}))}(LiveBetting||(LiveBetting={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i={Enabled:"E",Deleted:"D"},r=function(n){function t(t){var i=n.call(this,t)||this;return i._maxLogEntry=5,i._lastlogId=0,i._logIdPrefix="#Log-",i._logListIdPrefix="#LogList-",i._logIdFirstItem="#LogFirstItem-",i._log=Templates.Html.Log(Common.Application.instance.platform),i}return __extends(t,n),t.prototype.addMarkets=function(){},t.prototype.addMarket=function(t,i){n.prototype.addMarket.call(this,t,i)},Object.defineProperty(t.prototype,"logListId",{get:function(){return this._logListIdPrefix},enumerable:!1,configurable:!0}),t.prototype.createGameLog=function(n,t){if(t!=undefined)for(var i=0;i<t.length;i++)this.updateLog(n,t[i],!0)},t.prototype.updateGameLog=function(n,t){switch(t.state){case i.Enabled:this.updateLog(n,t);break;case i.Deleted:this.deleteLog(t.id)}},t.prototype.checkLogIdForCorrectOrder=function(n){return n<this._lastlogId?!1:!0},t.prototype.addEvent=function(t,i){n.prototype.addEvent.call(this,t,i)},t.prototype.renderEvent=function(){},t.prototype.updateMarket=function(t,i,r){n.prototype.updateMarket.call(this,t,i,r)},t.prototype.addMarketGroup=function(){},t.prototype.updateMarketGroup=function(){},t.prototype.updateScore=function(t,i){n.prototype.updateEventScore.call(this,t,i)},t.prototype.runScoreBoard=function(){},t.prototype.setBetsInBettingSlipActive=function(){},t.prototype.updateLog=function(n,t,i){var f;if(i===void 0&&(i=!1),$(this._logIdPrefix+t.id).length==0){f="";t.css.length>0&&(f="sp_ac icon "+t.css);this._lastlogId=t.id;var u=$(this._logListIdPrefix+n),r=$(this._logIdFirstItem+n),e=Extensions.String.Format(this._log.Row.Default,[t.id,f,t.time,t.message]);r.length>0?(r.html().length>0&&(u.prepend(r.html()),r.html(""),u.children().length>this._maxLogEntry&&u.addClass("scroll"),r.next().addClass("active")),r.append(e)):u.prepend(e)}},t.prototype.deleteLog=function(n){$(this._logIdPrefix+n).remove()},t.prototype.unSubscribeLMTVisualization=function(){},t}(n.Modifier.Base);t.Event=r})(t=n.Modifier||(n.Modifier={}))}(LiveBetting||(LiveBetting={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i=function(t){function i(n){var i=t.call(this,n)||this;return i._eventClient=n.eventClient,i._scoreWidget,i}return __extends(i,t),i.prototype.renderEvent=function(n,t){if((t.visualizationEnabled||t.sport.id!=11)&&t.sport.id==11){($.cookie("iw_UseScoreBoard")==="false"||$.cookie("iw_UseScoreBoard")===undefined)&&this._eventClient.subscribeTennisVisualization(t.id);return}},i.prototype.addMarketGroup=function(){return},i.prototype.addMarket=function(){return},i.prototype.updateMarket=function(){return},i.prototype.updateOutcome=function(){var r;return},i.prototype.updateMarketGroup=function(){return},i.prototype.updateScore=function(){return},i.prototype.updateEventStatus=function(){return},i.prototype.updateEvent=function(){return},i.prototype.setBetsInBettingSlipActive=function(){},i.prototype.addEvent=function(){return},i.prototype.getMarkets=function(n,t,i){for(var o,f,u="",e=0;e<t.length;e++){var r=t[e],s=r.expand==undefined||!r.expand?"tg-collapsed":"",h=$("#lei"+n+" .group.group"+r.key).hasClass("none")?"none":"";for(u+='<div id="otg'+r.key+'" class="offer-tg '+s+" fg"+this.getFilterGroupKey(r.key)+'" data-group="'+r.key+'" data-order="'+r.order+'">',u+=this.getMarketGroupHeader(n,r),o=r.expand!=undefined&&r.expand,u+='<div class="offer-groups">',f=0;f<r.markets.length;f++)u+=this.getMarketContainer(n,r.markets[f],o,i);u+='<\/div><div class="spacer"><\/div><\/div>'}return u},i.prototype.getMarketContainer=function(n,t,i,r){var f=this.getOutcomes(n,t,r),e=t.info!=undefined,u="";return e&&(u='<a href="javascript:void(0)" class="info-og" title="'+t.info+'"><span class="icon info-og-icon"><\/span><\/a>'),'<div class="og BOG'+t.id+'" id="og'+t.id+'" data-order="'+t.order+'"><div class="og-name"><div>'+t.name.text+" "+u+'<\/div><\/div><div class="offer-container">'+f+"<\/div><\/div>"},i.prototype.getOutcomes=function(t,i,r){for(var u,f,o="",e=0;e<i.outcomes.length;e++)(u=i.outcomes[e],f=u.tip,u.name!=undefined&&u.name.text!=undefined)&&(f=u.name.text,f===""&&(f=u.name.text),u.odd==100&&(u.locked=!0),i.freeBet=Betting.FreeBets.instance(Betting.BettingSlip.get()).check(r,u.odd),o+='<div onclick="'+n.Helper.QuickBet.getHandler(t,i.id,u.id,!0,!1)+'" class="o'+u.id+" BO"+u.id+" quote-btn new "+(u.locked?"locked quote-lock":"")+" "+(i.freeBet?"fb":"")+'" '+(u.locked?'disabled="disabled"':"")+' data-order="'+u.order+'">\n\t\t\t\t\t<span class="quota quote" data-quote-val="'+u.odd+'">'+Common.Helper.getFormatedOdd(u.odd)+'<\/span>\n\t\t\t\t\t<span class="tip">'+u.tip+'<\/span>\n\t\t\t\t\t<span class="tip-name">'+f+'<\/span>\n\t\t\t\t\t<span class="icon trend-icon trend"><\/span>\n\t\t\t\t\t<span class="icon locked-icon"><\/span>\n\t\t\t\t<\/div>');return'<div class="liveog-'+i.render+'">'+o+"<\/div>"},i.prototype.getMarketGroupHeader=function(n,t){var i=t.name.text+(t.markets!=undefined?' <span class="otg-bog-count">('+t.markets.length+")<\/span>":' <span class="otg-bog-count"><\/span>');return'<h2 class="list-subtitle"><span>'+i+'<\/span> <span class="otg-toggle"><span class="icon arrow_down"><\/span><span class="icon arrow_up"><\/span><\/span><\/h2>'},i.prototype.getEventHeader=function(n,t){var i="";return i='<span class="scoreboard-buttons"><a class="toggle-live-stats stream play logout tennis" href="javascript:void(0)" onclick="LiveStream.Mobile.StreamPlayer.Instance.MessageTennis(".error-box.e-sports-stream");" style="display: inline;"><span class="event-stream"><\/span><\/a><\/span>','<div class="scoreboardcontainer"><h2 class="live-stats-title" data-league="'+t.league.name.text+'">'+t.league.name.text+" "+i+'<\/h2><div id="lv'+n+'" class="mobile-lmt srlive_container"><\/div><div id="iwlvc'+n+'"><\/div><div id="IwScoreboard'+n+'"><\/div><\/div>'},i.prototype.addGroupsToFilter=function(t,i){for(var u,r,f,o,s,h,c,l=$("li.menu-active").length==0?0:Number($("li.menu-active").data("groupid")),e=0;e<i.length;e++)u=i[e],$("#group"+this.getFilterGroupKey(u.key)).length<=0&&(r=u.key,f=Translation.getTextId("groupTranlslation"+r).replace("$SET.",""),u.key.indexOf("_")>1&&(r=u.key.substring(0,u.key.indexOf("_")),f=Translation.getTextId("groupTranlslation"+r).replace("$SET.",""),Number(r)===29&&(r="14",f=Translation.getTextId("groupTranlslation"+r)),Number(r)===32&&(r="24",f=Translation.getTextId("groupTranlslation"+r))),o='<li id="group'+r+'" data-groupId="'+r+'" data-order="'+u.order+'"><a href="#">'+f+'<span class="active-indicator"><\/span><\/a><\/li>',$("#eventContainer ul.menu").append(o));$("#group0").length<=0&&$("#eventContainer ul.menu").append('<li class="menu-active" id="group0" data-groupId="0" data-order="0"><a href="#">'+Translation.getTextId("Live Filter All")+'<span class="active-indicator"><\/span><\/a><\/li>');s=$("#eventContainer ul.menu").find("li");h=s.sort(n.Helper.Sorter.sortByOrder);$("#eventContainer ul.menu").html(h);c=this;this.setFilterClickEvent()},i.prototype.getFilterGroupKey=function(n){var t=n;return n.indexOf("_")>1&&(t=n.substring(0,n.indexOf("_")),Number(t)===29&&(t="14"),Number(t)===32&&(t="24")),Number(t)},i.prototype.toggleMarketGroup=function(){},i.prototype.getGroupKey=function(n){if(n.toString().indexOf("_")>1){var t=n.substring(0,n.toString().indexOf("_"));return Number(t)===29&&(t="14"),Number(t)===32&&(t="24"),t}return n},i.prototype.setFilterClickEvent=function(){$("ul.menu li").unbind("click");$("ul.menu li").on("click",function(){var n=$(this).attr("data-groupid");n=="0"?($(".offer-tg").show(),$(".offer-tg").removeClass("tg-collapsed")):($(".offer-tg").hide(),$(".fg"+n).show(),$(".fg"+n).removeClass("tg-collapsed"));$(".event-offer .menu li").removeClass("menu-active");$(this).addClass("menu-active")})},i}(n.Modifier.Event);t.SmartphoneEvent=i})(t=n.Modifier||(n.Modifier={}))}(LiveBetting||(LiveBetting={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i=function(t){function i(n){var i=t.call(this)||this;return i.eventUrl=n,i}return __extends(i,t),i.prototype.getStartPageBetForBetSlip=function(){throw new Error("Method not implemented.");},i.prototype.getStartPageBetContainer=function(){throw new Error("Not implemented");},i.prototype.getLeaguePageTable=function(){throw new Error("Not implemented");},i.prototype.getStartPageKosTab=function(n,t,i,r){var f="",u;return Common.Application.instance.license.licenseType==License.LicenseType.Betworld&&(f="w"),u="large kos "+f+" icon_"+n,isNaN(Number(n))&&(u=n=="STREAM"?"streamTab event-stream":n+" flag"),'<li class="liveKosTabs kosTab-'+n+'" data-kos-id="'+n+'"><a data-kos-id="'+n+'" href="/'+i+"/Live?kosFilter="+n+'"><span class="'+u+'"><\/span><span class="count">'+t+'<\/span><span class="name kos-text">'+r+"<\/span><\/a><\/li>"},i.prototype.getStartPageStreamTab=function(n){return'<li class="liveStreamTab"><a data-stream-id="stream" href="#"><span class="streamTab event-stream"><\/span><span class="count">('+n+")<\/span><\/a><\/li>"},i.prototype.getStartPageRow=function(n,t){var r=n.gameTime=="P"?n.status.text:n.gameTime+(n.status.text!=""?" ("+n.status.text+")":"");n.sport.id===11&&(r=n.status.text);var e=n.streamAvailable&&Common.Application.instance.license.isStreamAvailable?'<span class="event-stream"><\/span>':"",o=n.mainMarket!=null?"-"+n.mainMarket.render:"",s=t,u="",f="",i=n.name.text.split(" - ");return i.length==2&&(f='<span class="team" title="'+i[0]+'">'+i[0]+'<\/span><span title="'+i[1]+'" class="team">'+i[1]+"<\/span>"),n.scores!=undefined&&n.scores.length>0&&(u='<span class="score score'+n.id+'"><span>'+n.scores[0].value.split(" ").join("").replace(":","<br />")+"<\/span><\/span>"),'<li class="quick-bet-event event" data-event-id="'+n.id+'" data-kosid="'+n.sport.id+'">\n\t\t\t\t\t\t<span class="home-live-container eventcontainer">\n\t\t\t\t\t\t\t<span class="matchcontainer">\n\t\t\t\t\t\t\t\t<a href="'+this.eventUrl+n.id+'" rel="nofollow" class="event-desc">\n\t\t\t\t\t\t\t\t\t<span class="player">'+f+'<\/span>\n\t\t\t\t\t\t\t\t\t<span class="status">\n\t\t\t\t\t\t\t\t\t\t<span>'+n.league.name.text+'<\/span><br>\n\t\t\t\t\t\t\t\t\t\t<span class="gametime'+n.id+'">'+r+"<\/span> "+e+'\n\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t<\/a>            \n\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t<span class="offercontainer">\n\t\t\t\t\t\t\t\t<span class="event-score">\n\t\t\t\t\t\t\t\t\t'+u+'\n\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t<span class="bet-col render'+o+'">\n\t\t\t\t\t\t\t\t\t<span class="offer-container" id="MainBet'+n.id+'" data-event-id="'+n.id+'">\n\t\t\t\t\t\t\t\t\t\t'+s+"\n\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/li>"},i.prototype.getEmptyBet=function(){throw new Error("Not implemented");},i.prototype.getStartPageBet=function(t,i,r,u,f,e,o,s,h){var c="",a=o||h<=100?" locked":"",l;f=f.indexOf("fb")>0?"freebet":"";try{e.toLocaleLowerCase()=="x"?c=Translation.getTextId("Draws"):(l=s.split(" - "),l.length===2&&l[Number(e)-1]!=null&&(c=l[Number(e)-1]))}catch(v){c=""}return'<div data-order="1" class="o'+i+" quote-btn "+a+" "+f+'" onclick="'+n.Helper.QuickBet.getHandler(t,r,i,!0,!1)+'"><span class="quota quote" data-quote-val="'+h+'">'+u+'<\/span><span class="tip">'+e+'<\/span><span class="tip-name">'+c+'<\/span><span class="icon locked-icon"><\/span><span class="icon trend-icon trend"><\/span><\/div>'},i}(t.Platform);t.Smartphone=i})(t=n.Html||(n.Html={}))}(LiveBetting||(LiveBetting={}));RealityCheck=function(){function r(t){var r=global.getUnauthorizedResult(t);r.isUnauthorized&&(r.isSessionTimeout&&n.showSessionEnd(r),i=!1)}function f(n){n===-1?i=!1:t=new Date((new Date).valueOf()+n*1e3)}function u(){i&&setTimeout(e,o)}function e(){var i="";n.gaming&&(i="?isGaming=true");t===null?$.get(app.path+"/realitycheck/next"+i).done(function(t){f(t.realityCheckIn);(t.isGamingSessionTimeout||t.isGamingSessionLimitRequired)&&(t.isGamingSessionLimitRequired?n.showSessionEnd(t,"/account/playerprotectionpage"):t.isGamingSessionTimeout&&n.showSessionEnd(t))},"json").fail(r).always(function(){u()}):t.valueOf()<=(new Date).valueOf()?$.post(app.path+"/realitycheck"+i).done(function(t){t.realityCheckIn>0&&n.show(t)&&$.post(app.path+"/realitycheck/setshown").fail(r);f(t.realityCheckIn);t.errorMessage||(t.errorMessage=t.message);t.isGamingSessionLimitRequired?n.showSessionEnd(t,"/account/playerprotectionpage"):t.isGamingSessionTimeout&&n.showSessionEnd(t)},"json").fail(r).always(function(){u()}):u()}var o=5e3,t=null,n=null,i=!0;return{init:function(t){n=t;e()}}}();Blog=function(n){function r(t,i,r,u){return i!==""?n.get(app.path+"/blog/articles",{instance:t,category:i,articleCount:4,startIndex:r*4+1},function(t){n(u).append(t)}):n.get(app.path+"/blog/articles",{instance:t,articleCount:4,startIndex:r*4+1},function(t){n("#blog-IWMagazin").append(t)})}function t(t){var i=n("#news-popover");i.length&&n.get(t,function(n){n!==""&&(i.children(".news-content").html(n),i.parent().removeClass("collapsed"))})}function i(t,i){if(i.success&&i.result){if(n(t+" div.result.charts span").html(i.html),n(t+" div.result.charts").addClass("show"),n(t+" .question").removeClass("active"),n(t+" .question").addClass("hide"),n(t+" button.forward").hide(),n(t+" button.back").hide(),n(t+" div.questionheader span.page").hide(),n(t+" input").attr("disabled",!0),n(t+" .result.charts a").html("Details einblenden"),n(t+" .quizName").hide(),i.correctAnswerList.length>0)for(var r=0;r<i.correctAnswerList.length;r++)n("#answer-"+i.correctAnswerList[r]).addClass("correct"),n.inArray(i.correctAnswerList[r],i.userAnswerList)===0?(n("#answer-"+i.correctAnswerList[r]+" span").html("Ihre Antwort - Richtige Antwort"),n(t+" input#"+i.correctAnswerList[r]).prop("checked",!0)):n("#answer-"+i.correctAnswerList[r]+" span").html("Richtige Antwort");if(i.userAnswerList.length>0)for(r=0;r<i.userAnswerList.length;r++)n("#answer-"+i.userAnswerList[r]).hasClass("correct")||(n("#answer-"+i.userAnswerList[r]).addClass("incorrect"),n("#answer-"+i.userAnswerList[r]+" span").html("Ihre Antwort - Falsch"),n(t+" input#"+i.userAnswerList[r]).prop("checked",!0))}}n(".category-menu").on("click",".sub-menu-toggle",function(t){t.stopPropagation();var i=n(this).parents("li");i.toggleClass("show-sub-menu")});n(".blog").on("click",".top-news .blog-list li a",function(i){var r=n(this).attr("href");t(r);i.preventDefault()});n(".blog-container").on("click",".top-news .blog-list-home li a",function(i){var r=n(this).attr("href");t(r);i.preventDefault()});n(".blgover").on("click",".top-news .blog-list-home li a",function(i){var r=n(this).attr("href");t(r);i.preventDefault()});n("#blog-loadbtn").on("click",function(t){var i=parseInt(n(this).attr("data-page")),u=n(this).attr("data-category"),f=n(this).attr("data-instance"),e="#blog-"+n(this).attr("data-container");n(this).attr("data-page",i+1);parseInt(n(this).attr("data-page"))>parseInt(n(this).attr("data-pageTotal"))&&n("#blog-loadbtn").hide();r(f,u,i,e);t.preventDefault()});n("#blog-bettingbtn").on("click",function(){window.location="/sport"});return{checkForExistingQuizResult:function(t){var r="#quiz-"+t;n.ajax({type:"POST",url:app.path+"/Blog/CheckForResultAndReturnResult",dataType:"json",data:{quizId:t},success:function(n){return i(r,n)}})},saveQuizResult:function(t,r,u,f){var e="#quiz-"+t,h=n(e+" span.active")[0].id.split("-"),o=Number(h[1]),s=Number(o)+1;return f?n.ajax({type:"POST",url:app.path+"/Blog/SaveQuizDataToDbAndGetResults",dataType:"json",data:{quizId:t,questionId:r,answerId:u},success:function(t){n(e+" button.back").removeClass("active");i(e,t)}}):n.post(app.path+"/Blog/SaveQuizData",{quizId:t,questionId:r,answerId:u},function(t){t.success&&(n(e+" #question-"+o).addClass("hide"),n(e+" #question-"+o).removeClass("active"),n(e+" #question-"+s).removeClass("hide"),n(e+" #question-"+s).addClass("active"),n(e+" .questionheader .currentPage").html(s),n(e+" button.back").addClass("active"))},"json").fail(function(n){n.status===401&&alert("error")}),1},updateTimeCounter:function(t,i){var r=new Date,s=new Date(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),f=Math.floor((s-t)/1e3),u=parseInt(f/3600,10),e=parseInt(f/60,10)-60*u,o=f-3600*u-60*e,h=String("{0}:{1}:{2}").Format((u<10?"0":"")+u,(e<10?"0":"")+e,(o<10?"0":"")+o);n(i+" .questionheader .timer").html(h);n(i+" .questionheader .neededTime").is(":visible")||n(i+" .questionheader .neededTime").show()},loadFromHash:function(){if(window.location.hash!==""){var n=app.path+"/de/magazin/"+window.location.hash.substring(1);window.location.href=n}}}}(jQuery)