!function(){var t,e,n,r,i,a,s,o,l,c,u,h,f,g,d,p,v,m,x,y,b,_,k,w,C,S,A,T,I,P,L,B,M,R,O,N,D,G,E,F,z,V,U,j,Y,H,W,q,X,$,Z,J,Q,K,te,ee,ne,re,ie,ae,se,oe,le,ce,ue,he,fe,ge,de,pe,ve,me,xe,ye;t=function(t){function e(t,e){var n=t.length,r=t[0];if(e<t[0])return a;if(e>=t[n-1])return t[n-1];for(var i=1;i<t.length&&!(e<t[i]);i++)r=t[i];return r}function n(t,e){var n,r=t.length,i=t[0];if(e>t[r-1])return a;if(e<t[0])return t[0];for(var s=1;s<t.length;s++){if(e<=t[s]){n=t[s];break}i=t[s]}return n}function r(t,e){var n=e.toString(),r=n.indexOf(".");if(-1==r)return parseInt(t);var i=n.substr(r+1).length;return parseFloat(t.toFixed(i))}function i(t,e,n){n=n||0;for(var r in e)if(e.hasOwnProperty(r)){var a=e[r];null!==a&&c.isObject(a)?(c.isObject(t[r])||(t[r]={}),l>n?i(t[r],e[r]):t[r]=e[r]):c.isArray(a)?(t[r]=[],t[r]=t[r].concat(a)):void 0!==a&&(t[r]=e[r])}}var a=0/0,s=Object.prototype,o=s.toString,l=5,c={substitute:function(t,e){return t&&e?t.replace(/\\?\{([^{}]+)\}/g,function(t,n){return"\\"===t.charAt(0)?t.slice(1):void 0===e[n]?"":e[n]}):t},ucfirst:function(t){return t+="",t.charAt(0).toUpperCase()+t.substring(1)},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isNumeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},isBoolean:function(t){return"boolean"==typeof t},isFunction:function(t){return"function"==typeof t},isArray:"isArray"in Array?Array.isArray:function(t){return"[object Array]"===o.call(t)},isDate:function(t){return"[object Date]"===o.call(t)},isObject:"[object Object]"===o.call(null)?function(t){return null!==t&&void 0!==t&&"[object Object]"===o.call(t)&&void 0===t.ownerDocument}:function(t){return"[object Object]"===o.call(t)},extend:function(t,e,n,r){c.isFunction(e)||(n=e,e=t,t=function(){});var i=Object.create?function(t,e){return Object.create(t,{constructor:{value:e}})}:function(t,e){function n(){}n.prototype=t;var r=new n;return r.constructor=e,r},a=i(e.prototype,t);return t.prototype=c.mix(a,t.prototype),t.superclass=i(e.prototype,e),c.mix(a,n),c.mix(t,r),t},augment:function(t){for(var e=c.toArray(arguments),n=1;n<e.length;n++){var r=e[n];c.isFunction(r)&&(r=r.prototype),c.mix(t.prototype,r)}},toArray:function(t){if(!t||!t.length)return[];if(c.vml){for(var e=[],n=0;n<t.length;n++)e.push(t[n]);return e}return Array.prototype.slice.call(t)},mix:function(){var t=c.toArray(arguments),e=t[0];if(1==e){e=t[1];for(var n=2;n<t.length;n++){var r=t[n];i(e,r)}}else for(var n=1;n<t.length;n++){var r=t[n];for(var a in r)r.hasOwnProperty(a)&&"constructor"!=a&&(e[a]=r[a])}return e},mixin:function(t,e){if(t&&e){t._mixins=e,t.ATTRS=t.ATTRS||{};var n={};c.each(e,function(e){c.augment(t,e);var r=e.ATTRS;r&&c.mix(n,r)}),t.ATTRS=c.mix(n,t.ATTRS)}},map:function(t,e){var n=[];return c.each(t,function(t,r){n.push(e(t,r))}),n},filter:function(t,e){var n=[];return c.each(t,function(t,r){e(t,r)&&n.push(t)}),n},each:function(t,e){if(t)if(c.isObject(t)){for(var n in t)if(t.hasOwnProperty(n)){var r=e(t[n],n);if(0==r)break}}else if(t.length)for(var i=0;i<t.length;i++){var r=e(t[i],i);if(0==r)break}},requestAnimationFrame:function(t){var e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return setTimeout(t,16)};return e(t)},cancelAnimationFrame:function(t){var e=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||function(t){return clearTimeout(t)};return e(t)},guid:function(){var t={};return function(e){return e=e||"acharts",t[e]?t[e]+=1:t[e]=1,e+t[e]}}(),indexOf:function(t,e){var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]==e){r=i;break}return r},remove:function(t,e){var n=c.indexOf(t,e);-1!==n&&t.splice(n,1)},empty:function(t){if(!(t instanceof Array))for(var e=t.length-1;e>=0;e--)delete t[e];t.length=0},equalsArray:function(t,e){if(t==e)return!0;if(!t||!e)return!1;if(t.length!=e.length)return!1;for(var n=!0,r=0;r<t.length;r++)if(t[r]!==e[r]){n=!1;break}return n},wrapBehavior:function(t,e){return t["_wrap_"+e]=function(n){t[e](n)}},getWrapBehavior:function(t,e){return t["_wrap_"+e]},snapTo:function(t,r,i){if(i)return Raphael.snapTo(t,r,i);var a=e(t,r),s=n(t,r);if(isNaN(a)||isNaN(s)){if(t[0]>=r)return t[0];var o=t[t.length-1];if(r>=o)return o}return Math.abs(r-a)<Math.abs(s-r)?a:s},snapFloor:function(t,n){return e(t,n)},snapCeiling:function(t,e){return n(t,e)},tryFixed:function(t,e){return r(t,e)}};return t=c}(),e=function(t){var e=Array,n={create:function(t,n){var r=new e(2);return r[0]=t||0,r[1]=n||0,r},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},clone:function(t){var n=new e(2);return n[0]=t[0],n[1]=t[1],n},set:function(t,e,n){return t[0]=e,t[1]=n,t},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},scaleAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t},sub:function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t},len:function(t){return Math.sqrt(this.lenSquare(t))},lenSquare:function(t){return t[0]*t[0]+t[1]*t[1]},mul:function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t},div:function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},normalize:function(t,e){var r=n.len(e);return 0===r?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t},distance:function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))},distanceSquare:function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])},negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:function(t,e,n,r){return t[0]=e[0]+r*(n[0]-e[0]),t[1]=e[1]+r*(n[1]-e[1]),t},applyTransform:function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}};return n.length=n.len,n.lengthSquare=n.lenSquare,n.dist=n.distance,n.distSquare=n.distanceSquare,t=n}(),n=function(t){var e,n,r=window,i="0.4.2",a="hasOwnProperty",s=/[\.\/]/,o="*",l=function(){},c=function(t,e){return t-e},u={n:{}},h=function(t,r){t=String(t);var i,a=n,s=Array.prototype.slice.call(arguments,2),o=h.listeners(t),l=0,u=[],f={},g=[],d=e;e=t,n=0;for(var p=0,v=o.length;v>p;p++)"zIndex"in o[p]&&(u.push(o[p].zIndex),o[p].zIndex<0&&(f[o[p].zIndex]=o[p]));for(u.sort(c);u[l]<0;)if(i=f[u[l++]],g.push(i.apply(r,s)),n)return n=a,g;for(p=0;v>p;p++)if(i=o[p],"zIndex"in i)if(i.zIndex==u[l]){if(g.push(i.apply(r,s)),n)break;do if(l++,i=f[u[l]],i&&g.push(i.apply(r,s)),n)break;while(i)}else f[i.zIndex]=i;else if(g.push(i.apply(r,s)),n)break;return n=a,e=d,g.length?g:null};return h._events=u,h.listeners=function(t){var e,n,r,i,a,l,c,h,f=t.split(s),g=u,d=[g],p=[];for(i=0,a=f.length;a>i;i++){for(h=[],l=0,c=d.length;c>l;l++)for(g=d[l].n,n=[g[f[i]],g[o]],r=2;r--;)e=n[r],e&&(h.push(e),p=p.concat(e.f||[]));d=h}return p},h.on=function(t,e){if(t=String(t),"function"!=typeof e)return function(){};for(var n=t.split(s),r=u,i=0,a=n.length;a>i;i++)r=r.n,r=r.hasOwnProperty(n[i])&&r[n[i]]||(r[n[i]]={n:{}});for(r.f=r.f||[],i=0,a=r.f.length;a>i;i++)if(r.f[i]==e)return l;return r.f.push(e),function(t){+t==+t&&(e.zIndex=+t)}},h.f=function(t){var e=[].slice.call(arguments,1);return function(){h.apply(null,[t,null].concat(e).concat([].slice.call(arguments,0)))}},h.stop=function(){n=1},h.nt=function(t){return t?new RegExp("(?:\\.|\\/|^)"+t+"(?:\\.|\\/|$)").test(e):e},h.nts=function(){return e.split(s)},h.off=h.unbind=function(t,e){if(!t)return void(h._events=u={n:{}});var n,r,i,l,c,f,g,d=t.split(s),p=[u];for(l=0,c=d.length;c>l;l++)for(f=0;f<p.length;f+=i.length-2){if(i=[f,1],n=p[f].n,d[l]!=o)n[d[l]]&&i.push(n[d[l]]);else for(r in n)n[a](r)&&i.push(n[r]);p.splice.apply(p,i)}for(l=0,c=p.length;c>l;l++)for(n=p[l];n.n;){if(e){if(n.f){for(f=0,g=n.f.length;g>f;f++)if(n.f[f]==e){n.f.splice(f,1);break}!n.f.length&&delete n.f}for(r in n.n)if(n.n[a](r)&&n.n[r].f){var v=n.n[r].f;for(f=0,g=v.length;g>f;f++)if(v[f]==e){v.splice(f,1);break}!v.length&&delete n.n[r].f}}else{delete n.f;for(r in n.n)n.n[a](r)&&n.n[r].f&&delete n.n[r].f}n=n.n}},h.once=function(t,e){var n=function(){return h.unbind(t,n),e.apply(this,arguments)};return h.on(t,n)},h.version=i,h.toString=function(){return"You are running Eve "+i},r.eve=h,t=h}(),r=function(t){function e(t){return t instanceof Date?t:new Date(t)}function n(t,e,n){var r=new Date(n);switch(isNaN(r)&&(r=new Date),e=parseInt(e,10),t){case"s":r=new Date(r.getTime()+1e3*e);break;case"n":r=new Date(r.getTime()+6e4*e);break;case"h":r=new Date(r.getTime()+36e5*e);break;case"d":r=new Date(r.getTime()+864e5*e);break;case"w":r=new Date(r.getTime()+6048e5*e);break;case"m":r=new Date(r.getFullYear(),r.getMonth()+e,r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds());break;case"y":r=new Date(r.getFullYear()+e,r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds())}return r}var r=/^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]?)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/,i=function(){var t=/w{1}|d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,e=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,r=function(t,e){for(t=String(t),e=e||2;t.length<e;)t="0"+t;return t},i={"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUTCDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",localShortDate:"yy\u5e74mm\u6708dd\u65e5",localShortDateTime:"yy\u5e74mm\u6708dd\u65e5 hh:MM:ss TT",localLongDate:"yyyy\u5e74mm\u6708dd\u65e5",localLongDateTime:"yyyy\u5e74mm\u6708dd\u65e5 hh:MM:ss TT",localFullDate:"yyyy\u5e74mm\u6708dd\u65e5 w",localFullDateTime:"yyyy\u5e74mm\u6708dd\u65e5 w hh:MM:ss TT"},a={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};return function(s,o,l){if(1!==arguments.length||"[object String]"!==Object.prototype.toString.call(s)||/\d/.test(s)||(o=s,s=void 0),s=s?new Date(s):new Date,isNaN(s))throw SyntaxError("invalid date");o=String(i[o]||o||i["default"]),"UTC:"===o.slice(0,4)&&(o=o.slice(4),l=!0);var c=l?"getUTC":"get",u=s[c+"Date"](),h=s[c+"Day"](),f=s[c+"Month"](),g=s[c+"FullYear"](),d=s[c+"Hours"](),p=s[c+"Minutes"](),v=s[c+"Seconds"](),m=s[c+"Milliseconds"](),x=l?0:s.getTimezoneOffset(),y={d:u,dd:r(u,void 0),ddd:a.dayNames[h],dddd:a.dayNames[h+7],w:a.dayNames[h+14],m:f+1,mm:r(f+1,void 0),mmm:a.monthNames[f],mmmm:a.monthNames[f+12],yy:String(g).slice(2),yyyy:g,h:d%12||12,hh:r(d%12||12,void 0),H:d,HH:r(d,void 0),M:p,MM:r(p,void 0),s:v,ss:r(v,void 0),l:r(m,3),L:r(m>99?Math.round(m/10):m,void 0),t:12>d?"a":"p",tt:12>d?"am":"pm",T:12>d?"A":"P",TT:12>d?"AM":"PM",Z:l?"UTC":(String(s).match(e)||[""]).pop().replace(n,""),o:(x>0?"-":"+")+r(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][u%10>3?0:(u%100-u%10!==10)*u%10]};return o.replace(t,function(t){return t in y?y[t]:t.slice(1,t.length-1)})}}(),a={add:function(t,e,r){return n(t,e,r)},addHour:function(t,e){return n("h",t,e)},addMinute:function(t,e){return n("n",t,e)},addSecond:function(t,e){return n("s",t,e)},addDay:function(t,e){return n("d",t,e)},addWeek:function(t,e){return n("w",t,e)},addMonths:function(t,e){return n("m",t,e)},addYear:function(t,e){return n("y",t,e)},isDateEquals:function(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()},isEquals:function(t,e){return t==e?!0:t&&e&&t.getTime&&e.getTime?t.getTime()==e.getTime():!1},isDateString:function(t){return r.test(t)},format:function(t,e,n){return i(t,e,n)},parse:function(t){return"string"==typeof t&&(t=t.replace(/-/g,"/")),e(t)},today:function(){var t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate())},getDate:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())}};return t=a}(),i=function(e){var n=t;return e=n}(),a=function(t){var r=e;return function(t,e){var r=n;e(t,r)}(this,function(t,e){function n(t){if(n.is(t,"function"))return k?t():e.on("raphael.DOMload",t);if(n.is(t,$))return n._engine.create[B](n,t.splice(0,3+n.is(t[0],q))).add(t);var r=Array.prototype.slice.call(arguments,0);if(n.is(r[r.length-1],"function")){var i=r.pop();return k?i.call(n._engine.create[B](n,r)):e.on("raphael.DOMload",function(){i.call(n._engine.create[B](n,r))})}return n._engine.create[B](n,arguments)}function i(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var n in t)t[T](n)&&(e[n]=i(t[n]));return e}function a(t,e){for(var n=0,r=t.length;r>n;n++)if(t[n]===e)return t.push(t.splice(n,1)[0])}function s(t,e,n){function r(){var i=Array.prototype.slice.call(arguments,0),s=i.join("\u2400"),o=r.cache=r.cache||{},l=r.count=r.count||[];return o[T](s)?(a(l,s),n?n(o[s]):o[s]):(l.length>=1e3&&delete o[l.shift()],l.push(s),o[s]=t[B](e,i),n?n(o[s]):o[s])}return r}function o(){return this.hex}function l(t,e,n,i){var a,s,o,l,c=[],u=[],h=[],f=[],g=!!i;if(g){o=[1/0,1/0],l=[-1/0,-1/0];for(var d=0,p=t.length;p>d;d++)r.min(o,o,t[d]),r.max(l,l,t[d]);r.min(o,o,i[0]),r.max(l,l,i[1])}for(var d=0,p=t.length;p>d;d++){var v=t[d];if(n)a=t[d?d-1:p-1],s=t[(d+1)%p];else{if(0===d||d===p-1){c.push(r.clone(t[d]));continue}a=t[d-1],s=t[d+1]}r.sub(u,s,a),r.scale(u,u,e);var m=r.distance(v,a),x=r.distance(v,s),y=m+x;0!==y&&(m/=y,x/=y),r.scale(h,u,-m),r.scale(f,u,x);var b=r.add([],v,h),_=r.add([],v,f);g&&(r.max(b,b,o),r.min(b,b,l),r.max(_,_,o),r.min(_,_,l)),c.push(b),c.push(_)}return n&&c.push(r.clone(c.shift())),c}function c(t,e){for(var n=!!e,i=[],a=0;a<t.length;a+=2)i.push(r.create(t[a],t[a+1]));for(var s,o,c,u=l(i,.4,n,[[0,0],[100,100]]),h=i.length,f=[],a=0;h-1>a;a++)s=u[2*a],o=u[2*a+1],c=i[a+1],f.push(["C",s[0],s[1],o[0],o[1],c[0],c[1]]);return n&&(s=u[h],o=u[h+1],c=i[0],f.push(["C",s[0],s[1],o[0],o[1],c[0],c[1]])),f}function u(t,e,n,r,i){var a=-3*e+9*n-9*r+3*i,s=t*a+6*e-12*n+6*r;return t*s-3*e+3*n}function h(t,e,n,r,i,a,s,o,l){null==l&&(l=1),l=l>1?1:0>l?0:l;for(var c=l/2,h=12,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],g=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,p=0;h>p;p++){var v=c*f[p]+c,m=u(v,t,n,i,s),x=u(v,e,r,a,o),y=m*m+x*x;d+=g[p]*V.sqrt(y)}return c*d}function f(t,e,n,r,i,a,s,o,l){if(!(0>l||h(t,e,n,r,i,a,s,o)<l)){var c,u=1,f=u/2,g=u-f,d=.01;for(c=h(t,e,n,r,i,a,s,o,g);Y(c-l)>d;)f/=2,g+=(l>c?1:-1)*f,c=h(t,e,n,r,i,a,s,o,g);return g}}function g(t,e,n,r,i,a,s,o){if(!(U(t,n)<j(i,s)||j(t,n)>U(i,s)||U(e,r)<j(a,o)||j(e,r)>U(a,o))){var l=(t*r-e*n)*(i-s)-(t-n)*(i*o-a*s),c=(t*r-e*n)*(a-o)-(e-r)*(i*o-a*s),u=(t-n)*(a-o)-(e-r)*(i-s);if(u){var h=l/u,f=c/u,g=+h.toFixed(2),d=+f.toFixed(2);if(!(g<+j(t,n).toFixed(2)||g>+U(t,n).toFixed(2)||g<+j(i,s).toFixed(2)||g>+U(i,s).toFixed(2)||d<+j(e,r).toFixed(2)||d>+U(e,r).toFixed(2)||d<+j(a,o).toFixed(2)||d>+U(a,o).toFixed(2)))return{x:h,y:f}}}}function d(t,e,r){var i=n.bezierBBox(t),a=n.bezierBBox(e);if(!n.isBBoxIntersect(i,a))return r?0:[];for(var s=h.apply(0,t),o=h.apply(0,e),l=U(~~(s/5),1),c=U(~~(o/5),1),u=[],f=[],d={},p=r?0:[],v=0;l+1>v;v++){var m=n.findDotsAtSegment.apply(n,t.concat(v/l));u.push({x:m.x,y:m.y,t:v/l})}for(v=0;c+1>v;v++)m=n.findDotsAtSegment.apply(n,e.concat(v/c)),f.push({x:m.x,y:m.y,t:v/c});for(v=0;l>v;v++)for(var x=0;c>x;x++){var y=u[v],b=u[v+1],_=f[x],k=f[x+1],w=Y(b.x-y.x)<.001?"y":"x",C=Y(k.x-_.x)<.001?"y":"x",S=g(y.x,y.y,b.x,b.y,_.x,_.y,k.x,k.y);if(S){if(d[S.x.toFixed(4)]==S.y.toFixed(4))continue;d[S.x.toFixed(4)]=S.y.toFixed(4);var A=y.t+Y((S[w]-y[w])/(b[w]-y[w]))*(b.t-y.t),T=_.t+Y((S[C]-_[C])/(k[C]-_[C]))*(k.t-_.t);A>=0&&1.001>=A&&T>=0&&1.001>=T&&(r?p++:p.push({x:S.x,y:S.y,t1:j(A,1),t2:j(T,1)}))}}return p}function p(t,e,r){t=n._path2curve(t),e=n._path2curve(e);for(var i,a,s,o,l,c,u,h,f,g,p=r?0:[],v=0,m=t.length;m>v;v++){var x=t[v];if("M"==x[0])i=l=x[1],a=c=x[2];else{"C"==x[0]?(f=[i,a].concat(x.slice(1)),i=f[6],a=f[7]):(f=[i,a,i,a,l,c,l,c],i=l,a=c);for(var y=0,b=e.length;b>y;y++){var _=e[y];if("M"==_[0])s=u=_[1],o=h=_[2];else{"C"==_[0]?(g=[s,o].concat(_.slice(1)),s=g[6],o=g[7]):(g=[s,o,s,o,u,h,u,h],s=u,o=h);var k=d(f,g,r);if(r)p+=k;else{for(var w=0,C=k.length;C>w;w++)k[w].segment1=v,k[w].segment2=y,k[w].bez1=f,k[w].bez2=g;p=p.concat(k)}}}}}return p}function v(t,e,n,r,i,a){null!=t?(this.a=+t,this.b=+e,this.c=+n,this.d=+r,this.e=+i,this.f=+a):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function m(){return this.x+N+this.y+N+this.width+" \xd7 "+this.height}function x(t,e,n,r,i,a){function s(t){return((h*t+u)*t+c)*t}function o(t,e){var n=l(t,e);return((d*n+g)*n+f)*n}function l(t,e){var n,r,i,a,o,l;for(i=t,l=0;8>l;l++){if(a=s(i)-t,Y(a)<e)return i;if(o=(3*h*i+2*u)*i+c,Y(o)<1e-6)break;i-=a/o}if(n=0,r=1,i=t,n>i)return n;if(i>r)return r;for(;r>n;){if(a=s(i),Y(a-t)<e)return i;t>a?n=i:r=i,i=(r-n)/2+n}return i}var c=3*e,u=3*(r-e)-c,h=1-c-u,f=3*n,g=3*(i-n)-f,d=1-f-g;return o(t,1/(200*a))}function y(t,e){var n=[],r={};if(this.ms=e,this.times=1,t){for(var i in t)t[T](i)&&(r[ee(i)]=t[i],n.push(ee(i)));n.sort(ge)}this.anim=r,this.top=n[n.length-1],this.percents=n}function b(t,r,i,a,s,o){i=ee(i);var l,c,u,h,f,g,d=t.ms,p={},m={},y={};if(a)for(_=0,k=hn.length;k>_;_++){var b=hn[_];if(b.el.id==r.id&&b.anim==t){b.percent!=i?(hn.splice(_,1),u=1):c=b,r.attr(b.totalOrigin);break}}else a=+m;for(var _=0,k=t.percents.length;k>_;_++){if(t.percents[_]==i||t.percents[_]>a*t.top){i=t.percents[_],f=t.percents[_-1]||0,d=d/t.top*(i-f),h=t.percents[_+1],l=t.anim[i];break}a&&r.attr(t.anim[t.percents[_]])}if(l){if(c)c.initstatus=a,c.start=new Date-c.ms*a;else{for(var w in l)if(l[T](w)&&(ae[T](w)||r.paper.customAttributes[T](w)))switch(p[w]=r.attr(w),null==p[w]&&(p[w]=ie[w]),m[w]=l[w],ae[w]){case q:y[w]=(m[w]-p[w])/d;break;case"colour":p[w]=n.getRGB(p[w]);var S=n.getRGB(m[w]);y[w]={r:(S.r-p[w].r)/d,g:(S.g-p[w].g)/d,b:(S.b-p[w].b)/d};break;case"path":var A=Ee(p[w],m[w]),I=A[1];for(p[w]=A[0],y[w]=[],_=0,k=p[w].length;k>_;_++){y[w][_]=[0];for(var P=1,L=p[w][_].length;L>P;P++)y[w][_][P]=(I[_][P]-p[w][_][P])/d}break;case"transform":var B=r._,R=je(B[w],m[w]);if(R)for(p[w]=R.from,m[w]=R.to,y[w]=[],y[w].real=!0,_=0,k=p[w].length;k>_;_++)for(y[w][_]=[p[w][_][0]],P=1,L=p[w][_].length;L>P;P++)y[w][_][P]=(m[w][_][P]-p[w][_][P])/d;else{var O=r.matrix||new v,N={_:{transform:B.transform},getBBox:function(){return r.getBBox(1)}};p[w]=[O.a,O.b,O.c,O.d,O.e,O.f],Ve(N,m[w]),m[w]=N._.transform,y[w]=[(N.matrix.a-O.a)/d,(N.matrix.b-O.b)/d,(N.matrix.c-O.c)/d,(N.matrix.d-O.d)/d,(N.matrix.e-O.e)/d,(N.matrix.f-O.f)/d]}break;case"csv":var E=D(l[w])[G](C),F=D(p[w])[G](C);if("clip-rect"==w||"clip-circle"==w||"clip-angle"==w)for(p[w]=F,y[w]=[],_=F.length;_--;)y[w][_]=(E[_]-p[w][_])/d;m[w]=E;break;default:for(E=[][M](l[w]),F=[][M](p[w]),y[w]=[],_=r.paper.customAttributes[w].length;_--;)y[w][_]=((E[_]||0)-(F[_]||0))/d}var z=l.easing,V=n.easing_formulas[z];if(!V)if(V=D(z).match(K),V&&5==V.length){var U=V;V=function(t){return x(t,+U[1],+U[2],+U[3],+U[4],d)}}else V=pe;if(g=l.start||t.start||+new Date,b={anim:t,percent:i,timestamp:g,start:g+(t.del||0),status:0,initstatus:a||0,stop:!1,ms:d,easing:V,from:p,diff:y,to:m,el:r,callback:l.callback,prev:f,next:h,repeat:o||t.times,origin:r.attr(),totalOrigin:s},hn.push(b),a&&!c&&!u&&(b.stop=!0,b.start=new Date-d*a,1==hn.length))return gn();u&&(b.start=new Date-b.ms*a),1==hn.length&&fn(gn)}e("raphael.anim.start."+r.id,r,t)}}function _(t){for(var e=0;e<hn.length;e++)hn[e].el.paper==t&&hn.splice(e--,1)}n.version="2.1.2",n.eve=e;var k,w,C=/[, ]+/,S={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},A=/\{(\d+)\}/g,T="hasOwnProperty",I={doc:document,win:t},P={was:Object.prototype[T].call(I.win,"Raphael"),is:I.win.Raphael},L=function(){this.ca=this.customAttributes={}},B="apply",M="concat",R="ontouchstart"in I.win||I.win.DocumentTouch&&I.doc instanceof DocumentTouch,O="",N=" ",D=String,G="split",E="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[G](N),F={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},z=D.prototype.toLowerCase,V=Math,U=V.max,j=V.min,Y=V.abs,H=V.pow,W=V.PI,q="number",X="string",$="array",Z=Object.prototype.toString,J=(n._ISURL=/^url\(['"]?([^\)]+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),Q={NaN:1,Infinity:1,"-Infinity":1},K=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,te=V.round,ee=parseFloat,ne=parseInt,re=D.prototype.toUpperCase,ie=n._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9","clip-angle":"0 0 1e9 1e9","clip-circle":"0 0 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0},ae=n._availableAnimAttrs={blur:q,"clip-rect":"csv","clip-angle":"csv","clip-circle":"csv",cx:q,cy:q,fill:"colour","fill-opacity":q,"font-size":q,height:q,opacity:q,path:"path",r:q,rx:q,ry:q,stroke:"colour","stroke-opacity":q,"stroke-width":q,transform:"transform",width:q,x:q,y:q},se=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,oe={hs:1,rg:1},le=/,?([achlmqrstvxz]),?/gi,ce=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,ue=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,he=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,fe=(n._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),ge=function(t,e){return ee(t)-ee(e)},de=function(){},pe=function(t){return t},ve=n._rectPath=function(t,e,n,r,i){return i?[["M",t+i,e],["l",n-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-n,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]]:[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]]},me=function(t,e,n,r){return null==r&&(r=n),[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]]},xe=n._getPath={path:function(t){return t.attr("path")},circle:function(t){var e=t.attrs;return me(e.cx,e.cy,e.r)},ellipse:function(t){var e=t.attrs;return me(e.cx,e.cy,e.rx,e.ry)},rect:function(t){var e=t.attrs;return ve(e.x,e.y,e.width,e.height,e.r)},image:function(t){var e=t.attrs;return ve(e.x,e.y,e.width,e.height)},text:function(t){var e=t._getBBox();return ve(e.x,e.y,e.width,e.height)},set:function(t){var e=t._getBBox();return ve(e.x,e.y,e.width,e.height)}},ye=n.mapPath=function(t,e){if(!e)return t;var n,r,i,a,s,o,l;for(t=Ee(t),i=0,s=t.length;s>i;i++)for(l=t[i],a=1,o=l.length;o>a;a+=2)n=e.x(l[a],l[a+1]),r=e.y(l[a],l[a+1]),l[a]=n,l[a+1]=r;return t};if(n._g=I,n.type=I.win.SVGAngle||I.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==n.type){var be,_e=I.doc.createElement("div");if(_e.innerHTML='<v:shape adj="1"/>',be=_e.firstChild,be.style.behavior="url(#default#VML)",!be||"object"!=typeof be.adj)return n.type=O;_e=null}n.svg=!(n.vml="VML"==n.type),n._Paper=L,n.fn=w=L.prototype=n.prototype,n._id=0,n._oid=0,n.is=function(t,e){return e=z.call(e),"finite"==e?!Q[T](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||Z.call(t).slice(8,-1).toLowerCase()==e},n.angle=function(t,e,r,i,a,s){if(null==a){var o=t-r,l=e-i;return o||l?(180+180*V.atan2(-l,-o)/W+360)%360:0}return n.angle(t,e,a,s)-n.angle(r,i,a,s)},n.rad=function(t){return t%360*W/180},n.deg=function(t){return 180*t/W%360},n.snapTo=function(t,e,r){if(r=n.is(r,"finite")?r:10,n.is(t,$)){for(var i=t.length;i--;)if(Y(t[i]-e)<=r)return t[i]}else{t=+t;var a=e%t;if(r>a)return e-a;if(a>t-r)return e-a+t}return e};n.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*V.random()|0,n="x"==t?e:3&e|8;return n.toString(16)});n.setWindow=function(t){e("raphael.setWindow",n,I.win,t),I.win=t,I.doc=I.win.document,n._engine.initWin&&n._engine.initWin(I.win)};var ke=function(t){if(n.vml){var e,r=/^\s+|\s+$/g;try{var i=new ActiveXObject("htmlfile");i.write("<body>"),i.close(),e=i.body}catch(a){e=createPopup().document.body}var o=e.createTextRange();ke=s(function(t){try{e.style.color=D(t).replace(r,O);var n=o.queryCommandValue("ForeColor");return n=(255&n)<<16|65280&n|(16711680&n)>>>16,"#"+("000000"+n.toString(16)).slice(-6)}catch(i){return"none"}})}else{var l=I.doc.createElement("i");l.title="Rapha\xebl Colour Picker",l.style.display="none",I.doc.body.appendChild(l),ke=s(function(t){return l.style.color=t,I.doc.defaultView.getComputedStyle(l,O).getPropertyValue("color")})}return ke(t)},we=function(){return"hsb("+[this.h,this.s,this.b]+")"},Ce=function(){return"hsl("+[this.h,this.s,this.l]+")"},Se=function(){return this.hex},Ae=function(t,e,r){if(null==e&&n.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(r=t.b,e=t.g,t=t.r),null==e&&n.is(t,X)){var i=n.getRGB(t);t=i.r,e=i.g,r=i.b}return(t>1||e>1||r>1)&&(t/=255,e/=255,r/=255),[t,e,r]},Te=function(t,e,r,i){t*=255,e*=255,r*=255;var a={r:t,g:e,b:r,hex:n.rgb(t,e,r),toString:Se};return n.is(i,"finite")&&(a.opacity=i),a};n.color=function(t){var e;return n.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(e=n.hsb2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.hex=e.hex):n.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(e=n.hsl2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.hex=e.hex):(n.is(t,"string")&&(t=n.getRGB(t)),n.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(e=n.rgb2hsl(t),t.h=e.h,t.s=e.s,t.l=e.l,e=n.rgb2hsb(t),t.v=e.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=Se,t},n.hsb2rgb=function(t,e,n,r){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(n=t.b,e=t.s,t=t.h,r=t.o),t*=360;var i,a,s,o,l;return t=t%360/60,l=n*e,o=l*(1-Y(t%2-1)),i=a=s=n-l,t=~~t,i+=[l,o,0,0,o,l][t],a+=[o,l,l,o,0,0][t],s+=[0,0,o,l,l,o][t],Te(i,a,s,r)},n.hsl2rgb=function(t,e,n,r){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(n=t.l,e=t.s,t=t.h),(t>1||e>1||n>1)&&(t/=360,e/=100,n/=100),t*=360;var i,a,s,o,l;return t=t%360/60,l=2*e*(.5>n?n:1-n),o=l*(1-Y(t%2-1)),i=a=s=n-l/2,t=~~t,i+=[l,o,0,0,o,l][t],a+=[o,l,l,o,0,0][t],s+=[0,0,o,l,l,o][t],Te(i,a,s,r)},n.rgb2hsb=function(t,e,n){n=Ae(t,e,n),t=n[0],e=n[1],n=n[2];var r,i,a,s;return a=U(t,e,n),s=a-j(t,e,n),r=0==s?null:a==t?(e-n)/s:a==e?(n-t)/s+2:(t-e)/s+4,r=(r+360)%6*60/360,i=0==s?0:s/a,{h:r,s:i,b:a,toString:we}},n.rgb2hsl=function(t,e,n){n=Ae(t,e,n),t=n[0],e=n[1],n=n[2];var r,i,a,s,o,l;return s=U(t,e,n),o=j(t,e,n),l=s-o,r=0==l?null:s==t?(e-n)/l:s==e?(n-t)/l+2:(t-e)/l+4,r=(r+360)%6*60/360,a=(s+o)/2,i=0==l?0:.5>a?l/(2*a):l/(2-2*a),{h:r,s:i,l:a,toString:Ce}},n._path2string=function(){return this.join(",").replace(le,"$1")};n._preload=function(t,e){var n=I.doc.createElement("img");n.style.cssText="position:absolute;left:-9999em;top:-9999em",n.onload=function(){e.call(this),this.onload=null,I.doc.body.removeChild(this)},n.onerror=function(){I.doc.body.removeChild(this)},I.doc.body.appendChild(n),n.src=t};n.getRGB=s(function(t){if(!t||(t=D(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:o};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:o};!(oe[T](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=ke(t));var e,r,i,a,s,l,c=t.match(J);return c?(c[2]&&(i=ne(c[2].substring(5),16),r=ne(c[2].substring(3,5),16),e=ne(c[2].substring(1,3),16)),c[3]&&(i=ne((s=c[3].charAt(3))+s,16),r=ne((s=c[3].charAt(2))+s,16),e=ne((s=c[3].charAt(1))+s,16)),c[4]&&(l=c[4][G](se),e=ee(l[0]),"%"==l[0].slice(-1)&&(e*=2.55),r=ee(l[1]),"%"==l[1].slice(-1)&&(r*=2.55),i=ee(l[2]),"%"==l[2].slice(-1)&&(i*=2.55),"rgba"==c[1].toLowerCase().slice(0,4)&&(a=ee(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100)),c[5]?(l=c[5][G](se),e=ee(l[0]),"%"==l[0].slice(-1)&&(e*=2.55),r=ee(l[1]),"%"==l[1].slice(-1)&&(r*=2.55),i=ee(l[2]),"%"==l[2].slice(-1)&&(i*=2.55),("deg"==l[0].slice(-3)||"\xb0"==l[0].slice(-1))&&(e/=360),"hsba"==c[1].toLowerCase().slice(0,4)&&(a=ee(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100),n.hsb2rgb(e,r,i,a)):c[6]?(l=c[6][G](se),e=ee(l[0]),"%"==l[0].slice(-1)&&(e*=2.55),r=ee(l[1]),"%"==l[1].slice(-1)&&(r*=2.55),i=ee(l[2]),"%"==l[2].slice(-1)&&(i*=2.55),("deg"==l[0].slice(-3)||"\xb0"==l[0].slice(-1))&&(e/=360),"hsla"==c[1].toLowerCase().slice(0,4)&&(a=ee(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100),n.hsl2rgb(e,r,i,a)):(c={r:e,g:r,b:i,toString:o},c.hex="#"+(16777216|i|r<<8|e<<16).toString(16).slice(1),n.is(a,"finite")&&(c.opacity=a),c)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:o}},n),n.hsb=s(function(t,e,r){return n.hsb2rgb(t,e,r).hex}),n.hsl=s(function(t,e,r){return n.hsl2rgb(t,e,r).hex}),n.rgb=s(function(t,e,n){return"#"+(16777216|n|e<<8|t<<16).toString(16).slice(1)}),n.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},n=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),n.hex},n.getColor.reset=function(){delete this.start},n.parsePathString=function(t){if(!t)return null;var e=Ie(t);if(e.arr)return Le(e.arr);var r={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[];return n.is(t,$)&&n.is(t[0],$)&&(i=Le(t)),i.length||D(t).replace(ce,function(t,e,n){var a=[],s=e.toLowerCase();if(n.replace(he,function(t,e){e&&a.push(+e)}),"m"==s&&a.length>2&&(i.push([e][M](a.splice(0,2))),s="l",e="m"==e?"l":"L"),"r"==s)i.push([e][M](a));else for(;a.length>=r[s]&&(i.push([e][M](a.splice(0,r[s]))),r[s]););}),i.toString=n._path2string,e.arr=Le(i),i
},n.parseTransformString=s(function(t){if(!t)return null;var e=[];return n.is(t,$)&&n.is(t[0],$)&&(e=Le(t)),e.length||D(t).replace(ue,function(t,n,r){{var i=[];z.call(n)}r.replace(he,function(t,e){e&&i.push(+e)}),e.push([n][M](i))}),e.toString=n._path2string,e});var Ie=function(t){var e=Ie.ps=Ie.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var n in e)e[T](n)&&n!=t&&(e[n].sleep--,!e[n].sleep&&delete e[n])}),e[t]};n.findDotsAtSegment=function(t,e,n,r,i,a,s,o,l){var c=1-l,u=H(c,3),h=H(c,2),f=l*l,g=f*l,d=u*t+3*h*l*n+3*c*l*l*i+g*s,p=u*e+3*h*l*r+3*c*l*l*a+g*o,v=t+2*l*(n-t)+f*(i-2*n+t),m=e+2*l*(r-e)+f*(a-2*r+e),x=n+2*l*(i-n)+f*(s-2*i+n),y=r+2*l*(a-r)+f*(o-2*a+r),b=c*t+l*n,_=c*e+l*r,k=c*i+l*s,w=c*a+l*o,C=90-180*V.atan2(v-x,m-y)/W;return(v>x||y>m)&&(C+=180),{x:d,y:p,m:{x:v,y:m},n:{x:x,y:y},start:{x:b,y:_},end:{x:k,y:w},alpha:C}},n.bezierBBox=function(t,e,r,i,a,s,o,l){n.is(t,"array")||(t=[t,e,r,i,a,s,o,l]);var c=Ge.apply(null,t);return{x:c.min.x,y:c.min.y,x2:c.max.x,y2:c.max.y,width:c.max.x-c.min.x,height:c.max.y-c.min.y}},n.isPointInsideBBox=function(t,e,n){return e>=t.x&&e<=t.x2&&n>=t.y&&n<=t.y2},n.isBBoxIntersect=function(t,e){var r=n.isPointInsideBBox;return r(e,t.x,t.y)||r(e,t.x2,t.y)||r(e,t.x,t.y2)||r(e,t.x2,t.y2)||r(t,e.x,e.y)||r(t,e.x2,e.y)||r(t,e.x,e.y2)||r(t,e.x2,e.y2)||(t.x<e.x2&&t.x>e.x||e.x<t.x2&&e.x>t.x)&&(t.y<e.y2&&t.y>e.y||e.y<t.y2&&e.y>t.y)},n.pathIntersection=function(t,e){return p(t,e)},n.pathIntersectionNumber=function(t,e){return p(t,e,1)},n.isPointInsidePath=function(t,e,r){var i=n.pathBBox(t);return n.isPointInsideBBox(i,e,r)&&p(t,[["M",e,r],["H",i.x2+10]],1)%2==1},n._removedFactory=function(t){return function(){e("raphael.log",null,"Rapha\xebl: you are calling to method \u201c"+t+"\u201d of removed object",t)}};var Pe=n.pathBBox=function(t){var e=Ie(t);if(e.bbox)return i(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=Ee(t);for(var n,r=0,a=0,s=[],o=[],l=0,c=t.length;c>l;l++)if(n=t[l],"M"==n[0])r=n[1],a=n[2],s.push(r),o.push(a);else{var u=Ge(r,a,n[1],n[2],n[3],n[4],n[5],n[6]);s=s[M](u.min.x,u.max.x),o=o[M](u.min.y,u.max.y),r=n[5],a=n[6]}var h=j[B](0,s),f=j[B](0,o),g=U[B](0,s),d=U[B](0,o),p=g-h,v=d-f,m={x:h,y:f,x2:g,y2:d,width:p,height:v,cx:h+p/2,cy:f+v/2};return e.bbox=i(m),m},Le=function(t){var e=i(t);return e.toString=n._path2string,e},Be=n._pathToRelative=function(t){var e=Ie(t);if(e.rel)return Le(e.rel);n.is(t,$)&&n.is(t&&t[0],$)||(t=n.parsePathString(t));var r=[],i=0,a=0,s=0,o=0,l=0;"M"==t[0][0]&&(i=t[0][1],a=t[0][2],s=i,o=a,l++,r.push(["M",i,a]));for(var c=l,u=t.length;u>c;c++){var h=r[c]=[],f=t[c];if(f[0]!=z.call(f[0]))switch(h[0]=z.call(f[0]),h[0]){case"a":h[1]=f[1],h[2]=f[2],h[3]=f[3],h[4]=f[4],h[5]=f[5],h[6]=+(f[6]-i).toFixed(3),h[7]=+(f[7]-a).toFixed(3);break;case"v":h[1]=+(f[1]-a).toFixed(3);break;case"m":s=f[1],o=f[2];default:for(var g=1,d=f.length;d>g;g++)h[g]=+(f[g]-(g%2?i:a)).toFixed(3)}else{h=r[c]=[],"m"==f[0]&&(s=f[1]+i,o=f[2]+a);for(var p=0,v=f.length;v>p;p++)r[c][p]=f[p]}var m=r[c].length;switch(r[c][0]){case"z":i=s,a=o;break;case"h":i+=+r[c][m-1];break;case"v":a+=+r[c][m-1];break;default:i+=+r[c][m-2],a+=+r[c][m-1]}}return r.toString=n._path2string,e.rel=Le(r),r},Me=n._pathToAbsolute=function(t){var e=Ie(t);if(e.abs)return Le(e.abs);if(n.is(t,$)&&n.is(t&&t[0],$)||(t=n.parsePathString(t)),!t||!t.length)return[["M",0,0]];var r=[],i=0,a=0,s=0,o=0,l=0;"M"==t[0][0]&&(i=+t[0][1],a=+t[0][2],s=i,o=a,l++,r[0]=["M",i,a]);for(var u,h,f=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),g=l,d=t.length;d>g;g++){if(r.push(u=[]),h=t[g],h[0]!=re.call(h[0]))switch(u[0]=re.call(h[0]),u[0]){case"A":u[1]=h[1],u[2]=h[2],u[3]=h[3],u[4]=h[4],u[5]=h[5],u[6]=+(h[6]+i),u[7]=+(h[7]+a);break;case"V":u[1]=+h[1]+a;break;case"H":u[1]=+h[1]+i;break;case"R":for(var p=[i,a][M](h.slice(1)),v=2,m=p.length;m>v;v++)p[v]=+p[v]+i,p[++v]=+p[v]+a;r.pop(),r=r[M](c(p,f));break;case"M":s=+h[1]+i,o=+h[2]+a;default:for(v=1,m=h.length;m>v;v++)u[v]=+h[v]+(v%2?i:a)}else if("R"==h[0])p=[i,a][M](h.slice(1)),r.pop(),r=r[M](c(p,f)),u=["R"][M](h.slice(-2));else for(var x=0,y=h.length;y>x;x++)u[x]=h[x];switch(u[0]){case"Z":i=s,a=o;break;case"H":i=u[1];break;case"V":a=u[1];break;case"M":s=u[u.length-2],o=u[u.length-1];default:i=u[u.length-2],a=u[u.length-1]}}return r.toString=n._path2string,e.abs=Le(r),r},Re=function(t,e,n,r){return[t,e,n,r,n,r]},Oe=function(t,e,n,r,i,a){var s=1/3,o=2/3;return[s*t+o*n,s*e+o*r,s*i+o*n,s*a+o*r,i,a]},Ne=function(t,e,n,r,i,a,o,l,c,u){var h,f=120*W/180,g=W/180*(+i||0),d=[],p=s(function(t,e,n){var r=t*V.cos(n)-e*V.sin(n),i=t*V.sin(n)+e*V.cos(n);return{x:r,y:i}});if(u)C=u[0],S=u[1],k=u[2],w=u[3];else{h=p(t,e,-g),t=h.x,e=h.y,h=p(l,c,-g),l=h.x,c=h.y;var v=(V.cos(W/180*i),V.sin(W/180*i),(t-l)/2),m=(e-c)/2,x=v*v/(n*n)+m*m/(r*r);x>1&&(x=V.sqrt(x),n=x*n,r=x*r);var y=n*n,b=r*r,_=(a==o?-1:1)*V.sqrt(Y((y*b-y*m*m-b*v*v)/(y*m*m+b*v*v))),k=_*n*m/r+(t+l)/2,w=_*-r*v/n+(e+c)/2,C=V.asin(((e-w)/r).toFixed(9)),S=V.asin(((c-w)/r).toFixed(9));C=k>t?W-C:C,S=k>l?W-S:S,0>C&&(C=2*W+C),0>S&&(S=2*W+S),o&&C>S&&(C-=2*W),!o&&S>C&&(S-=2*W)}var A=S-C;if(Y(A)>f){var T=S,I=l,P=c;S=C+f*(o&&S>C?1:-1),l=k+n*V.cos(S),c=w+r*V.sin(S),d=Ne(l,c,n,r,i,0,o,I,P,[S,T,k,w])}A=S-C;var L=V.cos(C),B=V.sin(C),R=V.cos(S),O=V.sin(S),N=V.tan(A/4),D=4/3*n*N,E=4/3*r*N,F=[t,e],z=[t+D*B,e-E*L],U=[l+D*O,c-E*R],j=[l,c];if(z[0]=2*F[0]-z[0],z[1]=2*F[1]-z[1],u)return[z,U,j][M](d);d=[z,U,j][M](d).join()[G](",");for(var H=[],q=0,X=d.length;X>q;q++)H[q]=q%2?p(d[q-1],d[q],g).y:p(d[q],d[q+1],g).x;return H},De=function(t,e,n,r,i,a,s,o,l){var c=1-l;return{x:H(c,3)*t+3*H(c,2)*l*n+3*c*l*l*i+H(l,3)*s,y:H(c,3)*e+3*H(c,2)*l*r+3*c*l*l*a+H(l,3)*o}},Ge=s(function(t,e,n,r,i,a,s,o){var l,c=i-2*n+t-(s-2*i+n),u=2*(n-t)-2*(i-n),h=t-n,f=(-u+V.sqrt(u*u-4*c*h))/2/c,g=(-u-V.sqrt(u*u-4*c*h))/2/c,d=[e,o],p=[t,s];return Y(f)>"1e12"&&(f=.5),Y(g)>"1e12"&&(g=.5),f>0&&1>f&&(l=De(t,e,n,r,i,a,s,o,f),p.push(l.x),d.push(l.y)),g>0&&1>g&&(l=De(t,e,n,r,i,a,s,o,g),p.push(l.x),d.push(l.y)),c=a-2*r+e-(o-2*a+r),u=2*(r-e)-2*(a-r),h=e-r,f=(-u+V.sqrt(u*u-4*c*h))/2/c,g=(-u-V.sqrt(u*u-4*c*h))/2/c,Y(f)>"1e12"&&(f=.5),Y(g)>"1e12"&&(g=.5),f>0&&1>f&&(l=De(t,e,n,r,i,a,s,o,f),p.push(l.x),d.push(l.y)),g>0&&1>g&&(l=De(t,e,n,r,i,a,s,o,g),p.push(l.x),d.push(l.y)),{min:{x:j[B](0,p),y:j[B](0,d)},max:{x:U[B](0,p),y:U[B](0,d)}}}),Ee=n._path2curve=s(function(t,e){var n=!e&&Ie(t);if(!e&&n.curve)return Le(n.curve);for(var r=Me(t),i=e&&Me(e),a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=(function(t,e,n){var r,i;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][M](Ne[B](0,[e.x,e.y][M](t.slice(1))));break;case"S":"C"==n||"S"==n?(r=2*e.x-e.bx,i=2*e.y-e.by):(r=e.x,i=e.y),t=["C",r,i][M](t.slice(1));break;case"T":"Q"==n||"T"==n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][M](Oe(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][M](Oe(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][M](Re(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][M](Re(e.x,e.y,t[1],e.y));break;case"V":t=["C"][M](Re(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][M](Re(e.x,e.y,e.X,e.Y))}return t}),l=function(t,e){if(t[e].length>7){t[e].shift();for(var n=t[e];n.length;)t.splice(e++,0,["C"][M](n.splice(0,6)));t.splice(e,1),h=U(r.length,i&&i.length||0)}},c=function(t,e,n,a,s){t&&e&&"M"==t[s][0]&&"M"!=e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),n.bx=0,n.by=0,n.x=t[s][1],n.y=t[s][2],h=U(r.length,i&&i.length||0))},u=0,h=U(r.length,i&&i.length||0);h>u;u++){r[u]=o(r[u],a),l(r,u),i&&(i[u]=o(i[u],s)),i&&l(i,u),c(r,i,a,s,u),c(i,r,s,a,u);var f=r[u],g=i&&i[u],d=f.length,p=i&&g.length;a.x=f[d-2],a.y=f[d-1],a.bx=ee(f[d-4])||a.x,a.by=ee(f[d-3])||a.y,s.bx=i&&(ee(g[p-4])||s.x),s.by=i&&(ee(g[p-3])||s.y),s.x=i&&g[p-2],s.y=i&&g[p-1]}return i||(n.curve=Le(r)),i?[r,i]:r},null,Le),Fe=(n._parseDots=s(function(t){for(var e=[],r=0,i=t.length;i>r;r++){var a={},s=t[r].match(/^([^:]*):?([\d\.]*)/);if(a.color=n.getRGB(s[1]),a.color.error)return null;a.color=a.color.hex,s[2]&&(a.offset=s[2]+"%"),e.push(a)}for(r=1,i=e.length-1;i>r;r++)if(!e[r].offset){for(var o=ee(e[r-1].offset||0),l=0,c=r+1;i>c;c++)if(e[c].offset){l=e[c].offset;break}l||(l=100,c=i),l=ee(l);for(var u=(l-o)/(c-r+1);c>r;r++)o+=u,e[r].offset=o+"%"}return e}),n._tear=function(t,e){t==e.top&&(e.top=t.prev),t==e.bottom&&(e.bottom=t.next),t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next)}),ze=(n._tofront=function(t,e){e.top!==t&&(Fe(t,e),t.next=null,t.prev=e.top,e.top.next=t,e.top=t)},n._toback=function(t,e){e.bottom!==t&&(Fe(t,e),t.next=e.bottom,t.prev=null,e.bottom.prev=t,e.bottom=t)},n._insertafter=function(t,e,n){Fe(t,n),e==n.top&&(n.top=t),e.next&&(e.next.prev=t),t.next=e.next,t.prev=e,e.next=t},n._insertbefore=function(t,e,n){Fe(t,n),e==n.bottom&&(n.bottom=t),e.prev&&(e.prev.next=t),t.prev=e.prev,e.prev=t,t.next=e},n.toMatrix=function(t,e){var n=Pe(t),r={_:{transform:O},getBBox:function(){return n}};return Ve(r,e),r.matrix}),Ve=(n.transformPath=function(t,e){return ye(t,ze(t,e))},n._extractTransform=function(t,e){if(null==e)return t._.transform;e=D(e).replace(/\.{3}|\u2026/g,t._.transform||O);var r=n.parseTransformString(e),i=0,a=0,s=0,o=1,l=1,c=t._,u=new v;if(c.transform=r||[],r)for(var h=0,f=r.length;f>h;h++){var g,d,p,m,x,y=r[h],b=y.length,_=D(y[0]).toLowerCase(),k=y[0]!=_,w=k?u.invert():0;"t"==_&&3==b?k?(g=w.x(0,0),d=w.y(0,0),p=w.x(y[1],y[2]),m=w.y(y[1],y[2]),u.translate(p-g,m-d)):u.translate(y[1],y[2]):"r"==_?2==b?(x=x||t.getBBox(1),u.rotate(y[1],x.x+x.width/2,x.y+x.height/2),i+=y[1]):4==b&&(k?(p=w.x(y[2],y[3]),m=w.y(y[2],y[3]),u.rotate(y[1],p,m)):u.rotate(y[1],y[2],y[3]),i+=y[1]):"s"==_?2==b||3==b?(x=x||t.getBBox(1),u.scale(y[1],y[b-1],x.x+x.width/2,x.y+x.height/2),o*=y[1],l*=y[b-1]):5==b&&(k?(p=w.x(y[3],y[4]),m=w.y(y[3],y[4]),u.scale(y[1],y[2],p,m)):u.scale(y[1],y[2],y[3],y[4]),o*=y[1],l*=y[2]):"m"==_&&7==b&&u.add(y[1],y[2],y[3],y[4],y[5],y[6]),c.dirtyT=1,t.matrix=u}t.matrix=u,c.sx=o,c.sy=l,c.deg=i,c.dx=a=u.e,c.dy=s=u.f,1==o&&1==l&&!i&&c.bbox?(c.bbox.x+=+a,c.bbox.y+=+s):c.dirtyT=1}),Ue=function(t){var e=t[0];switch(e.toLowerCase()){case"t":return[e,0,0];case"m":return[e,1,0,0,1,0,0];case"r":return 4==t.length?[e,0,t[2],t[3]]:[e,0];case"s":return 5==t.length?[e,1,1,t[3],t[4]]:3==t.length?[e,1,1]:[e,1]}},je=n._equaliseTransform=function(t,e){e=D(e).replace(/\.{3}|\u2026/g,t),t=n.parseTransformString(t)||[],e=n.parseTransformString(e)||[];for(var r,i,a,s,o=U(t.length,e.length),l=[],c=[],u=0;o>u;u++){if(a=t[u]||Ue(e[u]),s=e[u]||Ue(a),a[0]!=s[0]||"r"==a[0].toLowerCase()&&(a[2]!=s[2]||a[3]!=s[3])||"s"==a[0].toLowerCase()&&(a[3]!=s[3]||a[4]!=s[4]))return;for(l[u]=[],c[u]=[],r=0,i=U(a.length,s.length);i>r;r++)r in a&&(l[u][r]=a[r]),r in s&&(c[u][r]=s[r])}return{from:l,to:c}};n._getContainer=function(t,e,r,i){var a;return a=null!=i||n.is(t,"object")?t:I.doc.getElementById(t),null!=a?a.tagName?null==e?{container:a,width:a.style.pixelWidth||a.offsetWidth,height:a.style.pixelHeight||a.offsetHeight}:{container:a,width:e,height:r}:{container:1,x:t,y:e,width:r,height:i}:void 0},n.pathToRelative=Be,n._engine={},n.path2curve=Ee,n.matrix=function(t,e,n,r,i,a){return new v(t,e,n,r,i,a)},function(t){function e(t){return t[0]*t[0]+t[1]*t[1]}function r(t){var n=V.sqrt(e(t));t[0]&&(t[0]/=n),t[1]&&(t[1]/=n)}t.add=function(t,e,n,r,i,a){var s,o,l,c,u=[[],[],[]],h=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],f=[[t,n,i],[e,r,a],[0,0,1]];for(t&&t instanceof v&&(f=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),s=0;3>s;s++)for(o=0;3>o;o++){for(c=0,l=0;3>l;l++)c+=h[s][l]*f[l][o];u[s][o]=c}this.a=u[0][0],this.b=u[1][0],this.c=u[0][1],this.d=u[1][1],this.e=u[0][2],this.f=u[1][2]},t.invert=function(){var t=this,e=t.a*t.d-t.b*t.c;return new v(t.d/e,-t.b/e,-t.c/e,t.a/e,(t.c*t.f-t.d*t.e)/e,(t.b*t.e-t.a*t.f)/e)},t.clone=function(){return new v(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(t,e){this.add(1,0,0,1,t,e)},t.scale=function(t,e,n,r){null==e&&(e=t),(n||r)&&this.add(1,0,0,1,n,r),this.add(t,0,0,e,0,0),(n||r)&&this.add(1,0,0,1,-n,-r)},t.rotate=function(t,e,r){t=n.rad(t),e=e||0,r=r||0;var i=+V.cos(t).toFixed(9),a=+V.sin(t).toFixed(9);this.add(i,a,-a,i,e,r),this.add(1,0,0,1,-e,-r)},t.x=function(t,e){return t*this.a+e*this.c+this.e},t.y=function(t,e){return t*this.b+e*this.d+this.f},t.get=function(t){return+this[D.fromCharCode(97+t)].toFixed(4)},t.toString=function(){return n.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},t.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},t.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},t.split=function(){var t={};t.dx=this.e,t.dy=this.f;var i=[[this.a,this.c],[this.b,this.d]];t.scalex=V.sqrt(e(i[0])),r(i[0]),t.shear=i[0][0]*i[1][0]+i[0][1]*i[1][1],i[1]=[i[1][0]-i[0][0]*t.shear,i[1][1]-i[0][1]*t.shear],t.scaley=V.sqrt(e(i[1])),r(i[1]),t.shear/=t.scaley;var a=-i[0][1],s=i[1][1];return 0>s?(t.rotate=n.deg(V.acos(s)),0>a&&(t.rotate=360-t.rotate)):t.rotate=n.deg(V.asin(a)),t.isSimple=!(+t.shear.toFixed(9)||t.scalex.toFixed(9)!=t.scaley.toFixed(9)&&t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t},t.toTransformString=function(t){var e=t||this[G]();return e.isSimple?(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[e.dx,e.dy]:O)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:O)+(e.rotate?"r"+[e.rotate,0,0]:O)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(v.prototype);var Ye=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);w.safari="Apple Computer, Inc."==navigator.vendor&&(Ye&&Ye[1]<4||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&Ye&&Ye[1]<8?function(){var t=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){t.remove()})}:de;for(var He=function(){this.returnValue=!1},We=function(){return this.originalEvent.preventDefault()},qe=function(){this.cancelBubble=!0},Xe=function(){return this.originalEvent.stopPropagation()},$e=function(t){var e=I.doc.documentElement.scrollTop||I.doc.body.scrollTop,n=I.doc.documentElement.scrollLeft||I.doc.body.scrollLeft;return{x:t.clientX+n,y:t.clientY+e}},Ze=function(){return I.doc.addEventListener?function(t,e,n,r){var i=function(t){var e=$e(t);return n.call(r,t,e.x,e.y)};if(t.addEventListener(e,i,!1),R&&F[e]){var a=function(e){for(var i=$e(e),a=e,s=0,o=e.targetTouches&&e.targetTouches.length;o>s;s++)if(e.targetTouches[s].target==t){e=e.targetTouches[s],e.originalEvent=a,e.preventDefault=We,e.stopPropagation=Xe;break}return n.call(r,e,i.x,i.y)};t.addEventListener(F[e],a,!1)}return function(){return t.removeEventListener(e,i,!1),R&&F[e]&&t.removeEventListener(F[e],i,!1),!0}}:I.doc.attachEvent?function(t,e,n,r){var i=function(t){t=t||I.win.event;var e=I.doc.documentElement.scrollTop||I.doc.body.scrollTop,i=I.doc.documentElement.scrollLeft||I.doc.body.scrollLeft,a=t.clientX+i,s=t.clientY+e;return t.preventDefault=t.preventDefault||He,t.stopPropagation=t.stopPropagation||qe,n.call(r,t,a,s)};t.attachEvent("on"+e,i);var a=function(){return t.detachEvent("on"+e,i),!0};return a}:void 0}(),Je=[],Qe=function(t){for(var n,r=t.clientX,i=t.clientY,a=I.doc.documentElement.scrollTop||I.doc.body.scrollTop,s=I.doc.documentElement.scrollLeft||I.doc.body.scrollLeft,o=Je.length;o--;){if(n=Je[o],R&&t.touches){for(var l,c=t.touches.length;c--;)if(l=t.touches[c],l.identifier==n.el._drag.id){r=l.clientX,i=l.clientY,(t.originalEvent?t.originalEvent:t).preventDefault();break}}else t.preventDefault();var u,h=n.el.node,f=h.nextSibling,g=h.parentNode,d=h.style.display;I.win.opera&&g.removeChild(h),h.style.display="none",u=n.el.paper.getElementByPoint(r,i),h.style.display=d,I.win.opera&&(f?g.insertBefore(h,f):g.appendChild(h)),u&&e("raphael.drag.over."+n.el.id,n.el,u),r+=s,i+=a,e("raphael.drag.move."+n.el.id,n.move_scope||n.el,r-n.el._drag.x,i-n.el._drag.y,r,i,t)}},Ke=function(t){n.unmousemove(Qe).unmouseup(Ke);for(var r,i=Je.length;i--;)r=Je[i],r.el._drag={},e("raphael.drag.end."+r.el.id,r.end_scope||r.start_scope||r.move_scope||r.el,t);Je=[]},tn=n.el={},en=E.length;en--;)!function(t){n[t]=tn[t]=function(e,r){return n.is(e,"function")&&(this.events=this.events||[],this.events.push({name:t,f:e,unbind:Ze(this.shape||this.node||I.doc,t,e,r||this)})),this},n["un"+t]=tn["un"+t]=function(e){for(var r=this.events||[],i=r.length;i--;)r[i].name!=t||!n.is(e,"undefined")&&r[i].f!=e||(r[i].unbind(),r.splice(i,1),!r.length&&delete this.events);return this}}(E[en]);tn.data=function(t,r){var i=fe[this.id]=fe[this.id]||{};if(0==arguments.length)return i;if(1==arguments.length){if(n.is(t,"object")){for(var a in t)t[T](a)&&this.data(a,t[a]);return this}return e("raphael.data.get."+this.id,this,i[t],t),i[t]}return i[t]=r,e("raphael.data.set."+this.id,this,r,t),this},tn.removeData=function(t){return null==t?fe[this.id]={}:fe[this.id]&&delete fe[this.id][t],this},tn.getData=function(){return i(fe[this.id]||{})},tn.hover=function(t,e,n,r){return this.mouseover(t,n).mouseout(e,r||n)},tn.unhover=function(t,e){return this.unmouseover(t).unmouseout(e)};var nn=[];tn.drag=function(t,r,i,a,s,o){function l(l){(l.originalEvent||l).preventDefault();var c=l.clientX,u=l.clientY,h=I.doc.documentElement.scrollTop||I.doc.body.scrollTop,f=I.doc.documentElement.scrollLeft||I.doc.body.scrollLeft;if(this._drag.id=l.identifier,R&&l.touches)for(var g,d=l.touches.length;d--;)if(g=l.touches[d],this._drag.id=g.identifier,g.identifier==this._drag.id){c=g.clientX,u=g.clientY;break}this._drag.x=c+f,this._drag.y=u+h,!Je.length&&n.mousemove(Qe).mouseup(Ke),Je.push({el:this,move_scope:a,start_scope:s,end_scope:o}),r&&e.on("raphael.drag.start."+this.id,r),t&&e.on("raphael.drag.move."+this.id,t),i&&e.on("raphael.drag.end."+this.id,i),e("raphael.drag.start."+this.id,s||a||this,l.clientX+f,l.clientY+h,l)}return this._drag={},nn.push({el:this,start:l}),this.mousedown(l),this},tn.onDragOver=function(t){t?e.on("raphael.drag.over."+this.id,t):e.unbind("raphael.drag.over."+this.id)},tn.undrag=function(){for(var t=nn.length;t--;)nn[t].el==this&&(this.unmousedown(nn[t].start),nn.splice(t,1),e.unbind("raphael.drag.*."+this.id));!nn.length&&n.unmousemove(Qe).unmouseup(Ke),Je=[]},w.circle=function(t,e,r){var i=n._engine.circle(this,t||0,e||0,r||0);return this.__set__&&this.__set__.push(i),i},w.rect=function(t,e,r,i,a){var s=n._engine.rect(this,t||0,e||0,r||0,i||0,a||0);return this.__set__&&this.__set__.push(s),s},w.ellipse=function(t,e,r,i){var a=n._engine.ellipse(this,t||0,e||0,r||0,i||0);return this.__set__&&this.__set__.push(a),a},w.path=function(t){t&&!n.is(t,X)&&!n.is(t[0],$)&&(t+=O);var e=n._engine.path(n.format[B](n,arguments),this);return this.__set__&&this.__set__.push(e),e},w.image=function(t,e,r,i,a){var s=n._engine.image(this,t||"about:blank",e||0,r||0,i||0,a||0);return this.__set__&&this.__set__.push(s),s},w.text=function(t,e,r){var i=n._engine.text(this,t||0,e||0,D(r));return this.__set__&&this.__set__.push(i),i},w.set=function(t){!n.is(t,"array")&&(t=Array.prototype.splice.call(arguments,0,arguments.length));var e=new pn(t);return this.__set__&&this.__set__.push(e),e.paper=this,e.type="set",e},w.setStart=function(t){this.__set__=t||this.set()},w.setFinish=function(){var t=this.__set__;return delete this.__set__,t},w.setSize=function(t,e){return n._engine.setSize.call(this,t,e)},w.setViewBox=function(t,e,r,i,a){return n._engine.setViewBox.call(this,t,e,r,i,a)},w.top=w.bottom=null,w.raphael=n;var rn=function(t){var e=t.getBoundingClientRect(),n=t.ownerDocument,r=n.body,i=n.documentElement,a=i.clientTop||r.clientTop||0,s=i.clientLeft||r.clientLeft||0,o=e.top+(I.win.pageYOffset||i.scrollTop||r.scrollTop)-a,l=e.left+(I.win.pageXOffset||i.scrollLeft||r.scrollLeft)-s;return{y:o,x:l}};w.getElementByPoint=function(t,e){var n=this,r=n.canvas,i=I.doc.elementFromPoint(t,e);if(I.win.opera&&"svg"==i.tagName){var a=rn(r),s=r.createSVGRect();s.x=t-a.x,s.y=e-a.y,s.width=s.height=1;var o=r.getIntersectionList(s,null);o.length&&(i=o[o.length-1])}if(!i)return null;for(;i.parentNode&&i!=r.parentNode&&!i.raphael;)i=i.parentNode;return i==n.canvas.parentNode&&(i=r),i=i&&i.raphael?n.getById(i.raphaelid):null},w.getElementsByBBox=function(t){var e=this.set();return this.forEach(function(r){n.isBBoxIntersect(r.getBBox(),t)&&e.push(r)}),e},w.getById=function(t){for(var e=this.bottom;e;){if(e.id==t)return e;e=e.next}return null},w.forEach=function(t,e){for(var n=this.bottom;n;){if(t.call(e,n)===!1)return this;n=n.next}return this},w.getElementsByPoint=function(t,e){var n=this.set();return this.forEach(function(r){r.isPointInside(t,e)&&n.push(r)}),n},tn.isPointInside=function(t,e){var r=this.realPath=xe[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(r=n.transformPath(r,this.attr("transform"))),n.isPointInsidePath(r,t,e)},tn.getBBox=function(t){if(this.removed)return{};var e=this._;return t?((e.dirty||!e.bboxwt)&&(this.realPath=xe[this.type](this),e.bboxwt=Pe(this.realPath),e.bboxwt.toString=m,e.dirty=0),e.bboxwt):((e.dirty||e.dirtyT||!e.bbox)&&((e.dirty||!this.realPath)&&(e.bboxwt=0,this.realPath=xe[this.type](this)),e.bbox=Pe(ye(this.realPath,this.matrix)),e.bbox.toString=m,e.dirty=e.dirtyT=0),e.bbox)},tn.clone=function(){if(this.removed)return null;var t=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(t),t},tn.glow=function(t){if("text"==this.type)return null;t=t||{};var e={width:(t.width||10)+(+this.attr("stroke-width")||1),fill:t.fill||!1,opacity:t.opacity||.5,offsetx:t.offsetx||0,offsety:t.offsety||0,color:t.color||"#000"},n=e.width/2,r=this.paper,i=r.set(),a=this.realPath||xe[this.type](this);a=this.matrix?ye(a,this.matrix):a;for(var s=1;n+1>s;s++)i.push(r.path(a).attr({stroke:e.color,fill:e.fill?e.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width/n*s).toFixed(3),opacity:+(e.opacity/n).toFixed(3)}));return i.insertBefore(this).translate(e.offsetx,e.offsety)};var an=function(t,e,r,i,a,s,o,l,c){return null==c?h(t,e,r,i,a,s,o,l):n.findDotsAtSegment(t,e,r,i,a,s,o,l,f(t,e,r,i,a,s,o,l,c))},sn=function(t,e){return function(r,i,a){r=Ee(r);for(var s,o,l,c,u,h="",f={},g=0,d=0,p=r.length;p>d;d++){if(l=r[d],"M"==l[0])s=+l[1],o=+l[2];else{if(c=an(s,o,l[1],l[2],l[3],l[4],l[5],l[6]),g+c>i){if(e&&!f.start){if(u=an(s,o,l[1],l[2],l[3],l[4],l[5],l[6],i-g),h+=["C"+u.start.x,u.start.y,u.m.x,u.m.y,u.x,u.y],a)return h;f.start=h,h=["M"+u.x,u.y+"C"+u.n.x,u.n.y,u.end.x,u.end.y,l[5],l[6]].join(),g+=c,s=+l[5],o=+l[6];continue}if(!t&&!e)return u=an(s,o,l[1],l[2],l[3],l[4],l[5],l[6],i-g),{x:u.x,y:u.y,alpha:u.alpha}}g+=c,s=+l[5],o=+l[6]}h+=l.shift()+l}return f.end=h,u=t?g:e?f:n.findDotsAtSegment(s,o,l[0],l[1],l[2],l[3],l[4],l[5],1),u.alpha&&(u={x:u.x,y:u.y,alpha:u.alpha}),u}},on=sn(1),ln=sn(),cn=sn(0,1);n.getTotalLength=on,n.getPointAtLength=ln,n.getSubpath=function(t,e,n){if(this.getTotalLength(t)-n<1e-6)return cn(t,e).end;var r=cn(t,n,1);return e?cn(r,e).end:r},tn.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():on(t)},tn.getPointAtLength=function(t){var e=this.getPath();if(e)return ln(e,t)},tn.getPath=function(){var t,e=n._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return e&&(t=e(this)),t},tn.getSubpath=function(t,e){var r=this.getPath();if(r)return n.getSubpath(r,t,e)};var un=n.easing_formulas={linear:function(t){return t},"<":function(t){return H(t,1.7)},">":function(t){return H(t,.48)},"<>":function(t){var e=.48-t/1.04,n=V.sqrt(.1734+e*e),r=n-e,i=H(Y(r),1/3)*(0>r?-1:1),a=-n-e,s=H(Y(a),1/3)*(0>a?-1:1),o=i+s+.5;return 3*(1-o)*o*o+o*o*o},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:H(2,-10*t)*V.sin(2*(t-.075)*W/.3)+1},bounce:function(t){var e,n=7.5625,r=2.75;return 1/r>t?e=n*t*t:2/r>t?(t-=1.5/r,e=n*t*t+.75):2.5/r>t?(t-=2.25/r,e=n*t*t+.9375):(t-=2.625/r,e=n*t*t+.984375),e}};un.easeIn=un["ease-in"]=un["<"],un.easeOut=un["ease-out"]=un[">"],un.easeInOut=un["ease-in-out"]=un["<>"],un["back-in"]=un.backIn,un["back-out"]=un.backOut;var hn=[],fn=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(t){setTimeout(t,16)},gn=function(){for(var t=+new Date,r=0;r<hn.length;r++){var i=hn[r];if(!i.el.removed&&!i.paused){var a,s,o=t-i.start,l=i.ms,c=i.easing,u=i.from,h=i.diff,f=i.to,g=(i.t,i.el),d={},p={};if(i.initstatus?(o=(i.initstatus*i.anim.top-i.prev)/(i.percent-i.prev)*l,i.status=i.initstatus,delete i.initstatus,i.stop&&hn.splice(r--,1)):i.status=(i.prev+(i.percent-i.prev)*(o/l))/i.anim.top,!(0>o))if(l>o){var v=c(o/l);for(var m in u)if(u[T](m)){switch(ae[m]){case q:a=+u[m]+v*l*h[m];break;case"colour":a="rgb("+[dn(te(u[m].r+v*l*h[m].r)),dn(te(u[m].g+v*l*h[m].g)),dn(te(u[m].b+v*l*h[m].b))].join(",")+")";break;case"path":a=[];for(var x=0,y=u[m].length;y>x;x++){a[x]=[u[m][x][0]];for(var _=1,k=u[m][x].length;k>_;_++)a[x][_]=+u[m][x][_]+v*l*h[m][x][_];a[x]=a[x].join(N)}a=a.join(N);break;case"transform":if(h[m].real)for(a=[],x=0,y=u[m].length;y>x;x++)for(a[x]=[u[m][x][0]],_=1,k=u[m][x].length;k>_;_++)a[x][_]=u[m][x][_]+v*l*h[m][x][_];else{var w=function(t){return+u[m][t]+v*l*h[m][t]};a=[["m",w(0),w(1),w(2),w(3),w(4),w(5)]]}break;case"csv":if("clip-rect"==m)for(a=[],x=4;x--;)a[x]=+u[m][x]+v*l*h[m][x];else if("clip-circle"==m)for(a=[],x=3;x--;)a[x]=+u[m][x]+v*l*h[m][x];else if("clip-angle"==m)for(a=[],x=4;x--;)a[x]=+u[m][x]+v*l*h[m][x];break;default:var C=[][M](u[m]);for(a=[],x=g.paper.customAttributes[m].length;x--;)a[x]=+C[x]+v*l*h[m][x]}d[m]=a}g.attr(d),function(t,n,r){setTimeout(function(){e("raphael.anim.frame."+t,n,r)})}(g.id,g,i.anim)}else{if(function(t,r,i){setTimeout(function(){e("raphael.anim.frame."+r.id,r,i),e("raphael.anim.finish."+r.id,r,i),n.is(t,"function")&&t.call(r)})}(i.callback,g,i.anim),g.attr(f),hn.splice(r--,1),i.repeat>1&&!i.next){for(s in f)f[T](s)&&(p[s]=i.totalOrigin[s]);i.el.attr(p),b(i.anim,i.el,i.anim.percents[0],null,i.totalOrigin,i.repeat-1)}i.next&&!i.stop&&b(i.anim,i.el,i.next,null,i.totalOrigin,i.repeat)}}}n.svg&&g&&g.paper&&g.paper.safari(),hn.length&&fn(gn)},dn=function(t){return t>255?255:0>t?0:t};tn.animateWith=function(t,e,r,i,a,s){var o=this;if(o.removed)return s&&s.call(o),o;var l=r instanceof y?r:n.animation(r,i,a,s);b(l,o,l.percents[0],null,o.attr());for(var c=0,u=hn.length;u>c;c++)if(hn[c].anim==e&&hn[c].el==t){hn[u-1].start=hn[c].start;break}return o},tn.onAnimation=function(t){return t?e.on("raphael.anim.frame."+this.id,t):e.unbind("raphael.anim.frame."+this.id),this},y.prototype.delay=function(t){var e=new y(this.anim,this.ms);return e.times=this.times,e.del=+t||0,e},y.prototype.repeat=function(t){var e=new y(this.anim,this.ms);return e.del=this.del,e.times=V.floor(U(t,0))||1,e},n.animation=function(t,e,r,i){if(t instanceof y)return t;(n.is(r,"function")||!r)&&(i=i||r||null,r=null),t=Object(t),e=+e||0;var a,s,o={};for(s in t)t[T](s)&&ee(s)!=s&&ee(s)+"%"!=s&&(a=!0,o[s]=t[s]);return a?(r&&(o.easing=r),i&&(o.callback=i),new y({100:o},e)):new y(t,e)},tn.animate=function(t,e,r,i){var a=this;if(a.removed)return i&&i.call(a),a;var s=t instanceof y?t:n.animation(t,e,r,i);return b(s,a,s.percents[0],null,a.attr()),a},tn.setTime=function(t,e){return t&&null!=e&&this.status(t,j(e,t.ms)/t.ms),this},tn.status=function(t,e){var n,r,i=[],a=0;if(null!=e)return b(t,this,-1,j(e,1)),this;for(n=hn.length;n>a;a++)if(r=hn[a],r.el.id==this.id&&(!t||r.anim==t)){if(t)return r.status;i.push({anim:r.anim,status:r.status})}return t?0:i},tn.pause=function(t){for(var n=0;n<hn.length;n++)hn[n].el.id!=this.id||t&&hn[n].anim!=t||e("raphael.anim.pause."+this.id,this,hn[n].anim)!==!1&&(hn[n].paused=!0);return this},tn.resume=function(t){for(var n=0;n<hn.length;n++)if(hn[n].el.id==this.id&&(!t||hn[n].anim==t)){var r=hn[n];e("raphael.anim.resume."+this.id,this,r.anim)!==!1&&(delete r.paused,this.status(r.anim,r.status))}return this},tn.stop=function(t){for(var n=0;n<hn.length;n++)hn[n].el.id!=this.id||t&&hn[n].anim!=t||e("raphael.anim.stop."+this.id,this,hn[n].anim)!==!1&&hn.splice(n--,1);return this},e.on("raphael.remove",_),e.on("raphael.clear",_),tn.toString=function(){return"Rapha\xebl\u2019s object"};var pn=function(t){if(this.items=[],this.length=0,this.type="set",t)for(var e=0,n=t.length;n>e;e++)!t[e]||t[e].constructor!=tn.constructor&&t[e].constructor!=pn||(this[this.items.length]=this.items[this.items.length]=t[e],this.length++)},vn=pn.prototype;vn.push=function(){for(var t,e,n=0,r=arguments.length;r>n;n++)t=arguments[n],!t||t.constructor!=tn.constructor&&t.constructor!=pn||(e=this.items.length,this[e]=this.items[e]=t,this.length++);return this},vn.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},vn.forEach=function(t,e){for(var n=0,r=this.items.length;r>n;n++)if(t.call(e,this.items[n],n)===!1)return this;return this};for(var mn in tn)tn[T](mn)&&(vn[mn]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t][B](n,e)})}}(mn));return vn.attr=function(t,e){if(t&&n.is(t,$)&&n.is(t[0],"object"))for(var r=0,i=t.length;i>r;r++)this.items[r].attr(t[r]);else for(var a=0,s=this.items.length;s>a;a++)this.items[a].attr(t,e);return this},vn.clear=function(){for(;this.length;)this.pop()},vn.splice=function(t,e){t=0>t?U(this.length+t,0):t,e=U(0,j(this.length-t,e));var n,r=[],i=[],a=[];for(n=2;n<arguments.length;n++)a.push(arguments[n]);for(n=0;e>n;n++)i.push(this[t+n]);for(;n<this.length-t;n++)r.push(this[t+n]);var s=a.length;for(n=0;n<s+r.length;n++)this.items[t+n]=this[t+n]=s>n?a[n]:r[n-s];for(n=this.items.length=this.length-=e-s;this[n];)delete this[n++];return new pn(i)},vn.exclude=function(t){for(var e=0,n=this.length;n>e;e++)if(this[e]==t)return this.splice(e,1),!0},vn.animate=function(t,e,r,i){(n.is(r,"function")||!r)&&(i=r||null);var a,s,o=this.items.length,l=o,c=this;if(!o)return this;i&&(s=function(){!--o&&i.call(c)}),r=n.is(r,X)?r:s;var u=n.animation(t,e,r,s);for(a=this.items[--l].animate(u);l--;)this.items[l]&&!this.items[l].removed&&this.items[l].animateWith(a,u,u),this.items[l]&&!this.items[l].removed||o--;return this},vn.insertAfter=function(t){for(var e=this.items.length;e--;)this.items[e].insertAfter(t);return this},vn.getBBox=function(){for(var t=[],e=[],n=[],r=[],i=this.items.length;i--;)if(!this.items[i].removed){var a=this.items[i].getBBox();t.push(a.x),e.push(a.y),n.push(a.x+a.width),r.push(a.y+a.height)}return t=j[B](0,t),e=j[B](0,e),n=U[B](0,n),r=U[B](0,r),{x:t,y:e,x2:n,y2:r,width:n-t,height:r-e}},vn.clone=function(t){t=this.paper.set();for(var e=0,n=this.items.length;n>e;e++)t.push(this.items[e].clone());return t},vn.toString=function(){return"Rapha\xebl\u2018s set"},vn.glow=function(t){var e=this.paper.set();return this.forEach(function(n){var r=n.glow(t);null!=r&&r.forEach(function(t){e.push(t)})}),e},vn.isPointInside=function(t,e){var n=!1;return this.forEach(function(r){return r.isPointInside(t,e)?(n=!0,!1):void 0}),n},n.registerFont=function(t){if(!t.face)return t;this.fonts=this.fonts||{};var e={w:t.w,face:{},glyphs:{}},n=t.face["font-family"];for(var r in t.face)t.face[T](r)&&(e.face[r]=t.face[r]);if(this.fonts[n]?this.fonts[n].push(e):this.fonts[n]=[e],!t.svg){e.face["units-per-em"]=ne(t.face["units-per-em"],10);for(var i in t.glyphs)if(t.glyphs[T](i)){var a=t.glyphs[i];if(e.glyphs[i]={w:a.w,k:{},d:a.d&&"M"+a.d.replace(/[mlcxtrv]/g,function(t){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[t]||"M"})+"z"},a.k)for(var s in a.k)a[T](s)&&(e.glyphs[i].k[s]=a.k[s])}}return t},w.getFont=function(t,e,r,i){if(i=i||"normal",r=r||"normal",e=+e||{normal:400,bold:700,lighter:300,bolder:800}[e]||400,n.fonts){var a=n.fonts[t];
if(!a){var s=new RegExp("(^|\\s)"+t.replace(/[^\w\d\s+!~.:_-]/g,O)+"(\\s|$)","i");for(var o in n.fonts)if(n.fonts[T](o)&&s.test(o)){a=n.fonts[o];break}}var l;if(a)for(var c=0,u=a.length;u>c&&(l=a[c],l.face["font-weight"]!=e||l.face["font-style"]!=r&&l.face["font-style"]||l.face["font-stretch"]!=i);c++);return l}},w.print=function(t,e,r,i,a,s,o,l){s=s||"middle",o=U(j(o||0,1),-1),l=U(j(l||1,3),1);var c,u=D(r)[G](O),h=0,f=0,g=O;if(n.is(i,"string")&&(i=this.getFont(i)),i){c=(a||16)/i.face["units-per-em"];for(var d=i.face.bbox[G](C),p=+d[0],v=d[3]-d[1],m=0,x=+d[1]+("baseline"==s?v+ +i.face.descent:v/2),y=0,b=u.length;b>y;y++){if("\n"==u[y])h=0,k=0,f=0,m+=v*l;else{var _=f&&i.glyphs[u[y-1]]||{},k=i.glyphs[u[y]];h+=f?(_.w||i.w)+(_.k&&_.k[u[y]]||0)+i.w*o:0,f=1}k&&k.d&&(g+=n.transformPath(k.d,["t",h*c,m*c,"s",c,c,p,x,"t",(t-p)/c,(e-x)/c]))}}return this.path(g).attr({fill:"#000",stroke:"none"})},w.add=function(t){if(n.is(t,"array"))for(var e,r=this.set(),i=0,a=t.length;a>i;i++)e=t[i]||{},S[T](e.type)&&r.push(this[e.type]().attr(e));return r},n.format=function(t,e){var r=n.is(e,$)?[0][M](e):arguments;return t&&n.is(t,X)&&r.length-1&&(t=t.replace(A,function(t,e){return null==r[++e]?O:r[e]})),t||O},n.fullfill=function(){var t=/\{([^\}]+)\}/g,e=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,n=function(t,n,r){var i=r;return n.replace(e,function(t,e,n,r,a){e=e||r,i&&(e in i&&(i=i[e]),"function"==typeof i&&a&&(i=i()))}),i=(null==i||i==r?t:i)+""};return function(e,r){return String(e).replace(t,function(t,e){return n(t,e,r)})}}(),n.ninja=function(){return P.was?I.win.Raphael=P.is:delete Raphael,n},n.st=vn,function(t,e,r){function i(){/in/.test(t.readyState)?setTimeout(i,9):n.eve("raphael.DOMload")}null==t.readyState&&t.addEventListener&&(t.addEventListener(e,r=function(){t.removeEventListener(e,r,!1),t.readyState="complete"},!1),t.readyState="loading"),i()}(document,"DOMContentLoaded"),e.on("raphael.DOMload",function(){k=!0}),P.was?I.win.Raphael=n:Raphael=n,n}),t=Raphael}(),s=function(){window.Raphael&&window.Raphael.svg&&function(t){var e="hasOwnProperty",n=String,r=parseFloat,i=parseInt,a=Math,s=a.max,o=a.abs,l=a.pow,c=/[, ]+/,u=t.eve,h="",f=" ",g="http://www.w3.org/1999/xlink",d={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},p={};t.toString=function(){return"Your browser supports SVG.\nYou are running Rapha\xebl "+this.version};var v=function(r,i){if(i){"string"==typeof r&&(r=v(r));for(var a in i)i[e](a)&&("xlink:"==a.substring(0,6)?r.setAttributeNS(g,a.substring(6),n(i[a])):r.setAttribute(a,n(i[a])))}else r=t._g.doc.createElementNS("http://www.w3.org/2000/svg",r),r.style&&(r.style.webkitTapHighlightColor="rgba(0,0,0,0)");return r},m=function(e,i){var c="linear",u=e.id+i,f=.5,g=.5,d=e.node,p=e.paper,m=d.style,x=t._g.doc.getElementById(u);if(!x){if(i=n(i).replace(t._radial_gradient,function(t,e,n){if(c="radial",e&&n){f=r(e),g=r(n);var i=2*(g>.5)-1;l(f-.5,2)+l(g-.5,2)>.25&&(g=a.sqrt(.25-l(f-.5,2))*i+.5)&&.5!=g&&(g=g.toFixed(5)-1e-5*i)}return h}),i=i.split(/\s*\-\s*/),"linear"==c){var y=i.shift();if(y=-r(y),isNaN(y))return null;var b=[0,0,a.cos(t.rad(y)),a.sin(t.rad(y))],_=1/(s(o(b[2]),o(b[3]))||1);b[2]*=_,b[3]*=_,b[2]<0&&(b[0]=-b[2],b[2]=0),b[3]<0&&(b[1]=-b[3],b[3]=0)}var k=t._parseDots(i);if(!k)return null;if(u=u.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&u!=e.gradient.id&&(p.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){x=v(c+"Gradient",{id:u}),e.gradient=x,v(x,"radial"==c?{fx:f,fy:g}:{x1:b[0],y1:b[1],x2:b[2],y2:b[3],gradientTransform:e.matrix.invert()}),p.defs.appendChild(x);for(var w=0,C=k.length;C>w;w++)x.appendChild(v("stop",{offset:k[w].offset?k[w].offset:w?"100%":"0%","stop-color":k[w].color||"#fff"}))}}return v(d,{fill:"url(#"+u+")",opacity:1,"fill-opacity":1}),m.fill=h,m.opacity=1,m.fillOpacity=1,1},x=function(t){var e=t.getBBox(1);v(t.pattern,{patternTransform:t.matrix.invert()+" translate("+e.x+","+e.y+")"})},y=function(r,i,a){if("path"==r.type){for(var s,o,l,c,u,f=n(i).toLowerCase().split("-"),g=r.paper,m=a?"end":"start",x=r.node,y=r.attrs,b=y["stroke-width"],_=f.length,k="classic",w=3,C=3,S=5;_--;)switch(f[_]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":k=f[_];break;case"wide":C=5;break;case"narrow":C=2;break;case"long":w=5;break;case"short":w=2}if("open"==k?(w+=2,C+=2,S+=2,l=1,c=a?4:1,u={fill:"none",stroke:y.stroke}):(c=l=w/2,u={fill:y.stroke,stroke:"none"}),r._.arrows?a?(r._.arrows.endPath&&p[r._.arrows.endPath]--,r._.arrows.endMarker&&p[r._.arrows.endMarker]--):(r._.arrows.startPath&&p[r._.arrows.startPath]--,r._.arrows.startMarker&&p[r._.arrows.startMarker]--):r._.arrows={},"none"!=k){var A="raphael-marker-"+k,T="raphael-marker-"+m+k+w+C;t._g.doc.getElementById(A)?p[A]++:(g.defs.appendChild(v(v("path"),{"stroke-linecap":"round",d:d[k],id:A})),p[A]=1);var I,P=t._g.doc.getElementById(T);P?(p[T]++,I=P.getElementsByTagName("use")[0]):(P=v(v("marker"),{id:T,markerHeight:C,markerWidth:w,orient:"auto",refX:c,refY:C/2}),I=v(v("use"),{"xlink:href":"#"+A,transform:(a?"rotate(180 "+w/2+" "+C/2+") ":h)+"scale("+w/S+","+C/S+")","stroke-width":(1/((w/S+C/S)/2)).toFixed(4)}),P.appendChild(I),g.defs.appendChild(P),p[T]=1),v(I,u);var L=l*("diamond"!=k&&"oval"!=k);a?(s=r._.arrows.startdx*b||0,o=t.getTotalLength(y.path)-L*b):(s=L*b,o=t.getTotalLength(y.path)-(r._.arrows.enddx*b||0)),u={},u["marker-"+m]="url(#"+T+")",(o||s)&&(u.d=t.getSubpath(y.path,s,o)),v(x,u),r._.arrows[m+"Path"]=A,r._.arrows[m+"Marker"]=T,r._.arrows[m+"dx"]=L,r._.arrows[m+"Type"]=k,r._.arrows[m+"String"]=i}else a?(s=r._.arrows.startdx*b||0,o=t.getTotalLength(y.path)-s):(s=0,o=t.getTotalLength(y.path)-(r._.arrows.enddx*b||0)),r._.arrows[m+"Path"]&&v(x,{d:t.getSubpath(y.path,s,o)}),delete r._.arrows[m+"Path"],delete r._.arrows[m+"Marker"],delete r._.arrows[m+"dx"],delete r._.arrows[m+"Type"],delete r._.arrows[m+"String"];for(u in p)if(p[e](u)&&!p[u]){var B=t._g.doc.getElementById(u);B&&B.parentNode.removeChild(B)}}},b={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},_=function(t,e,r){if(e=b[n(e).toLowerCase()]){for(var i=t.attrs["stroke-width"]||"1",a={round:i,square:i,butt:0}[t.attrs["stroke-linecap"]||r["stroke-linecap"]]||0,s=[],o=e.length;o--;)s[o]=e[o]*i+(o%2?1:-1)*a;v(t.node,{"stroke-dasharray":s.join(",")})}},k=function(r,a){var l=r.node,u=r.attrs,f=l.style.visibility;l.style.visibility="hidden";for(var d in a)if(a[e](d)){if(!t._availableAttrs[e](d))continue;var p=a[d];switch(u[d]=p,d){case"blur":r.blur(p);break;case"href":case"title":var b=v("title"),k=t._g.doc.createTextNode(p);b.appendChild(k),l.appendChild(b);break;case"target":var w=l.parentNode;if("a"!=w.tagName.toLowerCase()){var b=v("a");w.insertBefore(b,l),b.appendChild(l),w=b}"target"==d?w.setAttributeNS(g,"show","blank"==p?"new":p):w.setAttributeNS(g,d,p);break;case"cursor":l.style.cursor=p;break;case"transform":r.transform(p);break;case"arrow-start":y(r,p);break;case"arrow-end":y(r,p,1);break;case"clip-angle":var S=n(p).split(c);if(4==S.length){var A={x:parseInt(S[0],10),y:parseInt(S[1],10)},T=Math.PI/180,I=function(t,e){var n={};return n.x=A.x+e*Math.sin(t*T),n.y=A.y-e*Math.cos(t*T),n},P=function(t,e,n){var r,i=A.x,a=A.y,s=I(t,n),o=I(e,n);return r=["M",i+",",a,"L",s.x+",",s.y,"A",n+",",n+",","0,",+(e-t>180)+",","1,",o.x+",",o.y,"z"],r.join("")};r.clip&&r.clip.parentNode.parentNode.removeChild(r.clip.parentNode);var L=v("clipPath"),B=v("path");L.id=t.createUUID();var M=P(0,parseInt(S[3],10),parseInt(S[2],10));v(B,{d:M,fill:"#ffffff",stroke:"#000000","stroke-width":1.5}),L.appendChild(B),r.paper.defs.appendChild(L),v(l,{"clip-path":"url(#"+L.id+")"}),r.clip=B}if(!p){var R=l.getAttribute("clip-path");if(R){var O=t._g.doc.getElementById(R.replace(/(^url\(#|\)$)/g,h));O&&O.parentNode.removeChild(O),v(l,{"clip-path":h}),delete r.clip}}break;case"clip-circle":var N=n(p).split(c);if(3==N.length){r.clip&&r.clip.parentNode.parentNode.removeChild(r.clip.parentNode);var L=v("clipPath"),D=v("circle");L.id=t.createUUID(),v(D,{cx:N[0],cy:N[1],r:N[2]}),L.appendChild(D),r.paper.defs.appendChild(L),v(l,{"clip-path":"url(#"+L.id+")"}),r.clip=D}if(!p){var R=l.getAttribute("clip-path");if(R){var O=t._g.doc.getElementById(R.replace(/(^url\(#|\)$)/g,h));O&&O.parentNode.removeChild(O),v(l,{"clip-path":h}),delete r.clip}}break;case"clip-rect":var G=n(p).split(c);if(4==G.length){r.clip&&r.clip.parentNode.parentNode.removeChild(r.clip.parentNode);var L=v("clipPath"),E=v("rect");L.id=t.createUUID(),v(E,{x:G[0],y:G[1],width:G[2],height:G[3]}),L.appendChild(E),r.paper.defs.appendChild(L),v(l,{"clip-path":"url(#"+L.id+")"}),r.clip=E}if(!p){var R=l.getAttribute("clip-path");if(R){var O=t._g.doc.getElementById(R.replace(/(^url\(#|\)$)/g,h));O&&O.parentNode.removeChild(O),v(l,{"clip-path":h}),delete r.clip}}break;case"path":"path"==r.type&&(v(l,{d:p?u.path=t._pathToAbsolute(p):"M0,0"}),r._.dirty=1,r._.arrows&&("startString"in r._.arrows&&y(r,r._.arrows.startString),"endString"in r._.arrows&&y(r,r._.arrows.endString,1)));break;case"width":if(l.setAttribute(d,p),r._.dirty=1,!u.fx)break;d="x",p=u.x;case"x":u.fx&&(p=-u.x-(u.width||0));case"rx":if("rx"==d&&"rect"==r.type)break;case"cx":l.setAttribute(d,p),r.pattern&&x(r),r._.dirty=1;break;case"height":if(l.setAttribute(d,p),r._.dirty=1,!u.fy)break;d="y",p=u.y;case"y":u.fy&&(p=-u.y-(u.height||0));case"ry":if("ry"==d&&"rect"==r.type)break;case"cy":l.setAttribute(d,p),r.pattern&&x(r),r._.dirty=1;break;case"r":"rect"==r.type?v(l,{rx:p,ry:p}):l.setAttribute(d,p),r._.dirty=1;break;case"src":"image"==r.type&&l.setAttributeNS(g,"href",p);break;case"stroke-width":(1!=r._.sx||1!=r._.sy)&&(p/=s(o(r._.sx),o(r._.sy))||1),r.paper._vbSize&&(p*=r.paper._vbSize),l.setAttribute(d,p),u["stroke-dasharray"]&&_(r,u["stroke-dasharray"],a),r._.arrows&&("startString"in r._.arrows&&y(r,r._.arrows.startString),"endString"in r._.arrows&&y(r,r._.arrows.endString,1));break;case"stroke-dasharray":_(r,p,a);break;case"fill":var F=n(p).match(t._ISURL);if(F){L=v("pattern");var z=v("image");L.id=t.createUUID(),v(L,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),v(z,{x:0,y:0,"xlink:href":F[1]}),L.appendChild(z),function(e){t._preload(F[1],function(){var t=this.offsetWidth,n=this.offsetHeight;v(e,{width:t,height:n}),v(z,{width:t,height:n}),r.paper.safari()})}(L),r.paper.defs.appendChild(L),v(l,{fill:"url(#"+L.id+")"}),r.pattern=L,r.pattern&&x(r);break}var V=t.getRGB(p);if(V.error){if(("circle"==r.type||"ellipse"==r.type||"r"!=n(p).charAt())&&m(r,p)){if("opacity"in u||"fill-opacity"in u){var U=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,h));if(U){var j=U.getElementsByTagName("stop");v(j[j.length-1],{"stop-opacity":("opacity"in u?u.opacity:1)*("fill-opacity"in u?u["fill-opacity"]:1)})}}u.gradient=p,u.fill="none";break}}else delete a.gradient,delete u.gradient,!t.is(u.opacity,"undefined")&&t.is(a.opacity,"undefined")&&v(l,{opacity:u.opacity}),!t.is(u["fill-opacity"],"undefined")&&t.is(a["fill-opacity"],"undefined")&&v(l,{"fill-opacity":u["fill-opacity"]});V[e]("opacity")&&v(l,{"fill-opacity":V.opacity>1?V.opacity/100:V.opacity});case"stroke":V=t.getRGB(p),l.setAttribute(d,V.hex),"stroke"==d&&V[e]("opacity")&&v(l,{"stroke-opacity":V.opacity>1?V.opacity/100:V.opacity}),"stroke"==d&&r._.arrows&&("startString"in r._.arrows&&y(r,r._.arrows.startString),"endString"in r._.arrows&&y(r,r._.arrows.endString,1));break;case"gradient":("circle"==r.type||"ellipse"==r.type||"r"!=n(p).charAt())&&m(r,p);break;case"opacity":u.gradient&&!u[e]("stroke-opacity")&&v(l,{"stroke-opacity":p>1?p/100:p});case"fill-opacity":if(u.gradient){U=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,h)),U&&(j=U.getElementsByTagName("stop"),v(j[j.length-1],{"stop-opacity":p}));break}default:"font-size"==d&&(p=i(p,10)+"px");var Y=d.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});l.style[Y]=p,r._.dirty=1,l.setAttribute(d,p)}}C(r,a),l.style.visibility=f},w=1.2,C=function(r,a){if("text"==r.type&&(a[e]("text")||a[e]("font")||a[e]("font-size")||a[e]("x")||a[e]("y"))){var s=r.attrs,o=r.node,l=o.firstChild?i(t._g.doc.defaultView.getComputedStyle(o.firstChild,h).getPropertyValue("font-size"),10):10;if(a[e]("text")){for(s.text=a.text;o.firstChild;)o.removeChild(o.firstChild);for(var c,u=n(a.text).split("\n"),f=[],g=0,d=u.length;d>g;g++)c=v("tspan"),g&&v(c,{dy:l*w,x:s.x}),c.appendChild(t._g.doc.createTextNode(u[g])),o.appendChild(c),f[g]=c}else for(f=o.getElementsByTagName("tspan"),g=0,d=f.length;d>g;g++)g?v(f[g],{dy:l*w,x:s.x}):v(f[0],{dy:0});v(o,{x:s.x,y:s.y}),r._.dirty=1;var p=r._getBBox(),m=s.y-(p.y+p.height/2);m&&t.is(m,"finite")&&v(f[0],{dy:m})}},S=function(e,n){this[0]=this.node=e,e.raphael=!0,this.id=t._oid++,e.raphaelid=this.id,this.matrix=t.matrix(),this.realPath=null,this.paper=n,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!n.bottom&&(n.bottom=this),this.prev=n.top,n.top&&(n.top.next=this),n.top=this,this.next=null},A=t.el;S.prototype=A,A.constructor=S,t._engine.path=function(t,e){var n=v("path");e.canvas&&e.canvas.appendChild(n);var r=new S(n,e);return r.type="path",k(r,{fill:"none",stroke:"#000",path:t}),r},A.rotate=function(t,e,i){if(this.removed)return this;if(t=n(t).split(c),t.length-1&&(e=r(t[1]),i=r(t[2])),t=r(t[0]),null==i&&(e=i),null==e||null==i){var a=this.getBBox(1);e=a.x+a.width/2,i=a.y+a.height/2}return this.transform(this._.transform.concat([["r",t,e,i]])),this},A.scale=function(t,e,i,a){if(this.removed)return this;if(t=n(t).split(c),t.length-1&&(e=r(t[1]),i=r(t[2]),a=r(t[3])),t=r(t[0]),null==e&&(e=t),null==a&&(i=a),null==i||null==a)var s=this.getBBox(1);return i=null==i?s.x+s.width/2:i,a=null==a?s.y+s.height/2:a,this.transform(this._.transform.concat([["s",t,e,i,a]])),this},A.translate=function(t,e){return this.removed?this:(t=n(t).split(c),t.length-1&&(e=r(t[1])),t=r(t[0])||0,e=+e||0,this.transform(this._.transform.concat([["t",t,e]])),this)},A.transform=function(n){var r=this._;if(null==n)return r.transform;if(t._extractTransform(this,n),this.clip&&v(this.clip,{transform:this.matrix.invert()}),this.pattern&&x(this),this.node&&v(this.node,{transform:this.matrix}),1!=r.sx||1!=r.sy){var i=this.attrs[e]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":i})}return this},A.hide=function(){return!this.removed&&this.paper.safari(this.node.style.display="none"),this},A.show=function(){return!this.removed&&this.paper.safari(this.node.style.display=""),this},A.remove=function(){if(!this.removed&&this.node.parentNode){var e=this.paper;e.__set__&&e.__set__.exclude(this),u.unbind("raphael.*.*."+this.id),this.gradient&&e.defs.removeChild(this.gradient),t._tear(this,e),"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(var n in this)this[n]="function"==typeof this[n]?t._removedFactory(n):null;this.removed=!0}},A._getBBox=function(){if("none"==this.node.style.display){this.show();var t=!0}var e={};try{e=this.node.getBBox()}catch(n){}finally{e=e||{}}return t&&this.hide(),e},A.attr=function(n,r){if(this.removed)return this;if(null==n){var i={};for(var a in this.attrs)this.attrs[e](a)&&(i[a]=this.attrs[a]);return i.gradient&&"none"==i.fill&&(i.fill=i.gradient)&&delete i.gradient,i.transform=this._.transform,i}if(null==r&&t.is(n,"string")){if("fill"==n&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==n)return this._.transform;for(var s=n.split(c),o={},l=0,h=s.length;h>l;l++)n=s[l],o[n]=n in this.attrs?this.attrs[n]:t.is(this.paper.customAttributes[n],"function")?this.paper.customAttributes[n].def:t._availableAttrs[n];return h-1?o:o[s[0]]}if(null==r&&t.is(n,"array")){for(o={},l=0,h=n.length;h>l;l++)o[n[l]]=this.attr(n[l]);return o}if(null!=r){var f={};f[n]=r}else null!=n&&t.is(n,"object")&&(f=n);for(var g in f)u("raphael.attr."+g+"."+this.id,this,f[g]);for(g in this.paper.customAttributes)if(this.paper.customAttributes[e](g)&&f[e](g)&&t.is(this.paper.customAttributes[g],"function")){var d=this.paper.customAttributes[g].apply(this,[].concat(f[g]));this.attrs[g]=f[g];for(var p in d)d[e](p)&&(f[p]=d[p])}return k(this,f),this},A.toFront=function(){if(this.removed)return this;"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var e=this.paper;return e.top!=this&&t._tofront(this,e),this},A.toBack=function(){if(this.removed)return this;var e=this.node.parentNode;"a"==e.tagName.toLowerCase()?e.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):e.firstChild!=this.node&&e.insertBefore(this.node,this.node.parentNode.firstChild),t._toback(this,this.paper);this.paper;return this},A.insertAfter=function(e){if(this.removed)return this;var n=e.node||e[e.length-1].node;return n.nextSibling?n.parentNode.insertBefore(this.node,n.nextSibling):n.parentNode.appendChild(this.node),t._insertafter(this,e,this.paper),this},A.insertBefore=function(e){if(this.removed)return this;var n=e.node||e[0].node;return n.parentNode.insertBefore(this.node,n),t._insertbefore(this,e,this.paper),this},A.blur=function(e){var n=this;if(0!==+e){var r=v("filter"),i=v("feGaussianBlur");n.attrs.blur=e,r.id=t.createUUID(),v(i,{stdDeviation:+e||1.5}),r.appendChild(i),n.paper.defs.appendChild(r),n._blur=r,v(n.node,{filter:"url(#"+r.id+")"})}else n._blur&&(n._blur.parentNode.removeChild(n._blur),delete n._blur,delete n.attrs.blur),n.node.removeAttribute("filter");return n},t._engine.circle=function(t,e,n,r){var i=v("circle");t.canvas&&t.canvas.appendChild(i);var a=new S(i,t);return a.attrs={cx:e,cy:n,r:r,fill:"none",stroke:"#000"},a.type="circle",v(i,a.attrs),a},t._engine.rect=function(t,e,n,r,i,a){var s=v("rect");t.canvas&&t.canvas.appendChild(s);var o=new S(s,t);return o.attrs={x:e,y:n,width:r,height:i,r:a||0,rx:a||0,ry:a||0,fill:"none",stroke:"#000"},o.type="rect",v(s,o.attrs),o},t._engine.ellipse=function(t,e,n,r,i){var a=v("ellipse");t.canvas&&t.canvas.appendChild(a);var s=new S(a,t);return s.attrs={cx:e,cy:n,rx:r,ry:i,fill:"none",stroke:"#000"},s.type="ellipse",v(a,s.attrs),s},t._engine.image=function(t,e,n,r,i,a){var s=v("image");v(s,{x:n,y:r,width:i,height:a,preserveAspectRatio:"none"}),s.setAttributeNS(g,"href",e),t.canvas&&t.canvas.appendChild(s);var o=new S(s,t);return o.attrs={x:n,y:r,width:i,height:a,src:e},o.type="image",o},t._engine.text=function(e,n,r,i){var a=v("text");e.canvas&&e.canvas.appendChild(a);var s=new S(a,e);return s.attrs={x:n,y:r,"text-anchor":"middle",text:i,font:t._availableAttrs.font,stroke:"none",fill:"#000"},s.type="text",k(s,s.attrs),s},t._engine.setSize=function(t,e){return this.width=t||this.width,this.height=e||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},t._engine.create=function(){var e=t._getContainer.apply(0,arguments),n=e&&e.container,r=e.x,i=e.y,a=e.width,s=e.height;if(!n)throw new Error("SVG container not found.");var o,l=v("svg"),c="overflow:hidden;";return r=r||0,i=i||0,a=a||512,s=s||342,v(l,{height:s,version:1.1,width:a,xmlns:"http://www.w3.org/2000/svg"}),1==n?(l.style.cssText=c+"position:absolute;left:"+r+"px;top:"+i+"px",t._g.doc.body.appendChild(l),o=1):(l.style.cssText=c+"position:relative",n.firstChild?n.insertBefore(l,n.firstChild):n.appendChild(l)),n=new t._Paper,n.width=a,n.height=s,n.canvas=l,n.clear(),n._left=n._top=0,o&&(n.renderfix=function(){}),n.renderfix(),n},t._engine.setViewBox=function(t,e,n,r,i){u("raphael.setViewBox",this,this._viewBox,[t,e,n,r,i]);var a,o,l=s(n/this.width,r/this.height),c=this.top,h=i?"meet":"xMinYMin";for(null==t?(this._vbSize&&(l=1),delete this._vbSize,a="0 0 "+this.width+f+this.height):(this._vbSize=l,a=t+f+e+f+n+f+r),v(this.canvas,{viewBox:a,preserveAspectRatio:h});l&&c;)o="stroke-width"in c.attrs?c.attrs["stroke-width"]:1,c.attr({"stroke-width":o}),c._.dirty=1,c._.dirtyT=1,c=c.prev;return this._viewBox=[t,e,n,r,!!i],this},t.prototype.renderfix=function(){var t,e=this.canvas,n=e.style;try{t=e.getScreenCTM()||e.createSVGMatrix()}catch(r){t=e.createSVGMatrix()}var i=-t.e%1,a=-t.f%1;(i||a)&&(i&&(this._left=(this._left+i)%1,n.left=this._left+"px"),a&&(this._top=(this._top+a)%1,n.top=this._top+"px"))},t.prototype.clear=function(){t.eve("raphael.clear",this);for(var e=this.canvas;e.firstChild;)e.removeChild(e.firstChild);this.bottom=this.top=null,(this.desc=v("desc")).appendChild(t._g.doc.createTextNode("Created with Rapha\xebl "+t.version)),e.appendChild(this.desc),e.appendChild(this.defs=v("defs"))},t.prototype.remove=function(){u("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null};var T=t.st;for(var I in A)A[e](I)&&!T[e](I)&&(T[I]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t].apply(n,e)})}}(I))}(window.Raphael)}(),o=function(){window.Raphael&&window.Raphael.vml&&function(t){var e="hasOwnProperty",n=String,r=parseFloat,i=Math,a=i.round,s=i.max,o=i.min,l=i.abs,c="fill",u=/[, ]+/,h=t.eve,f=" progid:DXImageTransform.Microsoft",g=" ",d="",p={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},v=/([clmz]),?([^clmz]*)/gi,m=/ progid:\S+Blur\([^\)]+\)/g,x=/-?[^,\s-]+/g,y="position:absolute;left:0;top:0;width:1px;height:1px",b=21600,_={path:1,rect:1,image:1},k={circle:1,ellipse:1},w=function(e){var r=/[ahqstv]/gi,i=t._pathToAbsolute;if(n(e).match(r)&&(i=t._path2curve),r=/[clmz]/g,i==t._pathToAbsolute&&!n(e).match(r)){var s=n(e).replace(v,function(t,e,n){var r=[],i="m"==e.toLowerCase(),s=p[e];return n.replace(x,function(t){i&&2==r.length&&(s+=r+p["m"==e?"l":"L"],r=[]),r.push(a(t*b))}),s+r});return s}var o,l,c=i(e);s=[];for(var u=0,h=c.length;h>u;u++){o=c[u],l=c[u][0].toLowerCase(),"z"==l&&(l="x");for(var f=1,m=o.length;m>f;f++)l+=a(o[f]*b)+(f!=m-1?",":d);s.push(l)}return s.join(g)},C=function(e,n,r){var i=t.matrix();return i.rotate(-e,.5,.5),{dx:i.x(n,r),dy:i.y(n,r)}},S=function(t,e,n,r,i,a){var s=t._,o=t.matrix,u=s.fillpos,h=t.node,f=h.style,d=1,p="",v=b/e,m=b/n;if(f.visibility="hidden",e&&n){if(h.coordsize=l(v)+g+l(m),f.rotation=a*(0>e*n?-1:1),a){var x=C(a,r,i);r=x.dx,i=x.dy}if(0>e&&(p+="x"),0>n&&(p+=" y")&&(d=-1),f.flip=p,h.coordorigin=r*-v+g+i*-m,u||s.fillsize){var y=h.getElementsByTagName(c);y=y&&y[0],h.removeChild(y),u&&(x=C(a,o.x(u[0],u[1]),o.y(u[0],u[1])),y.position=x.dx*d+g+x.dy*d),s.fillsize&&(y.size=s.fillsize[0]*l(e)+g+s.fillsize[1]*l(n)),h.appendChild(y)}f.visibility="visible"}};t.toString=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl "+this.version};var A=function(t,e,r){for(var i=n(e).toLowerCase().split("-"),a=r?"end":"start",s=i.length,o="classic",l="medium",c="medium";s--;)switch(i[s]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":o=i[s];break;case"wide":case"narrow":c=i[s];break;case"long":case"short":l=i[s]}var u=t.node.getElementsByTagName("stroke")[0];u[a+"arrow"]=o,u[a+"arrowlength"]=l,u[a+"arrowwidth"]=c},T=function(i,l){i.attrs=i.attrs||{};var h=i.node,f=i.attrs,p=h.style,v=_[i.type]&&(l.x!=f.x||l.y!=f.y||l.width!=f.width||l.height!=f.height||l.cx!=f.cx||l.cy!=f.cy||l.rx!=f.rx||l.ry!=f.ry||l.r!=f.r),m=k[i.type]&&(f.cx!=l.cx||f.cy!=l.cy||f.r!=l.r||f.rx!=l.rx||f.ry!=l.ry),x=i;for(var y in l)l[e](y)&&(f[y]=l[y]);if(v&&(f.path=t._getPath[i.type](i),i._.dirty=1),l.href&&(h.href=l.href),l.title&&(h.title=l.title),l.target&&(h.target=l.target),l.cursor&&(p.cursor=l.cursor),"blur"in l&&i.blur(l.blur),(l.path&&"path"==i.type||v)&&(h.path=w(~n(f.path).toLowerCase().indexOf("r")?t._pathToAbsolute(f.path):f.path),"image"==i.type&&(i._.fillpos=[f.x,f.y],i._.fillsize=[f.width,f.height],S(i,1,1,0,0,0))),"transform"in l&&i.transform(l.transform),m){var C=+f.cx,T=+f.cy,P=+f.rx||+f.r||0,L=+f.ry||+f.r||0;h.path=t.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",a((C-P)*b),a((T-L)*b),a((C+P)*b),a((T+L)*b),a(C*b)),i._.dirty=1}if("clip-rect"in l){var M=n(l["clip-rect"]).split(u);if(4==M.length){M[2]=+M[2]+ +M[0],M[3]=+M[3]+ +M[1];var R=h.clipRect||t._g.doc.createElement("div"),O=R.style;O.clip=t.format("rect({1}px {2}px {3}px {0}px)",M),h.clipRect||(O.position="absolute",O.top=0,O.left=0,O.width=i.paper.width+"px",O.height=i.paper.height+"px",h.parentNode.insertBefore(R,h),R.appendChild(h),h.clipRect=R)}l["clip-rect"]||h.clipRect&&(h.clipRect.style.clip="auto")}if(i.textpath){var N=i.textpath.style;l.font&&(N.font=l.font),l["font-family"]&&(N.fontFamily='"'+l["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,d)+'"'),l["font-size"]&&(N.fontSize=l["font-size"]),l["font-weight"]&&(N.fontWeight=l["font-weight"]),l["font-style"]&&(N.fontStyle=l["font-style"])}if("arrow-start"in l&&A(x,l["arrow-start"]),"arrow-end"in l&&A(x,l["arrow-end"],1),null!=l.opacity||null!=l["stroke-width"]||null!=l.fill||null!=l.src||null!=l.stroke||null!=l["stroke-width"]||null!=l["stroke-opacity"]||null!=l["fill-opacity"]||null!=l["stroke-dasharray"]||null!=l["stroke-miterlimit"]||null!=l["stroke-linejoin"]||null!=l["stroke-linecap"]){var D=h.getElementsByTagName(c),G=!1;if(D=D&&D[0],!D&&(G=D=B(c)),"image"==i.type&&l.src&&(D.src=l.src),l.fill&&(D.on=!0),(null==D.on||"none"==l.fill||null===l.fill)&&(D.on=!1),D.on&&l.fill){var E=n(l.fill).match(t._ISURL);if(E){D.parentNode==h&&h.removeChild(D),D.rotate=!0,D.src=E[1],D.type="tile";var F=i.getBBox(1);D.position=F.x+g+F.y,i._.fillpos=[F.x,F.y],t._preload(E[1],function(){i._.fillsize=[this.offsetWidth,this.offsetHeight]})}else D.color=t.getRGB(l.fill).hex,D.src=d,D.type="solid",t.getRGB(l.fill).error&&(x.type in{circle:1,ellipse:1}||"r"!=n(l.fill).charAt())&&I(x,l.fill,D)&&(f.fill="none",f.gradient=l.fill,D.rotate=!1)}if("fill-opacity"in l||"opacity"in l){var z=((+f["fill-opacity"]+1||2)-1)*((+f.opacity+1||2)-1)*((+t.getRGB(l.fill).o+1||2)-1);z=o(s(z,0),1),D.opacity=z,D.src&&(D.color="none")}h.appendChild(D);var V=h.getElementsByTagName("stroke")&&h.getElementsByTagName("stroke")[0],U=!1;!V&&(U=V=B("stroke")),(l.stroke&&"none"!=l.stroke||l["stroke-width"]||null!=l["stroke-opacity"]||l["stroke-dasharray"]||l["stroke-miterlimit"]||l["stroke-linejoin"]||l["stroke-linecap"])&&(V.on=!0),("none"==l.stroke||null===l.stroke||null==V.on||0==l.stroke||0==l["stroke-width"])&&(V.on=!1);var j=t.getRGB(l.stroke);V.on&&l.stroke&&(V.color=j.hex),z=((+f["stroke-opacity"]+1||2)-1)*((+f.opacity+1||2)-1)*((+j.o+1||2)-1);var Y=.75*(r(l["stroke-width"])||1);if(z=o(s(z,0),1),null==l["stroke-width"]&&(Y=f["stroke-width"]),l["stroke-width"]&&(V.weight=Y),Y&&1>Y&&(z*=Y)&&(V.weight=1),V.opacity=z,l["stroke-linejoin"]&&(V.joinstyle=l["stroke-linejoin"]||"miter"),V.miterlimit=l["stroke-miterlimit"]||8,l["stroke-linecap"]&&(V.endcap="butt"==l["stroke-linecap"]?"flat":"square"==l["stroke-linecap"]?"square":"round"),l["stroke-dasharray"]){var H={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};V.dashstyle=H[e](l["stroke-dasharray"])?H[l["stroke-dasharray"]]:d}U&&h.appendChild(V)}if("text"==x.type){x.paper.canvas.style.display=d;var W=x.paper.span,q=100,X=f.font&&f.font.match(/\d+(?:\.\d*)?(?=px)/);p=W.style,f.font&&(p.font=f.font),f["font-family"]&&(p.fontFamily=f["font-family"]),f["font-weight"]&&(p.fontWeight=f["font-weight"]),f["font-style"]&&(p.fontStyle=f["font-style"]),X=r(f["font-size"]||X&&X[0])||10,p.fontSize=X*q+"px",x.textpath.string&&(W.innerHTML=n(x.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var $=W.getBoundingClientRect();x.W=f.w=($.right-$.left)/q,x.H=f.h=($.bottom-$.top)/q,x.X=f.x,x.Y=f.y+x.H/2,("x"in l||"y"in l)&&(x.path.v=t.format("m{0},{1}l{2},{1}",a(f.x*b),a(f.y*b),a(f.x*b)+1));for(var Z=["x","y","text","font","font-family","font-weight","font-style","font-size"],J=0,Q=Z.length;Q>J;J++)if(Z[J]in l){x._.dirty=1;break}switch(f["text-anchor"]){case"start":x.textpath.style["v-text-align"]="left",x.bbx=x.W/2;break;case"end":x.textpath.style["v-text-align"]="right",x.bbx=-x.W/2;break;default:x.textpath.style["v-text-align"]="center",x.bbx=0}x.textpath.style["v-text-kern"]=!0}},I=function(e,a,s){e.attrs=e.attrs||{};var o=(e.attrs,Math.pow),l="linear",c=".5 .5";if(e.attrs.gradient=a,a=n(a).replace(t._radial_gradient,function(t,e,n){return l="radial",e&&n&&(e=r(e),n=r(n),o(e-.5,2)+o(n-.5,2)>.25&&(n=i.sqrt(.25-o(e-.5,2))*(2*(n>.5)-1)+.5),c=e+g+n),d}),a=a.split(/\s*\-\s*/),"linear"==l){var u=a.shift();if(u=-r(u),isNaN(u))return null}var h=t._parseDots(a);if(!h)return null;if(e=e.shape||e.node,h.length){e.removeChild(s),s.on=!0,s.method="none",s.color=h[0].color,s.color2=h[h.length-1].color;for(var f=[],p=0,v=h.length;v>p;p++)h[p].offset&&f.push(h[p].offset+g+h[p].color);s.colors=f.length?f.join():"0% "+s.color,"radial"==l?(s.type="gradientTitle",s.focus="100%",s.focussize="0 0",s.focusposition=c,s.angle=0):(s.type="gradient",s.angle=(270-u)%360),e.appendChild(s)}return 1},P=function(e,n){this[0]=this.node=e,e.raphael=!0,this.id=t._oid++,e.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=n,this.matrix=t.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!n.bottom&&(n.bottom=this),this.prev=n.top,n.top&&(n.top.next=this),n.top=this,this.next=null},L=t.el;P.prototype=L,L.constructor=P,L.transform=function(e){if(null==e)return this._.transform;var r,i=this.paper._viewBoxShift,a=i?"s"+[i.scale,i.scale]+"-1-1t"+[i.dx,i.dy]:d;i&&(r=e=n(e).replace(/\.{3}|\u2026/g,this._.transform||d)),t._extractTransform(this,a+e);var s,o=this.matrix.clone(),l=this.skew,c=this.node,u=~n(this.attrs.fill).indexOf("-"),h=!n(this.attrs.fill).indexOf("url(");if(o.translate(1,1),h||u||"image"==this.type)if(l.matrix="1 0 0 1",l.offset="0 0",s=o.split(),u&&s.noRotation||!s.isSimple){c.style.filter=o.toFilter();var f=this.getBBox(),p=this.getBBox(1),v=f.x-p.x,m=f.y-p.y;c.coordorigin=v*-b+g+m*-b,S(this,1,1,v,m,0)}else c.style.filter=d,S(this,s.scalex,s.scaley,s.dx,s.dy,s.rotate);else l&&(c.style.filter=d,l.matrix=n(o),l.offset=o.offset());return r&&(this._.transform=r),this},L.rotate=function(t,e,i){if(this.removed)return this;if(null!=t){if(t=n(t).split(u),t.length-1&&(e=r(t[1]),i=r(t[2])),t=r(t[0]),null==i&&(e=i),null==e||null==i){var a=this.getBBox(1);e=a.x+a.width/2,i=a.y+a.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",t,e,i]])),this}},L.translate=function(t,e){return this.removed?this:(t=n(t).split(u),t.length-1&&(e=r(t[1])),t=r(t[0])||0,e=+e||0,this._.bbox&&(this._.bbox.x+=t,this._.bbox.y+=e),this.transform(this._.transform.concat([["t",t,e]])),this)},L.scale=function(t,e,i,a){if(this.removed)return this;if(t=n(t).split(u),t.length-1&&(e=r(t[1]),i=r(t[2]),a=r(t[3]),isNaN(i)&&(i=null),isNaN(a)&&(a=null)),t=r(t[0]),null==e&&(e=t),null==a&&(i=a),null==i||null==a)var s=this.getBBox(1);return i=null==i?s.x+s.width/2:i,a=null==a?s.y+s.height/2:a,this.transform(this._.transform.concat([["s",t,e,i,a]])),this._.dirtyT=1,this},L.hide=function(){return!this.removed&&(this.node.style.display="none"),this},L.show=function(){return!this.removed&&(this.node.style.display=d),this},L._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},L.remove=function(){if(!this.removed&&this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),t.eve.unbind("raphael.*.*."+this.id),t._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;this.removed=!0}},L.attr=function(n,r){if(this.removed)return this;if(null==n){var i={};for(var a in this.attrs)this.attrs[e](a)&&(i[a]=this.attrs[a]);
return i.gradient&&"none"==i.fill&&(i.fill=i.gradient)&&delete i.gradient,i.transform=this._.transform,i}if(null==r&&t.is(n,"string")){if(n==c&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var s=n.split(u),o={},l=0,f=s.length;f>l;l++)n=s[l],o[n]=n in this.attrs?this.attrs[n]:t.is(this.paper.customAttributes[n],"function")?this.paper.customAttributes[n].def:t._availableAttrs[n];return f-1?o:o[s[0]]}if(this.attrs&&null==r&&t.is(n,"array")){for(o={},l=0,f=n.length;f>l;l++)o[n[l]]=this.attr(n[l]);return o}var g;null!=r&&(g={},g[n]=r),null==r&&t.is(n,"object")&&(g=n);for(var d in g)h("raphael.attr."+d+"."+this.id,this,g[d]);if(g){for(d in this.paper.customAttributes)if(this.paper.customAttributes[e](d)&&g[e](d)&&t.is(this.paper.customAttributes[d],"function")){var p=this.paper.customAttributes[d].apply(this,[].concat(g[d]));this.attrs[d]=g[d];for(var v in p)p[e](v)&&(g[v]=p[v])}g.text&&"text"==this.type&&(this.textpath.string=g.text),T(this,g)}return this},L.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&t._tofront(this,this.paper),this},L.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),t._toback(this,this.paper)),this)},L.insertAfter=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[e.length-1]),e.node.nextSibling?e.node.parentNode.insertBefore(this.node,e.node.nextSibling):e.node.parentNode.appendChild(this.node),t._insertafter(this,e,this.paper),this)},L.insertBefore=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[0]),e.node.parentNode.insertBefore(this.node,e.node),t._insertbefore(this,e,this.paper),this)},L.blur=function(e){var n=this.node.runtimeStyle,r=n.filter;return r=r.replace(m,d),0!==+e?(this.attrs.blur=e,n.filter=r+g+f+".Blur(pixelradius="+(+e||1.5)+")",n.margin=t.format("-{0}px 0 0 -{0}px",a(+e||1.5))):(n.filter=r,n.margin=0,delete this.attrs.blur),this},t._engine.path=function(t,e){var n=B("shape");n.style.cssText=y,n.coordsize=b+g+b,n.coordorigin=e.coordorigin;var r=new P(n,e),i={fill:"none",stroke:"#000"};t&&(i.path=t),r.type="path",r.path=[],r.Path=d,T(r,i),e.canvas.appendChild(n);var a=B("skew");return a.on=!0,n.appendChild(a),r.skew=a,r.transform(d),r},t._engine.rect=function(e,n,r,i,a,s){var o=t._rectPath(n,r,i,a,s),l=e.path(o),c=l.attrs;return l.X=c.x=n,l.Y=c.y=r,l.W=c.width=i,l.H=c.height=a,c.r=s,c.path=o,l.type="rect",l},t._engine.ellipse=function(t,e,n,r,i){{var a=t.path();a.attrs}return a.X=e-r,a.Y=n-i,a.W=2*r,a.H=2*i,a.type="ellipse",T(a,{cx:e,cy:n,rx:r,ry:i}),a},t._engine.circle=function(t,e,n,r){{var i=t.path();i.attrs}return i.X=e-r,i.Y=n-r,i.W=i.H=2*r,i.type="circle",T(i,{cx:e,cy:n,r:r}),i},t._engine.image=function(e,n,r,i,a,s){var o=t._rectPath(r,i,a,s),l=e.path(o).attr({stroke:"none"}),u=l.attrs,h=l.node,f=h.getElementsByTagName(c)[0];return u.src=n,l.X=u.x=r,l.Y=u.y=i,l.W=u.width=a,l.H=u.height=s,u.path=o,l.type="image",f.parentNode==h&&h.removeChild(f),f.rotate=!0,f.src=n,f.type="tile",l._.fillpos=[r,i],l._.fillsize=[a,s],h.appendChild(f),S(l,1,1,0,0,0),l},t._engine.text=function(e,r,i,s){var o=B("shape"),l=B("path"),c=B("textpath");r=r||0,i=i||0,s=s||"",l.v=t.format("m{0},{1}l{2},{1}",a(r*b),a(i*b),a(r*b)+1),l.textpathok=!0,c.string=n(s),c.on=!0,o.style.cssText=y,o.coordsize=b+g+b,o.coordorigin="0 0";var u=new P(o,e),h={fill:"#000",stroke:"none",font:t._availableAttrs.font,text:s};u.shape=o,u.path=l,u.textpath=c,u.type="text",u.attrs.text=n(s),u.attrs.x=r,u.attrs.y=i,u.attrs.w=1,u.attrs.h=1,T(u,h),o.appendChild(c),o.appendChild(l),e.canvas.appendChild(o);var f=B("skew");return f.on=!0,o.appendChild(f),u.skew=f,u.transform(d),u},t._engine.setSize=function(e,n){var r=this.canvas.style;return this.width=e,this.height=n,e==+e&&(e+="px"),n==+n&&(n+="px"),r.width=e,r.height=n,r.clip="rect(0 "+e+" "+n+" 0)",this._viewBox&&t._engine.setViewBox.apply(this,this._viewBox),this},t._engine.setViewBox=function(e,n,r,i,a){t.eve("raphael.setViewBox",this,this._viewBox,[e,n,r,i,a]);var o,l,c=this.width,u=this.height,h=1/s(r/c,i/u);return a&&(o=u/i,l=c/r,c>r*o&&(e-=(c-r*o)/2/o),u>i*l&&(n-=(u-i*l)/2/l)),this._viewBox=[e,n,r,i,!!a],this._viewBoxShift={dx:-e,dy:-n,scale:h},this.forEach(function(t){t.transform("...")}),this};var B;t._engine.initWin=function(t){var e=t.document;e.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!e.namespaces.rvml&&e.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),B=function(t){return e.createElement("<rvml:"+t+' class="rvml">')}}catch(n){B=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),n=e.container,r=e.height,i=e.width,a=e.x,s=e.y;if(!n)throw new Error("VML container not found.");var o=new t._Paper,l=o.canvas=t._g.doc.createElement("div"),c=l.style;return a=a||0,s=s||0,i=i||512,r=r||342,o.width=i,o.height=r,i==+i&&(i+="px"),r==+r&&(r+="px"),o.coordsize=1e3*b+g+1e3*b,o.coordorigin="0 0",o.span=t._g.doc.createElement("span"),o.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",l.appendChild(o.span),c.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",i,r),1==n?(t._g.doc.body.appendChild(l),c.left=a+"px",c.top=s+"px",c.position="absolute"):n.firstChild?n.insertBefore(l,n.firstChild):n.appendChild(l),o.renderfix=function(){},o},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=d,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var M=t.st;for(var R in L)L[e](R)&&!M[e](R)&&(M[R]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t].apply(n,e)})}}(R))}(window.Raphael)}(),l=function(t){var e=i,n=function(){};return e.augment(n,{toFront:function(){return this.get("el").toFront(),this},toBack:function(){return this.get("el").toBack(),this},translate:function(t,e){var n=this,r=n.get("el");return r.translate(t,e),this},index:function(){var t=this,n=t.get("parent");return e.indexOf(n.get("children"),t)},animate:function(t,e,n,r){return this.get("el").animate(t,e,n,r),this},stopAnimate:function(){return this.get("el").stop(),this},drag:function(t,e,n,r,i,a){return this.get("el").drag(t,e,n,r,i,a),this}}),t=n}(),c=function(t){function e(t,e){return t>e?e:t}function n(t,e){return t>e?t:e}function r(t,e){this.start=t,this.end=e,this.init()}var a=i;return a.augment(r,{init:function(){var t=this;start=t.start,end=t.end;var r=t.tl={};r.x=e(start.x,end.x),r.y=e(start.y,end.y);var i=t.tr={};i.x=n(start.x,end.x),i.y=e(start.y,end.y);var a=t.bl={};a.x=e(start.x,end.x),a.y=n(start.y,end.y);var s=t.br={};s.x=n(start.x,end.x),s.y=n(start.y,end.y);var o=t.cc={};o.x=(s.x-r.x)/2+r.x,o.y=(s.y-r.y)/2+r.y},reset:function(t,e){this.start=t,this.end=e,this.init()},isInRange:function(t,e){a.isObject(t)&&(e=t.y,t=t.x);var n=this,r=n.tl,i=n.br;return t>=r.x&&t<=i.x&&e>=r.y&&e<=i.y},isInVertical:function(t){a.isObject(t)&&(t=t.y);var e=this,n=e.tl,r=e.br;return t>=n.y&&t<=r.y},isInHorizontal:function(t){a.isObject(t)&&(t=t.x);var e=this,n=e.tl,r=e.br;return t>=n.x&&t<=r.x},getWidth:function(){var t=this.tl,e=this.br;return e.x-t.x},getHeight:function(){var t=this.tl,e=this.br;return e.y-t.y}}),t=r}(),u=function(t){var e=i,n=function(){};return n.ATTRS={actived:!1},e.augment(n,{isActived:function(){return this.get("actived")},setActived:function(){this.setActiveStatus(!0),this.set("actived",!0)},setActiveStatus:function(){},clearActived:function(){this.setActiveStatus(!1),this.set("actived",!1),this.clearActivedItem&&this.clearActivedItem()}}),t=n}(),h=function(t){var e=i,n=function(){};return n.ATTRS={},e.augment(n,{isItemActived:function(t){return t.isActived()},getActiveItems:function(){return this.get("children")},setItemActived:function(t,e){e?t.setActived():t.clearActived()},onActived:function(t){this.fire("itemactived",{item:t}),this.fireUpGroup&&this.fireUpGroup("actived",t)},onUnActived:function(t){this.fire("itemunactived",{item:t}),this.fireUpGroup&&this.fireUpGroup("unactived",t)},setActivedItem:function(t){var e=this;e.clearActivedItem(),t&&!e.isItemActived(t)&&(e.setItemActived(t,!0),e.onActived(t))},getActived:function(){var t=this,n=t.getActiveItems(),r=null;return e.each(n,function(e){return t.isItemActived(e)?(r=e,!1):void 0}),r},clearActivedItem:function(t){var e=this;t=t||e.getActived(),t&&(e.setItemActived(t,!1),e.onUnActived(t))}}),t=n}(),f=function(t){function e(t){return null==t}function n(t){var e=1;if(1e-6>t)return e;for(;t>10;)e=10*e,t/=10;for(;1>t;)e/=10,t=10*t;return e}function a(t,e,r){r=r||C;var i=r==C?!1:!0,a=1;0>t&&(a=-1),t*=a;var o=n(t);return a*=o,t/=o,t=i?s(r,t):e&&a>0?k.snapFloor(r,t):k.snapCeiling(r,t),t*a}function s(t,e){for(var n=e,r=e,i=e,a=1;a<t.length;a++){var s=t[a];if(s>e){n=s;break}r=s}return i=Math.abs(r-e)<Math.abs(n-e)?r:n}function o(t,e,n){if(n)var r=Math.ceil(t/e,10);else var r=Math.floor(t/e,10);return r*e}function l(t,e){var n=e.toString(),r=n.indexOf(".");if(-1==r)return t;var i=n.substr(r+1).length;return parseFloat(t.toFixed(i))}function c(t){for(var e=t[0],n=t[0],r=t.length,i=1;r>i;i++){var a=t[i];a>e&&(e=a),n>a&&(n=a)}return n==e&&(n>0?n=0:e=0),{max:e,min:n}}function u(t,e){var n=[];return e?k.isArray(t[0])&&k.each(t[0],function(e,r){for(var i=e,a=1;a<t.length;a++)i+=t[a][r];n.push(i)}):k.each(t,function(t){k.isArray(t)?n=n.concat(t):n.push(t)}),n}function h(t,e,n){var r=u(t,n);return e&&(r=k.map(r,e)),c(r)}function f(t){return t=new Date(t),w.getDate(t).getTime()}function g(t){t=new Date(t);var e=w.getDate(t);return t>e&&(e=w.addDay(1,e)),e.getTime()}function d(t){return new Date(t).getFullYear()}function p(t){return new Date(t,0,1).getTime()}function v(t){return new Date(t).getMonth()}function m(t,e){var n=d(t),r=d(e),i=v(t),a=v(e);return 12*(r-n)+(a-i)%12}function x(t,e){return new Date(t,e,1).getTime()}function y(t,e){return Math.ceil((e-t)/M)}function b(t,e){return Math.ceil((e-t)/B)}function _(t,e){return Math.ceil((e-t)/6e4)}var k=i,w=r,C=[0,1,1.5,2,2.5,3,4,5,6,8,10],S=[0,1,2,5,10],A=[1,2,4,6,8,12],T=5,I=7,P={};P.caculate=function(t,n){var r,i=t.min,s=t.max,c=t.data,u=t.interval,f=[],g=t.minCount||T,d=t.maxCount||I,p=(g+d)/2,v=!1;if(n&&"percent"==n&&(i=0,s=100,u=25),e(i)||e(s)||e(u)){var m=h(c,null,v);if(e(s)&&(s=m.max+.05*(m.max-m.min)),e(i)&&(i=m.min),s==i&&(s=i+1,i-=1,u=1),e(u)){var x=(s-i)/p;u=a(x,!0,S),r=parseInt((s-i)/u,10),r>d&&(r=d),g>r&&(r=g),u=a((s-i)/r,!0,S),s=o(s,u,!0),i=o(i,u),r=Math.round((s-i)/u)}}e(r)&&(r=(s-i)/u),i=l(i,u),e(i)||f.push(i);for(var y=1;r>=y;y++)f.push(l(u*y+i,u));return{min:i,max:l(s,u),interval:u,count:r,ticks:f,info:m}},P.Time={};var L=6e4,B=36e5,M=864e5;return P.Time.caculate=function(t){var n,r=t.min,i=t.max,a=t.data,s=t.interval,o=[],c={};if(e(r)||e(i)||e(s)){if(c=h(a,function(t){return k.isDate(t)&&(t=t.getTime()),k.isString(t)&&(t=t.replace(/-/gi,"/"),t=new Date(t)),t}),e(i)&&(i=c.max),e(r)&&(r=c.min),i-r>M&&(r=f(r),i=g(i)),i==r)throw"max not  equal to min";if(e(s)){var u,w,C=i-r,S=M,T=365*S;s=parseInt(C/(t.maxCount||8)),u=s/T;var I=d(r);if(u>.51){w=Math.ceil(u),s=w*T;for(var P=d(i),R=I;P+w>=R;R+=w)o.push(p(R));s=null}else if(u>.0834){for(var w=d(r),O=Math.floor(u/.0834),N=v(r),D=m(r,i),R=0;D+O>=R;R+=O)o.push(x(I,R+N));s=null}else if(s>.5*S){var G=new Date(r),w=G.getFullYear(),O=G.getMonth(r),E=G.getDate(),F=Math.ceil(s/S),z=y(r,i);s=F*S;for(var R=0;z+F>R;R+=F)o.push(new Date(w,O,E+R).getTime())}else if(s>B){var G=new Date(r),w=G.getFullYear(),O=G.getMonth(r),F=G.getDate(),V=G.getHours(),U=k.snapTo(A,Math.ceil(s/B)),j=b(r,i);s=U*B;for(var R=0;j+U>=R;R+=U)o.push(new Date(w,O,F,V+R).getTime())}else if(s>L){var Y=_(r,i),H=Math.ceil(s/L);s=H*L;for(var R=0;Y+H>=R;R+=H)o.push(r+R*L)}else{r=1e3*Math.floor(r/1e3);var W=Math.ceil((i-r)/1e3),q=Math.ceil(s/1e3);s=1e3*q;for(var R=0;W+q>R;R+=q)o.push(r+1e3*R)}}}if(!o.length){r=1e3*Math.floor(r/1e3),i=1e3*Math.ceil(i/1e3);for(var n=(i-r)/s,R=0;n>=R;R++)o.push(l(s*R+r,s))}return{max:c.max||i,min:c.min||r,interval:s,ticks:o,count:o.length}},P.TimeCategory={},P.TimeCategory.caculate=function(t){var e={},n=[],r=t.maxCount||I,i=u(t.data);if(i.length<r)n=[].concat(i);else{for(var a=i.length,s=parseInt(a/r,10),o=0;a-1>o;o+=s)n.push(i[o]);var l=i[a-1];i[1]-i[0]>2*(l-i[i.length-2])&&n.pop(),n.push(l)}return e.categories=i,e.ticks=n,e},t=P}(),g=function(t){var e=i,n=function(){};return n.ATTRS={stackType:"none"},e.augment(n,{processStackedPoint:function(t,e){var n=this,r=n.getVisiblePrev(),i=n.getXName(),a=n.getYName();if(r){var s=r.getPoints()[e],o=n.getBaseValue();if(n.isInCircle()){var l,c=n.get("xAxis"),u=c.getDistance(t.x,t.y),h=s.r||c.getDistance(s.x,s.y);u=h+u,l=c.getCirclePoint(t.xValue,u),t.x=l.x,t.y=l.y,t.r=u,t.ir=h}else t[a]=t[a]+s[a]-o;t.lowY=s[a],t.lowX=s[i]}},getStackedPercent:function(t,e){var n=this,r=n.get("parent").getStackedData(n.get("yAxis"),"yAxis"),i=r[e];return i?t/i:0/0},parseYValue:function(t,n){var r,i=this,a=i.get("stackType"),s=i.get("data"),n=null==n?e.indexOf(s,t):n;return"percent"==a&&(r=i.getStackedPercent(t,n),t=100*r),t},getVisiblePrev:function(){var t,n=this,r=n.get("parent"),i=n.get("yAxis"),a=r.get("children");return e.each(a,function(e){return e==n?!1:void(e.get("visible")&&e.get("yAxis")==i&&(t=e))}),t},getTipInfo:function(t){var e=this,n=e.get("stackType");if("percent"==n){var r=t.yValue||0;return[t.value,"\uff08"+r.toFixed(2)+"%\uff09"]}return t.value},isStacked:function(){var t=this,e=t.get("stackType");return e&&"none"!==e}}),t=n}(),d=function(t){var e=i,n=function(t,e){return n.initTheme(t,e)};n.initTheme=function(t,n){return e.mix(!0,{},t,n)};var r={duration:1e3,line:{"stroke-width":2,"stroke-linejoin":"round","stroke-linecap":"round"},lineActived:{"stroke-width":3},markers:{marker:{radius:3},actived:{radius:6,stroke:"#fff"}},animate:!0};return n.Origin=n({plotCfg:{margin:[50]},yTickCounts:[3,5],xTickCounts:[5,10],title:{"font-size":"16px","font-family":"SimSun,Georgia, Times, serif",fill:"#274b6d"},subTitle:{"font-size":14,"font-family":"tahoma,arial,SimSun,Georgia, Times, serif",fill:"#4d759e"},xAxis:{labels:{label:{y:12}}},yAxis:{line:null,tickLine:null,grid:{line:{stroke:"#c0c0c0"}},title:{text:"",rotate:-90,x:-30},position:"left",labels:{label:{x:-12}}},legend:{dy:30},seriesOptions:{lineCfg:r,areaCfg:{line:{"stroke-width":.5,"stroke-linejoin":"round","stroke-linecap":"round"},lineActived:{"stroke-width":1},animate:!0,markers:r.markers},arearangeCfg:{markers:null,line:{stroke:null},area:{stroke:null},lineActived:{stroke:null},areaActived:{stroke:null}},flagCfg:{flags:{flag:{distance:-15,line:{stroke:"#333","stroke-width":1},shapeType:"rect",shapeCfg:{stroke:"#333",width:22,height:22},title:"A",titleCfg:{rotate:90,fill:"#333333","font-size":13,"font-weight":"bold"},text:""}},duration:1e3,animate:!0,onSeries:"xaxis"},candlestickCfg:{candlesticks:{candlestick:{riseLine:{stroke:"red"},fallLine:{stroke:"green"},riseShape:{stroke:"red",fill:"red"},fallShape:{stroke:"green",fill:"green"}}}},bubbleCfg:{circle:{"stroke-width":1,"fill-opacity":.5},activeCircle:{"stroke-width":2}},pieCfg:{colors:["#5e90c9","#1c2d3f","#a9d052","#a12d2d","#43bbb4","#5a2a94","#fabe3c","#2279dc","#e360e5","#48000c"],item:{stroke:"#fff"},labels:{distance:30,label:{}}}},tooltip:{x:-999,y:-999,offset:5}}),n.Base=n.initTheme(n.Origin,{colors:["#5e90c9","#1c2d3f","#a9d052","#a12d2d","#43bbb4","#5a2a94","#fabe3c","#2279dc","#e360e5","#48000c"],symbols:["circle","diamond","square","triangle","triangle-down"],plotCfg:{margin:[50,50,100]},seriesOptions:{pieCfg:{colors:["#5e90c9","#1c2d3f","#a9d052","#a12d2d","#43bbb4","#5a2a94","#fabe3c","#2279dc","#e360e5","#48000c"]}}}),n.SmoothBase=n.initTheme(n.Origin,{title:{fill:"#505050"},subTitle:{fill:"#999"},xAxis:{line:{"stroke-width":1,stroke:"#a7a7a7"},tickLine:null,labels:{label:{y:12,fill:"#444444","font-size":"12"}}},yAxis:{grid:{line:{stroke:"#a7a7a7","stroke-dasharray":"."}},title:{text:"",rotate:-90,x:-35,fill:"#444"},position:"left",labels:{label:{x:-20,fill:"#444444","font-size":"12"}}},plotCfg:{margin:[50,50,100]},legend:{back:null,spacingX:30,itemCfg:{label:{fill:"#a7a7a7","text-anchor":"start",cursor:"pointer","font-size":"12"}}},colors:["#4dceff","#79c850","#ffb65d","#fc694b","#7179cb","#9a9792"],symbols:["circle"],seriesOptions:{lineCfg:{line:{"stroke-width":4},lineActived:{"stroke-width":4},markers:{marker:{fill:"#fff",radius:6,"stroke-width":4},actived:{fill:"#fff","stroke-width":5,stroke:null}}},areaCfg:{markers:{single:!0,marker:{fill:"#fff",radius:6,"stroke-width":4},actived:{fill:"#fff","stroke-width":5,stroke:null}},area:{"fill-opacity":.5,stroke:null}},pieCfg:{colors:["#4dceff","#79c850","#ffb65d","#fc694b","#7179cb","#9a9792"],labels:{distance:30,label:{"font-size":"12",fill:"#a7a7a7"}}}},tooltip:{offset:10,title:{"font-size":"12","text-anchor":"start",x:8,y:15,fill:"#444"},value:{"font-size":"12","font-weight":"normal","text-anchor":"start",fill:"#444"},crossLine:{stroke:"#d7d7d7"}}}),n.Smooth1=n.initTheme(n.SmoothBase),n.Smooth2=n.initTheme(n.SmoothBase,{colors:["#00a3d7","#6ebb46","#f6c100","#ff6a00","#e32400","#423ba8"],symbols:["circle","diamond","square","triangle","triangle-down"],seriesOptions:{pieCfg:{colors:["#00a3d7","#6ebb46","#f6c100","#ff6a00","#e32400","#423ba8"]}}}),n.Smooth3=n.initTheme(n.SmoothBase,{colors:["#40a00e","#444444","#85cc82","#5e5e64","#60b336","#89847f"],seriesOptions:{pieCfg:{colors:["#40a00e","#444444","#85cc82","#5e5e64","#60b336","#89847f"]}}}),n.Smooth4=n.initTheme(n.SmoothBase,{colors:["#e1c673","#c49756","#8c6c42","#595348","#c86c4b","#7c4f34"],seriesOptions:{pieCfg:{colors:["#e1c673","#c49756","#8c6c42","#595348","#c86c4b","#7c4f34"]}}}),n.Smooth5=n.initTheme(n.SmoothBase,{colors:["#89847f","#aea9a2","#606060","#232323","#d8d2c7","#444444"],seriesOptions:{pieCfg:{colors:["#89847f","#aea9a2","#606060","#232323","#d8d2c7","#444444"]}}}),n.Smooth6=n.initTheme(n.SmoothBase,{colors:["#ff9d40","#89847f","#ff8127","#b4aea7","#ffba66","#606060"],seriesOptions:{pieCfg:{colors:["#ff9d40","#89847f","#ff8127","#b4aea7","#ffba66","#606060"]}}}),n.Smooth7=n.initTheme(n.SmoothBase,{colors:["#25b0dd","#7fdcff","#30b2c8","#5dc5ee","#266796","#258bca"],seriesOptions:{pieCfg:{colors:["#25b0dd","#7fdcff","#30b2c8","#5dc5ee","#266796","#258bca"]}}}),t=n}(),p=function(t){var e=a;return t=e}(),v=function(t){var e=u;return e.Group=h,t=e}(),m=function(t){var e=p;return t=e}(),x=function(){function t(t){return n._g.doc.createElementNS("http://www.w3.org/2000/svg",t)}var e=i,n=m;n.fn.group=function(){var t=n._engine.group(this);return this.__set__&&this.__set__.push(t),t},n._getPath.group=function(t){var e=t._getBBox();return n._rectPath(0,0,e.width,e.height)};var r,a=function(t,e){a.superclass.constructor.call(this,t,e)};if(e.extend(a,n.el.constructor),r=a.prototype,r.group=function(){var t=this.paper,e=t.group();return this.node.appendChild(e.node),e},window.Raphael.svg&&(n._engine.group=function(e){var n=t("g");e.canvas&&e.canvas.appendChild(n);var r=new a(n,e);return r.type="group",r},r.add=function(t){var e=this.paper.add(t),n=this.node;return e.forEach(function(t){n.appendChild(t.node)}),e}),window.Raphael.vml){var t=function(){return n._g.doc.createElement("div")};n._getPath.group=function(t){var e=(t.node,t.__set),r=0,i=0;return e&&e.forEach(function(t){var e=t.getBBox();r<e.width&&(r=r),i<e.height&&(i=e.height)}),n._rectPath(0,0,r,i)},r.add=function(t){var e=this.paper.add(t),n=this.node,r=this.__set;return e.forEach(function(t){n.appendChild(t.node),r&&r.push(t)}),this.__set||(this.__set=e),e},r.translate=function(t,e){var n=this.node,r=parseFloat(n.style.top,10)||0,i=parseFloat(n.style.left,10)||0;n.style.top=r+e+"px",n.style.left=i+t+"px"},r.move=function(t,e){var n=this.node;n.style.top=e+"px",n.style.left=t+"px"},r.animate=function(t,n,r,i){var a=this.node,s=parseFloat(a.style.top,10)||0,o=parseFloat(a.style.left,10)||0;e.animStep(n,function(e){a.style.top=s+(t.y-s)*e+"px",a.style.left=o+(t.x-o)*e+"px"},i)},r.transform=function(t){var e=this.__set;e&&e.forEach(function(e){e.transform(t)}),a.superclass.transform.call(this,t)},n._engine.group=function(e){var n=t();e.canvas.appendChild(n);var r=new a(n,e);return r.type="group",n.style.position="relative",r}}}(),y=function(t){function e(t,e,n){function r(t,e,n,l){var c=(new Date).getTime(),u=c-i;if(u>=n)return e(1,t),void(l&&l());var h=Math.pow(u/n,1.7);e(h,t),o[s]=a.requestAnimationFrame(function(){r(t+1,e,n,l)})}var i=(new Date).getTime(),s=a.guid(l);return r(0,e,t,n),s}function n(t){o[t]&&(a.cancelAnimationFrame(o[t]),delete o[t])}function r(t){var e={};return e.target=t.srcElement,e.pageX=t.clientX+document.body.scrollLeft-document.body.clientLeft,e.pageY=t.clientY+document.body.scrollTop-document.body.clientTop,a.each(u,function(n){e[n]=t[n]}),e.stopPropagation=function(){window.event.cancelBubble=!0},e}var a=i,s=m,o={},l="h",c=Object.prototype,u=(c.toString,["srcElement","toElement","clientX","clientY","keyCode"]),h=/^\s*<(\w+|!)[^>]*>/,f=document.createElement("table"),g=document.createElement("tr"),d={tr:document.createElement("tbody"),tbody:f,thead:f,tfoot:f,td:g,th:g,"*":document.createElement("div")};return a.mix(a,{vml:s.vml,svg:s.svg,createDom:function(t){var e=h.test(t)&&RegExp.$1;return e in d||(e="*"),container=d[e],t=t.replace(/(^\s*)|(\s*$)/g,""),container.innerHTML=""+t,container.childNodes[0]},getOffset:function(t){for(var e={},n=0,r=0;null!=t&&t!=document.body;)n+=t.offsetLeft||0,r+=t.offsetTop||0,t=t.offsetParent;return e.top=r,e.left=n,e},contains:function(t,e){if(!t||!e)return!1;for(var n=!1,r=e.parentNode;null!=r&&r!=document.body;){if(r==t){n=!0;break}r=r.parentNode}return n},getWidth:function(t){var e=a.getStyle(t,"width");return"auto"==e&&(e=t.offsetWidth),parseFloat(e)},getHeight:function(t){var e=a.getStyle(t,"height");return"auto"==e&&(e=t.offsetHeight),parseFloat(e)},getOuterWidth:function(t){var e=a.getWidth(t),n=parseFloat(a.getStyle(t,"borderLeftWidth"))||0,r=parseFloat(a.getStyle(t,"paddingLeft")),i=parseFloat(a.getStyle(t,"paddingRight")),s=parseFloat(a.getStyle(t,"borderRightWidth"))||0;return e+n+s+r+i},getOuterHeight:function(t){var e=a.getHeight(t),n=parseFloat(a.getStyle(t,"borderTopWidth"))||0,r=parseFloat(a.getStyle(t,"paddingTop")),i=parseFloat(a.getStyle(t,"paddingBottom")),s=parseFloat(a.getStyle(t,"borderBottomWidth"))||0;return e+n+s+r+i},getStyle:function(t,e){return window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.currentStyle[e]},addEvent:function(t,e,n){t.attachEvent?(t["e"+e+n]=n,t[e+n]=function(){window.event.target=window.event.srcElement,t["e"+e+n](r(window.event))},t.attachEvent("on"+e,t[e+n])):t.addEventListener(e,n,!1)},removeEvent:function(t,e,n){t.detachEvent?(t.detachEvent("on"+e,t[e+n]),t[e+n]=null):t.removeEventListener(e,n,!1)},angle:function(t,e,n,r){return s.angle(t,e,n,r)},animStep:function(t,n,r){return e(t,n,r)},stopStep:function(t){n(t)},animPath:function(t,e,n,r,i,s){function o(){t.attr("path",e),s&&s()}if(a.vml)return void o();if(n=n||0,r=r||400,!e)return void o();var l=t.getPath();if(!l)return void o();var c,u=a.parsePathString(e),h=l.slice(-1*n);if(l.length>u.length)c=l.slice(0,u.length);else if(c=l.concat([]),n)for(var f=c.length;f<u.length;f++)c=c.concat(h);t.attr("path",c),t.animate({path:u},r,i,o)},getPointAtLength:function(t,e){return s.getPointAtLength(t,e)},isPointInsidePath:function(t,e,n){return s.isPointInsidePath(t,e,n)},getSubpath:function(t,e,n){return s.getSubpath(t,e,n)},parsePathString:function(t){return s.parsePathString(t)},parsePathArray:function(t){if(a.isArray(t)){var e=a.map(t,function(t){var e=t.join(" ");return e.replace(/([a-z,A-Z])\s+/,"$1")});return e.join(" ")}return t},transformPath:function(t,e){return s.transformPath(t,e)},trySet:function(t,e,n){return t&&!t[e]&&(t[e]=n),t[e]},highlight:function(t,e){var n=s.color(t),r=n.l*(1+e);return r>=1&&(r=1),s.hsl2rgb(n.h,n.s,r).hex},dark:function(t,e){var n=s.color(t),r=n.l*(1-e);return s.hsl2rgb(n.h,n.s,r).hex}}),t=a}(),b=function(t){var e=y,n=function(t){this.cfg=t,this._attrs={autoRender:!0,visible:!0},this.events={};var n=this.getDefaultCfg();e.mix(this._attrs,n,t),this.get("autoRender")&&this.render()};return n.ATTRS={zIndex:null,el:null,node:null,canvas:null,visible:!0},e.augment(n,{getDefaultCfg:function(){return{}},set:function(t,n){var r="_onRender"+e.ucfirst(t);this[r]&&this[r](n,this._attrs[t]),this._attrs[t]=n},get:function(t){return this._attrs[t]},getCfgAttr:function(t){return this.cfg[t]},show:function(){this.get("el").show(),this.get("visible")||this.fire("show"),this.set("visible",!0)},hide:function(){this.get("el").hide(),this.get("visible")&&this.fire("hide"),this.set("visible",!1)},attr:function(t,n){{var r=this;r.get("el")}return e.isObject(t)?(e.each(t,function(t,e){r.attr(e,t)}),r):void 0!==n?r._setAttr(t,n):r._getAttr(t)},on:function(t,n){var r=this,i=r.get("node"),a=this.events,s=a[t];return e.addEvent(i,t,n),s||(s=a[t]=[]),s.push(n),this},off:function(t,n){var r=this,i=r.get("node"),a=this.events,s=a[t];return t?(e.removeEvent(i,t,n),s&&e.remove(s,n),this):(e.each(a,function(t,n){e.each(t,function(t){e.removeEvent(i,n,t)})}),this.events={},this)},fire:function(t,n){var r=this,i=r.events,a=i[t];a&&e.each(a,function(t){t(n)})},_getAttr:function(t){var n=this,r=n.get("el"),i=r.attr?r.attr(t):"",a="__get"+e.ucfirst(t);return n[a]&&(i=n[a](i)),i},_setAttr:function(t,n){var r=this,i=r.get("el"),a="__set"+e.ucfirst(t);return r[a]?r[a](n):i.attr&&i.attr(t,n),r},_onRenderElCls:function(t,n){var r=this,i=r.get("node"),a=i.getAttribute("class"),s=a?a.split(" "):[];n&&e.remove(s,n),t&&s.push(t),i.setAttribute("class",s.join(" "))},_onRenderZIndex:function(t){var n=this,r=n.get("node");null!=t&&(r.setAttribute("zIndex",t),e.vml&&(r.style.zIndex=t))},beforeRenderUI:function(){},render:function(){var t,n=this,r=(n.get("zIndex"),n._attrs);n.get("rendered")||(n.createDom(),n.beforeRenderUI(),n.renderUI(),n.set("rendered",!0),t=n.get("node"),0==this.get("visible")&&this.hide(),e.each(r,function(t,r){var i=n["_onRender"+e.ucfirst(r)];i&&i.call(n,t)}),n.bindUI())},createDom:function(){},renderUI:function(){},bindUI:function(){},remove:function(t){void 0==t&&(t=!0);var e=this;e.get("parent")&&(e.get("parent").removeChild(e,t),e.set("parent",null)),t&&e.destroy()},destroy:function(){{var t=this,e=t.get("el"),n=t.get("destroyed");t.get("node")}n||(e.remove&&e.remove(),t._attrs={},t.events={},t.set("destroyed",!0))}}),t=n}(),_=function(t){function e(t,e){return a.isArray(t)&&(t=t.join(" ")),"M"+t+e}var n=b,r=l,a=i,s=function(t){s.superclass.constructor.call(this,t)};s.ATTRS={attrs:{}},a.extend(s,n),a.mixin(s,[r]),a.augment(s,{isShape:!0,createDom:function(){var t,e,n,r=this,i=r.get("el");i||(e=r.cfg,n=r.parseElCfg(e.attrs),i=r.createElement(n),r.set("el",i)),t=i.node,t.shape=this,r.set("node",t),0==this.get("visible")&&i.hide()},createElement:function(t){var e,n=this,r=n.get("parent"),i=r.get("el").add([t]);return e=i[0]},parseElCfg:function(t){return t.type=this.get("type"),t},getTotalLength:function(){return this.get("el").getTotalLength()},rotate:function(t,e,n){var r=this;if(r.isGroup&&null==e&&null==n){var i=r._getTranslatePoint();e=i.x,n=i.y}this.get("el").rotate(t,e,n)},scale:function(t,e,n,r){var i=this,a=i.get("el");a.scale(t,e,n,r)},transform:function(t){var e=this,n=e.get("el");n.transform(t)},getBBox:function(){return this.get("el").getBBox()},getPath:function(){var t=this,e=t.get("el"),n=e.getPath();return a.isString(n)&&(n=a.parsePathString(n)),n},getPathString:function(){var t=this,e=t.getPath();return a.parsePathArray(e)},getTransformPath:function(){var t=this,e=t.getPath(),n=t.get("el").matrix;return a.transformPath(e,n.toTransformString())},_getTranslatePoint:function(){var t=this,e=t.getTransformPath(),n={x:0,y:0};return a.each(e,function(t){"M"==t[0]&&(n.x=t[1],n.y=t[2])}),n},__getTransform:function(t){if(a.isString(t)){t=t.replace(/([t,s,r])/,";$1 ").split(";");var e=[];a.each(t,function(t){if(t){var n=t.split(" ");n=a.map(n,function(t){return a.isNumeric(t)?parseFloat(t):t}),e.push(n)}}),t=e}return t}});var o=function(t){o.superclass.constructor.call(this,t)};o.ATTRS={cx:null,cy:null,r:null},a.extend(o,s),s.Circle=o;var c=function(t){c.superclass.constructor.call(this,t)};c.ATTRS={x:null,y:null,width:null,height:null,r:{value:0}},a.extend(c,s),s.Rect=c;var u=function(t){u.superclass.constructor.call(this,t)};u.ATTRS={cx:null,cy:null,rx:null,ry:null},a.extend(u,s),s.Ellipse=u;var h=function(t){h.superclass.constructor.call(this,t)};h.ATTRS={path:null},a.extend(h,s),s.Path=h;var f=function(t){f.superclass.constructor.call(this,t)};f.ATTRS={x1:null,y1:null,x2:null,y2:null},a.extend(f,h),a.augment(f,{parseElCfg:function(t){return t.type="path",t.path=a.substitute("M {x1},{y1}L{x2},{y2}",t),t},_getLinePoint:function(t,e){var n=this.getPath();return n[t][e]},_setLinePoint:function(t,e,n){var r=this,i=this.getPath();i[t][e]=n,r.attr("path",i)},__setX1:function(t){this._setLinePoint(0,1,t)},__getX1:function(){return this._getLinePoint(0,1)},__setX2:function(t){this._setLinePoint(1,1,t)},__getX2:function(){return this._getLinePoint(1,1)},__setY1:function(t){this._setLinePoint(0,2,t)},__getY1:function(){return this._getLinePoint(0,2)},__setY2:function(t){this._setLinePoint(1,2,t)},__getY2:function(){return this._getLinePoint(1,2)}}),s.Line=f;var g=function(t){g.superclass.constructor.call(this,t)};g.ATTRS={points:[]},a.extend(g,h),a.augment(g,{__setPoints:function(t){var n=this,r=(n.get("el"),e(t,""));n.attr("path",r)},parseElCfg:function(t){return t.type="path",t.path=e(t.points,""),t}}),s.PolyLine=g;var d=function(t){g.superclass.constructor.call(this,t)};d.ATTRS={points:[]},a.extend(d,h),a.augment(d,{__setPoints:function(t){var n=this,r=(n.get("el"),e(t,"z"));n.attr("path",r)},parseElCfg:function(t){return t.type="path",t.path=e(t.points,"z"),t}}),s.Polygon=d;var p=function(t){p.superclass.constructor.call(this,t)};p.ATTRS={x:null,y:null,text:null,font:null,"text-anchor":null},a.extend(p,s),s.Text=p;var v=function(t){v.superclass.constructor.call(this,t)};a.extend(v,p),v.ATTRS={rotate:null},a.augment(v,{parseElCfg:function(t){return t.type="text",t.rotate&&(t.transform=a.substitute("r{rotate} {x} {y}",t)),t}}),s.Label=v;var m=function(t){m.superclass.constructor.call(this,t)};m.ATTRS={symbol:{value:"custom"},radius:{value:5},path:{},x:null,y:null},m.Symbols={circle:function(t,e,n){return[["M",t,e-n],["a",n,n,0,1,1,0,2*n],["a",n,n,0,1,1,0,-2*n],["z"]]},square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["z"]]},diamond:function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["z"]]},triangle:function(t,e,n){var r=n/.866,i=n;return[["M",t,e-n],["L",t+r,e+i],["L",t-r,e+i],["z"]]},"triangle-down":function(t,e,n){var r=n/.866,i=n;return[["M",t,e+n],["L",t+r,e-i],["L",t-r,e-i],["z"]]}},a.extend(m,s),a.augment(m,{__setRadius:function(t){var e=this,n=e.get("attrs");e._setSize(n.x,n.y,t)},__getRadius:function(){return this.get("attrs").radius},__setX:function(t){var e=this,n=e.get("attrs");e._setSize(t,n.y,n.radius)},__getX:function(){return this.get("attrs").x},__setY:function(t){var e=this,n=e.get("attrs");e._setSize(n.x,t,n.radius)},__getY:function(){return this.get("attrs").y},__getSymbol:function(){return this.get("attrs").symbol},_setSize:function(t,e,n){var r=this,i=r.get("attrs"),s=r.get("el");if("image"!==s.type){var o={x:t,y:e,radius:n};a.mix(i,o);var l=r._getPath(i);s.attr("path",l)}else a.mix(i,{width:2*n,height:2*n,x:t-(n-i.radius),y:e-(n-i.radius),radius:n}),s.attr(i)
},animate:function(t,e,n,r){var i,s=this,o=s.get("attrs");if("image"==s.get("el").type){var l=t.radius||s.attr("radius");t.x=t.x-l,t.y=t.y-l,a.mix(o,{x:t.x,y:t.y}),s.get("el").animate(t,e,n,r)}else a.mix(o,{x:t.x,y:t.y}),i=s._getPath(o),s.get("el").animate({path:i},e,n,r)},parseElCfg:function(t){var e=this,n=t.symbol,r=t.radius||5;return n&&!a.isFunction(n)&&-1!=n.indexOf("url")?(t.type="image",t.src=n.replace(/url\((.*)\)/,"$1"),t.width=2*t.radius,t.height=2*t.radius,a.vml?(t.x-=r-1,t.y-=r-1):(t.x-=r,t.y-=r)):(t.type="path",t.path=e._getPath(t)),t},_getPath:function(t){if(!t.symbol&&t.path)return a.substitute(t.path,t);var e;if(e=a.isFunction(t.symbol)?t.symbol:m.Symbols[t.symbol])return e(t.x,t.y,t.radius);throw"not support this type "+t.symbol}}),s.Marker=m;var x=function(t){x.superclass.constructor.call(this,t)};return x.ATTRS={src:null,x:null,y:null,width:null,height:null},a.extend(x,s),s.Image=x,t=s}(),k=function(t){var e=_,n=b,r=i,a=function(t){a.superclass.constructor.call(this,t)};return r.extend(a,n),a.ATTRS={children:[]},r.augment(a,{isContainer:!0,beforeRenderUI:function(){this.set("children",[])},getGroupClass:function(){},getShapeClass:function(t){var n=r.ucfirst(t);return e[n]?e[n]:e},addShape:function(t,e){var n,i,a,s=this;return r.isObject(t)?(i=t,t=i.type):i={type:t,attrs:e,canvas:s.get("canvas")},i.parent=s,n=s.getShapeClass(t),a=new n(i),a.set("canvas",s.get("canvas")),s.addChild(a),a},addGroup:function(t,e){r.isObject(t)&&(e=t,t=null);var n,i=this,e=r.mix({parent:i,canvas:i.get("canvas")},e);return t=t||i.getGroupClass(),n=new t(e),i.addChild(n),n},removeChild:function(t,e){void 0==e&&(e=!0);var n=this,i=n.get("el"),a=n.get("children");return r.remove(a,t),i.__set&&i.__set.exclude&&i.__set.exclude(t.get("el")),e&&t.destroy(),t},addChild:function(t){var e=this,n=e.get("children");n.push(t),t.parent=t},getChildAt:function(t){return this.get("children")[t]},getCount:function(){return this.get("children").length},getLast:function(){return this.getChildAt(this.getCount()-1)},getFirst:function(){return this.getChildAt(0)},find:function(t){var e=this;return e.findBy(function(e){return e.get("id")==t})},sort:function(){var t=this,e=t.get("node"),n=r.toArray(e.childNodes);r.svg?(n.sort(function(t,e){var n=t.getAttribute("zIndex")||0,r=e.getAttribute("zIndex")||0;return+n-+r}),r.each(n,function(t){e.appendChild(t)})):r.each(n,function(t){var e=t.getAttribute("zIndex");e&&(t.style.zIndex=e)})},findBy:function(t){var e=this,n=e.get("children"),i=null;return r.each(n,function(e){return t(e)?i=e:e.findBy&&(i=e.findBy(t)),i?!1:void 0}),i},findByNode:function(t){return this.findBy(function(e){return e.get("node")==t})},clear:function(){var t=this,e=t.get("children"),n=t.get("el");r.each(e,function(t){t.destroy()}),e&&r.empty(e),n.__set&&n.__set.clear&&n.__set.clear(),n.clear&&n.clear()},destroy:function(){{var t=this;t.get("children"),t.get("el"),t.get("node")}t.get("destroyed")||(t.clear(),a.superclass.destroy.call(this))}}),t=a}(),w=function(t){var e=k,n=l,r=i,a=function(t){a.superclass.constructor.call(this,t)};return a.ATTRS={x:null,y:null},r.extend(a,e),r.mixin(a,[n]),r.augment(a,{isGroup:!0,createDom:function(){var t,e=this,n=e.get("el"),r=e.get("attrs");n||(n=e.createElement(),r&&n.attr(r),e.set("el",n)),t=n.node,t.group=e,e.set("node",t)},renderUI:function(){this._initTranslate()},_initTranslate:function(){var t=this,e=t.get("x"),n=t.get("y");e||n?t._translate(e||0,n||0):(t.set("x",e||0),t.set("y",n||0))},translate:function(t,e){var n=this,r=n.get("x")||0,i=n.get("y")||0;n.set("x",r+t),n.set("y",i+e),n._translate(t,e)},getBBox:function(){var t=this,e=t.get("children"),n=0,i=0,a={};return r.each(e,function(t){var e=t.getBBox(),r=e.width+e.x,a=e.height+e.y;r>n&&(n=r),a>i&&(i=a)}),a.x=t.get("x"),a.y=t.get("y"),a.width=n,a.height=i,a},_translate:function(t,e){var n=this,r=n.get("el");r.translate(t,e)},containsElement:function(t){var e=this,n=e.get("node");return n==t||r.contains(n,t)},animate:function(t,e,n,i){var a=this,s=a.get("el");if(r.svg){var o={};void 0!=t.x&&(o.transform="t "+t.x+" "+t.y),t["clip-rect"]&&(o["clip-rect"]=t["clip-rect"]),t["clip-circle"]&&(o["clip-circle"]=t["clip-circle"]),t["clip-angle"]&&(o["clip-angle"]=t["clip-angle"]),t.transform&&(o.transform=t.transform),s.animate(o,e,n,i)}else s.animate(t,e,n,i);a.set("x",t.x),a.set("y",t.y)},move:function(t,e){var n=this,i=n.get("x")||0,a=n.get("y")||0;r.svg?n._translate(t-i,e-a):n.get("el").move(t,e),n.set("x",t),n.set("y",e)},createElement:function(){var t=this,e=t.get("parent").get("el");return e.group()},getGroupClass:function(){return a}}),t=a}(),C=function(t){var e=i,n=w,r=m,a=k,s=function(t){s.superclass.constructor.call(this,t)};return s.ATTRS={width:{},height:{},id:{},viewbox:{}},e.extend(s,a),e.augment(s,{getGroupClass:function(){return n},renderUI:function(){var t,e=this,n=e.get("id"),i=e.get("width"),a=e.get("height");t=r(n,i,a),e.set("canvas",e),e.set("el",t),e.set("node",t.canvas)},setSize:function(t,e){this.set("width",t),this.set("height",e),this.get("el").setSize(t,e)},setViewBox:function(t,e,n,r,i){this.get("el").setViewBox(t,e,n,r,i),this.set("viewbox",{x:t,y:e,width:n,height:r})},getPoint:function(t,e){var n=this,r=n.get("node"),i=n.get("viewbox"),a=r.getBoundingClientRect(),s={};if(i){var o=i.width/n.get("width"),l=i.height/n.get("height");s.x=(t-a.left)*o+i.x,s.y=(e-a.top)*l+i.y}else s.x=t-a.left,s.y=e-a.top;return s},getRelativePoint:function(t,e){var n=this,r=n.get("viewbox"),i={};if(r){{var a=r.width/n.get("width");r.height/n.get("height")}i.x=t*a+r.x,i.y=e*a+r.y}else i.x=t,i.y=e;return i}}),t=s}(),S=function(t){var e=C;return e.Group=w,e.Shape=_,t=e}(),A=function(t){function e(t){if(!t._attrs&&t!=a.Group){var n=t.superclass.constructor;n&&!n._attrs&&e(n),t._attrs={},r.mix(!0,t._attrs,n._attrs),r.mix(!0,t._attrs,t.ATTRS)}}function n(t){e(this.constructor),n.superclass.constructor.call(this,t)}var r=i,a=S;return n.ATTRS={itemName:"item",groupName:"group",events:null},r.extend(n,a.Group),r.augment(n,{getDefaultCfg:function(){var t=this,e=t.constructor,n=e._attrs,i=r.mix(!0,{},n);return i},beforeRenderUI:function(){var t=this,e=t.get("events");n.superclass.beforeRenderUI.call(this),e&&r.each(e,function(e,n){t.on(n,e)})},getVisibleChildren:function(){var t=this,e=t.get("children");return r.filter(e,function(t){return t.get("visible")})},showChild:function(t){t&&t.show()},hideChild:function(t){t&&t.hide()},fireUp:function(t,e){var n=this,r=n.get("canvas"),i=r.chart;e=e||{},i&&(e.target=e.target||i,i.fire(t,e))},fireUpGroup:function(t,e,n){var r=this,i=r.get("itemName"),a=r.get("groupName");n=n||{},n[i]=e,a&&(n[a]=r.get("parent")),r.fireUp(i.toLowerCase()+t,n)}}),t=n}(),T=function(t){var e=i,n=A,r=c,a=function(t){a.superclass.constructor.call(this,t)};return a.ATTRS={elCls:"x-chart-back",zIndex:0,margin:20,plotRange:null,background:null,border:null},e.extend(a,n),e.augment(a,{beforeRenderUI:function(){a.superclass.beforeRenderUI.call(this),this._calculateRange()},renderUI:function(){a.superclass.renderUI.call(this),this._renderBorder(),this._renderBackground()},repaint:function(){return this._calculateRange(),this._renderBorder(),this._renderBackground(),this},_renderBorder:function(){var t,n=this,r=n.get("border"),i=n.get("canvas"),a=n.get("borderShape");if(r){var s=i.get("width"),o=i.get("height");a?a.attr({width:s,height:o}):(t=e.mix({width:s,height:o},r),a=this.addShape("rect",t),this.set("borderShape",a))}},_renderBackground:function(){var t,n,r,i,a=this,s=a.get("background"),o=a.get("plotRange"),l=a.get("backShape");s&&(t=o.getWidth(),n=o.getHeight(),r=o.tl,i={x:r.x,y:r.y,width:t,height:n},l?l.attr(i):(s.image?(i.src=s.image,l=a.addShape("image",i)):(e.mix(i,s),l=a.addShape("rect",i)),a.set("backShape",l)))},_calculateRange:function(){var t,n,i=this,a=i.get("margin"),s=i.get("canvas"),o=s.get("width"),l=s.get("height"),c=i.get("plotRange"),u=0,h=0,f=0,g=0;e.isNumber(a)&&(u=h=f=g=a),e.isArray(a)&&(u=a[0],f=null!=a[1]?a[1]:a[0],g=null!=a[2]?a[2]:a[0],h=null!=a[3]?a[3]:f),t=s.getRelativePoint(h,l-g),n=s.getRelativePoint(o-f,u),c?c.reset(t,n):(c=new r(t,n),i.set("plotRange",c))}}),t=a}(),I=function(t){var e={};return e.Item=A,e.Back=T,e.Range=c,t=e}(),P=function(t){var e=i,n=I.Item,r=20,a=7,s=function(t){s.superclass.constructor.call(this,t)};return s.ATTRS={elCls:"x-chart-legend-item",label:{x:r,"text-anchor":"start",y:a,cursor:"pointer"},checked:!0,legend:null,x:null,y:null,name:null,color:null,symbol:null,type:"rect",uncheckedColor:"#CCC",line:{x1:3,y1:7,x2:17,y2:7,"stroke-width":2},circle:{cx:10,cy:7,r:5,"fill-opacity":.5},rect:{x:2,y:2,width:15,height:10}},e.extend(s,n),e.augment(s,{renderUI:function(){var t=this;s.superclass.renderUI.call(t),t._createShape(),t._createMarker(),t._createLabel()},bindUI:function(){var t=this;s.superclass.bindUI.call(t)},_setChecked:function(t){var e=this,n=e.get("shape"),r=e.get("marker"),i=e.get(t?"color":"uncheckedColor");n&&n.attr({stroke:i,fill:i}),r&&r.attr({stroke:i,fill:i})},_onRenderChecked:function(t){var e=this;e.get("rendered")&&e._setChecked(t)},getWidth:function(){var t=this,e=t.get("labelShape");return e.getBBox().width+r},_createLabel:function(){var t,n=this,i=n.get("name"),s=n.get("label"),o=e.mix({},s,{text:i});o.x||(o.x=r),o.y||(o.y=a),t=n.addShape("label",o),n.set("labelShape",t)},_createShape:function(){var t,n=this,r=n.get("type"),i=n.get("color"),a=e.mix({fill:i,stroke:i},n.get(r));a&&r&&(t=n.addShape(r,a)),t&&t.attr("cursor","pointer"),n.set("shape",t)},_createMarker:function(){var t,e=this,n=e.get("symbol");n&&(t={symbol:n,fill:e.get("color"),stroke:e.get("color")},t.radius=3,t.x=10,t.y=7,t=e.addShape("marker",t)),e.set("marker",t)}}),t=s}(),L=function(t){function e(t,e){for(var n=t.getElementsByTagName("*"),r=n.length,i=[],a=0;r>a;a++){var s=n[a].className||"";if(!(s.indexOf(e)<0)){s=s.split(/\s+/);for(var o=s.length,l=0;o>l;l++)if(e==s[l]){i.push(n[a]);break}}}return i}function n(t,n){return t.getElementsByClassName?t.getElementsByClassName(n)[0]:e(t,n)[0]}var r=I.Item,a=i,s="ac-title",o="ac-list",l=Math.max,c=function(t){c.superclass.constructor.call(this,t)};return c.ATTRS={zIndex:10,elCls:"x-chart-tootip",itemName:"tootip",crosshairs:!1,plotRange:null,shared:!1,offset:0,title:{"font-size":"10","text-anchor":"start",x:5,y:15},name:{"font-size":"12","text-anchor":"start"},value:{"font-size":"12","font-weight":"bold","text-anchor":"start"},border:{x:0,y:0,r:3,fill:"#fff","fill-opacity":.85},animate:!0,duration:100,pointRenderer:null,valueSuffix:"",valueSplit:" ",visible:!1,custom:!1,customFollow:!0,html:'<div class="ac-tooltip" style="position:absolute;visibility: hidden;"><h4 class="'+s+'"></h4><ul class="'+o+'"></ul></div>',itemTpl:'<li><span style="color:{color}">{name}</span> : {value}</li>',items:[],crossLine:{stroke:"#C0C0C0"}},a.extend(c,r),a.augment(c,{renderUI:function(){var t=this,e=t.get("custom");c.superclass.renderUI.call(t),e?t._renderCustom():(t._renderBorer(),t._renderText(),t._renderItemGroup()),t._renderCrossLine()},_renderBorer:function(){var t=this,e=(t.getBBox(),t.addShape("rect",t.get("border")));t.set("borderShape",e)},_renderText:function(){var t=this,e=t.get("title");e&&t.setTitle(e.text)},_renderCustom:function(){var t,e=this,n=e.get("html"),r=e.get("canvas").get("node").parentNode;if(/^\#/.test(n)){var i=n.replace("#","");t=document.getElementById(i)}else t=a.createDom(n);e.get("customFollow")&&(r.appendChild(t),r.style.position="relative"),e.set("customDiv",t);var s=e.get("items");a.each(s,function(t,n){e.addCustomItem(t,n)})},_renderItemGroup:function(){var t,e=this,n=e.get("items"),r=e.get("titleShape"),i={x:8,y:10};r&&(i.y+=20),t=e.addGroup(i),e.set("textGroup",t),n&&e.setItems(n)},_renderCrossLine:function(){var t,e=this,n=e.get("crosshairs"),r=e.get("canvas"),i=e.get("plotRange");if(n){var a,s;i?(a=i.bl.y,s=i.tl.y):(a=r.get("height"),s=0),t=e.get("parent").addShape({type:"line",visible:!1,zIndex:3,attrs:{stroke:e.get("crossLine").stroke,x1:0,y1:a,x2:0,y2:s}}),e.set("crossShape",t)}},setTitle:function(t){var e,r=this,i=r.get("title"),a=r.get("custom");if(i){if(r.set("titleText",t),a){var o=r.get("customDiv"),l=n(o,s);return void(l&&(l.innerHTML=t))}e=r.get("titleShape"),e||(i.text=t||"",i["text-anchor"]="start",e=r.addShape("text",i),r.set("titleShape",e)),e.attr("text",t)}},getInnerBox:function(){var t=this,e={},n=t.get("textGroup"),r=t.get("titleShape"),i=n.getBBox(),a=i.width;if(r){var s=r.getBBox();a=Math.max(a,s.width)}return e.width=i.x+a+8,e.height=i.height+i.y+8,e},setColor:function(t){var e=this,n=e.get("borderShape"),r=e.get("customDiv");n&&n.attr("stroke",t),r&&(r.style.borderColor=t)},show:function(){var t=this,e=t.get("crossShape"),n=t.get("customDiv"),r=t.get("hideHandler");r&&clearTimeout(r),c.superclass.show.call(t),n&&t.get("customFollow")&&(n.style.visibility="visible"),t.fireUp("tooltipshow",t.getEventObj()),e&&e.show()},hide:function(){var t=this,e=t.get("customDiv"),n=t.get("crossShape"),r=setTimeout(function(){t.fireUp("tooltiphide",t.getEventObj()),e&&t.get("customFollow")&&(e.style.visibility="hidden"),c.superclass.hide.call(t),t.set("hideHandler",null)},t.get("duration"));t.set("hideHandler",r),n&&n.hide()},setPosition:function(t,e){var n=this,r=n.get("plotRange"),i=n.get("offset"),s=n.get("crossShape"),o=n.getBBox(),c=n.get("customDiv"),u=!0,h=n.get("animate"),f=t;if(t=t-o.width-i,e-=o.height,c&&n.get("customFollow")){var g=parseFloat(a.getStyle(c,"paddingLeft"))||0;t=t-a.getOuterWidth(c)+g}r&&(r.isInRange(t,e)||(r.isInVertical(e)||(e=r.tl.y),r.isInHorizontal(t)||(t=l(r.tl.x,f)+i,u=!1))),(n.get("x")!=t||n.get("y")!=e)&&(h&&a.svg&&n.get("visible")&&n.animate({x:t,y:e},n.get("duration")),n.move(t,e),n.moveCustom(t,e,u),s&&(u?s.attr("transform","t"+f+" 0"):s.attr("transform","t"+(t-i)+" 0")))},resetBorder:function(){var t=this,e=t.getInnerBox(),n=t.get("borderShape");n.attr({width:e.width,height:e.height})},moveCustom:function(t,e,n){var r=this,i=r.get("offset"),s=r.get("customDiv");if(n||(t+=2*i),s&&r.get("customFollow")){var o=parseFloat(a.getStyle(s,"paddingTop")),l=parseFloat(a.getStyle(s,"borderTopWidth"))||0,c=parseFloat(a.getStyle(s,"paddingLeft")),u=parseFloat(a.getStyle(s,"borderLeftWidth"))||0;s.style.left=t-u-c+"px",s.style.top=e-l-o+"px"}},addCustomItem:function(t,e){t.index=e;var r=this,i=r.get("customDiv"),s=n(i,o);if(s){var l=r.get("itemTpl"),c=a.substitute(l,t),u=a.createDom(c);s.appendChild(u)}},addItem:function(t,e){function n(t,e){var n=a.mix({},u,{x:f,y:h,text:t+""},e);return l.addShape("text",n)}var r,i,s=this,o=s.get("textGroup"),l=o.addGroup(),c=s.get("name"),u=s.get("value"),h=16*e,f=0;c&&(r=a.mix({},c,{x:0,y:h,text:t.name+":",fill:t.color}),i=l.addShape("text",r),f=i.getBBox().width+10);var g,d=t.suffix||s.get("valueSuffix");a.isArray(t.value)?a.each(t.value,function(t){var e;e=a.isObject(t)?n(t.text,t):n(t),f+=e.getBBox().width}):(g=d?t.value+s.get("valueSplit")+d:t.value,n(g))},setItems:function(t){var e=this,n=e.get("custom");e.clearItems(),a.each(t,function(t,r){n?e.addCustomItem(t,r):e.addItem(t,r)}),t[0]&&e.setColor(t[0].color),n||e.resetBorder(),e.get("items")!=t&&(e.set("items",t),e.onChange())},onChange:function(){this.fireUp("tooltipchange",this.getEventObj())},getEventObj:function(){var t=this;return{title:t.get("titleText"),items:t.get("items"),dom:t.get("customDiv"),tooltip:t}},clearItems:function(){var t=this,e=t.get("textGroup"),r=t.get("customDiv");if(e&&e.clear(),r){var i=n(r,o);i&&(i.innerHTML="")}},remove:function(){var t=this,e=t.get("crossShape"),n=t.get("customDiv");e&&e.remove(),c.superclass.remove.call(this),n&&n.parentNode.removeChild(n)}}),t=c}(),B=function(t){function e(t,e,n){var r=e.get(t);return r||(r=n,e.set(t,r)),r}function n(t,e){var n="",r=s.mix({},e);return s.each(t,function(t){var e=s.substitute("M{x1} {y1}L{x2} {y2}",t);n+=e}),r.path=n,r}function r(t){r.superclass.constructor.call(this,t)}var a=I.Item,s=i,o="x-chart-grid";return s.extend(r,a),r.ATTRS={zIndex:1,elCls:o,type:"line",line:null,minorLine:null,minorCount:0,renderer:null,items:null,odd:null,even:null,animate:!0,duration:1e3},s.augment(r,{renderUI:function(){var t=this;r.superclass.renderUI.call(t),t._drawLines()},_drawLines:function(){var t=this,e=t.get("line"),n=t.get("items");if(n){t._precessItems(n),t._drawGridLines(n,e,o+"-line"),t.get("minorCount")&&t.drawMinorLines()}},_precessItems:function(t){var e,n=this,r=n.get("minorCount"),i=n.get("renderer");s.each(t,function(t,a){i?i.call(this,t,a):r&&e&&n._addMonorItem(t,e),e&&(n.get("odd")||n.get("even"))&&n._drawOddEven(t,e,a),e=t})},change:function(t){var e=this;e.set("items",t),e._clearPre(),e._precessItems(t),e._changeGridLines(t,o+"-line"),e._changeMinorLinses()},_clearPre:function(){var t,e=this;e.get("minorCount")&&e.set("minorItems",[]),t=e.findBy(function(t){var e=t.get("elCls");return e==o+"-line"||e==o+"-minor"?!1:!0}),s.each(t,function(t){t.remove()})},_isVertical:function(t){return t.x1==t.x2?!0:!1},_drawGridLines:function(t,e,n){var r=this,i=r._linesToPath(t,e),a=r.addShape({type:"path",elCls:n,attrs:i});r.set("gridLine"+n,a)},_changeGridLines:function(t,e){var n=this,r=n.get("animate"),i=n.get("gridLine"+e);if(i){var a=n._linesToPath(t,{});r?s.animPath(i,a.path,2):i.attr("path",a.path)}else if(t&&t.length){var l;l=n.get(e==o+"-line"?"line":"minorLine"),n._drawGridLines(t,l,e)}},_linesToPath:function(t,e){var r,i=this,a=[],o=i.get("type");return"line"==o?0==t.length?"":n(t,e):(r=s.mix({},e),s.each(t,function(t){a=a.concat(i._getMultiplePath(t,o))}),r.path=a,r)},_getMultiplePath:function(t,e){var n=t.points,r=[];if("polygon"==e)s.each(n,function(t,e){r.push(0==e?["M",t.x,t.y]:["L",t.x,t.y])}),r.push(["L",n[0].x,n[0].y]),r.push(["z"]);else{var i=t.center.x,a=t.center.y,o=t.r,l=t.r;r=0==o?[]:[["M",i,a],["m",0,-l],["a",o,l,0,1,1,0,2*l],["a",o,l,0,1,1,0,-2*l]]}return r},_drawOddEven:function(t,e,n){var r,i,a=this,s=a.get("odd"),l=a.get("even");n%2==0?l&&(i=a._getBackItem(e,t,l),r="even"):s&&(i=a._getBackItem(e,t,s),r="odd"),i&&a.addShape({type:"path",elCls:o+"-"+r,attrs:i})},_getBackItem:function(t,e,n){var r=s.substitute("M {x1} {y1} L{x2} {y2}",t);return r+=s.substitute("L{x2} {y2} L{x1} {y1}Z",e),n=s.mix({},n,{path:r})},_getMinorItem:function(t,e,n,r){var i=this,a=i._isVertical(t,e),s=a?"x":"y",o=a?"y":"x",l=e[s+"1"]-t[s+"1"],c=l/(r+1),u={};return u[s+"1"]=u[s+"2"]=(n+1)*c+t[s+"1"],u[o+"1"]=t[o+"1"],u[o+"2"]=t[o+"2"],u},_addMonorItem:function(t,n){var r=this,i=e("minorItems",r,[]),a=r.get("minorCount");if(a)for(var s=0;a>s;s++){var o=r._getMinorItem(n,t,s,a);i.push(o)}},drawMinorLines:function(){var t=this,e=t.get("minorLine"),n=t.get("minorItems");t._drawGridLines(n,e,o+"-minor")},_changeMinorLinses:function(){var t=this,e=t.get("minorItems");t._changeGridLines(e,o+"-minor")}}),t=r}(),M=function(t){var e=I.Item,n=i,r="x-chart-labels",a=function(t){a.superclass.constructor.call(this,t)};return a.ATTRS={elCls:r,zIndex:6,items:null,label:null,renderer:null,custom:!1,html:'<div class="ac-labels" style="position:absolute;top:0;left:0;"></div>',itemTpl:'<div class="ac-label" style="position:absolute;">{text}</div>',animate:!0,duration:400},n.extend(a,e),n.augment(a,{renderUI:function(){var t=this;a.superclass.renderUI.call(t),t._drawLabels()},addLabel:function(t){var e=this,n=e.get("items"),r=n.length;return n.push(t),e._addLabel(t,r)},setItems:function(t){var e=this;e.clear(),e.set("items",t),e._drawLabels()},clear:function(){var t=this,e=t.get("customDiv");e&&(e.innerHTML=""),a.superclass.clear.call(t)},_drawLabels:function(){var t=this,e=t.get("items");n.each(e,function(e,n){t._addLabel(e,n)})},_addLabel:function(t,e){var n=this,r=n._getLabelCfg(t,e);return n._createText(r)},_getLabelCfg:function(t,e){var r=this,i=r.get("label"),a=r.get("renderer");if(!n.isObject(t)){var s=t;t={},t.text=s}return a&&(t.text=a(t.text,t,e)),null==t.text&&(t.text=""),""===t.text&&n.vml&&(t.text=" "),t.text=t.text.toString(),t.x=(t.x||0)+(i.x||0),t.y=(t.y||0)+(i.y||0),cfg=n.mix({},i,t)},getLabels:function(){var t=this,e=t.get("customDiv");return e?n.makArray(e.childNodes):t.get("children")},changeLabel:function(t,e){var r,i,a=this,s=a.get("custom");if(r=n.indexOf(a.get("children"),t),i=a._getLabelCfg(e,r),t)if(s){var o=a._createDom(i);t.innerHTML=o.innerHTML,a._setCustomPosition(i,t)}else t.attr("text",i.text),(t.attr("x")!=i.x||t.attr("y")!=i.y)&&(n.svg&&a.get("animate")&&!i.rotate?(i.rotate&&t.attr("transform",""),t.animate({x:i.x,y:i.y},a.get("duration"))):(t.attr(i),i.rotate&&t.attr("transform",n.substitute("r{rotate} {x} {y}",i))))},_setCustomPosition:function(t,e){var r=t["text-anchor"]||"middle",i=t.y,a=t.x,s=n.getWidth(e),o=n.getHeight(e);i-=o/2,"middle"==r?a-=s/2:"end"==r&&(a-=s),e.style.top=parseInt(i)+"px",e.style.left=parseInt(a)+"px"},_createText:function(t){var e=this,r=e.get("custom"),i=e.get("customDiv");if(!r)return this.addShape("label",t);if(!i){var a=e.get("html"),s=e.get("canvas").get("node").parentNode;i=n.createDom(a),s.style.position="relative",s.appendChild(i),e.set("customDiv",i)}var o=e._createDom(t);i.appendChild(o),e._setCustomPosition(t,o)},_createDom:function(t){var e=this,r=e.get("itemTpl"),i=n.substitute(r,t),a=n.createDom(i);return a},remove:function(){var t=this,e=t.get("customDiv");a.superclass.remove.call(this),e&&e.parentNode.removeChild(e)}}),t=a}(),R=function(t){function e(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}var n=i,r=M,a=function(){};return a.ATTRS={labels:null},n.augment(a,{renderLabels:function(){var t,e=this,n=e.get("labels");n&&(n.items||(n.items=[]),null==n.animate&&(n.animate=e.get("animate")),t=e.addGroup(r,n),e.set("labelsGroup",t))},resetLabels:function(t){var r=this,i=r.get("labels");if(i){var a=r.get("labelsGroup"),s=a.getLabels(),o=s.length;t=t||i.items,n.each(t,function(t,e){if(o>e){var n=s[e];a.changeLabel(n,t)}else r.addLabel(t.text,t)});for(var l=o-1;l>=t.length;l--)e(s[l])}},addLabel:function(t,e){var n,r=this,i=r.get("labelsGroup"),a={};return i&&(a.text=t,a.x=e.x,a.y=e.y,a.point=e,n=i.addLabel(a)),n},removeLabels:function(){var t=this,e=t.get("labelsGroup");e&&e.remove(),t.set("labelsGroup",null)}}),t=a}(),O=function(t){var e=i,n=v.Group,r=I.Item,a=function(t){a.superclass.constructor.call(this,t)};return e.extend(a,r),e.mixin(a,[n]),a.ATTRS={elCls:"x-chart-markers",zIndex:6,marker:null,actived:null,single:!1,xCache:null},e.augment(a,{renderUI:function(){var t=this;t.set("xCache",[]),a.superclass.renderUI.call(t),t._drawMarkers()},bindUI:function(){var t=this;t.on("click",function(e){var n=e.target.shape;if(n){var r=n.get("point")||n.get("item");t.fire("markerclick",{marker:n,point:r})}})},isItemActived:function(t){return t.get("actived")},setItemActived:function(t,e){var n=this,r=n.get("marker"),i=n.get("actived"),a=n.get("single");e?(t.attr(i),t.set("actived",!0),a&&!t.get("visible")&&t.show()):(t.attr(r),t.set("actived",!1),a&&t.hide())},change:function(t){var n=this,r=n.get("children"),i=n.get("invert"),a=[];if(!n.get("single")){n.set("items",t),e.each(t,function(t,s){var o=r[s];if(o){if(e.svg)if(n.get("animate")){var l={x:t.x,y:t.y},c=e.mix({},t);delete c.x,delete c.y,o.animate(l,400),o.attr(c)}else o.attr(t);else o.attr(t);a.push(i?t.y:t.x),o.set("item",t)}else n._addMarker(t)});for(var s=n.getCount(),o=s-1;o>t.length-1;o--)n.getChildAt(o).remove();n.set("xCache",a)}},_drawMarkers:function(){var t=this,n=t.get("single"),r=t.get("items");if(n){var i=t._addMarker({x:0,y:0});i.hide()}else e.each(r,function(e){t._addMarker(e)})},addMarker:function(t){return this._addMarker(t)},_addMarker:function(t){var n=this,r=n.get("xCache"),i=n.get("marker"),a=e.mix({},i,t);r.push(parseInt(n.get("invert")?t.y:t.x));var s=n.addShape("marker",a);return s.set("item",t),s},getSnapMarker:function(t,n){var r,i=this,a=i.get("xCache"),s=i.get("single");if(s)return i.getChildAt(0);if(e.isObject(t)){var o=i.get("children");e.each(o,function(e){return e.attr("x")==t.x&&e.attr("y")==t.y?(r=e,!1):void 0})}else{var l=[].concat(a).sort(function(t,e){return t-e}),c=e.snapTo(l,t,n),u=e.indexOf(a,c);r=i.getChildAt(u)}return r}}),t=a}(),N=function(t){var e=i,n=I.Item,r=function(t){r.superclass.constructor.call(this,t)};return r.ATTRS={title:"",titleCfg:null,text:"",line:null,distance:0,shapeCfg:{},shapeType:"",point:null,cash:{}},e.extend(r,n),e.augment(r,{renderUI:function(){var t=this;r.superclass.renderUI.call(t),t.drawFlag()},drawFlag:function(){var t=this;t._drawLine(),t._drawShape(),t._drawTitle()},_drawLine:function(){var t=this,e=t.get("cash"),n=t.addShape("line",t.__getLineAttr());e.line=n},__getLineAttr:function(){var t=this,n=t.get("line"),r=t.get("point"),i=r.x,a=r.y,s=t.get("distance"),o=e.mix(n,{x1:i,y1:a,x2:i,y2:s+a});return 0>=s?t.set("bottomY",a):t.set("topY",a),o},_drawShape:function(){var t=this,e=t.get("cash"),n=t.addShape(t.__getShapeAttr());e.shape=n},__getShapeAttr:function(){var t,n=this,r=n.get("point"),i=r.x,a=r.y,s=n.get("shapeType"),o=n.get("shapeCfg"),l=n.get("distance"),c=o.width||24,u=o.height||24;switch(s){case"rect":t=e.mix(o,{x:i-c/2,y:l>0?a+l:a-u+l,width:c,height:u}),0>=l?n.set("topY",t.y):n.set("bottomY",t.y+u);break;case"image":t=e.mix(o,{x:i-c/2,y:l>0?a+l:a+l-u,width:c,height:u}),0>=l?n.set("topY",t.y):n.set("bottomY",t.y+u);break;default:s="circle",t=e.mix(o,{cx:i,cy:l>0?a+o.r+l:a-o.r+l}),0>=l?n.set("topY",t.cy-o.r):n.set("bottomY",t.cy+o.r)}return{type:s,attrs:t}},_drawTitle:function(){var t=this,e=t.get("cash"),n=t.__getTitleAttr();if(n){var r=t.addShape("text",t.__getTitleAttr());e.title=r}},__getTitleAttr:function(){var t=this,n=t.get("title"),r=t.get("shapeCfg"),i=t.get("titleCfg"),a=t.get("point"),s=a.x,o=a.y,l=t.get("distance"),c=(r.width||24,r.height||24);if(n){var u=e.mix(i,{text:n,x:s,y:l>0?o+l+c/2:o+l-c/2});return u}},removeFlag:function(){var t=this,e=t.get("cash");e.line&&e.line.remove(),e.shape&&e.shape.remove(),e.title&&e.title.remove(),t.remove()},change:function(t){var n=this;e.mix(n._attrs,t),n.repaint()},repaint:function(){var t=this,e=t.get("cash");e.line&&e.line.remove(),e.shape&&e.shape.remove(),e.title&&e.title.remove(),t._drawLine(),t._drawShape(),t._drawTitle()},changeStackCfg:function(t){var n,r=this,i=t.point,a=i.y,s=t.distance,o=t.shapeCfg,l=t.shapeType;0>=s?r.set("bottomY",a):r.set("topY",a);var c=o.height||24;switch(l){case"rect":n=e.mix(o,{y:s>0?a+s:a-c+s}),0>=s?r.set("topY",n.y):r.set("bottomY",n.y+c);break;case"image":n=e.mix(o,{y:s>0?a+s:a+s-c}),0>=s?r.set("topY",n.y):r.set("bottomY",n.y+c);break;default:l="circle",n=e.mix(o,{cy:s>0?a+o.r+s:a-o.r+s}),0>=s?r.set("topY",n.cy-o.r):r.set("bottomY",n.cy+o.r)}}}),t=r}(),D=function(t){var e=i,n=I.Item,r=function(t){r.superclass.constructor.call(this,t)};return r.ATTRS={riseLine:null,fallLine:null,riseShape:null,fallShape:null,points:null,singleWidth:null},e.extend(r,n),e.augment(r,{renderUI:function(){var t=this;r.superclass.renderUI.call(t),t._drawCandlestick()},_drawCandlestick:function(){var t=this;t._setType(),t._drawLine(),t._drawShape()},_setType:function(){var t=this,e=t.get("points"),n=e[0],r=e[3],i=n.value>=r.value?!1:!0;t.set("isRise",i)},_drawLine:function(){var t=this,n=t.get("isRise"),r=t.get(n?"riseLine":"fallLine"),i=t.get("points"),a=i[1],s=i[2],o=e.mix(r,{x1:a.x,y1:a.y,x2:s.x,y2:s.y}),l=t.addShape("line",o);t.set("lineShape",l)},_drawShape:function(){var t=this,n=t.get("points"),r=t.get("isRise"),i=t.get(r?"riseShape":"fallShape"),a=n[0],s=n[3],o=t.get("singleWidth")||i.width||20,l=e.mix(i,{x:a.x-o/2,y:Math.min(a.y,s.y),width:o,height:Math.max(Math.abs(a.y-s.y),.1)}),c=t.addShape("rect",l);t.set("rectShape",c)}}),t=r}(),G=function(t){var e=i,n=I.Item,r=P,a=15,s=5,o=function(t){o.superclass.constructor.call(this,t)};return o.ATTRS={zIndex:8,elCls:"x-chart-legend",items:null,spacingX:s,spacingY:s,itemCfg:null,checkable:!0,titleCfg:{"text-anchor":"start","font-size":12,y:10,x:15},title:null,leaveChecked:!0,layout:"horizontal",dx:0,dy:0,align:"bottom",back:{stroke:"#909090",fill:"#fff"}},e.extend(o,n),e.augment(o,{renderUI:function(){var t=this;o.superclass.renderUI.call(t),t._renderTitle(),t._renderItems(),t._renderBorder()},bindUI:function(){o.superclass.bindUI.call(this);var t=this;t.on("mousemove",function(t){t.stopPropagation?t.stopPropagation():window.event.cancelBubble=!0}),t._bindOverOut(),t._bindClick()},_bindOverOut:function(){var t=this;t.on("mouseover",function(e){var n=t.getItemByNode(e.target);n&&t.fire("itemover",{item:n})}),t.on("mouseout",function(e){var n=t.getItemByNode(e.target);n&&t.fire("itemout",{item:n})})},_bindClick:function(){var t=this,e=t.get("checkable");e&&t.on("click",function(n){var r=t.getItemByNode(n.target);if(r&&(t.fire("itemclick",{item:r}),e)){var i=r.get("checked");if(t.get("leaveChecked")&&i&&1==t._getLeaveCount())return;r.set("checked",!i),i?t.fire("itemunchecked",{item:r}):t.fire("itemchecked",{item:r})}})},getItemByNode:function(t){var n=this,r=n.get("itemsGroup"),i=r.get("children"),a=null;return e.each(i,function(e){return e.containsElement(t)?(a=e,!1):void 0}),a},_getLeaveCount:function(){var t=this,n=t.get("itemsGroup"),r=n.get("children"),i=[];return i=e.filter(r,function(t){return t.get("checked")}),i.length},_renderItems:function(){var t=this,e=t.get("items"),n=t.addGroup(),r=[];t.set("itemsGroups",r),r.push(n),t.set("itemsGroup",n),t._setItems(e)},_setItems:function(t){var n=this;e.each(t,function(t,e){n._addItem(t,e)}),t&&t.length&&(n.resetPosition(),n.resetBorder())},addItem:function(t){var e=this,n=e.get("items");e._addItem(t,n.length),e.resetBorder(),e.resetPosition()},setItems:function(t){for(var e=this,n=e.get("itemsGroups"),r=n.length,i=r-1;i>=0;i--){var a=n[i];a.remove()}n=[];var a=e.addGroup();n.push(a),e.set("itemsGroups",n),e.set("itemsGroup",a),e.set("items",t),e._setItems(t)},_addItem:function(t,n){var i=this,a=i.get("itemsGroup"),s=i._getNextX(),o=i._getNextY(),l=i.get("itemCfg"),c=e.mix({x:s,y:o},t,l);c.legend=i;var u=a.addGroup(r,c);i._checkOverflow(t,n,u)},_checkOverflow:function(t,n,r){var i=this,a=i.get("itemsGroup"),s=a.getBBox(),o=i.get("plotRange"),l=i.get("spacingX"),c=i.get("spacingY"),u=i.get("itemsGroups");if(o){var h=o.tl,f=o.br,g=f.x-h.x,d=f.y-h.y;if("horizontal"==i.get("layout")){if(s.width+l>g){r.remove();var p=i.get("borderWidth");p?i.set("borderWidth",Math.max(i._getNextX(),p)):i.set("borderWidth",i._getNextX());var v=i.addGroup();i.set("itemsGroup",v),u.push(v),i._addItem(t,n)}}else{var m=i._getTitleHeight();if(s.height+c+m>d){r.remove();var p=i.get("borderWidth")||0,x=0;e.each(a.get("children"),function(t){var e=t.getBBox();x=Math.max(e.width,x)}),i.set("borderWidth",p+x);{i.get("maxGroupCount")||0}i.set("maxGroupCount",0);var v=i.addGroup();i.set("itemsGroup",v),u.push(v),i._addItem(t,n)}}}},_renderTitle:function(){var t,n,r=this,i=r.get("titleCfg"),a=r.get("title");a&&(n=e.mix({},i,{text:a}),t=r.addShape("text",n),r.set("titleShape",t))},_getTitleHeight:function(){var t,e=this,n=e.get("titleShape"),r=0;return n&&(t=n.getBBox(),r=t.height+t.y),r},_getTitleWidth:function(){var t,e=this,n=e.get("titleShape"),r=0;return n&&(t=n.getBBox(),r=t.width+t.x+s),r},_renderBorder:function(){var t,n,r,i,a=this,s=a.get("back");s&&(t=a._getTotalWidth(),n=a._getTotalHeight(),r=e.mix({r:5,width:t,height:n},s),i=a.addShape("rect",r),i.toBack(),a.set("borderShape",i))},resetBorder:function(){var t=this,e=t.get("borderShape");e&&e.attr({width:t._getTotalWidth(),height:t._getTotalHeight()})},resetPosition:function(){var t=this,e=t.get("align"),n=t.get("plotRange");if(n){var r,i,a=n.tl,s=n.br,o=t.get("dx"),l=t.get("dy"),c=t._getTotalWidth();switch(e){case"top":r=a.x,i=a.y;break;case"left":r=a.x,i=(a.y+s.y)/2;break;case"right":r=s.x-c,i=(a.y+s.y)/2;break;case"bottom":r=(a.x+s.x)/2-c/2,i=s.y}t.move(r+o,i+l)}},_getCount:function(){return this.get("itemsGroup").get("children").length},_getMaxHeight:function(){var t=this,n=t.get("itemsGroups"),r=t.get("spacingY"),i=0;return e.each(n,function(t){i=Math.max(t.get("children").length,i)}),a*i+r*(i+1)+t._getTitleHeight()},_getNextX:function(){var t=this,n=t.get("layout"),r=t.get("spacingX"),i=t.get("itemsGroups"),a=(i.length,r);
if("horizontal"==n){var s=t.get("itemsGroup").get("children");return e.each(s,function(t){t.isGroup&&(a+=t.getWidth()+r)}),a}var o=t.get("borderWidth")||0;return a+o},_getNextY:function(){var t,e=this,n=e.get("spacingY"),r=e.get("layout"),i=e._getCount(),s=e._getTitleHeight(),o=e.get("itemsGroups"),l=o.length;return t="horizontal"==r?n*l+a*(l-1):a*i+n*(i+1),t+s},_getTotalWidth:function(){var t,n=this,r=n.get("spacingX"),i=n._getTitleWidth();if("horizontal"==n.get("layout")){var a=n.get("borderWidth");t=a||n._getNextX()}else{var a=n.get("borderWidth")||0,s=n.get("itemsGroup").get("children"),o=r;e.each(s,function(t){var e=t.getWidth();t.isGroup&&e>o&&(o=e)}),t=a+o+2*r}return Math.max(t,i)},_getTotalHeight:function(){var t=this,e=(t._getNextY(),t.get("itemsGroups")),n=e.length;return"horizontal"==t.get("layout")?a*n+s*(1+n)+t._getTitleHeight():t._getMaxHeight()}}),t=o}(),E=function(t){var e=G,n=function(){};return n.ATTRS={legend:null,legendGroup:null},n.prototype={renderLegend:function(){var t=this,n=t.get("legend"),r=t.get("canvas");if(n){n.plotRange||(n.plotRange=t.get("plotRange")||t.get("parent").get("plotRange")),n.items=n.items||t.getLengendItems();var i=r.addGroup(e,n);t.set("legendGroup",i),t._bindLegendEvent()}},getLengendItems:function(){return[]},getByLendItem:function(t){return t.get("item")},addLengendItem:function(t){var e=this,n=e.get("legendGroup");n&&n.addItem(t)},resetLegendItems:function(){var t=this,e=t.get("legendGroup"),n=t.getLengendItems();e.setItems(n)},_bindLegendEvent:function(){var t=this,e=t.get("legendGroup");e.on("itemover",function(e){var n=e.item,r=t.getByLendItem(n);t.setActivedItem&&t.setActivedItem(r)}),e.on("itemout",function(e){var n=e.item,r=t.getByLendItem(n);t.clearActivedItem&&t.clearActivedItem(r)}),e.on("itemchecked",function(e){var n=e.item,r=t.getByLendItem(n);t.showChild(r)}),e.on("itemunchecked",function(e){var n=e.item,r=t.getByLendItem(n);t.hideChild(r)})},removeLegend:function(){var t=this,e=t.get("legendGroup");e&&e.remove()}},t=n}(),F=function(t){var e=L;return t=e}(),z=function(t){var e=M;return e.ShowLabels=R,t=e}(),V=function(t){var e=O;return t=e}(),U=function(t){var e=i,n=N,r=v.Group,a=I.Item,s=function(t){s.superclass.constructor.call(this,t)};return e.extend(s,a),e.mixin(s,[r]),s.ATTRS={elCls:"x-chart-flags",zIndex:6,flag:null,items:null,flagGroups:null},e.augment(s,{renderUI:function(){var t=this;s.superclass.renderUI.call(t),t._drawFlags()},bindUI:function(){var t=this;t.on("click",function(e){var n=t.findBy(function(t){return t.containsElement&&t.containsElement(e.target)});t.fire("flagclick",{flag:n})}),t.on("mouseover",function(e){var n=t.findBy(function(t){return t.containsElement&&t.containsElement(e.target)});t.fire("flagover",{flag:n})}),t.on("mouseout",function(e){var n=t.findBy(function(t){return t.containsElement&&t.containsElement(e.target)});t.fire("flagout",{flag:n})})},_drawFlags:function(){var t=this,n=t.get("items"),r=[];e.each(n,function(e){r.push(t._addFlag(e))}),t.set("flagGroups",r)},addFlag:function(t){var e=this,n=e.get("flagGroups"),r=e.get("items");r||(r=[],e.set("items",r)),r.push(t);var i=this._addFlag(t);return n.push(i),i},_addFlag:function(t){var r=this,i=r.get("flag"),a=(r.get("items"),e.mix({},i,t));return r.addGroup(n,a)},removeAll:function(){var t=this,n=t.get("flagGroups");e.each(n,function(t){t.removeFlag()}),t.set("flagGroups",[]),t.set("items",[])},removeByIndex:function(t){var e=this,n=e.get("flagGroups"),r=e.get("items"),i=n[t];i&&(i.remove(),n.splice(t,1),r.splice(t,1))},change:function(t,n){var r=this,i=r.get("items"),a=r.get("flagGroups");if(n){var s=t.length>a.length?t:a,o=[];e.each(s,function(e,n){var s=a[n],l=i[n],c=t[n];if(t.length>a.length&&!s)s=r.addFlag(c);else if(t.length<a.length&&!c)o.push(n);else{var u=s.get("point"),h=u.x,f=u.y,g=c.point.x,d=c.point.y;s.animate({x:g-h,y:d-f},400,function(){s.animate({x:0,y:0}),s.change(c)}),l=c}}),e.each(o,function(t,e){r.removeByIndex(e)})}else r.removeAll(),r.set("items",t),r._drawFlags()},changeStackCfg:function(t,n){var r=this,i=r.get("flag"),a=r.get("flagGroups"),s=(r.get("items"),e.mix({},i,n));a[t]&&a[t].changeStackCfg(s)}}),t=s}(),j=function(t){var e=i,n=D,r=v.Group,a=I.Item,s=function(t){s.superclass.constructor.call(this,t)};return e.extend(s,a),e.mixin(s,[r]),s.ATTRS={elCls:"x-chart-candlesticks",zIndex:6,candlestick:{},items:null,candlestickGroup:[]},e.augment(s,{renderUI:function(){var t=this;s.superclass.renderUI.call(t),t._drawCandlesticks()},bindUI:function(){var t=this;t.on("click",function(e){var n=t.findBy(function(t){return t.containsElement&&t.containsElement(e.target)});t.fire("stockclick",{candlestick:n})}),t.on("mouseover",function(e){var n=t.findBy(function(t){return t.containsElement&&t.containsElement(e.target)});t.fire("stockover",{candlestick:n})}),t.on("mouseout",function(e){var n=t.findBy(function(t){return t.containsElement&&t.containsElement(e.target)});t.fire("stockout",{candlestick:n})})},_drawCandlesticks:function(){var t=this,n=(t.get("candlestickGroup"),t.get("items"));e.each(n,function(e){t._drawSingle(e)})},_drawSingle:function(t){var r=this,i=r.get("candlestickGroup"),a=r.get("candlestick"),s=e.mix({},a,t),o=r.addGroup(n,s);return i.push(o),o},addCandlestick:function(t){var e=this,n=e.get("items");return n||(n=[],e.set("items",n)),n.push(t),e._drawSingle(t)},removeAll:function(){var t=this,n=t.get("candlestickGroup");e.each(n,function(t){t.remove()}),t.set("candlestickGroup",[]),t.set("items",[])},change:function(t){var e=this;e.removeAll(),e.set("items",t),e._drawCandlesticks()}}),t=s}(),Y=function(t){var e=G;return e.Item=P,e.UseLegend=E,t=e}(),H=function(t){var e=I.Item,n=B,r=i,a=z.ShowLabels,s="x-chart-axis",o=function(t){o.superclass.constructor.call(this,t)};return o.ATTRS={ticks:null,plotRange:null,line:null,tickLine:null,grid:null,labels:null,autoPaint:!0,animate:!0,formatter:null},r.extend(o,e),r.mixin(o,[a]),r.augment(o,{beforeRenderUI:function(){o.superclass.beforeRenderUI.call(this),this.set("pointCache",[])},renderUI:function(){var t=this;o.superclass.renderUI.call(t),t.renderLabels(),t.get("title")&&t._renderTitle(),t.get("autoPaint")&&t.paint()},paint:function(){var t=this;t._drawLines(),t._renderTicks(),t._renderGrid()},_renderTitle:function(){},_renderGrid:function(){var t,e=this,r=e.get("grid");r&&(null==r.animate&&(r.animate=e.get("animate")),t=e.get("parent").addGroup(n,r),e.set("gridGroup",t))},isInAxis:function(t,e){var n=this,r=n.get("plotRange");return r&&r.isInRange(t,e)},getLinePath:function(){},getOffsetPoint:function(){},getValue:function(){},getSnapValue:function(t){var e=this,n=e.get("pointCache");return r.snapTo(n,t)},getTicksCount:function(){return this.get("ticks").length},getTickOffsetPoint:function(t){return this.getOffsetPoint(t)},getOffsetByIndex:function(){},_drawLines:function(){var t,e=this,n=e.get("line"),i=e.get("ticks");if(n){t=e.getLinePath(),n=r.mix({path:t},n);var a=e.addShape({type:"path",elCls:s+"-line",attrs:n});e.set("lineShape",a)}e._processTicks(i)},_processTicks:function(t,e){var n=this,i=n.get("pointCache"),a=n.get("labels");t=t||n.get("ticks"),r.each(t,function(t,r){var s=n.getTickOffsetPoint(r),o=n.getOffsetPoint(r),l=n.getOffsetByIndex(r);i.push(l),n.get("tickLine")&&n._addTickItem(s,l),n.get("grid")&&n._addGridItem(s),a&&(e?a.items.push({text:n.formatPoint(t),x:o.x,y:o.y}):n.addLabel(n.formatPoint(t),o,l))})},_renderTicks:function(){var t=this,e=t.get("tickItems"),n=t.get("tickLine"),i="",a=r.mix({},n);if(e){r.each(e,function(t){var e=r.substitute("M{x1} {y1}L{x2} {y2}",t);i+=e}),delete a.value,a.path=i;var o=t.addShape({type:"path",elCls:s+"-ticks",attrs:a});t.set("tickShape",o)}},_addTickItem:function(t,e){var n=this,i=n.get("tickItems"),a={x1:t.x,y1:t.y},s=n.getTickEnd(a,e);i||(i=[],n.set("tickItems",i)),r.mix(a,s),i.push(a)},getTickEnd:function(){},formatPoint:function(t){var e=this,n=e.get("formatter");return n&&(t=n.call(this,t)),t},_addGridItem:function(t){var e,n=this,i=n.get("grid"),a=(n.get("plotRange"),{});i.items||(i.items=[]),e=n.getGridItemCfg(t),r.mix(a,e),i.items.push(a)},getGridItemCfg:function(){},remove:function(){{var t=this,e=t.get("gridGroup");t.get("labelsGroup")}e&&e.remove(),t.removeLabels(),o.superclass.remove.call(this)}}),t=o}(),W=function(t){function e(t,e,n){var r=t.getCenter(),i={};return i.x=r.x+e*Math.sin(n*a),i.y=r.y-e*Math.cos(n*a),i}var n=i,r=H,a=Math.PI/180,s=function(t){s.superclass.constructor.call(this,t)};return n.extend(s,r),s.ATTRS={type:"circle",startAngle:0,endAngle:360,margin:20,radius:null,tickInterval:null,grid:{line:{"stroke-width":1,stroke:"#C0D0E0"}},formatter:function(t){var e=this,r=e.get("ticks");if(n.isNumber(t)){var i=n.indexOf(r,t);if(-1==i){var a=e.getTickAvgAngle();i=parseInt(t/a,10),t=r[i]}}return t}},n.augment(s,{beforeRenderUI:function(){var t=this;s.superclass.beforeRenderUI.call(t);var e,n=t.get("tickInterval"),r=t.get("ticks"),i=t.get("startAngle"),a=t.get("endAngle");if(n&&!r){r=[],e=(a-i)/n;for(var o=0;e>o;o++)r.push(i+n*o);t.set("ticks",r)}},getCenter:function(){var t=this,e=t.get("plotRange");return e.cc},getRadius:function(){var t=this,e=t.get("radius"),n=t.get("plotRange");return e||(e=Math.min(n.getWidth(),n.getHeight())/2-t.get("margin"),t.set("radius",e)),e},getTickAvgAngle:function(){var t=this,e=t.get("ticks"),n=t.get("startAngle"),r=t.get("endAngle");return(r-n)/e.length},getLinePath:function(){var t=this,e=t.getCenter(),n=e.x,r=e.y,i=t.getRadius(),a=i;return[["M",n,r],["m",0,-a],["a",i,a,0,1,1,0,2*a],["a",i,a,0,1,1,0,-2*a],["z"]]},getOffsetPoint:function(t){var e=this,n=e.getOffsetByIndex(t),r=e.getRadius();return e.getCirclePoint(n,r)},getCirclePoint:function(t,n){return null==n&&(n=this.getRadius()),e(this,n,t)},getDistance:function(t,e){var n=this,r=n.getCenter();return Math.sqrt(Math.pow(t-r.x,2)+Math.pow(e-r.y,2))},getCircleAngle:function(t,e){var n=this,r=n.getCenter(),i=n.getDistance(t,e),a=Math.asin(Math.abs(t-r.x)/i)/Math.PI*180;return t>=r.x&&e<=r.y?a:t>=r.x&&e>=r.y?180-a:t<=r.x&&e>=r.y?a+180:360-a},getOffsetByIndex:function(t){var e=this,n=e.get("ticks"),r=n.length,i=e.get("startAngle"),a=e.get("endAngle");return i+(a-i)/r*t},getValue:function(t){return this.getSnapValue(t)},getSnapValue:function(t){var e=this,r=e.get("pointCache");return n.snapFloor(r,t)},getGridItemCfg:function(t){var e=this,n=e.getCenter();return{x1:n.x,y1:n.y,x2:t.x,y2:t.y}},addLabel:function(t,e,n){var r=this,i=r.get("margin"),a=r.getRadius();e=r.getCirclePoint(n,a+i),s.superclass.addLabel.call(r,t,e)},getTickEnd:function(t,e){var n=this,r=n.getRadius(),i=n.get("tickLine"),a=i.value,s=n.getCirclePoint(e,r+a);return{x2:s.x,y2:s.y}}}),t=s}(),q=function(t){var e=i,n=I.Item,r=z.ShowLabels,a=v,s=V,o=function(t){o.superclass.constructor.call(this,t)};return e.extend(o,n),e.mixin(o,[r,a]),o.ATTRS={zIndex:5,markers:null,labels:null,animate:!1,duration:1e3,changeDuration:400,data:[],autoPaint:!0,enableMouseTracking:!0,stickyTracking:!0,xField:"x",yField:"y",itemName:"seriesItem",legendType:"rect",groupName:"series",effectChart:!1},e.augment(o,{renderUI:function(){var t=this;o.superclass.renderUI.call(t),t.processColor(this.get("color")),t.renderLabels(),t.renderMarkers(),t.get("autoPaint")&&t.paint()},bindUI:function(){var t=this;if(o.superclass.bindUI.call(t),t.get("enableMouseTracking")){t.bindMouseOver();var e=t.get("parent");t.on("mouseover",function(){e.setActivedItem&&(e.isItemActived(t)||e.setActivedItem(t))})}t.get("stickyTracking")||t.bindMouseOut()},changeData:function(t,e){var n=this,r=n.get("data"),i=n.get("parent");t!=r&&n.set("data",t),e&&(n.get("effectChart")&&i&&i.repaint?i.repaint():n.get("visible")&&n.repaint()),n.fire("datachange",{data:t})},addPoint:function(t,e,n){var r=this,i=r.get("data"),a=r.get("animate");i.push(t),e&&i.shift(),a?(e&&n&&i.unshift(i[0]),r.changeData(i,n),e&&n&&setTimeout(function(){i.shift(),r.set("points",null),r.shiftPoint(),r.repaint(),r.fire("datachange",{data:i})},800)):r.changeData(i,n)},shiftPoint:function(){var t,e=this,n=e.get("markersGroup"),r=e.get("labelsGroup"),i=e.get("xAxis");if(n&&(t=n.getChildAt(0),t&&t.remove()),r&&(t=r.getChildAt(0),t&&t.remove()),i){var a=i.get("labelsGroup");a&&(t=a.getChildAt(0),t&&t.remove())}},getData:function(){},bindMouseOver:function(){},bindMouseOut:function(){},onStickyTracking:function(){},processColor:function(){},getTrackingInfo:function(){},getPoints:function(){var t=this,e=t.get("points");return e||(e=t._getPoints(),t.set("points",e)),e},_getPoints:function(){var t=this,n=t.get("data"),r=t.get("xField"),i=t.get("yField"),a=[];return e.each(n,function(n,s){var o;if(e.isObject(n)){var l=n[r],c=n[i];o=null==l?t.getPointByIndex(c,s):t.getPointByValue(l,c),o.obj=n}else e.isArray(n)?(o=t.hasXValueInArray()?t.getPointByValue(n[0],n[1]):t.getPointByIndex(n[0],s),o.arr=n):o=t.getPointByIndex(n,s);o.name=o.name||t.get("name"),o.seriesName=t.get("name"),t.processPoint(o,s),a.push(o)}),a},hasXValueInArray:function(){return!0},processPoint:function(){},getPointByIndex:function(){},getPointByValue:function(){},getTipInfo:function(t){return t.value},findPointByValue:function(t){var n,r,i=this,a=i.get("points"),s=a[0],o=a[a.length-1];return s?e.isNumber(t)&&(t>o.xValue||t<s.xValue)?null:(e.each(a,function(s,l){return i.snapEqual(s.xValue,t)&&null!=s.value?(n=s,!1):void(e.isNumber(t)&&s.xValue<t&&(o=s,r=a[l+1]))}),o&&r&&Math.abs(o.xValue-t)>Math.abs(r.xValue-t)&&(o=r),n||o):null},snapEqual:function(t,e){return t==e},draw:function(){},paint:function(){var t=this,e=t.getPoints();!t.get("isPaint")&&t.get("data").length&&(t.set("painting",!0),t.fire("beforepaint"),t.draw(e,function(){t.fire("afterpaint")}),t.sort(),t.set("isPaint",!0),t.set("painting",!1))},repaint:function(){var t,n=this,r=n.get("labels"),i=n.get("markers");return n.set("points",null),n.get("isPaint")||n.get("painting")?(n.set("repainting",!0),t=n.getPoints(),r&&(r.items=[]),i&&(i.items=[]),n.changeShapes(t),e.each(t,function(t){if(null!=t.value){if(r){var e={};e.text=t.value,e.x=t.x,e.y=t.y,r.items.push(e)}i&&i.items.push(t)}}),n._changeMarkers(),n._changeLabels(),void n.set("repainting",!1)):void n.paint()},changeShapes:function(){},addMarker:function(t){var n,r=this,i=r.get("markersGroup"),a={};return i&&(a.x=t.x,a.y=t.y,t.obj&&t.obj.marker&&e.mix(a,t.obj.marker),n=i.addMarker(a),n.set("point",t)),n},renderMarkers:function(){var t,n=this,r=n.get("markers");if(r){var i=e.mix({},r);null==i.animate&&(i.animate=n.get("animate")),i.invert=n.get("invert"),t=n.addGroup(s,i),n.set("markersGroup",t)}},_changeMarkers:function(){var t,n=this,r=n.get("markers");if(r){t=n.get("markersGroup"),t.change(r.items);var i=t.get("children");e.each(i,function(t,e){t.set("point",r.items[e])})}},_changeLabels:function(){this.resetLabels()},removeMarkers:function(){var t=this,e=t.get("markersGroup");e&&e.remove()},setActiveStatus:function(){},remove:function(){var t=this;t.removeMarkers(),t.removeLabels(),o.superclass.remove.call(this)}}),t=o}(),X=function(t){function e(t){return a.isNumber(t)?t:(a.isString(t)?(t=t.replace(/'-'/gi,"/"),t=new Date(t).getTime()):a.isDate(t)&&(t=t.getTime()),t)}function n(t){n.superclass.constructor.call(this,t)}var r=q,a=i;return n.ATTRS={pointInterval:null,pointStart:0,xAxis:null,yAxis:null,effectChart:!0,invert:!1,pointsCache:{}},a.extend(n,r),a.augment(n,{getXName:function(){var t=this,e=t.get("xName");return e||(e=t.get("invert")?"y":"x",t.set("xName",e)),e},getYName:function(){var t=this,e=t.get("yName");return e||(e=t.get("invert")?"x":"y",t.set("yName",e)),e},getPoint:function(t,n){var r=this,i=r.get("xAxis"),s=r.get("yAxis"),o=r.parseYValue(n),l=r.getXName(),c=r.getYName(),u={};return"time"==i.get("type")&&(t=e(t)),r.isInCircle()?u=s.getPointByAngle(t,o):(u[l]=i.getOffset(t),u[c]=s.getOffset(o)),a.mix(u,{yValue:o,xValue:t,value:n}),u},changeData:function(t,e){this.set("pointsCache",{}),n.superclass.changeData.call(this,t,e)},hasXValueInArray:function(){var t=this,e=t.get("xAxis"),n=e.get("type");return("number"!=n&&"time"!=n||!t.get("pointInterval"))&&("category"!=n||e.get("autoTicks"))?!0:!1},getPointByValue:function(t,e){return this.getPoint(t,e)},parseYValue:function(t){return t},animateClip:function(t,e){if(a.svg){var n=this,r=n.get("canvas"),i=n.get("invert"),s=r.get("width"),o=n.get("duration"),l=r.get("height"),c=i?"0,0,"+s+",0":"0,0,0,"+l;n.attr("clip-rect",c),t&&t(),n.animate({"clip-rect":"0,0,"+s+","+l},o,function(){e&&e(),n.attr("clip-rect","")})}else e&&e()},snapEqual:function(t,e){var n=this;if(a.isString(t))return t==e;var r=n.get("pointInterval");return r?Math.abs(t-e)<r/2:t==e},isInCircle:function(){return"circle"==this.get("xAxis").get("type")},getCircleCenter:function(){var t=this,e=t.get("xAxis"),n=null;return"circle"==e.get("type")&&(n=e.getCenter()),n},getCircle:function(){return this.isInCircle()?this.get("xAxis"):null},getData:function(t){var e=this,n=e.get("data"),r=e.get("pointsCache"),i=e.get("xAxis"),s=(n[0],[]),o=e.get("pointStart");if(t=t||"yAxis",r[t])return r[t];if("xAxis"!=t||null==o||"time"==i.get("type")&&0==o||!e.get("pointInterval")){var l=e.get("xField"),c=e.get("yField");a.each(n,function(e){if(a.isNumber(e)||a.isString(e))s.push(e);else if(a.isArray(e)){var n="yAxis"==t?e[1]:e[0];s.push(n)}else if(e){var n="yAxis"==t?e[c]:e[l];s.push(n)}})}else{var u=e.get("pointInterval"),h=n.length-1==0?1:n.length-1;s.push(o),s.push(o+h*u)}return r[t]=s,s},getPointByIndex:function(t,e){var n,r,i=this,s=i.get("xAxis"),o=i.get("yAxis"),l=i.getXName(),c=i.getYName(),u=i.parseYValue(t,e),h=o.getOffset(u),f={};if("number"==s.get("type")||"time"==s.get("type")){var g=i.get("pointStart"),d=i.get("pointInterval");n=s.getOffset(g+d*e)}else n=s.getOffsetByIndex(e);return i.isInCircle()?i.getPoint(n,t):(r=s.getValue(n),d&&(r=a.tryFixed(r,d)),f[l]=n,f[c]=h,a.mix(f,{xValue:r,yValue:u,value:t}))},getTrackingInfo:function(t){var e,n=this,r=n.get("xAxis"),i=n.getXName();if(n.isInCircle()){var a=r.getCircleAngle(t.x,t.y);e=r.getValue(a)}else e=r.getValue(t[i]);return n.findPointByValue(e)},getBaseValue:function(){var t=this,e=t.get("yAxis"),n=e.getOffset(0)||e.getStartOffset();return n}}),t=n}(),$=function(t){function e(t,e,n){t&&!t[e]&&(t[e]=n)}function n(t){n.superclass.constructor.call(this,t)}var r=X,a=i;return a.extend(n,r),n.ATTRS={type:"line",elCls:"x-chart-line-series",connectNulls:!1,line:null,lineActived:null,tolerance:20,smooth:!1,legendType:"line"},a.augment(n,{processColor:function(){var t=this,n=t.get("color");if(n){var r=t.get("line"),i=t.get("markers");e(r,"stroke",n),i&&!/http/.test(i.marker.symbol)&&(e(i.marker,"stroke",n),e(i.marker,"fill",n))}},onStickyTracking:function(t){var e=this,n=t.point,r=e.get("markersGroup"),i=e.getSnapMarker(n);r&&r.setActivedItem(i)},changeShapes:function(t,e){t=t||this.getPoints();var n=this,r=n.get("lineShape"),i=n.get("trackerShape"),s=n.points2path(t);if(null==e&&(e=n.get("animate")),i){var o=n.points2tracker(t);i.attr("path",o)}if(r)if(e){if(a.svg&&n.get("smooth")){var l=r.getPath();r.attr("path",s),s=r.attr("path"),r.attr("path",l)}a.animPath(r,s)}else r.attr("path",s)},draw:function(t,e){function n(){l=s.points2path(t),s.drawInner(t),i=s._createLine(l),a.each(t,function(t){s._drawPoint(t)})}function r(){e&&e()}var i,s=this,o=s.get("animate"),l=(s.get("duration"),"");if(o&&a.svg)if(s.isInCircle()){var c=s.getCircle(),u=c.getCenter(),h=s.getBaseValue(),f=[];a.each(t,function(){var t=a.mix({value:h},u);f.push(t)}),s.drawInner(f),i=s._createLine(l),s.circleAnimate(t,i),r()}else s.animateClip(n,r);else n(),r();s.drawTracker(t)},circleAnimate:function(t,e){var n,r=this,i=r.getCircle(),s=i.getCenter(),o=[],l=r.getBaseValue();a.each(t,function(){var t=a.mix({value:l},s);o.push(t),r._drawPoint(t)}),n=r.points2path(o),e.attr("path",n),r.repaint()},drawInner:function(){},_drawPoint:function(t){var e=this;null!=t.value&&(e.get("markers")&&!e.get("markersGroup").get("single")&&e.addMarker(t),e.get("labels")&&e.addLabel(t.value,t))},_createLine:function(t){var e=this,n=e.get("line"),r=a.mix({},n);return r.path=t,lineShape=e.addShape("path",r),e.set("lineShape",lineShape),lineShape},drawTracker:function(t){var e,n=this,r=n.get("line"),i=n.get("tolerance"),s=n.points2tracker(t),o=a.mix({},r),l=Number(r["stroke-width"]);o["stroke-width"]=l+i,o["stroke-opacity"]=.001,o.path=s,e=n.addShape("path",o),n.set("trackerShape",e)},points2path:function(t){if(!t.length)return"";var e,n,r=this,i=r.get("smooth"),s=r.get("connectNulls"),o="";return t.length<=2&&(i=!1),a.each(t,function(t){if(null==t.value){if(s)return;n=""}else n=null==e||null==e.value?i?"M{x} {y} R":"M{x} {y}":i?" {x} {y}":"L{x} {y}";o+=a.substitute(n,t),e=t}),r.isInCircle()&&(o+="z"),o},points2tracker:function(t){if(!t.length)return"";var e=this,n=e.get("tolerance"),r=(t[0],"M"+(t[0].x-n)+" "+(t[0].y||0));return a.each(t,function(t){if(null!=t.value){var e="L{x} {y}";r+=a.substitute(e,t)}}),e.isInCircle()&&(r+="z"),r},setActiveStatus:function(t){var e=this,n=e.get("line"),r=e.get("lineShape"),i=e.get("lineActived");if(t)i&&r.attr(i);else{n&&r.attr(n);var a=e.get("markersGroup");a&&a.clearActivedItem()}},getSnapMarker:function(t){var e=this,n=e.get("markersGroup"),r=e.getXName(),i=null;if(n)if(e.isInCircle()){var a=e.getTrackingInfo(t);i=n.getSnapMarker(a)}else i=n.getSnapMarker(t[r]);return i}}),t=n}(),Z=function(t){function e(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}var n=q,r=i,a=function(){};return a.ATTRS={item:void 0,group:null,allowPointSelect:!1,cancelSelect:!0},r.extend(a,n),r.augment(a,{addItem:function(t,e){var n,r=this,i=r.get("group");if(null!=t.value){null==e&&(e=r.getItems().length),i||(i=r.addGroup(),r.set("group",i)),n=r.getItemCfg(t,e),n.path=r.get("animate")?r.pointToFactorPath(t,0):r.pointToPath(t);var a=i.addShape("path",n);return a.isSeriesItem=!0,a.set("point",t),a}},bindItemClick:function(){var t=this,e=t.get("cancelSelect");t.on("click",function(n){var r,i=n.target,a=i.shape;a&&a.isSeriesItem&&(t.get("allowPointSelect")&&(r=a.get("selected"),e&&r?t.clearSelected(a):t.setSelected(a)),t.fire("itemclick",{item:a,point:a.get("point")}),t.fireUpGroup("click",a))})},setSelected:function(t){var e=this;e.isSelected(t)||(e.clearSelected(),e.setItemSelected(t,!0),e.onSelected(t))},changePoints:function(t){var e=this,n=e.getItems(),i=e.get("animate");t=t||e.getPoints(),r.each(n,function(n,r){var a,s,o=t[r];o&&n.get("visible")&&(a=n.get("point"),n.set("point",o),n.set("prePoint",a),i?e.animateItem(n,a):(s=e.pointToPath(o),n.attr("path",s)),o.obj&&o.obj.attrs&&n.attr(o.obj.attrs))});for(var a=t.length,s=n.length,o=n[n.length-1],l=s;a>l;l++){var c=e.addItem(t[l],l);s>1&&i&&e.animateItem(c,o.get("prePoint"))}for(var l=s-1;l>=a;l--){var u=n[l];e.removeItem(u)}},onSelected:function(t){this.fire("itemselected",{item:t,point:t.get("point")}),this.fireUpGroup("selected",t)},onUnSelected:function(t){this.fire("itemunselected",{item:t,point:t.get("point")}),this.fireUpGroup("unselected",t)},clearSelected:function(t){var e=this;t=t||e.getSelected(),t&&(e.setItemSelected(t,!1),e.onUnSelected(t))},setItemSelected:function(){},isSelected:function(t){return t&&t.get("selected")},getSelected:function(){var t,e=this,n=e.getItems();return r.each(n,function(n){return e.isSelected(n)?(t=n,!1):void 0}),t},getItemCfg:function(t){var e=this,n=e.get("item"),i=t.obj,a={};return r.mix(a,n),i&&i.attrs&&r.mix(a,i.attrs),a},getItems:function(){var t=this.get("group");return t?t.get("children"):[]},animateItems:function(t){var e=this,n=e.getItems();r.animStep(e.get("duration"),function(t){r.each(n,function(n){var r=n.get("point"),i=e.pointToFactorPath(r,t);n.attr("path",i)})},t)},animateItem:function(t){var e=this,n=t.get("point"),r=e.pointToPath(n);t.animate({path:r},e.get("changeDuration"))},removeItem:function(t){var e=this,n=t.get("animHadler");e.removeLabel(t),n&&r.stopStep(n),t.remove()},removeLabel:function(t){var n=t.get("label");n&&e(n)},pointToFactorPath:function(){},pointToPath:function(t){return this.pointToFactorPath(t,1)}}),t=a}(),J=function(t){function e(t,e,n){t&&!t[e]&&(t[e]=n)}function n(t,e,n,r){return r?t+n+" "+e:t+e+" "+n}function r(t,e){if(e){var n=t[1];t[1]=t[2],t[2]=n}return t}var a=$,s=i,o=g,l=/^M.*(M).*$/,c=function(t){c.superclass.constructor.call(this,t)};return c.ATTRS={elCls:"x-chart-area-series",area:{stroke:"","fill-opacity":"0.70"}},s.extend(c,a),s.mixin(c,[o]),s.augment(c,{processColor:function(){c.superclass.processColor.call(this);var t=this,n=t.get("color"),r=t.get("area");e(r,"fill",n)},renderUI:function(){c.superclass.renderUI.call(this);var t=this,e=t.get("canvas"),n=t.get("markersGroup");t.on("afterpaint",function(){n&&t.isStacked()&&e.get("node").appendChild(n.get("node"))})},hide:function(){c.superclass.hide.call(this);var t=this,e=t.get("markersGroup");e&&e.hide()},show:function(){c.superclass.show.call(this);var t=this,e=t.get("markersGroup");e&&e.show()},drawInner:function(t){var e=this,n=e.get("areaShape");if(n){var r=e._getAreaPath(t);n.attr("path",r)}else e.drawArea(t)},_getAreaPath:function(t){var e,n=this,r=n.get("stackType");return e=r&&"none"!=r?n.points2StackArea(t):n.points2area(t)},changeShapes:function(){c.superclass.changeShapes.call(this);var t=this,e=t.get("areaShape"),n=t.getPoints(),r=t._getAreaPath(n);t.get("animate")?s.animPath(e,r):e.attr("path",r)},drawArea:function(t){var e,n=this,r=n.get("area"),i=n.isStacked()?n.points2StackArea(t):n.points2area(t),a=s.mix({path:i},r);e=n.addShape("path",a),n.set("areaShape",e)},processPoint:function(t,e){var n=this,r=n.get("stackType");r&&"none"!=r&&n.processStackedPoint(t,e)},points2StackArea:function(t){{var e,r,i=this,a=t.length,s=i.getBaseValue(),o=t[0],l=t[a-1],c=i.isInCircle(),u="",h=i.get("invert"),f=i.getXName();i.getYName()}if(a){if(r=i.getVisiblePrev(),e=i.points2path(t),u=e,r){var g=r.getPoints().slice(0,t.length),d=g[0],p=i.points2path(g.reverse());p=p.replace("M","L"),u=c?e+"L"+d.x+" "+d.y+p:e+p}else c||(u=n("M ",o[f],s,h)+e.replace("M","L"),u=u+n("L ",l[f],s,h)+"");u&&!c&&(u+="z")}return u},_getFirstPoint:function(t){var e=null;return s.each(t,function(t){return null!=t.value?(e=t,!1):void 0}),e},_getLastPoint:function(t){for(var e=null,n=t.length-1;n>=0;n--){var r=t[n];if(null!=r.value){e=r;break}}return e},points2area:function(t){var e,i=this,a=t.length,o=i.getBaseValue(),c=i._getFirstPoint(t)||t[0],u=i._getLastPoint(t)||t[a-1],h=i.isInCircle(),f=i.get("invert"),g=i.getXName(),d=(i.getYName(),"");if(a)if(e=i.points2path(t),h){{i.getCircleCenter()}d=e}else if(d=n("M",c[g],o,f),d+=e.replace("M","L"),l.test(d)){d=s.parsePathString(d);var p=[],v=d[0];s.each(d,function(t,e){if(0!==e&&"M"==t[0]){var n=[],i=[],a=[],s=d[e-1];n[0]="L",n[1]=s[1],n[2]=o,i[0]="L",i[1]=v[1],i[2]=o,a[0]="M",a[1]=t[1],a[2]=o,"R"==s[0]?(s[0]="L",t[0]="R"):t[0]="L",p.push(r(n,f)),p.push(r(i,f)),p.push(r(a,f)),v=t}p.push(r(t))}),d=p,d.push(r(["L",u.x,o],f)),s.svg&&d.push(["Z"])}else d=d+n("L",u[g],o,f)+"z";return d}}),t=c}(),Q=function(t){function e(t,e){if(u.isNumber(e))return e;var n=a(t),i=r(e),s=n.getWidth();return n.tl.x+s*i}function n(t,e){if(u.isNumber(e))return e;var n=a(t),i=r(e),s=n.getHeight();return n.tl.y+s*i}function r(t){return.01*parseFloat(t)}function a(t){return t.get("parent").get("plotRange")}function s(t,e,n,r,i,a){var s=Math.acos((r-e)/r)/Math.PI*180,o=a?n-180+s:n-s;t.orignAngle=t.angle,t.angle=o,t.orignX=t.x,t.orignY=t.y,t.x=i.x+(r+5)*Math.cos(t.angle*g),t.y=i.y+(r+5)*Math.sin(t.angle*g)}function o(t,e,n,r,i,a){var o=parseInt(2*e/a,10),l=t.y+e,c=t.y-e;o<n.length&&n.splice(o,n.length-o);for(var u,h,f,g=0,d=n.length,p=0,v=0;d>v;v++){var m=n[v],x=(m.angle,m.y);if(h=d-v,u=i>0?(l-x)/h:(x-c)/h,v>0&&(p=i>0?(x-c)/v:(l-x)/v),g=v,a>u){0!=g&&(g=v+1);break}p>0&&a>p&&(f=v)}if(f)for(var v=0;f>=v;v++){var y=v*a;s(n[v],y,r,e,t,!0,a)}if(d-1>g){var b=0==g?0:g-1,_=n[b],x=_.y,k=i>0?l:c;h=d-b-1,u=Math.abs(k-x)/h,a>u&&(u=a);for(var v=d-1;v>=b;v--){var y=(d-1-v)*u;s(n[v],y,r,e,t)}for(var w=i>0?c:l,C=!1,v=b-1;v>0;v--){var S=n[v];if(!C&&Math.abs(w-S.y)/(v+1)<a&&(C=!0),C){var y=Math.abs(n[v+1].y-k)+a;s(n[v],y,r,e,t)}}}}var l=Z,c=v.Group,u=i,h=Y,f=q,g=Math.PI/180,d=5,p=function(t){p.superclass.constructor.call(this,t)};return p.ATTRS={size:"80%",innerSize:null,center:["50%","50%"],colors:null,colorHighlight:0,radius:null,innerRadius:null,startAngle:-90,endAngle:270,labelHeight:16,labelLine:!0,item:{stroke:"#fff"},visibleCache:{},borderCircle:null,cancelSelect:!0,xField:"name",stickyTracking:!1,animate:!0,duration:1e3},u.extend(p,f),u.mixin(p,[l,c,h.UseLegend]),u.augment(p,{draw:function(t){function e(){n&&r.setSelected(n)}var n,r=this;u.each(t,function(t,e){r.formatPoint(t,e);var i=r.addItem(t,e);t.obj&&t.obj.selected&&(n=i)}),r.get("animate")?r.animateItems(e):e(),r.get("borderCircle")&&r.drawBorderCircle(),r.get("labelsGroup")&&(r.processLabels(t),r.get("labelsGroup").toFront()),this.get("legedGroup")||this.renderLegend()},drawBorderCircle:function(){var t=this,e=t.getCenter(),n=t.get("borderCircle"),r=n.distance||10,i=t.get("radius"),a=t.get("innerRadius"),s=u.mix({cx:e.x,cy:e.y,r:i+r},n);if(t.addShape("circle",s),a&&a-r>0){var s=u.mix({cx:e.x,cy:e.y,r:a-r},n);t.addShape("circle",s)}},changeShapes:function(t){var e=this;t=t||e.getPoints(),u.each(t,function(t,n){e.formatPoint(t,n)}),this.clearSelected(),e.changePoints(t)},repaint:function(){var t=this;p.superclass.repaint.call(this),t.get("legend")&&t.resetLegendItems()},processLabels:function(t){var e=this,n=e.get("labelsGroup"),r=n.get("distance"),i=[],a=e.getCenter(),s=e.getRadius(),l=s+r,c=e.get("startAngle"),h=(e.get("endAngle"),e.get("labelHeight")),f=e.get("labelLine"),g=[];if(u.each(t,function(t){if(t.visible){var a=e._getLabelCfg(t,r,l);0>r?n.addLabel(a):a.factor>0?g.push(a):i.push(a)}}),i.length){var d;d=c>=-90?270:-90,o(a,l,i,d,-1,h),u.each(i,function(t){n.addLabel(t),f&&e.lineToLabel(t,s,r)})}g.length&&(o(a,l,g,90,1,h),u.each(g,function(t){n.addLabel(t),f&&e.lineToLabel(t,s,r)}))},getLengendItems:function(){var t=this,e=t.getItems(),n=t.get("legendType")||"rect",r=[];return u.each(e,function(t){var e={name:t.get("point").xValue,color:t.attr("fill"),type:n,item:t};r.push(e)}),r},resetLabels:function(){var t=this,e=t.get("labelsGroup"),n=t.get("lineGroup");e&&(e.clear(),n&&n.clear(),t.processLabels(t.getPoints()))},lineToLabel:function(t,e,n){var r,i=this,a=t.orignAngle||t.angle,s=i.getCenter(),o=i._getOffset(a,e+d/2),l=i.get("labelHeight"),c=i.get("lineGroup"),u=[];if(-90==t.angle&&(n-=l/2),u.push(["M",s.x+o.x,s.y+o.y]),null!=t.orignX){r=i._getOffset(a,e+n/2);var h=-90==t.angle?t.y+l/2:t.y;u.push(["R",s.x+r.x,s.y+r.y,t.x,h])}else u.push(["L",t.x,t.y]);c||(c=i.addGroup({elCls:"x-line-group"}),i.set("lineGroup",c)),c.addShape("path",{path:u,fill:null,stroke:t.color})},bindUI:function(){p.superclass.bindUI.call(this),this.bindItemClick()},bindMouseOver:function(){var t=this;t.on("mouseover",function(e){var n=e.target,r=n.shape;r&&t.setActivedItem(r)})},_getLabelCfg:function(t,e,n){var r=this,i=t.startAngle+(t.endAngle-t.startAngle)/2,a=r.getCenter(),s=a.x+(n+d)*Math.cos(i*g),o=a.y+(n+d)*Math.sin(i*g),l={},c=1;return l.x=s,l.y=o,0>e?i>-90&&90>=i?(l["text-anchor"]="end",l.rotate=i):(l["text-anchor"]="start",l.rotate=i-180):i>-90&&90>=i?(l["text-anchor"]="start",c=1):(c=-1,l["text-anchor"]="end"),l.factor=c,l.angle=i,l.color=t.color,l.point=t,l.text=t.xValue,l},getActiveItems:function(){return this.getItems()},isPlaceHolder:function(t){var e=t.get("point");return e&&e.obj&&e.obj.placeHolder},setItemActived:function(t,e){var n=this,r=t.getCfgAttr("attrs").fill||t.getCfgAttr("attrs").color;n.isPlaceHolder(t)||(e?(t.attr({fill:u.highlight(r,.1)}),t.set("actived",!0)):(t.attr({fill:r}),t.set("actived",!1)))},getTrackingInfo:function(){var t=this,e=t.getActived();return e&&e.get("point")},isItemActived:function(t){return t.get("actived")},getRadius:function(){var t=this,e=t.get("radius");return e||(e=t.calculateRadius(t.get("size")),t.set("radius",e)),e},getInnerRadius:function(){var t=this,e=t.get("innerRadius"),n=t.get("innerSize");return!e&&n&&(e=t.calculateRadius(n),t.set("innerRadius",e)),e
},calculateRadius:function(t){var e=this,n=e.get("parent").get("plotRange"),i=r(t);return Math.min(n.getWidth(),n.getHeight())/2*i},getCenter:function(){var t,r=this,i=r.get("centerPoint");return i||(i={},t=r.get("center"),i.x=e(r,t[0]),i.y=n(r,t[1]),r.set("centerPoint",i)),i},getItemCfg:function(t){var e=this,n=e.get("item"),r=t.obj,i={};return u.mix(i,n),r&&r.attrs&&u.mix(i,r.attrs),i.fill=t.color,e.get("allowPointSelect")&&(i.cursor="pointer"),i},_getColor:function(t){var e,n=this,r=n.get("colors"),i=n.get("colorHighlight");return t%=r.length,e=r[t],i&&(e=u.highlight(i)),e},formatPoint:function(t,e){var n=this,r=n.getVisiblePoints(),i=!1;if(t.index=e,u.each(r,function(e){(t.index==e.index||t==e)&&(i=!0)}),t.visible=i,i){var a=n._getPiePercent(t,r),s=n.get("startAngle"),o=n.get("endAngle"),l=o-s;t.percent=a.percent,t.obj&&t.obj.attrs&&(t.color=t.obj.attrs.fill),t.color=t.color||n._getColor(e),t.prePercent=a.prePercent,t.startAngle=s+l*a.prePercent,t.endAngle=s+l*(t.prePercent+t.percent)}},getPointByValue:function(t,e){return{xValue:t,value:e}},_getPiePercent:function(t,e){var n=0,r=0,i=null,a={};return u.each(e,function(e,n){(t.index==e.index||t==e)&&(i=n)}),u.each(e,function(t,e){i>e&&(r+=t.value),n+=t.value}),a.percent=t.value/n,a.prePercent=r/n,a},getVisiblePoints:function(){var t,e=this,n=[],r=e.getItems();return!e.get("isPaint")||0==r.length||e.get("repainting")?e.getPoints():(t=e.get("visiblePoints"))?t:(u.each(r,function(t){t.get("visible")&&n.push(t.get("point"))}),e.set("visiblePoints",n),n)},animateItem:function(t,e){var n=this,r=t.get("point"),i=r.startAngle,a=r.endAngle,s=e==t.get("prePoint"),o=s?e.startAngle:e.endAngle,l=s?e.endAngle:e.endAngle,c=t.get("animHadler");c&&u.stopStep(c),c=u.animStep(n.get("changeDuration"),function(e){var r,c,u;if(s?(c=o+(i-o)*e,u=l+(a-l)*e):(c=o-(o-i)*e,u=l-(l-a)*e),r=n._getPiePath(c,u),t.attr("path",r),n.isSelected(t)){var h=n._getOffset(c,u,10);t.attr("transform","t"+h.x+" "+h.y)}}),t.set("animHadler",c)},pointToFactorPath:function(t,e){var n,r,i=this,a=i.get("startAngle");return n=t.startAngle,r=t.endAngle,i._getPiePath(a+(n-a)*e,a+(r-a)*e)},_getPiePath:function(t,e){var n,r=this,i=r.getCenter(),a=i.x,s=i.y,o=r.getRadius(),l=r.getInnerRadius(),c=a+o*Math.cos(t*g),u=a+o*Math.cos(e*g),h=s+o*Math.sin(t*g),f=s+o*Math.sin(e*g);if(l){var d=a+l*Math.cos(t*g),p=a+l*Math.cos(e*g),v=s+l*Math.sin(t*g),m=s+l*Math.sin(e*g);n=[],e-t==360?(n.push(["M",a,s-o]),n.push(["a",o,o,0,1,1,0,2*o]),n.push(["a",o,o,0,1,1,0,-2*o]),n.push(["M",a,s-l]),n.push(["a",l,l,0,1,0,0,2*l]),n.push(["a",l,l,0,1,0,0,-2*l]),n.push(["z"])):(n.push(["M",d,v]),n.push(["L",c,h]),n.push(["A",o,o,0,+(e-t>180),1,u,f]),n.push(["L",p,m]),n.push(["A",l,l,0,+(e-t>180),0,d,v]),n.push(["z"]))}else n=e-t==360?[["M",a,s-o],["a",o,o,0,1,1,0,2*o],["a",o,o,0,1,1,0,-2*o],["z"]]:["M",a,s,"L",c,h,"A",o,o,0,+(e-t>180),1,u,f,"z"];return n},_getOffset:function(t,e,n){var r,i={};return null==n?(r=t,n=e):r=t+(e-t)/2,i.x=n*Math.cos(r*g),i.y=n*Math.sin(r*g),i},setItemSelected:function(t,e){var n,r=this,i=t.get("point"),a=r.get("changeDuration");e?(n=r._getOffset(i.startAngle,i.endAngle,10),t.animate({transform:"t"+n.x+" "+n.y},a)):t.animate({transform:"t0 0"},a),t.set("selected",e)},_onVisibleChange:function(){var t=this;t.set("points",null),this.set("visiblePoints",null),this.changeShapes(),t.resetLabels()},showChild:function(t){p.superclass.showChild.call(this,t),this._onVisibleChange()},hideChild:function(t){p.superclass.hideChild.call(this,t),this._onVisibleChange()},remove:function(){this.removeLegend(),p.superclass.remove.call(this)}}),t=p}(),K=function(t){var e=U;return t=e}(),te=function(t){var e=j;return t=e}(),ee=function(t){function e(t){e.superclass.constructor.call(this,t)}var n=H,r=i,a="x-chart-axis";return e.ATTRS={zIndex:4,x:null,y:null,start:null,end:null,tickOffset:0,elCls:a,position:"bottom",line:{"stroke-width":1,stroke:"#C0D0E0"},tickLine:{"stroke-width":1,stroke:"#C0D0E0",value:5}},r.extend(e,n),r.augment(e,{beforeRenderUI:function(){var t,n=this;if(e.superclass.beforeRenderUI.call(n),t=n.get("plotRange")){var r=n.getRangeInfo();n.set("start",r.start),n.set("end",r.end),n.set("orthoEnd",n._getOrthoEnd())}n.set("indexCache",{}),n.set("pointCache",[])},getRangeInfo:function(){var t=this,e=t.get("plotRange"),n={};if(e){var r=e.start,i=t.get("position"),a={};t.isVertical()?"left"==i?(a.y=e.end.y,a.x=r.x):(r={},a=e.end,r.x=e.end.x,r.y=e.start.y):"top"==i?(r={},r.x=e.start.x,r.y=e.end.y,a=e.end):(a.x=e.end.x,a.y=r.y),n.start=r,n.end=a}return n},change:function(t){var e=this;e.isChange(t.ticks)&&(e.fire("beforechange",{info:t}),e._resetRange(),e._clearTicksInfo(),e.changeInfo(t),e._processTicks(null,!0),e._changeLine(),e._changeTicks(),e._changeGrid(),e.resetLabels(),e.fire("afterchange"))},_resetRange:function(){var t=this,e=t.getRangeInfo();t.set("start",e.start),t.set("end",e.end),t.set("orthoEnd",t._getOrthoEnd())},isRangeChange:function(){var t=this,e=t.getRangeInfo(),n=t.get("start"),r=t.get("end");return e.start.x!=n.x||e.start.y!=n.y||e.end.x!=r.x||e.end.y!=r.y?!0:t.get("orthoEnd")!==t._getOrthoEnd()?!0:!1},isChange:function(t){var e=this,n=e.get("ticks");return e.isRangeChange()||!r.equalsArray(t,n)},changeInfo:function(t){var e=this;e.set("ticks",t.ticks)},_clearTicksInfo:function(){var t=this,e=t.get("grid"),n=t.get("labels");t.set("pointCache",[]),t.set("indexCache",[]),t.set("tickItems",[]),e&&(e.items=[]),n&&(n.items=[])},paint:function(){var t=this;t.fire("beforepaint"),t._drawLines(),t._renderTicks(),t._renderGrid(),t.fire("afterpaint")},_changeLine:function(){var t,e=this,n=e.get("lineShape");n&&(t=e.getLinePath(),n.attr("path",t))},isVertical:function(){var t,e=this,n=e.get("isVertical");return null!=n?n:(t=e.get("position"),n="bottom"==t||"top"==t?!1:!0,e.set("isVertical",n),n)},getOffset:function(t){var e=this,n=e.get("ticks"),i=r.indexOf(n,t);return e.getOffsetByIndex(i)},getStartOffset:function(){return this._getStartCoord()},getEndOffset:function(){return this._getEndCoord()},getValue:function(t){var e=this,n=e._getStartCoord(),r=e._getEndCoord();return n>t||t>r?0/0:e.parseOffsetValue(t)},getStartValue:function(){var t=this,e=t.get("ticks");return e[0]},getEndValue:function(){var t=this,e=t.get("ticks");return e[e.length-1]},getSnapIndex:function(t){var e=this,n=e.get("pointCache"),i=[].concat(n).sort(function(t,e){return t-e}),a=r.snapTo(i,t);return r.indexOf(n,a)},_appendEndOffset:function(t){var e,n=this,r=n.get("tickOffset");return"number"!=typeof r&&(r=r[0]),r&&(e=n._getDirectFactor(),0==t?t+=r*e:e>0?t+=r:t-=r),t},getOffsetByIndex:function(t){var e=this,n=e._getLength(),r=e.get("ticks"),i=r.length,a=n/(i-1)*t;return e._appendEndOffset(a)+e._getStartCoord()},getOffsetPoint:function(t,e){var n=this,r=n._getOrthoCoord(),i=n.get("indexCache");return e||(void 0!==i[t]?e=i[t]:(e=n.getOffsetByIndex(t),i[t]=e)),n.isVertical()?{x:r,y:e}:{x:e,y:r}},getTickOffsetPoint:function(t){return this.getOffsetPoint(t)},_getStartCoord:function(){var t=this,e=t.get("start");return t.isVertical()?e.y:e.x},_getOrthoCoord:function(){var t=this,e=t.get("start");return t.isVertical()?e.x:e.y},_getEndCoord:function(){var t=this,e=t.get("end");return t.isVertical()?e.y:e.x},_getOrthoEnd:function(){var t,e=this,n=e.get("plotRange");return t=e.isVertical()?n.end.x:n.end.y},_getMiddleCoord:function(){var t=this,e=t._getStartCoord(),n=t._getLength();return e+t._appendEndOffset(n/2)},getLength:function(){return Math.abs(this._getLength())},getTickAvgLength:function(){var t=this,e=t.get("ticks");return t.getLength()/(e.length-1)},_getLength:function(){var t,e=this,n=e.get("start"),r=e.get("tickOffset"),i=e.get("end");return r="number"!=typeof r?r[0]+r[1]:2*r,t=e.isVertical()?i.y-n.y:i.x-n.x,t>0?t-=r:t+=r,t},getLinePath:function(){var t=this,e=t.get("start"),n=t.get("end"),r=[];return r.push(["M",e.x,e.y]),r.push(["L",n.x,n.y]),r},getTickEnd:function(t){var e=this,n=e.get("tickLine"),r=e._getAlignFactor(),i=n.value,a={};return e.isVertical()?(a.x2=t.x1+i*r,a.y2=t.y1):(a.x2=t.x1,a.y2=t.y1+i*r),a},_changeTicks:function(){var t=this,e=t.get("tickShape"),n=t.get("tickItems"),i="";return e?(r.each(n,function(t){var e=r.substitute("M{x1} {y1}L{x2} {y2}",t);i+=e}),void(t.get("animate")?r.animPath(e,i,2):e.attr("path",i))):void(n&&n.length&&t._renderTicks())},_getDirectFactor:function(){var t,e,n,r=this,i=r.get("directfactor");return i?i:(i=1,t=r.get("position"),e=r.get("start"),n=r.get("end"),"bottom"==t||"top"==t?e.x>n.x&&(i=-1):e.y>n.y&&(i=-1),r.set("directfactor",i),i)},_getAlignFactor:function(){var t,e=this,n=e.get("factor");return n?n:(t=e.get("position"),n="bottom"==t||"right"==t?1:-1,e.set("factor",n),n)},_renderTitle:function(){var t=this,e=t.get("title"),n=t._getMiddleCoord(),i=t.getOffsetPoint(null,n),s=r.mix({},e);e.text&&(s.x=i.x+(e.x||0),s.y=i.y+(e.y||0),t.addShape({type:"label",elCls:a+"-title",attrs:s}))},getGridItemCfg:function(t){var e=this,n={},r=e.get("plotRange");return n.x1=t.x,n.y1=t.y,e.isVertical()?(n.y2=n.y1,n.x2=r.end.x):(n.x2=n.x1,n.y2=r.end.y),n},_changeGrid:function(){var t,e=this,n=e.get("grid");n&&(t=e.get("gridGroup"),t&&t.change(n.items))},remove:function(){{var t=this,n=t.get("gridGroup");t.get("labelsGroup")}n&&n.remove(),t.removeLabels(),e.superclass.remove.call(this)}}),t=e}(),ne=function(t){function e(t){e.superclass.constructor.call(this,t)}var n=i,r=ee;return n.extend(e,r),e.ATTRS={categories:null,type:"category",tickAlignCenter:!0},n.augment(e,{beforeRenderUI:function(){var t=this;if(e.superclass.beforeRenderUI.call(t),t.get("ticks")){if(!t.get("categories")){var n=[];n.concat(t.get("ticks")),t.set("categories",n)}}else{var n=t.get("categories"),r=[];r=r.concat(n),t.get("tickAlignCenter")&&" "!=r[r.length-1]&&r.push(" "),t.set("ticks",r)}},changeInfo:function(t){var e=this,r=t.ticks;r?t.categories||(t.categories=[].concat(t.ticks),n.remove(t.categories," ")):(r=[].concat(t.categories),e.get("tickAlignCenter")&&r.length&&" "!=r[r.length-1]&&r.push(" ")),e.set("categories",t.categories),e.set("ticks",r)},getOffsetByIndex:function(t){return this._getOffsetByTicks(t)},getValue:function(t){var e,n=this,r=n.get("ticks"),i=n.get("categories"),a=n.get("pointCache");if(i.length<=r.length)e=n.getSnapIndex(t);else{var s=a[0],o=t-s,l=n.get("tickAlignCenter")?i.length+1:i.length,c=n._getAvgLength(l);e=Math.round(o/c)}return i[e]},getOffset:function(t){var e=this,r=e.get("categories"),i=n.indexOf(r,t);return e._getOffsetByCategories(i)},_getOffsetByIndex:function(t,e){var n=this,r=n._getAvgLength(e),i=r*t;return n.get("tickAlignCenter")&&(i+=r/2),n._appendEndOffset(i)+n._getStartCoord()},_getOffsetByCategories:function(t){var e=this,n=e.get("categories"),r=e.get("tickAlignCenter")?n.length+1:n.length;return e._getOffsetByIndex(t,r)},_getOffsetByTicks:function(t){var e=this,r=e.get("ticks"),i=e.get("categories"),a=r[t],s=n.indexOf(i,a);return-1!=s?e._getOffsetByCategories(s):e._getOffsetByIndex(t)},_getAvgLength:function(t){var e=this,n=e._getLength(),t=t||e.get("ticks").length,r=n/(t-1);return r},getTickOffsetPoint:function(t){var e=this,n=e._getOrthoCoord(),r=e._getAvgLength(),i=e.getOffsetByIndex(t);return e.get("tickAlignCenter")&&(i-=r/2),e.isVertical()?{x:n,y:i}:{x:i,y:n}}}),t=e}(),re=function(t){function e(t,e,n){var r=Math.min(t,e),i=Math.max(t,e);return(n>=r||2>r-n)&&(i>=n||2>n-i)}function n(t){n.superclass.constructor.call(this,t)}var r=ee,a=i,s=["k","m","g","t"],o=0/0,l=a.snapFloor,c=a.snapCeiling;return a.extend(n,r),n.ATTRS={min:null,max:null,tickInterval:null,autoOffset:!1,autoAppend:5,type:"number",formatter:function(t){if(null==t||isNaN(t))return"";if(1e3>t)return t;var e=this.get("tickInterval");if(e%1e3!==0)return t;for(var n=1e3,r=1;r<=s.length;r++){if(t>=n&&1e3*n>t)return t/n+s[r-1];n=1e3*n}return t/1e12+"t"}},a.augment(n,{beforeRenderUI:function(){var t=this;n.superclass.beforeRenderUI.call(t);var e=t.get("ticks");t.get("autoOffset")&&e&&t._setAutoOffset({ticks:e,min:t.get("min"),max:t.get("max")}),e||(e=t._getTicks(t.get("max"),t.get("min"),t.get("tickInterval")),t.set("ticks",e))},_getTicks:function(t,e,n){var r,i=[],a=(t-e)/n;if(!(t>e)||isNaN(t)||null==t||isNaN(e)||null==e||isNaN(n)||null==n)return[];i.push(e);for(var s=1;a>=s;s++)r=n*s+e,i.push(r);return i},changeInfo:function(t){var e=this;if(t.interval&&(t.tickInterval=t.interval),e.get("autoOffset")&&e._setAutoOffset(t),t.ticks)e.set("ticks",t.ticks);else{var n=e._getTicks(t.max,t.min,t.tickInterval);e.set("ticks",n)}e.set("tickInterval",t.tickInterval)},_setAutoOffset:function(t){var e,n=this,r=t.ticks,i=0,a=0,s=[],o=n.get("autoAppend"),l=n.getEndOffset()-n.getStartOffset();if(null!=t.min&&t.min>r[0]){for(;t.min>r[1];)r.shift();i=(r[1]-t.min)/(r[1]-r[0]),.8>i?r.shift():i=0}var c=r.length;if(null!=t.max&&t.max<r[c-1]){for(;t.max<r[c-2];)r.pop(),c=r.length;a=(t.max-r[c-2])/(r[c-1]-r[c-2]),r.pop()}e=l/(r.length-1+i+a),s[0]=e*i+o,s[1]=e*a+o,n.set("tickOffset",s)},getOffset:function(t){t=parseFloat(t);var n=this,r=n.getRelativeOffset(t),i=n._getStartCoord(),a=n._getEndCoord();return r=n._appendEndOffset(r)+n._getStartCoord(),e(i,a,r)?r:o},getValue:function(t){var e,n,r,i,s,o,u,h,f=this,g=f._getStartCoord(),d=f._getEndCoord(),p=f.isVertical();e=f.get("pointCache");var v=Math.max(g,d),m=Math.min(g,d);if(m>t||t>v)return 0/0;var x=e.slice(0).sort(function(t,e){return t-e});if(n=p?c(x,t):l(x,t),isNaN(n)&&(n=x[0],o=x[1]),i=n,r=a.indexOf(e,n),s=r,h=f.get("ticks"),u=f.get("tickInterval"),avg=f._getAvgLength(h.length),n==t)return h[r];if(u)return h[r]+(t-i)/avg*u;if(null==o&&(o=c(x,t),isNaN(o))){var y=x.length;r=y-2,s=y-1,i=x[y-1]}return h[s]+(t-i)/avg*(h[r+1]-h[r])},_getAvgLength:function(t){var e=this,n=e._getLength();return n/(t-1)},getRelativeOffset:function(t){var e,n,r,i,s=this,o=s.get("ticks"),u=a.indexOf(o,t),h=s.get("tickInterval"),f=o.length,g=s._getAvgLength(o.length);return-1!==u?g*u:(e=l(o,t),n=c(o,t),r=e,isNaN(e)?(e=o[0],n=o[1],r=e,i=0):(u=a.indexOf(o,e),i=g*u),isNaN(n)&&(e=o[f-2],n=o[f-1],r=n,i=g*(f-1)),i+=h?(t-r)/h*g:(t-r)/(n-e)*g)}}),t=n}(),ie=function(t){function e(t){if(t instanceof Date)return t.getTime();if(n.isNumber(t))return t;var e=t;return n.isString(t)&&(e=t.replace("-","/"),e=new Date(e).getTime()),e}var n=i,r=re,a=function(t){a.superclass.constructor.call(this,t)};return a.ATTRS={type:"time",startDate:null,autoOffset:!0,endDate:null},n.extend(a,r),n.augment(a,{beforeRenderUI:function(){var t=this,n=e(t.get("startDate")),r=e(t.get("endDate"));n&&!t.get("min")&&t.set("min",n),r&&!t.get("max")&&t.set("max",r),a.superclass.beforeRenderUI.call(t)}}),t=a}(),ae=function(t){var e=i,n=ne,r=function(t){r.superclass.constructor.call(this,t)};return r.ATTRS={type:"timeCategory",tickAlignCenter:!1},e.extend(r,n),t=r}(),se=function(t){var e=i,n=ne,r=function(t){r.superclass.constructor.call(this,t)};return r.ATTRS={type:"numberCategory",tickAlignCenter:!1},e.extend(r,n),t=r}(),oe=function(t){var e=i,n=re,r=function(t){r.superclass.constructor.call(this,t)};return r.ATTRS={circle:null,position:"left",type:"radius"},e.extend(r,n),e.augment(r,{beforeRenderUI:function(){r.superclass.beforeRenderUI.call(this);var t=this,e=t.get("circle");e&&(t.set("start",e.getCenter()),t.set("end",e.getCirclePoint(0)))},getGridItemCfg:function(t){for(var e=this,n={},r=[],i=e.get("circle"),a=i.getCenter(),s=i.getTicksCount(),o=Math.abs(t.y-a.y),l=0;s>l;l++){var c=i.getOffsetByIndex(l),u=i.getCirclePoint(c,o);r.push(u)}return n.points=r,n.r=o,n.center=a,n},getPointByAngle:function(t,e){var n=this,r=n.get("circle"),i=r.getCenter(),a=n.getOffset(e);return r.getCirclePoint(t,Math.abs(a-i.y))},_resetRange:function(){},isRangeChange:function(){return!1},getValueByPoint:function(t,e){var n=this,r=n.get("circle"),i=r.getCenter(),a=r.getDistance(t,e);return n.getValue(i.y-a)}}),t=r}(),le=function(t){function e(t,e){var n=Raphael.color(t),r=n.l*(1+e);return Raphael.hsl2rgb(n.h,n.s,r).hex}function n(t,e,n,r,i){var a,s=i.getCenter(),o=s.x,l=s.y,c=i.getCirclePoint(t,n),u=i.getCirclePoint(e,n);if(r){var h=i.getCirclePoint(t,r),f=i.getCirclePoint(e,r);a=[],a.push(["M",h.x,h.y]),a.push(["L",c.x,c.y]),a.push(["A",n,n,0,+(e-t>180),1,u.x,u.y]),a.push(["L",f.x,f.y]),a.push(["A",r,r,0,+(e-t>180),0,h.x,h.y]),a.push(["z"])}else a=["M",o,l,"L",c.x,c.y,"A",n,n,0,+(e-t>180),1,u.x,u.y,"z"];return a}var r=i,a=X,s=v.Group,o=g,l=Z,c=function(t){c.superclass.constructor.call(this,t)};return c.ATTRS={type:"column",elCls:"x-chart-column",columnWidth:null,autoWidth:!0,columnOffset:0,cancelSelect:!1,stackPadding:1,animate:!0,duration:1e3,columnActive:!0,item:{stroke:"none","stroke-width":1,"fill-opacity":.75}},r.extend(c,a),r.mixin(c,[l,s,o]),r.augment(c,{processColor:function(){var t=this,e=t.get("color");if(e){var n=t.get("item");n.fill||(n.fill=e)}},bindUI:function(){c.superclass.bindUI.call(this),this.bindItemClick()},draw:function(t){var e=this;e.resetWidth(),r.each(t,function(t,n){e._drawPoint(t,n)}),e.get("animate")&&e.animateItems(),e.sort()},_drawPoint:function(t,e){var n=this,r=n.addItem(t,e);if(n.get("labels")){var i=n.addLabel(t.value,t);r.set("label",i)}},addPoint:function(t,e,n){var r=this,i=r.get("data");i.push(t),e&&(i.shift(),n&&r.shiftPoint()),r.changeData(i,n)},shiftPoint:function(){var t=this,e=t.getItems()[0];e&&e.remove(),c.superclass.shiftPoint.call(this)},resetWidth:function(){if(this.get("autoWidth")){if(this.isInCircle())return void this.resetCircleWidth();var t,e,n,r,i=this,a=(i.get("xAxis"),i._getAvgLength()),s=10,o=i._getIndexInfo();e=o.count,t=o.curIndex,n=a/2/e,s=.5*n,r=.5*(a-e*n-(e-1)*s)+((t+1)*n+t*s)-.5*n-.5*a,i.set("columnWidth",n),i.set("columnOffset",r)}},_getAvgLength:function(){var t,e=this,n=e.get("xAxis"),r=n.get("type"),i=e.get("data");if("time"!=r&&"number"!=r&&"timeCategory"!=r)t=n.getTickAvgLength();else{var a=n.getLength();t=a/i.length}return t},_getIndexInfo:function(){var t,e,n=this,i=n.get("parent"),a=i.getSeries?i.getSeries():i.get("children"),s=[];return n.isStacked()?(e=1,t=0):(r.each(a,function(t){t.get("visible")&&"column"==t.get("type")&&s.push(t)}),e=s.length,t=r.indexOf(s,n)),{curIndex:t,count:e}},resetCircleWidth:function(){var t,e,n,r,i=this,a=i.get("xAxis"),s=a.getTickAvgAngle();info=i._getIndexInfo(),e=info.count,t=info.curIndex,n=s/e,r=t*n,i.set("columnWidth",n),i.set("columnOffset",r)},changeShapes:function(t){var e=this;e.resetWidth(),e.changePoints(t)},getActiveItems:function(){return this.getItems()},isItemActived:function(t){return t.get("actived")},setItemActived:function(t,n){var r=this,i=t.getCfgAttr("attrs").fill;r.get("columnActive")&&(n?(t.attr("fill",e(i,.2)),t.set("actived",!0)):(t.attr("fill",i),t.set("actived",!1)))},setItemSelected:function(t,e){var n=t.getCfgAttr("attrs"),i=n.fill,a=n.stroke,s=n["stroke-width"];e?(t.attr({stroke:r.dark(i,.3),"stroke-width":2}),t.set("selected",!0)):(t.attr({stroke:a,"stroke-width":s}),t.set("selected",!1))},onStickyTracking:function(t){var e=this,n=e.getTrackingInfo(t.point),i=e.getItems();n&&r.each(i,function(t){t.get("point").x==n.x&&t.get("point").y==n.y&&e.setActivedItem(t)})},pointToFactorPath:function(t,e){var r,i,a=this,s=(a.get("item"),a.get("columnWidth")),o=a.get("columnOffset"),l=a.getXName(),c=a.getYName(),u=a.get("invert"),h=u?"h":"v",f=u?"v":"h",g=0,d=a.getBaseValue(),p=a.isInCircle(),v=[];if(p){var m=a.get("xAxis"),x=t.xValue,y=o+x,b=o+x+s,_=t.r||m.getDistance(t.x,t.y),k=t.ir||0;_*=e,k*=e,v=n(y,b,_,k,m)}else{a.isStacked()&&t.lowY?(i=t.lowY,g=a.get("stackPadding")):i=d,i-=g,r=t[c]-i;var w=t[l]+o-s/2,C=d+(i-d)*e;v.push(u?["M",C,w]:["M",w,C]),v.push([h,r*e]),v.push([f,s]),v.push([h,-1*r*e]),v.push(["z"])}return v},processPoint:function(t,e){var n=this,r=n.get("stackType");r&&"none"!=r&&n.processStackedPoint(t,e)}}),t=c}(),ce=function(t){var e=ee;return e.Category=ne,e.Number=re,e.Time=ie,e.TimeCategory=ae,e.NumberCategory=se,e.Auto=f,e.Circle=W,e.Radius=oe,t=e}(),ue=function(t){var e=q;return e.Cartesian=X,e.Line=$,e.Column=le,e.Area=J,e.Pie=Q,e.Stacked=g,e.ItemGroup=Z,t=e}(),he=function(t){var e=ue,n=i,r=function(t){r.superclass.constructor.call(this,t)};return n.extend(r,e.Cartesian),r.ATTRS={elCls:"x-chart-arearange-series",connectNulls:!1,area:{},line:{},lineActived:{},areaActived:{}},n.augment(r,{processColor:function(t){var e=this,n=e.get("line"),r=e.get("area");n.stroke||(n.stroke=t),r.fill||(r.fill=t)},draw:function(t,e){var n=this;n.get("animate")?n.animateClip(function(){n._drawArea(t),n._drawLine(t)},e):(n._drawArea(t),n._drawLine(t))},getTipInfo:function(t){return t.lowValue+" ~ "+t.highValue},getData:function(t){var e=this,r=e.get("data"),i=[];return"xAxis"==t?i=n.map(r,function(t){return t[0]}):n.each(r,function(t){var e=t.slice(1,3);i.push(Math.max.apply(null,e)),i.push(Math.min.apply(null,e))}),i},processPoint:function(t){var e=this,n=t.arr,r=n.length,i=e.get("yAxis");return t.lowY=t.y,t.lowValue=n[r-2],t.highY=i.getOffset(n[r-1]),t.highValue=n[r-1],t},_drawLine:function(t){var e=this,r=e.get("line"),i=n.mix({},r);i.path=e.point2path(t),lineShape=e.addShape("path",i),e.set("lineShape",lineShape)},_drawArea:function(t){var e=this,r=e.get("area"),i=n.mix({},r);i.path=e.point2Area(t);var a=e.addShape("path",i);e.set("areaShape",a)},_getFirstPoint:function(t){var e=null;return n.each(t,function(t,n){return null!=t.value?(e=t,e.index=n,!1):void 0}),e},_getLastPoint:function(t){for(var e=null,n=t.length-1;n>=0;n--){var r=t[n];if(null!=r.value){e=r,e.index=n;break}}return e},_getNextPoint:function(t,e){for(var n=null,r=e;r<t.length;r++){var i=t[r];if(null!=i.value){n=i,n.index=r;break}}return n},getLinePath:function(t){for(var e=this,r=e.get("connectNulls"),i=t.length,a=(e._getFirstPoint(t)||t[0],e._getLastPoint(t)||t[i-1],{lowPath:[],highPath:[]}),s=[],o=[],l=0;i>l;l++){var c=t[l];null!=c.value&&s.push(l)}var u,h;if(n.each(s,function(t,e){0==e?h=t:u+1!=t?(o.push({startIndex:h,endIndex:u}),h=t,e==s.length-1&&o.push({startIndex:t,endIndex:t})):e==s.length-1&&o.push({startIndex:h,endIndex:s[e]}),u=t}),n.each(o,function(e){var n=[],r=[],i=e.startIndex,s=e.endIndex;n.push(["M",t[i].x,t[i].highY]),i==s&&n.push(["L",t[s].x,t[s].highY]);for(var o=i+1;s>=o;o++){var e=["L",t[o].x,t[o].highY];n.push(e)}r.push(["M",t[s].x,t[s].lowY]),i==s&&r.push(["L",t[s].x,t[s].highY]);for(var o=s-1;o>=i;o--){var e=["L",t[o].x,t[o].lowY];r.push(e)}a.highPath.push(n),a.lowPath.push(r)}),r){for(var f=[],g=[],d=a.highPath.length,p=0;d>p;p++){var v=a.highPath[p],m=a.lowPath[d-p-1];p>0&&(v[0][0]="L",m[0][0]="L");for(var x=0;x<v.length;x++)f.push(v[x]);for(var x=0;x<m.length;x++)g.push(m[x])}a={lowPath:[g],highPath:[f]}}return a},point2path:function(t){var e=this,r=(e.get("connectNulls"),e.getLinePath(t)),i=[],a=[],s=[];return n.each(r.highPath,function(t){a=a.concat(t)}),n.each(r.lowPath,function(t){s=s.concat(t)}),i=a.concat(s)},point2Area:function(t){var e=this,r=e.getLinePath(t),i=[],a=[];return n.each(r.lowPath,function(t,e){var n=r.highPath[e],a=[];t[0][0]="L",a=n.concat(t),a.push(["z"]),i.push(a)}),a=i.join()},changeShapes:function(t){var e=this,r=e.get("lineShape"),i=e.get("areaShape"),a=e.point2path(t),s=e.point2Area(t);e.get("animate")?(n.animPath(i,s),n.animPath(r,a)):(r.attr("path",a),i.attr("path",s))},setActiveStatus:function(t){var e=this,n=e.get("line"),r=e.get("area"),i=e.get("lineShape"),a=e.get("areaShape"),s=e.get("lineActived"),o=e.get("areaActived");t?(s&&i.attr(s),o&&a.attr(o)):(n&&i.attr(n),r&&a.attr(r))}}),t=r}(),fe=function(t){var e=ue.Cartesian,n=v.Group,r=i,a=function(t){a.superclass.constructor.call(this,t)};return a.ATTRS={elCls:"x-chart-bubble",type:"bubble",circle:{},activeCircle:{},legendType:"circle",radiusField:"r",animate:!0,radiusFormatter:function(t){return Math.pow(t,.75)},autoPaint:!1,stickyTracking:!1},r.extend(a,e),r.mixin(a,[n]),r.augment(a,{processColor:function(){var t=this,e=t.get("color");if(e){var n=t.get("circle");n&&(r.trySet(n,"stroke",e),r.trySet(n,"fill",e))}},renderUI:function(){a.superclass.renderUI.call(this),this._renderGroup()},draw:function(t){var e=this;r.each(t,function(t){e.addBubble(t)})},changeShapes:function(){var t=this,e=t.getPoints(),n=t.getItems();r.each(n,function(n,r){var i=e[r];i&&(n.animate({cx:i.x,cy:i.y},t.get("changeDuration")),n.set("point",i))});var i=n.length;if(e.length<i)for(var a=i-1;a>=e.length;a--)n[a].remove();if(e.length>i)for(var a=i;a<e.length;a++)t.addBubble(e[a])},getItems:function(){return this.get("group").get("children")},getActiveItems:function(){return this.getItems()},_renderGroup:function(){var t=this,e=t.addGroup();t.set("group",e)},setItemActived:function(t,e){var n=this,r=n.get("circle"),i=n.get("activeCircle");e?(t.attr(i),t.set("actived",!0)):(t.attr(r),t.set("actived",!1))},getTrackingInfo:function(){var t=this,e=t.getActived();return e&&e.get("point")},isItemActived:function(t){return t.get("actived")},addBubble:function(t){var e,n,i=this,a=i.get("circle"),s=5,o=i.get("radiusField"),l=r.mix({},a);t.obj&&(s=t.obj[o]),t.arr&&(s=t.arr[2],null==s&&(s=t.arr[1])),e=i._getRadius(s),l.cx=t.x,l.cy=t.y,i.get("animate")&&r.svg?(l.r=0,n=i.get("group").addShape("circle",l),n.animate({r:e},i.get("duration"))):(l.r=e,n=i.get("group").addShape("circle",l)),i.get("labels")&&i.addLabel(t.value,t),n.set("point",t)},_getRadius:function(t){var e=this,n=e.get("radiusFormatter");return n?n(t):t},bindMouseOver:function(){var t=this;t.get("group").on("mouseover",function(e){var n=e.target,r=n.shape;t.setItemActived(r,!0)})},bindMouseOut:function(){var t=this;t.get("group").on("mouseout",function(e){var n=e.target,r=n.shape;t.setItemActived(r,!1)})}}),t=a}(),ge=function(t){function e(t,e,n){t&&!t[e]&&(t[e]=n)}var n=i,r=ue.Cartesian,a=(v.Group,function(t){a.superclass.constructor.call(this,t)});return a.ATTRS={elCls:"x-chart-scatter",stickyTracking:!1,autoPaint:!1,animate:!1,legendType:null},n.extend(a,r),n.augment(a,{processColor:function(){var t=this,n=t.get("color");if(n){var r=t.get("markers");r&&(e(r.marker,"stroke",n),e(r.marker,"fill",n))}},draw:function(t){var e=this;n.each(t,function(t){e.addMarker(t)})},bindMouseOver:function(){var t=this,e=t.get("markersGroup");e&&e.on("mouseover",function(t){var n=t.target,r=n.shape;r&&e.setActivedItem(r)})},getTrackingInfo:function(){var t,e,n=this,r=n.get("markersGroup");return r&&(t=r.getActived(),t&&(e=t.get("point"))),e},bindMouseOut:function(){var t=this,e=t.get("markersGroup");e&&e.on("mouseout",function(t){var n=t.target,r=n.shape;r&&e.clearActivedItem(r)})}}),t=a}(),de=function(t){function e(t){e.superclass.constructor.call(this,t)}var n=ue.Cartesian,r=K,a=i;return a.extend(e,n),e.ATTRS={type:"flag",elCls:"x-chart-flag-series",flags:null,onSeries:null,zIndex:6},a.augment(e,{_getPoints:function(){var t=this,e=t.get("data"),n=t.get("xField"),r=(t.get("yField"),t.get("onSeries")||""),i=t.get("parent"),s=i.find(r),o=t.get("flag"),l=t.get("line"),c=t.get("xAxis"),u=t.get("yAxis"),h=[];return cfg=a.mix({},o,l),a.each(e,function(r,i){var o,l=0;if(a.isObject(r)){var f=r[n];if(s&&s.get("visible"))o=s.findPointByValue(f);else{var g=c.getOffset(f),d=u.getStartOffset();o={x:g,y:d,xValue:f}}if(!o)return!0;a.each(e,function(t,e){i>e&&r[n]==t[n]&&l++}),o=a.mix({},o,{y:o.y,index:l}),r.tooltip=r.flag&&r.flag.text?r.flag.text:t.get("flags").flag.text,o.obj=r}t.processPoint(o,i),h.push(o)}),h},changeShapes:function(t,e){var n=this,r=n.get("flag"),i=n.get("line"),s=(a.mix({},r,i),n.get("flagGroup"));e=e||n.get("animate"),t=t||this._getPoints();var o=[];a.each(t,function(t,e){var r=n.__getShapeCfg(t,e);o.push(r),s.changeStackCfg(e,r)}),s.change(o,e)},getTipInfo:function(t){return t.obj.tooltip?t.obj.tooltip:t.value},draw:function(t,e){function n(){e&&e()}function i(e){a.each(t,function(t,n){t.x!=e.x||t.isDraw||(s._drawShape(t,n),t.isDraw=!0)})}var s=this,o=s.get("animate"),l=s.get("duration");if(s.set("flagGroup",s.addGroup(r,s.get("flags"))),o){var c=(s.get("onSeries"),s.get("parent"),s._getPoints()),u=0,h=[],f=c.length;a.animStep(l,function(e){var n=u;if(u=parseInt(e*f,10),u>f-1&&(u=f-1),u!=n){h=t.slice(0,u+1);for(var r=n;u>r;r++)i(c[r])}1==e&&i(c[u])},n)}else a.each(t,function(t,e){s._drawShape(t,e)}),n()},_drawShape:function(t,e){var n=this,r=n.get("flagGroup"),i=n.__getShapeCfg(t,e),a=r.addFlag(i);return a},__getShapeCfg:function(t,e){var n=this,r=n.get("data"),i=n.get("flagGroup"),s=n.get("flags");s.flag.point=t;var o=a.mix({},{},{point:t});return r&&r[e]&&r[e].flag&&a.mix(o,r[e].flag),t.index>0&&a.each(i.get("children"),function(e){var n=e.get("point");if(n.x==t.x&&n.index+1==t.index){var r=e.get(o.distance||e.get("distance")<=0?"topY":"bottomY");r&&(o.point.y=r)}}),o}}),t=e}(),pe=function(t){function e(t,e){return t>e?e:t}function n(t,e){if(!t)return!1;var n="";return n=null!=t.className.baseVal?t.className.baseVal:t.className,-1!==n.indexOf(e)}function r(t){r.superclass.constructor.call(this,t)}var a=i,s=v.Group,o=I.Item,l=Y,c=F,u=ce,h=ue;return r.ATTRS={elCls:"x-chart-series-group",zIndex:5,plotRange:null,colors:["#2f7ed8","#0d233a","#8bbc21","#910000","#1aadce","#492970","#f28f43","#77a1e5","#c42525","#a6c96a"],symbols:["circle","diamond","square","triangle","triangle-down"],seriesOptions:{},yTickCounts:[3,5],xTickCounts:[5,10],series:null,legend:null,xAxis:null,yAxis:null,tooltip:null,stackedData:null,data:null,itemName:"series"},a.extend(r,o),a.mixin(r,[s,l.UseLegend]),a.augment(r,{renderUI:function(){var t=this;r.superclass.renderUI.call(t),t._renderSeries(),t._renderAxis(),t._addSeriesAxis(),t._paintAxis(t.get("xAxis"),"xAxis"),t._paintAxis(t.get("yAxis"),"yAxis"),t._paintSeries(),t.renderLegend(),t._renderTooltip()},bindUI:function(){var t=this;r.superclass.bindUI.call(t),t.bindCanvasEvent(),t.bindChartEvent()},bindCanvasEvent:function(){function t(n){a.contains(i.get("node"),n.target)||i.get("node")==n.target||(e.onTriggerOut(n),a.removeEvent(document,"click",t))}var e=this,n=e.get("tipGroup"),r=n?n.get("triggerEvent"):"",i=e.get("canvas");"click"==r?i.on("click",function(n){e.onCanvasMove(n),setTimeout(function(){a.removeEvent(document,"click",t),a.addEvent(document,"click",t)})}):(i.on("mousemove",a.wrapBehavior(e,"onCanvasMove")),i.on("mouseout",a.wrapBehavior(e,"onMouseOut")))},bindChartEvent:function(){var t=this,e=t.get("canvas");e.on("click",function(n){var r=e.getPoint(n.clientX,n.clientY);if(t._isInAxis(r)){var i=t.getPointInfo(r,n);t.fireUp("plotclick",i)}}),e.on("mousemove",function(n){var r=e.getPoint(n.clientX,n.clientY),i=t.get("isOver");if(t._isInAxis(r)){var a=t.getPointInfo(r,n);t.fireUp("plotmove",a),i||(t.fireUp("plotover",a),t.set("isOver",!0))}else i&&(t.fireUp("plotout"),t.set("isOver",!1))}),e.on("mouseout",function(){})},getPointInfo:function(t,e){var n=e.target.shape;return a.mix({shape:n},t)},onCanvasMove:function(t){var e,n=this,r=n.get("canvas"),i=n.get("tipGroup");i&&(e=r.getPoint(t.clientX,t.clientY),n._isInAxis(e)?n._processTracking(e,i):n.onMouseOut())},onTriggerOut:function(t){var e=this,n=e.get("tipGroup"),r=e.get("canvas").get("node");if(e.clearActivedItem(),n&&n.get("visible")){if(n.get("shared"))return a.each(e.getVisibleSeries(),function(t){var e=t.get("markersGroup");e&&e.clearActivedItem(),t.clearActivedItem&&t.clearActivedItem()}),t&&t.relatedTarget&&(t.toElement=t.relatedTarget),void((!t||!a.contains(r,t.toElement)&&r!==t.toElement)&&e._hideTip());e._hideTip()}},onMouseOut:function(t){var e=this,r=e.get("canvas").get("node");(!t||!a.contains(r,t.toElement)&&r!==t.toElement)&&(t&&n(t.toElement,"ac-tooltip")||e.onTriggerOut(t))},getSeries:function(){return this.get("children")},_processTracking:function(t,e){var n,r=this,i=[];if(e.get("shared"))i=r.getSeries();else{var s=r.getActived();s&&i.push(s)}a.each(i,function(e){e&&e.get("stickyTracking")&&e.get("visible")&&e.onStickyTracking({point:t})}),i.length&&(n=r._getTipInfo(i,t),n.items.length&&r._showTooltip(n.title,n.point,n.items))},_getTipInfo:function(t,e){var n={items:[],point:{}},r=0,i=this.get("tipGroup")&&this.get("tipGroup").get("pointRenderer");return a.each(t,function(s){var o,l=s.getTrackingInfo(e),c={},u=s.get("invert"),h=u?"y":"x",f=u?"x":"y";if(l){if(s.get("visible")){var g=s.get("markersGroup");if(null!=l.value){var d=i;
s.get("pointRenderer")&&(d=s.get("pointRenderer")),r+=1;var p=s.getTipInfo(l);if(a.isObject(p)?n.items.push(p):a.isArray(p)&&a.isObject(p[0])?n.items=n.items.concat(p):(c.name=s.get("name"),c.value=d?d(l,s):p,c.color=l.color||s.get("color"),c.suffix=s.get("suffix"),n.items.push(c)),g&&g.get("single")){g.show();var v=g.getChildAt(0);v&&v.attr({x:l.x,y:l.y})}}else g&&g.get("single")&&g.hide()}o=s.get("xAxis")?s.get("xAxis").formatPoint(l.xValue):l.xValue,1==r&&(n.title=o,n.point.name=l.name,l[h]?(n.point[h]=l[h],n.point[f]=1==t.length?l[f]:e[f]):(n.point[h]=e[h],n.point[f]=e[f]))}}),n},_showTooltip:function(t,e,n){var r=this,i=r.get("tipGroup"),a=r.get("prePoint");a&&a.x==e.x&&a.y==e.y&&e.name==a.name||(i.setPosition(e.x,e.y),r.set("prePoint",e),i.get("visible")||i.show(),i.setTitle(t),i.setItems(n))},_hideTip:function(){var t=this,e=t.get("tipGroup");e&&e.get("visible")&&(e.hide(),t.set("prePoint",null))},_isInAxis:function(t){var e=this,n=e.get("plotRange");return n.isInRange(t)},_renderSeries:function(){var t=this,e=t.get("series");a.each(e,function(e,n){t.addSeries(e,n)})},getLengendItems:function(){var t=this,e=t.getSeries(),n=[];return a.each(e,function(t){var e=t.get("markers"),r=e&&e.marker.symbol,i=t.get("visible"),t={name:t.get("name"),color:t.get("color"),type:t.get("legendType"),symbol:r,item:t,checked:i};n.push(t)}),n},_renderTooltip:function(){var t,e=this,n=e.get("tooltip");n&&(n.plotRange=e.get("plotRange"),t=e.get("parent").addGroup(c,n),e.set("tipGroup",t))},_renderAxis:function(){var t=this,e=t.get("xAxis"),n=t.get("yAxis");if(e&&!e.isGroup&&(e=t._createAxis(e),t.set("xAxis",e)),a.isArray(n)&&!n[0].isGroup){var r=[];a.each(n,function(e){r.push(t._createAxis(e)),t.set("yAxis",r)})}else n&&!n.isGroup&&(e&&"circle"==e.get("type")&&(n.type="radius",n.circle=e),n=t._createAxis(n),t.set("yAxis",n))},_createAxis:function(t){var e,n,r=this,i=t.type;return!i&&t.categories&&(i="category"),"category"==i||"timeCategory"==i?t.categories||(t.autoTicks=!0):t.ticks||"circle"==i||(t.autoTicks=!0),t.plotRange=r.get("plotRange"),t.autoPaint=!1,i=i||"number",n=a.ucfirst(i),e=u[n],e?r.get("parent").addGroup(e,t):null},_caculateAxisInfo:function(t,e){if("category"==t.get("type"))return this._caculateCategories(t,e);var n,r,i,a,s,o,l,c=this,h=[],f=t.get("type"),g=(t.getLength(),c.get("xAxis"==e?"xTickCounts":"yTickCounts")||[]);if("number"==f||"radius"==f)i=t.getCfgAttr("min"),a=t.getCfgAttr("max"),o=u.Auto;else if("time"==f){var d=t.get("startDate"),p=t.get("endDate");d&&(i=d.getTime()),p&&(a=p.getTime()),o=u.Auto.Time}else"timeCategory"==f&&(o=u.Auto.TimeCategory);s=t.getCfgAttr("tickInterval"),r=c._getRelativeSeries(t,e);var v={min:i,max:a,minCount:g[0],maxCount:g[1],interval:s};return"yAxis"==e&&r.length&&(n=r[0].get("stackType")),h=n&&"none"!=n?c.getStackedData(t,e):c.getSeriesData(t,e),h.length?(v.data=h,l=o.caculate(v,n)):l={ticks:[]},l},_caculateCategories:function(t,e){var n=this,r=n.getSeriesData(t,e),i=[];if(r.length&&(i=i.concat(r[0])),r.length>1&&!n.get("data"))for(var s=1;s<r.length;s++){var o=r[s];a.each(o,function(t){-1==a.indexOf(i,t)&&i.push(t)})}return{categories:i}},getSeriesData:function(t,e,n){var r=this,i=[],s=r._getRelativeSeries(t,e);return t=t||r.get("yAxis"),e=e||"yAxis",a.each(s,function(r){if(("xAxis"==e||n&&r.isStacked&&r.isStacked()||!n&&(!r.isStacked||!r.isStacked()))&&r.get(e)==t){var a=r.getData(e);a.length&&i.push(a)}}),i},_parseData:function(t,e){var n=[];return a.each(e,function(e){n.push(t[e])}),n},getStackedData:function(t,n){var r,i,s=this;stackedData=s.get("stackedData"),rst=[],arr=[],stackedData?arr=stackedData:(r=s.getSeriesData(t,n,!0),i=r[0],e=Math.min.apply(null,i),a.each(i,function(t,n){for(var i=t,a=1;a<r.length;a++){var s=r[a][n];i+=s,(null==e||e>s)&&(e=s)}arr.push(i)}),arr.push(e),s.set("stackedData",arr));var o=s.getSeriesData(t,n,!1);return o.length?(rst.push(arr),rst=rst.concat(o)):rst=arr,rst},_paintAxis:function(t,e){var n,r=this;n=a.isArray(t)?t:[t],a.each(n,function(t){if(r._hasRelativeSeries(t,e)){if(t.get("autoTicks")){var n=r._caculateAxisInfo(t,e);t.changeInfo(n)}t.paint()}})},_getRelativeSeries:function(t,e){var n=this,r=n.getVisibleSeries(),i=[];return a.each(r,function(n){n.get(e)==t&&i.push(n)}),i},_hasRelativeSeries:function(t,e){var n=this,r=n.getVisibleSeries(),i=!1;return a.each(r,function(n){return n.get(e)==t?(i=!0,!1):void 0}),i},_resetAxis:function(t,e){if(!t.get("autoTicks"))return void(t.isRangeChange()&&t.change({ticks:t.get("ticks")}));e=e||"yAxis",this.set("stackedData",null);var n=this,r=n._caculateAxisInfo(t,e);t.change(r)},_resetSeries:function(){var t=this,e=t.getSeries();a.each(e,function(t){t.get("visible")&&t.repaint()})},repaint:function(){var t=this,e=t.get("legendGroup"),n=t.get("xAxis"),r=t.get("yAxis");n&&t._resetAxis(n,"xAxis"),r&&(a.isArray(r)?a.each(r,function(e){t._resetAxis(e,"yAxis")}):t._resetAxis(r,"yAxis")),t._resetSeries(),e&&e.resetPosition()},changeData:function(t){var e=this,n=e.getSeries(),r=e.get("fields");e.set("data",t),a.each(n,function(n,i){if(r){var s=e._getSeriesData(n.get("name"),i);n.changeData(s)}else n.changeData(a.isArray(t[0])?t[i]:t)}),e.repaint()},_getSeriesData:function(t,e){var n=this,r=n.get("data"),i=n.get("fields"),s=r[e];return t&&a.each(r,function(e){return e.name==t?(s=e,!1):void 0}),n._parseData(s,i)},_getDefaultType:function(){var t=this,e=t.get("seriesOptions"),n="line";return a.each(e,function(t,e){return n=e.replace("Cfg",""),!1}),n},getVisibleSeries:function(){var t=this,e=t.getSeries();return a.filter(e,function(t){return t.get("visible")})},addSeries:function(t,e){var n,r=this,i=t.type||r._getDefaultType(),a=r._getSeriesClass(i),s=r._getSeriesCfg(i,t,e);return s.autoPaint=s.autoPaint||!1,n=r.addGroup(a,s)},_paintSeries:function(){var t=this,e=t.getSeries();a.each(e,function(t){t.paint()})},_addSeriesAxis:function(){var t=this,e=t.getSeries();a.each(e,function(e){if(!(e instanceof h.Cartesian))return!0;e.get("xAxis")||e.set("xAxis",t.get("xAxis"));var n=t.get("yAxis");null==e.get("yAxis")&&(a.isArray(n)?e.set("yAxis",n[0]):e.set("yAxis",n)),a.isNumber(e.get("yAxis"))&&e.set("yAxis",n[e.get("yAxis")])})},showChild:function(t){var e=this,n=t.get("yAxis");t.get("visible")||(t.show(),n&&(e._resetAxis(n),e._resetSeries()))},hideChild:function(t){var e=this,n=t.get("yAxis");t.get("visible")&&(t.hide(),n&&(e._resetAxis(n),e._resetSeries()))},_getSeriesCfg:function(t,e,n){var r=this,i=r.get("seriesOptions"),s=r.get("colors"),o=r.get("data"),l=r.get("fields"),c=r.get("symbols");return e=a.mix(!0,{},i[t+"Cfg"],e),e.invert=r.get("invert"),!e.color&&s.length&&(e.color=s[n%s.length]),e.markers&&e.markers.marker&&!e.markers.marker.symbol&&(e.markers.marker.symbol=c[n%c.length]),o&&!e.data&&(e.data=l?r._getSeriesData(e.name,n):o),e},_getSeriesClass:function(t){var e=a.ucfirst(t),n=h[e]||h;return n},remove:function(){var t=this,e=t.get("canvas");e.off("mousemove",a.getWrapBehavior(t,"onCanvasMove")),e.off("mouseout",a.getWrapBehavior(t,"onMouseOut")),r.superclass.remove.call(t)}}),t=r}(),ve=function(t){var e=he;return t=e}(),me=function(t){var e=ue;return e.Bubble=fe,e.Scatter=ge,e.Flag=de,t=e}(),xe=function(t){var e=i,n=S,r=I.Back,a=pe,s=d,o=function(t){this._attrs=e.mix({},o.ATTRS,t),this.events={}};return o.ATTRS={canvas:void 0,colors:void 0,data:void 0,yTickCounts:void 0,xTickCounts:void 0,width:null,height:null,legend:void 0,plotCfg:void 0,plotRange:void 0,series:void 0,invert:!1,seriesOptions:void 0,subTitle:void 0,title:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0,forceFit:!1,fitRatio:0,fields:void 0,theme:s.SmoothBase},e.augment(o,{get:function(t){return this._attrs[t]},set:function(t,e){return this._attrs[t]=e,this},render:function(){var t=this;if(!t.get("id"))throw"You must assign id for the chart!";t.paint()},clear:function(){var t=this,e=t.get("canvas");e.destroy(),t.set("isPaint",!1)},paint:function(){var t=this;t.get("isPaint")||(t._renderCanvas(),t._renderPlot(),t._renderTitle(),t._renderSeries(),t.get("canvas").sort(),t.get("forceFit")&&t.bindFitEvent())},_getFitInfo:function(){var t=this,n=t.get("el"),r=t.get("fitRatio"),i=e.getWidth(n),a=t.get("height")||e.getHeight(n);return r&&(a=i*r),{width:i,height:a}},forceFit:function(){var t=this,e=t.get("plotBack"),n=t.get("canvas"),r=t._getFitInfo(),i=t.get("seriesGroup");n.setSize(r.width,r.height),e.repaint(),t._renderTitle(),i.repaint()},_renderCanvas:function(){var t=this,r=t.get("id")||t.get("render")||"";r=r.replace("#","");var i,a,s,o=document.getElementById(r);if(t.set("el",o),t.get("forceFit")){var l=t._getFitInfo();i=l.width,a=l.height}else i=t.get("width")||e.getWidth(o),a=t.get("height")||e.getHeight(o);s=new n({width:i,height:a,id:r}),s.chart=t,t.set("canvas",s)},_renderPlot:function(){var t,n,i=this,a=i.get("plotCfg"),s=i.get("canvas"),o=i.get("theme");a=e.mix({},o.plotCfg,a),t=s.addGroup(r,a),n=t.get("plotRange"),i.set("plotBack",t),i.set("plotRange",n)},_renderTitle:function(){var t=this,n=t.get("title"),r=t.get("subTitle"),i=t.get("theme"),a=t.get("canvas"),s={},o={};if(n){var l=t.get("titleShape");null==n.x&&(s.x=a.get("width")/2,s.y=n.y||15),l?l.attr(s):(s=e.mix(s,i.title,n),l=a.addShape("label",s),t.set("titleShape",l))}if(r){var c=t.get("subTitleShape");null==r.x&&(o.x=a.get("width")/2,o.y=r.y||35),c?c.attr(o):(o=e.mix(o,i.subTitle,r),c=a.addShape("label",o),t.set("subTitleShape",c))}},_getDefaultType:function(){var t=this,n=t.get("seriesOptions"),r="line";return e.each(n,function(t,e){return r=e.replace("Cfg",""),!1}),r},_renderSeries:function(){var t,n=this,r=n.get("theme"),i={},s=n._attrs,o=n._getDefaultType();e.each(s.series,function(t){t.type||(t.type=o)}),e.mix(!0,i,r,{colors:s.colors,xTickCounts:s.xTickCounts,yTickCounts:s.yTickCounts,data:s.data,invert:n.get("invert"),fields:s.fields,series:s.series,seriesOptions:s.seriesOptions,tooltip:s.tooltip,legend:s.legend,xAxis:s.xAxis}),e.mix(i,{plotRange:s.plotRange}),e.isObject(s.yAxis)?e.mix(!0,i,{yAxis:s.yAxis}):e.isArray(s.yAxis)&&(e.each(s.yAxis,function(t,n){s.yAxis[n]=e.mix(!0,{},r.yAxis,t)}),i.yAxis=s.yAxis),t=n.get("canvas").addGroup(a,i),n.set("seriesGroup",t)},bindFitEvent:function(){function t(){clearTimeout(r),r=setTimeout(function(){n.forceFit()},200)}var n=this,r=null;e.addEvent(window,"resize",t)},repaint:function(){var t=this;t.get("seriesGroup").repaint()},getSeries:function(){return this.get("seriesGroup").getSeries()},getSerieByName:function(t){return this.get("seriesGroup").findBy(function(e){return e.get("name")==t})},getXAxis:function(t){var e,n=this;return e=t?n.getSerieByName(t):n.getSeries()[0],e.get("xAxis")},getYAxis:function(t){var e,n=this;return e=t?n.getSerieByName(t):n.getSeries()[0],e.get("yAxis")},changeData:function(t){var e=this,n=e.get("seriesGroup");t!==e.get("data")&&e.set("data",t),n.changeData(t)},on:function(t,e){var n=this.events,r=n[t];return r||(r=n[t]=[]),r.push(e),this},fire:function(t,n){var r=this,i=r.events,a=i[t];a&&e.each(a,function(t){t(n)})},off:function(t,n){var r=this,i=(r.get("node"),this.events),a=i[t];return t?(a&&e.remove(a,n),this):(this.events={},this)}}),t=o}(),ye=function(t){var e=xe;return e.Util=i,e.Canvas=S,e.Plot=I,e.Actived=v,e.Date=r,e.Theme=d,e.Series=ue,e.Series.Arearange=ve,e.Legend=Y,e.Flags=K,e.Candlesticks=te,e.Axis=ce,e.Tooltip=F,window.Chart=e,window.AChart=e,t=e}()}();