"undefined"==typeof SportsBookMarketUtil&&(SportsBookMarketUtil={}); (function(){SportsBookMarketUtil.isInactive=function(a){return a==SportsBookMarketStatusType.INACTIVE.unique()};SportsBookMarketUtil.isOpen=function(a){return a==SportsBookMarketStatusType.OPEN.unique()};SportsBookMarketUtil.isSuspend=function(a){return a==SportsBookMarketStatusType.SUSPEND.unique()};SportsBookMarketUtil.isClosed=function(a){return a==SportsBookMarketStatusType.CLOSED.unique()};SportsBookMarketUtil.isSettled=function(a){return a==SportsBookMarketStatusType.SETTLED.unique()};SportsBookMarketUtil.isHide= function(a){return a==SportsBookMarketStatusType.HIDE.unique()};SportsBookMarketUtil.sortMarkets=function(a,b,c,f){var d=a.marketType.sort,e=b.marketType.sort,g=a.marketType.specifierKey,h=b.marketType.specifierKey,k=a.apiSiteSpecifier,l=b.apiSiteSpecifier;a=a.marketType.selectionSpecifierKey;b=b.marketType.selectionSpecifierKey;if(d==e)if("undefined"!=typeof g&&"undefined"!=typeof h&&null!=k&&null!=l)try{var m=$j.parseJSON(k)[g],n=$j.parseJSON(l)[h];if($j.isNumeric(m)&&$j.isNumeric(n)){if(Number(m)> Number(n))return 1;if(Number(m)==Number(n)&&"undefined"!=typeof a&&"undefined"!=typeof b){var p=$j.parseJSON(k)[a],q=$j.parseJSON(l)[b];return $j.isNumeric(p)&&$j.isNumeric(q)?Number(p)>Number(q)?1:-1:0}return-1}return 0}catch(r){return Trace.printStackTrace(r),0}else return c.localeCompare(f);return d>e?1:-1};SportsBookMarketUtil.sortSelections=function(a,b,c,f){if(ApiSiteType.OW.unique()==c&&OwBetType.getInstanceOf(f).orderById){if(a.id>b.id)return 1;if(a.id b.apiSiteSelectionId)return 1;if(a.apiSiteSelectionId