"undefined"==typeof GeniusSportsEventHandler&&(GeniusSportsEventHandler={}); (function(){function v(a,d,e){let b=new Date;$j.ajax({type:"POST",dataType:"JSON",url:(PageConfig.enableQueryDataSubdomain&&null!=QueryDataSubDomainUtil.queryHost?QueryDataSubDomainUtil.queryHost:"")+"/exchange/member/playerService/queryGeniusSportsEvent",data:d,xhrFields:{withCredentials:!0},success:function(c){try{if(c){null!=a&&(a.isInit=!1,c.version>a.version&&(a.version=Math.max(c.version,a.version)));var f=new Date,g=f.getTime()-b.getTime();500=a)&&1===g?(c.find("span").html("Suspend"), c.show()):GeniusSportsMarketUtil.isClosed(b)&&1===g?(c.find("span").html("Closed"),c.show()):c.hide(),f.find("#selectionName").html(d.selectionName),f.find("#info").prop("odds",a),f.find("#info").html(0==a?"":a),SparkHandler.addSparkClass(f.find("#back_1"),a))}}function S(a,d,e,b){a=function(c,f,g,k,m,q,n,w){return function(){let u=f.find("#info").prop("odds")||0;0!=u&&("true"==PageConfig.ENABLE_ONE_CLICK_BET&&OneClickBetHandler.isEnable()&&1==PageConfig.isOneClickBet?PageConfig.ENABLE_ONE_CLICK_BET_ALL_PAGE&& OneClickBetHandler.isEnableSubmitOneClickBet()&&OneClickBetHandler.placeGeniusSportsBet(c,g,k,m,q,n,u):(GeniusSportsEventHandler.removeSelectClass(),f.addClass("select"),GeniusSportsBetHandler.appendBoard(c,g,k,m,q,n,u)))}}(a,d,e,b.eventType,b.eventId,b.marketId,b.id);d.on("click",a)}function H(){$j("#fancyBetHead").find("#showGeniusSportsBtn").show();FancyBetMarketHandler.isShowFancyBet()||(FullMarketUtil.view("sportsBookBet"),$j("#sportsBookWrap").find("#showFancyBetBtn").hide())}GeniusSportsEventHandler.queryTasks= [];GeniusSportsEventHandler.tab="all";let y=new HashMap,E=!1;const I=[EventType.CRICKET.unique(),EventType.TENNIS.unique(),EventType.SOCCER.unique(),EventType.VIRTUAL_CRICKET.unique()];GeniusSportsEventHandler.init=function(a,d){r(a);if(d){H();$j("#overWrap").find("#sportsBookNoBet").show();FancyBetMarketHandler.isShowFancyBet()||GeniusSportsEventHandler.initTask(a,!1);$j("#showFancyBetBtn").on("click",function(){FullMarketUtil.view("fancyBet");FancyBetMarketHandler.initTask();GeniusSportsEventHandler.isShowSportsBook()&& GeniusSportsEventHandler.abortTask(ApiSiteType.GENIUSSPORTS.unique())});var e=$j("#sportsBookTab_"+a+"_"+PageConfig.selectEventType);e.show();e.find("[id^=tab_]").on("click",function(){var b=$j(this).attr("id").replace("tab_","");GeniusSportsEventHandler.tab=b;b=PageConfig.geniusSportEventId;r(a);p(a,b,null,!0);GeniusSportsBetHandler.resetAllBetBoard();e.find("#moreDropList").hide()});e.find("#moreDropBtn").on("click",function(b){let c=e.find("#moreDropList");$j(document).on("click",function(){$j(document).off("click"); c.hide()});c.is(":visible")?c.hide():c.show();b.stopPropagation()});d=$j("#sportsBookWrap").find("#sportsBookHead");d.find("#sportsBookName").html("Premium "+EventType.getInstanceOf(PageConfig.selectEventType).desc);d.find("#sportsBookRules").on("click",function(){let b=$j("[id^=sportsBookRulesWrap_"+a+"]"),c="Rules of Premium "+EventType.getInstanceOf(PageConfig.selectEventType).desc;b.find("#geniussportsRulesTitle").html(c);EventType.TENNIS.value==PageConfig.selectEventType?(b.find("#geniussportsTennisRules").show(), b.find("#geniussportsCricketRules").hide(),b.find("#geniussportsSoccerRules").hide()):EventType.CRICKET.value==PageConfig.selectEventType||EventType.VIRTUAL_CRICKET.value==PageConfig.selectEventType?(b.find("#geniussportsCricketRules").show(),b.find("#geniussportsTennisRules").hide(),b.find("#geniussportsSoccerRules").hide()):EventType.SOCCER.value==PageConfig.selectEventType&&(b.find("#geniussportsCricketRules").hide(),b.find("#geniussportsTennisRules").hide(),b.find("#geniussportsSoccerRules").show()); b.fadeIn()});E=!0}};GeniusSportsEventHandler.activeSportsBook=function(){FullMarketUtil.view("sportsBookBet");GeniusSportsEventHandler.isShowSportsBook()&&GeniusSportsEventHandler.initTask(ApiSiteType.GENIUSSPORTS.unique(),!1);FancyBetMarketHandler.abortTask()};GeniusSportsEventHandler.isEnableSportsBookBet=function(){return PageConfig.isEnableGeniusSportsBook};GeniusSportsEventHandler.isShowSportsBook=function(){return GeniusSportsEventHandler.isEnableSportsBookBet()&&PageConfig.hasGeniusSportsMarkets}; GeniusSportsEventHandler.isViewMultiMarket=function(){return-1