(function(c){var d=function(){var b={textPlaceHolder:"#placeholder_textstats",textPlaceHolderLabels:"#placeholder_textlabels",piePlaceholder:"#placeholder_chartpie",barPlaceholder:"#placeholder_chartbar",usersPlaceHolder:"#placeholder_text",perpagePlaceHolder:"#placeholder_perpage"};var h;var j;var i=jrealtimeIntervalRealStats*1000;this.getModel=function(){modelInstance=new JRealtimeModelRealtimestats(b);return modelInstance};this.getView=function(){viewInstance=new JRealtimeViewRealtimestats(b);return viewInstance};(function a(){h=this.getModel();j=this.getView();setTimeout(function(){j.renderCharts(false);var l=function(n,k){if(!Array.isArray(n)){j.renderErrorMessages(n);clearInterval(e);return}j.renderTextData(n);j.renderUserlistStats(n);j.renderPerPagesStats(n);j.renderMap(n);c("text").filter(function(m){return c(this).text()=="NaN"}).hide();c(".preview").fancybox({width:"85%",height:"90%",autoScale:false,transitionOut:"none",type:"iframe"})};h.doPoll(l)},100);var g=function(m,n){if(!Array.isArray(m)){j.renderErrorMessages(m);clearInterval(e);return}j.renderTextData(m);if(!n){j.renderCharts(m)}c("text").filter(function(k){return c(this).text()=="NaN"}).hide();j.renderUserlistStats(m);j.renderPerPagesStats(m);j.renderMap(m);c(".preview").fancybox({width:"85%",height:"90%",autoScale:false,transitionOut:"none",type:"iframe"})};var e=setInterval(function f(){h.doPoll(g)},i);c(window).on("resize",function(){j.redrawCharts()})}).call(this)};window.JRealtimeControllerRealtimestats=d})(jQuery);