map.js
| 116.5 KB | Satir:
0
| js
Geri
if(!AmCharts)var AmCharts={};AmCharts.themes={},AmCharts.inheriting={},AmCharts.Class=function(t){var e=function(){arguments[0]!==AmCharts.inheriting&&(this.events={},this.construct.apply(this,arguments))};t.inherits?(e.prototype=new t.inherits(AmCharts.inheriting),e.base=t.inherits.prototype,delete t.inherits):(e.prototype.createEvents=function(){for(var t=0,e=arguments.length;t<e;t++)this.events[arguments[t]]=[]},e.prototype.listenTo=function(t,e,i){this.removeListener(t,e,i),t.events[e].push({handler:i,scope:this})},e.prototype.addListener=function(t,e,i){this.removeListener(this,t,e),this.events[t].push({handler:e,scope:i})},e.prototype.removeListener=function(t,e,i){if(t&&t.events)for(t=t.events[e],e=t.length-1;0<=e;e--)t[e].handler===i&&t.splice(e,1)},e.prototype.fire=function(t,e){for(var i=this.events[t],s=0,a=i.length;s<a;s++){var r=i[s];r.handler.call(r.scope,e)}});for(var i in t)e.prototype[i]=t[i];return e},AmCharts.charts=[],AmCharts.addChart=function(t){AmCharts.charts.push(t)},AmCharts.removeChart=function(t){for(var e=AmCharts.charts,i=e.length-1;0<=i;i--)e[i]==t&&e.splice(i,1)},AmCharts.IEversion=0,AmCharts.isModern=!0,AmCharts.navigator=navigator.userAgent.toLowerCase(),-1!=AmCharts.navigator.indexOf("msie")&&(AmCharts.IEversion=parseInt(AmCharts.navigator.split("msie")[1]),document.documentMode&&(AmCharts.IEversion=Number(document.documentMode)),9>AmCharts.IEversion&&(AmCharts.isModern=!1)),AmCharts.dx=0,AmCharts.dy=0,(document.addEventListener||window.opera)&&(AmCharts.isNN=!0,AmCharts.isIE=!1,AmCharts.dx=.5,AmCharts.dy=.5),document.attachEvent&&(AmCharts.isNN=!1,AmCharts.isIE=!0,AmCharts.isModern||(AmCharts.dx=0,AmCharts.dy=0)),window.chrome&&(AmCharts.chrome=!0),AmCharts.handleResize=function(){for(var t=AmCharts.charts,e=0;e<t.length;e++){var i=t[e];i&&i.div&&i.handleResize()}},AmCharts.handleMouseUp=function(t){for(var e=AmCharts.charts,i=0;i<e.length;i++){var s=e[i];s&&s.handleReleaseOutside(t)}},AmCharts.handleMouseMove=function(t){for(var e=AmCharts.charts,i=0;i<e.length;i++){var s=e[i];s&&s.handleMouseMove(t)}},AmCharts.resetMouseOver=function(){for(var t=AmCharts.charts,e=0;e<t.length;e++){var i=t[e];i&&(i.mouseIsOver=!1)}},AmCharts.onReadyArray=[],AmCharts.ready=function(t){AmCharts.onReadyArray.push(t)},AmCharts.handleLoad=function(){AmCharts.isReady=!0;for(var t=AmCharts.onReadyArray,e=0;e<t.length;e++)(0,t[e])()},AmCharts.useUTC=!1,AmCharts.updateRate=40,AmCharts.uid=0,AmCharts.getUniqueId=function(){return AmCharts.uid++,"AmChartsEl-"+AmCharts.uid},AmCharts.isNN&&(document.addEventListener("mousemove",AmCharts.handleMouseMove,!0),window.addEventListener("resize",AmCharts.handleResize,!0),document.addEventListener("mouseup",AmCharts.handleMouseUp,!0),window.addEventListener("load",AmCharts.handleLoad,!0)),AmCharts.isIE&&(document.attachEvent("onmousemove",AmCharts.handleMouseMove),window.attachEvent("onresize",AmCharts.handleResize),document.attachEvent("onmouseup",AmCharts.handleMouseUp),window.attachEvent("onload",AmCharts.handleLoad)),AmCharts.clear=function(){var t=AmCharts.charts;if(t)for(var e=0;e<t.length;e++)t[e].clear();AmCharts.charts=null,AmCharts.isNN&&(document.removeEventListener("mousemove",AmCharts.handleMouseMove,!0),window.removeEventListener("resize",AmCharts.handleResize,!0),document.removeEventListener("mouseup",AmCharts.handleMouseUp,!0),window.removeEventListener("load",AmCharts.handleLoad,!0)),AmCharts.isIE&&(document.detachEvent("onmousemove",AmCharts.handleMouseMove),window.detachEvent("onresize",AmCharts.handleResize),document.detachEvent("onmouseup",AmCharts.handleMouseUp),window.detachEvent("onload",AmCharts.handleLoad))},AmCharts.makeChart=function(t,e){var i=e.type,s=e.theme;AmCharts.isString(s)&&(s=AmCharts.themes[s],e.theme=s);var a;switch(i){case"serial":a=new AmCharts.AmSerialChart(s);break;case"xy":a=new AmCharts.AmXYChart(s);break;case"pie":a=new AmCharts.AmPieChart(s);break;case"radar":a=new AmCharts.AmRadarChart(s);break;case"gauge":a=new AmCharts.AmAngularGauge(s);break;case"funnel":a=new AmCharts.AmFunnelChart(s);break;case"map":a=new AmCharts.AmMap(s);break;case"stock":a=new AmCharts.AmStockChart(s)}return AmCharts.extend(a,e),AmCharts.isReady?a.write(t):AmCharts.ready(function(){a.write(t)}),a},AmCharts.toBoolean=function(t,e){if(void 0===t)return e;switch(String(t).toLowerCase()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case null:return!1;default:return Boolean(t)}},AmCharts.removeFromArray=function(t,e){var i;for(i=t.length-1;0<=i;i--)t[i]==e&&t.splice(i,1)},AmCharts.getDecimals=function(t){var e=0;return isNaN(t)||(-1!=(t=String(t)).indexOf("e-")?e=Number(t.split("-")[1]):-1!=t.indexOf(".")&&(e=t.split(".")[1].length)),e},AmCharts.wrappedText=function(t,e,i,s,a,r,o,n,h){var l=AmCharts.text(t,e,i,s,a,r,o),d="\n";if(AmCharts.isModern||(d="<br>"),10<h)return l;if(l){var c=l.getBBox();if(c.width>n){l.remove();for(var l=[],m=0;-1<(index=e.indexOf(" ",m));)l.push(index),m=index+1;for(var u,p=Math.round(e.length/2),f=1e3,m=0;m<l.length;m++){var v=Math.abs(l[m]-p);v<f&&(u=l[m],f=v)}if(isNaN(u)){for(n=Math.ceil(c.width/n),m=1;m<n;m++)u=Math.round(e.length/n*m),e=e.substr(0,u)+d+e.substr(u);return AmCharts.text(t,e,i,s,a,r,o)}return e=e.substr(0,u)+d+e.substr(u+1),AmCharts.wrappedText(t,e,i,s,a,r,o,n,h+1)}return l}},AmCharts.getStyle=function(t,e){var i="";return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,"").getPropertyValue(e):t.currentStyle&&(e=e.replace(/\-(\w)/g,function(t,e){return e.toUpperCase()}),i=t.currentStyle[e]),i},AmCharts.removePx=function(t){return Number(t.substring(0,t.length-2))},AmCharts.getURL=function(t,e){if(t)if("_self"!=e&&e)if("_top"==e&&window.top)window.top.location.href=t;else if("_parent"==e&&window.parent)window.parent.location.href=t;else{var i=document.getElementsByName(e)[0];i?i.src=t:window.open(t)}else window.location.href=t},AmCharts.ifArray=function(t){return!!(t&&0<t.length)},AmCharts.callMethod=function(t,e){var i;for(i=0;i<e.length;i++){var s=e[i];if(s){s[t]&&s[t]();var a=s.length;if(0<a){var r;for(r=0;r<a;r++){var o=s[r];o&&o[t]&&o[t]()}}}}},AmCharts.toNumber=function(t){return"number"==typeof t?t:Number(String(t).replace(/[^0-9\-.]+/g,""))},AmCharts.toColor=function(t){if(""!==t&&void 0!==t)if(-1!=t.indexOf(",")){t=t.split(",");var e;for(e=0;e<t.length;e++){var i=t[e].substring(t[e].length-6,t[e].length);t[e]="#"+i}}else t=t.substring(t.length-6,t.length),t="#"+t;return t},AmCharts.toCoordinate=function(t,e,i){var s;return void 0!==t&&(t=String(t),i&&i<e&&(e=i),s=Number(t),-1!=t.indexOf("!")&&(s=e-Number(t.substr(1))),-1!=t.indexOf("%")&&(s=e*Number(t.substr(0,t.length-1))/100)),s},AmCharts.fitToBounds=function(t,e,i){return t<e&&(t=e),t>i&&(t=i),t},AmCharts.isDefined=function(t){return void 0!==t},AmCharts.stripNumbers=function(t){return t.replace(/[0-9]+/g,"")},AmCharts.roundTo=function(t,e){if(0>e)return t;var i=Math.pow(10,e);return Math.round(t*i)/i},AmCharts.toFixed=function(t,e){var i=String(Math.round(t*Math.pow(10,e)));if(0<e){var s=i.length;if(s<e){var a;for(a=0;a<e-s;a++)i="0"+i}return""===(s=i.substring(0,i.length-e))&&(s=0),s+"."+i.substring(i.length-e,i.length)}return String(i)},AmCharts.formatDuration=function(t,e,i,s,a,r){var o=AmCharts.intervals,n=r.decimalSeparator;if(t>=o[e].contains){var h=t-Math.floor(t/o[e].contains)*o[e].contains;return"ss"==e&&1==(h=AmCharts.formatNumber(h,r)).split(n)[0].length&&(h="0"+h),("mm"==e||"hh"==e)&&10>h&&(h="0"+h),i=h+""+s[e]+i,t=Math.floor(t/o[e].contains),e=o[e].nextInterval,AmCharts.formatDuration(t,e,i,s,a,r)}if("ss"==e&&1==(t=AmCharts.formatNumber(t,r)).split(n)[0].length&&(t="0"+t),("mm"==e||"hh"==e)&&10>t&&(t="0"+t),i=t+""+s[e]+i,o[a].count>o[e].count)for(t=o[e].count;t<o[a].count;t++)"ss"==(e=o[e].nextInterval)||"mm"==e||"hh"==e?i="00"+s[e]+i:"DD"==e&&(i="0"+s[e]+i);return":"==i.charAt(i.length-1)&&(i=i.substring(0,i.length-1)),i},AmCharts.formatNumber=function(t,e,i,s,a){t=AmCharts.roundTo(t,e.precision),isNaN(i)&&(i=e.precision);var r=e.decimalSeparator;e=e.thousandsSeparator;var o;o=0>t?"-":"",t=Math.abs(t);var n=!1;-1!=(d=String(t)).indexOf("e")&&(n=!0),0<=i&&!n&&(d=AmCharts.toFixed(t,i));var h="";if(n)h=d;else{var l,d=d.split(".");for(l=(n=String(d[0])).length;0<=l;l-=3)h=l!=n.length?0!==l?n.substring(l-3,l)+e+h:n.substring(l-3,l)+h:n.substring(l-3,l);void 0!==d[1]&&(h=h+r+d[1]),void 0!==i&&0<i&&"0"!=h&&(h=AmCharts.addZeroes(h,r,i))}return h=o+h,""===o&&!0===s&&0!==t&&(h="+"+h),!0===a&&(h+="%"),h},AmCharts.addZeroes=function(t,e,i){return void 0===(t=t.split(e))[1]&&0<i&&(t[1]="0"),t[1].length<i?(t[1]+="0",AmCharts.addZeroes(t[0]+e+t[1],e,i)):void 0!==t[1]?t[0]+e+t[1]:t[0]},AmCharts.scientificToNormal=function(t){var e,i;if("-"==(t=String(t).split("e"))[1].substr(0,1)){for(e="0.",i=0;i<Math.abs(Number(t[1]))-1;i++)e+="0";e+=t[0].split(".").join("")}else{var s=0;for((e=t[0].split("."))[1]&&(s=e[1].length),e=t[0].split(".").join(""),i=0;i<Math.abs(Number(t[1]))-s;i++)e+="0"}return e},AmCharts.toScientific=function(t,e){if(0===t)return"0";var i=Math.floor(Math.log(Math.abs(t))*Math.LOG10E);return Math.pow(10,i),mantissa=String(mantissa).split(".").join(e),String(mantissa)+"e"+i},AmCharts.randomColor=function(){return"#"+("00000"+(16777216*Math.random()<<0).toString(16)).substr(-6)},AmCharts.hitTest=function(t,e,i){var s=!1,a=t.x,r=t.x+t.width,o=t.y,n=t.y+t.height,h=AmCharts.isInRectangle;return s||(s=h(a,o,e)),s||(s=h(a,n,e)),s||(s=h(r,o,e)),s||(s=h(r,n,e)),s||!0===i||(s=AmCharts.hitTest(e,t,!0)),s},AmCharts.isInRectangle=function(t,e,i){return t>=i.x-5&&t<=i.x+i.width+5&&e>=i.y-5&&e<=i.y+i.height+5},AmCharts.isPercents=function(t){if(-1!=String(t).indexOf("%"))return!0},AmCharts.findPosX=function(t){var e=t,i=t.offsetLeft;if(t.offsetParent){for(;t=t.offsetParent;)i+=t.offsetLeft;for(;(e=e.parentNode)&&e!=document.body;)i-=e.scrollLeft||0}return i},AmCharts.findPosY=function(t){var e=t,i=t.offsetTop;if(t.offsetParent){for(;t=t.offsetParent;)i+=t.offsetTop;for(;(e=e.parentNode)&&e!=document.body;)i-=e.scrollTop||0}return i},AmCharts.findIfFixed=function(t){if(t.offsetParent)for(;t=t.offsetParent;)if("fixed"==AmCharts.getStyle(t,"position"))return!0;return!1},AmCharts.findIfAuto=function(t){return!(!t.style||"auto"!=AmCharts.getStyle(t,"overflow"))||!!t.parentNode&&AmCharts.findIfAuto(t.parentNode)},AmCharts.findScrollLeft=function(t,e){return t.scrollLeft&&(e+=t.scrollLeft),t.parentNode?AmCharts.findScrollLeft(t.parentNode,e):e},AmCharts.findScrollTop=function(t,e){return t.scrollTop&&(e+=t.scrollTop),t.parentNode?AmCharts.findScrollTop(t.parentNode,e):e},AmCharts.formatValue=function(t,e,i,s,a,r,o,n){if(e){void 0===a&&(a="");var h;for(h=0;h<i.length;h++){var l=i[h],d=e[l];void 0!==d&&(d=r?AmCharts.addPrefix(d,n,o,s):AmCharts.formatNumber(d,s),t=t.replace(RegExp("\\[\\["+a+l+"\\]\\]","g"),d))}}return t},AmCharts.formatDataContextValue=function(t,e){if(t){var i,s=t.match(/\[\[.*?\]\]/g);for(i=0;i<s.length;i++){var a=s[i];void 0!==e[a=a.substr(2,a.length-4)]&&(t=t.replace(RegExp("\\[\\["+a+"\\]\\]","g"),e[a]))}}return t},AmCharts.massReplace=function(t,e){for(var i in e)if(e.hasOwnProperty(i)){var s=e[i];void 0===s&&(s=""),t=t.replace(i,s)}return t},AmCharts.cleanFromEmpty=function(t){return t.replace(/\[\[[^\]]*\]\]/g,"")},AmCharts.addPrefix=function(t,e,i,s,a){var r,o,n,h=AmCharts.formatNumber(t,s),l="";if(0===t)return"0";if(0>t&&(l="-"),1<(t=Math.abs(t))){for(r=e.length-1;-1<r;r--)if(t>=e[r].number&&(o=t/e[r].number,1>(n=Number(s.precision))&&(n=1),i=AmCharts.roundTo(o,n),n=AmCharts.formatNumber(i,{precision:-1,decimalSeparator:s.decimalSeparator,thousandsSeparator:s.thousandsSeparator}),!a||o==i)){h=l+""+n+e[r].prefix;break}}else for(r=0;r<i.length;r++)if(t<=i[r].number){o=t/i[r].number,n=Math.abs(Math.round(Math.log(o)*Math.LOG10E)),h=l+""+(o=AmCharts.roundTo(o,n))+i[r].prefix;break}return h},AmCharts.remove=function(t){t&&t.remove()},AmCharts.recommended=function(){var t="js";return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")||swfobject&&swfobject.hasFlashPlayerVersion("8")&&(t="flash"),t},AmCharts.getEffect=function(t){return">"==t&&(t="easeOutSine"),"<"==t&&(t="easeInSine"),"elastic"==t&&(t="easeOutElastic"),t},AmCharts.getObjById=function(t,e){var i,s;for(s=0;s<t.length;s++){var a=t[s];a.id==e&&(i=a)}return i},AmCharts.applyTheme=function(t,e,i){e||(e=AmCharts.theme),e&&e[i]&&AmCharts.extend(t,e[i])},AmCharts.isString=function(t){return"string"==typeof t},AmCharts.extend=function(t,e,i){for(var s in e)i?t.hasOwnProperty(s)||(t[s]=e[s]):t[s]=e[s];return t},AmCharts.copyProperties=function(t,e){for(var i in t)t.hasOwnProperty(i)&&"events"!=i&&void 0!==t[i]&&"function"!=typeof t[i]&&"cname"!=i&&(e[i]=t[i])},AmCharts.processObject=function(t,e,i){return!1==t instanceof e&&(t=AmCharts.extend(new e(i),t)),t},AmCharts.fixNewLines=function(t){var e=RegExp("\\n","g");return t&&(t=t.replace(e,"<br />")),t},AmCharts.fixBrakes=function(t){if(AmCharts.isModern){var e=RegExp("<br>","g");t&&(t=t.replace(e,"\n"))}else t=AmCharts.fixNewLines(t);return t},AmCharts.deleteObject=function(t,e){if(t&&(void 0!==e&&null!==e||(e=20),0!==e))if("[object Array]"===Object.prototype.toString.call(t))for(var i=0;i<t.length;i++)AmCharts.deleteObject(t[i],e-1),t[i]=null;else if(t&&!t.tagName)try{for(i in t)t[i]&&("object"==typeof t[i]&&AmCharts.deleteObject(t[i],e-1),"function"!=typeof t[i]&&(t[i]=null))}catch(t){}},AmCharts.bounce=function(t,e,i,s,a){return(e/=a)<1/2.75?7.5625*s*e*e+i:e<2/2.75?s*(7.5625*(e-=1.5/2.75)*e+.75)+i:e<2.5/2.75?s*(7.5625*(e-=2.25/2.75)*e+.9375)+i:s*(7.5625*(e-=2.625/2.75)*e+.984375)+i},AmCharts.easeInSine=function(t,e,i,s,a){return-s*Math.cos(e/a*(Math.PI/2))+s+i},AmCharts.easeOutSine=function(t,e,i,s,a){return s*Math.sin(e/a*(Math.PI/2))+i},AmCharts.easeOutElastic=function(t,e,i,s,a){t=1.70158;var r=0,o=s;return 0===e?i:1==(e/=a)?i+s:(r||(r=.3*a),o<Math.abs(s)?(o=s,t=r/4):t=r/(2*Math.PI)*Math.asin(s/o),o*Math.pow(2,-10*e)*Math.sin(2*(e*a-t)*Math.PI/r)+s+i)},AmCharts.AmDraw=AmCharts.Class({construct:function(t,e,i,s){if(AmCharts.SVG_NS="http://www.w3.org/2000/svg",AmCharts.SVG_XLINK="http://www.w3.org/1999/xlink",AmCharts.hasSVG=!!document.createElementNS&&!!document.createElementNS(AmCharts.SVG_NS,"svg").createSVGRect,1>e&&(e=10),1>i&&(i=10),this.div=t,this.width=e,this.height=i,this.rBin=document.createElement("div"),AmCharts.hasSVG){AmCharts.SVG=!0;var a=this.createSvgElement("svg");a.style.position="absolute",a.style.width=e+"px",a.style.height=i+"px",(e=this.createSvgElement("desc")).appendChild(document.createTextNode("JavaScript chart by amCharts "+s.version)),a.appendChild(e),AmCharts.rtl&&(a.setAttribute("direction","rtl"),a.style.left="auto",a.style.right="0px"),a.setAttribute("version","1.1"),t.appendChild(a),this.container=a,this.R=new AmCharts.SVGRenderer(this)}else AmCharts.isIE&&AmCharts.VMLRenderer&&(AmCharts.VML=!0,AmCharts.vmlStyleSheet||(document.namespaces.add("amvml","urn:schemas-microsoft-com:vml"),(a=document.createStyleSheet()).addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true"),AmCharts.vmlStyleSheet=a),this.container=t,this.R=new AmCharts.VMLRenderer(this,s),this.R.disableSelection(t))},createSvgElement:function(t){return document.createElementNS(AmCharts.SVG_NS,t)},circle:function(t,e,i,s){var a=new AmCharts.AmDObject("circle",this);return a.attr({r:i,cx:t,cy:e}),this.addToContainer(a.node,s),a},setSize:function(t,e){0<t&&0<e&&(this.container.style.width=t+"px",this.container.style.height=e+"px")},rect:function(t,e,i,s,a,r,o){var n=new AmCharts.AmDObject("rect",this);return AmCharts.VML&&(a=100*a/Math.min(i,s),i+=2*r,s+=2*r,n.bw=r,n.node.style.marginLeft=-r,n.node.style.marginTop=-r),1>i&&(i=1),1>s&&(s=1),n.attr({x:t,y:e,width:i,height:s,rx:a,ry:a,"stroke-width":r}),this.addToContainer(n.node,o),n},image:function(t,e,i,s,a,r){var o=new AmCharts.AmDObject("image",this);return o.attr({x:e,y:i,width:s,height:a}),this.R.path(o,t),this.addToContainer(o.node,r),o},addToContainer:function(t,e){e||(e=this.container),e.appendChild(t)},text:function(t,e,i){return this.R.text(t,e,i)},path:function(t,e,i,s){var a=new AmCharts.AmDObject("path",this);return s||(s="100,100"),a.attr({cs:s}),i?a.attr({dd:t}):a.attr({d:t}),this.addToContainer(a.node,e),a},set:function(t){return this.R.set(t)},remove:function(t){if(t){var e=this.rBin;e.appendChild(t),e.innerHTML=""}},renderFix:function(){var t,e=this.container,i=e.style;try{t=e.getScreenCTM()||e.createSVGMatrix()}catch(i){t=e.createSVGMatrix()}e=1-t.e%1,t=1-t.f%1,.5<e&&(e-=1),.5<t&&(t-=1),e&&(i.left=e+"px"),t&&(i.top=t+"px")},update:function(){this.R.update()}}),AmCharts.AmDObject=AmCharts.Class({construct:function(t,e){this.D=e,this.R=e.R,this.node=this.R.create(this,t),this.y=this.x=0,this.scale=1},attr:function(t){return this.R.attr(this,t),this},getAttr:function(t){return this.node.getAttribute(t)},setAttr:function(t,e){return this.R.setAttr(this,t,e),this},clipRect:function(t,e,i,s){this.R.clipRect(this,t,e,i,s)},translate:function(t,e,i,s){s||(t=Math.round(t),e=Math.round(e)),this.R.move(this,t,e,i),this.x=t,this.y=e,this.scale=i,this.angle&&this.rotate(this.angle)},rotate:function(t,e){this.R.rotate(this,t,e),this.angle=t},animate:function(t,e,i){for(var s in t)if(t.hasOwnProperty(s)){var a=s,r=t[s];i=AmCharts.getEffect(i),this.R.animate(this,a,r,e,i)}},push:function(t){if(t){var e=this.node;e.appendChild(t.node);var i=t.clipPath;i&&e.appendChild(i),(t=t.grad)&&e.appendChild(t)}},text:function(t){this.R.setText(this,t)},remove:function(){this.R.remove(this)},clear:function(){var t=this.node;if(t.hasChildNodes())for(;1<=t.childNodes.length;)t.removeChild(t.firstChild)},hide:function(){this.setAttr("visibility","hidden")},show:function(){this.setAttr("visibility","visible")},getBBox:function(){return this.R.getBBox(this)},toFront:function(){var t=this.node;if(t){this.prevNextNode=t.nextSibling;var e=t.parentNode;e&&e.appendChild(t)}},toPrevious:function(){var t=this.node;t&&this.prevNextNode&&(t=t.parentNode)&&t.insertBefore(this.prevNextNode,null)},toBack:function(){var t=this.node;if(t){this.prevNextNode=t.nextSibling;var e=t.parentNode;if(e){var i=e.firstChild;i&&e.insertBefore(t,i)}}},mouseover:function(t){return this.R.addListener(this,"mouseover",t),this},mouseout:function(t){return this.R.addListener(this,"mouseout",t),this},click:function(t){return this.R.addListener(this,"click",t),this},dblclick:function(t){return this.R.addListener(this,"dblclick",t),this},mousedown:function(t){return this.R.addListener(this,"mousedown",t),this},mouseup:function(t){return this.R.addListener(this,"mouseup",t),this},touchstart:function(t){return this.R.addListener(this,"touchstart",t),this},touchend:function(t){return this.R.addListener(this,"touchend",t),this},contextmenu:function(t){return this.node.addEventListener?this.node.addEventListener("contextmenu",t,!0):this.R.addListener(this,"contextmenu",t),this},stop:function(t){(t=this.animationX)&&AmCharts.removeFromArray(this.R.animations,t),(t=this.animationY)&&AmCharts.removeFromArray(this.R.animations,t)},length:function(){return this.node.childNodes.length},gradient:function(t,e,i){this.R.gradient(this,t,e,i)},pattern:function(t,e){t&&this.R.pattern(this,t,e)}}),AmCharts.SVGRenderer=AmCharts.Class({construct:function(t){this.D=t,this.animations=[]},create:function(t,e){return document.createElementNS(AmCharts.SVG_NS,e)},attr:function(t,e){for(var i in e)e.hasOwnProperty(i)&&this.setAttr(t,i,e[i])},setAttr:function(t,e,i){void 0!==i&&t.node.setAttribute(e,i)},animate:function(t,e,i,s,a){var r=t.node;t["an_"+e]&&AmCharts.removeFromArray(this.animations,t["an_"+e]),"translate"==e?(r=(r=r.getAttribute("transform"))?String(r).substring(10,r.length-1):"0,0",r=r.split(", ").join(" "),0===(r=r.split(" ").join(","))&&(r="0,0")):r=Number(r.getAttribute(e)),i={obj:t,frame:0,attribute:e,from:r,to:i,time:s,effect:a},this.animations.push(i),t["an_"+e]=i},update:function(){var t,e=this.animations;for(t=e.length-1;0<=t;t--){var i,s,a,r=e[t],o=1e3*r.time/AmCharts.updateRate,n=r.frame+1,h=r.obj,l=r.attribute;n<=o?(r.frame++,"translate"==l?(i=r.from.split(","),l=Number(i[0]),i=Number(i[1]),isNaN(i)&&(i=0),s=r.to.split(","),a=Number(s[0]),s=Number(s[1]),a=0==a-l?a:Math.round(AmCharts[r.effect](0,n,l,a-l,o)),r=0==s-i?s:Math.round(AmCharts[r.effect](0,n,i,s-i,o)),l="transform",r="translate("+a+","+r+")"):(s=Number(r.from),i=Number(r.to),a=i-s,r=AmCharts[r.effect](0,n,s,a,o),isNaN(r)&&(r=i),0===a&&this.animations.splice(t,1)),this.setAttr(h,l,r)):("translate"==l?(s=r.to.split(","),a=Number(s[0]),s=Number(s[1]),h.translate(a,s)):(i=Number(r.to),this.setAttr(h,l,i)),this.animations.splice(t,1))}},getBBox:function(t){if(t=t.node)try{return t.getBBox()}catch(t){}return{width:0,height:0,x:0,y:0}},path:function(t,e){t.node.setAttributeNS(AmCharts.SVG_XLINK,"xlink:href",e)},clipRect:function(t,e,i,s,a){var r=t.node,o=t.clipPath;o&&this.D.remove(o);var n=r.parentNode;n&&(r=document.createElementNS(AmCharts.SVG_NS,"clipPath"),o=AmCharts.getUniqueId(),r.setAttribute("id",o),this.D.rect(e,i,s,a,0,0,r),n.appendChild(r),e="#",AmCharts.baseHref&&!AmCharts.isIE&&(e=window.location.href+e),this.setAttr(t,"clip-path","url("+e+o+")"),this.clipPathC++,t.clipPath=r)},text:function(t,e,i){var s=new AmCharts.AmDObject("text",this.D);t=String(t).split("\n");var a,r=e["font-size"];for(a=0;a<t.length;a++){var o=this.create(null,"tspan");o.appendChild(document.createTextNode(t[a])),o.setAttribute("y",(r+2)*a+Math.round(r/2)),o.setAttribute("x",0),s.node.appendChild(o)}return s.node.setAttribute("y",Math.round(r/2)),this.attr(s,e),this.D.addToContainer(s.node,i),s},setText:function(t,e){var i=t.node;i&&(i.removeChild(i.firstChild),i.appendChild(document.createTextNode(e)))},move:function(t,e,i,s){e="translate("+e+","+i+")",s&&(e=e+" scale("+s+")"),this.setAttr(t,"transform",e)},rotate:function(t,e){var i=t.node.getAttribute("transform"),s="rotate("+e+")";i&&(s=i+" "+s),this.setAttr(t,"transform",s)},set:function(t){var e=new AmCharts.AmDObject("g",this.D);if(this.D.container.appendChild(e.node),t){var i;for(i=0;i<t.length;i++)e.push(t[i])}return e},addListener:function(t,e,i){t.node["on"+e]=i},gradient:function(t,e,i,s){var a=t.node,r=t.grad;if(r&&this.D.remove(r),e=document.createElementNS(AmCharts.SVG_NS,e),r=AmCharts.getUniqueId(),e.setAttribute("id",r),!isNaN(s)){var o=0,n=0,h=0,l=0;90==s?h=100:270==s?l=100:180==s?o=100:0===s&&(n=100),e.setAttribute("x1",o+"%"),e.setAttribute("x2",n+"%"),e.setAttribute("y1",h+"%"),e.setAttribute("y2",l+"%")}for(s=0;s<i.length;s++)o=document.createElementNS(AmCharts.SVG_NS,"stop"),n=100*s/(i.length-1),0===s&&(n=0),o.setAttribute("offset",n+"%"),o.setAttribute("stop-color",i[s]),e.appendChild(o);a.parentNode.appendChild(e),i="#",AmCharts.baseHref&&!AmCharts.isIE&&(i=window.location.href+i),a.setAttribute("fill","url("+i+r+")"),t.grad=e},pattern:function(t,e,i){var s=t.node;isNaN(i)&&(i=1),(a=t.patternNode)&&this.D.remove(a);var a=document.createElementNS(AmCharts.SVG_NS,"pattern"),r=AmCharts.getUniqueId(),o=e;e.url&&(o=e.url);var n=Number(e.width);isNaN(n)&&(n=4);var h=Number(e.height);isNaN(h)&&(h=4),n/=i,h/=i,i=e.x,isNaN(i)&&(i=0);var l=-Math.random()*Number(e.randomX);isNaN(l)||(i=l),l=e.y,isNaN(l)&&(l=0),e=-Math.random()*Number(e.randomY),isNaN(e)||(l=e),a.setAttribute("id",r),a.setAttribute("width",n),a.setAttribute("height",h),a.setAttribute("patternUnits","userSpaceOnUse"),a.setAttribute("xlink:href",o),this.D.image(o,0,0,n,h,a).translate(i,l),o="#",AmCharts.baseHref&&!AmCharts.isIE&&(o=window.location.href+o),s.setAttribute("fill","url("+o+r+")"),t.patternNode=a,s.parentNode.appendChild(a)},remove:function(t){t.clipPath&&this.D.remove(t.clipPath),t.grad&&this.D.remove(t.grad),t.patternNode&&this.D.remove(t.patternNode),this.D.remove(t.node)}}),AmCharts.AmChart=AmCharts.Class({construct:function(t){this.theme=t,this.version="3.4.1",AmCharts.addChart(this),this.createEvents("dataUpdated","init","rendered","drawn"),this.height=this.width="100%",this.dataChanged=!0,this.chartCreated=!1,this.previousWidth=this.previousHeight=0,this.backgroundColor="#FFFFFF",this.borderAlpha=this.backgroundAlpha=0,this.color=this.borderColor="#000000",this.fontFamily="Verdana",this.fontSize=11,this.usePrefixes=!1,this.numberFormatter={precision:-1,decimalSeparator:".",thousandsSeparator:","},this.percentFormatter={precision:2,decimalSeparator:".",thousandsSeparator:","},this.labels=[],this.allLabels=[],this.titles=[],this.marginRight=this.marginLeft=this.autoMarginOffset=0,this.timeOuts=[],this.creditsPosition="top-left";var e=document.createElement("div"),i=e.style;i.overflow="hidden",i.position="relative",i.textAlign="left",this.chartDiv=e,(i=(e=document.createElement("div")).style).overflow="hidden",i.position="relative",i.textAlign="left",this.legendDiv=e,this.titleHeight=0,this.hideBalloonTime=150,this.handDrawScatter=2,this.handDrawThickness=1,this.prefixesOfBigNumbers=[{number:1e3,prefix:"k"},{number:1e6,prefix:"M"},{number:1e9,prefix:"G"},{number:1e12,prefix:"T"},{number:1e15,prefix:"P"},{number:1e18,prefix:"E"},{number:1e21,prefix:"Z"},{number:1e24,prefix:"Y"}],this.prefixesOfSmallNumbers=[{number:1e-24,prefix:"y"},{number:1e-21,prefix:"z"},{number:1e-18,prefix:"a"},{number:1e-15,prefix:"f"},{number:1e-12,prefix:"p"},{number:1e-9,prefix:"n"},{number:1e-6,prefix:"μ"},{number:.001,prefix:"m"}],this.panEventsEnabled=!1,AmCharts.bezierX=3,AmCharts.bezierY=6,this.product="amcharts",this.animations=[],this.balloon=new AmCharts.AmBalloon(this.theme),this.balloon.chart=this,AmCharts.applyTheme(this,t,"AmChart")},drawChart:function(){this.drawBackground(),this.redrawLabels(),this.drawTitles(),this.brr()},drawBackground:function(){AmCharts.remove(this.background);var t=this.container,e=this.backgroundColor,i=this.backgroundAlpha,s=this.set;AmCharts.isModern||0!==i||(i=.001);var a=this.updateWidth();this.realWidth=a;var r=this.updateHeight();this.realHeight=r,this.background=e=AmCharts.polygon(t,[0,a-1,a-1,0],[0,0,r-1,r-1],e,i,1,this.borderColor,this.borderAlpha),s.push(e),(e=this.backgroundImage)&&(this.path&&(e=this.path+e),this.bgImg=t=t.image(e,0,0,a,r),s.push(t))},drawTitles:function(){var t=this.titles;if(AmCharts.ifArray(t)){var e,i=20;for(e=0;e<t.length;e++){var s=t[e],a=s.color;void 0===a&&(a=this.color);var r=s.size;isNaN(s.alpha);var o=this.marginLeft;(a=AmCharts.text(this.container,s.text,a,this.fontFamily,r)).translate(o+(this.realWidth-this.marginRight-o)/2,i),o=!0,void 0!==s.bold&&(o=s.bold),o&&a.attr({"font-weight":"bold"}),i+=r+6,this.freeLabelsSet.push(a)}}},write:function(t){(t="object"!=typeof t?document.getElementById(t):t).innerHTML="",this.div=t,t.style.overflow="hidden",t.style.textAlign="left";var e=this.chartDiv,i=this.legendDiv,s=this.legend,a=i.style,r=e.style;this.measure();var o,n=document.createElement("div");(o=n.style).position="relative",this.containerDiv=n,t.appendChild(n);var h=this.exportConfig;if(h&&AmCharts.AmExport&&!this.AmExport&&(this.AmExport=new AmCharts.AmExport(this,h)),s)switch((s=this.addLegend(s,s.divId)).position){case"bottom":n.appendChild(e),n.appendChild(i);break;case"top":n.appendChild(i),n.appendChild(e);break;case"absolute":o.width=t.style.width,o.height=t.style.height,a.position="absolute",r.position="absolute",void 0!==s.left&&(a.left=s.left+"px"),void 0!==s.right&&(a.right=s.right+"px"),void 0!==s.top&&(a.top=s.top+"px"),void 0!==s.bottom&&(a.bottom=s.bottom+"px"),s.marginLeft=0,s.marginRight=0,n.appendChild(e),n.appendChild(i);break;case"right":o.width=t.style.width,o.height=t.style.height,a.position="relative",r.position="absolute",n.appendChild(e),n.appendChild(i);break;case"left":o.width=t.style.width,o.height=t.style.height,a.position="absolute",r.position="relative",n.appendChild(e),n.appendChild(i);break;case"outside":n.appendChild(e)}else n.appendChild(e);this.listenersAdded||(this.addListeners(),this.listenersAdded=!0),this.initChart()},createLabelsSet:function(){AmCharts.remove(this.labelsSet),this.labelsSet=this.container.set(),this.freeLabelsSet.push(this.labelsSet)},initChart:function(){this.divIsFixed=AmCharts.findIfFixed(this.chartDiv),this.previousHeight=this.divRealHeight,this.previousWidth=this.divRealWidth,this.destroy(),this.startInterval();var t=0;document.attachEvent&&!window.opera&&(t=1),this.dmouseX=this.dmouseY=0;var e=document.getElementsByTagName("html")[0];e&&window.getComputedStyle&&(e=window.getComputedStyle(e,null))&&(this.dmouseY=AmCharts.removePx(e.getPropertyValue("margin-top")),this.dmouseX=AmCharts.removePx(e.getPropertyValue("margin-left"))),this.mouseMode=t,(t=new AmCharts.AmDraw(this.chartDiv,this.realWidth,this.realHeight,this)).handDrawn=this.handDrawn,t.handDrawScatter=this.handDrawScatter,t.handDrawThickness=this.handDrawThickness,this.container=t,(AmCharts.VML||AmCharts.SVG)&&(t=this.container,this.set=t.set(),this.gridSet=t.set(),this.graphsBehindSet=t.set(),this.bulletBehindSet=t.set(),this.columnSet=t.set(),this.graphsSet=t.set(),this.trendLinesSet=t.set(),this.axesLabelsSet=t.set(),this.axesSet=t.set(),this.cursorSet=t.set(),this.scrollbarsSet=t.set(),this.bulletSet=t.set(),this.freeLabelsSet=t.set(),this.balloonsSet=t.set(),this.balloonsSet.setAttr("id","balloons"),this.zoomButtonSet=t.set(),this.linkSet=t.set(),this.renderFix())},measure:function(){var t=this.div,e=this.chartDiv,i=t.offsetWidth,s=t.offsetHeight,a=this.container;t.clientHeight&&(i=t.clientWidth,s=t.clientHeight);var r=AmCharts.removePx(AmCharts.getStyle(t,"padding-left")),o=AmCharts.removePx(AmCharts.getStyle(t,"padding-right")),n=AmCharts.removePx(AmCharts.getStyle(t,"padding-top")),h=AmCharts.removePx(AmCharts.getStyle(t,"padding-bottom"));isNaN(r)||(i-=r),isNaN(o)||(i-=o),isNaN(n)||(s-=n),isNaN(h)||(s-=h),t=(r=t.style).width,r=r.height,-1!=t.indexOf("px")&&(i=AmCharts.removePx(t)),-1!=r.indexOf("px")&&(s=AmCharts.removePx(r)),t=AmCharts.toCoordinate(this.width,i),r=AmCharts.toCoordinate(this.height,s),this.balloon=AmCharts.processObject(this.balloon,AmCharts.AmBalloon,this.theme),this.balloon.chart=this,t==this.previousWidth&&r==this.previousHeight||(e.style.width=t+"px",e.style.height=r+"px",a&&a.setSize(t,r),this.balloon.setBounds(2,2,t-2,r)),this.realWidth=t,this.realHeight=r,this.divRealWidth=i,this.divRealHeight=s},destroy:function(){this.chartDiv.innerHTML="",this.clearTimeOuts(),this.interval&&clearInterval(this.interval),this.interval=NaN},clearTimeOuts:function(){var t=this.timeOuts;if(t){var e;for(e=0;e<t.length;e++)clearTimeout(t[e])}this.timeOuts=[]},clear:function(t){AmCharts.callMethod("clear",[this.chartScrollbar,this.scrollbarV,this.scrollbarH,this.chartCursor]),this.chartCursor=this.scrollbarH=this.scrollbarV=this.chartScrollbar=null,this.clearTimeOuts(),this.container&&(this.container.remove(this.chartDiv),this.container.remove(this.legendDiv)),t||AmCharts.removeChart(this)},setMouseCursor:function(t){"auto"==t&&AmCharts.isNN&&(t="default"),this.chartDiv.style.cursor=t,this.legendDiv.style.cursor=t},redrawLabels:function(){this.labels=[];var t=this.allLabels;this.createLabelsSet();var e;for(e=0;e<t.length;e++)this.drawLabel(t[e])},drawLabel:function(t){if(this.container){var e=t.y,i=t.text,s=t.align,a=t.size,r=t.color,o=t.rotation,n=t.alpha,h=t.bold,l=AmCharts.toCoordinate(t.x,this.realWidth),e=AmCharts.toCoordinate(e,this.realHeight);l||(l=0),e||(e=0),void 0===r&&(r=this.color),isNaN(a)&&(a=this.fontSize),s||(s="start"),"left"==s&&(s="start"),"right"==s&&(s="end"),"center"==s&&(s="middle",o?e=this.realHeight-e+e/2:l=this.realWidth/2-l),void 0===n&&(n=1),void 0===o&&(o=0),e+=a/2,(i=AmCharts.text(this.container,i,r,this.fontFamily,a,s,h,n)).translate(l,e),0!==o&&i.rotate(o),t.url&&(i.setAttr("cursor","pointer"),i.click(function(){AmCharts.getURL(t.url)})),this.labelsSet.push(i),this.labels.push(i)}},addLabel:function(t,e,i,s,a,r,o,n,h,l){t={x:t,y:e,text:i,align:s,size:a,color:r,alpha:n,rotation:o,bold:h,url:l},this.container&&this.drawLabel(t),this.allLabels.push(t)},clearLabels:function(){var t,e=this.labels;for(t=e.length-1;0<=t;t--)e[t].remove();this.labels=[],this.allLabels=[]},updateHeight:function(){var t=this.divRealHeight,e=this.legend;if(e){var i=this.legendDiv.offsetHeight;"top"!=(e=e.position)&&"bottom"!=e||((0>(t-=i)||isNaN(t))&&(t=0),this.chartDiv.style.height=t+"px")}return t},updateWidth:function(){var t=this.divRealWidth,e=this.divRealHeight,i=this.legend;if(i){var s=(r=this.legendDiv).offsetWidth,a=r.offsetHeight,r=r.style,o=this.chartDiv.style;"right"!=(i=i.position)&&"left"!=i||((0>(t-=s)||isNaN(t))&&(t=0),o.width=t+"px","left"==i?o.left=s+"px":r.left=t+"px",r.top=(e-a)/2+"px")}return t},getTitleHeight:function(){var t=0,e=this.titles;if(0<e.length){var i,t=15;for(i=0;i<e.length;i++)t+=e[i].size+6}return t},addTitle:function(t,e,i,s,a){return isNaN(e)&&(e=this.fontSize+2),t={text:t,size:e,color:i,alpha:s,bold:a},this.titles.push(t),t},addMouseWheel:function(){var t=this;window.addEventListener&&(window.addEventListener("DOMMouseScroll",function(e){t.handleWheel.call(t,e)},!1),document.addEventListener("mousewheel",function(e){t.handleWheel.call(t,e)},!1))},handleWheel:function(t){if(this.mouseIsOver){var e=0;t||(t=window.event),t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),e&&this.handleWheelReal(e,t.shiftKey),t.preventDefault&&t.preventDefault()}},handleWheelReal:function(t){},addListeners:function(){var t=this,e=t.chartDiv;document.addEventListener?(t.panEventsEnabled&&"ontouchstart"in document.documentElement&&(e.addEventListener("touchstart",function(e){t.handleTouchMove.call(t,e),t.handleTouchStart.call(t,e)},!0),e.addEventListener("touchmove",function(e){t.handleTouchMove.call(t,e)},!0),e.addEventListener("touchend",function(e){t.handleTouchEnd.call(t,e)},!0)),e.addEventListener("mousedown",function(e){t.handleMouseDown.call(t,e)},!0),e.addEventListener("mouseover",function(e){t.handleMouseOver.call(t,e)},!0),e.addEventListener("mouseout",function(e){t.handleMouseOut.call(t,e)},!0)):(e.attachEvent("onmousedown",function(e){t.handleMouseDown.call(t,e)}),e.attachEvent("onmouseover",function(e){t.handleMouseOver.call(t,e)}),e.attachEvent("onmouseout",function(e){t.handleMouseOut.call(t,e)}))},dispDUpd:function(){var t;this.dispatchDataUpdated&&(this.dispatchDataUpdated=!1,t="dataUpdated",this.fire(t,{type:t,chart:this})),this.chartCreated||(t="init",this.fire(t,{type:t,chart:this})),this.chartRendered||(t="rendered",this.fire(t,{type:t,chart:this}),this.chartRendered=!0),t="drawn",this.fire(t,{type:t,chart:this})},validateSize:function(){var t=this;t.measure();var e=t.legend;if((t.realWidth!=t.previousWidth||t.realHeight!=t.previousHeight)&&0<t.realWidth&&0<t.realHeight){if(t.sizeChanged=!0,e){clearTimeout(t.legendInitTO);var i=setTimeout(function(){e.invalidateSize()},100);t.timeOuts.push(i),t.legendInitTO=i}t.marginsUpdated="xy"==t.type,clearTimeout(t.initTO),i=setTimeout(function(){t.initChart()},150),t.timeOuts.push(i),t.initTO=i}t.renderFix(),e&&e.renderFix()},invalidateSize:function(){this.previousHeight=this.previousWidth=NaN,this.invalidateSizeReal()},invalidateSizeReal:function(){var t=this;t.marginsUpdated=!1,clearTimeout(t.validateTO);var e=setTimeout(function(){t.validateSize()},5);t.timeOuts.push(e),t.validateTO=e},validateData:function(t){this.chartCreated&&(this.dataChanged=!0,this.marginsUpdated="xy"==this.type,this.initChart(t))},validateNow:function(){this.chartRendered=this.listenersAdded=!1,this.write(this.div)},showItem:function(t){t.hidden=!1,this.initChart()},hideItem:function(t){t.hidden=!0,this.initChart()},hideBalloon:function(){var t=this;clearInterval(t.hoverInt),clearTimeout(t.balloonTO),t.hoverInt=setTimeout(function(){t.hideBalloonReal.call(t)},t.hideBalloonTime)},cleanChart:function(){},hideBalloonReal:function(){var t=this.balloon;t&&t.hide()},showBalloon:function(t,e,i,s,a){var r=this;clearTimeout(r.balloonTO),clearInterval(r.hoverInt),r.balloonTO=setTimeout(function(){r.showBalloonReal.call(r,t,e,i,s,a)},1)},showBalloonReal:function(t,e,i,s,a){this.handleMouseMove();var r=this.balloon;r.enabled&&(r.followCursor(!1),r.changeColor(e),!i||r.fixedPosition?(r.setPosition(s,a),r.followCursor(!1)):r.followCursor(!0),t&&r.showBalloon(t))},handleTouchMove:function(t){this.hideBalloon();var e=this.chartDiv;t.touches&&(t=t.touches.item(0),this.mouseX=t.pageX-AmCharts.findPosX(e),this.mouseY=t.pageY-AmCharts.findPosY(e))},handleMouseOver:function(t){AmCharts.resetMouseOver(),this.mouseIsOver=!0},handleMouseOut:function(t){AmCharts.resetMouseOver(),this.mouseIsOver=!1},handleMouseMove:function(t){if(this.mouseIsOver){var e=this.chartDiv;t||(t=window.event);var i,s;if(t){switch(this.posX=AmCharts.findPosX(e),this.posY=AmCharts.findPosY(e),this.mouseMode){case 1:if(i=t.clientX-this.posX,s=t.clientY-this.posY,!this.divIsFixed){var a,r;(e=document.body)&&(a=e.scrollLeft,y1=e.scrollTop),(e=document.documentElement)&&(r=e.scrollLeft,y2=e.scrollTop),i+=a=Math.max(a,r),s+=r=Math.max(y1,y2)}break;case 0:this.divIsFixed?(i=t.clientX-this.posX,s=t.clientY-this.posY):(i=t.pageX-this.posX,s=t.pageY-this.posY)}t.touches&&(t=t.touches.item(0),i=t.pageX-this.posX,s=t.pageY-this.posY),this.mouseX=i-this.dmouseX,this.mouseY=s-this.dmouseY}}},handleTouchStart:function(t){this.handleMouseDown(t)},handleTouchEnd:function(t){AmCharts.resetMouseOver(),this.handleReleaseOutside(t)},handleReleaseOutside:function(t){},handleMouseDown:function(t){AmCharts.resetMouseOver(),this.mouseIsOver=!0,t&&t.preventDefault&&t.preventDefault()},addLegend:function(t,e){(t=AmCharts.processObject(t,AmCharts.AmLegend,this.theme)).divId=e;var i;return i="object"!=typeof e&&e?document.getElementById(e):e,this.legend=t,t.chart=this,i?(t.div=i,t.position="outside",t.autoMargins=!1):t.div=this.legendDiv,i=this.handleLegendEvent,this.listenTo(t,"showItem",i),this.listenTo(t,"hideItem",i),this.listenTo(t,"clickMarker",i),this.listenTo(t,"rollOverItem",i),this.listenTo(t,"rollOutItem",i),this.listenTo(t,"rollOverMarker",i),this.listenTo(t,"rollOutMarker",i),this.listenTo(t,"clickLabel",i),t},removeLegend:function(){this.legend=void 0,this.legendDiv.innerHTML=""},handleResize:function(){(AmCharts.isPercents(this.width)||AmCharts.isPercents(this.height))&&this.invalidateSizeReal(),this.renderFix()},renderFix:function(){if(!AmCharts.VML){var t=this.container;t&&t.renderFix()}},getSVG:function(){if(AmCharts.hasSVG)return this.container},animate:function(t,e,i,s,a,r,o){return t["an_"+e]&&AmCharts.removeFromArray(this.animations,t["an_"+e]),i={obj:t,frame:0,attribute:e,from:i,to:s,time:a,effect:r,suffix:o},t["an_"+e]=i,this.animations.push(i),i},setLegendData:function(t){var e=this.legend;e&&e.setData(t)},startInterval:function(){var t=this;clearInterval(t.interval),t.interval=setInterval(function(){t.updateAnimations.call(t)},AmCharts.updateRate)},stopAnim:function(t){AmCharts.removeFromArray(this.animations,t)},updateAnimations:function(){var t;for(this.container&&this.container.update(),t=this.animations.length-1;0<=t;t--){var e=this.animations[t],i=1e3*e.time/AmCharts.updateRate,s=e.frame+1,a=e.obj,r=e.attribute;if(s<=i){e.frame++;var o=Number(e.from),n=Number(e.to)-o,i=AmCharts[e.effect](0,s,o,n,i);0===n?this.animations.splice(t,1):a.node.style[r]=i+e.suffix}else a.node.style[r]=Number(e.to)+e.suffix,this.animations.splice(t,1)}},brr:function(){var t,e=window.location.hostname.split(".");if(2<=e.length&&(t=e[e.length-2]+"."+e[e.length-1]),this.amLink&&(e=this.amLink.parentNode)&&e.removeChild(this.amLink),e=this.creditsPosition,"amcharts.com"!=t){var i=t=0,s=this.realWidth,a=this.realHeight;"serial"!=this.type&&"xy"!=this.type||(t=this.marginLeftReal,i=this.marginTopReal,s=t+this.plotAreaWidth,a=i+this.plotAreaHeight);var r="https://www.sabah.com.tr/yerel-haberler",o="JavaScript charts",n=" ";"ammap"==this.product&&(r="https://www.sabah.com.tr/yerel-haberler",o=" ",n=" ");var h=document.createElement("a"),n=document.createTextNode(n);h.setAttribute("href",r),h.setAttribute("title",o),h.appendChild(n),this.chartDiv.appendChild(h),this.amLink=h,(r=h.style).position="absolute",r.textDecoration="none",r.color=this.color,r.fontFamily=this.fontFamily,r.fontSize=this.fontSize+"px",r.opacity=.5,r.display="block";var o=h.offsetWidth,h=h.offsetHeight,n=5+t,l=i+5;"bottom-left"==e&&(n=5+t,l=a-h-3),"bottom-right"==e&&(n=s-o-5,l=a-h-3),"top-right"==e&&(n=s-o-5,l=i+5),r.left=n+"px",r.top=l+"px"}}}),AmCharts.Slice=AmCharts.Class({construct:function(){}}),AmCharts.SerialDataItem=AmCharts.Class({construct:function(){}}),AmCharts.GraphDataItem=AmCharts.Class({construct:function(){}}),AmCharts.Guide=AmCharts.Class({construct:function(t){this.cname="Guide",AmCharts.applyTheme(this,t,this.cname)}}),AmCharts.AmBalloon=AmCharts.Class({construct:function(t){this.cname="AmBalloon",this.enabled=!0,this.fillColor="#FFFFFF",this.fillAlpha=.8,this.borderThickness=2,this.borderColor="#FFFFFF",this.borderAlpha=1,this.cornerRadius=0,this.maximumWidth=220,this.horizontalPadding=8,this.verticalPadding=4,this.pointerWidth=6,this.pointerOrientation="V",this.color="#000000",this.adjustBorderColor=!0,this.show=this.follow=this.showBullet=!1,this.bulletSize=3,this.shadowAlpha=.4,this.shadowColor="#000000",this.fadeOutDuration=this.animationDuration=.3,this.fixedPosition=!1,this.offsetY=6,this.offsetX=1,AmCharts.isModern||(this.offsetY*=1.5),AmCharts.applyTheme(this,t,this.cname)},draw:function(){var t=this.pointToX,e=this.pointToY;this.deltaSignX=this.deltaSignY=1;var i=this.chart;if(AmCharts.VML&&(this.fadeOutDuration=0),this.xAnim&&i.stopAnim(this.xAnim),this.yAnim&&i.stopAnim(this.yAnim),!isNaN(t)){var s=this.follow,a=i.container,r=this.set;if(AmCharts.remove(r),this.removeDiv(),this.set=r=a.set(),i.balloonsSet.push(r),this.show){var o=this.l,n=this.t,h=this.r,l=this.b,d=this.balloonColor,c=this.fillColor,m=this.borderColor,u=c;void 0!=d&&(this.adjustBorderColor?u=m=d:c=d);var p=this.horizontalPadding,f=this.verticalPadding,v=this.pointerWidth,g=this.pointerOrientation,C=this.cornerRadius,A=i.fontFamily,b=this.fontSize;void 0==b&&(b=i.fontSize);var w=(d=document.createElement("div")).style;w.position="absolute",d.innerHTML='<div style="max-width:'+this.maxWidth+"px; font-size:"+b+"px; color:"+this.color+"; font-family:"+A+'">'+this.text+"</div>",i.chartDiv.appendChild(d),this.textDiv=d,b=d.offsetWidth,A=d.offsetHeight,d.clientHeight&&(b=d.clientWidth,A=d.clientHeight);var A=A+2*f,N=b+2*p;window.opera&&(A+=2);var L,y=!1;L=this.offsetY,i.handDrawn&&(L+=i.handDrawScatter+2),"H"!=g?(b=t-N/2,e<n+A+10&&"down"!=g?(y=!0,s&&(e+=L),L=e+v,this.deltaSignY=-1):(s&&(e-=L),L=e-A-v,this.deltaSignY=1)):(2*v>A&&(v=A/2),L=e-A/2,t<o+(h-o)/2?(b=t+v,this.deltaSignX=-1):(b=t-N-v,this.deltaSignX=1)),L+A>=l&&(L=l-A),L<n&&(L=n),b<o&&(b=o),b+N>h&&(b=h-N);var S,n=L+f,l=b+p,f=this.shadowAlpha,x=this.shadowColor,p=this.borderThickness,M=this.bulletSize;0<C||0===v?(0<f&&(t=AmCharts.rect(a,N,A,c,0,p+1,x,f,this.cornerRadius),AmCharts.isModern?t.translate(1,1):t.translate(4,4),r.push(t)),c=AmCharts.rect(a,N,A,c,this.fillAlpha,p,m,this.borderAlpha,this.cornerRadius),this.showBullet&&(S=AmCharts.circle(a,M,u,this.fillAlpha),r.push(S))):(u=[],C=[],"H"!=g?((o=t-b)>N-v&&(o=N-v),o<v&&(o=v),u=[0,o-v,t-b,o+v,N,N,0,0],C=y?[0,0,e-L,0,0,A,A,0]:[A,A,e-L,A,A,0,0,A]):((u=e-L)>A-v&&(u=A-v),u<v&&(u=v),C=[0,u-v,e-L,u+v,A,A,0,0],u=t<o+(h-o)/2?[0,0,b<t?0:t-b,0,0,N,N,0]:[N,N,b+N>t?N:t-b,N,N,0,0,N]),0<f&&((t=AmCharts.polygon(a,u,C,c,0,p,x,f)).translate(1,1),r.push(t)),c=AmCharts.polygon(a,u,C,c,this.fillAlpha,p,m,this.borderAlpha)),this.bg=c,r.push(c),c.toFront(),a=1*this.deltaSignX,w.left=l+"px",w.top=n+"px",r.translate(b-a,L),c=c.getBBox(),this.bottom=L+A+1,this.yPos=c.y+L,S&&S.translate(this.pointToX-b+a,e-L),e=this.animationDuration,0<this.animationDuration&&!s&&!isNaN(this.prevX)&&(r.translate(this.prevX,this.prevY),r.animate({translate:b-a+","+L},e,"easeOutSine"),d&&(w.left=this.prevTX+"px",w.top=this.prevTY+"px",this.xAnim=i.animate({node:d},"left",this.prevTX,l,e,"easeOutSine","px"),this.yAnim=i.animate({node:d},"top",this.prevTY,n,e,"easeOutSine","px"))),this.prevX=b-a,this.prevY=L,this.prevTX=l,this.prevTY=n}}},followMouse:function(){if(this.follow&&this.show){var t=this.chart.mouseX-this.offsetX*this.deltaSignX,e=this.chart.mouseY;if(this.pointToX=t,this.pointToY=e,t!=this.previousX||e!=this.previousY)if(this.previousX=t,this.previousY=e,0===this.cornerRadius)this.draw();else{var i=this.set;if(i){var s=i.getBBox(),t=t-s.width/2,a=e-s.height-10;t<this.l&&(t=this.l),t>this.r-s.width&&(t=this.r-s.width),a<this.t&&(a=e+10),i.translate(t,a),(e=this.textDiv.style).left=t+this.horizontalPadding+"px",e.top=a+this.verticalPadding+"px"}}}},changeColor:function(t){this.balloonColor=t},setBounds:function(t,e,i,s){this.l=t,this.t=e,this.r=i,this.b=s,this.destroyTO&&clearTimeout(this.destroyTO)},showBalloon:function(t){this.text=t,this.show=!0,this.destroyTO&&clearTimeout(this.destroyTO),t=this.chart,this.fadeAnim1&&t.stopAnim(this.fadeAnim1),this.fadeAnim2&&t.stopAnim(this.fadeAnim2),this.draw()},hide:function(){var t=this,e=t.fadeOutDuration,i=t.chart;if(0<e){t.destroyTO=setTimeout(function(){t.destroy.call(t)},1e3*e),t.follow=!1,t.show=!1;var s=t.set;s&&(s.setAttr("opacity",t.fillAlpha),t.fadeAnim1=s.animate({opacity:0},e,"easeInSine")),t.textDiv&&(t.fadeAnim2=i.animate({node:t.textDiv},"opacity",1,0,e,"easeInSine",""))}else t.show=!1,t.follow=!1,t.destroy()},setPosition:function(t,e,i){this.pointToX=t,this.pointToY=e,i&&(t==this.previousX&&e==this.previousY||this.draw()),this.previousX=t,this.previousY=e},followCursor:function(t){var e=this;(e.follow=t)?(e.pShowBullet=e.showBullet,e.showBullet=!1):void 0!==e.pShowBullet&&(e.showBullet=e.pShowBullet),clearInterval(e.interval);var i=e.chart.mouseX,s=e.chart.mouseY;!isNaN(i)&&t&&(e.pointToX=i-e.offsetX*e.deltaSignX,e.pointToY=s,e.followMouse(),e.interval=setInterval(function(){e.followMouse.call(e)},40))},removeDiv:function(){if(this.textDiv){var t=this.textDiv.parentNode;t&&t.removeChild(this.textDiv)}},destroy:function(){clearInterval(this.interval),AmCharts.remove(this.set),this.removeDiv(),this.set=null}}),AmCharts.circle=function(t,e,i,s,a,r,o,n){return void 0!=a&&0!==a||(a=.01),void 0===r&&(r="#000000"),void 0===o&&(o=0),s={fill:i,stroke:r,"fill-opacity":s,"stroke-width":a,"stroke-opacity":o},t=t.circle(0,0,e).attr(s),n&&t.gradient("radialGradient",[i,AmCharts.adjustLuminosity(i,-.6)]),t},AmCharts.text=function(t,e,i,s,a,r,o,n){return r||(r="middle"),"right"==r&&(r="end"),isNaN(n)&&(n=1),void 0!==e&&(e=String(e),AmCharts.isIE&&!AmCharts.isModern&&(e=e.replace("&","&"),e=e.replace("&","&"))),i={fill:i,"font-family":s,"font-size":a,opacity:n},!0===o&&(i["font-weight"]="bold"),i["text-anchor"]=r,t.text(e,i)},AmCharts.polygon=function(t,e,i,s,a,r,o,n,h,l,d){isNaN(r)&&(r=.01),isNaN(n)&&(n=a);var c=s,m=!1;for("object"==typeof c&&1<c.length&&(m=!0,c=c[0]),void 0===o&&(o=c),a={fill:c,stroke:o,"fill-opacity":a,"stroke-width":r,"stroke-opacity":n},void 0!==d&&0<d&&(a["stroke-dasharray"]=d),d=AmCharts.dx,r=AmCharts.dy,t.handDrawn&&(i=AmCharts.makeHD(e,i,t.handDrawScatter),e=i[0],i=i[1]),o=Math.round,l&&(o=AmCharts.doNothing),l="M"+(o(e[0])+d)+","+(o(i[0])+r),n=1;n<e.length;n++)l+=" L"+(o(e[n])+d)+","+(o(i[n])+r);return t=t.path(l+" Z").attr(a),m&&t.gradient("linearGradient",s,h),t},AmCharts.rect=function(t,e,i,s,a,r,o,n,h,l,d){isNaN(r)&&(r=0),void 0===h&&(h=0),void 0===l&&(l=270),isNaN(a)&&(a=0);var c=s,m=!1;"object"==typeof c&&(c=c[0],m=!0),void 0===o&&(o=c),void 0===n&&(n=a),e=Math.round(e),i=Math.round(i);var u=0,p=0;return 0>e&&(e=Math.abs(e),u=-e),0>i&&(i=Math.abs(i),p=-i),u+=AmCharts.dx,p+=AmCharts.dy,a={fill:c,stroke:o,"fill-opacity":a,"stroke-opacity":n},void 0!==d&&0<d&&(a["stroke-dasharray"]=d),t=t.rect(u,p,e,i,h,r).attr(a),m&&t.gradient("linearGradient",s,l),t},AmCharts.bullet=function(t,e,i,s,a,r,o,n,h,l,d){var c;switch("circle"==e&&(e="round"),e){case"round":c=AmCharts.circle(t,i/2,s,a,r,o,n);break;case"square":c=AmCharts.polygon(t,[-i/2,i/2,i/2,-i/2],[i/2,i/2,-i/2,-i/2],s,a,r,o,n,l-180);break;case"rectangle":c=AmCharts.polygon(t,[-i,i,i,-i],[i/2,i/2,-i/2,-i/2],s,a,r,o,n,l-180);break;case"diamond":c=AmCharts.polygon(t,[-i/2,0,i/2,0],[0,-i/2,0,i/2],s,a,r,o,n);break;case"triangleUp":c=AmCharts.triangle(t,i,0,s,a,r,o,n);break;case"triangleDown":c=AmCharts.triangle(t,i,180,s,a,r,o,n);break;case"triangleLeft":c=AmCharts.triangle(t,i,270,s,a,r,o,n);break;case"triangleRight":c=AmCharts.triangle(t,i,90,s,a,r,o,n);break;case"bubble":c=AmCharts.circle(t,i/2,s,a,r,o,n,!0);break;case"yError":(c=t.set()).push(AmCharts.line(t,[0,0],[-i/2,i/2],s,a,r)),c.push(AmCharts.line(t,[-h,h],[-i/2,-i/2],s,a,r)),c.push(AmCharts.line(t,[-h,h],[i/2,i/2],s,a,r));break;case"xError":(c=t.set()).push(AmCharts.line(t,[-i/2,i/2],[0,0],s,a,r)),c.push(AmCharts.line(t,[-i/2,-i/2],[-h,h],s,a,r)),c.push(AmCharts.line(t,[i/2,i/2],[-h,h],s,a,r))}return c&&c.pattern(d),c},AmCharts.triangle=function(t,e,i,s,a,r,o,n){void 0!==r&&0!==r||(r=1),void 0===o&&(o="#000"),void 0===n&&(n=0),s={fill:s,stroke:o,"fill-opacity":a,"stroke-width":r,"stroke-opacity":n},e/=2;var h;return 0===i&&(h=" M"+-e+","+e+" L0,"+-e+" L"+e+","+e+" Z"),180==i&&(h=" M"+-e+","+-e+" L0,"+e+" L"+e+","+-e+" Z"),90==i&&(h=" M"+-e+","+-e+" L"+e+",0 L"+-e+","+e+" Z"),270==i&&(h=" M"+-e+",0 L"+e+","+e+" L"+e+","+-e+" Z"),t.path(h).attr(s)},AmCharts.line=function(t,e,i,s,a,r,o,n,h,l,d){if(t.handDrawn&&!d)return AmCharts.handDrawnLine(t,e,i,s,a,r,o,n,h,l,d);for(r={fill:"none","stroke-width":r},void 0!==o&&0<o&&(r["stroke-dasharray"]=o),isNaN(a)||(r["stroke-opacity"]=a),s&&(r.stroke=s),s=Math.round,l&&(s=AmCharts.doNothing),l=AmCharts.dx,a=AmCharts.dy,o="M"+(s(e[0])+l)+","+(s(i[0])+a),n=1;n<e.length;n++)o+=" L"+(s(e[n])+l)+","+(s(i[n])+a);return AmCharts.VML?t.path(o,void 0,!0).attr(r):(h&&(o+=" M0,0 L0,0"),t.path(o).attr(r))},AmCharts.makeHD=function(t,e,i){for(var s=[],a=[],r=1;r<t.length;r++)for(var o=Number(t[r-1]),n=Number(e[r-1]),h=Number(t[r]),l=Number(e[r]),d=Math.sqrt(Math.pow(h-o,2)+Math.pow(l-n,2)),d=Math.round(d/50)+1,h=(h-o)/d,l=(l-n)/d,c=0;c<=d;c++){var m=o+c*h+Math.random()*i,u=n+c*l+Math.random()*i;s.push(m),a.push(u)}return[s,a]},AmCharts.handDrawnLine=function(t,e,i,s,a,r,o,n,h,l,d){var c=t.set();for(d=1;d<e.length;d++)for(var m=[e[d-1],e[d]],u=[i[d-1],i[d]],u=AmCharts.makeHD(m,u,t.handDrawScatter),m=u[0],u=u[1],p=1;p<m.length;p++)c.push(AmCharts.line(t,[m[p-1],m[p]],[u[p-1],u[p]],s,a,r+Math.random()*t.handDrawThickness-t.handDrawThickness/2,o,n,h,l,!0));return c},AmCharts.doNothing=function(t){return t},AmCharts.wedge=function(t,e,i,s,a,r,o,n,h,l,d,c){var m=Math.round;r=m(r);var u=m((o=m(o))/r*(n=m(n))),p=AmCharts.VML;359.94<(v=359.5+r/100)&&(v=359.94),a>=v&&(a=v);var f=1/180*Math.PI,v=e+Math.sin(s*f)*n,g=i-Math.cos(s*f)*u,C=e+Math.sin(s*f)*r,A=i-Math.cos(s*f)*o,b=e+Math.sin((s+a)*f)*r,w=i-Math.cos((s+a)*f)*o,N=e+Math.sin((s+a)*f)*n,f=i-Math.cos((s+a)*f)*u,L={fill:AmCharts.adjustLuminosity(l.fill,-.2),"stroke-opacity":0,"fill-opacity":l["fill-opacity"]},y=0;180<Math.abs(a)&&(y=1),s=t.set();var S;p&&(v=m(10*v),C=m(10*C),b=m(10*b),N=m(10*N),g=m(10*g),A=m(10*A),w=m(10*w),f=m(10*f),e=m(10*e),h=m(10*h),i=m(10*i),r*=10,o*=10,n*=10,u*=10,1>Math.abs(a)&&1>=Math.abs(b-C)&&1>=Math.abs(w-A)&&(S=!0)),a="";var x;if(c&&(L["fill-opacity"]=0,L["stroke-opacity"]=l["stroke-opacity"]/2,L.stroke=l.stroke),0<h&&(p?(x=" M"+v+","+(g+h)+" L"+C+","+(A+h),S||(x+=" A"+(e-r)+","+(h+i-o)+","+(e+r)+","+(h+i+o)+","+C+","+(A+h)+","+b+","+(w+h)),x+=" L"+N+","+(f+h),0<n&&(S||(x+=" B"+(e-n)+","+(h+i-u)+","+(e+n)+","+(h+i+u)+","+N+","+(h+f)+","+v+","+(h+g)))):(x=" M"+v+","+(g+h)+" L"+C+","+(A+h)+" A"+r+","+o+",0,"+y+",1,"+b+","+(w+h)+" L"+N+","+(f+h),0<n&&(x+=" A"+n+","+u+",0,"+y+",0,"+v+","+(g+h))),x+=" Z",x=t.path(x,void 0,void 0,"1000,1000").attr(L),s.push(x),x=t.path(" M"+v+","+g+" L"+v+","+(g+h)+" L"+C+","+(A+h)+" L"+C+","+A+" L"+v+","+g+" Z",void 0,void 0,"1000,1000").attr(L),h=t.path(" M"+b+","+w+" L"+b+","+(w+h)+" L"+N+","+(f+h)+" L"+N+","+f+" L"+b+","+w+" Z",void 0,void 0,"1000,1000").attr(L),s.push(x),s.push(h)),p?(S||(a=" A"+m(e-r)+","+m(i-o)+","+m(e+r)+","+m(i+o)+","+m(C)+","+m(A)+","+m(b)+","+m(w)),r=" M"+m(v)+","+m(g)+" L"+m(C)+","+m(A)+a+" L"+m(N)+","+m(f)):r=" M"+v+","+g+" L"+C+","+A+" A"+r+","+o+",0,"+y+",1,"+b+","+w+" L"+N+","+f,0<n&&(p?S||(r+=" B"+(e-n)+","+(i-u)+","+(e+n)+","+(i+u)+","+N+","+f+","+v+","+g):r+=" A"+n+","+u+",0,"+y+",0,"+v+","+g),t.handDrawn&&(e=AmCharts.line(t,[v,C],[g,A],l.stroke,l.thickness*Math.random()*t.handDrawThickness,l["stroke-opacity"]),s.push(e)),t=t.path(r+" Z",void 0,void 0,"1000,1000").attr(l),d){for(e=[],i=0;i<d.length;i++)e.push(AmCharts.adjustLuminosity(l.fill,d[i]));0<e.length&&t.gradient("linearGradient",e)}return t.pattern(c),s.push(t),s},AmCharts.adjustLuminosity=function(t,e){6>(t=String(t).replace(/[^0-9a-f]/gi,"")).length&&(t=String(t[0])+String(t[0])+String(t[1])+String(t[1])+String(t[2])+String(t[2])),e=e||0;var i,s,a="#";for(s=0;3>s;s++)i=parseInt(t.substr(2*s,2),16),i=Math.round(Math.min(Math.max(0,i+i*e),255)).toString(16),a+=("00"+i).substr(i.length);return a},AmCharts.AmLegend=AmCharts.Class({construct:function(t){this.cname="AmLegend",this.createEvents("rollOverMarker","rollOverItem","rollOutMarker","rollOutItem","showItem","hideItem","clickMarker","rollOverItem","rollOutItem","clickLabel"),this.position="bottom",this.borderColor=this.color="#000000",this.borderAlpha=0,this.markerLabelGap=5,this.verticalGap=10,this.align="left",this.horizontalGap=0,this.spacing=10,this.markerDisabledColor="#AAB3B3",this.markerType="square",this.markerSize=16,this.markerBorderThickness=this.markerBorderAlpha=1,this.marginBottom=this.marginTop=0,this.marginLeft=this.marginRight=20,this.autoMargins=!0,this.valueWidth=50,this.switchable=!0,this.switchType="x",this.switchColor="#FFFFFF",this.rollOverColor="#BFD8EA",this.reversedOrder=!1,this.labelText="[[title]]",this.valueText="[[value]]",this.useMarkerColorForLabels=!1,this.rollOverGraphAlpha=1,this.textClickEnabled=!1,this.equalWidths=!0,this.dateFormat="DD-MM-YYYY",this.backgroundColor="#FFFFFF",this.backgroundAlpha=0,this.useGraphSettings=!1,this.showEntries=!0,AmCharts.applyTheme(this,t,this.cname)},setData:function(t){this.legendData=t,this.invalidateSize()},invalidateSize:function(){this.destroy(),this.entries=[],this.valueLabels=[],(AmCharts.ifArray(this.legendData)||AmCharts.ifArray(this.data))&&this.drawLegend()},drawLegend:function(){var t=this.chart,e=this.position,i=this.width,s=t.divRealWidth,a=t.divRealHeight,r=this.div,o=this.legendData;if(this.data&&(o=this.data),isNaN(this.fontSize)&&(this.fontSize=t.fontSize),"right"==e||"left"==e)this.maxColumns=1,this.autoMargins&&(this.marginLeft=this.marginRight=10);else if(this.autoMargins){this.marginRight=t.marginRight,this.marginLeft=t.marginLeft;var n=t.autoMarginOffset;"bottom"==e?(this.marginBottom=n,this.marginTop=0):(this.marginTop=n,this.marginBottom=0)}if(i=void 0!==i?AmCharts.toCoordinate(i,s):t.realWidth,"outside"==e?(i=r.offsetWidth,a=r.offsetHeight,r.clientHeight&&(i=r.clientWidth,a=r.clientHeight)):(r.style.width=i+"px",r.className="amChartsLegend"),this.divWidth=i,this.container=new AmCharts.AmDraw(r,i,a,t),this.lx=0,this.ly=8,(e=this.markerSize)>this.fontSize&&(this.ly=e/2-1),0<e&&(this.lx+=e+this.markerLabelGap),this.titleWidth=0,(e=this.title)&&((t=AmCharts.text(this.container,e,this.color,t.fontFamily,this.fontSize,"start",!0)).translate(this.marginLeft,this.marginTop+this.verticalGap+this.ly+1),t=t.getBBox(),this.titleWidth=t.width+15,this.titleHeight=t.height+6),this.index=this.maxLabelWidth=0,this.showEntries){for(t=0;t<o.length;t++)this.createEntry(o[t]);for(t=this.index=0;t<o.length;t++)this.createValue(o[t])}this.arrangeEntries(),this.updateValues()},arrangeEntries:function(){var t=this.position,e=this.marginLeft+this.titleWidth,i=this.marginRight,s=this.marginTop,a=this.marginBottom,r=this.horizontalGap,o=this.div,n=this.divWidth,h=this.maxColumns,l=this.verticalGap,d=this.spacing,c=n-i-e,m=0,u=0,p=this.container,f=p.set();this.set=f,p=p.set(),f.push(p);var v,g,C=this.entries;for(g=0;g<C.length;g++){var A=(v=C[g].getBBox()).width;A>m&&(m=A),(v=v.height)>u&&(u=v)}var b=A=0,w=r;for(g=0;g<C.length;g++){var N=C[g];this.reversedOrder&&(N=C[C.length-g-1]),v=N.getBBox();var L;this.equalWidths?L=r+b*(m+d+this.markerLabelGap):(L=w,w=w+v.width+r+d),L+v.width>c&&0<g&&0!==b&&(A++,b=0,L=r,w=L+v.width+r+d),N.translate(L,(u+l)*A),b++,!isNaN(h)&&b>=h&&(b=0,A++),p.push(N)}h=(v=p.getBBox()).height+2*l-1,"left"==t||"right"==t?(n=v.width+2*r,o.style.width=n+e+i+"px"):n=n-e-i-1,i=AmCharts.polygon(this.container,[0,n,n,0],[0,0,h,h],this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha),f.push(i),f.translate(e,s),i.toBack(),e=r,"top"!=t&&"bottom"!=t&&"absolute"!=t&&"outside"!=t||("center"==this.align?e=r+(n-v.width)/2:"right"==this.align&&(e=r+n-v.width)),p.translate(e,l+1),this.titleHeight>h&&(h=this.titleHeight),0>(t=h+s+a+1)&&(t=0),o.style.height=Math.round(t)+"px"},createEntry:function(t){if(!1!==t.visibleInLegend){var e=this.chart,i=t.markerType;i||(i=this.markerType);var s=t.color,a=t.alpha;t.legendKeyColor&&(s=t.legendKeyColor()),t.legendKeyAlpha&&(a=t.legendKeyAlpha());var r;!0===t.hidden&&(r=s=this.markerDisabledColor);var o=t.pattern,n=t.customMarker;n||(n=this.customMarker);var h=this.container,l=this.markerSize,d=0,c=0,m=l/2;if(this.useGraphSettings)if("line"==(d=t.type)||"step"==d||"smoothedLine"==d||"ohlc"==d)this.switchType=void 0,o=h.set(),t.hidden||(s=t.lineColorR,r=t.bulletBorderColorR),c=AmCharts.line(h,[0,2*l],[l/2,l/2],s,t.lineAlpha,t.lineThickness,t.dashLength),o.push(c),t.bullet&&(t.hidden||(s=t.bulletColorR),c=AmCharts.bullet(h,t.bullet,t.bulletSize,s,t.bulletAlpha,t.bulletBorderThickness,r,t.bulletBorderAlpha))&&(c.translate(l+1,l/2),o.push(c)),m=0,d=l,c=l/3;else{var u;t.getGradRotation&&(u=t.getGradRotation()),d=t.fillColorsR,!0===t.hidden&&(d=s),(o=this.createMarker("rectangle",d,t.fillAlphas,t.lineThickness,s,t.lineAlpha,u,o))&&(m=l,o.translate(m,l/2)),d=l}else n?(e.path&&(n=e.path+n),o=h.image(n,0,0,l,l)):(o=this.createMarker(i,s,a,void 0,void 0,void 0,void 0,o))&&o.translate(l/2,l/2);this.addListeners(o,t),h=h.set([o]),this.switchable&&h.setAttr("cursor","pointer"),(r=this.switchType)&&"none"!=r&&(u="x"==r?this.createX():this.createV(),u.dItem=t,!0!==t.hidden?"x"==r?u.hide():u.show():"x"!=r&&u.hide(),this.switchable||u.hide(),this.addListeners(u,t),t.legendSwitch=u,h.push(u)),r=this.color,t.showBalloon&&this.textClickEnabled&&void 0!==this.selectedColor&&(r=this.selectedColor),this.useMarkerColorForLabels&&(r=s),!0===t.hidden&&(r=this.markerDisabledColor),s=AmCharts.massReplace(this.labelText,{"[[title]]":t.title}),u=this.fontSize,o&&l<=u&&o.translate(m,l/2+this.ly-u/2+(u+2-l)/2-c);var p;s&&(s=AmCharts.fixBrakes(s),t.legendTextReal=s,(p=AmCharts.text(this.container,s,r,e.fontFamily,u,"start")).translate(this.lx+d,this.ly),h.push(p),e=p.getBBox().width,this.maxLabelWidth<e&&(this.maxLabelWidth=e)),this.entries[this.index]=h,t.legendEntry=this.entries[this.index],t.legendLabel=p,this.index++}},addListeners:function(t,e){var i=this;t&&t.mouseover(function(){i.rollOverMarker(e)}).mouseout(function(){i.rollOutMarker(e)}).click(function(){i.clickMarker(e)})},rollOverMarker:function(t){this.switchable&&this.dispatch("rollOverMarker",t),this.dispatch("rollOverItem",t)},rollOutMarker:function(t){this.switchable&&this.dispatch("rollOutMarker",t),this.dispatch("rollOutItem",t)},clickMarker:function(t){this.switchable?!0===t.hidden?this.dispatch("showItem",t):this.dispatch("hideItem",t):this.textClickEnabled&&this.dispatch("clickMarker",t)},rollOverLabel:function(t){t.hidden||(this.textClickEnabled&&t.legendLabel&&t.legendLabel.attr({fill:this.rollOverColor}),this.dispatch("rollOverItem",t))},rollOutLabel:function(t){if(!t.hidden){if(this.textClickEnabled&&t.legendLabel){var e=this.color;void 0!==this.selectedColor&&t.showBalloon&&(e=this.selectedColor),this.useMarkerColorForLabels&&void 0===(e=t.lineColor)&&(e=t.color),t.legendLabel.attr({fill:e})}this.dispatch("rollOutItem",t)}},clickLabel:function(t){this.textClickEnabled?t.hidden||this.dispatch("clickLabel",t):this.switchable&&(!0===t.hidden?this.dispatch("showItem",t):this.dispatch("hideItem",t))},dispatch:function(t,e){this.fire(t,{type:t,dataItem:e,target:this,chart:this.chart})},createValue:function(t){var e=this,i=e.fontSize;if(!1!==t.visibleInLegend){o=e.maxLabelWidth;e.equalWidths||(e.valueAlign="left"),"left"==e.valueAlign&&(o=t.legendEntry.getBBox().width);var s=o;if(e.valueText&&0<e.valueWidth){var a=e.color;e.useMarkerColorForValues&&(a=t.color,t.legendKeyColor&&(a=t.legendKeyColor())),!0===t.hidden&&(a=e.markerDisabledColor);var r=e.valueText,o=o+e.lx+e.markerLabelGap+e.valueWidth,n="end";"left"==e.valueAlign&&(o-=e.valueWidth,n="start"),(a=AmCharts.text(e.container,r,a,e.chart.fontFamily,i,n)).translate(o,e.ly),e.entries[e.index].push(a),s+=e.valueWidth+2*e.markerLabelGap,a.dItem=t,e.valueLabels.push(a)}e.index++,(a=e.markerSize)<i+7&&(a=i+7,AmCharts.VML&&(a+=3)),(i=e.container.rect(e.markerSize,0,s,a,0,0).attr({stroke:"none",fill:"#ffffff","fill-opacity":.005})).dItem=t,e.entries[e.index-1].push(i),i.mouseover(function(){e.rollOverLabel(t)}).mouseout(function(){e.rollOutLabel(t)}).click(function(){e.clickLabel(t)})}},createV:function(){var t=this.markerSize;return AmCharts.polygon(this.container,[t/5,t/2,t-t/5,t/2],[t/3,t-t/5,t/5,t/1.7],this.switchColor)},createX:function(){var t=this.markerSize-4,e={stroke:this.switchColor,"stroke-width":3},i=this.container,s=AmCharts.line(i,[3,t],[3,t]).attr(e),t=AmCharts.line(i,[3,t],[t,3]).attr(e);return this.container.set([s,t])},createMarker:function(t,e,i,s,a,r,o,n){var h=this.markerSize,l=this.container;return a||(a=this.markerBorderColor),a||(a=e),isNaN(s)&&(s=this.markerBorderThickness),isNaN(r)&&(r=this.markerBorderAlpha),AmCharts.bullet(l,t,h,e,i,s,a,r,h,o,n)},validateNow:function(){this.invalidateSize()},updateValues:function(){var t,e=this.valueLabels,i=this.chart,s=this.data;for(t=0;t<e.length;t++){var a=e[t],r=a.dItem,o=" ";if(s)r.value?a.text(r.value):a.text("");else{if(void 0!==r.type){var n=r.currentDataItem,h=this.periodValueText;r.legendPeriodValueText&&(h=r.legendPeriodValueText),n?(o=this.valueText,r.legendValueText&&(o=r.legendValueText),o=i.formatString(o,n)):h&&(o=i.formatPeriodString(h,r))}else o=i.formatString(this.valueText,r);(n=r.legendLabel)&&n.text(r.legendTextReal),a.text(o)}}},renderFix:function(){if(!AmCharts.VML){var t=this.container;t&&t.renderFix()}},destroy:function(){this.div.innerHTML="",AmCharts.remove(this.set)}}),AmCharts.maps={},AmCharts.AmMap=AmCharts.Class({inherits:AmCharts.AmChart,construct:function(t){this.cname="AmMap",this.type="map",this.theme=t,this.version="3.8.8",this.svgNotSupported="This browser doesn't support SVG. Use Chrome, Firefox, Internet Explorer 9 or later.",this.createEvents("rollOverMapObject","rollOutMapObject","clickMapObject","selectedObjectChanged","homeButtonClicked","zoomCompleted","dragCompleted","positionChanged","writeDevInfo","click"),this.zoomDuration=1,this.zoomControl=new AmCharts.ZoomControl(t),this.fitMapToContainer=!0,this.mouseWheelZoomEnabled=this.backgroundZoomsToTop=!1,this.allowClickOnSelectedObject=this.useHandCursorOnClickableOjects=this.showBalloonOnSelectedObject=!0,this.showObjectsAfterZoom=this.wheelBusy=!1,this.zoomOnDoubleClick=this.useObjectColorForBalloon=!0,this.allowMultipleDescriptionWindows=!1,this.dragMap=this.centerMap=this.linesAboveImages=!0,this.colorSteps=5,this.showAreasInList=!0,this.showLinesInList=this.showImagesInList=!1,this.areasProcessor=new AmCharts.AreasProcessor(this),this.areasSettings=new AmCharts.AreasSettings(t),this.imagesProcessor=new AmCharts.ImagesProcessor(this),this.imagesSettings=new AmCharts.ImagesSettings(t),this.linesProcessor=new AmCharts.LinesProcessor(this),this.linesSettings=new AmCharts.LinesSettings(t),this.showDescriptionOnHover=!1,AmCharts.AmMap.base.construct.call(this,t),this.creditsPosition="bottom-left",this.product="ammap",this.areasClasses={},AmCharts.applyTheme(this,t,this.cname)},initChart:function(){if(this.zoomInstantly=!0,this.sizeChanged&&AmCharts.hasSVG&&this.chartCreated){this.container.setSize(this.realWidth,this.realHeight),this.resizeMap(),this.drawBackground(),this.redrawLabels(),this.drawTitles(),this.processObjects(),this.rescaleObjects();var t=this.container;this.zoomControl.init(this,t),this.drawBg();var e=this.smallMap;e&&e.init(this,t),(e=this.valueLegend)&&e.init(this,t),this.sizeChanged=!1,this.zoomToLongLat(this.zLevelTemp,this.zLongTemp,this.zLatTemp,!0),this.previousWidth=this.realWidth,this.previousHeight=this.realHeight,this.updateSmallMap(),this.linkSet.toFront()}else AmCharts.AmMap.base.initChart.call(this),AmCharts.hasSVG?(this.dataChanged&&(this.parseData(),this.dispatchDataUpdated=!0,this.dataChanged=!1,t=this.legend)&&(t.position="absolute",t.invalidateSize()),this.mouseWheelZoomEnabled&&this.addMouseWheel(),this.createDescriptionsDiv(),this.svgAreas=[],this.svgAreasById={},this.drawChart()):(document.createTextNode(this.svgNotSupported),this.chartDiv.style.textAlign="",this.chartDiv.setAttribute("class","ammapAlert"),this.chartDiv.innerHTML=this.svgNotSupported,clearInterval(this.interval))},invalidateSize:function(){var t=this.zoomLongitude();isNaN(t)||(this.zLongTemp=t),t=this.zoomLatitude(),isNaN(t)||(this.zLatTemp=t),t=this.zoomLevel(),isNaN(t)||(this.zLevelTemp=t),AmCharts.AmMap.base.invalidateSize.call(this)},handleWheelReal:function(t){if(!this.wheelBusy){this.stopAnimation();var e=this.zoomLevel(),i=this.zoomControl,s=i.zoomFactor;this.wheelBusy=!0,t=AmCharts.fitToBounds(0<t?e*s:e/s,i.minZoomLevel,i.maxZoomLevel),s=this.mouseX/this.mapWidth,i=this.mouseY/this.mapHeight,s=(this.zoomX()-s)*(t/e)+s,e=(this.zoomY()-i)*(t/e)+i,this.zoomTo(t,s,e)}},addLegend:function(t,e){return t.position="absolute",t.autoMargins=!1,t.valueWidth=0,t.switchable=!1,AmCharts.AmMap.base.addLegend.call(this,t,e),t},handleLegendEvent:function(){},createDescriptionsDiv:function(){if(!this.descriptionsDiv){var t=document.createElement("div");t.style.position="absolute",t.style.left=AmCharts.findPosX(this.div)+"px",t.style.top=AmCharts.findPosY(this.div)+"px",this.descriptionsDiv=t}this.div.appendChild(this.descriptionsDiv)},drawChart:function(){AmCharts.AmMap.base.drawChart.call(this);var t=this.dataProvider;this.dataProvider=t=AmCharts.extend(t,new AmCharts.MapData,!0),this.areasSettings=AmCharts.processObject(this.areasSettings,AmCharts.AreasSettings,this.theme),this.imagesSettings=AmCharts.processObject(this.imagesSettings,AmCharts.ImagesSettings,this.theme),this.linesSettings=AmCharts.processObject(this.linesSettings,AmCharts.LinesSettings,this.theme),this.mapContainer=this.container.set(),this.graphsSet.push(this.mapContainer);var e;t.map&&(e=AmCharts.maps[t.map]),t.mapVar&&(e=t.mapVar),e?(this.svgData=e.svg,this.getBounds(),this.buildEverything()):(t=t.mapURL)&&this.loadXml(t),this.balloonsSet.toFront()},drawBg:function(){var t=this;AmCharts.remove(t.bgSet);var e=AmCharts.rect(t.container,t.realWidth,t.realHeight,"#000",.001);e.click(function(){t.handleBackgroundClick()}),t.bgSet=e,t.set.push(e)},buildEverything:function(){var t=this;if(0<t.realWidth&&0<t.realHeight){var e=t.container;t.zoomControl=AmCharts.processObject(t.zoomControl,AmCharts.ZoomControl,t.theme),t.zoomControl.init(this,e),t.drawBg(),t.buildSVGMap();var i=t.smallMap;i&&(t.smallMap=AmCharts.processObject(t.smallMap,AmCharts.SmallMap,t.theme),(i=t.smallMap).init(t,e)),i=t.dataProvider,isNaN(i.zoomX)&&isNaN(i.zoomY)&&isNaN(i.zoomLatitude)&&isNaN(i.zoomLongitude)&&(t.centerMap?(i.zoomLatitude=t.coordinateToLatitude(t.mapHeight/2),i.zoomLongitude=t.coordinateToLongitude(t.mapWidth/2)):(i.zoomX=0,i.zoomY=0),t.zoomInstantly=!0),t.selectObject(t.dataProvider),t.processAreas(),(i=t.valueLegend)&&(i=AmCharts.processObject(i,AmCharts.ValueLegend,t.theme),t.valueLegend=i,i.init(t,e)),t.objectList&&(t.objectList=AmCharts.processObject(t.objectList,AmCharts.ObjectList),e=t.objectList)&&(t.clearObjectList(),e.init(t)),clearInterval(t.mapInterval),t.mapInterval=setInterval(function(){t.update.call(t)},AmCharts.updateRate),t.dispDUpd(),t.linkSet.toFront(),t.chartCreated=!0}else t.cleanChart()},hideGroup:function(t){this.showHideGroup(t,!1)},showGroup:function(t){this.showHideGroup(t,!0)},showHideGroup:function(t,e){this.showHideReal(this.imagesProcessor.allObjects,t,e),this.showHideReal(this.areasProcessor.allObjects,t,e),this.showHideReal(this.linesProcessor.allObjects,t,e)},showHideReal:function(t,e,i){var s;for(s=0;s<t.length;s++){var a=t[s];a.groupId==e&&(i?a.displayObject.show():a.displayObject.hide())}},update:function(){this.zoomControl.update()},animateMap:function(){var t=this;t.totalFrames=1e3*t.zoomDuration/AmCharts.updateRate,t.totalFrames+=1,t.frame=0,t.tweenPercent=0,setTimeout(function(){t.updateSize.call(t)},AmCharts.updateRate)},updateSize:function(){var t=this,e=t.totalFrames;t.frame<=e?(t.frame++,1<=(e=AmCharts.easeOutSine(0,t.frame,0,1,e))?(e=1,t.wheelBusy=!1):setTimeout(function(){t.updateSize.call(t)},AmCharts.updateRate)):(e=1,t.wheelBusy=!1),t.tweenPercent=e,t.rescaleMapAndObjects()},rescaleMapAndObjects:function(){var t=this.initialScale,e=this.initialX,i=this.initialY,s=this.tweenPercent;this.mapContainer.translate(e+(this.finalX-e)*s,i+(this.finalY-i)*s,t+(this.finalScale-t)*s),this.rescaleObjects(),this.positionChanged(),this.updateSmallMap(),1==s&&(t={type:"zoomCompleted",chart:this},this.fire(t.type,t))},updateSmallMap:function(){this.smallMap&&this.smallMap.update()},rescaleObjects:function(){var t,e=this.mapContainer.scale,i=this.imagesProcessor.objectsToResize;for(t=0;t<i.length;t++){var s=i[t].image;s.translate(s.x,s.y,i[t].scale/e,!0)}if(i=this.linesProcessor,s=i.linesToResize)for(t=0;t<s.length;t++){var a=s[t];a.line.setAttr("stroke-width",a.thickness/e)}for(i=i.objectsToResize,t=0;t<i.length;t++)(s=i[t]).translate(s.x,s.y,1/e)},handleTouchStart:function(t){this.handleMouseMove(t),this.handleMouseDown(t)},handleTouchEnd:function(t){this.previousDistance=NaN,this.handleReleaseOutside(t)},handleMouseDown:function(t){if(AmCharts.resetMouseOver(),this.mouseIsOver=!0,this.chartCreated&&(this.dragMap&&(this.stopAnimation(),this.isDragging=!0,this.mapContainerClickX=this.mapContainer.x,this.mapContainerClickY=this.mapContainer.y,this.panEventsEnabled||t&&t.preventDefault&&t.preventDefault()),t||(t=window.event),t.shiftKey&&!0===this.developerMode&&this.getDevInfo(),t&&t.touches)){var e=this.mouseX,i=this.mouseY,s=t.touches.item(1);s&&(t=s.pageX-AmCharts.findPosX(this.div),s=s.pageY-AmCharts.findPosY(this.div),this.middleXP=(e+(t-e)/2)/this.realWidth,this.middleYP=(i+(s-i)/2)/this.realHeight)}},stopDrag:function(){this.isDragging&&(this.isDragging=!1)},handleReleaseOutside:function(){this.stopDrag(),this.zoomControl.draggerUp(),this.mapWasDragged=!1;var t=this.mapContainer,e=this.mapContainerClickX,i=this.mapContainerClickY;isNaN(e)||isNaN(i)||!(2<Math.abs(t.x-e)||Math.abs(t.y-i))||(this.mapWasDragged=!0,t={type:"dragCompleted",zoomX:this.zoomX(),zoomY:this.zoomY(),zoomLevel:this.zoomLevel(),chart:this},this.fire(t.type,t)),!this.mouseIsOver||this.mapWasDragged||this.skipClick||(t={type:"click",x:this.mouseX,y:this.mouseY,chart:this},this.fire(t.type,t),this.skipClick=!1),this.mapContainerClickY=this.mapContainerClickX=NaN,this.objectWasClicked=!1,this.zoomOnDoubleClick&&this.mouseIsOver&&(200>(t=(new Date).getTime())-this.previousClickTime&&20<t-this.previousClickTime&&this.doDoubleClickZoom(),this.previousClickTime=t)},handleTouchMove:function(t){this.handleMouseMove(t)},resetPinch:function(){this.mapWasPinched=!1},handleMouseMove:function(t){var e=this;AmCharts.AmMap.base.handleMouseMove.call(e,t);var i=e.previuosMouseX,s=e.previuosMouseY,a=e.mouseX,r=e.mouseY,o=e.zoomControl;isNaN(i)&&(i=a),isNaN(s)&&(s=r),e.mouse2X=NaN,e.mouse2Y=NaN,t&&t.touches&&(n=t.touches.item(1))&&(e.mouse2X=n.pageX-AmCharts.findPosX(e.div),e.mouse2Y=n.pageY-AmCharts.findPosY(e.div));var n=e.mapContainer,h=e.mouse2X,l=e.mouse2Y;if(e.pinchTO&&clearTimeout(e.pinchTO),e.pinchTO=setTimeout(function(){e.resetPinch.call(e)},1e3),!isNaN(h)){e.stopDrag(),t.preventDefault&&t.preventDefault();var h=Math.sqrt(Math.pow(h-a,2)+Math.pow(l-r,2)),d=e.previousDistance,l=Math.max(e.realWidth,e.realHeight);if(5>Math.abs(d-h)&&(e.isDragging=!0),!isNaN(d)){var c=5*Math.abs(d-h)/l,l=n.scale,l=AmCharts.fitToBounds(d<h?l+l*c:l-l*c,o.minZoomLevel,o.maxZoomLevel),o=e.zoomLevel(),m=e.middleXP,d=e.middleYP,c=e.realHeight/e.mapHeight,u=e.realWidth/e.mapWidth,m=(e.zoomX()-m*u)*(l/o)+m*u,d=(e.zoomY()-d*c)*(l/o)+d*c;.1<Math.abs(l-o)&&(e.zoomTo(l,m,d,!0),e.mapWasPinched=!0,clearTimeout(e.pinchTO))}e.previousDistance=h}e.isDragging&&(e.hideBalloon(),e.positionChanged(),n.translate(n.x+(a-i),n.y+(r-s),n.scale),e.updateSmallMap(),t&&t.preventDefault&&t.preventDefault()),e.previuosMouseX=a,e.previuosMouseY=r},selectObject:function(t){var e=this;t||(t=e.dataProvider),t.isOver=!1;var i=t.linkToObject;"string"==typeof i&&(i=e.getObjectById(i)),t.useTargetsZoomValues&&i&&(t.zoomX=i.zoomX,t.zoomY=i.zoomY,t.zoomLatitude=i.zoomLatitude,t.zoomLongitude=i.zoomLongitude,t.zoomLevel=i.zoomLevel);var s=e.selectedObject;s&&e.returnInitialColor(s),e.selectedObject=t;var a,r=!1;if("MapArea"==t.objectType&&(t.autoZoomReal&&(r=!0),a=e.areasSettings.selectedOutlineColor),i&&!r&&("string"==typeof i&&(i=e.getObjectById(i)),isNaN(t.zoomLevel)&&isNaN(t.zoomX)&&isNaN(t.zoomY))){if(e.extendMapData(i))return;e.selectObject(i)}else{if(e.allowMultipleDescriptionWindows||e.closeAllDescriptions(),clearTimeout(e.selectedObjectTimeOut),clearTimeout(e.processObjectsTimeOut),i=e.zoomDuration,!r&&isNaN(t.zoomLevel)&&isNaN(t.zoomX)&&isNaN(t.zoomY)?(e.showDescriptionAndGetUrl(),e.processObjects()):(e.selectedObjectTimeOut=setTimeout(function(){e.showDescriptionAndGetUrl.call(e)},1e3*i+200),e.showObjectsAfterZoom?e.processObjectsTimeOut=setTimeout(function(){e.processObjects.call(e)},1e3*i+200):e.processObjects()),r=t.displayObject){if(r.toFront(),r.setAttr("stroke",t.outlineColorReal),void 0!==(i=t.selectedColorReal)&&r.setAttr("fill",i),void 0!==a&&r.setAttr("stroke",a),i=t.imageLabel){var o=t.selectedLabelColorReal;void 0!==o&&i.setAttr("fill",o)}t.selectable||(r.setAttr("cursor","default"),i&&i.setAttr("cursor","default"))}else e.returnInitialColorReal(t);if(r=t.groupId)for(i=e.getGroupById(r),o=0;o<i.length;o++){var n=i[o];if(n.isOver=!1,r=n.displayObject){var h=n.selectedColorReal;void 0!==a&&r.setAttr("stroke",a),void 0!==h?r.setAttr("fill",h):e.returnInitialColor(n)}}e.zoomToSelectedObject(),s!=t&&(t={type:"selectedObjectChanged",chart:e},e.fire(t.type,t))}},returnInitialColor:function(t,e){if(this.returnInitialColorReal(t),e&&(t.isFirst=!1),s=t.groupId){var i,s=this.getGroupById(s);for(i=0;i<s.length;i++)this.returnInitialColorReal(s[i]),e&&(s[i].isFirst=!1)}},closeAllDescriptions:function(){this.descriptionsDiv.innerHTML=""},returnInitialColorReal:function(t){t.isOver=!1;var e=t.displayObject;if(e){if(e.toPrevious(),"MapImage"==t.objectType){var i=t.tempScale;isNaN(i)||e.translate(e.x,e.y,i,!0),t.tempScale=NaN}i=t.colorReal,t.showAsSelected&&(i=t.selectedColorReal),"bubble"==t.type&&(i=void 0),void 0!==i&&e.setAttr("fill",i);var s=t.image;s&&s.setAttr("fill",i),e.setAttr("stroke",t.outlineColorReal),"MapArea"==t.objectType&&e.setAttr("fill-opacity",t.alphaReal),(i=t.pattern)&&e.pattern(i,this.mapScale),(e=t.imageLabel)&&!t.labelInactive&&e.setAttr("fill",t.labelColorReal)}},zoomToRectangle:function(t,e,i,s){var a=this.realWidth,r=this.realHeight,o=this.mapSet.scale,n=this.zoomControl,a=AmCharts.fitToBounds(i/a>s/r?.8*a/(i*o):.8*r/(s*o),n.minZoomLevel,n.maxZoomLevel);this.zoomToMapXY(a,(t+i/2)*o,(e+s/2)*o)},zoomToLatLongRectangle:function(t,e,i,s){var a=this.dataProvider,r=this.zoomControl,o=Math.abs(i-t),n=Math.abs(e-s),h=Math.abs(a.rightLongitude-a.leftLongitude),a=Math.abs(a.topLatitude-a.bottomLatitude),r=AmCharts.fitToBounds(o/h>n/a?.8*h/o:.8*a/n,r.minZoomLevel,r.maxZoomLevel);this.zoomToLongLat(r,t+(i-t)/2,s+(e-s)/2)},getGroupById:function(t){var e=[];return this.getGroup(this.imagesProcessor.allObjects,t,e),this.getGroup(this.linesProcessor.allObjects,t,e),this.getGroup(this.areasProcessor.allObjects,t,e),e},zoomToGroup:function(t){t="object"==typeof t?t:this.getGroupById(t);var e,i,s,a,r;for(r=0;r<t.length;r++){var o=(l=t[r].displayObject.getBBox()).y,n=l.y+l.height,h=l.x,l=l.x+l.width;(o<e||isNaN(e))&&(e=o),(n>a||isNaN(a))&&(a=n),(h<i||isNaN(i))&&(i=h),(l>s||isNaN(s))&&(s=l)}i-=(t=this.mapSet.getBBox()).x,s-=t.x,a-=t.y,e-=t.y,this.zoomToRectangle(i,e,s-i,a-e)},getGroup:function(t,e,i){if(t){var s;for(s=0;s<t.length;s++){var a=t[s];a.groupId==e&&i.push(a)}}},zoomToStageXY:function(t,e,i,s){if(!this.objectWasClicked){var a=this.zoomControl;t=AmCharts.fitToBounds(t,a.minZoomLevel,a.maxZoomLevel),a=this.zoomLevel(),i=this.coordinateToLatitude((i-this.mapContainer.y)/a),e=this.coordinateToLongitude((e-this.mapContainer.x)/a),this.zoomToLongLat(t,e,i,s)}},zoomToLongLat:function(t,e,i,s){e=this.longitudeToCoordinate(e),i=this.latitudeToCoordinate(i),this.zoomToMapXY(t,e,i,s)},zoomToMapXY:function(t,e,i,s){var a=this.mapWidth,r=this.mapHeight;this.zoomTo(t,-e/a*t+this.realWidth/a/2,-i/r*t+this.realHeight/r/2,s)},zoomToObject:function(t){var e=t.zoomLatitude,i=t.zoomLongitude,s=t.zoomLevel,a=this.zoomInstantly,r=t.zoomX,o=t.zoomY,n=this.realWidth,h=this.realHeight;isNaN(s)||(isNaN(e)||isNaN(i)?this.zoomTo(s,r,o,a):this.zoomToLongLat(s,i,e,a)),this.zoomInstantly=!1,"MapImage"==t.objectType&&isNaN(t.zoomX)&&isNaN(t.zoomY)&&isNaN(t.zoomLatitude)&&isNaN(t.zoomLongitude)&&!isNaN(t.latitude)&&!isNaN(t.longitude)&&this.zoomToLongLat(t.zoomLevel,t.longitude,t.latitude),"MapArea"==t.objectType&&(r=t.displayObject.getBBox(),e=this.mapScale,i=r.x*e,s=r.y*e,a=r.width*e,r=r.height*e,n=t.autoZoomReal&&isNaN(t.zoomLevel)?a/n>r/h?.8*n/a:.8*h/r:t.zoomLevel,h=this.zoomControl,n=AmCharts.fitToBounds(n,h.minZoomLevel,h.maxZoomLevel),isNaN(t.zoomX)&&isNaN(t.zoomY)&&isNaN(t.zoomLatitude)&&isNaN(t.zoomLongitude)&&(t=this.mapSet.getBBox(),this.zoomToMapXY(n,-t.x*e+i+a/2,-t.y*e+s+r/2)))},zoomToSelectedObject:function(){this.zoomToObject(this.selectedObject)},zoomTo:function(t,e,i,s){var a=this.zoomControl;t=AmCharts.fitToBounds(t,a.minZoomLevel,a.maxZoomLevel),a=this.zoomLevel(),isNaN(e)&&(e=this.realWidth/this.mapWidth,e=(this.zoomX()-.5*e)*(t/a)+.5*e),isNaN(i)&&(i=this.realHeight/this.mapHeight,i=(this.zoomY()-.5*i)*(t/a)+.5*i),this.stopAnimation(),isNaN(t)||(a=this.mapContainer,this.initialX=a.x,this.initialY=a.y,this.initialScale=a.scale,this.finalX=this.mapWidth*e,this.finalY=this.mapHeight*i,this.finalScale=t,this.finalX!=this.initialX||this.finalY!=this.initialY||this.finalScale!=this.initialScale?s?(this.tweenPercent=1,this.rescaleMapAndObjects(),this.wheelBusy=!1):this.animateMap():this.wheelBusy=!1)},loadXml:function(t){var e;(e=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")).overrideMimeType&&e.overrideMimeType("text/xml"),e.open("GET",t,!1),e.send(),this.parseXMLObject(e.responseXML),this.svgData&&this.buildEverything()},stopAnimation:function(){this.frame=this.totalFrames},processObjects:function(){var t=this.container,e=this.stageObjectsContainer;e&&e.remove(),this.stageObjectsContainer=e=t.set(),this.trendLinesSet.push(e);var i=this.mapObjectsContainer;i&&i.remove(),this.mapObjectsContainer=i=t.set(),this.mapContainer.push(i),i.toFront(),e.toFront(),(t=this.selectedObject)&&(this.imagesProcessor.reset(),this.linesProcessor.reset(),this.linesAboveImages?(this.imagesProcessor.process(t),this.linesProcessor.process(t)):(this.linesProcessor.process(t),this.imagesProcessor.process(t))),this.rescaleObjects()},processAreas:function(){this.areasProcessor.process(this.dataProvider)},buildSVGMap:function(){var t=this.svgData.g.path,e=this.container,i=e.set();void 0===t.length&&(t=[t]);var s;for(s=0;s<t.length;s++){var a=t[s],r=a.title,o=e.path(a.d);o.id=a.id,this.svgAreasById[a.id]={area:o,title:r,className:a.class},this.svgAreas.push(o),i.push(o)}this.mapSet=i,this.mapContainer.push(i),this.resizeMap()},addObjectEventListeners:function(t,e){var i=this;t.mouseup(function(t){i.clickMapObject(e,t)}).mouseover(function(t){i.rollOverMapObject(e,!0,t)}).mouseout(function(t){i.rollOutMapObject(e,t)}).touchend(function(t){i.clickMapObject(e,t)}).touchstart(function(t){i.rollOverMapObject(e,!0,t)})},checkIfSelected:function(t){if((i=this.selectedObject)==t)return!0;if(i=i.groupId){var e,i=this.getGroupById(i);for(e=0;e<i.length;e++)if(i[e]==t)return!0}return!1},clearMap:function(){this.chartDiv.innerHTML="",this.clearObjectList()},clearObjectList:function(){var t=this.objectList;t&&t.div&&(t.div.innerHTML="")},checkIfLast:function(t){if(t){var e=t.parentNode;if(e&&e.lastChild==t)return!0}return!1},showAsRolledOver:function(t){var e=t.displayObject;if(!t.showAsSelected&&e&&!t.isOver){e.node.onmouseout=function(){},e.node.onmouseover=function(){},e.node.onclick=function(){},t.isFirst||(e.toFront(),t.isFirst=!0);var i,s=t.rollOverColorReal;void 0!=s&&("MapImage"==t.objectType?(i=t.image)&&i.setAttr("fill",s):e.setAttr("fill",s)),(i=t.imageLabel)&&!t.labelInactive&&void 0!=(s=t.labelRollOverColorReal)&&i.setAttr("fill",s),void 0!=(s=t.rollOverOutlineColorReal)&&("MapImage"==t.objectType?(i=t.image)&&i.setAttr("stroke",s):e.setAttr("stroke",s)),"MapArea"==t.objectType&&(i=t.rollOverAlphaReal,isNaN(i)||e.setAttr("fill-opacity",i),(i=this.areasSettings.rollOverPattern)&&e.pattern(i,this.mapScale)),"MapImage"==t.objectType&&(i=t.rollOverScaleReal,isNaN(i)||1==i||(t.tempScale=e.scale,e.translate(e.x,e.y,e.scale*i,!0))),this.useHandCursorOnClickableOjects&&this.checkIfClickable(t)&&e.setAttr("cursor","pointer"),this.addObjectEventListeners(e,t),t.isOver=!0}},rollOverMapObject:function(t,e,i){if(this.chartCreated){if(this.handleMouseMove(),(a=this.previouslyHovered)&&a!=t?(!1===this.checkIfSelected(a)&&(this.returnInitialColor(a,!0),this.previouslyHovered=null),this.hideBalloon()):clearTimeout(this.hoverInt),!1===this.checkIfSelected(t)){if(a=t.groupId){var s,a=this.getGroupById(a);for(s=0;s<a.length;s++)a[s]!=t&&this.showAsRolledOver(a[s])}this.showAsRolledOver(t)}else(a=t.displayObject)&&a.setAttr("cursor","default");if(this.showDescriptionOnHover)this.showDescription(t);else if((this.showBalloonOnSelectedObject||!this.checkIfSelected(t))&&!1!==e&&(s=this.balloon,e=t.colorReal,a="",void 0!==e&&this.useObjectColorForBalloon||(e=s.fillColor),(s=t.balloonTextReal)&&(a=this.formatString(s,t)),this.balloonLabelFunction&&(a=this.balloonLabelFunction(t,this)),a&&""!==a)){var r,o;"MapArea"==t.objectType&&(o=this.getAreaCenterLatitude(t),r=this.getAreaCenterLongitude(t),o=this.latitudeToY(o),r=this.longitudeToX(r)),this.showBalloon(a,e,this.mouseIsOver,r,o)}i={type:"rollOverMapObject",mapObject:t,chart:this,event:i},this.fire(i.type,i),this.previouslyHovered=t}},longitudeToX:function(t){return this.longitudeToCoordinate(t)*this.zoomLevel()+this.mapContainer.x},latitudeToY:function(t){return this.latitudeToCoordinate(t)*this.zoomLevel()+this.mapContainer.y},rollOutMapObject:function(t,e){if(this.hideBalloon(),this.chartCreated&&t.isOver){this.checkIfSelected(t)||this.returnInitialColor(t);var i={type:"rollOutMapObject",mapObject:t,chart:this,event:e};this.fire(i.type,i)}},formatString:function(t,e){var i=this.numberFormatter,s=this.percentFormatter,a=e.title;void 0==a&&(a="");var r=e.value,r=isNaN(r)?"":AmCharts.formatNumber(r,i),i=e.percents,i=isNaN(i)?"":AmCharts.formatNumber(i,s);void 0==(s=e.description)&&(s="");var o=e.customData;return void 0==o&&(o=""),t=AmCharts.massReplace(t,{"[[title]]":a,"[[value]]":r,"[[percent]]":i,"[[description]]":s,"[[customData]]":o})},clickMapObject:function(t,e){if(this.hideBalloon(),this.chartCreated&&!this.mapWasDragged&&this.checkIfClickable(t)&&!this.mapWasPinched){this.selectObject(t);var i={type:"clickMapObject",mapObject:t,chart:this,event:e};this.fire(i.type,i),this.objectWasClicked=!0}},checkIfClickable:function(t){var e=this.allowClickOnSelectedObject;return!(this.selectedObject!=t||!e)||!(this.selectedObject==t&&!e)&&!(!(!0===t.selectable||"MapArea"==t.objectType&&t.autoZoomReal||t.url||t.linkToObject||0<t.images.length||0<t.lines.length)&&isNaN(t.zoomLevel)&&isNaN(t.zoomX)&&isNaN(t.zoomY)&&!t.description)},handleResize:function(){(AmCharts.isPercents(this.width)||AmCharts.isPercents(this.height))&&this.invalidateSize(),this.renderFix()},resizeMap:function(){var t=this.mapSet;if(t)if(this.fitMapToContainer){var e=t.getBBox(),i=this.realWidth,s=this.realHeight,a=e.width,r=e.height,i=a/i>r/s?i/a:s/r;t.translate(-e.x*i,-e.y*i,i),this.mapScale=i,this.mapHeight=r*i,this.mapWidth=a*i}else e=group.transform.match(/([\-]?[\d.]+)/g),t.translate(e[0],e[1],e[2])},zoomIn:function(){this.skipClick=!0;var t=this.zoomLevel()*this.zoomControl.zoomFactor;this.zoomTo(t)},zoomOut:function(){this.skipClick=!0;var t=this.zoomLevel()/this.zoomControl.zoomFactor;this.zoomTo(t)},moveLeft:function(){this.skipClick=!0;var t=this.zoomX()+this.zoomControl.panStepSize;this.zoomTo(this.zoomLevel(),t,this.zoomY())},moveRight:function(){this.skipClick=!0;var t=this.zoomX()-this.zoomControl.panStepSize;this.zoomTo(this.zoomLevel(),t,this.zoomY())},moveUp:function(){this.skipClick=!0;var t=this.zoomY()+this.zoomControl.panStepSize;this.zoomTo(this.zoomLevel(),this.zoomX(),t)},moveDown:function(){this.skipClick=!0;var t=this.zoomY()-this.zoomControl.panStepSize;this.zoomTo(this.zoomLevel(),this.zoomX(),t)},zoomX:function(){return this.mapSet?Math.round(1e4*this.mapContainer.x/this.mapWidth)/1e4:NaN},zoomY:function(){return this.mapSet?Math.round(1e4*this.mapContainer.y/this.mapHeight)/1e4:NaN},goHome:function(){this.selectObject(this.dataProvider);var t={type:"homeButtonClicked",chart:this};this.fire(t.type,t)},zoomLevel:function(){return Math.round(1e5*this.mapContainer.scale)/1e5},showDescriptionAndGetUrl:function(){var t=this.selectedObject;if(t){this.showDescription();var e=t.url;if(e)AmCharts.getURL(e,t.urlTarget);else if(e=t.linkToObject){if("string"==typeof e){var i=this.getObjectById(e);if(i)return void this.selectObject(i)}e&&t.passZoomValuesToTarget&&(e.zoomLatitude=this.zoomLatitude(),e.zoomLongitude=this.zoomLongitude(),e.zoomLevel=this.zoomLevel()),this.extendMapData(e)||this.selectObject(e)}}},extendMapData:function(t){var e=t.objectType;if("MapImage"!=e&&"MapArea"!=e&&"MapLine"!=e)return AmCharts.extend(t,new AmCharts.MapData,!0),this.dataProvider=t,this.zoomInstantly=!0,this.validateData(),!0},showDescription:function(t){if(t||(t=this.selectedObject),this.allowMultipleDescriptionWindows||this.closeAllDescriptions(),t.description){var e=t.descriptionWindow;e&&e.close(),e=new AmCharts.DescriptionWindow,t.descriptionWindow=e;var i=t.descriptionWindowWidth,s=t.descriptionWindowHeight,a=t.descriptionWindowX,r=t.descriptionWindowY;isNaN(a)&&(a=this.mouseX,a=a>this.realWidth/2?a-i-20:a+20),isNaN(r)&&(r=this.mouseY),e.maxHeight=s,e.show(this,this.descriptionsDiv,t.description,t.title),(t=e.div.style).width=i+"px",t.maxHeight=s+"px",t.left=a+"px",t.top=r+"px"}},parseXMLObject:function(t){var e={root:{}};this.parseXMLNode(e,"root",t),this.svgData=e.root.svg,this.getBounds()},getBounds:function(){var t=this.dataProvider;try{var e=this.svgData.defs["amcharts:ammap"];t.leftLongitude=Number(e.leftLongitude),t.rightLongitude=Number(e.rightLongitude),t.topLatitude=Number(e.topLatitude),t.bottomLatitude=Number(e.bottomLatitude),t.projection=e.projection}catch(t){}},latitudeToCoordinate:function(t){var e,i=this.dataProvider;if(this.mapSet){e=i.topLatitude;var s=i.bottomLatitude;"mercator"==i.projection&&(t=this.mercatorLatitudeToCoordinate(t),e=this.mercatorLatitudeToCoordinate(e),s=this.mercatorLatitudeToCoordinate(s)),e=(t-e)/(s-e)*this.mapHeight}return e},longitudeToCoordinate:function(t){var e,i=this.dataProvider;return this.mapSet&&(e=i.leftLongitude,e=(t-e)/(i.rightLongitude-e)*this.mapWidth),e},mercatorLatitudeToCoordinate:function(t){return 89.5<t&&(t=89.5),-89.5>t&&(t=-89.5),t=AmCharts.degreesToRadians(t),t=.5*Math.log((1+Math.sin(t))/(1-Math.sin(t))),AmCharts.radiansToDegrees(t/2)},zoomLatitude:function(){return this.coordinateToLatitude((-this.mapContainer.y+this.previousHeight/2)/this.zoomLevel())},zoomLongitude:function(){return this.coordinateToLongitude((-this.mapContainer.x+this.previousWidth/2)/this.zoomLevel())},getAreaCenterLatitude:function(t){t=t.displayObject.getBBox();var e=this.mapScale;return t=-this.mapSet.getBBox().y*e+(t.y+t.height/2)*e,this.coordinateToLatitude(t)},getAreaCenterLongitude:function(t){t=t.displayObject.getBBox();var e=this.mapScale;return t=-this.mapSet.getBBox().x*e+(t.x+t.width/2)*e,this.coordinateToLongitude(t)},coordinateToLatitude:function(t){var e;if(this.mapSet){var i=this.dataProvider,s=i.bottomLatitude,a=i.topLatitude;e=this.mapHeight,"mercator"==i.projection?(i=this.mercatorLatitudeToCoordinate(s),a=this.mercatorLatitudeToCoordinate(a),t=2*Math.atan(Math.exp(2*(t*(i-a)/e+a)*Math.PI/180))-.5*Math.PI,e=AmCharts.radiansToDegrees(t)):e=t/e*(s-a)+a}return Math.round(1e6*e)/1e6},coordinateToLongitude:function(t){var e,i=this.dataProvider;return this.mapSet&&(e=t/this.mapWidth*(i.rightLongitude-i.leftLongitude)+i.leftLongitude),Math.round(1e6*e)/1e6},milesToPixels:function(t){var e=this.dataProvider;return this.mapWidth/(e.rightLongitude-e.leftLongitude)*t/69.172},kilometersToPixels:function(t){var e=this.dataProvider;return this.mapWidth/(e.rightLongitude-e.leftLongitude)*t/111.325},handleBackgroundClick:function(t){if(this.backgroundZoomsToTop&&!this.mapWasDragged){a=this.dataProvider;if(this.checkIfClickable(a))this.clickMapObject(a);else{t=a.zoomX;var e=a.zoomY,i=a.zoomLongitude,s=a.zoomLatitude,a=a.zoomLevel;isNaN(t)||isNaN(e)||this.zoomTo(a,t,e),isNaN(i)||isNaN(s)||this.zoomToLongLat(a,i,s,!0)}}},parseXMLNode:function(t,e,i,s){void 0===s&&(s="");var a,r,o;if(i){var n=i.childNodes.length;for(a=0;a<n;a++){var h=(r=i.childNodes[a]).nodeName,l=r.nodeValue?this.trim(r.nodeValue):"",d=!1;if(r.attributes&&0<r.attributes.length&&(d=!0),0!==r.childNodes.length||""!==l||!1!==d)if(3==r.nodeType||4==r.nodeType){if(""!==l){r=0;for(o in t[e])t[e].hasOwnProperty(o)&&r++;r?t[e]["#text"]=l:t[e]=l}}else if(1==r.nodeType){var c;if(void 0!==t[e][h]?void 0===t[e][h].length?(c=t[e][h],t[e][h]=[],t[e][h].push(c),t[e][h].push({}),c=t[e][h][1]):"object"==typeof t[e][h]&&(t[e][h].push({}),c=t[e][h][t[e][h].length-1]):(t[e][h]={},c=t[e][h]),r.attributes&&r.attributes.length)for(l=0;l<r.attributes.length;l++)c[r.attributes[l].name]=r.attributes[l].value;void 0!==t[e][h].length?this.parseXMLNode(t[e][h],t[e][h].length-1,r,s+" "):this.parseXMLNode(t[e],h,r,s+" ")}}r=0,i="";for(o in t[e])"#text"==o?i=t[e][o]:r++;0===r&&void 0===t[e].length&&(t[e]=i)}},doDoubleClickZoom:function(){if(!this.mapWasDragged){var t=this.zoomLevel()*this.zoomControl.zoomFactor;this.zoomToStageXY(t,this.mouseX,this.mouseY)}},getDevInfo:function(){var t=this.zoomLevel(),e=(e=(e=(e=(e=(e=(e="zoomLevel:"+(t={chart:this,type:"writeDevInfo",zoomLevel:t,zoomX:this.zoomX(),zoomY:this.zoomY(),zoomLatitude:this.zoomLatitude(),zoomLongitude:this.zoomLongitude(),latitude:this.coordinateToLatitude((this.mouseY-this.mapContainer.y)/t),longitude:this.coordinateToLongitude((this.mouseX-this.mapContainer.x)/t),left:this.mouseX,top:this.mouseY,right:this.realWidth-this.mouseX,bottom:this.realHeight-this.mouseY,percentLeft:Math.round(this.mouseX/this.realWidth*100)+"%",percentTop:Math.round(this.mouseY/this.realHeight*100)+"%",percentRight:Math.round((this.realWidth-this.mouseX)/this.realWidth*100)+"%",percentBottom:Math.round((this.realHeight-this.mouseY)/this.realHeight*100)+"%"}).zoomLevel+", zoomLongitude:"+t.zoomLongitude+", zoomLatitude:"+t.zoomLatitude+"\n")+"zoomX:"+t.zoomX+", zoomY:"+t.zoomY+"\n")+"latitude:"+t.latitude+", longitude:"+t.longitude+"\n")+"left:"+t.left+", top:"+t.top+"\n")+"right:"+t.right+", bottom:"+t.bottom+"\n")+'left:"'+t.percentLeft+'", top:"'+t.percentTop+'"\n')+'right:"'+t.percentRight+'", bottom:"'+t.percentBottom+'"\n';return t.str=e,this.fire(t.type,t),t},getXY:function(t,e,i){return void 0!==t&&(-1!=String(t).indexOf("%")?(t=Number(t.split("%").join("")),i&&(t=100-t),t=Number(t)*e/100):i&&(t=e-t)),t},getObjectById:function(t){var e=this.dataProvider;if(e.areas){var i=this.getObject(t,e.areas);if(i)return i}return(i=this.getObject(t,e.images))?i:(t=this.getObject(t,e.lines))?t:void 0},getObject:function(t,e){if(e){var i;for(i=0;i<e.length;i++){var s=e[i];if(s.id==t)return s;if(s.areas){var a=this.getObject(t,s.areas);if(a)return a}if(a=this.getObject(t,s.images))return a;if(s=this.getObject(t,s.lines))return s}}},parseData:function(){var t=this.dataProvider;this.processObject(t.areas,t,"area"),this.processObject(t.images,t,"image"),this.processObject(t.lines,t,"line")},processObject:function(t,e,i){if(t){var s;for(s=0;s<t.length;s++){var a=t[s];a.parentObject=e,"area"==i&&AmCharts.extend(a,new AmCharts.MapArea(this.theme),!0),"image"==i&&(a=AmCharts.extend(a,new AmCharts.MapImage(this.theme),!0)),"line"==i&&(a=AmCharts.extend(a,new AmCharts.MapLine(this.theme),!0)),t[s]=a,a.areas&&this.processObject(a.areas,a,"area"),a.images&&this.processObject(a.images,a,"image"),a.lines&&this.processObject(a.lines,a,"line")}}},positionChanged:function(){var t={type:"positionChanged",zoomX:this.zoomX(),zoomY:this.zoomY(),zoomLevel:this.zoomLevel(),chart:this};this.fire(t.type,t)},getX:function(t,e){return this.getXY(t,this.realWidth,e)},getY:function(t,e){return this.getXY(t,this.realHeight,e)},trim:function(t){if(t){var e;for(e=0;e<t.length;e++)if(-1===" \n\r\t\f\v \u2028\u2029 ".indexOf(t.charAt(e))){t=t.substring(e);break}for(e=t.length-1;0<=e;e--)if(-1===" \n\r\t\f\v \u2028\u2029 ".indexOf(t.charAt(e))){t=t.substring(0,e+1);break}return-1===" \n\r\t\f\v \u2028\u2029 ".indexOf(t.charAt(0))?t:""}}}),AmCharts.ZoomControl=AmCharts.Class({construct:function(t){this.cname="ZoomControl",this.panStepSize=.1,this.zoomFactor=2,this.maxZoomLevel=64,this.minZoomLevel=1,this.zoomControlEnabled=this.panControlEnabled=!0,this.buttonRollOverColor="#BFD8EA",this.buttonFillColor="#990000",this.buttonFillAlpha=1,this.buttonBorderColor="#FFFFFF",this.buttonBorderThickness=this.buttonBorderAlpha=1,this.gridColor="#FFFFFF",this.gridBackgroundColor="#000000",this.gridBackgroundAlpha=.15,this.gridAlpha=1,this.buttonSize=18,this.iconSize=11,this.buttonCornerRadius=0,this.gridHeight=150,this.top=this.left=10,AmCharts.applyTheme(this,t,this.cname)},init:function(t,e){var i=this;i.chart=t,AmCharts.remove(i.set);var s=e.set();s.translate(t.getX(i.left),t.getY(i.top));var a=i.buttonSize,r=i.buttonFillColor,o=i.buttonFillAlpha,n=i.buttonBorderThickness,h=i.buttonBorderColor,l=i.buttonBorderAlpha,d=i.buttonCornerRadius,c=i.buttonRollOverColor,m=i.gridHeight,u=i.zoomFactor,p=i.minZoomLevel,f=i.maxZoomLevel;i.previousDY=NaN;var v;if(i.zoomControlEnabled){v=e.set(),s.push(v),i.set=s,i.zoomSet=v,(A=AmCharts.rect(e,a+6,m+2*a+6,i.gridBackgroundColor,i.gridBackgroundAlpha,0,0,0,4)).translate(-3,-3),A.mouseup(function(){i.handleBgUp()}),v.push(A),(A=new AmCharts.SimpleButton).setIcon(t.pathToImages+"plus.gif",i.iconSize),A.setClickHandler(t.zoomIn,t),A.init(e,a,a,r,o,n,h,l,d,c),v.push(A.set),(A=new AmCharts.SimpleButton).setIcon(t.pathToImages+"minus.gif",i.iconSize),A.setClickHandler(t.zoomOut,t),A.init(e,a,a,r,o,n,h,l,d,c),A.set.translate(0,m+a),v.push(A.set);var g,C=Math.log(f/p)/Math.log(u)+1,A=m/C;for(g=1;g<C;g++){var b=a+g*A,b=AmCharts.line(e,[1,a-2],[b,b],i.gridColor,i.gridAlpha,1);v.push(b)}(C=new AmCharts.SimpleButton).setDownHandler(i.draggerDown,i),C.setClickHandler(i.draggerUp,i),C.init(e,a,A,r,o,n,h,l,d,c),v.push(C.set),i.dragger=C.set,i.previousY=NaN,m-=A,p=Math.log(p/100)/Math.log(u),u=Math.log(f/100)/Math.log(u),i.realStepSize=m/(u-p),i.realGridHeight=m,i.stepMax=u}i.panControlEnabled&&(u=e.set(),s.push(u),v&&v.translate(a,4*a),(v=new AmCharts.SimpleButton).setIcon(t.pathToImages+"panLeft.gif",i.iconSize),v.setClickHandler(t.moveLeft,t),v.init(e,a,a,r,o,n,h,l,d,c),v.set.translate(0,a),u.push(v.set),(v=new AmCharts.SimpleButton).setIcon(t.pathToImages+"panRight.gif",i.iconSize),v.setClickHandler(t.moveRight,t),v.init(e,a,a,r,o,n,h,l,d,c),v.set.translate(2*a,a),u.push(v.set),(v=new AmCharts.SimpleButton).setIcon(t.pathToImages+"panUp.gif",i.iconSize),v.setClickHandler(t.moveUp,t),v.init(e,a,a,r,o,n,h,l,d,c),v.set.translate(a,0),u.push(v.set),(v=new AmCharts.SimpleButton).setIcon(t.pathToImages+"panDown.gif",i.iconSize),v.setClickHandler(t.moveDown,t),v.init(e,a,a,r,o,n,h,l,d,c),v.set.translate(a,2*a),u.push(v.set),(o=new AmCharts.SimpleButton).setIcon(t.pathToImages+"homeIcon.gif",i.iconSize),o.setClickHandler(t.goHome,t),o.init(e,a,a,r,0,0,h,0,d,c),o.set.translate(a,a),u.push(o.set),s.push(u))},draggerDown:function(){this.chart.stopDrag(),this.isDragging=!0},draggerUp:function(){this.isDragging=!1},handleBgUp:function(){var t=this.chart,e=100*Math.pow(this.zoomFactor,this.stepMax-(t.mouseY-this.zoomSet.y-this.set.y-this.buttonSize-this.realStepSize/2)/this.realStepSize);t.zoomTo(e)},update:function(){var t,e=this.zoomFactor,i=this.realStepSize,s=this.stepMax,a=this.dragger,r=this.buttonSize,o=this.chart;this.isDragging?(o.stopDrag(),t=a.y+(o.mouseY-this.previousY),t=AmCharts.fitToBounds(t,r,this.realGridHeight+r),i=100*Math.pow(e,s-(t-r)/i),o.zoomTo(i,NaN,NaN,!0)):(t=Math.log(o.zoomLevel()/100)/Math.log(e),t=(s-t)*i+r),this.previousY=o.mouseY,this.previousDY!=t&&a&&(a.translate(0,t),this.previousDY=t)}}),AmCharts.SimpleButton=AmCharts.Class({construct:function(){},init:function(t,e,i,s,a,r,o,n,h,l){var d=this;d.rollOverColor=l,d.color=s,l=t.set(),d.set=l,s=AmCharts.rect(t,e,i,s,a,r,o,n,h),l.push(s),(a=d.iconPath)&&(r=d.iconSize,t=t.image(a,(e-r)/2,(i-r)/2,r,r),l.push(t),t.mousedown(function(){d.handleDown()}).mouseup(function(){d.handleUp()}).mouseover(function(){d.handleOver()}).mouseout(function(){d.handleOut()})),s.mousedown(function(){d.handleDown()}).mouseup(function(){d.handleUp()}).mouseover(function(){d.handleOver()}).mouseout(function(){d.handleOut()}),d.bg=s},setIcon:function(t,e){this.iconPath=t,this.iconSize=e},setClickHandler:function(t,e){this.clickHandler=t,this.scope=e},setDownHandler:function(t,e){this.downHandler=t,this.scope=e},handleUp:function(){var t=this.clickHandler;t&&t.call(this.scope)},handleDown:function(){var t=this.downHandler;t&&t.call(this.scope)},handleOver:function(){this.bg.setAttr("fill",this.rollOverColor)},handleOut:function(){this.bg.setAttr("fill",this.color)}}),AmCharts.SmallMap=AmCharts.Class({construct:function(t){this.cname="SmallMap",this.mapColor="#e6e6e6",this.rectangleColor="#FFFFFF",this.top=this.right=10,this.minimizeButtonWidth=16,this.backgroundColor="#9A9A9A",this.backgroundAlpha=1,this.borderColor="#FFFFFF",this.borderThickness=3,this.borderAlpha=1,this.size=.2,AmCharts.applyTheme(this,t,this.cname)},init:function(t,e){var i=this;i.chart=t,i.container=e,i.width=t.realWidth*i.size,i.height=t.realHeight*i.size,AmCharts.remove(i.set);var s=e.set();i.set=s;var a=e.set();i.allSet=a,s.push(a),i.buildSVGMap();var r=i.borderThickness,o=i.borderColor;(l=AmCharts.rect(e,i.width+r,i.height+r,i.backgroundColor,i.backgroundAlpha,r,o,i.borderAlpha)).translate(-r/2,-r/2),a.push(l),l.toBack();var n,h,l=i.minimizeButtonWidth,d=new AmCharts.SimpleButton;d.setIcon(t.pathToImages+"arrowDown.gif",l),d.setClickHandler(i.minimize,i),d.init(e,l,l,o,1,1,o,1),d=d.set,i.downButtonSet=d,s.push(d);var c=new AmCharts.SimpleButton;c.setIcon(t.pathToImages+"arrowUp.gif",l),c.setClickHandler(i.maximize,i),c.init(e,l,l,o,1,1,o,1),o=c.set,i.upButtonSet=o,o.hide(),s.push(o);var m,u;isNaN(i.top)||(n=t.getY(i.top)+r,u=0),isNaN(i.bottom)||(n=t.getY(i.bottom,!0)-i.height-r,u=i.height-l+r/2),isNaN(i.left)||(h=t.getX(i.left)+r,m=-r/2),isNaN(i.right)||(h=t.getX(i.right,!0)-i.width-r,m=i.width-l+r/2),(r=e.set()).clipRect(1,1,i.width,i.height),a.push(r),i.rectangleC=r,s.translate(h,n),d.translate(m,u),o.translate(m,u),a.mouseup(function(){i.handleMouseUp()}),i.drawRectangle()},minimize:function(){this.downButtonSet.hide(),this.upButtonSet.show(),this.allSet.hide()},maximize:function(){this.downButtonSet.show(),this.upButtonSet.hide(),this.allSet.show()},buildSVGMap:function(){var t,e=this.chart,i={fill:this.mapColor,stroke:this.mapColor,"stroke-opacity":1},s=e.svgData.g.path,a=this.container,r=a.set();for(t=0;t<s.length;t++){var o=a.path(s[t].d).attr(i);r.push(o)}this.allSet.push(r),i=r.getBBox(),s=this.size*e.mapScale,a=-i.x*s,t=-i.y*s;var n=o=0;e.centerMap&&(o=(this.width-i.width*s)/2,n=(this.height-i.height*s)/2),this.mapWidth=i.width*s,this.mapHeight=i.height*s,this.dx=o,this.dy=n,r.translate(a+o,t+n,s)},update:function(){var t=(s=this.chart).zoomLevel(),e=this.width,i=s.mapContainer,s=e/(s.realWidth*t),e=e/t,t=this.height/t,a=this.rectangle;a.translate(-i.x*s+this.dx,-i.y*s+this.dy),0<e&&0<t&&(a.setAttr("width",e),a.setAttr("height",t)),this.rWidth=e,this.rHeight=t},drawRectangle:function(){var t=this.rectangle;AmCharts.remove(t),t=AmCharts.rect(this.container,10,10,"#000",0,1,this.rectangleColor,1),this.rectangleC.push(t),this.rectangle=t},handleMouseUp:function(){var t=this.chart,e=t.zoomLevel();t.zoomTo(e,-(t.mouseX-this.set.x-this.dx-this.rWidth/2)/this.mapWidth*e,-(t.mouseY-this.set.y-this.dy-this.rHeight/2)/this.mapHeight*e)}}),AmCharts.AreasProcessor=AmCharts.Class({construct:function(t){this.chart=t},process:function(t){this.updateAllAreas(),this.allObjects=[],t=t.areas;var e,i,s,a=this.chart,r=t.length,o=0,n=a.svgAreasById,h=0,l=0;for(i=0;i<r;i++)s=t[i],s=s.value,h<s&&(h=s),l>s&&(l=s),isNaN(s)||(o+=Math.abs(s));for(isNaN(a.minValue)||(l=a.minValue),isNaN(a.maxValue)||(h=a.maxValue),a.maxValueReal=h,a.minValueReal=l,i=0;i<r;i++)s=t[i],isNaN(s.value)?s.percents=void 0:s.percents=(s.value-l)/o*100;for(i=0;i<r;i++){if(s=t[i],o=n[s.id],e=a.areasSettings,o&&o.className){var d=a.areasClasses[o.className];d&&(e=d,e=AmCharts.processObject(e,AmCharts.AreasSettings,a.theme))}var c=e.color,m=e.alpha,u=e.outlineThickness,p=e.rollOverColor,f=e.selectedColor,v=e.rollOverAlpha,g=e.outlineColor,C=e.outlineAlpha,A=e.balloonText,b=e.selectable,w=e.pattern,N=e.rollOverOutlineColor;this.allObjects.push(s),s.chart=a,s.baseSettings=e,s.autoZoomReal=void 0==s.autoZoom?e.autoZoom:s.autoZoom,void 0==(d=s.color)&&(d=c);var L=s.alpha;if(isNaN(L)&&(L=m),m=s.rollOverAlpha,isNaN(m)&&(m=v),isNaN(m)&&(m=L),void 0==(v=s.rollOverColor)&&(v=p),void 0==(p=s.pattern)&&(p=w),void 0==(w=s.selectedColor)&&(w=f),(f=s.balloonText)||(f=A),void 0==e.colorSolid||isNaN(s.value)||((A=Math.floor((s.value-l)/((h-l)/a.colorSteps)))==a.colorSteps&&A--,colorPercent=1/(a.colorSteps-1)*A,s.colorReal=AmCharts.getColorFade(d,e.colorSolid,colorPercent)),void 0!=s.color&&(s.colorReal=s.color),void 0==s.selectable&&(s.selectable=b),void 0==s.colorReal&&(s.colorReal=c),void 0==(c=s.outlineColor)&&(c=g),g=s.outlineAlpha,isNaN(g)&&(g=C),C=s.outlineThickness,isNaN(C)&&(C=u),void 0==(u=s.rollOverOutlineColor)&&(u=N),s.alphaReal=L,s.rollOverColorReal=v,s.rollOverAlphaReal=m,s.balloonTextReal=f,s.selectedColorReal=w,s.outlineColorReal=c,s.outlineAlphaReal=g,s.rollOverOutlineColorReal=u,s.patternReal=p,AmCharts.processDescriptionWindow(e,s),o&&(e=o.area,(o=o.title)&&!s.title&&(s.title=o),e)){s.displayObject=e,s.mouseEnabled&&a.addObjectEventListeners(e,s);var y;void 0!=d&&(y=d),void 0!=s.colorReal&&(y=s.showAsSelected||a.selectedObject==s?s.selectedColorReal:s.colorReal),e.setAttr("fill",y),e.setAttr("stroke",c),e.setAttr("stroke-opacity",g),e.setAttr("stroke-width",C),e.setAttr("fill-opacity",L),p&&e.pattern(p,a.mapScale)}}},updateAllAreas:function(){var t,e=this.chart,i=e.areasSettings,s=i.unlistedAreasColor,a=i.unlistedAreasAlpha,r=i.unlistedAreasOutlineColor,o=i.unlistedAreasOutlineAlpha,n=e.svgAreas,h=e.dataProvider,l=h.areas,d={};for(t=0;t<l.length;t++)d[l[t].id]=l[t];for(t=0;t<n.length;t++)if(l=n[t],void 0!=s&&l.setAttr("fill",s),isNaN(a)||l.setAttr("fill-opacity",a),void 0!=r&&l.setAttr("stroke",r),isNaN(o)||l.setAttr("stroke-opacity",o),l.setAttr("stroke-width",i.outlineThickness),h.getAreasFromMap&&!d[l.id]){var c=new AmCharts.MapArea(e.theme);c.parentObject=h,c.id=l.id,h.areas.push(c)}}}),AmCharts.AreasSettings=AmCharts.Class({construct:function(t){this.cname="AreasSettings",this.alpha=1,this.autoZoom=!1,this.balloonText="[[title]]",this.color="#FFCC00",this.colorSolid="#990000",this.unlistedAreasAlpha=1,this.unlistedAreasColor="#DDDDDD",this.outlineColor="#FFFFFF",this.outlineAlpha=1,this.outlineThickness=.5,this.selectedColor=this.rollOverOutlineColor="#BFD8EA",this.unlistedAreasOutlineColor="#FFFFFF",this.unlistedAreasOutlineAlpha=1,this.descriptionWindowWidth=250,AmCharts.applyTheme(this,t,this.cname)}}),AmCharts.ImagesProcessor=AmCharts.Class({construct:function(t){this.chart=t,this.reset()},process:function(t){var e,i=t.images;for(e=0;e<i.length;e++)this.createImage(i[e],e);t.parentObject&&t.remainVisible&&this.process(t.parentObject)},createImage:function(t,e){var i=this.chart,s=i.container,a=i.mapObjectsContainer,r=i.stageObjectsContainer,o=i.imagesSettings;t.remove();var n=o.color,h=o.alpha,l=o.rollOverColor,d=o.selectedColor,c=o.balloonText,m=o.outlineColor,u=o.outlineAlpha,p=o.outlineThickness,f=o.selectedScale,v=o.labelPosition,g=o.labelColor,C=o.labelFontSize,A=o.labelRollOverColor,b=o.selectedLabelColor;t.index=e,t.chart=i,t.baseSettings=i.imagesSettings;var w=s.set();t.displayObject=w;var N=t.color;void 0==N&&(N=n),n=t.alpha,isNaN(n)&&(n=h),h=t.outlineAlpha,isNaN(h)&&(h=u),void 0==(u=t.rollOverColor)&&(u=l),void 0==(l=t.selectedColor)&&(l=d),(d=t.balloonText)||(d=c),void 0==(c=t.outlineColor)&&(c=m),void 0==c&&(c=N),m=t.outlineThickness,isNaN(m)&&(m=p),(p=t.labelPosition)||(p=v),void 0==(v=t.labelColor)&&(v=g),void 0==(g=t.labelRollOverColor)&&(g=A),void 0==(A=t.selectedLabelColor)&&(A=b),b=t.labelFontSize,isNaN(b)&&(b=C),C=t.selectedScale,isNaN(C)&&(C=f),isNaN(t.rollOverScale),t.colorReal=N,t.alphaReal=n,t.rollOverColorReal=u,t.balloonTextReal=d,t.selectedColorReal=l,t.labelColorReal=v,t.labelRollOverColorReal=g,t.selectedLabelColorReal=A,t.labelFontSizeReal=b,t.labelPositionReal=p,t.selectedScaleReal=C,t.rollOverScaleReal=C,AmCharts.processDescriptionWindow(o,t),t.centeredReal=void 0==t.centered?o.centered:t.centered,b=t.type,A=t.imageURL,u=t.svgPath,g=t.width,l=t.height,o=t.scale,isNaN(t.percentWidth)||(g=t.percentWidth/100*i.realWidth),isNaN(t.percentHeight)||(l=t.percentHeight/100*i.realHeight);var L;A||b||u||(b="circle",g=1,h=n=0),v=f=0,C=t.selectedColorReal,b?(isNaN(g)&&(g=10),isNaN(l)&&(l=10),"kilometers"==t.widthAndHeightUnits&&(g=i.kilometersToPixels(t.width),l=i.kilometersToPixels(t.height)),"miles"==t.widthAndHeightUnits&&(g=i.milesToPixels(t.width),l=i.milesToPixels(t.height)),"circle"!=b&&"bubble"!=b||(l=g),L=this.createPredefinedImage(N,c,m,b,g,l),v=f=0,t.centeredReal?(isNaN(t.right)||(f=g*o),isNaN(t.bottom)||(v=l*o)):(f=g*o/2,v=l*o/2),L.translate(f,v,o)):A?(isNaN(g)&&(g=10),isNaN(l)&&(l=10),(L=s.image(A,0,0,g,l)).node.setAttribute("preserveAspectRatio","none"),L.setAttr("opacity",n),t.centeredReal&&(f=isNaN(t.right)?-g/2:g/2,v=isNaN(t.bottom)?-l/2:l/2,L.translate(f,v))):u&&(L=s.path(u),c=L.getBBox(),t.centeredReal?(f=-c.x*o-c.width*o/2,isNaN(t.right)||(f=-f),v=-c.y*o-c.height*o/2,isNaN(t.bottom)||(v=-v)):f=v=0,L.translate(f,v,o),L.x=f,L.y=v),L&&(w.push(L),t.image=L,L.setAttr("stroke-opacity",h),L.setAttr("fill-opacity",n),L.setAttr("fill",N)),!t.showAsSelected&&i.selectedObject!=t||void 0==C||L.setAttr("fill",C),N=null,void 0!==t.label&&(N=AmCharts.text(s,t.label,t.labelColorReal,i.fontFamily,t.labelFontSizeReal,t.labelAlign),n=t.labelBackgroundAlpha,(h=t.labelBackgroundColor)&&0<n&&(L=N.getBBox(),(s=AmCharts.rect(s,L.width+16,L.height+10,h,n)).translate(-3,-L.height/2-5),w.push(s)),t.imageLabel=N,!t.labelInactive&&t.mouseEnabled&&i.addObjectEventListeners(N,t),w.push(N)),isNaN(t.latitude)||isNaN(t.longitude)?r.push(w):a.push(w),w&&(w.rotation=t.rotation),this.updateSizeAndPosition(t),t.mouseEnabled&&i.addObjectEventListeners(w,t)},updateSizeAndPosition:function(t){var e=this.chart,i=t.displayObject,s=e.getX(t.left),a=e.getY(t.top),r=t.image.getBBox();isNaN(t.right)||(s=e.getX(t.right,!0)-r.width*t.scale),isNaN(t.bottom)||(a=e.getY(t.bottom,!0)-r.height*t.scale);var o=t.longitude,n=t.latitude,r=this.objectsToResize;this.allSvgObjects.push(i),this.allObjects.push(t);var h=t.imageLabel;isNaN(s)||isNaN(a)?isNaN(n)||isNaN(o)||(s=e.longitudeToCoordinate(o),a=e.latitudeToCoordinate(n),i.translate(s,a,NaN,!0),!t.fixedSize)||(s=1,(t.showAsSelected||e.selectedObject==t)&&(s=t.selectedScaleReal),r.push({image:i,scale:s})):i.translate(s,a),this.positionLabel(h,t,t.labelPositionReal)},positionLabel:function(t,e,i){if(t){var s=0,a=0,r=0,o=0;(n=e.image)&&(o=n.getBBox(),a=n.y,s=n.x,r=o.width,o=o.height,e.svgPath&&(r*=e.scale,o*=e.scale));var n=(h=t.getBBox()).width,h=h.height;"right"==i&&(s+=r+n/2+5,a+=o/2-2),"left"==i&&(s+=-n/2-5,a+=o/2-2),"top"==i&&(a-=h/2+3,s+=r/2),"bottom"==i&&(a+=o+h/2,s+=r/2),"middle"==i&&(s+=r/2,a+=o/2),t.translate(s+e.labelShiftX,a+e.labelShiftY)}},createPredefinedImage:function(t,e,i,s,a,r){var o,n=this.chart.container;switch(s){case"circle":o=AmCharts.circle(n,a/2,t,1,i,e,1);break;case"rectangle":o=AmCharts.polygon(n,[-a/2,a/2,a/2,-a/2],[r/2,r/2,-r/2,-r/2],t,1,i,e,1);break;case"bubble":o=AmCharts.circle(n,a/2,t,1,i,e,1,!0)}return o},reset:function(){this.objectsToResize=[],this.allSvgObjects=[],this.allObjects=[],this.allLabels=[]}}),AmCharts.ImagesSettings=AmCharts.Class({construct:function(t){this.cname="ImagesSettings",this.balloonText="[[title]]",this.alpha=1,this.borderAlpha=0,this.borderThickness=1,this.labelPosition="right",this.labelColor="#000000",this.labelFontSize=11,this.color="#000000",this.labelRollOverColor="#00CC00",this.centered=!0,this.rollOverScale=this.selectedScale=1,this.descriptionWindowWidth=250,AmCharts.applyTheme(this,t,this.cname)}}),AmCharts.LinesProcessor=AmCharts.Class({construct:function(t){this.chart=t,this.reset()},process:function(t){var e,i=t.lines,s=this.chart,a=s.linesSettings,r=this.objectsToResize,o=s.mapObjectsContainer,n=s.stageObjectsContainer,h=a.thickness,l=a.dashLength,d=a.arrow,c=a.arrowSize,m=a.arrowColor,u=a.arrowAlpha,p=a.color,f=a.alpha,v=a.rollOverColor,g=a.selectedColor,C=a.rollOverAlpha,A=a.balloonText,b=s.container;for(e=0;e<i.length;e++){var w=i[e];w.chart=s,w.baseSettings=a;var N=b.set();if(w.displayObject=N,this.allSvgObjects.push(N),this.allObjects.push(w),w.mouseEnabled&&s.addObjectEventListeners(N,w),w.remainVisible||s.selectedObject==w.parentObject){var L=w.thickness;isNaN(L)&&(L=h);var y=w.dashLength;isNaN(y)&&(y=l);var S=w.color;void 0==S&&(S=p);var x=w.alpha;isNaN(x)&&(x=f);j=w.rollOverAlpha;isNaN(j)&&(j=C),isNaN(j)&&(j=x),void 0==(R=w.rollOverColor)&&(R=v);var M=w.selectedColor;void 0==M&&(M=g),(B=w.balloonText)||(B=A);var O=w.arrow;(!O||"none"==O&&"none"!=d)&&(O=d);var T=w.arrowColor;void 0==T&&(T=m),void 0==T&&(T=S);var z=w.arrowAlpha;isNaN(z)&&(z=u),isNaN(z)&&(z=x);var k=w.arrowSize;isNaN(k)&&(k=c),w.alphaReal=x,w.colorReal=S,w.rollOverColorReal=R,w.rollOverAlphaReal=j,w.balloonTextReal=B,w.selectedColorReal=M,w.thicknessReal=L,AmCharts.processDescriptionWindow(a,w);var D,j=this.processCoordinates(w.x,s.realWidth),R=this.processCoordinates(w.y,s.realHeight),I=w.longitudes,B=w.latitudes,F=I.length;if(0<F)for(j=[],D=0;D<F;D++)j.push(s.longitudeToCoordinate(I[D]));if(0<(F=B.length))for(R=[],D=0;D<F;D++)R.push(s.latitudeToCoordinate(B[D]));if(0<j.length){if(AmCharts.dx=0,AmCharts.dy=0,I=AmCharts.line(b,j,R,S,1,L,y,!1,!1,!0),y=AmCharts.line(b,j,R,S,.001,3,y,!1,!1,!0),AmCharts.dx=.5,AmCharts.dy=.5,N.push(I),N.push(y),N.setAttr("opacity",x),"none"!=O){var P,W,E;"end"!=O&&"both"!=O||(x=j[j.length-1],S=R[R.length-1],1<j.length?(F=j[j.length-2],P=R[R.length-2]):(F=x,P=S),P=180*Math.atan((S-P)/(x-F))/Math.PI,W=x,E=S,P=0>x-F?P-90:P+90),"both"==O&&(x=AmCharts.polygon(b,[-k/2,0,k/2],[1.5*k,0,1.5*k],T,z,1,T,z),N.push(x),x.translate(W,E),x.rotate(P),w.fixedSize&&r.push(x)),"start"!=O&&"both"!=O||(x=j[0],E=R[0],1<j.length?(S=j[1],W=R[1]):(S=x,W=E),P=180*Math.atan((E-W)/(x-S))/Math.PI,W=x,P=0>x-S?P-90:P+90),"middle"==O&&(x=j[j.length-1],S=R[R.length-1],1<j.length?(F=j[j.length-2],P=R[R.length-2]):(F=x,P=S),W=F+(x-F)/2,E=P+(S-P)/2,P=180*Math.atan((S-P)/(x-F))/Math.PI,P=0>x-F?P-90:P+90),x=AmCharts.polygon(b,[-k/2,0,k/2],[1.5*k,0,1.5*k],T,z,1,T,z),N.push(x),x.translate(W,E),x.rotate(P),w.fixedSize&&r.push(x)}w.fixedSize&&I&&(this.linesToResize.push({line:I,thickness:L}),this.linesToResize.push({line:y,thickness:3})),w.showAsSelected&&!isNaN(M)&&I.setAttr("stroke",M),0<B.length?o.push(N):n.push(N)}}}t.parentObject&&t.remainVisible&&this.process(t.parentObject)},processCoordinates:function(t,e){var i,s=[];for(i=0;i<t.length;i++){var a=t[i],r=Number(a);isNaN(r)&&(r=Number(a.replace("%",""))*e/100),isNaN(r)||s.push(r)}return s},reset:function(){this.objectsToResize=[],this.allSvgObjects=[],this.allObjects=[],this.linesToResize=[]}}),AmCharts.LinesSettings=AmCharts.Class({construct:function(t){this.cname="LinesSettings",this.balloonText="[[title]]",this.thickness=1,this.dashLength=0,this.arrowSize=10,this.arrowAlpha=1,this.arrow="none",this.color="#990000",this.descriptionWindowWidth=250,AmCharts.applyTheme(this,t,this.cname)}}),AmCharts.MapObject=AmCharts.Class({construct:function(t){this.fixedSize=this.mouseEnabled=!0,this.images=[],this.lines=[],this.areas=[],this.remainVisible=!0,this.passZoomValuesToTarget=!1,this.objectType=this.cname,AmCharts.applyTheme(this,t,"MapObject")}}),AmCharts.MapArea=AmCharts.Class({inherits:AmCharts.MapObject,construct:function(t){this.cname="MapArea",AmCharts.MapArea.base.construct.call(this,t),AmCharts.applyTheme(this,t,this.cname)}}),AmCharts.MapLine=AmCharts.Class({inherits:AmCharts.MapObject,construct:function(t){this.cname="MapLine",this.longitudes=[],this.latitudes=[],this.x=[],this.y=[],this.arrow="none",AmCharts.MapLine.base.construct.call(this,t),AmCharts.applyTheme(this,t,this.cname)}}),AmCharts.MapImage=AmCharts.Class({inherits:AmCharts.MapObject,construct:function(t){this.cname="MapImage",this.scale=1,this.widthAndHeightUnits="pixels",this.labelShiftY=this.labelShiftX=0,AmCharts.MapImage.base.construct.call(this,t),AmCharts.applyTheme(this,t,this.cname)},remove:function(){var t=this.displayObject;t&&t.remove(),(t=this.imageLabel)&&t.remove()}}),AmCharts.degreesToRadians=function(t){return t/180*Math.PI},AmCharts.radiansToDegrees=function(t){return t/Math.PI*180},AmCharts.getColorFade=function(t,e,i){e=(a=AmCharts.hex2RGB(e))[0];var s=a[1],a=a[2];t=(o=AmCharts.hex2RGB(t))[0];var r=o[1],o=o[2];return t+=Math.round((e-t)*i),r+=Math.round((s-r)*i),o+=Math.round((a-o)*i),"rgb("+t+","+r+","+o+")"},AmCharts.hex2RGB=function(t){return[parseInt(t.substring(1,3),16),parseInt(t.substring(3,5),16),parseInt(t.substring(5,7),16)]},AmCharts.processDescriptionWindow=function(t,e){var i=t.descriptionWindowX,s=t.descriptionWindowY,a=t.descriptionWindowWidth,r=t.descriptionWindowHeight,o=e.descriptionWindowX;isNaN(o)&&(o=i),i=e.descriptionWindowY,isNaN(i)&&(i=s),s=e.descriptionWindowWidth,isNaN(s)&&(s=a),a=e.descriptionWindowHeight,isNaN(a)&&(a=r),e.descriptionWindowX=o,e.descriptionWindowY=i,e.descriptionWindowWidth=s,e.descriptionWindowHeight=a},AmCharts.MapData=AmCharts.Class({inherits:AmCharts.MapObject,construct:function(){this.cname="MapData",AmCharts.MapData.base.construct.call(this),this.projection="mercator",this.topLatitude=90,this.bottomLatitude=-90,this.leftLongitude=-180,this.rightLongitude=180,this.zoomLevel=1,this.getAreasFromMap=!1}}),AmCharts.DescriptionWindow=AmCharts.Class({construct:function(){},show:function(t,e,i,s){var a=this,r=document.createElement("div");r.style.position="absolute",r.className="ammapDescriptionWindow",a.div=r,e.appendChild(r);var o=document.createElement("img");o.className="ammapDescriptionWindowCloseButton",o.src=t.pathToImages+"xIcon.gif",o.style.cssFloat="right",o.onclick=function(){a.close()},o.onmouseover=function(){o.src=t.pathToImages+"xIconH.gif"},o.onmouseout=function(){o.src=t.pathToImages+"xIcon.gif"},r.appendChild(o),(e=document.createElement("div")).className="ammapDescriptionTitle",e.onmousedown=function(){a.div.style.zIndex=1e3},r.appendChild(e),s=document.createTextNode(s),e.appendChild(s),s=e.offsetHeight,(e=document.createElement("div")).className="ammapDescriptionText",e.style.maxHeight=a.maxHeight-s-20+"px",r.appendChild(e),e.innerHTML=i},close:function(){try{this.div.parentNode.removeChild(this.div)}catch(t){}}}),AmCharts.ValueLegend=AmCharts.Class({construct:function(t){this.cname="ValueLegend",this.showAsGradient=!1,this.minValue=0,this.height=12,this.width=200,this.bottom=this.left=10,this.borderColor="#FFFFFF",this.borderAlpha=this.borderThickness=1,this.color="#000000",this.fontSize=11,AmCharts.applyTheme(this,t,this.cname)},init:function(t,e){var i=t.areasSettings.color,s=t.areasSettings.colorSolid,a=t.colorSteps;AmCharts.remove(this.set);var r=e.set();this.set=r;var o=0,n=this.minValue,h=this.fontSize,l=t.fontFamily,d=this.color;if(void 0==n&&(n=t.minValueReal),void 0!==n&&((o=AmCharts.text(e,n,d,l,h,"left")).translate(0,h/2-1),r.push(o),o=o.getBBox().height),void 0===(n=this.maxValue)&&(n=t.maxValueReal),void 0!==n&&((o=AmCharts.text(e,n,d,l,h,"right")).translate(this.width,h/2-1),r.push(o),o=o.getBBox().height),this.showAsGradient)(i=AmCharts.rect(e,this.width,this.height,[i,s],1,this.borderThickness,this.borderColor,1,0,0)).translate(0,o),r.push(i);else for(h=this.width/a,l=0;l<a;l++)d=AmCharts.getColorFade(i,s,1*l/(a-1)),(d=AmCharts.rect(e,h,this.height,d,1,this.borderThickness,this.borderColor,1)).translate(h*l,o),r.push(d);s=i=0,a=r.getBBox(),o=t.getY(this.bottom,!0),h=t.getY(this.top),l=t.getX(this.right,!0),d=t.getX(this.left),isNaN(h)||(i=h),isNaN(o)||(i=o-a.height),isNaN(d)||(s=d),isNaN(l)||(s=l-a.width),r.translate(s,i)}}),AmCharts.ObjectList=AmCharts.Class({construct:function(t){this.divId=t},init:function(t){this.chart=t;var e;e=this.divId,this.container&&(e=this.container),this.div=e="object"!=typeof e?document.getElementById(e):e,(e=document.createElement("div")).className="ammapObjectList",this.div.appendChild(e),this.addObjects(t.dataProvider,e)},addObjects:function(t,e){var i,s=this.chart,a=document.createElement("ul");if(t.areas)for(i=0;i<t.areas.length;i++){var r=t.areas[i];void 0===r.showInList&&(r.showInList=s.showAreasInList),this.addObject(r,a)}if(t.images)for(i=0;i<t.images.length;i++)void 0===(r=t.images[i]).showInList&&(r.showInList=s.showImagesInList),this.addObject(r,a);if(t.lines)for(i=0;i<t.lines.length;i++)void 0===(r=t.lines[i]).showInList&&(r.showInList=s.showLinesInList),this.addObject(r,a);0<a.childNodes.length&&e.appendChild(a)},addObject:function(t,e){var i=this;if(t.showInList&&void 0!==t.title){var s=document.createElement("li"),a=document.createTextNode(t.title),r=document.createElement("a");r.appendChild(a),s.appendChild(r),e.appendChild(s),this.addObjects(t,s),r.onmouseover=function(){i.chart.rollOverMapObject(t,!1)},r.onmouseout=function(){i.chart.rollOutMapObject(t)},r.onclick=function(){i.chart.clickMapObject(t)}}}});
Kaydet
Ctrl+S ile kaydet