function gaTrack(e){localStorage.getItem("disableTfAnalytics")||(_gaq=window._gaq||[],_gaq.push(["_trackPageview",e]))}function gaEvent(e){localStorage.getItem("disableTfAnalytics")||(_gaq=window._gaq||[],e.splice(0,0,"_trackEvent"),_gaq.push(e),window.tf&&window.tf.isDebug()&&console.log("GA Event: "+e))}function gapv(e,t){localStorage.getItem("disableTfAnalytics")||(gtag("config",window.gaToken,{page_title:t,page_path:e}),window.tf&&window.tf.isDebug()&&console.log("GA PV: "+e+" | "+t))}function gavpv(e,t){localStorage.getItem("disableTfAnalytics")||(gtag("config",window.gaToken,{page_title:"Virtual-"+t,page_path:"vpv/"+e}),window.tf&&window.tf.isDebug()&&console.log("GA VPV: "+e+" | "+t))}function gavpvl(e,t){if(properties.loggedInUser()){var i=properties.loggedInUser(),n="non-trefis";i.email.endsWith("trefis.com")&&(n="trefis"),gavpv(e+"/loggedin/"+n+"/UserID="+i.userId,t)}else gavpv(e+"/loggedout",t)}function showOverlay(e){window.helpPopup&&helpPopup.hide();var t=$("#overlay");tf.ie6&&t.height(Math.max($("body").height(),1200)),t.show(),e&&t.css("opacity",0).animate({opacity:.7},e),tf.ie6||$("#headerAnnounce").css("top","0px")}function hideOverlay(){window.helpPopup&&helpPopup.hide(),$("#overlay").hide(),tf.ie6||$("#headerAnnounce").css("top",null)}function initLoginIframe(){function e(t,i,n,r){t.length>0?t[0]($.extend({},i),function(o){o&&(n.willReload=n.willReload&&o.willReload,n.href=n.href||o.href),e(t.slice(1),i,n,r)}):r&&r(n)}tf=window.tf||{},tf.loginIframeReload=1;var t=new tf.Mutex,i=[];tf.loginIframeAddcallback=function(e,t){i.splice(t?0:i.length,0,e)},tf.loginIframeRemoveCallback=function(e){i=$.grep(i,function(t){return t!=e})},tf.loginIframeAddcallback(function(e,t){if(e.isLoggedIn&&(tf.toggleLogInPane(0,1),$("#headerSignInPane").toggle(!e.isLoggedIn),$("#headerSignedInPane").toggle(e.isLoggedIn),e.isLoggedIn)){var i=getLoggedInUser();i&&($("#headerUsername").text(tf.truncate(i.fullName,25)).toggleClass("broadcastingEvents",tf.isAdmin()&&!i.silent),$("#headerMyInfo").attr("href",getHost()+"/profile?uid="+i.userId))}t(e)}),tf.access={pro:1,prior:2,granted:3,email:4,cancel:5},tf.accessType={pnl:0,pdf:1,analyst_text:2,article:3},tf.accessTypeInv=["pnl","pdf","analyst_text","article"],tf.requireAccess=function(e,i,n,r,o){function s(e,t){t&&(c.hide(),window.hideOverlay&&hideOverlay()),r&&r({status:e,access:e<4})}function a(t,n){"success"==tf.status(t,n)?(t.granted&&(properties.fullAccessSymbols().push(e),gaEvent(["fullaccess","granted:"+e,tf.accessTypeInv[i]])),u&&u.notifyAccessGranted(),$(".lockAccessBlue").hide(),s(t.granted?tf.access.granted:tf.access.prior)):(l(),gaEvent(["fullaccess","failed:"+e,tf.accessTypeInv[i]]))}function l(){function o(e,t,i,n){var r=tf.accessType;return t==r.analyst_text?"/company?hm="+e+".trefis&from=accessEmail"+(1==i.type||3==i.type?"&driver="+i.id:"")+(1==i.type?"&div=true":"")+"&scroll=1":t==r.article?"/articles/"+i.articleId+"?from=accessEmail":t==r.pdf?"/company?hm="+e+".trefis&from=accessEmail&pdf=1":t==r.pnl?"/company?hm="+e+".trefis&from=accessEmail&driver="+i.id:void 0}function a(o){t.a()&&tf.ajax({type:"POST",url:getHost()+"/servlet/AccessService/scheduleEmail",dataType:"json",data:{symbol:e,type:i,extra:JSON.stringify(n)},success:function(a,l){t.r(),"success"==tf.status(a,l)?s(tf.access.email,1):(announce("Error scheduling email",1),o&&tf.requireAccess(e,i,n,r))},error:function(s,a,l){t.r(),tf.ajaxError(s,a,l),announce("Unexpected error scheduling email",1),o&&tf.requireAccess(e,i,n,r)}})}function l(){return s(tf.access.cancel,1),!1}function u(t,o,s){o&&o(),c.css({zIndex:100}),s?a(1):tf.requireAccess(e,i,n,r)}function h(e,t){u(e,t,1)}tf.getComponent("popup/accessPopup",function(t){var r=window.getSwfObj&&-1!=location.href.indexOf("company"),s=r?getSwfObj():0,p=s&&s.userModelId?s.userModelId():0,f="postSubscribe="+escape(o(e,i,n,!d&&p?["userModelId="+p]:[]))+"; path=/";announceClear(),c.html(t).show(),tf.initPopup(c,l),c.find(".acp_registered").toggle(d),c.find(".acp_unregistered").toggle(!d),c.find(".acp_symbol").text(e),c.show(),c.find(".acp_cancelBtn").click(l),c.find("#acp_emailBtn").click(function(){return a(),!1}),c.find("#acp_registerBtn").click(function(){return c.css({zIndex:9}),tf.requireLogin(h,"Please register to be notified when you have access to "+e,1,function(){u()}),!1}),c.find(".acp_loginBtn").click(function(){return c.css({zIndex:9}),tf.requireLogin(u,"Please log in for Pro access",1,function(){u()},1),!1}),c.find("#acp_proUpgradeBtn").click(function(){return document.cookie=f,location.href=getHost()+"/subscribe/billing?from=requireAccess",!1}),c.find("#acp_proSignupBtn").click(function(){return document.cookie=f,location.href=getHost()+"/subscribe/email?from=requireAccess",!1}),tf.ie6&&window.DD_belatedPNG&&DD_belatedPNG.fix("#accessPopupHolder .coAll,#accessPopupHolder .pngfix,#accessPopupHolder .obutton,#accessPopupHolder .obutton span,#accessPopupHolder .csp_greyx"),c.css("margin-top",tf.scrollY()+20+"px"),showOverlay()})}var c=$("#accessPopupHolder"),d=!!getLoggedInUser(),u=getSwfObj();d&&getLoggedInUser().fullAccessAll?s(tf.access.pro):tf.hasAccess(e)?s(tf.access.prior):o?l():$.ajax({type:"POST",url:getHost()+"/servlet/AccessService/attemptFullAccess",data:{s:e,t:i},dataType:"json",success:a})},tf.accessStatus=function(e){return tf.hasAccess(e)?2:properties.fullAccessSymbols().length<3?1:0},tf.hasAccess=function(e){return getLoggedInUser()&&getLoggedInUser().fullAccessAll||-1!=$.inArray(e,properties.fullAccessSymbols())},tf.requireLogin=function(e,t,i,n,r){if(getLoggedInUser())e({hasStatusChanged:!1,isLoggedIn:!0,willReload:!1,newUser:!1},function(){});else{var o=function(t,i){tf.loginIframeRemoveCallback(o),t.isLoggedIn?e(t,i):n?n(t,i):i()};tf.loginIframeAddcallback(o,1),tf.toggleLogInPane(1,1,i,t,0,r)}},tf.canSaveModel=function(e,t){function i(i,a){function l(e,t){return"/company"+(t.length>0?"?"+t.join("&"):"")+"#/"+e}function c(e,i){o.hide(),window.hideOverlay&&hideOverlay(),t(e,i)}function d(e,t){tf.ajax({type:"POST",url:getHost()+"/servlet/ProfileService/setAutosaveModels",dataType:"json",data:{a:e},success:function(e,i){t("success"==tf.status(e,i))},error:function(e,i,n){tf.ajaxError(e,i,n),t(r)}})}function u(){return announceClear(),c(r,r),!1}tf.getComponent("popup/canSaveModelPopup",function(t){function r(){return o.find("#csp_autosaveCB").prop("checked")}function h(){var e=[];return ulObj.find("a").each(function(){var t=$(this);t.find(".csp_undo").is(":visible")&&$.each(t[0].className.split(" "),function(t,i){"symbol."==i.substring(0,7)&&e.push(i.substring(7))})}),e}function p(e,t){return f(e)&&t}function f(e){return"number"==typeof a&&i.length-e.length>=a}function g(){csp_okBtn.toggleClass("gbutton2-disabled",p(h(),r())),tf.ie6&&window.DD_belatedPNG&&DD_belatedPNG.fix("#csp_okBtn")}o.html(t).show(),tf.initPopup(o,u);var m=window.getSwfObj&&-1!=location.href.indexOf("company"),v=m?getSwfObj():0,y=v?v.userModelId():0,b="postSubscribe="+escape(l(e,!s&&y?["userModelId="+y]:[]))+"; path=/";ulObj=o.find(".csp_models"),csp_okBtn=o.find("#csp_okBtn"),$(".numToDelete").text(1+i.length-a),$.each(i,function(e,t){ulObj.append("
"+t.n+"Undo
")}),tf.ie6&&window.DD_belatedPNG&&DD_belatedPNG.fix("#canSaveModelPopupHolder .coAll,#canSaveModelPopupHolder .pngfix,#canSaveModelPopupHolder .gbutton2,#canSaveModelPopupHolder .gbutton2 span,#canSaveModelPopupHolder .obutton,#canSaveModelPopupHolder .obutton span,#canSaveModelPopupHolder .csp_greyx"),o.find("#csp_autosaveCB").click(g),ulObj.find("a").click(function(){return $(this).find(".csp_greyx,.csp_undo").toggle(),g(),!1}),o.find("#csp_cancelBtn").click(u),o.find("#csp_proUpgradeBtn").click(function(){return announceClear(),document.cookie=b,location.href=getHost()+"/subscribe/billing?from=requireAccess",!1}),csp_okBtn.click(function(){function e(e){e?c(!f(i),!o):announce("Error contacting server",1)}function t(t){t?o?e(n):d(o,e):announce("Error contacting server",1)}announceClear();var i=h(),o=r();return p(i,o)?announce("You cannot save more than "+a+" models, please select model(s) to delete or turn off autosave to continue.",1):i.length>0?(tf.deleteWorkingModels(i,t),tf.track(96)):(t(n),tf.track(97)),!1}),tf.ie6&&window.DD_belatedPNG&&DD_belatedPNG.fix("#canSaveModelPopupHolder .coAll"),o.css("margin-top",tf.scrollY()+20+"px"),showOverlay(),g()})}var n=!0,r=!1,o=$("#canSaveModelPopupHolder"),s=properties.loggedInUser();!s||s.fullAccessAll?t(n,r):$.ajax({type:"POST",url:getHost()+"/servlet/AccessService/canSaveModel",data:{s:e},dataType:"json",success:function(o,s){"success"==tf.status(o,s)?(o.canSave?t(n,r):i(o.companies,o.maxModels),gaEvent(["cansave",(o.canSave?"granted:":"failed:")+e])):t(n,r)},error:function(){t(n,r)}})},tf.loginIframeSuccess=function(t,n,r){window.loggedInUser=n;var o=getSwfObj(),s=($("#headerSignInPane").is(":visible"),tf.isAdmin(),$.extend({hasStatusChanged:!0,willReload:!r&&!!tf.loginIframeReload},t));s.isNewUser=!!s.isNewUser,s.isLoggedIn=!!s.isLoggedIn,window.flashLoginCallbacksReturn=function(t){e(i,s,t,function(e){e.willReload&&tf.doLoginRedirect(e)})},o&&o.flashLoginCallbacks?o.flashLoginCallbacks(s):window.flashLoginCallbacksReturn($.extend({},s))},tf.loginIframeCancel=function(){var t={hasStatusChanged:!1,isNewUser:!1,isLoggedIn:null!=getLoggedInUser(),willReload:!1};e(i,t,$.extend({},t))},tf.hideLoginClose=function(){$("#loginPopup .XClose").hide()},tf.ie6&&window.DD_belatedPNG&&DD_belatedPNG.fix(".obutton,.obutton span")}function ghostText(e,t){ghostTextObj($("#"+e),t)}function ghostTextObj(e,t){var i=e[0],n=""!=e.val()&&e.val()!=t;i&&(n||e.val(t).addClass("ghostText"),i.cleared=n,e.bind("focus",function(){i.cleared||(i.cleared=1,e.val("").removeClass("ghostText"))}).bind("blur",function(){i.cleared&&""==e.val()&&(i.cleared=0,e.val(t).addClass("ghostText"))}))}function unghostTextObj(e){e.unbind("focus").unbind("blur").each(function(e,t){t.cleared?t.cleared=0:$(t).val("")})}function switchToGhost(e){e.each(function(e,t){t.cleared&&$(t).val("").blur()})}function setTextOnGhosted(e,t){"string"==typeof e&&(e=$("#"+e)),e.length&&(t&&t.length?e.val(t).removeClass("ghostText").blur()[0].cleared=1:switchToGhost(e))}function getTextFromGhosted(e){return getTextFromGhostedObj($("#"+e))}function getTextFromGhostedObj(e){return e[0]&&e[0].cleared?e.val():""}function announce(e,t){t=Boolean(t);return $("#headerAnnounce .announceBoxMsg").html(e),$("#headerAnnounce").toggleClass("announceBoxInfo",!t).toggleClass("announceBoxError",t).slideDown("normal").animate({opacity:1},1e4).slideUp(600),announceTrack(e,t),!1}function announceTrack(e,t){t&&$.ajax({type:"POST",url:getHost()+"/servlet/TrackService/announceError",data:{e:e},dataType:"json"})}function announceClear(){return $("#headerAnnounce").stop(!0,!0).hide(),!1}function scrollTo(e,t){$("html,body").animate({scrollTop:e},t)}function getSwfObj(){return window.swfobject?swfobject.getObjectById("TrefisMainWidget"):null}function initFlexBridge(){function e(){t||getSwfObj().onHtmlClicked()}var t=!1;window.onFlashClicked=function(){t=!0,$(document).click(),t=!1},window.setFlashClickthru=function(t){t?$(document).bind("click",e):$(document).unbind("click",e)}}function initHeader(){$("#headerLogIn").click(function(e){e.preventDefault(),tf.isSecure()||!properties.httpsEnabled()?tf.toggleLogInPane(1,1,0,0,0,1):window.location.href=$(this).attr("href")+"&to="+encodeURIComponent(tf.pathAfterContext())}),$("#headerSignUp").click(function(){return!(tf.isSecure()||!properties.httpsEnabled())||tf.toggleLogInPane(1,1)}),tf.initBlueDropdown($("#myInfoDropdown")),tf.initBlueDropdown($("#forProfessionalsDropdown")),tf.ie6&&window.DD_belatedPNG&&(DD_belatedPNG.fix(".header-container-inner.header-container-left,.header-container-right,.header-homeIcon,.searchBoxMag,#header-searchBoxWrapper,.searchBoxWithMagWrapperR,.searchBoxWithMagWrapperL"),$(".searchBoxWithMagWrapperR,.searchBoxWithMagWrapperL").css("top","-1px"))}function initHelp(){function e(){function e(e,t,i){$("#hContent").html(e);var n=t>540?t-426:t+12;p.css("left",n+"px").css("top",i+2+"px").show()}function t(){m=null,p.hide()}function n(){$(document).unbind("click",n),t()}function r(t,i,r){a(),$(document).bind("click",n),e(t,i,r)}function o(e,t){for(i in e)for(key in t)e[i].bind(key,t[key])}function s(e,t){for(i in e)for(key in t)e[i].unbind(key,t[key])}function a(){null!=f&&s([p],f),f=null}function l(e){a(),f=e,o([p],e)}function c(e,t){d(),g=setTimeout(e,t)}function d(){null!=g&&clearTimeout(g)}function u(e){var t=e.substr(e.lastIndexOf("/",e)+1),i=t.indexOf("."),n=-1==i?t:t.substr(0,t.indexOf("."));return""==n?"home":n}function h(e){return v[u(e)]}var p=$("#hPopup");p.click(function(e){e.stopPropagation()});var f,g,m,v={home:1,company:2};this.addHover=function(t,i){function r(){if(g<1)c(n,1e3);else{var r=t.offset(),o=h(document.location.pathname),s=t[0].id;m!=s&&(m=s,$.ajax({type:"POST",url:getHost()+"/servlet/TrackService/trackHelpbubble",data:{p:o,b:s},dataType:"json"})),e(i,r.left,r.top),l(v),d()}}function a(){s([t,p],v),n()}function u(){g+=1,r()}function f(){g-=1,r()}var g=0,v={mouseenter:u,mouseleave:f};return o([t],v),a},this.hide=n,this.addListener=function(e,t){if(e.length){var i=e[0].id;e.click(function(){if(null==m){m=i;var o=e.offset(),s={divisions:5,myPrice:6,progress:7,selectDivision:8,topForecasts:9,requestInvite:10,ttdShare:27,ntcHelp:74};return tf.track(s[i]),r(t,o.left,o.top),!1}n()})}}}window.helpPopup=new e}function initBCPopup(){function e(e){function t(){h=!0,u.hide(),$(document).unbind("click",t)}function i(e){n(!0),o=setTimeout(s,e)}function n(e){null!=o&&clearTimeout(o),e||s()}function r(r,o,p,f){function g(e,t){if(null!=e&&"success"==e.status){var i=properties.loggedInUser(),r=e.headline_title,o=e.headline_organization;i&&e.id!=i.userId?(d.show(),tf.followLink(l,e.id,e.followed),tf.blockLink(c,e.id,e.blocked)):d.hide(),$("#bcName").html(e.fullname),r.length>0&&o.length>0&&(r+=" at "),r+=o,$("#bcTitle").html(r),$("#bcProfile").attr("href","profile?uid="+a),n(h),$("#bcLoading").hide(),$("#bcContent").show(),tf.ie6&&$("#bcPopup .shadow").height($("#bcPopup .shadowContent").outerHeight()+"px").width($("#bcPopup .shadowContent").outerWidth()+"px")}}function m(e,t){if(null!=e&&"success"==e.status){var i,r="",o="",s="",a="";void 0!=e.name&&(r=e.name),void 0!=e.email&&(o=e.email),void 0!=e.phone&&(s=e.phone),void 0!=e.modelId&&(i=e.modelId),u.find("#bcName").html(r),""!=s?(a=s,""!=o&&(a+=" | "+o)):""!=o&&(a=o),u.find("#bcTitle").html(a),""!=o?(u.find("#bcAnalystProfile").attr("href",getHost()+"/companies?analyst="+o).click(function(){window.location.href=$(this).attr("href")}),u.find("#bcAnalystAsk").click(function(){return $("#bcAnalystAskDialog").load(getHost()+"/askAnalyst.jsp"),$("#bcAnalystAskDialog").styledDialog({modal:!0,width:600,height:300,buttons:[{text:"OK",click:function(){var e=$("#askAnalystInfoName").val(),t=$("#askAnalystInfoEmail").val(),n=$("#askAnalystInfoBox").val();return"Your Name"==e?(alert("Please enter your name."),!1):tf.mailRE.test(t)?($.ajax({type:"POST",url:getHost()+"/emailfeedback",dataType:"json",contentType:"application/json; charset=utf-8",data:JSON.stringify({modelId:i,url:window.location.href,type:"ASKANALYST",userName:e,userEmail:t,customField:n}),success:$.noop,error:tf.ajaxError}),$(this).dialog("close"),$("#bcAnalystAskDialog").load(getHost()+"/askAnalystSent.jsp"),void $("#bcAnalystAskDialog").dialog({modal:!0,width:300,height:250,buttons:[{text:"OK",click:function(){$(this).dialog("close")}}]})):(alert("Email format is invalid."),!1)}}]}),!1})):u.find("#bcBottom").hide(),n(h),u.find("#bcLoading").hide(),u.find("#bcContent").show(),tf.ie6&&$("#analystBcPopup .shadow").height($("#analystBcPopup .shadowContent").outerHeight()+"px").width($("#analystBcPopup .shadowContent").outerWidth()+"px")}}function v(e,t,i){tf.ajaxError(e,t,i),n(!0),u.hide()}h=!1,a=r,s=function(){u.css("left",o-6+"px").css("top",p-7+"px").show()};var y,b,w;e?(y=getHost()+"/api/model/"+r+"/analyst",b={},w=m):(y=getHost()+"/servlet/ProfileService/getBC",b={u:r,f:f},w=g),$.ajax({type:"POST",url:y,dataType:"json",data:b,success:w,error:v}),$("#bcContent,#bcPopup").hide(),$("#bcLoading").show(),i(300),setTimeout(function(){$(document).click(t)},50)}var o,s,a=-1,l=$("#bcFollow"),c=$("#bcBlock"),d=$("#bcBlock,#bcFollow"),u=e?$("#analystBcPopup"):$("#bcPopup"),h=!1;u.find("#bcClose").click(t),u.click(function(e){if("A"!=e.target.tagName)return!1}),this.addListener=function(e,t,i){e.click(function(){var n=e.offset();return r(t,n.left,n.top,i),!1})},this.show=r}window.businessCardPopup=new e,window.analystBusinessCardPopup=new e(!0)}function initLoginPrompt(){}function initFeedback(){$("a.feedback").click(function(){return tf.toggleFeedback(!0)})}function fixWidgetFF(){$.browser.mozilla&&!swfobject.hasFlashPlayerVersion("9.0.28")&&$("#TrefisMainWidget .flashalt").remove().insertBefore("#TrefisMainWidget")}function initFollowBlock(){function e(e,t){o=t,e.toggleClass("grey",t)}function t(t){return function(i,n,r){e(t,0),tf.ajaxError(i,n,r)}}function i(e,t){tf.setButtonText(e,t?"Un-Block":"Block"),e.each(function(){this.blocked=t})}function n(e,t){tf.setButtonText(e,t?"Stop Following":"Follow"),e.each(function(){this.followed=t})}function r(e,t,i){$.each(s,function(n,r){r(e,t,i)})}var o,s=[];properties.loggedInUser();tf.followBlockAddcallback=function(e){s.push(e)},tf.followBlockRemoveCallback=function(e){s=$.grep(s,function(t){return t!=e})},tf.followLink=function(i,s,a,l){i.unbind("click");var c=properties.loggedInUser();null==c||c.userId!=s?(n(i,a),i.click(function(){return o||(e(i,1),i.addClass("grey"),tf.requireLogin(function(o,a){function d(t,o){e(i,0),null!=t&&"success"==t.status?(l&&$(".followbadge").toggle(u),n(i,u),r(s,u,null),$(".statsBox").each(function(e,i){var n=$(i).find(".uid").val(),r=n==c.userId,o=n==s,a=t.user_following>0,l=t.dest_follower>0;r&&($(".uns_following_count").text(t.user_following),$(".uns_following").toggle(a),$(".uns_following_nolink").toggle(!a)),o&&($(".uns_followers_count").text(t.dest_follower),$(".uns_followers").toggle(l),$(".uns_followers_nolink").toggle(!l))})):window.alert("error: "+t.status)}if(o.isLoggedIn){var u=!i.attr("followed");$.ajax({type:"POST",url:getHost()+"/servlet/NetworkService/follow",data:{u:s,f:u},dataType:"json",success:d,error:t(i)})}a&&a()},"Login to follow this person",!0)),!1})):i.hide().after("Me")},tf.blockLink=function(n,s,a){n.unbind("click");var l=properties.loggedInUser();l&&l.userId!=s?(i(n,a),n.click(function(){function a(t,o){if(e(n,0),null!=t&&"success"==t.status){i(n,l),r(s,null,l),$(".uns_blocked_count").text(t.count);var a=t.count>0;$(".uns_blocked").toggle(a),$(".uns_blocked_nolink").toggle(!a)}else window.alert("error: "+t.status)}if(!o){e(n,1);var l=!n.attr("blocked");return $.ajax({type:"POST",url:getHost()+"/servlet/NetworkService/block",data:{u:s,b:l},dataType:"json",success:a,error:t(n)}),!1}})):n.text("")}}function cookiesEnabled(){var e,t="testcookie";return document.cookie=t+"=; path=/",e=-1!=document.cookie.indexOf(t),document.cookie=t+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/",e}function onAnonIdChanged(e,t){window.anonUser&&(anonUser.userId=e,anonUser.userCheck=t)}function initFollowCompany(){function e(e,t,n){var r=e.s;"success"==e.status?($.each(i,function(t,i){i(e.s,e.f)}),n&&n(e)):announce("Request to follow "+r+" failed! Please try again.",1)}function t(e){announce("Request to follow "+e+" failed unexpectedly! Please try again.",1)}var i=[];tf.addFollowCallback=function(e,t){i.splice(t?0:i.length,0,e)},tf.removeFollowCallback=function(e){i=$.grep(i,function(t){return t!=e})},tf.followCompany=function(i,n,r){tf.requireLogin(function(o,s){o.isLoggedIn&&tf.ajax({type:"POST",url:getHost()+"/servlet/NetworkService/followCompany",data:{f:n,c:i},dataType:"json",success:function(t){e(t,"",r),gaEvent(["watchlist",n?"add":"remove",i])},error:function(){t(i)}}),s&&s()},"Log in to follow "+i,!0)}}function initModelGroupUrl(){if(-1!=window.location.href.indexOf("/modelgroup")&&!window.location.hash){var e=escape($(".modelGroupName").text());window.location.href=window.location.href+"#"+e}}function initCommon(e){initFollowBlock(),initFlexBridge(),initLoginIframe(),initHelp(),initBCPopup(),1!=e&&initLoginPrompt(),initHeader(),initFeedback(),initModelGroupUrl()}function findSankeyDiffChangeType(e,t,i,n){if(void 0===tf.previousSankeyDiff)return{};var r=tf.previousSankeyDiff.changeDirectness;if(void 0===r)return{};var o=r[e];if(void 0===o)return{};var s=o[t];if(void 0===s)return{};var a={},l=s.direct;if(void 0!==l&&l.length>0&&null!==i){"*"===i&&(a.direct=!0);for(var c=0;c-1?e.split(".")[1].length:0}function y(e,t,n,r){var o=q.lang,s=e,a=-1===t?v(e):isNaN(t=we(t))?2:t,l=void 0===n?o.decimalPoint:n,c=void 0===r?o.thousandsSep:r,d=s<0?"-":"",u=String(i(s=we(+s||0).toFixed(a))),h=u.length>3?u.length%3:0;return d+(h?u.substr(0,h)+c:"")+u.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+c)+(a?l+we(s-u).toFixed(a).slice(2):"")}function b(e,t){return new Array((t||2)+1-String(e).length).join(0)+e}function w(e,t,i,n){var r,o;for(i=p(i,1),r=e/i,t||(t=[1,2,2.5,5,10],n&&!1===n.allowDecimals&&(1===i?t=[1,2,5,10]:i<=.1&&(t=[1/i]))),o=0;o=Q[Xe]&&(d.setMilliseconds(0),d.setSeconds(u>=Q[qe]?0:h*me(d.getSeconds()/h))),u>=Q[qe]&&d[ae](u>=Q[Ke]?0:h*me(d[te]()/h)),u>=Q[Ke]&&d[le](u>=Q[Je]?0:h*me(d[ie]()/h)),u>=Q[Je]&&d[ce](u>=Q[Qe]?1:h*me(d[re]()/h)),u>=Q[Qe]&&(d[de](u>=Q[et]?0:h*me(d[oe]()/h)),s=d[se]()),u>=Q[et]&&(s-=s%h,d[ue](s)),u===Q[Ze]&&d[ce](d[re]()-d[ne]()+p(r,1)),o=1,s=d[se]();for(var f=d.getTime(),g=d[oe](),m=d[re](),v=c?0:(864e5+60*d.getTimezoneOffset()*1e3)%864e5;fi&&(i=e[t]);return i}function A(e,t){var i;for(i in e)e[i]&&e[i]!==t&&e[i].destroy&&e[i].destroy(),delete e[i]}function D(e){X||(X=g(Be)),e&&X.appendChild(e),X.innerHTML=""}function M(e,t){var i="Highcharts error #"+e+": www.highcharts.com/errors/"+e;if(t)throw i;pe.console&&console.log(i)}function I(e){return parseFloat(e.toPrecision(14))}function P(e,t){J=p(e,t.animation)}function E(){var e=q.global.useUTC,t=e?"getUTC":"get",i=e?"setUTC":"set";ee=e?Date.UTC:function(e,t,i,n,r,o){return new Date(e,t,p(i,1),p(n,0),p(r,0),p(o,0)).getTime()},te=t+"Minutes",ie=t+"Hours",ne=t+"Day",re=t+"Date",oe=t+"Month",se=t+"FullYear",ae=i+"Minutes",le=i+"Hours",ce=i+"Date",de=i+"Month",ue=i+"FullYear"}function O(e){return q=merge(q,e),E(),q}function L(){return q}function N(){}function R(e,t,i){this.axis=e,this.pos=t,this.type=i||"",this.isNew=!0,i||this.addLabel()}function B(e,t){return this.axis=e,t&&(this.options=t,this.id=t.id),this}function F(e,t,i,n,r){var o=e.chart.inverted;this.axis=e,this.isNegative=i,this.options=t,this.x=n,this.stack=r,this.alignOptions={align:t.align||(o?i?"left":"right":"center"),verticalAlign:t.verticalAlign||(o?"middle":i?"bottom":"top"),y:p(t.y,o?4:i?14:-6),x:p(t.x,o?i?-6:6:0)},this.textAlign=t.textAlign||(o?i?"right":"left":"center")}function H(){this.init.apply(this,arguments)}function z(e,t){var n=t.borderWidth,r=t.style,o=t.shared,s=i(r.padding);this.chart=e,this.options=t,r.padding=0,this.crosshairs=[],this.currentX=0,this.currentY=0,this.tooltipIsHidden=!0,this.label=e.renderer.label("",0,0,null,null,null,t.useHTML,null,"tooltip").attr({padding:s,fill:t.backgroundColor,"stroke-width":n,r:t.borderRadius,zIndex:8}).css(r).hide().add(),Oe||this.label.shadow(t.shadow),this.shared=o}function V(e,t){var i=Oe?"":t.chart.zoomType;this.zoomX=/x/.test(i),this.zoomY=/y/.test(i),this.options=t,this.chart=e,this.init(e,t.tooltip)}function W(e){this.init(e)}function U(e,t){var i,n=e.series;e.series=null,i=merge(q,e),i.series=e.series=n;var o=i.chart,s=o.margin,a=r(s)?s:[s,s,s,s];this.optionsMarginTop=p(o.marginTop,a[0]),this.optionsMarginRight=p(o.marginRight,a[1]),this.optionsMarginBottom=p(o.marginBottom,a[2]),this.optionsMarginLeft=p(o.marginLeft,a[3]);var l=o.events;this.runChartClick=l&&!!l.click,this.callback=t,this.isResizing=0,this.options=i,this.axes=[],this.series=[],this.hasCartesianSeries=o.showAxes,this.init(l)}function j(e,t){$e[e]=t}if(!window.Highcharts){var Y,G,X,q,K,J,Z,Q,ee,te,ie,ne,re,oe,se,ae,le,ce,de,ue,he=document,pe=window,fe=Math,ge=fe.round,me=fe.floor,ve=fe.ceil,ye=fe.max,be=fe.min,we=fe.abs,xe=fe.cos,_e=fe.sin,Se=fe.PI,Ce=2*Se/360,Te=navigator.userAgent,ke=/msie/i.test(Te)&&!pe.opera,Ae=8===he.documentMode,De=/AppleWebKit/.test(Te),Me=/Firefox/.test(Te),Ie="http://www.w3.org/2000/svg",Pe=!!he.createElementNS&&!!he.createElementNS(Ie,"svg").createSVGRect,Ee=Me&&parseInt(Te.split("Firefox/")[1],10)<4,Oe=!Pe&&!ke&&!!he.createElement("canvas").getContext,Le=he.documentElement.ontouchstart!==Y,$e={},Ne=0,Re=function(){},Be="div",Fe="hidden",He="highcharts-",ze="visible",Ve="px",We="none",Ue="M",je="L",Ye="rgba(192,192,192,"+(Pe?1e-6:.002)+")",Ge="millisecond",Xe="second",qe="minute",Ke="hour",Je="day",Ze="week",Qe="month",et="year",tt="stroke-width",it={};pe.Highcharts={},K=function(e,t,i){if(!d(t)||isNaN(t))return"Invalid date";e=p(e,"%Y-%m-%d %H:%M:%S");var n,r=new Date(t),o=r[ie](),s=r[ne](),a=r[re](),l=r[oe](),c=r[se](),u=q.lang,h=u.weekdays,f={a:h[s].substr(0,3),A:h[s],d:b(a),e:a,b:u.shortMonths[l],B:u.months[l],m:b(l+1),y:c.toString().substr(2,2),Y:c,H:b(o),I:b(o%12||12),l:o%12||12,M:b(r[te]()),p:o<12?"AM":"PM",P:o<12?"am":"pm",S:b(r.getSeconds()),L:b(ge(t%1e3),3)};for(n in f)e=e.replace("%"+n,f[n]);return i?e.substr(0,1).toUpperCase()+e.substr(1):e},S.prototype={wrapColor:function(e){this.color>=e&&(this.color=0)},wrapSymbol:function(e){this.symbol>=e&&(this.symbol=0)}},Q=t(Ge,1,Xe,1e3,qe,6e4,Ke,36e5,Je,864e5,Ze,6048e5,Qe,2592e6,et,31556952e3),Z={init:function(e,t,i){t=t||"";var n,r,o,s,a,l=e.shift,c=t.indexOf("C")>-1,d=c?7:3,u=t.split(" "),h=[].concat(i),p=function(e){for(o=e.length;o--;)e[o]===Ue&&e.splice(o+1,0,e[o+1],e[o+2],e[o+1],e[o+2])};if(c&&(p(u),p(h)),e.isArea&&(s=u.splice(u.length-6,6),a=h.splice(h.length-6,6)),l<=h.length/d)for(;l--;)h=[].concat(h).splice(0,d).concat(h);if(e.shift=0,u.length)for(n=h.length;u.length{point.key}
',pointFormat:'{series.name}: {point.y}
',shadow:!0,shared:Oe,snap:Le?25:10,style:{color:"#333333",fontSize:"12px",padding:"5px",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"10px"}}};var lt=q.plotOptions,ct=lt.line;E();var dt=function(e){function t(t){return a&&!isNaN(a[0])?"rgb"===t?"rgb("+a[0]+","+a[1]+","+a[2]+")":"a"===t?a[3]:"rgba("+a.join(",")+")":e}function n(e){if(s(e)&&0!==e){var t;for(t=0;t<3;t++)a[t]+=i(255*e),a[t]<0&&(a[t]=0),a[t]>255&&(a[t]=255)}return this}function r(e){return a[3]=e,this}var o,a=[];return function(e){o=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(e),o?a=[i(o[1]),i(o[2]),i(o[3]),parseFloat(o[4],10)]:(o=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e))&&(a=[i(o[1],16),i(o[2],16),i(o[3],16),1])}(e),{get:t,brighten:n,setOpacity:r}};N.prototype={init:function(e,t){var i=this;i.element="span"===t?g(t):he.createElementNS(Ie,t),i.renderer=e,i.attrSetters={}},animate:function(e,t,i){var n=p(t,J,!0);stop(this),n?(n=merge(n),i&&(n.complete=i),animate(this,e,n)):(this.attr(e),i&&i())},attr:function(e,t){var r,o,s,a,l,c,h,p,f,g=this,m=g.element,v=m.nodeName,y=g.renderer,b=g.attrSetters,w=g.shadows,x=g;if(n(e)&&d(t)&&(r=e,e={},e[r]=t),n(e))r=e,"circle"===v?r={x:"cx",y:"cy"}[r]||r:"strokeWidth"===r&&(r="stroke-width"),x=u(m,r)||g[r]||0,"d"!==r&&"visibility"!==r&&(x=parseFloat(x));else for(r in e)if(c=!1,o=e[r],!1!==(s=b[r]&&b[r](o,r))){if(s!==Y&&(o=s),"d"===r)o&&o.join&&(o=o.join(" ")),/(NaN| {2}|^$)/.test(o)&&(o="M 0 0");else if("x"===r&&"text"===v){for(a=0;aS&&/[ \-]/.test(n.innerText)&&(f(n,{width:S+Ve,display:"block",whiteSpace:"normal"}),g=S),v=t.fontMetrics(n.style.fontSize).b,C=x<0&&-g,T=_<0&&-m,y=x*_<0,C+=_*v*(y?1-c:c),T-=x*v*(b?y?c:1-c:1),u&&(C-=g*c*(x<0?-1:1),b&&(T-=m*c*(_<0?-1:1)),f(n,{textAlign:l})),e.xCorr=C,e.yCorr=T),f(n,{left:s+C+Ve,top:a+T+Ve}),e.cTT=k}},updateTransform:function(){var e=this,t=e.translateX||0,i=e.translateY||0,n=e.inverted,r=e.rotation,o=[];n&&(t+=e.attr("width"),i+=e.attr("height")),(t||i)&&o.push("translate("+t+","+i+")"),n?o.push("rotate(90) scale(-1,1)"):r&&o.push("rotate("+r+" "+(e.x||0)+" "+(e.y||0)+")"),o.length&&u(e.element,"transform",o.join(" "))},toFront:function(){var e=this.element;return e.parentNode.appendChild(e),this},align:function(e,t,i){var n=this;e?(n.alignOptions=e,n.alignByTranslate=t,i||n.renderer.alignedObjects.push(n)):(e=n.alignOptions,t=n.alignByTranslate),i=p(i,n.renderer);var r=e.align,o=e.verticalAlign,s=(i.x||0)+(e.x||0),a=(i.y||0)+(e.y||0),l={};return/^(right|center)$/.test(r)&&(s+=(i.width-(e.width||0))/{right:1,center:2}[r]),l[t?"translateX":"x"]=ge(s),/^(bottom|middle)$/.test(o)&&(a+=(i.height-(e.height||0))/({bottom:1,middle:2}[o]||1)),l[t?"translateY":"y"]=ge(a),n[n.placed?"animate":"attr"](l),n.placed=!0,n.alignAttr=l,n},getBBox:function(t){var i,n,r,o=this,s=o.rotation,a=o.element,l=s*Ce;if(a.namespaceURI===Ie||o.renderer.forExport){try{i=a.getBBox?e({},a.getBBox()):{width:a.offsetWidth,height:a.offsetHeight}}catch(e){}(!i||i.width<0)&&(i={width:0,height:0}),n=i.width,r=i.height,s&&(i.width=we(r*_e(l))+we(n*xe(l)),i.height=we(r*xe(l))+we(n*_e(l)))}else i=o.htmlGetBBox(t);return i},show:function(){return this.attr({visibility:ze})},hide:function(){return this.attr({visibility:Fe})},add:function(e){var t,n,r,o,s=this.renderer,a=e||s,l=a.element||s.box,c=l.childNodes,h=this.element,p=u(h,"zIndex");if(this.parentInverted=e&&e.inverted,void 0!==this.textStr&&s.buildText(this),p&&(a.handleZ=!0,p=i(p)),a.handleZ)for(r=0;rp||!d(p)&&d(n))){l.insertBefore(h,t),o=!0;break}return o||l.appendChild(h),this.added=!0,fireEvent(this,"add"),this},safeRemoveChild:function(e){var t=e.parentNode;t&&t.removeChild(e)},destroy:function(){var e,t,i=this,n=i.element||{},r=i.shadows,o=i.box;if(n.onclick=n.onmouseout=n.onmouseover=n.onmousemove=null,stop(i),i.clipPath&&(i.clipPath=i.clipPath.destroy()),i.stops){for(t=0;t/g,'').replace(/<(i|em)>/g,'').replace(//g,"").split(//g),s=r.childNodes,a=/style="([^"]+)"/,l=/href="([^"]+)"/,c=u(r,"x"),d=e.styles,h=d&&i(d.width),g=d&&d.lineHeight,m=s.length,v=[];m--;)r.removeChild(s[m]);h&&!e.added&&this.box.appendChild(r),""===o[o.length-1]&&o.pop(),each(o,function(o,s){var d,p,m=0;o=o.replace(//g,"|||"),d=o.split("|||"),each(d,function(o){if(""!==o||1===d.length){var v={},y=he.createElementNS(Ie,"tspan");if(a.test(o)&&u(y,"style",o.match(a)[1].replace(/(;| |^)color([ :])/,"$1fill$2")),l.test(o)&&(u(y,"onclick",'location.href="'+o.match(l)[1]+'"'),f(y,{cursor:"pointer"})),o=(o.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">"),y.appendChild(he.createTextNode(o)),m?v.dx=3:v.x=c,m||(s&&(!Pe&&e.renderer.forExport&&f(y,{display:"block"}),p=pe.getComputedStyle&&i(pe.getComputedStyle(n,null).getPropertyValue("line-height")),p&&!isNaN(p)||(p=g||n.offsetHeight||t(s)||18),u(y,"dy",p)),n=y),u(y,v),r.appendChild(y),m++,h)for(var b,w,x=o.replace(/-/g,"- ").split(" "),_=[];x.length||_.length;)w=e.getBBox().width,b=w>h,b&&1!==x.length?(y.removeChild(y.firstChild),_.unshift(x.pop())):(x=_,_=[],x.length&&(y=he.createElementNS(Ie,"tspan"),u(y,{dy:g||16,x:c}),r.appendChild(y),w>h&&(h=w))),x.length&&y.appendChild(he.createTextNode(x.join(" ").replace(/- /g,"-")))}})})},button:function(i,n,r,o,s,a,l){var c,d,u,h,p,f=this.label(i,n,r),g=0,m={x1:0,y1:0,x2:0,y2:1};return s=merge(t(tt,1,"stroke","#999","fill",t("linearGradient",m,"stops",[[0,"#FFF"],[1,"#DDD"]]),"r",3,"padding",3,"style",t("color","black")),s),u=s.style,delete s.style,a=merge(s,t("stroke","#68A","fill",t("linearGradient",m,"stops",[[0,"#FFF"],[1,"#ACF"]])),a),h=a.style,delete a.style,l=merge(s,t("stroke","#68A","fill",t("linearGradient",m,"stops",[[0,"#9BD"],[1,"#CDF"]])),l),p=l.style,delete l.style,addEvent(f.element,"mouseenter",function(){f.attr(a).css(h)}),addEvent(f.element,"mouseleave",function(){c=[s,a,l][g],d=[u,h,p][g],f.attr(c).css(d)}),f.setState=function(e){g=e,e?2===e&&f.attr(l).css(p):f.attr(s).css(u)},f.on("click",function(){o.call(f)}).attr(s).css(e({cursor:"default"},u))},crispLine:function(e,t){return e[1]===e[4]&&(e[1]=e[4]=ge(e[1])+t%2/2),e[2]===e[5]&&(e[2]=e[5]=ge(e[2])+t%2/2),e},path:function(t){var i={fill:We};return o(t)?i.d=t:r(t)&&e(i,t),this.createElement("path").attr(i)},circle:function(e,t,i){var n=r(e)?e:{x:e,y:t,r:i};return this.createElement("circle").attr(n)},arc:function(e,t,i,n,o,s){return r(e)&&(t=e.y,i=e.r,n=e.innerR,o=e.start,s=e.end,e=e.x),this.symbol("arc",e||0,t||0,i||0,i||0,{innerR:n||0,start:o||0,end:s||0})},rect:function(e,t,i,n,o,s){o=r(e)?e.r:o;var a=this.createElement("rect").attr({rx:o,ry:o,fill:We});return a.attr(r(e)?e:a.crisp(s,e,t,ye(i,0),ye(n,0)))},setSize:function(e,t,i){var n=this,r=n.alignedObjects,o=r.length;for(n.width=e,n.height=t,n.boxWrapper[p(i,!0)?"animate":"attr"]({width:e,height:t});o--;)r[o].align()},g:function(e){var t=this.createElement("g");return d(e)?t.attr({class:He+e}):t},image:function(t,i,n,r,o){var s,a={preserveAspectRatio:We};return arguments.length>1&&e(a,{x:i,y:n,width:r,height:o}),s=this.createElement("image").attr(a),s.element.setAttributeNS?s.element.setAttributeNS("http://www.w3.org/1999/xlink","href",t):s.element.setAttribute("hc-svg-href",t),s},symbol:function(t,i,n,r,o,s){var a,l,c,d,u=this.symbols[t],h=u&&u(ge(i),ge(n),r,o,s),p=/^url\((.*?)\)$/;return h?(a=this.path(h),e(a,{symbolName:t,x:i,y:n,width:r,height:o}),s&&e(a,s)):p.test(t)&&(d=function(e,t){e.attr({width:t[0],height:t[1]}),e.alignByTranslate||e.translate(-ge(t[0]/2),-ge(t[1]/2))},l=t.match(p)[1],c=$e[l],a=this.image(l).attr({x:i,y:n}),c?d(a,c):(a.attr({width:0,height:0}),g("img",{onload:function(){var e=this;void 0!==a.attrSetters&&d(a,$e[l]=[e.width,e.height])},src:l}))),a},symbols:{circle:function(e,t,i,n){var r=.166*i;return[Ue,e+i/2,t,"C",e+i+r,t,e+i+r,t+n,e+i/2,t+n,"C",e-r,t+n,e-r,t,e+i/2,t,"Z"]},square:function(e,t,i,n){return[Ue,e,t,je,e+i,t,e+i,t+n,e,t+n,"Z"]},triangle:function(e,t,i,n){return[Ue,e+i/2,t,je,e+i,t+n,e,t+n,"Z"]},"triangle-down":function(e,t,i,n){return[Ue,e,t,je,e+i,t,e+i/2,t+n,"Z"]},diamond:function(e,t,i,n){return[Ue,e+i/2,t,je,e+i,t+n/2,e+i/2,t+n,e,t+n/2,"Z"]},arc:function(e,t,i,n,r){var o=r.start,s=r.r||i||n,a=r.end-1e-6,l=r.innerR,c=r.open,d=xe(o),u=_e(o),h=xe(a),p=_e(a),f=r.end-o'),t&&(n=t===Be||"span"===t||"img"===t?n.join(""):e.prepVML(n),i.element=g(n)),i.renderer=e,i.attrSetters={}},add:function(e){var t=this,i=t.renderer,n=t.element,r=i.box,o=e&&e.inverted,s=e?e.element||e:r;return o&&i.invertChild(n,s),Ae&&s.gVis===Fe&&f(n,{visibility:Fe}),s.appendChild(n),t.added=!0,t.alignOnAdd&&!t.deferUpdateTransform&&t.updateTransform(),fireEvent(t,"add"),t},toggleChildren:function(e,t){for(var i=e.childNodes,n=i.length;n--;)f(i[n],{visibility:t}),"DIV"===i[n].nodeName&&this.toggleChildren(i[n],t)},updateTransform:N.prototype.htmlUpdateTransform,attr:function(e,t){var i,r,o,a,l,c,h=this,p=h.element||{},f=p.style,m=p.nodeName,v=h.renderer,y=h.symbolName,b=h.shadows,w=h.attrSetters,x=h;if(n(e)&&d(t)&&(i=e,e={},e[i]=t),n(e))i=e,x="strokeWidth"===i||"stroke-width"===i?h.strokeweight:h[i];else for(i in e)if(r=e[i],c=!1,!1!==(a=w[i]&&w[i](r,i))&&null!==r){if(a!==Y&&(r=a),y&&/^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(i))l||(h.symbolAttr(e),l=!0),c=!0;else if("d"===i){if(r=r||[],$.isArray(r)){h.d=r.join(" "),o=r.length;for(var _=[];o--;)s(r[o])?_[o]=ge(10*r[o])-5:"Z"===r[o]?_[o]="x":_[o]=r[o];if(r=_.join(" ")||"x",p.path=r,b)for(o=b.length;o--;)b[o].path=b[o].cutOff?this.cutOffPath(r,b[o].cutOff):r}c=!0}else if("zIndex"===i||"visibility"===i)Ae&&"visibility"===i&&"DIV"===m&&(p.gVis=r,h.toggleChildren(p,r),r===ze&&(r=null)),r&&(f[i]=r),c=!0;else if("width"===i||"height"===i)r=ye(0,r),this[i]=r,h.updateClipping?(h[i]=r,h.updateClipping()):f[i]=r,c=!0;else if("x"===i||"y"===i)h[i]=r,f[{x:"left",y:"top"}[i]]=r;else if("class"===i)p.className=r;else if("stroke"===i)r=v.color(r,p,i),i="strokecolor";else if("stroke-width"===i||"strokeWidth"===i)p.stroked=!!r,i="strokeweight",h[i]=r,s(r)&&(r+=Ve);else if("dashstyle"===i){var S=p.getElementsByTagName("stroke")[0]||g(v.prepVML([""]),null,null,p);S[i]=r||"solid",h.dashstyle=r,c=!0}else"fill"===i?"SPAN"===m?f.color=r:(p.filled=r!==We,r=v.color(r,p,i),i="fillcolor"):"shape"===m&&"rotation"===i?h[i]=r:"translateX"===i||"translateY"===i||"rotation"===i?(h[i]=r,h.updateTransform(),c=!0):"text"===i&&(this.bBox=null,p.innerHTML=r,c=!0);if(b&&"visibility"===i)for(o=b.length;o--;)b[o].style[i]=r;c||(Ae?p[i]=r:u(p,i,r))}return x},clip:function(e){var t=this,i=e.members,n=t.element,r=n.parentNode;return i.push(t),t.destroyClip=function(){c(i,t)},r&&"highcharts-tracker"===r.className&&!Ae&&f(n,{visibility:Fe}),t.css(e.getCSS(t))},css:N.prototype.htmlCss,safeRemoveChild:function(e){e.parentNode&&D(e)},destroy:function(){var e=this;return e.destroyClip&&e.destroyClip(),N.prototype.destroy.apply(e)},empty:function(){for(var e,t=this.element,i=t.childNodes,n=i.length;n--;)e=i[n],e.parentNode.removeChild(e)},on:function(e,t){return this.element["on"+e]=function(){var e=pe.event;e.target=e.srcElement,t(e)},this},cutOffPath:function(e,t){var n;return e=e.split(/[ ,]/),n=e.length,9!==n&&11!==n||(e[n-4]=e[n-2]=i(e[n-2])-10*t),e.join(" ")},shadow:function(e,t,n){var r,o,s,a,l,c=[],d=this.element,u=this.renderer,h=d.style,p=d.path;if(p&&"string"!=typeof p.value&&(p="x"),l=p,e){for(r=1;r<=3;r++)a=7-2*r,n&&(l=this.cutOffPath(p.value,a+.5)),s=[''],o=g(u.prepVML(s),null,{left:i(h.left)+1,top:i(h.top)+1}),n&&(o.cutOff=a+1),s=[''],g(u.prepVML(s),null,null,o),t?t.element.appendChild(o):d.parentNode.insertBefore(o,d),c.push(o);this.shadows=c}return this}};pt=m(N,pt);var ft={Element:pt,isIE8:Te.indexOf("MSIE 8.0")>-1,init:function(e,t,i){var n,r,o=this;o.alignedObjects=[],n=o.createElement(Be),r=n.element,r.style.position="relative",e.appendChild(n.element),o.box=r,o.boxWrapper=n,o.setSize(t,i,!1),he.namespaces.hcv||(he.namespaces.add("hcv","urn:schemas-microsoft-com:vml"),he.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } ")},isHidden:function(){return!this.box.offsetWidth},clipRect:function(t,i,n,r){var o=this.createElement();return e(o,{members:[],left:t,top:i,width:n,height:r,getCSS:function(t){var i=t.inverted,n=this,r=n.top,o=n.left,s=o+n.width,a=r+n.height,l={clip:"rect("+ge(i?o:r)+"px,"+ge(i?a:s)+"px,"+ge(i?s:a)+"px,"+ge(i?r:o)+"px)"};return!i&&Ae&&"IMG"!==t.element.nodeName&&e(l,{width:s+Ve,height:a+Ve}),l},updateClipping:function(){each(o.members,function(e){e.css(o.getCSS(e))})}})},color:function(e,t,i){var n,r,o,s=/^rgba/,a=We;if(e&&e.linearGradient?o="gradient":e&&e.radialGradient&&(o="pattern"),o){var l,c,d,u,h,p,f,m,v,y,b,w,x,_=e.linearGradient||e.radialGradient,S="",C=e.stops,T=[];if(w=C[0],x=C[C.length-1],w[0]>0&&C.unshift([0,w[1]]),x[0]<1&&C.push([1,x[1]]),each(C,function(e,t){s.test(e[1])?(n=dt(e[1]),l=n.get("rgb"),c=n.get("a")):(l=e[1],c=1),T.push(100*e[0]+"% "+l),t?(v=c,y=l):(m=c,b=l)}),"gradient"===o)d=_.x1||_[0]||0,u=_.y1||_[1]||0,h=_.x2||_[2]||0,p=_.y2||_[3]||0,f=90-180*fe.atan((p-u)/(h-d))/Se;else{var k=_.r,A=2*k;S='src="http://code.highcharts.com/gfx/radial-gradient.png" size="'+A+","+A+'" origin="0.5,0.5" position="'+_.cx+","+_.cy+'" color2="'+b+'" ',a=y}"fill"===i?(r=[''],g(this.prepVML(r),null,null,t)):a=l}else if(s.test(e)&&"IMG"!==t.tagName)n=dt(e),r=["<",i,' opacity="',n.get("a"),'"/>'],g(this.prepVML(r),null,null,t),a=n.get("rgb");else{var D=t.getElementsByTagName(i);D.length&&(D[0].opacity=1),a=e}return a},prepVML:function(e){var t="display:inline-block;behavior:url(#default#VML);",i=this.isIE8;return e=e.join(""),i?(e=e.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),e=-1===e.indexOf('style="')?e.replace("/>",' style="'+t+'" />'):e.replace('style="','style="'+t)):e=e.replace("<","1&&o.css({left:t,top:i,width:n,height:r}),o},rect:function(e,t,i,n,o,s){r(e)&&(t=e.y,i=e.width,n=e.height,s=e.strokeWidth,e=e.x);var a=this.symbol("rect");return a.r=o,a.attr(a.crisp(s,e,t,ye(i,0),ye(n,0)))},invertChild:function(e,t){var n=t.style;f(e,{flip:"x",left:i(n.width)-1,top:i(n.height)-1,rotation:-90})},symbols:{arc:function(e,t,i,n,r){var o,s=r.start,a=r.end,l=r.r||i||n,c=xe(s),d=_e(s),u=xe(a),h=_e(a),p=r.innerR,f=.08/l,g=p&&.1/p||0;return a-s==0?["x"]:(2*Se-a+sm&&(i=!1)):a+h>f&&(a=f-h,g&&a+u0&&c.height>0?(g=merge({align:u&&w&&"center",x:u?!w&&4:10,verticalAlign:!u&&w&&"middle",y:u?w?16:10:w?6:-4,rotation:u&&!w&&90},g),m||(l.label=m=I.text(g.text,0,0).attr({align:g.textAlign||g.align,rotation:g.rotation,zIndex:D}).css(g.style).add()),i=[C[1],C[4],p(C[6],C[1])],n=[C[2],C[5],p(C[7],C[2])],r=T(i),o=T(n),m.align(g,!1,{x:r,y:o,width:k(i)-r,height:k(n)-o}),m.show()):m&&m.hide(),l},destroy:function(){var e=this;c(e.axis.plotLinesAndBands,e),A(e,this.axis)}},F.prototype={destroy:function(){A(this,this.axis)},setTotal:function(e){this.total=e,this.cum=e},render:function(e){var t=this.options.formatter.call(this);this.label?this.label.attr({text:t,visibility:Fe}):this.label=this.axis.chart.renderer.text(t,0,0).css(this.options.style).attr({align:this.textAlign,rotation:this.options.rotation,visibility:Fe}).add(e)},setOffset:function(e,t){var i=this,n=i.axis,r=n.chart,o=r.inverted,s=this.isNegative,a=n.translate(this.total,0,0,0,1),l=n.translate(0),c=we(a-l),d=r.xAxis[0].translate(this.x)+e,u=r.plotHeight,h={x:o?s?a:a-c:d,y:o?u-d-t:s?u-a-c:u-a,width:o?c:t,height:o?t:c};this.label&&this.label.align(this.alignOptions,null,h).attr({visibility:ze})}},H.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#C0C0C0",labels:at,lineColor:"#C0D0E0",lineWidth:1,minPadding:.01,maxPadding:.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#6D869F",fontWeight:"bold"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{align:"right",x:-8,y:3},lineWidth:0,maxPadding:.05,minPadding:.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Y-values"},stackLabels:{enabled:!1,formatter:function(){return this.total},style:at.style}},defaultLeftAxisOptions:{labels:{align:"right",x:-8,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{align:"left",x:8,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{align:"center",x:0,y:14},title:{rotation:0}},defaultTopAxisOptions:{labels:{align:"center",x:0,y:-5},title:{rotation:0}},init:function(e,t){var i=t.isX,n=this;n.horiz=e.inverted?!i:i,n.isXAxis=i,n.xOrY=i?"x":"y",n.opposite=t.opposite,n.side=n.horiz?n.opposite?0:2:n.opposite?1:3,n.setOptions(t);var r=this.options,o=r.type,s="datetime"===o;n.labelFormatter=r.labels.formatter||n.defaultLabelFormatter,n.staggerLines=n.horiz&&r.labels.staggerLines,n.userOptions=t,n.minPixelPadding=0,n.chart=e,n.reversed=r.reversed,n.categories=r.categories,n.isLog="logarithmic"===o,n.isLinked=d(r.linkedTo),n.isDatetimeAxis=s,n.ticks={},n.minorTicks={},n.plotLinesAndBands=[],n.alternateBands={},n.len=0,n.minRange=n.userMinRange=r.minRange||r.maxZoom,n.range=r.range,n.offset=r.offset||0,n.stacks={},n.max=null,n.min=null;var c,u=n.options.events;e.axes.push(n),e[i?"xAxis":"yAxis"].push(n),n.series=[],e.inverted&&i&&n.reversed===Y&&(n.reversed=!0),n.removePlotBand=n.removePlotBandOrLine,n.removePlotLine=n.removePlotBandOrLine,n.addPlotBand=n.addPlotBandOrLine,n.addPlotLine=n.addPlotBandOrLine;for(c in u)addEvent(n,c,u[c]);n.isLog&&(n.val2lin=a,n.lin2val=l)},setOptions:function(e){this.options=merge(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],e)},defaultLabelFormatter:function(){var e=this.axis,t=this.value,i=e.categories,n=e.tickInterval,r=this.dateTimeLabelFormat;return i?t:r?K(r,t):n%1e6==0?t/1e6+"M":n%1e3==0?t/1e3+"k":t>=1e3?y(t,0):y(t,-1)},getSeriesExtremes:function(){var e,t=this,i=t.chart,n=t.stacks,r=[],o=[];t.dataMin=t.dataMax=null,each(t.series,function(s){if(s.visible||!i.options.chart.ignoreHiddenSeries){var a,l,c,u,h,f,g,m,v,y,b,w=s.options,x=w.threshold,_=[],S=0;if(t.isLog&&x<=0&&(x=w.threshold=null),t.isXAxis)g=s.xData,g.length&&(t.dataMin=be(p(t.dataMin,g[0]),T(g)),t.dataMax=ye(p(t.dataMax,g[0]),k(g)));else{var C,A,D,M,I=s.cropped,P=s.xAxis.getExtremes(),E=!!s.modifyValue;for(a=w.stacking,t.usePercentage="percent"===a,a&&(h=w.stack,u=s.type+p(h,""),f="-"+u,s.stackKey=u,l=r[u]||[],r[u]=l,c=o[f]||[],o[f]=c),t.usePercentage&&(t.dataMin=0,t.dataMax=99),g=s.processedXData,m=s.processedYData,b=m.length,e=0;e=P.min&&(g[e-1]||v)<=P.max))if(M=y.length)for(;M--;)null!==y[M]&&(_[S++]=y[M]);else _[S++]=y;!t.usePercentage&&_.length&&(t.dataMin=be(p(t.dataMin,_[0]),T(_)),t.dataMax=ye(p(t.dataMax,_[0]),k(_))),d(x)&&(t.dataMin>=x?(t.dataMin=x,t.ignoreMinPadding=!0):t.dataMaxd+l.width)&&(a=!0)):(n=d,o=f-l.right,(ru+l.height)&&(a=!0)),a?null:c.renderer.crispLine([Ue,n,r,je,o,s],t||0)},getPlotBandPath:function(e,t){var i=this.getPlotLinePath(t),n=this.getPlotLinePath(e);return n&&i?n.push(i[4],i[5],i[1],i[2]):n=null,n},getLinearTickPositions:function(e,t,i){var n,r,o=I(me(t/e)*e),s=I(ve(i/e)*e),a=[];for(n=o;n<=s&&(a.push(n),(n=I(n+e))!==r);)r=n;return a},getLogTickPositions:function(e,t,i,n){var r=this,o=r.options,s=r.len,c=[];if(n||(r._minorAutoInterval=null),e>=.5)e=ge(e),c=r.getLinearTickPositions(e,t,i);else if(e>=.08){var d,u,h,f,g,m,v,y=me(t);for(d=e>.3?[1,2,4]:e>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9],u=y;ut&&c.push(m),m>i&&(v=!0),m=g}else{var b=l(t),x=l(i),_=o[n?"minorTickInterval":"tickInterval"],S="auto"===_?null:_,C=o.tickPixelInterval/(n?5:1),T=n?s/r.tickPositions.length:s;e=p(S,r._minorAutoInterval,(x-b)*C/(T||1)),e=w(e,null,fe.pow(10,me(fe.log(e)/fe.LN10))),c=map(r.getLinearTickPositions(e,b,x),a),n||(r._minorAutoInterval=e/5)}return n||(r.tickInterval=e),c},getMinorTickPositions:function(){var e,t,i,n=this,r=n.tickPositions,o=n.minorTickInterval,s=[];if(n.isLog)for(i=r.length,t=1;t=l.minRange;if(l.isXAxis&&l.minRange===Y&&!l.isLog&&(d(c.min)||d(c.max)?l.minRange=null:(each(l.series,function(e){for(r=e.xData,o=e.xIncrement?1:r.length-1,i=o;i>0;i--)n=r[i]-r[i-1],(t===Y||n0)&&o.ignoreMaxPadding||(o.max+=i*m)),o.min===o.max||void 0===o.min||void 0===o.max?o.tickInterval=1:f&&!y&&b===o.linkedParent.options.tickPixelInterval?o.tickInterval=o.linkedParent.tickInterval:o.tickInterval=p(y,S?1:(o.max-o.min)*b/(o.len||1)),h&&!e&&each(o.series,function(e){e.processData(o.min!==o.oldMin||o.max!==o.oldMax)}),o.setAxisTranslation(),o.beforeSetTickPositions&&o.beforeSetTickPositions(),o.postProcessTickInterval&&(o.tickInterval=o.postProcessTickInterval(o.tickInterval)),u||c||(t=fe.pow(10,me(fe.log(o.tickInterval)/fe.LN10)),d(l.tickInterval)||(o.tickInterval=w(o.tickInterval,null,t,l))),o.minorTickInterval="auto"===l.minorTickInterval&&o.tickInterval?o.tickInterval/5:l.minorTickInterval,o.tickPositions=r=l.tickPositions||g&&g.apply(o,[o.min,o.max]),r||(r=u?(o.getNonLinearTimeTicks||_)(x(o.tickInterval,l.units),o.min,o.max,l.startOfWeek,o.ordinalPositions,o.closestPointRange,!0):c?o.getLogTickPositions(o.tickInterval,o.min,o.max):o.getLinearTickPositions(o.tickInterval,o.min,o.max),o.tickPositions=r),!f){var C=r[0],T=r[r.length-1];l.startOnTick?o.min=C:o.min>C&&r.shift(),l.endOnTick?o.max=T:o.maxt[n]&&!1!==this.options.alignTicks&&(t[n]=i.length),e.maxTicks=t},adjustTickAmount:function(){var e=this,t=e.chart,i=e.xOrY,n=e.tickPositions,r=t.maxTicks;if(r&&r[i]&&!e.isDatetimeAxis&&!e.categories&&!e.isLinked&&!1!==e.options.alignTicks&&n){var o,s=e.tickAmount,a=n.length;if(e.tickAmount=o=r[i],ae||null===e?e=n:r=n.min&&e<=n.max)&&(f[e]||(f[e]=new R(n,e)),x&&f[e].isNew&&f[e].render(t,!0),f[e].isActive=!0,f[e].render(t))}),y&&each(u,function(e,r){r%2==0&&e1||we(t-i.currentY)>1?i.tooltipTick=function(){i.move(e,t)}:i.tooltipTick=null},hide:function(){if(!this.tooltipIsHidden){var e=this.chart.hoverPoints;this.label.hide(),e&&each(e,function(e){e.setState()}),this.chart.hoverPoints=null,this.tooltipIsHidden=!0}},hideCrosshairs:function(){each(this.crosshairs,function(e){e&&e.hide()})},getAnchor:function(e,t){var i,n=this.chart,r=n.inverted,o=0,s=0;return e=h(e),i=e[0].tooltipPos,i||(each(e,function(e){o+=e.plotX,s+=e.plotLow?(e.plotLow+e.plotHigh)/2:e.plotY}),o/=e.length,s/=e.length,i=[r?n.plotWidth-s:o,this.shared&&!r&&e.length>1&&t?t.chartY-n.plotTop:r?n.plotHeight-o:s]),map(i,ge)},getPosition:function(e,t,i){var n,r=this.chart,o=r.plotLeft,s=r.plotTop,a=r.plotWidth,l=r.plotHeight,c=p(this.options.distance,12),d=i.plotX,u=i.plotY,h=d+o+(r.inverted?c:-e-c),f=u-t+s+15;return h<7&&(h=o+d+c),h+e>o+a&&(h-=h+e-(o+a),f=u-t+s-c,n=!0),f=f&&u<=f+t&&(f=u+s+c)),f+t>s+l&&(f=ye(s,s+l-t-c)),{x:h,y:f}},refresh:function(e,t){function i(){var e,t=this,i=t.points||h(t),n=i[0].series;return e=[n.tooltipHeaderFormatter(i[0].key)],each(i,function(t){n=t.series,e.push(n.tooltipFormatter&&n.tooltipFormatter(t)||t.point.tooltipFormatter(n.tooltipOptions.pointFormat))}),e.push(m.footerFormat||""),e.join("")}var n,r,o,s,a,l,c,d,u=this,f=u.chart,g=u.label,m=u.options,v={},y=[],b=m.formatter||i,w=f.hoverPoints,x=m.crosshairs,_=u.shared;if(s=u.getAnchor(e,t),n=s[0],r=s[1],!_||e.series&&e.series.noSharedTooltip?v=e.getLabelConfig():(w&&each(w,function(e){e.setState()}),f.hoverPoints=e,each(e,function(e){e.setState("hover"),y.push(e.getLabelConfig())}),v={x:e[0].category,y:e[0].y},v.points=y,e=e[0]),a=b.call(v),d=e.series,o=_||!d.isCartesian||d.tooltipOutsidePlot||f.isInsidePlot(n,r),!1!==a&&o?(u.tooltipIsHidden&&g.show(),g.attr({text:a}),c=m.borderColor||e.color||d.color||"#606060",g.attr({stroke:c}),l=(m.positioner||u.getPosition).call(u,g.width,g.height,{plotX:n,plotY:r}),u.move(ge(l.x),ge(l.y)),u.tooltipIsHidden=!1):this.hide(),x){x=h(x);for(var S,C,T,k=x.length;k--;)T=e.series[k?"yAxis":"xAxis"],x[k]&&T&&(S=T.getPlotLinePath(k?p(e.stackY,e.y):e.x,1),u.crosshairs[k]?u.crosshairs[k].attr({d:S,visibility:ze}):(C={"stroke-width":x[k].width||1,stroke:x[k].color||"#C0C0C0",zIndex:x[k].zIndex||2},x[k].dashStyle&&(C.dashstyle=x[k].dashStyle),u.crosshairs[k]=f.renderer.path(S).attr(C).add()))}fireEvent(f,"tooltipRefresh",{text:a,x:n+f.plotLeft,y:r+f.plotTop,borderColor:c})},tick:function(){this.tooltipTick&&this.tooltipTick()}},V.prototype={normalizeMouseEvent:function(t){var i,n,r,o;return t=t||pe.event,t.target||(t.target=t.srcElement),t.originalEvent&&(t=t.originalEvent),t.event&&(t=t.event),o=t.touches?t.touches.item(0):t,this.chartPosition=i=offset(this.chart.container),o.pageX===Y?(n=t.x,r=t.y):(n=o.pageX-i.left,r=o.pageY-i.top),e(t,{chartX:ge(n),chartY:ge(r)})},getMouseCoordinates:function(e){var t={xAxis:[],yAxis:[]},i=this.chart;return each(i.axes,function(n){var r=n.isXAxis,o=i.inverted?!r:r;t[r?"xAxis":"yAxis"].push({axis:n,value:n.translate(o?e.chartX-i.plotLeft:i.plotHeight-e.chartY+i.plotTop,!0)})}),t},onmousemove:function(e){var t,i,n,r,o=this,s=o.chart,a=s.series,l=s.hoverPoint,c=s.hoverSeries,d=s.chartWidth,u=s.inverted?s.plotHeight+s.plotTop-e.chartY:e.chartX-s.plotLeft;if(s.tooltip&&o.options.tooltip.shared&&(!c||!c.noSharedTooltip)){for(i=[],n=a.length,r=0;rd&&i.splice(n,1);i.length&&i[0].plotX!==o.hoverX&&(s.tooltip.refresh(i,e),o.hoverX=i[0].plotX)}c&&c.tracker&&(t=c.tooltipPoints[u])&&t!==l&&t.onMouseOver()},resetTracker:function(e){var t=this,i=t.chart,n=i.hoverSeries,r=i.hoverPoint,o=i.hoverPoints||r,s=i.tooltip;e=e&&s&&o,e&&h(o)[0].plotX===Y&&(e=!1),e?s.refresh(o):(r&&r.onMouseOut(),n&&n.onMouseOut(),s&&(s.hide(),s.hideCrosshairs()),t.hoverX=null)},setDOMEvents:function(){function t(){if(r.selectionMarker){var e,n={xAxis:[],yAxis:[]},s=r.selectionMarker.getBBox(),a=s.x-o.plotLeft,l=s.y-o.plotTop;i&&(each(o.axes,function(t){if(!1!==t.options.zoomEnabled){var i=t.isXAxis,r=o.inverted?!i:i,c=t.translate(r?a:o.plotHeight-l-s.height,!0,0,0,1),d=t.translate(r?a+s.width:o.plotHeight-l,!0,0,0,1);isNaN(c)||isNaN(d)||(n[i?"xAxis":"yAxis"].push({axis:t,min:be(c,d),max:ye(c,d)}),e=!0)}}),e&&fireEvent(o,"selection",n,function(e){o.zoom(e)})),r.selectionMarker=r.selectionMarker.destroy()}o&&(o.cancelClick=i,o.mouseIsDown=i=!1),removeEvent(he,"touchend",t),removeEvent(he,"mouseup",t)}var i,n=!0,r=this,o=r.chart,s=o.container,a=r.zoomX&&!o.inverted||r.zoomY&&o.inverted,l=r.zoomY&&!o.inverted||r.zoomX&&o.inverted;r.hideTooltipOnMouseMove=function(e){washMouseEvent(e),r.chartPosition&&o.hoverSeries&&o.hoverSeries.isCartesian&&!o.isInsidePlot(e.pageX-r.chartPosition.left-o.plotLeft,e.pageY-r.chartPosition.top-o.plotTop)&&r.resetTracker()},r.hideTooltipOnMouseLeave=function(){r.resetTracker(),r.chartPosition=null},s.onmousedown=function(i){i=r.normalizeMouseEvent(i),!Le&&i.preventDefault&&i.preventDefault(),o.mouseIsDown=!0,o.cancelClick=!1,o.mouseDownX=r.mouseDownX=i.chartX,r.mouseDownY=i.chartY,addEvent(he,"mouseup",t),Le&&addEvent(he,"touchend",t);var n=o.hoverPoint;n&&n.firePointEvent("mousedown",e(i,{point:n}))};var c=function(e){if(!(e&&e.touches&&e.touches.length>1)){e=r.normalizeMouseEvent(e),Le||(e.returnValue=!1);var t=e.chartX,s=e.chartY,c=!o.isInsidePlot(t-o.plotLeft,s-o.plotTop);if(Le&&"touchstart"===e.type&&(u(e.target,"isTracker")?o.runTrackerClick||e.preventDefault():o.runChartClick||c||e.preventDefault()),c&&(to.plotLeft+o.plotWidth&&(t=o.plotLeft+o.plotWidth),so.plotTop+o.plotHeight&&(s=o.plotTop+o.plotHeight)),o.mouseIsDown&&"touchstart"!==e.type){if((i=Math.sqrt(Math.pow(r.mouseDownX-t,2)+Math.pow(r.mouseDownY-s,2)))>10){var d=o.isInsidePlot(r.mouseDownX-o.plotLeft,r.mouseDownY-o.plotTop);if(o.hasCartesianSeries&&(r.zoomX||r.zoomY)&&d&&(r.selectionMarker||(r.selectionMarker=o.renderer.rect(o.plotLeft,o.plotTop,a?1:o.plotWidth,l?1:o.plotHeight,0).attr({fill:r.options.chart.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add())),r.selectionMarker&&a){var h=t-r.mouseDownX;r.selectionMarker.attr({width:we(h),x:(h>0?0:h)+r.mouseDownX})}if(r.selectionMarker&&l){var p=s-r.mouseDownY;r.selectionMarker.attr({height:we(p),y:(p>0?0:p)+r.mouseDownY})}d&&!r.selectionMarker&&r.options.chart.panning&&o.pan(t)}}else c||r.onmousemove(e);return n=c,c||!o.hasCartesianSeries}};s.onmousemove=c,addEvent(s,"mouseleave",r.hideTooltipOnMouseLeave),addEvent(he,"mousemove",r.hideTooltipOnMouseMove),s.ontouchstart=function(t){if(c(t),Le){var i=o.hoverPoint;i&&i.firePointEvent("mousedown",e(t,{point:i}))}},s.ontouchmove=c,s.onclick=function(t){var i,n,s=o.hoverPoint;t=r.normalizeMouseEvent(t),o.cancelClick||(s&&(u(t.target,"isTracker")||u(t.target.parentNode,"isTracker"))?(i=s.plotX,n=s.plotY,e(s,{pageX:r.chartPosition.left+o.plotLeft+(o.inverted?o.plotWidth-n:i),pageY:r.chartPosition.top+o.plotTop+(o.inverted?o.plotHeight-i:n)}),fireEvent(s.series,"click",e(t,{point:s})),s.firePointEvent("click",t)):(e(t,r.getMouseCoordinates(t)),o.isInsidePlot(t.chartX-o.plotLeft,t.chartY-o.plotTop)&&fireEvent(o,"click",t)))}},destroy:function(){var e=this,t=e.chart,i=t.container;t.trackerGroup&&(t.trackerGroup=t.trackerGroup.destroy()),removeEvent(i,"mouseleave",e.hideTooltipOnMouseLeave),removeEvent(he,"mousemove",e.hideTooltipOnMouseMove),i.onclick=i.onmousedown=i.onmousemove=i.ontouchstart=i.ontouchend=i.ontouchmove=null,clearInterval(this.tooltipInterval)},init:function(e,t){e.trackerGroup||(e.trackerGroup=e.renderer.g("tracker").attr({zIndex:9}).add()),t.enabled&&(e.tooltip=new z(e,t),this.tooltipInterval=setInterval(function(){e.tooltip.tick()},32)),this.setDOMEvents()}},W.prototype={init:function(e){var t=this,n=t.options=e.options.legend;if(n.enabled){var r=n.itemStyle,o=p(n.padding,8),s=n.itemMarginTop||0;t.baseline=i(r.fontSize)+3+s,t.itemStyle=r,t.itemHiddenStyle=merge(r,n.itemHiddenStyle),t.itemMarginTop=s,t.padding=o,t.initialItemX=o,t.initialItemY=o-5,t.maxItemWidth=0,t.chart=e,t.itemHeight=0,t.lastLineHeight=0,t.render(),addEvent(t.chart,"endResize",function(){t.positionCheckboxes()})}},colorizeItem:function(e,t){var i=this,n=i.options,r=e.legendItem,o=e.legendLine,s=e.legendSymbol,a=i.itemHiddenStyle.color,l=t?n.itemStyle.color:a,c=t?e.color:a;r&&r.css({fill:l}),o&&o.attr({stroke:c}),s&&s.attr({stroke:c,fill:c})},positionItem:function(e){var t=this,i=t.options,n=i.symbolPadding,r=!i.rtl,o=e._legendItemPos,s=o[0],a=o[1],l=e.checkbox;e.legendGroup&&e.legendGroup.translate(r?s:t.legendWidth-s-2*n-4,a),l&&(l.x=s,l.y=a)},destroyItem:function(e){var t=e.checkbox;each(["legendItem","legendLine","legendSymbol","legendGroup"],function(t){e[t]&&e[t].destroy()}),t&&D(e.checkbox)},destroy:function(){var e=this,t=e.group,i=e.box;i&&(e.box=i.destroy()),t&&(e.group=t.destroy())},positionCheckboxes:function(){var e=this;each(e.allItems,function(t){var i=t.checkbox,n=e.group.alignAttr;i&&f(i,{left:n.translateX+t.legendItemWidth+i.x-20+Ve,top:n.translateY+i.y+3+Ve})})},renderItem:function(t){var i,n,r,o=this,s=o.chart,a=s.renderer,l=t.series||t,c=l.options,d=e(e({},o.options),c.legendItem||{}),u="horizontal"===d.layout,h=d.symbolWidth,p=d.symbolPadding,f=o.itemStyle,m=o.itemHiddenStyle,v=o.padding,y=!d.rtl,b=d.width,w=d.itemMarginBottom||0,x=o.itemMarginTop,_=o.initialItemX,S=t.legendItem,C=t.legendSymbol,T=c.showCheckbox;S||(t.legendGroup=a.g("legend-item").attr({zIndex:1}).add(o.scrollGroup),l.drawLegendSymbol(o,t),t.legendItem=S=a.text(d.labelFormatter.call(t),y?h+p:-p,o.baseline,d.useHTML).css(merge(t.visible?f:m)).attr({align:y?"left":"right",zIndex:2}).add(t.legendGroup),t.legendGroup.on("mouseover",function(){t.setState("hover"),S.css(o.options.itemHoverStyle)}).on("mouseout",function(){S.css(t.visible?f:m),t.setState()}).on("click",function(e){var i=function(){t.setVisible()};e={browserEvent:e},t.firePointEvent?t.firePointEvent("legendItemClick",e,i):fireEvent(t,"legendItemClick",e,i)}),o.colorizeItem(t,t.visible),c&&T&&(t.checkbox=g("input",{type:"checkbox",checked:t.selected,defaultChecked:t.selected},d.itemCheckboxStyle,s.container),addEvent(t.checkbox,"click",function(e){var i=e.target;fireEvent(t,"checkboxClick",{checked:i.checked},function(){t.select()})}))),S.attr({text:d.labelFormatter.call(t)}),n=S.getBBox(),r=t.legendItemWidth=d.itemWidth||h+p+n.width+v+(d.indent||0)+(T?20:0),o.itemHeight=i=n.height,o.maxItemWidth=ye(o.maxItemWidth,r),o.lastLineHeight=ye(i,o.lastLineHeight),o.offsetWidth=b||ye(u?o.itemX+r-_:r,o.offsetWidth),d.hidden?(t._legendItemPos=[o.itemX,o.itemY],S.hide(),C&&C.hide()):(S.show(),C&&C.show(),u&&o.itemX-_+r>(b||s.chartWidth-2*v-_)&&(o.itemX=_,o.itemY+=x+o.lastLineHeight+w,o.lastLineHeight=0),o.lastItemY=x+o.itemY+w,t._legendItemPos=[o.itemX+(d.indent||0),o.itemY],u?o.itemX+=r:(o.itemY+=x+i+w,o.lastLineHeight=i))},render:function(){var t,i,n,r,o=this,s=o.chart,a=s.renderer,l=o.group,c=o.box,d=o.options,u=o.padding,h=d.borderWidth,p=d.backgroundColor;o.itemX=o.initialItemX,o.itemY=o.initialItemY,o.offsetWidth=0,o.lastItemY=0,l||(o.group=l=a.g("legend").attr({zIndex:7}).add(),o.contentGroup=a.g().attr({zIndex:1}).add(l),o.scrollGroup=a.g().add(o.contentGroup),o.clipRect=a.clipRect(0,0,9999,s.chartHeight),o.contentGroup.clip(o.clipRect)),t=[],each(s.series,function(e){var i=e.options;i.showInLegend&&(t=t.concat(e.legendItems||("point"===i.legendType?e.data:e)))}),C(t,function(e,t){return(e.options.legendIndex||0)-(t.options.legendIndex||0)}),d.reversed&&t.reverse(),o.allItems=t,o.display=i=!!t.length,each(t,function(e){o.renderItem(e)}),n=d.width||o.offsetWidth,r=o.lastItemY+o.lastLineHeight,r=o.handleOverflow(r),(h||p)&&(n+=u,r+=u,c?n>0&&r>0&&(c[c.isNew?"attr":"animate"](c.crisp(null,null,null,n,r)),c.isNew=!1):(o.box=c=a.rect(0,0,n,r,d.borderRadius,h||0).attr({stroke:d.borderColor,"stroke-width":h||0,fill:p||We}).add(l).shadow(d.shadow),c.isNew=!0),c[i?"show":"hide"]()),o.legendWidth=n,o.legendHeight=r,each(t,function(e){o.positionItem(e)}),i&&l.align(e({width:n,height:r},d),!0,s.spacingBox),s.isResizing||this.positionCheckboxes()},handleOverflow:function(e){var t,i=this,n=this.chart,r=n.renderer,o=this.options,s=o.y,a="top"===o.verticalAlign,l=n.spacingBox.height+(a?-s:s)-this.padding,c=o.maxHeight,d=this.clipRect,u=o.navigation,h=p(u.animation,!0),f=u.arrowSize||12,g=this.nav;return"horizontal"===o.layout&&(l/=2),c&&(l=be(l,c)),e>l?(this.clipHeight=t=l-20,this.pageCount=ve(e/t),this.currentPage=p(this.currentPage,1),this.fullHeight=e,d.attr({height:t}),g||(this.nav=g=r.g().attr({zIndex:1}).add(this.group),this.up=r.symbol("triangle",0,0,f,f).on("click",function(){i.scroll(-1,h)}).add(g),this.pager=r.text("",15,10).css(u.style).add(g),
this.down=r.symbol("triangle-down",0,0,f,f).on("click",function(){i.scroll(1,h)}).add(g)),i.scroll(0),e=l):g&&(d.attr({height:n.chartHeight}),g.hide(),this.scrollGroup.attr({translateY:1})),e},scroll:function(e,t){var i=this.pageCount,n=this.currentPage+e,r=this.clipHeight,o=this.options.navigation,s=o.activeColor,a=o.inactiveColor,l=this.pager,c=this.padding;n>i&&(n=i),n>0&&(t!==Y&&P(t,this.chart),this.nav.attr({translateX:c,translateY:r+7,visibility:ze}),this.up.attr({fill:1===n?a:s}).css({cursor:1===n?"default":"pointer"}),l.attr({text:n+"/"+this.pageCount}),this.down.attr({x:18+this.pager.getBBox().width,fill:n===i?a:s}).css({cursor:n===i?"default":"pointer"}),this.scrollGroup.animate({translateY:1-be(r*(n-1),this.fullHeight-r+c)}),l.attr({text:n+"/"+i}),this.currentPage=n)}},U.prototype={initSeries:function(e){var t=this,i=t.options.chart,n=e.type||i.type||i.defaultSeriesType,r=new it[n];return r.init(this,e),r},addSeries:function(e,t,i){var n,r=this;return e&&(P(i,r),t=p(t,!0),fireEvent(r,"addSeries",{options:e},function(){n=r.initSeries(e),r.isDirtyLegend=!0,t&&r.redraw()})),r.reorderTrackers(),n},reorderTrackers:function(){each(this.series,function(e){e.options.ontop&&(e.tracker?e.tracker.toFront():each(e.data,function(e){e.tracker&&e.tracker.toFront()}))})},isInsidePlot:function(e,t){return e>=0&&e<=this.plotWidth&&t>=0&&t<=this.plotHeight},adjustTickAmounts:function(){!1!==this.options.chart.alignTicks&&each(this.axes,function(e){e.adjustTickAmount()}),this.maxTicks=null},redraw:function(e){var t,i,n=this,r=n.axes,o=n.series,s=n.tracker,a=n.legend,l=n.isDirtyLegend,c=n.isDirtyBox,d=o.length,u=d,h=n.clipRect,p=n.renderer,f=p.isHidden();for(P(e,n),f&&n.cloneRenderTo();u--;)if(i=o[u],i.isDirty&&i.options.stacking){t=!0;break}if(t)for(u=d;u--;)i=o[u],i.options.stacking&&(i.isDirty=!0);each(o,function(e){e.isDirty&&"point"===e.options.legendType&&(l=!0)}),l&&a.options.enabled&&(a.render(),n.isDirtyLegend=!1),n.hasCartesianSeries&&(n.isResizing||(n.maxTicks=null,each(r,function(e){e.setScale()})),n.adjustTickAmounts(),n.getMargins(),each(r,function(e){e.isDirtyExtremes&&(e.isDirtyExtremes=!1,fireEvent(e,"afterSetExtremes",e.getExtremes())),(e.isDirty||c||t)&&(e.redraw(),c=!0)})),c&&(n.drawChartBox(),h&&(stop(h),h.animate({width:n.plotSizeX,height:n.plotSizeY+1}))),each(o,function(e){e.isDirty&&e.visible&&(!e.isCartesian||e.xAxis)&&e.redraw()}),s&&s.resetTracker&&s.resetTracker(!0),p.draw(),fireEvent(n,"redraw"),f&&n.cloneRenderTo(!0)},showLoading:function(t){var i=this,n=i.options,r=i.loadingDiv,o=n.loading;r||(i.loadingDiv=r=g(Be,{className:He+"loading"},e(o.style,{left:i.plotLeft+Ve,top:i.plotTop+Ve,width:i.plotWidth+Ve,height:i.plotHeight+Ve,zIndex:10,display:We}),i.container),i.loadingSpan=g("span",null,o.labelStyle,r)),i.loadingSpan.innerHTML=t||n.lang.loading,i.loadingShown||(f(r,{opacity:0,display:""}),animate(r,{opacity:o.style.opacity},{duration:o.showDuration||0}),i.loadingShown=!0)},hideLoading:function(){var e=this.options,t=this.loadingDiv;t&&animate(t,{opacity:0},{duration:e.loading.hideDuration||100,complete:function(){f(t,{display:We})}}),this.loadingShown=!1},get:function(e){var t,i,n,r=this,o=r.axes,s=r.series;for(t=0;tbe(o.dataMin,o.min)&&a19?e.containerHeight:400)},cloneRenderTo:function(e){var t=this.renderToClone,i=this.container;e?t&&(this.renderTo.appendChild(i),D(t),delete this.renderToClone):(i&&this.renderTo.removeChild(i),this.renderToClone=t=this.renderTo.cloneNode(0),f(t,{position:"absolute",top:"-9999px",display:"block"}),he.body.appendChild(t),i&&t.appendChild(i))},getContainer:function(){var t,i,r,o,s,a=this,l=a.options.chart;a.renderTo=o=l.renderTo,s=He+Ne++,n(o)&&(a.renderTo=o=he.getElementById(o)),o||M(13,!0),o.innerHTML="",o.offsetWidth||a.cloneRenderTo(),a.getChartSize(),i=a.chartWidth,r=a.chartHeight,a.container=t=g(Be,{className:He+"container"+(l.className?" "+l.className:""),id:s},e({position:"relative",overflow:Fe,width:i+Ve,height:r+Ve,textAlign:"left",lineHeight:"normal"},l.style),a.renderToClone||o),a.renderer=l.forExport?new ut(t,i,r,!0):new G(t,i,r),Oe&&a.renderer.create(a,t,i,r)},getMargins:function(){var e,t,i=this,n=i.options.chart,r=n.spacingTop,o=n.spacingRight,s=n.spacingBottom,a=n.spacingLeft,l=i.legend,c=i.optionsMarginTop,u=i.optionsMarginLeft,h=i.optionsMarginRight,f=i.optionsMarginBottom,g=i.chartTitleOptions,m=i.chartSubtitleOptions,v=i.options.legend,y=p(v.margin,10),b=v.x,w=v.y,x=v.align,_=v.verticalAlign;i.resetMargins(),e=i.axisOffset,!i.title&&!i.subtitle||d(i.optionsMarginTop)||(t=ye(i.title&&!g.floating&&!g.verticalAlign&&g.y||0,i.subtitle&&!m.floating&&!m.verticalAlign&&m.y||0))&&(i.plotTop=ye(i.plotTop,t+p(g.margin,15)+r)),l.display&&!v.floating&&("right"===x?d(h)||(i.marginRight=ye(i.marginRight,l.legendWidth-b+y+o)):"left"===x?d(u)||(i.plotLeft=ye(i.plotLeft,l.legendWidth+b+y+a)):"top"===_?d(c)||(i.plotTop=ye(i.plotTop,l.legendHeight+w+y+r)):"bottom"===_&&(d(f)||(i.marginBottom=ye(i.marginBottom,l.legendHeight-w+y+s)))),i.extraBottomMargin&&(i.marginBottom+=i.extraBottomMargin),i.extraTopMargin&&(i.plotTop+=i.extraTopMargin),i.hasCartesianSeries&&each(i.axes,function(e){e.getOffset()}),d(u)||(i.plotLeft+=e[3]),d(c)||(i.plotTop+=e[0]),d(f)||(i.marginBottom+=e[2]),d(h)||(i.marginRight+=e[1]),i.setChartSize()},initReflow:function(){function e(e){t.reflow(e)}var t=this;addEvent(pe,"resize",e),addEvent(t,"destroy",function(){removeEvent(pe,"resize",e)})},reflow:function(e){var t=this,i=t.options.chart,n=t.renderTo,r=i.width||adapterRun(n,"width"),o=i.height||adapterRun(n,"height"),s=e?e.target:pe;r&&o&&(s===pe||s===he)&&(r===t.containerWidth&&o===t.containerHeight||(clearTimeout(t.reflowTimeout),t.reflowTimeout=setTimeout(function(){t.resize(r,o,!1)},10)),t.containerWidth=r,t.containerHeight=o)},fireEndResize:function(){var e=this;e&&fireEvent(e,"endResize",null,function(){e.isResizing-=1})},resize:function(e,t,i){var n,r,o,s=this,a=s.title,l=s.subtitle;s.isResizing+=1,P(i,s),s.oldChartHeight=s.chartHeight,s.oldChartWidth=s.chartWidth,d(e)&&(s.chartWidth=n=ge(e)),d(t)&&(s.chartHeight=r=ge(t)),f(s.container,{width:n+Ve,height:r+Ve}),s.renderer.setSize(n,r,i),s.plotWidth=n-s.plotLeft-s.marginRight,s.plotHeight=r-s.plotTop-s.marginBottom,s.maxTicks=null,each(s.axes,function(e){e.isDirty=!0,e.setScale()}),each(s.series,function(e){e.isDirty=!0}),s.isDirtyLegend=!0,s.isDirtyBox=!0,s.getMargins(),o=s.spacingBox,a&&a.align(null,null,o),l&&l.align(null,null,o),s.redraw(i),s.oldChartHeight=null,fireEvent(s,"resize"),!1===J?s.fireEndResize():setTimeout(s.fireEndResize,J&&J.duration||500)},setChartSize:function(){var e=this,t=e.inverted,i=e.chartWidth,n=e.chartHeight,r=e.options.chart,o=r.spacingTop,s=r.spacingRight,a=r.spacingBottom,l=r.spacingLeft;e.plotLeft=ge(e.plotLeft),e.plotTop=ge(e.plotTop),e.plotWidth=ge(i-e.plotLeft-e.marginRight),e.plotHeight=ge(n-e.plotTop-e.marginBottom),e.plotSizeX=t?e.plotHeight:e.plotWidth,e.plotSizeY=t?e.plotWidth:e.plotHeight,e.spacingBox={x:l,y:o,width:i-l-s,height:n-o-a},each(e.axes,function(e){e.setAxisSize(),e.setAxisTranslation()})},resetMargins:function(){var e=this,t=e.options.chart,i=t.spacingTop,n=t.spacingRight,r=t.spacingBottom,o=t.spacingLeft;e.plotTop=p(e.optionsMarginTop,i),e.marginRight=p(e.optionsMarginRight,n),e.marginBottom=p(e.optionsMarginBottom,r),e.plotLeft=p(e.optionsMarginLeft,o),e.axisOffset=[0,0,0,0]},drawChartBox:function(){var e,t,i=this,n=i.options.chart,r=i.renderer,o=i.chartWidth,s=i.chartHeight,a=i.chartBackground,l=i.plotBackground,c=i.plotBorder,d=i.plotBGImage,u=n.borderWidth||0,h=n.backgroundColor,p=n.plotBackgroundColor,f=n.plotBackgroundImage,g={x:i.plotLeft,y:i.plotTop,width:i.plotWidth,height:i.plotHeight};e=u+(n.shadow?8:0),(u||h)&&(a?a.animate(a.crisp(null,null,null,o-e,s-e)):(t={fill:h||We},u&&(t.stroke=n.borderColor,t["stroke-width"]=u),i.chartBackground=r.rect(e/2,e/2,o-e,s-e,n.borderRadius,u).attr(t).add().shadow(n.shadow))),p&&(l?l.animate(g):i.plotBackground=r.rect(i.plotLeft,i.plotTop,i.plotWidth,i.plotHeight,0).attr({fill:p}).add().shadow(n.plotShadow)),f&&(d?d.animate(g):i.plotBGImage=r.image(f,i.plotLeft,i.plotTop,i.plotWidth,i.plotHeight).add()),n.plotBorderWidth&&(c?c.animate(c.crisp(null,i.plotLeft,i.plotTop,i.plotWidth,i.plotHeight)):i.plotBorder=r.rect(i.plotLeft,i.plotTop,i.plotWidth,i.plotHeight,0,n.plotBorderWidth).attr({stroke:n.plotBorderColor,"stroke-width":n.plotBorderWidth,zIndex:4}).add()),i.isDirtyBox=!1},propFromSeries:function(){var e,t,i,n=this,r=n.options.chart,o=n.options.series;each(["inverted","angular","polar"],function(s){for(e=it[r.type||r.defaultSeriesType],i=n[s]||r[s]||e&&e.prototype[s],t=o&&o.length;!i&&t--;)(e=it[o[t].type])&&e.prototype[s]&&(i=!0);n[s]=i})},render:function(){var t,n=this,r=n.axes,o=n.renderer,s=n.options,a=s.labels,l=s.credits;n.setTitle(),n.legend=new W(n),each(r,function(e){e.setScale()}),n.getMargins(),n.maxTicks=null,each(r,function(e){e.setTickPositions(!0),e.setMaxTicks()}),n.adjustTickAmounts(),n.getMargins(),n.drawChartBox(),n.hasCartesianSeries&&each(r,function(e){e.render()}),n.seriesGroup||(n.seriesGroup=o.g("series-group").attr({zIndex:3}).add()),each(n.series,function(e){e.translate(),e.setTooltipPoints(),e.render()}),a.items&&each(a.items,function(){var t=e(a.style,this.style),r=i(t.left)+n.plotLeft,s=i(t.top)+n.plotTop+12;delete t.left,delete t.top,o.text(this.html,r,s).attr({zIndex:2}).css(t).add()}),l.enabled&&!n.credits&&(t=l.href,n.credits=o.text(l.text,0,0).on("click",function(){t&&(location.href=t)}).attr({align:l.position.align,zIndex:8}).css(l.style).add().align(l.position)),n.hasRendered=!0},destroy:function(){var e,t=this,i=t.axes,n=t.series,r=t.container,o=r&&r.parentNode;if(null!==t){for(fireEvent(t,"destroy"),removeEvent(t),e=i.length;e--;)i[e]=i[e].destroy();for(e=n.length;e--;)n[e]=n[e].destroy();each(["title","subtitle","chartBackground","plotBackground","plotBGImage","plotBorder","seriesGroup","clipRect","credits","tracker","scroller","rangeSelector","legend","resetZoomButton","tooltip","renderer"],function(e){var i=t[e];i&&(t[e]=i.destroy())}),r&&(r.innerHTML="",removeEvent(r),o&&D(r),r=null);for(e in t)delete t[e];t.options=null,t=null}},firstRender:function(){var e=this,t=e.options,i=e.callback;if(!Pe&&pe==pe.top&&"complete"!==he.readyState||Oe&&!pe.canvg)return void(Oe?mt.push(function(){e.firstRender()},t.global.canvasToolsURL):he.attachEvent("onreadystatechange",function(){he.detachEvent("onreadystatechange",e.firstRender),"complete"===he.readyState&&e.firstRender()}));e.getContainer(),fireEvent(e,"init"),Highcharts.RangeSelector&&t.rangeSelector.enabled&&(e.rangeSelector=new Highcharts.RangeSelector(e)),e.resetMargins(),e.setChartSize(),e.propFromSeries(),e.getAxes(),each(t.series||[],function(t){e.initSeries(t)}),Highcharts.Scroller&&(t.navigator.enabled||t.scrollbar.enabled)&&(e.scroller=new Highcharts.Scroller(e)),e.tracker=new V(e,t),e.render(),e.renderer.draw(),i&&i.apply(e,[e]),each(e.callbacks,function(t){t.apply(e,[e])}),e.cloneRenderTo(!0),fireEvent(e,"load")},init:function(e){var t,i=this,n=i.options.chart;if(!1!==n.reflow&&addEvent(i,"load",i.initReflow),e)for(t in e)addEvent(i,t,e[t]);i.xAxis=[],i.yAxis=[],i.animation=!Oe&&p(n.animation,!0),i.setSize=i.resize,i.pointCount=0,i.counters=new S,i.firstRender()}},U.prototype.callbacks=[];var vt=function(){};vt.prototype={init:function(e,t,i){var n,r=this,o=e.chart.counters;return r.series=e,r.applyOptions(t,i),r.pointAttr={},e.options.colorByPoint&&(n=e.chart.options.colors,r.options||(r.options={}),r.color=r.options.color=r.color||n[o.color++],o.wrapColor(n.length)),e.chart.pointCount++,r},applyOptions:function(t,i){var n=this,r=n.series,o=typeof t;n.config=t,"number"===o||null===t?n.y=t:"number"==typeof t[0]?(n.x=t[0],n.y=t[1]):"object"===o&&"number"!=typeof t.length?(e(n,t),n.options=t,t.dataLabels&&(r._hasPointLabels=!0)):"string"==typeof t[0]&&(n.name=t[0],n.y=t[1]),n.x===Y&&(n.x=i===Y?r.autoIncrement():i)},destroy:function(){var e,t=this,i=t.series,n=i.chart,r=n.hoverPoints;n.pointCount--,r&&(t.setState(),c(r,t),r.length||(n.hoverPoints=null)),t===n.hoverPoint&&t.onMouseOut(),(t.graphic||t.dataLabel)&&(removeEvent(t),t.destroyElements()),t.legendItem&&n.legend.destroyItem(t);for(e in t)t[e]=null},destroyElements:function(){for(var e,t=this,i=["graphic","tracker","dataLabel","group","connector","shadowGroup"],n=6;n--;)e=i[n],t[e]&&(t[e]=t[e].destroy())},getLabelConfig:function(){var e=this;return{x:e.category,y:e.y,key:e.name||e.category,series:e.series,point:e,percentage:e.percentage,total:e.total||e.stackTotal}},select:function(e,t){var i=this,n=i.series,r=n.chart;e=p(e,!i.selected),i.firePointEvent(e?"select":"unselect",{accumulate:t},function(){i.selected=e,i.setState(e&&"select"),t||each(r.getSelectedPoints(),function(e){e.selected&&e!==i&&(e.selected=!1,e.setState(""),e.firePointEvent("unselect"))})})},onMouseOver:function(){var e=this,t=e.series,i=t.chart,n=i.tooltip,r=i.hoverPoint;r&&r!==e&&r.onMouseOut(),e.firePointEvent("mouseOver"),!n||n.shared&&!t.noSharedTooltip||n.refresh(e),e.setState("hover"),i.hoverPoint=e},onMouseOut:function(){var e=this;e.firePointEvent("mouseOut"),e.setState(),e.series.chart.hoverPoint=null},tooltipFormatter:function(e){var t,i,r,o,s,a,l,c=this,d=c.series,u=d.tooltipOptions,h=e.match(/\{(series|point)\.[a-zA-Z]+\}/g),f={y:0,open:0,high:0,low:0,close:0,percentage:1,total:1};u.valuePrefix=u.valuePrefix||u.yPrefix,u.valueDecimals=u.valueDecimals||u.yDecimals,u.valueSuffix=u.valueSuffix||u.ySuffix;for(l in h)i=h[l],n(i)&&i!==e&&(s=(" "+i).split(/[{\.}]/),t={point:c,series:d}[s[1]],a=s[2],t===c&&f.hasOwnProperty(a)?(o=f[a]?a:"value",r=(u[o+"Prefix"]||"")+y(c[a],p(u[o+"Decimals"],-1))+(u[o+"Suffix"]||"")):r=t[a],e=e.replace(i,r));return e},update:function(e,t,i){var n,o=this,s=o.series,a=o.graphic,l=s.data,c=l.length,d=s.chart;t=p(t,!0),o.firePointEvent("update",{options:e},function(){for(o.applyOptions(e),r(e)&&(s.getAttribs(),a&&a.attr(o.pointAttr[s.state])),n=0;ni+1&&n.push(r.slice(i+1,t)),i=t):t===o-1&&n.push(r.slice(i+1,t+1))});t.segments=n},setOptions:function(e){var t,i=this,n=i.chart,r=n.options,o=r.plotOptions,s=e.data;return e.data=null,t=merge(o[this.type],o.series,e),t.data=e.data=s,i.tooltipOptions=merge(r.tooltip,t.tooltip),t},getColor:function(){var e=this.options,t=this.chart.options.colors,i=this.chart.counters;this.color=e.color||!e.colorByPoint&&t[i.color++]||"gray",i.wrapColor(t.length)},getSymbol:function(){var e=this,t=e.options.marker,i=e.chart,n=i.options.symbols,r=i.counters;e.symbol=t.symbol||n[r.symbol++],/^url/.test(e.symbol)&&(t.radius=0),r.wrapSymbol(n.length)},drawLegendSymbol:function(e){var t,i,n=this.options,r=n.marker,o=e.options,s=o.symbolWidth,a=this.chart.renderer,l=this.legendGroup,c=e.baseline;n.lineWidth&&(i={"stroke-width":n.lineWidth},n.dashStyle&&(i.dashstyle=n.dashStyle),this.legendLine=a.path([Ue,0,c-4,je,s,c-4]).attr(i).add(l)),r&&r.enabled&&(t=r.radius,this.legendSymbol=a.symbol(this.symbol,s/2-t,c-4-t,2*t,2*t).attr(this.pointAttr[""]).add(l))},addPoint:function(e,t,i,n){var r,o=this,s=o.data,a=o.graph,l=o.area,c=o.chart,d=o.xData,u=o.yData,h=a&&a.shift||0,f=o.options.data;P(n,c),a&&i&&(a.shift=h+1),l&&(i&&(l.shift=h+1),l.isArea=!0),t=p(t,!0),r={series:o},o.pointClass.prototype.applyOptions.apply(r,[e]),d.push(r.x),u.push(4===o.valueCount?[r.open,r.high,r.low,r.close]:r.y),f.push(e),i&&(s[0]&&s[0].remove?s[0].remove(!1):(s.shift(),d.shift(),u.shift(),f.shift())),o.getAttribs(),o.isDirty=!0,o.isDirtyData=!0,t&&c.redraw()},setData:function(e,t){var i,n=this,r=n.points,a=n.options,l=n.initialColor,c=n.chart,u=null,h=n.xAxis,f=n.pointClass.prototype;n.xIncrement=null,n.pointRange=h&&h.categories&&1||a.pointRange,d(l)&&(c.counters.color=l);var g,m=[],v=[],y=e?e.length:[],b=a.turboThreshold||1e3,w=n.valueCount;if(y>b){for(i=0;null===u&&ip||o.forceCrop)){var g=u.getExtremes(),m=g.min,v=g.max;if(s[l-1]v)s=[],a=[];else if(s[0]v){for(r=0;r=m){c=ye(0,r-1);break}for(;rv){d=r+1;break}s=s.slice(c,d),a=a.slice(c,d),t=!0}}for(r=s.length-1;r>0;r--)(i=s[r]-s[r-1])>0&&(n===Y||i=0&&i<=n;)u[i++]=r;s.tooltipPoints=u}},tooltipHeaderFormatter:function(e){var t,i=this,n=i.tooltipOptions,r=n.xDateFormat,o=i.xAxis,s=o&&"datetime"===o.options.type;if(s&&!r)for(t in Q)if(Q[t]>=o.closestPointRange){r=n.dateTimeLabelFormats[t];break}return n.headerFormat.replace("{point.key}",s?K(r,e):e).replace("{series.name}",i.name).replace("{series.color}",i.color)},onMouseOver:function(){var e=this,t=e.chart,i=t.hoverSeries;i&&i!==e&&i.onMouseOut(),e.options.events.mouseOver&&fireEvent(e,"mouseOver"),e.setState("hover"),t.hoverSeries=e},onMouseOut:function(){var e=this,t=e.options,i=e.chart,n=i.tooltip,r=i.hoverPoint;r&&r.onMouseOut(),e&&t.events.mouseOut&&fireEvent(e,"mouseOut"),!n||t.stickyTracking||n.shared||n.hide(),e.setState(),i.hoverSeries=null},animate:function(e){var t=this,i=t.chart,n=t.clipRect,o=t.options.animation;o&&!r(o)&&(o={}),e?n.isAnimating||(n.attr("width",0),n.isAnimating=!0):(n.animate({width:i.plotSizeX},o),this.animate=null)},drawPoints:function(){var e=this;each(e.points,function(t){e.drawMarker(t,"graphic")})},drawMarker:function(t,i){var n,r,o,s,a=this,l=a.chart,c=t.plotX,d=t.plotY,u=t[i],h=0;a.options.marker.enabled&&(d===Y||isNaN(d)||(n=t.pointAttr[t.selected?"select":""],n.r||(n.r=0),r=n.r,o=p(t.marker&&t.marker.symbol,a.symbol),s=!!o&&0===o.indexOf("url"),u?u.animate(e({x:c-r,y:d-r},u.symbolName?{width:2*r,height:2*r}:{})):(r>0||s)&&(t&&t.options&&t.options.marker&&t.options.marker.withOffsetY&&(h=d/20),u=t[i]=l.renderer.symbol(o,c-r,d-r-h,2*r,2*r).attr(n).add(a.group)),u&&(t&&t.options&&t.options.marker&&t.options.marker.hidden?u.hide():u.show())))},convertAttribs:function(e,t,i,n){var r,o,s=this.pointAttrToOptions,a={};e=e||{},t=t||{},i=i||{},n=n||{};for(r in s)o=s[r],a[r]=p(e[o],t[r],i[r],n[r]);return a},getAttribs:function(){var e,t,i,n,r,o,s=this,a=lt[s.type].marker?s.options.marker:s.options,l=a.states,c=l.hover,u=s.color,h={stroke:u,fill:u},p=s.points||[],f=[],g=s.pointAttrToOptions;for("column"==s.type||"bar"==s.type||"pie"==s.type?c.color=c.color||dt(c.color||u).brighten(c.brightness).get():(c.radius=c.radius||a.radius+2,c.lineWidth=c.lineWidth||a.lineWidth+1),f[""]=s.convertAttribs(a,h),each(["hover","select"],function(e){f[e]=s.convertAttribs(l[e],f[""])}),s.pointAttr=f,t=p.length;t--;){if(i=p[t],a=i.options&&i.options.marker||i.options,a&&!1===a.enabled&&(a.radius=0),r=!1,i.options)for(o in g)d(a[g[o]])&&(r=!0);r?(n=[],l=a.states||{},e=l.hover=l.hover||{},s.options.marker||(e.color=dt(e.color||i.options.color).brighten(e.brightness||c.brightness).get()),n[""]=s.convertAttribs(a,f[""]),n.hover=s.convertAttribs(l.hover,f.hover,n[""]),n.select=s.convertAttribs(l.select,f.select,n[""])):n=f,i.pointAttr=n}},destroy:function(){var e,t,i,n,r,o=this,s=o.chart,a=o.clipRect,l=/AppleWebKit\/533/.test(Te),d=o.data||[];for(fireEvent(o,"destroy"),removeEvent(o),each(["xAxis","yAxis"],function(e){(r=o[e])&&(c(r.series,o),r.isDirty=!0)}),o.legendItem&&o.chart.legend.destroyItem(o),t=d.length;t--;)(i=d[t])&&i.destroy&&i.destroy();o.points=null,a&&a!==s.clipRect&&(o.clipRect=a.destroy()),each(["area","graph","dataLabelsGroup","group","tracker","trackerGroup"],function(t){o[t]&&(e=l&&"group"===t?"hide":"destroy",o[t][e]())}),s.hoverSeries===o&&(s.hoverSeries=null),s.eraseSeries(o);for(n in o)delete o[n]},drawDataLabels:function(){var e=this,t=e.options,i=t.dataLabels;if(i.enabled||e._hasPointLabels){var n,r,o,s,a,l,c,u=e.points,h=e.dataLabelsGroup,f=e.chart,g=e.xAxis,m=g?g.left:f.plotLeft,v=e.yAxis,y=v?v.top:f.plotTop,b=f.renderer,w=f.inverted,x=e.type,_=t.stacking,S="column"===x||"bar"===x,C=null===i.verticalAlign,T=null===i.y,k=b.fontMetrics(i.style.fontSize),A=k.h,D=k.b;if(S){var M={top:D,middle:D-A/2,bottom:-A+D};_?(C&&(i=merge(i,{verticalAlign:"middle"})),T&&(i=merge(i,{y:M[i.verticalAlign]}))):C?i=merge(i,{verticalAlign:"top"}):T&&(i=merge(i,{y:M[i.verticalAlign]}))}h?h.translate(m,y):h=e.dataLabelsGroup=b.g("data-labels").attr({visibility:e.visible?ze:Fe,zIndex:6}).translate(m,y).add(),s=i,each(u,function(u){if(l=u.dataLabel,i=s,o=u.options,o&&o.dataLabels&&(i=merge(i,o.dataLabels)),c=i.enabled){var g=u.barX&&u.barX+u.barW/2||p(u.plotX,-999),m=p(u.plotY,-999),v=null===i.y?u.y>=t.threshold?-A+D:D:i.y;n=(w?f.plotWidth-m:g)+i.x,r=ge((w?f.plotHeight-g:m)+v)}if(!l||!e.isCartesian||f.isInsidePlot(n,r)&&c){if(c){var y,C,T=i.align;if(a=i.formatter.call(u.getLabelConfig(),i),"column"===x&&(n+={left:-1,right:1}[T]*u.barW/2||0),!_&&w&&u.y<0&&(T="right",n-=10),i.style.color=p(i.color,i.style.color,e.color,"black"),l)l.attr({text:a}).animate({x:n,y:r});else if(d(a)){y={align:T,fill:i.backgroundColor,stroke:i.borderColor,"stroke-width":i.borderWidth,r:i.borderRadius||0,rotation:i.rotation,padding:i.padding,zIndex:1};for(C in y)y[C]===Y&&delete y[C];l=u.dataLabel=b[i.rotation?"text":"label"](a,n,r,null,null,null,i.useHTML,!0).attr(y).css(i.style).add(h).shadow(i.shadow)}if(S&&t.stacking&&l){var k=u.barX,M=u.barY,I=u.barW,P=u.barH;l.align(i,null,{x:w?f.plotWidth-M-P:k,y:w?f.plotHeight-k-I:M,width:w?P:I,height:w?I:P})}}}else u.dataLabel=l.destroy()})}},getSegmentPath:function(e){var t=this,i=[];return each(e,function(n,r){if(t.getPointSpline)i.push.apply(i,t.getPointSpline(e,n,r));else{if(i.push(r?je:Ue),r&&t.options.step){var o=e[r-1];i.push(n.plotX,o.plotY)}i.push(n.plotX,n.plotY)}}),i},drawGraph:function(){var e,t,i=this,n=i.options,r=i.chart,o=i.graph,s=[],a=i.group,l=n.lineColor||i.color,c=n.lineWidth,d=n.dashStyle,u=r.renderer,h=[];each(i.segments,function(t){e=i.getSegmentPath(t),t.length>1?s=s.concat(e):h.push(t[0])}),i.graphPath=s,i.singlePoints=h,o?(stop(o),o.animate({d:s})):c&&(t={stroke:l,"stroke-width":c},d&&(t.dashstyle=d),i.graph=u.path(s).attr(t).add(a).shadow(n.shadow))},invertGroups:function(){function e(){var e={width:t.yAxis.len,height:t.xAxis.len};i.attr(e).invert(),n&&n.attr(e).invert()}var t=this,i=t.group,n=t.trackerGroup,r=t.chart;addEvent(r,"resize",e),addEvent(t,"destroy",function(){removeEvent(r,"resize",e)}),e(),t.invertGroups=e},createGroup:function(){var e=this.chart;(this.group=e.renderer.g("series")).attr({visibility:this.visible?ze:Fe,zIndex:this.options.zIndex}).translate(this.xAxis.left,this.yAxis.top).add(e.seriesGroup),this.createGroup=Re},render:function(){var e,t=this,i=t.chart,n=t.options,r=!1!==n.clip,o=n.animation,s=o&&t.animate,a=s?o&&o.duration||500:0,l=t.clipRect,c=i.renderer;l||(l=t.clipRect=!i.hasRendered&&i.clipRect?i.clipRect:c.clipRect(0,0,i.plotSizeX,i.plotSizeY+1),i.clipRect||(i.clipRect=l)),t.createGroup(),e=t.group,t.drawDataLabels(),s&&t.animate(!0),t.getAttribs(),t.drawGraph&&t.drawGraph(),t.drawPoints(),!1!==t.options.enableMouseTracking&&t.drawTracker(),i.inverted&&t.invertGroups(),r&&!t.hasRendered&&(e.clip(l),t.trackerGroup&&t.trackerGroup.clip(i.clipRect)),s&&t.animate(),setTimeout(function(){l.isAnimating=!1,(e=t.group)&&l!==i.clipRect&&l.renderer&&(r&&e.clip(t.clipRect=i.clipRect),l.destroy())},a),t.isDirty=t.isDirtyData=!1,t.hasRendered=!0},redraw:function(){var e=this,t=e.chart,i=e.isDirtyData,n=e.group;n&&(t.inverted&&n.attr({width:t.plotWidth,height:t.plotHeight}),n.animate({translateX:e.xAxis.left,translateY:e.yAxis.top})),e.translate(),e.setTooltipPoints(!0),e.render(),i&&fireEvent(e,"updatedData")},
setState:function(e){var t=this,i=t.options,n=t.graph,r=i.states,o=i.lineWidth;if(e=e||"",t.state!==e){if(t.state=e,r[e]&&!1===r[e].enabled)return;e&&(o=r[e].lineWidth||o+1),n&&!n.dashstyle&&n.attr({"stroke-width":o},e?0:500)}},setVisible:function(e,t){var i,n,r,o=this,s=o.chart,a=o.legendItem,l=o.group,c=o.tracker,d=o.dataLabelsGroup,u=o.points,h=s.options.chart.ignoreHiddenSeries,p=o.visible;if(o.visible=e=e===Y?!p:e,i=e?"show":"hide",l&&l[i](),c)c[i]();else if(u)for(n=u.length;n--;)r=u[n],r.tracker&&r.tracker[i]();d&&d[i](),a&&s.legend.colorizeItem(o,e),o.isDirty=!0,o.options.stacking&&each(s.series,function(e){e.options.stacking&&e.visible&&(e.isDirty=!0)}),h&&(s.isDirtyBox=!0),!1!==t&&s.redraw(),fireEvent(o,i)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(e){var t=this;t.selected=e=e===Y?!t.selected:e,t.checkbox&&(t.checkbox.checked=e),fireEvent(t,e?"select":"unselect")},drawTrackerGroup:function(){var e=this.trackerGroup,t=this.chart;return this.isCartesian&&(e||(this.trackerGroup=e=t.renderer.g().attr({zIndex:this.options.zIndex||1}).add(t.trackerGroup)),e.translate(this.xAxis.left,this.yAxis.top)),e},drawTracker:function(){var e,t,i=this,n=i.options,r=n.trackByArea,o=[].concat(r?i.areaPath:i.graphPath),s=o.length,a=i.chart,l=a.renderer,c=a.options.tooltip.snap,d=i.tracker,u=n.cursor,h=u&&{cursor:u},p=i.singlePoints,f=i.drawTrackerGroup();if(s&&!r)for(t=s+1;t--;)o[t]===Ue&&o.splice(t+1,0,o[t+1]-c,o[t+2],je),(t&&o[t]===Ue||t===s)&&o.splice(t,0,je,o[t-2]+c,o[t-1]);for(t=0;t=0;t--)tf&&r>c?(r=ye(f,c),s=2*c-r):rm&&s>c?(s=ye(m,c),r=2*c-s):sA?l-A:k-(o<=k?A:0)),e(t,{barX:c,barY:d,barW:_,barH:u,pointWidth:x}),t.shapeType="rect",t.shapeArgs=i=r.renderer.Element.prototype.crisp.call(0,a,c,d,_,u),a%2&&(i.y-=1,i.height+=1),t.trackerArgs=we(u)<3&&merge(t.shapeArgs,{height:6,y:d-3})})},getSymbol:function(){},drawLegendSymbol:wt.prototype.drawLegendSymbol,drawGraph:function(){},drawPoints:function(){var e,t,i,n=this,r=n.options,o=n.chart.renderer;each(n.points,function(s){var a=s.plotY;a===Y||isNaN(a)||null===s.y||(e=s.graphic,t=s.shapeArgs,e?(stop(e),e.animate(merge(t))):(i=s.pointAttr[s.selected?"select":""],i.r||(i.r=0),s.graphic=e=o[s.shapeType](t).attr(i).add(n.group).shadow(r.shadow,null,r.stacking&&!r.borderRadius))),n.drawMarker(s,"graphic2")})},drawTracker:function(){var t,i,n,r,o,s=this,a=s.chart,l=a.renderer,c=+new Date,d=s.options,h=d.cursor,p=h&&{cursor:h},f=s.drawTrackerGroup();each(s.points,function(h){if(i=h.tracker,t=e({},h.trackerArgs||h.shapeArgs),t.y-=8,t.height+=16,r=h.plotY,o=!s.isCartesian||r!==Y&&!isNaN(r),delete t.strokeWidth,null!==h.y&&o)if(i)i.attr(t);else{var g=function(e){n=e.relatedTarget||e.fromElement,a.hoverSeries!==s&&u(n,"isTracker")!==c&&s.onMouseOver(),h.onMouseOver()};h.tracker=l[h.shapeType](t).attr({isTracker:c,fill:Ye,visibility:s.visible?ze:Fe}).on("mouseover",g).on("mouseout",function(e){d.stickyTracking||(n=e.relatedTarget||e.toElement,u(n,"isTracker")!==c&&s.onMouseOut())}).css(p).add(h.group||f),Le&&h.tracker.on("touchstart",g)}})},animate:function(e){var t=this,i=t.points,n=t.options;e||(each(i,function(e){var i=e.graphic,r=e.shapeArgs,o=t.yAxis,s=n.threshold;i&&(i.attr({height:0,y:d(s)?o.getThreshold(s):o.translate(o.getExtremes().min,0,1,0,1)}),i.animate({height:r.height,y:r.y},n.animation))}),t.animate=null)},remove:function(){var e=this,t=e.chart;t.hasRendered&&each(t.series,function(t){t.type===e.type&&(t.isDirty=!0)}),yt.prototype.remove.apply(e,arguments)}});it.column=Ct,lt.bar=merge(lt.column,{dataLabels:{align:"left",x:5,y:null,verticalAlign:"middle"}});var Tt=m(Ct,{type:"bar",inverted:!0});it.bar=Tt,lt.scatter=merge(ct,{lineWidth:0,states:{hover:{lineWidth:0}},tooltip:{headerFormat:'{series.name}
',pointFormat:"x: {point.x}
y: {point.y}
"}});var kt=m(yt,{type:"scatter",sorted:!1,translate:function(){var e=this;yt.prototype.translate.apply(e),each(e.points,function(t){t.shapeType="circle",t.shapeArgs={x:t.plotX,y:t.plotY,r:e.chart.options.tooltip.snap}})},drawTracker:function(){for(var e,t=this,i=t.options.cursor,n=i&&{cursor:i},r=t.points,o=r.length;o--;)(e=r[o].graphic)&&(e.element._i=o);t._hasTracking?t._hasTracking=!0:t.group.attr({isTracker:!0}).on(Le?"touchstart":"mouseover",function(e){t.onMouseOver(),e.target._i!==Y&&r[e.target._i].onMouseOver()}).on("mouseout",function(){t.options.stickyTracking||t.onMouseOut()}).css(n)}});it.scatter=kt,lt.pie=merge(ct,{borderColor:"#FFFFFF",borderWidth:1,center:["50%","50%"],colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name},y:5},legendType:"point",marker:null,size:"75%",showInLegend:!1,slicedOffset:10,states:{hover:{brightness:.1,shadow:!1}}});var At=m(vt,{init:function(){vt.prototype.init.apply(this,arguments);var t,i=this;return e(i,{visible:!1!==i.visible,name:p(i.name,"Slice")}),t=function(){i.slice()},addEvent(i,"select",t),addEvent(i,"unselect",t),i},setVisible:function(e){var t,i=this,n=i.series.chart,r=i.tracker,o=i.dataLabel,s=i.connector,a=i.shadowGroup;i.visible=e=e===Y?!i.visible:e,t=e?"show":"hide",i.group[t](),r&&r[t](),o&&o[t](),s&&s[t](),a&&a[t](),i.legendItem&&n.legend.colorizeItem(i,e)},slice:function(e,t,i){var n,r=this,o=r.series,s=o.chart,a=r.slicedTranslation;P(i,s),t=p(t,!0),e=r.sliced=d(e)?e:!r.sliced,n={translateX:e?a[0]:s.plotLeft,translateY:e?a[1]:s.plotTop},r.group.animate(n),r.shadowGroup&&r.shadowGroup.animate(n)}}),Dt={type:"pie",isCartesian:!1,pointClass:At,pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:function(){this.initialColor=this.chart.counters.color},animate:function(){var e=this,t=e.points;each(t,function(t){var i=t.graphic,n=t.shapeArgs,r=-Se/2;i&&(i.attr({r:0,start:r,end:r}),i.animate({r:n.r,start:n.start,end:n.end},e.options.animation))}),e.animate=null},setData:function(e,t){yt.prototype.setData.call(this,e,!1),this.processData(),this.generatePoints(),p(t,!0)&&this.chart.redraw()},getCenter:function(){var e,t=this.options,n=this.chart,r=n.plotWidth,o=n.plotHeight,s=t.center.concat([t.size,t.innerSize||0]),a=be(r,o);return map(s,function(t,n){return e=/%$/.test(t),e?[r,o,a,a][n]*i(t)/100:t})},translate:function(){this.generatePoints();var e,t,i,n,r,o,s,a=0,l=this,c=-.25,d=l.options,u=d.slicedOffset,h=u+d.borderWidth,p=l.chart,f=l.points,g=2*Se,m=d.dataLabels.distance;l.center=e=l.getCenter(),l.getX=function(t,i){return n=fe.asin((t-e[1])/(e[2]/2+m)),e[0]+(i?-1:1)*(xe(n)*(e[2]/2+m))},each(f,function(e){a+=e.y}),each(f,function(l){r=a?l.y/a:0,t=ge(c*g*1e3)/1e3,c+=r,i=ge(c*g*1e3)/1e3,l.shapeType="arc",l.shapeArgs={x:e[0],y:e[1],r:e[2]/2,innerR:e[3]/2,start:t,end:i},n=(i+t)/2,l.slicedTranslation=map([xe(n)*u+p.plotLeft,_e(n)*u+p.plotTop],ge),o=xe(n)*e[2]/2,s=_e(n)*e[2]/2,l.tooltipPos=[e[0]+.7*o,e[1]+.7*s],l.labelPos=[e[0]+o+xe(n)*m,e[1]+s+_e(n)*m,e[0]+o+xe(n)*h,e[1]+s+_e(n)*h,e[0]+o,e[1]+s,m<0?"center":n0,T=[[],[]],k=2;if(m.enabled)for(yt.prototype.drawDataLabels.apply(h),each(f,function(e){e.dataLabel&&T[e.labelPos[7]0){for(D=S-_-w;D<=S+_+w;D+=o)I.push(D);if(A=I.length,O>A){for(c=[].concat(E),c.sort(d),u=O;u--;)c[u].rank=u;for(u=O;u--;)E[u].rank>=A&&E.splice(u,1);O=E.length}for(u=0;u0?(R=P.pop(),M=R.i,a=R.y,(B>a&&null!==I[M+1]||B"+a+" Only"),$(this).append(""),$(this).append("")}),d.find("#preciseDriverAdvancedOptionsB .js-unit").html("%"),d.find("#preciseDriverAdvancedOptionsC .js-unit").html(o),l(1,$("#preciseDriverAdvancedOptionsD")),d.find("#preciseDriverAdvancedOptionsE .js-unit").html(o),$("#preciseDriverAdvancedOptionsB .js-selectPeriod").trigger("change"),d.on("click",".js-preciseDriverAdvancedOptionRadioDiv",function(){var e=d.find(".active");e&&$(e).prop("id")==$(this).prop("id")||(u.disableAllOptions(d),u.enableOption($(this)))}),d.modal({keyboard:!1,show:!0})},this.computeCAGR=function(e,t,i){var n,r,o=e.filter(function(e,t){return!e.Historical}),s=e[e.length-1];switch(i){case"current":return t>0?e[t].Value/e[t-1].Value-1:0;case"all":var a=e.findIndex(function(e){return!e.Historical});r=a>0?e[a-1]:e[0];break;default:r=e[t]}return n=o.length-t>0?o.length-t:1,e?Math.pow(s.Value/r.Value,1/n)-1:0},this.formatCAGR=function(e){return 100*e},this.changeUserInputValueWithAdvancedOptions=function(n,r,o){r=parseFloat(r);var s=null;if(o.optionDescription==tf.preciseDriverAdvancedOptionsText.optionA)s=function(e,i){t.applyChange(i,r)};else if(o.optionDescription==tf.preciseDriverAdvancedOptionsText.optionB)s=function(e,n){e>0&&t.applyChange(n,i.data[e-1].dataPoint.Value*(1+r/100)*t.yaxis.getAxisScaleFactor())};else if(o.optionDescription==tf.preciseDriverAdvancedOptionsText.optionE)s=function(e,i){t.applyChange(i,i.dataPoint.Value*t.yaxis.getAxisScaleFactor()+r)};else if(o.optionDescription==tf.preciseDriverAdvancedOptionsText.optionC)var s=function(e,n){e>0&&t.applyChange(n,i.data[e-1].dataPoint.Value*t.yaxis.getAxisScaleFactor()+r)};else if(o.optionDescription==tf.preciseDriverAdvancedOptionsText.optionD)var s=function(e,i){t.applyChange(i,i.dataPoint.Value*r*t.yaxis.getAxisScaleFactor())};if(o.selectPeriod==tf.preciseDriverAdvancedOptionsText.selectBoxCurPeriod)s(n,i.data[n]);else if(o.selectPeriod==tf.preciseDriverAdvancedOptionsText.selectBoxAll)for(var a=0;a",{class:"chartLabel",html:this.getLabelName()}),this.draggedPoints={}}function Xaxis(e){this.id=null,this.options={},this.series=[],this.calculated={categories:null},this.getParentChart=function(){return e}}function Yaxis(e){this.options={},this.series=[],this.id=null,this.getParentChart=function(){return e},this.calculated={scaleFactor:null,extremum:null}}function Tooltip(e){this.widget=e,this.tooltipDiv=$("",{class:"chartMouseover chartpoint-tooltip"}).appendTo("body"),this.hoverPoint=null}function AreaChartSeries(e){var t,i=e[0],n=e[1];return t=this.mergeValues([i,n]),t=this.addMetaData(t)}function goToWorkflowState(e,t,i){function n(e,t){r.append($("").attr("type","hidden").attr("name",e).attr("value",t||""))}var r=$("