text: /*
  * Kendo UI v2014.3.1223 (http://www.telerik.com/kendo-ui)
  * Copyright 2014 Telerik AD. All rights reserved.
  *
  * Kendo UI commercial licenses may be obtained at
  * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
  * If you do not own a commercial license, this file shall be governed by the trial license terms.
  */
  !function(e,define){define(["./kendo.data.min","./kendo.userevents.min","./kendo.dataviz.core.min","./kendo.drawing.min","./kendo.dataviz.themes.min"],e)}(function(){return function(e,t){function n(){this._defaults={}}function i(e,t,n,i){var r,o,a=(i.x-n.x)*(e.y-n.y)-(i.y-n.y)*(e.x-n.x),s=(i.y-n.y)*(t.x-e.x)-(i.x-n.x)*(t.y-e.y);return 0!==s&&(o=a/s,r=new Ln(e.x+o*(t.x-e.x),e.y+o*(t.y-e.y))),r}function r(e,t){var n,i,r,a=e.series,s=a.length,l=e.seriesDefaults,c=kn({},e.seriesDefaults),d=t?kn({},t.seriesDefaults):{},u=kn({},d);for(o(c),o(u),n=0;s>n;n++)i=a[n].type||e.seriesDefaults.type,r=kn({data:[]},u,d[i],{tooltip:e.tooltip},c,l[i]),a[n]._defaults=r,a[n]=kn({},r,a[n])}function o(e){delete e.bar,delete e.column,delete e.rangeColumn,delete e.line,delete e.verticalLine,delete e.pie,delete e.donut,delete e.area,delete e.verticalArea,delete e.scatter,delete e.scatterLine,delete e.bubble,delete e.candlestick,delete e.ohlc,delete e.boxPlot,delete e.bullet,delete e.verticalBullet,delete e.polarArea,delete e.polarLine,delete e.radarArea,delete e.radarLine,delete e.waterfall}function a(e){var t,n,i,r,o=e.series,a=e.seriesColors||[];for(t=0;o.length>t;t++)n=o[t],i=a[t%a.length],n.color=n.color||i,r=n._defaults,r&&(r.color=r.color||i)}function s(e){var t;dn([Ai,Io,Lo,Oo],function(){t=this+"Axes",e[t]&&(e[this+"Axis"]=e[t],delete e[t])})}function l(t,n){var i=(n||{}).axisDefaults||{};dn([Ai,Io,Lo,Oo],function(){var n=this+"Axis",r=[].concat(t[n]),o=t.axisDefaults||{};r=e.map(r,function(e){var t=(e||{}).color,r=kn({},i,i[n],o,o[n],{line:{color:t},labels:{color:t},title:{color:t}},e);return delete r[n],r}),t[n]=r.length>1?r:r[0]})}function c(e){var t,n=e.length,i=0;for(t=0;n>t;t++)i=pn.max(i,e[t].data.length);return i}function d(e){return e*e}function u(e,t){if(null===t)return t;var n=xn(e,!0);return n(t)}function h(e,t){if(null===t)return t;var n="_date_"+e,i=t[n];return i||(i=p(xn(e,!0)(t)),t[n]=i),i}function p(e){var t,n;if(e instanceof Date)t=e;else if(typeof e===fo)t=vn.parseDate(e)||new Date(e);else if(e)if(un(e))for(t=[],n=0;e.length>n;n++)t.push(p(e[n]));else t=new Date(e);return t}function f(e){return un(e)?hn(e,f):e?p(e).getTime():t}function g(e,t,n,i){var r,o=e;return e&&(e=p(e),r=e.getHours(),n===No?(o=new Date(e.getFullYear()+t,0,1),vn.date.adjustDST(o,0)):n===Er?(o=new Date(e.getFullYear(),e.getMonth()+t,1),vn.date.adjustDST(o,r)):n===zo?(o=g(m(e,i),7*t,Vi),vn.date.adjustDST(o,r)):n===Vi?(o=new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),vn.date.adjustDST(o,r)):n===ur?(o=new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours()+t),t>0&&S(e,o)&&(o=g(e,t+1,n,i))):n===Ar?(o=new Date(e.getTime()+t*vo),o.getSeconds()>0&&o.setSeconds(0)):n===no&&(o=new Date(e.getTime()+t*mo)),o.getMilliseconds()>0&&o.setMilliseconds(0)),o}function m(e,t){var n=e.getDay(),i=0;if(!isNaN(n))for(t=t||0;n!==t;)0===n?n=6:n--,i++;return w(e,-i*yo)}function v(e,t,n){return e=p(e),g(e,0,t,n)}function _(e,t,n){return e=p(e),e&&v(e,t,n).getTime()===e.getTime()?e:g(e,1,t,n)}function y(e,t){var n=e.getTime()-t,i=e.getTimezoneOffset()-t.getTimezoneOffset();return n-i*vo}function w(e,t){var n=e.getTimezoneOffset(),i=new Date(e.getTime()+t),r=i.getTimezoneOffset()-n;return new Date(i.getTime()+r*vo)}function b(e,t,n){var i;return i=n===No?t.getFullYear()-e.getFullYear():n===Er?12*b(e,t,No)+t.getMonth()-e.getMonth():pn.floor(n===Vi?y(t,e)/yo:(t-e)/xo[n])}function k(e){return 1===e.length?e[0]:e}function x(e){var t,n,i,r=e.length;if(r>0)for(n=0;r>n;n++)i=e[n].box,t?t.wrap(i):t=i.clone();return t||En()}function C(e,t){return e&&t?e.toLowerCase()===t.toLowerCase():e===t}function S(e,t){return e&&t?f(e)===f(t):e===t}function T(e,t){null!==t&&e.push(t)}function D(e,t){for(var n,i,r=0,o=t.length-1;o>=r;)if(n=pn.floor((r+o)/2),i=t[n],e>i)r=n+1;else{if(!(i>e)){for(;S(t[n-1],e);)n--;return n}o=n-1}return e>=t[n]?n:n-1}function A(e){return"number"==typeof e&&!isNaN(e)}function E(e){var t,n,i=e.length,r=0;for(t=0;i>t;t++)n=e[t],A(n)&&r++;return r}function M(e){return E(e)===e.length}function I(e){var t,n,i,r={};for(t=0;e.length>t;t++)n=e[t],i=n.options.name,i&&(r[i]=n.range());return r}function P(e,t,n,i){var r,o,a,s,l,c=!1;if(n=n||{},a=n.excluded=n.excluded||[],s=n.defaults=n.defaults||{},l=n.depth=n.depth||0,!(l>Cr)){for(r in e)!Qn(r,n.excluded)&&e.hasOwnProperty(r)&&(o=e[r],Cn(o)?(c=!0,i||(e[r]=li(o(t),s[r]))):typeof o===Vr&&(n.defaults=s[r],n.depth++,c=P(o,t,n,i)||c,n.depth--));return c}}function F(e,n){var i,r,o,a=[],s=e.groupNameTemplate,l=n.length;for(ti(s)?(vn.logToConsole("'groupNameTemplate' is obsolete and will be removed in future versions. Specify the group name template as 'series.name'"),s&&(i=Sn(s))):(i=Sn(e.name||""),0===i._slotCount&&(i=Sn(ti(e.name)?"#= group.value #: #= series.name #":"#= group.value #"))),r=0;l>r;r++)o=kn({},e),Cn(o.color)||(o.color=t),o._groupIx=r,a.push(o),i&&(o.name=i({series:o,group:n[r]}));return a}function B(e,t){var n,i,r=[];for(t=[].concat(t),n=0;e.length>n;n++)i=e[n],Qn(i.type,t)&&r.push(i);return r}function R(t,n){if(t instanceof Date){for(var i=0,r=n.length;r>i;i++)if(S(n[i],t))return i;return-1}return e.inArray(t,n)}function z(e,t){t=t||$n;for(var n=1,i=e.length;i>n;n++)if(t(e[n],e[n-1])<0){e.sort(t);break}return e}function H(e,t){var n,i=z(e,t),r=i.length,o=r>0?[i[0]]:[];for(t=t||$n,n=1;r>n;n++)0!==t(i[n],ni(o))&&o.push(i[n]);return o}function L(e,t){var n=e.type,i=t instanceof Date;return!n&&i||C(n,Ni)}function O(e){var t,n,i,r,o=[],a=e.length;for(t=0;a>t;t++)for(n=e[t],r=n.length,i=0;r>i;i++)o[i]=o[i]||[],o[i].push(n[i]);return o}function N(e,t){if(e.indexOf(".")>-1)for(var n,i=e.split("."),r="";i.length>1;)r+=i.shift(),n=vn.getter(r)(t)||{},vn.setter(r)(t,n),r+="."}function V(e){var t,n,i,r=e.data,o=0;for(t=0;r.length>t;t++)n=q.current.bindPoint(e,t),i=n.valueFields.value,typeof i===fo&&(i=parseFloat(i)),A(i)&&n.fields.visible!==!1&&(o+=pn.abs(i));return o}function U(e){var t=e.overlay;return t&&t.gradient&&"none"!=t.gradient}function W(){return this}var j,q,G,$,Y,Q,K,X,Z,J,et,tt,nt,it,rt,ot,at,st,lt,ct,dt,ut,ht,pt,ft,gt,mt,vt,_t,yt,wt,bt,kt,xt,Ct,St,Tt,Dt,At,Et,Mt,It,Pt,Ft,Bt,Rt,zt,Ht,Lt,Ot,Nt,Vt,Ut,Wt,jt,qt,Gt,$t,Yt,Qt,Kt,Xt,Zt,Jt,en,tn,nn,rn,on,an,sn,ln,cn,dn=e.each,un=e.isArray,hn=e.map,pn=Math,fn=e.noop,gn=e.extend,mn=e.proxy,vn=window.kendo,_n=vn.Class,yn=vn.Observable,wn=vn.data.DataSource,bn=vn.ui.Widget,kn=vn.deepExtend,xn=vn.getter,Cn=vn.isFunction,Sn=vn.template,Tn=vn.dataviz,Dn=Tn.Axis,An=Tn.AxisLabel,En=Tn.Box2D,Mn=Tn.BoxElement,In=Tn.ChartElement,Pn=vn.drawing.Color,Fn=Tn.CurveProcessor,Bn=Tn.FloatElement,Rn=Tn.Note,zn=Tn.LogarithmicAxis,Hn=Tn.NumericAxis,Ln=Tn.Point2D,On=Tn.RootElement,Nn=Tn.Ring,Vn=Tn.ShapeElement,Un=Tn.ShapeBuilder,Wn=Tn.TextBox,jn=Tn.Title,qn=Tn.alignPathToPixel,Gn=Tn.autoFormat,$n=Tn.dateComparer,Yn=Tn.getSpacing,Qn=Tn.inArray,Kn=Tn.interpolateValue,Xn=Tn.mwDelta,Zn=Tn.round,Jn=vn.util,ei=Jn.append,ti=Jn.defined,ni=Jn.last,ii=Jn.limitValue,ri=Jn.sparseArrayLimits,oi=Jn.sparseArrayMin,ai=Jn.sparseArrayMax,si=Jn.renderTemplate,li=Jn.valueOrDefault,ci=Tn.geometry,di=Tn.drawing,ui=".kendoChart",hi="above",pi="area",fi="auto",gi="fit",mi=Tn.AXIS_LABEL_CLICK,vi="bar",_i=6,yi=.8,wi="below",bi="#000",ki="both",xi="bottom",Ci="boxPlot",Si="bubble",Ti="bullet",Di="candlestick",Ai="category",Ei="center",Mi="change",Ii="circle",Pi="contextmenu"+ui,Fi="color",Bi="column",Ri=Tn.COORD_PRECISION,zi="cross",Hi="k-",Li="custom",Oi="dataBound",Ni="date",Vi="days",Ui=Tn.DEFAULT_FONT,Wi=Tn.DEFAULT_HEIGHT,ji=Tn.DEFAULT_PRECISION,qi=Tn.DEFAULT_WIDTH,Gi=4,$i="donut",Yi=50,Qi="drag",Ki="dragEnd",Xi="dragStart",Zi="errorLow",Ji="errorHigh",er="xErrorLow",tr="xErrorHigh",nr="yErrorLow",ir="yErrorHigh",rr="fadeIn",or="first",ar="from",sr="funnel",lr="glass",cr="horizontal",dr="horizontalWaterfall",ur="hours",hr=Tn.INITIAL_ANIMATION_DURATION,pr="insideBase",fr="insideEnd",gr="interpolate",mr="left",vr="legendItemClick",_r="legendItemHover",yr="line",wr=8,br="linear",kr="log",xr="max",Cr=5,Sr=Number.MAX_VALUE,Tr="min",Dr=-Number.MAX_VALUE,Ar="minutes",Er="months",Mr="mouseleave"+ui,Ir="mousemove.tracking",Pr="mouseover"+ui,Fr="mouseout"+ui,Br="mousemove"+ui,Rr=20,zr=150,Hr="DOMMouseScroll"+ui+" mousewheel"+ui,Lr=Tn.NOTE_CLICK,Or=Tn.NOTE_HOVER,Nr="noteText",Vr="object",Ur="ohlc",Wr="outsideEnd",jr="pie",qr=70,Gr="plotAreaClick",$r="pointer",Yr="rangeBar",Qr="rangeColumn",Kr="render",Xr="right",Zr="roundedBevel",Jr="roundedGlass",eo="scatter",to="scatterLine",no="seconds",io="selectStart",ro="select",oo="selectEnd",ao="seriesClick",so="seriesHover",lo=.001,co="step",uo="smooth",ho="stderr",po="stddev",fo="string",go="summary",mo=1e3,vo=60*mo,_o=60*vo,yo=24*_o,wo=7*yo,bo=31*yo,ko=365*yo,xo={years:ko,months:bo,weeks:wo,days:yo,hours:_o,minutes:vo,seconds:mo},Co="to",So="top",To=150,Do=5,Ao=100,Eo=100,Mo="chart-tooltip-inverse",Io="value",Po="verticalArea",Fo="verticalBullet",Bo="verticalLine",Ro="waterfall",zo="weeks",Ho="#fff",Lo="x",Oo="y",No="years",Vo="zero",Uo=3,Wo="zoomStart",jo="zoom",qo="zoomEnd",Go=[no,Ar,ur,Vi,zo,Er,No],$o=[vi,Bi,Ur,Di,Ci,Ti,Qr,Yr,Ro,dr],Yo={seconds:"HH:mm:ss",minutes:"HH:mm",hours:"HH:mm",days:"M/d",weeks:"M/d",months:"MMM 'yy",years:"yyyy"},Qo=bn.extend({init:function(e,n){var i,r,o=this;vn.destroy(e),bn.fn.init.call(o,e),o.element.addClass(Hi+this.options.name.toLowerCase()).css("position","relative"),n&&(r=n.dataSource,n.dataSource=t),i=kn({},o.options,n),o._originalOptions=kn({},i),o._initTheme(i),o._initSurface(),o.bind(o.events,o.options),o.wrapper=o.element,n&&(n.dataSource=r),o._initDataSource(n),vn.notify(o,Tn.ui)},_initTheme:function(n){var i,r=this,o=Tn.ui.themes||{},l=n.theme,c=o[l]||o[l.toLowerCase()],d=l&&c?c.chart:{},u=[],h=n.series||[];for(i=0;h.length>i;i++)u.push(e.extend({},h[i]));n.series=u,s(n),r._applyDefaults(n,d),null===n.seriesColors&&(n.seriesColors=t),r.options=kn({},d,n),a(r.options)},_initDataSource:function(e){var t=this,n=(e||{}).dataSource;t._dataChangeHandler=mn(t._onDataChanged,t),t.dataSource=wn.create(n).bind(Mi,t._dataChangeHandler),t._bindCategories(),n&&(t._hasDataSource=!0),t._redraw(),t._attachEvents(),n&&t.options.autoBind&&t.dataSource.fetch()},setDataSource:function(e){var t=this;t.dataSource.unbind(Mi,t._dataChangeHandler),t.dataSource=e=wn.create(e),t._hasDataSource=!0,t._hasData=!1,e.bind(Mi,t._dataChangeHandler),t.options.autoBind&&e.fetch()},events:[Oi,ao,so,mi,vr,_r,Gr,Xi,Qi,Ki,Wo,jo,qo,io,ro,oo,Lr,Or,Kr],items:function(){return e()},options:{name:"Chart",renderAs:"",theme:"default",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},autoBind:!0,seriesDefaults:{type:Bi,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}]},refresh:function(){var e=this;e._applyDefaults(e.options),a(e.options),e._bindSeries(),e._bindCategories(),e.trigger(Oi),e._redraw()},getSize:function(){return vn.dimensions(this.element)},_resize:function(){var e=this.options.transitions;this.options.transitions=!1,this._redraw(),this.options.transitions=e},redraw:function(e){var t,n,i=this;i._applyDefaults(i.options),a(i.options),e?(n=i._model._plotArea,t=n.findPane(e),n.redraw(t)):i._redraw()},_initSurface:function(){var e,t=this.surface,n=this._surfaceWrap();t&&t.options.type===this.options.renderAs?this.surface.clear():(t&&t.destroy(),this.surface=di.Surface.create(n,{type:this.options.renderAs})),e=this.options.chartArea,e.width&&n.css("width",e.width),e.height&&n.css("height",e.height)},_surfaceWrap:function(){return this.element},_redraw:function(){var e,t=this,n=t._getModel();t._destroyView(),t._model=n,t._plotArea=n._plotArea,n.renderVisual(),this.options.transitions!==!1&&n.traverse(function(e){e.animation&&e.animation.setup()}),t._initSurface(),t.surface.draw(n.visual),this.options.transitions!==!1&&n.traverse(function(e){e.animation&&e.animation.play()}),t._tooltip=t._createTooltip(),t._highlight=new en(e),t._setupSelection(),t._hasDataSource&&!t._hasData&&t.options.autoBind||t.trigger(Kr)},exportVisual:function(){var e=this._getModel();return e.renderVisual(),e.visual},_sharedTooltip:function(){var e=this,t=e.options;return e._plotArea instanceof $t&&t.tooltip.shared},_createTooltip:function(){var e,t=this,n=t.options,i=t.element;return e=t._sharedTooltip()?new rn(i,t._plotArea,n.tooltip):new nn(i,n.tooltip)},_applyDefaults:function(e,t){l(e,t),r(e,t)},_getModel:function(){var e,t=this,n=t.options,i=new On(t._modelOptions());return i.chart=t,jn.buildTitle(n.title,i),e=i._plotArea=t._createPlotArea(),n.legend.visible&&i.append(new Y(e.options.legend)),i.append(e),i.reflow(),i},_modelOptions:function(){var e=this,t=e.options,n=e.element,i=pn.floor(n.height()),r=pn.floor(n.width());return e._size=null,kn({width:r||qi,height:i||Wi,transitions:t.transitions},t.chartArea)},_createPlotArea:function(e){var t=this,n=t.options;return j.current.create(e?[]:n.series,n)},_setupSelection:function(){var e,t,n,i,r,o,a=this,s=a._plotArea,l=s.axes,c=a._selections=[];for(a._selectStartHandler||(a._selectStartHandler=mn(a._selectStart,a),a._selectHandler=mn(a._select,a),a._selectEndHandler=mn(a._selectEnd,a)),t=0;l.length>t;t++)n=l[t],o=n.options,n instanceof Q&&o.select&&!o.vertical&&(i=0,r=o.categories.length-1,n instanceof K&&(i=o.categories[i],r=o.categories[r]),o.justified||(n instanceof K?r=g(r,1,o.baseUnit,o.weekStartDay):r++),e=new ln(a,n,kn({min:i,max:r},o.select)),e.bind(io,a._selectStartHandler),e.bind(ro,a._selectHandler),e.bind(oo,a._selectEndHandler),c.push(e))},_selectStart:function(e){return this.trigger(io,e)},_select:function(e){return this.trigger(ro,e)},_selectEnd:function(e){return this.trigger(oo,e)},_attachEvents:function(){var e=this,t=e.element;t.on(Pi,mn(e._click,e)),t.on(Pr,mn(e._mouseover,e)),t.on(Fr,mn(e._mouseout,e)),t.on(Hr,mn(e._mousewheel,e)),t.on(Mr,mn(e._mouseleave,e)),e._mousemove=vn.throttle(mn(e._mousemove,e),Rr),e._shouldAttachMouseMove()&&t.on(Br,e._mousemove),vn.UserEvents&&(e._userEvents=new vn.UserEvents(t,{global:!0,filter:":not(.k-selector)",multiTouch:!1,tap:mn(e._tap,e),start:mn(e._start,e),move:mn(e._move,e),end:mn(e._end,e)}))},_mouseout:function(e){var t=this,n=t._getChartElement(e);n&&n.leave&&n.leave(t,e)},_start:function(e){var t=this,n=t._events;ti(n[Xi]||n[Qi]||n[Ki])&&t._startNavigation(e,Xi)},_move:function(e){var t,n,i,r,o,a,s=this,l=s._navState,c={};if(l){for(e.preventDefault(),t=l.axes,n=0;t.length>n;n++)i=t[n],r=i.options.name,r&&(o=i.options.vertical?e.y:e.x,a=o.startLocation-o.location,0!==a&&(c[i.options.name]=i.translateRange(a)));l.axisRanges=c,s.trigger(Qi,{axisRanges:c,originalEvent:e})}},_end:function(e){this._endNavigation(e,Ki)},_mousewheel:function(e){var t,n,i,r,o,a,s=this,l=e.originalEvent,c=Xn(e),d=s._navState,u={};if(d||(t=s._startNavigation(l,Wo),t||(d=s._navState)),d){for(n=d.totalDelta||c,d.totalDelta=n+c,i=s._navState.axes,r=0;i.length>r;r++)o=i[r],a=o.options.name,a&&(u[a]=o.scaleRange(-n));s.trigger(jo,{delta:c,axisRanges:u,originalEvent:e}),s._mwTimeout&&clearTimeout(s._mwTimeout),s._mwTimeout=setTimeout(function(){s._endNavigation(e,qo)},zr)}},_startNavigation:function(e,t){var n,i,r,o=this,a=o._eventCoordinates(e),s=o._model._plotArea,l=s.findPointPane(a),c=s.axes.slice(0),d=!1;if(l){for(n=0;c.length>n;n++)if(i=c[n],i.box.containsPoint(a)){d=!0;break}!d&&s.backgroundBox().containsPoint(a)&&(r=o.trigger(t,{axisRanges:I(c),originalEvent:e}),r?o._userEvents.cancel():(o._suppressHover=!0,o._unsetActivePoint(),o._navState={pane:l,axes:c}))}},_endNavigation:function(e,t){var n=this;n._navState&&(n.trigger(t,{axisRanges:n._navState.axisRanges,originalEvent:e}),n._suppressHover=!1,n._navState=null)},_getChartElement:function(e,n){var i,r=this.surface.eventTarget(e);if(r){for(;r&&!i;)i=r.chartElement,r=r.parent;return i?(i.aliasFor&&(i=i.aliasFor(e,this._eventCoordinates(e))),n&&(i=i.closest(n)),i):t}},_eventCoordinates:function(e){var t=this,n=ti((e.x||{}).client),i=n?e.x.client:e.clientX,r=n?e.y.client:e.clientY;return t._toModelCoordinates(i,r)},_toModelCoordinates:function(t,n){var i=this.element,r=i.offset(),o=parseInt(i.css("paddingLeft"),10),a=parseInt(i.css("paddingTop"),10),s=e(window);return new Ln(t-r.left-o+s.scrollLeft(),n-r.top-a+s.scrollTop())},_tap:function(e){var t=this,n=t._getChartElement(e);t._activePoint===n?t._click(e):(t._startHover(e)||t._unsetActivePoint(),t._click(e))},_click:function(e){for(var t=this,n=t._getChartElement(e);n;)n.click&&n.click(t,e),n=n.parent},_startHover:function(e){var n,i=this,r=i._getChartElement(e),o=i._tooltip,a=i._highlight,s=i.options.tooltip;if(!i._suppressHover&&a&&!a.isHighlighted(r)&&!i._sharedTooltip())return n=i._getChartElement(e,function(e){return e.hover}),n&&!n.hover(i,e)?(i._activePoint=n,s=kn({},s,n.options.tooltip),s.visible&&o.show(n),a.show(n),!0):t},_mouseover:function(t){var n=this;n._startHover(t)&&e(document).on(Ir,mn(n._mouseMoveTracking,n))},_mouseMoveTracking:function(t){var n,i,r=this,o=r.options,a=r._tooltip,s=r._highlight,l=r._eventCoordinates(t),c=r._activePoint;r._plotArea.box.containsPoint(l)?c&&c.tooltipTracking&&c.series&&c.parent.getNearestPoint&&(i=c.parent.getNearestPoint(l.x,l.y,c.seriesIx),i&&i!=c&&(i.hover(r,t),r._activePoint=i,n=kn({},o.tooltip,c.options.tooltip),n.visible&&a.show(i),s.show(i))):(e(document).off(Ir),r._unsetActivePoint())},_mousemove:function(e){var t=this._eventCoordinates(e);this._trackCrosshairs(t),this._sharedTooltip()&&this._trackSharedTooltip(t)},_trackCrosshairs:function(e){var t,n,i=this._plotArea.crosshairs;for(t=0;i.length>t;t++)n=i[t],n.box.containsPoint(e)?n.showAt(e):n.hide()},_trackSharedTooltip:function(e){var t,n,i=this,r=i.options,o=i._plotArea,a=o.categoryAxis,s=i._tooltip,l=r.tooltip,c=i._highlight;o.box.containsPoint(e)&&(t=a.pointCategoryIndex(e),t!==i._tooltipCategoryIx&&(n=o.pointsByCategoryIndex(t),n.length>0?(l.visible&&s.showAt(n,e),c.show(n)):s.hide(),i._tooltipCategoryIx=t))},_mouseleave:function(t){var n,i=this,r=i._plotArea,o=r.crosshairs,a=i._tooltip,s=i._highlight,l=t.relatedTarget;if(!l||!e(l).closest(a.element).length){for(i._mousemove.cancel(),n=0;o.length>n;n++)o[n].hide();s.hide(),setTimeout(mn(a.hide,a),Eo),i._tooltipCategoryIx=null}},_unsetActivePoint:function(){var e=this,t=e._tooltip,n=e._highlight;e._activePoint=null,t&&t.hide(),n&&n.hide()},_onDataChanged:function(){var e,t,n=this,i=n.options,r=n._sourceSeries||i.series,o=r.length,s=n.dataSource.view(),l=(n.dataSource.group()||[]).length>0,c=[];for(e=0;o>e;e++)t=r[e],n._isBindable(t)&&l?ei(c,F(t,s)):c.push(t||[]);n._sourceSeries=r,i.series=c,a(n.options),n._bindSeries(),n._bindCategories(),n._hasData=!0,n._deferRedraw()},_deferRedraw:function(){var e=this;vn.support.vml?(e._clearRedrawTimeout(),e._redrawTimeout=setTimeout(function(){e.surface&&(e.trigger(Oi),e._redraw())},0)):(e.trigger(Oi),e._redraw())},_clearRedrawTimeout:function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},_bindSeries:function(){var e,t,n,i,r=this,o=r.dataSource.view(),a=r.options.series,s=a.length;for(e=0;s>e;e++)t=a[e],r._isBindable(t)&&(n=t._groupIx,i=ti(n)?(o[n]||{}).items:o,t.autoBind!==!1&&(t.data=i))},_bindCategories:function(){var e,t,n=this,i=n.dataSource.view()||[],r=(n.dataSource.group()||[]).length>0,o=i,a=n.options,s=[].concat(a.categoryAxis);for(r&&i.length&&(o=i[0].items),e=0;s.length>e;e++)t=s[e],t.autoBind!==!1&&n._bindCategoryAxis(t,o,e)},_bindCategoryAxis:function(e,t,n){var i,r,o,a=(t||[]).length;if(e.field)for(e.categories=[],i=0;a>i;i++)o=t[i],r=u(e.field,o),0===i?(e.categories=[r],e.dataItems=[o]):(e.categories.push(r),e.dataItems.push(o));else this._bindCategoryAxisFromSeries(e,n)},_bindCategoryAxisFromSeries:function(e,t){var n,i,r,o,a,s,l,c,d,p,f,g=this,m=[],v=g.options.series,_=v.length,y={};for(i=0;_>i;i++)if(r=v[i],o=r.categoryAxis===e.name||!r.categoryAxis&&0===t,a=r.data,l=a.length,r.categoryField&&o&&l>0)for(f=L(e,u(r.categoryField,a[0])),p=f?h:u,s=0;l>s;s++)c=a[s],d=p(r.categoryField,c),(f||!y[d])&&(m.push([d,c]),f||(y[d]=!0));m.length>0&&(f&&(m=H(m,function(e,t){return $n(e[0],t[0])})),n=O(m),e.categories=n[0],e.dataItems=n[1])},_isBindable:function(e){var t,n,i=q.current.valueFields(e),r=!0;for(n=0;i.length>n;n++)if(t=i[n],t===Io?t="field":t+="Field",!ti(e[t])){r=!1;break}return r},_legendItemClick:function(e,t){var n,i,r,o=this,a=o._plotArea,s=(a.srcSeries||a.series)[e],l=(o._sourceSeries||[])[e]||s;Qn(s.type,[jr,$i,sr])?(r=l.data[t],i=ti(r.visible)?!r.visible:!1,r.visible=i):(i=!l.visible,l.visible=i,s.visible=i),o.options.transitions&&(o.options.transitions=!1,n=!0),o.redraw(),n&&(o.options.transitions=!0)},_legendItemHover:function(e,t){var n,i,r=this,o=r._plotArea,a=r._highlight,s=(o.srcSeries||o.series)[e];n=Qn(s.type,[jr,$i,sr])?t:e,i=o.pointsBySeriesIndex(n),a.show(i)},_shouldAttachMouseMove:function(){var e=this;return e._plotArea.crosshairs.length||e._tooltip&&e._sharedTooltip()},setOptions:function(n){var i=this,r=n.dataSource;n.dataSource=t,i._originalOptions=kn(i._originalOptions,n),i.options=kn({},i._originalOptions),i._sourceSeries=null,e(document).off(Br),bn.fn._setEvents.call(i,n),i._initTheme(i.options),r&&i.setDataSource(r),i._shouldAttachMouseMove()&&i.element.on(Br,i._mousemove),i._hasDataSource?i.refresh():i.redraw()},destroy:function(){var t=this,n=t.dataSource;t.element.off(ui),n.unbind(Mi,t._dataChangeHandler),e(document).off(Ir),t._userEvents&&t._userEvents.destroy(),t._destroyView(),t.surface.destroy(),t.surface=null,t._clearRedrawTimeout(),bn.fn.destroy.call(t)},_destroyView:function(){var e=this,t=e._model,n=e._selections;if(t&&(t.destroy(),e._model=null),n)for(;n.length>0;)n.shift().destroy();e._unsetActivePoint(),e._tooltip&&e._tooltip.destroy(),e._highlight&&e._highlight.destroy()}});Tn.ExportMixin.extend(Qo.fn),vn.PDFMixin&&vn.PDFMixin.extend(Qo.fn),j=_n.extend({init:function(){this._registry=[]},register:function(e,t){this._registry.push({type:e,seriesTypes:t})},create:function(e,t){var n,i,r,o=this._registry,a=o[0];for(n=0;o.length>n;n++)if(i=o[n],r=B(e,i.seriesTypes),r.length>0){a=i;break}return new a.type(r,t)}}),j.current=new j,q=_n.extend({init:function(){this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}},register:function(e,n,i){var r,o,a=this;for(n=n||[Io],r=0;e.length>r;r++)o=e[r],a._valueFields[o]=n,a._otherFields[o]=i,a._nullValue[o]=a._makeValue(n,null),a._undefinedValue[o]=a._makeValue(n,t)},canonicalFields:function(e){return this.valueFields(e).concat(this.otherFields(e))},valueFields:function(e){return this._valueFields[e.type]||[Io]},otherFields:function(e){return this._otherFields[e.type]||[Io]},bindPoint:function(e,t){var n,i,r,o,a,s=this,l=e.data,c=l[t],d={valueFields:{value:c}},u=s.valueFields(e),h=s._otherFields[e.type];return null===c?a=s._nullValue[e.type]:ti(c)?un(c)?(i=c.slice(u.length),a=s._bindFromArray(c,u),n=s._bindFromArray(i,h)):typeof c===Vr&&(r=s.sourceFields(e,u),o=s.sourceFields(e,h),a=s._bindFromObject(c,u,r),n=s._bindFromObject(c,h,o)):a=s._undefinedValue[e.type],ti(a)&&(1===u.length?d.valueFields.value=a[u[0]]:d.valueFields=a),d.fields=n||{},d},_makeValue:function(e,t){var n,i,r={},o=e.length;for(n=0;o>n;n++)i=e[n],r[i]=t;return r},_bindFromArray:function(e,t){var n,i,r={};if(t)for(i=pn.min(t.length,e.length),n=0;i>n;n++)r[t[n]]=e[n];return r},_bindFromObject:function(e,t,n){var i,r,o,a,s={};if(t)for(r=t.length,n=n||t,i=0;r>i;i++)o=t[i],a=n[i],s[o]=u(a,e);return s},sourceFields:function(e,t){var n,i,r,o,a;if(t)for(i=t.length,o=[],n=0;i>n;n++)r=t[n],a=r===Io?"field":r+"Field",o.push(e[a]||r);return o}}),q.current=new q,G=In.extend({init:function(e,t){var n=this;In.fn.init.call(n,t),this.textBox=new Wn(e,n.options),n.append(this.textBox)},options:{position:Wr,margin:Yn(3),padding:Yn(4),color:bi,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:rr,delay:hr},zIndex:2},createVisual:function(){this.textBox.options.noclip=this.options.noclip},reflow:function(e){var t=this,n=t.options,i=n.vertical,r=n.aboveAxis,o=t.children[0],a=o.box,s=o.options.padding;o.options.align=i?Ei:mr,o.options.vAlign=i?So:Ei,n.position==fr?i?(o.options.vAlign=So,!r&&a.height()<e.height()&&(o.options.vAlign=xi)):o.options.align=r?Xr:mr:n.position==Ei?(o.options.vAlign=Ei,o.options.align=Ei):n.position==pr?i?o.options.vAlign=r?xi:So:o.options.align=r?mr:Xr:n.position==Wr&&(i?e=r?new En(e.x1,e.y1-a.height(),e.x2,e.y1):new En(e.x1,e.y2,e.x2,e.y2+a.height()):(o.options.align=Ei,e=r?new En(e.x2+a.width(),e.y1,e.x2,e.y2):new En(e.x1-a.width(),e.y1,e.x1,e.y2))),n.rotation||(i?s.left=s.right=(e.width()-o.contentBox.width())/2:s.top=s.bottom=(e.height()-o.contentBox.height())/2),o.reflow(e)},alignToClipBox:function(e){var t,n=this,i=n.options.vertical,r=i?Oo:Lo,o=r+"1",a=r+"2",s=n.children[0],l=n.parent.box;(e[o]>l[o]||l[a]>e[a])&&(t=s.paddingBox.clone(),t[o]=pn.max(l[o],e[o]),t[a]=pn.min(l[a],e[a]),this.reflow(t))}}),$=Mn.extend({init:function(e){var t=this;Mn.fn.init.call(t,e),t.createContainer(),t.createMarker(),t.createLabel()},createContainer:function(){var e=this;e.container=new Bn({vertical:!1,wrap:!1,align:Ei}),e.append(e.container)},createMarker:function(){var e=this,t=e.options,n=t.markerColor,i=t.markers,r=kn({},i,{background:n,border:{color:n}});e.container.append(new Vn(r))},createLabel:function(){var e=this,t=e.options,n=kn({},t.labels);e.container.append(new Wn(t.text,n))},renderComplete:function(){var e,t;In.fn.renderComplete.call(this),e=this.options.cursor||{},t=this._itemOverlay=di.Path.fromRect(this.container.box.toRect(),{fill:{color:Ho,opacity:0},stroke:null,cursor:e.style}),this.appendVisual(t)},click:function(e,t){var n=this.eventArgs(t);e.trigger(vr,n)||(t.preventDefault(),e._legendItemClick(n.seriesIndex,n.pointIndex))},hover:function(e,t){var n=this.eventArgs(t);return e.trigger(_r,n)||(t.preventDefault(),e._legendItemHover(n.seriesIndex,n.pointIndex)),!0},leave:function(e){e._unsetActivePoint()},eventArgs:function(t){var n=this.options;return{element:e(t.target),text:n.text,series:n.series,seriesIndex:n.series.index,pointIndex:n.pointIndex}},createVisual:fn}),Y=In.extend({init:function(e){var t=this;In.fn.init.call(t,e),Qn(t.options.position,[So,Xr,xi,mr,Li])||(t.options.position=Xr),t.createContainer(),t.createItems()},options:{position:Xr,items:[],labels:{margin:{left:6}},offsetX:0,offsetY:0,margin:Yn(5),padding:Yn(5),border:{color:bi,width:0},item:{cursor:{style:$r}},spacing:6,background:"",zIndex:1,markers:{border:{width:1},width:7,height:7,type:"rect",align:mr,vAlign:Ei}},createContainer:function(){var e=this,t=e.options,n=t.position,i=n,r=Ei;n==Li?i=mr:Qn(n,[So,xi])&&(i=Ei,r=n),e.container=new Mn({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}),e.append(e.container)},createItems:function(){var e,t,n,i=this,r=i.options,o=r.items,a=o.length,s=i.isVertical();for(e=new Bn({vertical:s,spacing:r.spacing}),t=0;a>t;t++)n=o[t],e.append(new $(kn({},{markers:r.markers,labels:r.labels},r.item,n)));i.container.append(e)},isVertical:function(){var e=this,t=e.options,n=t.position,i=Qn(n,[mr,Xr])||n==Li&&t.orientation!=cr;return i},hasItems:function(){return this.container.children[0].children.length>0},reflow:function(e){var n=this,i=n.options,r=n.container,o=n.isVertical(),a=e.clone();return n.hasItems()?(o&&(a.y1=0),i.position===Li?(n.containerCustomReflow(a),n.box=e.clone()):(r.reflow(a),n.containerReflow(e)),t):(n.box=e.clone(),t)},containerReflow:function(e){var t=this,n=t.options,i=n.position==So||n.position==xi?Lo:Oo,r=t.container.box,o=r.clone();(n.offsetX||n.offsetY)&&(r.translate(n.offsetX,n.offsetY),t.container.reflow(r)),o[i+1]=e[i+1],o[i+2]=e[i+2],t.box=o},containerCustomReflow:function(e){var t=this,n=t.options,i=n.offsetX,r=n.offsetY,o=t.container,a=n.width,s=n.height,l=t.isVertical(),c=e.clone();l&&s?c.y2=c.y1+s:!l&&a&&(c.x2=c.x1+a),o.reflow(c),c=o.box,o.reflow(En(i,r,i+c.width(),r+c.height()))},renderVisual:function(){this.hasItems()&&In.fn.renderVisual.call(this)}}),Q=Dn.extend({init:function(e){var t=this;Dn.fn.init.call(t,e),e=t.options,e.categories=e.categories.slice(0),t._ticks={}},options:{type:Ai,categories:[],vertical:!1,majorGridLines:{visible:!1,width:1,color:bi},labels:{zIndex:1},justified:!1},range:function(){return{min:0,max:this.options.categories.length}},getTickPositions:function(e){var t,n=this,i=n.options,r=i.vertical,o=i.justified,a=n.lineBox(),s=r?a.height():a.width(),l=e-(o?1:0),c=s/l,d=r?Oo:Lo,u=a[d+1],h=[];for(t=0;e>t;t++)h.push(Zn(u,Ri)),u+=c;return o||h.push(a[d+2]),i.reverse?h.reverse():h},getMajorTickPositions:function(){return this.getTicks().majorTicks},getMinorTickPositions:function(){return this.getTicks().minorTicks},getTicks:function(){var e,t=this,n=t._ticks,i=t.options,r=i.categories.length,o=i.reverse,a=i.justified,s=t.lineBox();return e=s.getHash()+r+o+a,n._hash!==e&&(n._hash=e,n.majorTicks=t.getTickPositions(r),n.minorTicks=t.getTickPositions(2*r)),n},getSlot:function(e,t){var n,i,r,o=this,a=o.options,s=o.getTicks().majorTicks,l=a.reverse,c=a.justified,d=a.vertical?Oo:Lo,u=o.lineBox(),h=u[d+(l?2:1)],p=u[d+(l?1:2)],f=u.clone(),g=pn.max(1,s.length-(c?0:1)),m=!ti(t);return e=li(e,0),t=li(t,e),e=ii(e,0,g),t=ii(t-1,e,g),t=pn.max(e,t),n=0===e?h:s[e]||p,i=c?n:s[t],r=t-e,(r>0||e===t)&&(i=s[t+1]||p),m&&c&&(e===g?n=i:i=n),f[d+1]=l?i:n,f[d+2]=l?n:i,f},pointCategoryIndex:function(e){var t,n,i,r,o=this,a=o.options,s=a.reverse,l=a.vertical,c=l?Oo:Lo,d=o.lineBox(),u=d[c+1],h=d[c+2],p=e[c],f=o.getMajorTickPositions(),g=Sr;if(u>p||p>h)return null;for(i=0;f.length>i;i++)if(t=f[i],n=f[i+1],ti(n)||(n=s?u:h),s&&(t=n,n=f[i]),a.justified){if(p===n){r=pn.max(0,l?f.length-i-1:i+1);break}pn.abs(p-t)<g&&(g=p-t,r=i)}else if(p>=t&&n>=p){r=i;break}return r},getCategory:function(e){var t=this.pointCategoryIndex(e);return null===t?null:this.options.categories[t]},categoryIndex:function(e){return R(e,this.options.categories)},translateRange:function(e){var t=this,n=t.options,i=t.lineBox(),r=n.vertical?i.height():i.width(),o=n.categories.length,a=r/o,s=Zn(e/a,ji);return{min:s,max:o+s}},scaleRange:function(e){var t=this,n=t.options,i=n.categories.length,r=e*i;return{min:-r,max:i+r}},labelsCount:function(){return this.options.categories.length},createAxisLabel:function(e,t){var n=this,i=n.options,r=i.dataItems?i.dataItems[e]:null,o=li(i.categories[e],""),a=n.axisLabelText(o,r,t);return new An(o,a,e,r,t)},shouldRenderNote:function(e){var t=this.options.categories;return t.length&&t.length>e&&e>=0}}),K=Q.extend({init:function(e){var t,n,i=this;e=e||{},e=kn({roundToBaseUnit:!0},e,{categories:p(e.categories),min:p(e.min),max:p(e.max)}),e.categories&&e.categories.length>0?(t=(e.baseUnit||"").toLowerCase(),n=t!==gi&&!Qn(t,Go),n&&(e.baseUnit=i.defaultBaseUnit(e)),(t===gi||e.baseUnitStep===fi)&&i.autoBaseUnit(e),i.groupCategories(e)):e.baseUnit=e.baseUnit||Vi,Q.fn.init.call(i,e)},options:{type:Ni,labels:{dateFormats:Yo},autoBaseUnitSteps:{seconds:[1,2,5,15,30],minutes:[1,2,5,15,30],hours:[1,2,3],days:[1,2,3],weeks:[1,2],months:[1,2,3,6],years:[1,2,3,5,10,25,50]},maxDateGroups:10},shouldRenderNote:function(e){var t=this,n=t.range(),i=t.options.categories||[];return $n(e,n.min)>=0&&$n(e,n.max)<=0&&i.length},parseNoteValue:function(e){return p(e)},translateRange:function(e){var t,n,i=this,r=i.options,o=r.baseUnit,a=r.weekStartDay,s=i.lineBox(),l=r.vertical?s.height():s.width(),c=i.range(),d=l/(c.max-c.min),u=Zn(e/d,ji);return c.min&&c.max&&(t=w(r.min||c.min,u),n=w(r.max||c.max,u),c={min:g(t,0,o,a),max:g(n,0,o,a)}),c},scaleRange:function(e){var t,n=this,i=pn.abs(e),r=n.range(),o=r.min,a=r.max;if(r.min&&r.max){for(;i--;)r=y(o,a),t=pn.round(.1*r),0>e?(o=w(o,t),a=w(a,-t)):(o=w(o,-t),a=w(a,t));r={min:o,max:a}}return r},defaultBaseUnit:function(e){var t,n,i,r,o,a=e.categories,s=ti(a)?a.length:0,l=Sr;for(t=0;s>t;t++)n=a[t],n&&r&&(i=y(n,r),i>0&&(l=pn.min(l,i),o=l>=ko?No:l>=bo-3*yo?Er:l>=wo?zo:l>=yo?Vi:l>=_o?ur:l>=vo?Ar:no)),r=n;return o||Vi},_categoryRange:function(e){var t=e._range;
  return t||(t=e._range=ri(e)),t},range:function(e){var t,n,i,r,o,a,s,l,c;return e=e||this.options,t=e.categories,n=e.baseUnit===gi,i=n?Go[0]:e.baseUnit,r=e.baseUnitStep||1,o=f(e.min),a=f(e.max),s=this._categoryRange(t),l=f(s.min),c=f(s.max),e.roundToBaseUnit?{min:g(o||l,0,i,e.weekStartDay),max:g(a||c,r,i,e.weekStartDay)}:{min:p(o||l),max:p(a||this._srcMaxDate||c)}},autoBaseUnit:function(e){for(var t,n,i,r=this,o=r.range(kn({},e,{baseUnitStep:1})),a=e.baseUnit===gi,s=0,l=a?Go[s++]:e.baseUnit,c=o.max-o.min,d=c/xo[l],u=d,h=e.maxDateGroups||r.options.maxDateGroups,p=kn({},r.options.autoBaseUnitSteps,e.autoBaseUnitSteps);!n||d>h;)if(t=t||p[l].slice(0),i=t.shift())n=i,d=u/n;else{if(l===ni(Go)){n=pn.ceil(u/h);break}if(!a){d>h&&(n=pn.ceil(u/h));break}l=Go[s++]||ni(Go),u=c/xo[l],t=null}e.baseUnitStep=n,e.baseUnit=l},_timeScale:function(){var e,t,n,i=this,r=i.range(),o=i.options,a=i.lineBox(),s=o.vertical,l=s?a.height():a.width();return o.justified&&o._collapse!==!1?(t=this._categoryRange(o.categories),n=f(t.max),e=p(n)-r.min):e=r.max-r.min,l/e},getTickPositions:function(e){var t,n,i,r,o,a,s,l,c,d,u,h,p,f,g,m=this,v=m.options,_=v.categories,y=[];if(v.roundToBaseUnit||0===_.length)y=Q.fn.getTickPositions.call(m,e);else{for(t=v.vertical,n=v.reverse,i=m.lineBox(),r=_[0].getTime(),o=li(v._collapse,v.justified),a=_.length-(o?1:0),s=m._timeScale(),l=(t?-1:1)*(n?-1:1),c=1===l?1:2,d=1===l?2:1,u=i[(t?Oo:Lo)+c],h=i[(t?Oo:Lo)+d],p=u,f=0;a>f;f++)g=_[f]-r,p=u+g*s*l,y.push(Zn(p,Ri));ni(y)!==h&&y.push(h)}return y},groupCategories:function(e){var t,n,i=this,r=e.categories,o=p(ai(r)),a=e.baseUnit,s=e.baseUnitStep||1,l=i.range(e),c=l.max,d=[];for(t=l.min;c>t&&(d.push(t),n=g(t,s,a,e.weekStartDay),!(n>o)||e.max);t=n);e.roundToBaseUnit||S(ni(d),c)||(n>c&&e._collapse!==!1?this._srcMaxDate=c:d.push(c)),e.srcCategories=r,e.categories=d},createAxisLabel:function(e,n){var i,r,o=this.options,a=o.dataItems?o.dataItems[e]:null,s=o.categories[e],l=o.baseUnit,c=!0,d=n.dateFormats[l];return o.justified?(i=v(s,l,o.weekStartDay),c=S(i,s)):o.roundToBaseUnit||(c=!S(this.range().max,s)),c&&(n.format=n.format||d,r=this.axisLabelText(s,a,n))?new An(s,r,e,a,n):t},categoryIndex:function(e,t){var n,i,r=this,o=r.options,a=o.categories;return e=p(e),t=t||r.range(),n=o.roundToBaseUnit&&S(t.max,e),e&&(e>t.max||n)?a.length:!e||t.min>e?-1:i=D(e,a)},getSlot:function(e,t){var n=this;return typeof e===Vr&&(e=n.categoryIndex(e)),typeof t===Vr&&(t=n.categoryIndex(t)),Q.fn.getSlot.call(n,e,t)}}),X=Dn.extend({init:function(e,t,n){var i=this;n=n||{},kn(n,{min:p(n.min),max:p(n.max),axisCrossingValue:p(n.axisCrossingValues||n.axisCrossingValue)}),n=i.applyDefaults(p(e),p(t),n),Dn.fn.init.call(i,n)},options:{type:Ni,majorGridLines:{visible:!0,width:1,color:bi},labels:{dateFormats:Yo}},applyDefaults:function(e,n,i){var r=this,o=i.min||e,a=i.max||n,s=i.baseUnit||r.timeUnits(a-o),l=xo[s],c=v(f(o)-1,s)||p(a),d=_(f(a)+1,s),u=i.majorUnit?i.majorUnit:t,h=u||Tn.ceil(Tn.autoMajorUnit(c.getTime(),d.getTime()),l)/l,m=b(c,d,s),y=Tn.ceil(m,h),w=y-m,k=pn.floor(w/2),x=w-k;return i.baseUnit||delete i.baseUnit,kn({baseUnit:s,min:g(c,-k,s),max:g(d,x,s),minorUnit:h/5},i,{majorUnit:h})},range:function(){var e=this.options;return{min:e.min,max:e.max}},getDivisions:function(e){var t=this.options;return pn.floor(b(t.min,t.max,t.baseUnit)/e+1)},getTickPositions:function(e){var t,n=this,i=n.options,r=i.vertical,o=i.reverse,a=n.lineBox(),s=r?a.height():a.width(),l=b(i.min,i.max,i.baseUnit),c=s/l,d=e*c,u=n.getDivisions(e),h=(r?-1:1)*(o?-1:1),p=1===h?1:2,f=a[(r?Oo:Lo)+p],g=[];for(t=0;u>t;t++)g.push(Zn(f,Ri)),f+=d*h;return g},getMajorTickPositions:function(){var e=this;return e.getTickPositions(e.options.majorUnit)},getMinorTickPositions:function(){var e=this;return e.getTickPositions(e.options.minorUnit)},getSlot:function(e,t,n){return Hn.fn.getSlot.call(this,p(e),p(t),n)},getValue:function(e){var t=Hn.fn.getValue.call(this,e);return null!==t?p(t):null},labelsCount:function(){return this.getDivisions(this.options.majorUnit)},createAxisLabel:function(e,t){var n,i=this.options,r=e*i.majorUnit,o=g(i.min,r,i.baseUnit),a=t.dateFormats[i.baseUnit];return t.format=t.format||a,n=this.axisLabelText(o,null,t),new An(o,n,e,null,t)},timeUnits:function(e){var t=ur;return e>=ko?t=No:e>=bo?t=Er:e>=wo?t=zo:e>=yo&&(t=Vi),t},translateRange:function(e){var t=this,n=t.options,i=n.baseUnit,r=n.weekStartDay,o=t.lineBox(),a=n.vertical?o.height():o.width(),s=t.range(),l=a/(s.max-s.min),c=Zn(e/l,ji),d=w(n.min,c),u=w(n.max,c);return{min:g(d,0,i,r),max:g(u,0,i,r)}},scaleRange:function(e){for(var t,n,i=this,r=i.options,o=pn.abs(e),a=r.min,s=r.max;o--;)t=y(a,s),n=pn.round(.1*t),0>e?(a=w(a,n),s=w(s,-n)):(a=w(a,-n),s=w(s,n));return{min:a,max:s}},shouldRenderNote:function(e){var t=this.range();return $n(e,t.min)>=0&&$n(e,t.max)<=0}}),Z=In.extend({options:{vertical:!1,gap:0,spacing:0},reflow:function(e){var t,n,i=this,r=i.options,o=r.vertical,a=o?Oo:Lo,s=i.children,l=r.gap,c=r.spacing,d=s.length,u=d+l+c*(d-1),h=(o?e.height():e.width())/u,p=e[a+1]+h*(l/2);for(n=0;d>n;n++)t=(s[n].box||e).clone(),t[a+1]=p,t[a+2]=p+h,s[n].reflow(t),d-1>n&&(p+=h*c),p+=h},createVisual:fn}),J=In.extend({options:{vertical:!0},reflow:function(e){var t,n,i,r=this.options,o=r.vertical,a=o?Lo:Oo,s=o?Oo:Lo,l=e[s+2],c=this.children,d=this.box=new En,u=c.length;for(t=0;u>t;t++)n=c[t],n.visible!==!1&&(i=n.box.clone(),i.snapTo(e,a),n.options&&(n.options.stackBase=l),0===t&&(d=this.box=i.clone()),n.reflow(i),d.wrap(i))},createVisual:fn}),et={click:function(t,n){var i=this;t.trigger(ao,{value:i.value,percentage:i.percentage,category:i.category,series:i.series,dataItem:i.dataItem,runningTotal:i.runningTotal,total:i.total,element:e(n.target),originalEvent:n})},hover:function(t,n){var i=this;return t.trigger(so,{value:i.value,percentage:i.percentage,category:i.category,series:i.series,dataItem:i.dataItem,runningTotal:i.runningTotal,total:i.total,element:e(n.target),originalEvent:n})}},tt={createNote:function(){var e=this,t=e.options.notes,n=e.noteText||t.label.text;t.visible!==!1&&ti(n)&&null!==n&&(e.note=new Rn(e.value,n,e.dataItem,e.category,e.series,e.options.notes),e.append(e.note))}},nt=In.extend({init:function(e,t){var n=this;In.fn.init.call(n),n.options=t,n.color=t.color||Ho,n.aboveAxis=li(n.options.aboveAxis,!0),n.value=e},defaults:{border:{width:1},vertical:!0,overlay:{gradient:lr},labels:{visible:!1,format:"{0}"},animation:{type:vi},opacity:1,notes:{label:{}}},render:function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},createLabel:function(){var e,t,n=this.options,i=n.labels;i.visible&&(i.template?(t=Sn(i.template),e=t({dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total,series:this.series})):e=this.formatValue(i.format),this.label=new G(e,kn({vertical:n.vertical},n.labels)),this.append(this.label))},formatValue:function(e){return this.owner.formatPointValue(this,e)},reflow:function(e){var t,n,i,r;if(this.render(),t=this,n=t.options,i=t.label,t.box=e,i&&(i.options.aboveAxis=t.aboveAxis,i.reflow(e)),t.note&&t.note.reflow(e),t.errorBars)for(r=0;t.errorBars.length>r;r++)t.errorBars[r].reflow(e)},createVisual:function(){var e=this.box;this.visible!==!1&&(In.fn.createVisual.call(this),e.width()>0&&e.height()>0&&this.createRect())},createRect:function(){var e=this.options,n=e.border,i=ti(n.opacity)?n.opacity:e.opacity,r=di.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:n.width,opacity:i,dashType:n.dashType}}),o=e.vertical?this.box.width():this.box.height();o>_i&&qn(r),this.visual.append(r),U(e)&&this.visual.append(this.createGradientOverlay(r,{baseColor:this.color},kn({end:e.vertical?t:[0,1]},e.overlay)))},createAnimation:function(){var e=this.options;kn(e,{animation:{aboveAxis:this.aboveAxis,vertical:e.vertical,stackBase:e.stackBase}}),In.fn.createAnimation.call(this)},createHighlight:function(e){var t=di.Path.fromRect(this.box.toRect(),e);return qn(t)},getBorderColor:function(){var e=this,t=e.options,n=e.color,i=t.border,r=i.color,o=i._brightness||yi;return ti(r)||(r=new Pn(n).brightness(o).toHex()),r},tooltipAnchor:function(e,t){var n,i,r,o,a=this,s=a.options,l=a.box,c=s.vertical,d=a.aboveAxis,u=a.owner.pane.clipBox()||l;return c?(n=l.x2+Do,i=d?pn.max(l.y1,u.y1):pn.min(l.y2,u.y2)-t):(r=pn.max(l.x1,u.x1),o=pn.min(l.x2,u.x2),s.isStacked?(n=d?o-e:r,i=l.y1-t-Do):(n=d?o+Do:r-e-Do,i=l.y1)),new Ln(n,i)}}),kn(nt.fn,et),kn(nt.fn,tt),it=di.Animation.extend({options:{duration:hr},setup:function(){var e,t,n,i,r,o=this.element,a=this.options,s=o.bbox();s?(e=this.origin=a.aboveAxis?s.bottomLeft():s.topRight(),t=a.vertical?Oo:Lo,n=a.stackBase,i=this.fromOffset=new ci.Point,i[t]=li(n,e[t])-e[t],r=this.fromScale=new ci.Point(1,1),r[t]=lo,o.transform(ci.transform().scale(r.x,r.y))):this.abort()},step:function(e){var t=Kn(this.fromScale.x,1,e),n=Kn(this.fromScale.y,1,e),i=Kn(this.fromOffset.x,0,e),r=Kn(this.fromOffset.y,0,e);this.element.transform(ci.transform().translate(i,r).scale(t,n,this.origin))},abort:function(){di.Animation.fn.abort.call(this),this.element.transform(null)}}),di.AnimationFactory.current.register(vi,it),rt=di.Animation.extend({options:{duration:200,easing:br},setup:function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},step:function(e){this.element.opacity(e*this.fadeTo)}}),di.AnimationFactory.current.register(rr,rt),ot=function(e,t,n){var i=this;i.initGlobalRanges(e,t,n)},ot.prototype=ot.fn={percentRegex:/percent(?:\w*)\((\d+)\)/,standardDeviationRegex:RegExp("^"+po+"(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),initGlobalRanges:function(e,t,n){var i,r,o,a,s,l=this,c=t.data,d=l.standardDeviationRegex.exec(e);d?(l.valueGetter=l.createValueGetter(t,n),i=l.getAverage(c),r=l.getStandardDeviation(c,i,!1),o=d[1]?parseFloat(d[1]):1,a={low:i.value-r*o,high:i.value+r*o},l.globalRange=function(){return a}):e.indexOf&&e.indexOf(ho)>=0&&(l.valueGetter=l.createValueGetter(t,n),s=l.getStandardError(c,l.getAverage(c)),l.globalRange=function(e){return{low:e-s,high:e+s}})},createValueGetter:function(e,t){var n,i,r,o=e.data,a=q.current,s=a.valueFields(e),l=ti(o[0])?o[0]:{};return un(l)?(n=t?R(t,s):0,r=xn("["+n+"]")):A(l)?r=xn():typeof l===Vr&&(i=a.sourceFields(e,s),r=xn(i[R(t,s)])),r},getErrorRange:function(e,t){var n,i,r,o,a=this;if(ti(t)){if(a.globalRange)return a.globalRange(e);if(un(t))n=e-t[0],i=e+t[1];else if(A(r=parseFloat(t)))n=e-r,i=e+r;else{if(!(r=a.percentRegex.exec(t)))throw Error("Invalid ErrorBar value: "+t);o=e*(parseFloat(r[1])/100),n=e-pn.abs(o),i=e+pn.abs(o)}return{low:n,high:i}}},getStandardError:function(e,t){return this.getStandardDeviation(e,t,!0)/pn.sqrt(t.count)},getStandardDeviation:function(e,t,n){var i,r,o=0,a=e.length,s=n?t.count-1:t.count;for(r=0;a>r;r++)i=this.valueGetter(e[r]),A(i)&&(o+=pn.pow(i-t.value,2));return pn.sqrt(o/s)},getAverage:function(e){var t,n,i=0,r=0,o=e.length;for(n=0;o>n;n++)t=this.valueGetter(e[n]),A(t)&&(i+=t,r++);return{value:i/r,count:r}}},at=In.extend({init:function(e,t){var n=this;In.fn.init.call(n,t),n.plotArea=e,n.categoryAxis=e.seriesCategoryAxis(t.series[0]),n.valueAxisRanges={},n.points=[],n.categoryPoints=[],n.seriesPoints=[],n.seriesOptions=[],n._evalSeries=[],n.render()},options:{series:[],invertAxes:!1,isStacked:!1,clip:!0},render:function(){var e=this;e.traverseDataPoints(mn(e.addValue,e))},pointOptions:function(e,t){var n,i=this.seriesOptions[t];return i||(n=this.pointType().fn.defaults,this.seriesOptions[t]=i=kn({},n,{vertical:!this.options.invertAxes},e)),i},plotValue:function(e){var t,n,i,r,o,a,s;if(!e)return 0;if(this.options.isStacked100&&A(e.value)){for(t=e.categoryIx,n=this.categoryPoints[t],i=0,r=0;n.length>r;r++)if(o=n[r]){if(a=e.series.stack,s=o.series.stack,a&&s&&a.group!==s.group)continue;A(o.value)&&(i+=pn.abs(o.value))}if(i>0)return e.value/i}return e.value},plotRange:function(e,t){var n,i,r,o,a,s,l,c,d,u,h,p,f=e.categoryIx,g=this.categoryPoints[f];if(this.options.isStacked){for(t=t||0,n=this.plotValue(e),i=n>0,r=t,o=!1,a=0;g.length>a&&(s=g[a],e!==s);a++){if(l=e.series.stack,c=s.series.stack,l&&c){if(typeof l===fo&&l!==c)continue;if(l.group&&l.group!==c.group)continue}d=this.plotValue(s),(d>0&&i||0>d&&!i)&&(r+=d,n+=d,o=!0)}return o&&(r-=t),[r,n]}return u=e.series,h=this.seriesValueAxis(u),p=this.categoryAxisCrossingValue(h),[p,e.value||p]},stackLimits:function(e,t){var n,i,r,o,a,s=Sr,l=Dr;for(n=0;this.categoryPoints.length>n;n++)for(i=this.categoryPoints[n],r=0;i.length>r;r++)o=i[r],o&&(o.series.stack===t||o.series.axis===e)&&(a=this.plotRange(o,0)[1],ti(a)&&(l=pn.max(l,a),s=pn.min(s,a)));return{min:s,max:l}},updateStackRange:function(){var e,t,n,i,r,o,a=this,s=a.options.series,l=a.options.isStacked,c={};if(l)for(t=0;s.length>t;t++)n=s[t],i=n.axis,r=i+n.stack,e=c[r],e||(e=a.stackLimits(i,n.stack),o=a.errorTotals,o&&(o.negative.length&&(e.min=pn.min(e.min,oi(o.negative))),o.positive.length&&(e.max=pn.max(e.max,ai(o.positive)))),c[r]=e),a.valueAxisRanges[i]=e},addErrorBar:function(e,t,n){var i,r=this,o=e.value,a=e.series,s=e.seriesIx,l=e.options.errorBars,c=t.fields[Zi],d=t.fields[Ji];A(c)&&A(d)?i={low:c,high:d}:l&&ti(l.value)&&(r.seriesErrorRanges=r.seriesErrorRanges||[],r.seriesErrorRanges[s]=r.seriesErrorRanges[s]||new ot(l.value,a,Io),i=r.seriesErrorRanges[s].getErrorRange(o,l.value)),i&&(e.low=i.low,e.high=i.high,r.addPointErrorBar(e,n))},addPointErrorBar:function(e,t){var n,i,r,o=this,a=e.series,s=e.low,l=e.high,c=!o.options.invertAxes,d=e.options.errorBars;o.options.isStacked?(i=o.stackedErrorRange(e,t),s=i.low,l=i.high):(r={categoryIx:t,series:a},o.updateRange({value:s},r),o.updateRange({value:l},r)),n=new ft(s,l,c,o,a,d),e.errorBars=[n],e.append(n)},stackedErrorRange:function(e,t){var n=this,i=n.plotRange(e,0)[1]-e.value,r=e.low+i,o=e.high+i;return n.errorTotals=n.errorTotals||{positive:[],negative:[]},0>r&&(n.errorTotals.negative[t]=pn.min(n.errorTotals.negative[t]||0,r)),o>0&&(n.errorTotals.positive[t]=pn.max(n.errorTotals.positive[t]||0,o)),{low:r,high:o}},addValue:function(t,n){var i,r,o=this,a=n.categoryIx,s=n.series,l=n.seriesIx,c=o.categoryPoints[a];c||(o.categoryPoints[a]=c=[]),i=o.seriesPoints[l],i||(o.seriesPoints[l]=i=[]),r=o.createPoint(t,n),r&&(e.extend(r,n),r.owner=o,r.dataItem=s.data[a],r.noteText=t.fields.noteText,o.addErrorBar(r,t,a)),o.points.push(r),i.push(r),c.push(r),o.updateRange(t.valueFields,n)},evalPointOptions:function(e,t,n,i,r,o){var a={defaults:r._defaults,excluded:["data","aggregate","_events","tooltip","template"]},s=this._evalSeries[o];return ti(s)||(this._evalSeries[o]=s=P(e,{},a,!0)),s&&(e=kn({},e),P(e,{value:t,category:n,index:i,series:r,dataItem:r.data[i]},a)),e},updateRange:function(e,t){var n=this,i=t.series.axis,r=e.value,o=n.valueAxisRanges[i];isFinite(r)&&null!==r&&(o=n.valueAxisRanges[i]=o||{min:Sr,max:Dr},o.min=pn.min(o.min,r),o.max=pn.max(o.max,r))},seriesValueAxis:function(e){var t=this.plotArea,n=e.axis,i=n?t.namedValueAxes[n]:t.valueAxis;if(!i)throw Error("Unable to locate value axis with name "+n);return i},reflow:function(e){var t,n,i,r=this,o=0,a=r.categorySlots=[],s=r.points,l=r.categoryAxis;r.traverseDataPoints(function(e,c){var d,u,h,p,f=c.categoryIx,g=c.series;t=r.pointValue(e),n=r.seriesValueAxis(g),i=s[o++],d=a[f],d||(a[f]=d=r.categorySlot(l,f,n)),i&&(u=r.plotRange(i,n.startValue()),h=n.getSlot(u[0],u[1],!r.options.clip),h?(p=r.pointSlot(d,h),i.aboveAxis=r.aboveAxis(i,n),r.options.isStacked100&&(i.percentage=r.plotValue(i)),r.reflowPoint(i,p)):i.visible=!1)}),r.reflowCategories(a),r.box=e},aboveAxis:function(e,t){var n=this.categoryAxisCrossingValue(t),i=e.value;return t.options.reverse?n>i:i>=n},categoryAxisCrossingValue:function(e){var t=this.categoryAxis,n=e.options,i=[].concat(n.axisCrossingValues||n.axisCrossingValue);return i[t.axisIndex||0]||0},reflowPoint:function(e,t){e.reflow(t)},reflowCategories:function(){},pointSlot:function(e,t){var n=this,i=n.options,r=i.invertAxes,o=r?t:e,a=r?e:t;return new En(o.x1,a.y1,o.x2,a.y2)},categorySlot:function(e,t){return e.getSlot(t)},traverseDataPoints:function(e){var t,n,i,r,o,a=this,s=a.options,l=s.series,d=a.categoryAxis.options.categories||[],u=c(l),h=l.length;for(t=0;u>t;t++)for(n=0;h>n;n++)o=l[n],r=d[t],i=this._bindPoint(o,n,t),e(i,{category:r,categoryIx:t,series:o,seriesIx:n})},_bindPoint:function(e,t,n){var i,r;return this._bindCache||(this._bindCache=[]),i=this._bindCache[t],i||(i=this._bindCache[t]=[]),r=i[n],r||(r=i[n]=q.current.bindPoint(e,n)),r},formatPointValue:function(e,t){return null===e.value?"":Gn(t,e.value)},pointValue:function(e){return e.valueFields.value},createVisual:fn}),st=at.extend({render:function(){var e=this;at.fn.render.apply(e),e.updateStackRange()},pointType:function(){return nt},clusterType:function(){return Z},stackType:function(){return J},stackLimits:function(e,t){var n=at.fn.stackLimits.call(this,e,t);return n.min=pn.min(0,n.min),n.max=pn.max(0,n.max),n},createPoint:function(e,t){var n,i,r,o,a=this,s=t.categoryIx,l=t.category,c=t.series,d=t.seriesIx,u=a.pointValue(e),h=a.options,p=a.children,f=a.options.isStacked,g=a.pointType(),m=a.clusterType(),v=this.pointOptions(c,d),_=v.labels;return f&&_.position==Wr&&(_.position=fr),v.isStacked=f,r=e.fields.color||c.color,0>u&&v.negativeColor&&(r=v.negativeColor),v=a.evalPointOptions(v,u,l,s,c,d),vn.isFunction(c.color)&&(r=v.color),n=new g(u,v),n.color=r,i=p[s],i||(i=new m({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing}),a.append(i)),f?(o=a.getStackWrap(c,i),o.append(n)):i.append(n),n},getStackWrap:function(e,t){var n,i,r,o=e.stack,a=o?o.group||o:o,s=t.children;if(typeof a===fo){for(i=0;s.length>i;i++)if(s[i]._stackGroup===a){n=s[i];break}}else n=s[0];return n||(r=this.stackType(),n=new r({vertical:!this.options.invertAxes}),n._stackGroup=a,t.append(n)),n},categorySlot:function(e,t,n){var i,r,o=this,a=o.options,s=e.getSlot(t),l=n.startValue();return a.isStacked&&(r=n.getSlot(l,l,!0),i=a.invertAxes?Lo:Oo,s[i+1]=s[i+2]=r[i+1]),s},reflowCategories:function(e){var t,n=this,i=n.children,r=i.length;for(t=0;r>t;t++)i[t].reflow(e[t])}}),lt=nt.extend({defaults:{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}},createLabel:function(){var e=this.options.labels,t=kn({},e,e.from),n=kn({},e,e.to);t.visible&&(this.labelFrom=this._createLabel(t),this.append(this.labelFrom)),n.visible&&(this.labelTo=this._createLabel(n),this.append(this.labelTo))},_createLabel:function(e){var t,n;return e.template?(n=Sn(e.template),t=n({dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total,series:this.series})):t=this.formatValue(e.format),new G(t,kn({vertical:this.options.vertical},e))},reflow:function(e){this.render();var t=this,n=t.labelFrom,i=t.labelTo;t.box=e,n&&(n.options.aboveAxis=t.value.from>t.value.to,n.reflow(e)),i&&(i.options.aboveAxis=t.value.to>t.value.from,i.reflow(e)),t.note&&t.note.reflow(e)}}),ct=st.extend({pointType:function(){return lt},pointValue:function(e){return e.valueFields},formatPointValue:function(e,t){return null===e.value.from&&null===e.value.to?"":Gn(t,e.value.from,e.value.to)},plotLimits:at.fn.plotLimits,plotRange:function(e){return e?[e.value.from,e.value.to]:0},updateRange:function(e,t){var n=this,i=t.series.axis,r=e.from,o=e.to,a=n.valueAxisRanges[i];null!==e&&A(r)&&A(o)&&(a=n.valueAxisRanges[i]=a||{min:Sr,max:Dr},a.min=pn.min(a.min,r),a.max=pn.max(a.max,r),a.min=pn.min(a.min,o),a.max=pn.max(a.max,o))},aboveAxis:function(e){var t=e.value;return t.to>t.from}}),dt=at.extend({init:function(e,t){var n=this;n.wrapData(t),at.fn.init.call(n,e,t)},wrapData:function(e){var t,n,i,r=e.series;for(t=0;r.length>t;t++)i=r[t],n=i.data,n&&!un(n[0])&&typeof n[0]!=Vr&&(i.data=[n])},reflowCategories:function(e){var t,n=this,i=n.children,r=i.length;for(t=0;r>t;t++)i[t].reflow(e[t])},plotRange:function(e){var t=e.series,n=this.seriesValueAxis(t),i=this.categoryAxisCrossingValue(n);return[i,e.value.current||i]},createPoint:function(e,t){var n,i,r=this,o=t.categoryIx,a=t.category,s=t.series,l=t.seriesIx,c=e.valueFields,d=r.options,u=r.children,h=kn({vertical:!d.invertAxes,overlay:s.overlay,categoryIx:o,invertAxes:d.invertAxes},s);return h=r.evalPointOptions(h,c,a,o,s,l),n=new ut(c,h),i=u[o],i||(i=new Z({vertical:d.invertAxes,gap:d.gap,spacing:d.spacing}),r.append(i)),i.append(n),n},updateRange:function(e,t){var n=this,i=t.series.axis,r=e.current,o=e.target,a=n.valueAxisRanges[i];ti(r)&&!isNaN(r)&&ti(o&&!isNaN(o))&&(a=n.valueAxisRanges[i]=a||{min:Sr,max:Dr},a.min=pn.min.apply(pn,[a.min,r,o]),a.max=pn.max.apply(pn,[a.max,r,o]))},formatPointValue:function(e,t){return Gn(t,e.value.current,e.value.target)},pointValue:function(e){return e.valueFields.current},aboveAxis:function(e){var t=e.value.current;return t>0}}),ut=In.extend({init:function(e,t){var n=this;In.fn.init.call(n,t),n.value=e,n.aboveAxis=n.options.aboveAxis},options:{color:Ho,border:{width:1},vertical:!1,animation:{type:vi},opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}</br>Target: {1}"}},render:function(){var e=this,t=e.options;e._rendered||(e._rendered=!0,ti(e.value.target)&&(e.target=new ht({type:t.target.shape,background:t.target.color||t.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:So,align:Xr}),e.append(e.target)),e.createNote())},reflow:function(e){this.render();var t,n=this,i=n.options,r=n.owner,o=n.target,a=i.invertAxes,s=r.seriesValueAxis(n.options),l=r.categorySlot(r.categoryAxis,i.categoryIx,s),c=s.getSlot(n.value.target),d=a?c:l,u=a?l:c;o&&(t=new En(d.x1,u.y1,d.x2,u.y2),o.options.height=a?t.height():i.target.line.width,o.options.width=a?i.target.line.width:t.width(),o.reflow(t)),n.note&&n.note.reflow(e),n.box=e},createVisual:function(){var e,t;In.fn.createVisual.call(this),e=this.options,t=di.Path.fromRect(this.box.toRect(),{fill:{color:e.color,opacity:e.opacity},stroke:null}),e.border.width>0&&t.options.set("stroke",{color:e.border.color||e.color,width:e.border.width,dashType:e.border.dashType,opacity:li(e.border.opacity,e.opacity)}),qn(t),this.visual.append(t)},createAnimation:function(){var e=this.options;kn(e,{animation:{aboveAxis:this.aboveAxis,vertical:e.vertical}}),In.fn.createAnimation.call(this)},tooltipAnchor:function(e,t){var n,i,r,o,a=this,s=a.options,l=a.box,c=s.vertical,d=a.aboveAxis,u=a.owner.pane.clipBox()||l;return c?(n=l.x2+Do,i=d?pn.max(l.y1,u.y1):pn.min(l.y2,u.y2)-t):(r=pn.max(l.x1,u.x1),o=pn.min(l.x2,u.x2),s.isStacked?(n=d?o-e:r,i=l.y1-t-Do):(n=d?o+Do:r-e-Do,i=l.y1)),new Ln(n,i)},createHighlight:function(e){return di.Path.fromRect(this.box.toRect(),e)},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}}),kn(ut.fn,et),kn(ut.fn,tt),ht=Vn.extend(),kn(ht.fn,et),pt=In.extend({init:function(e,t,n,i,r,o){var a=this;a.low=e,a.high=t,a.isVertical=n,a.chart=i,a.series=r,In.fn.init.call(a,o)},options:{animation:{type:rr,delay:hr},endCaps:!0,line:{width:1},zIndex:1},getAxis:function(){},reflow:function(e){var t,n=this,i=n.options.endCaps,r=n.isVertical,o=n.getAxis(),a=o.getSlot(n.low,n.high),s=e.center(),l=n.getCapsWidth(e,r),c=r?s.x:s.y,d=c-l,u=c+l;r?(t=[Ln(s.x,a.y1),Ln(s.x,a.y2)],i&&t.push(Ln(d,a.y1),Ln(u,a.y1),Ln(d,a.y2),Ln(u,a.y2))):(t=[Ln(a.x1,s.y),Ln(a.x2,s.y)],i&&t.push(Ln(a.x1,d),Ln(a.x1,u),Ln(a.x2,d),Ln(a.x2,u))),n.linePoints=t},getCapsWidth:function(e,t){var n=t?e.width():e.height(),i=pn.min(pn.floor(n/2),Gi)||Gi;return i},createVisual:function(){var e,t,n=this,i=n.options,r={stroke:{color:i.color,width:i.line.width,dashType:i.line.dashType}},o=n.linePoints;for(In.fn.createVisual.call(this),e=0;o.length>e;e+=2)t=new di.Path(r).moveTo(o[e].x,o[e].y).lineTo(o[e+1].x,o[e+1].y),this.visual.append(t)}}),ft=pt.extend({getAxis:function(){var e=this,t=e.chart,n=e.series,i=t.seriesValueAxis(n);return i}}),gt=pt.extend({getAxis:function(){var e=this,t=e.chart,n=e.series,i=t.seriesAxes(n),r=e.isVertical?i.y:i.x;return r}}),mt=In.extend({init:function(e,t){var n=this;In.fn.init.call(n),n.value=e,n.options=t,n.aboveAxis=li(n.options.aboveAxis,!0),n.tooltipTracking=!0},defaults:{vertical:!0,markers:{visible:!0,background:Ho,size:wr,type:Ii,border:{width:2},opacity:1},labels:{visible:!1,position:hi,margin:Yn(3),padding:Yn(4),animation:{type:rr,delay:hr}},notes:{label:{}},highlight:{markers:{border:{}}}},render:function(){var e,t=this,n=t.options,i=n.markers,r=n.labels,o=t.value;t._rendered||(t._rendered=!0,i.visible&&i.size&&(t.marker=t.createMarker(),t.append(t.marker)),r.visible&&(r.template?(e=Sn(r.template),o=e({dataItem:t.dataItem,category:t.category,value:t.value,percentage:t.percentage,series:t.series})):r.format&&(o=t.formatValue(r.format)),t.label=new Wn(o,kn({align:Ei,vAlign:Ei,margin:{left:5,right:5},zIndex:this.series.zIndex},r)),t.append(t.label)),t.createNote(),t.errorBar&&t.append(t.errorBar))},markerBorder:function(){var e=this.options.markers,t=e.background,n=kn({color:this.color},e.border);return ti(n.color)||(n.color=new Pn(t).brightness(yi).toHex()),n},createVisual:fn,createMarker:function(){var e=this.options.markers,t=new Vn({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:this.markerBorder(),opacity:e.opacity,zIndex:this.series.zIndex,animation:e.animation});return t},markerBox:function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},reflow:function(e){var t,n,i,r,o=this,a=o.options,s=a.vertical,l=o.aboveAxis;if(o.render(),o.box=e,t=e.clone(),s?l?t.y1-=t.height():t.y2+=t.height():l?t.x1+=t.width():t.x2-=t.width(),o._childBox=t,o.marker&&o.marker.reflow(t),o.reflowLabel(t),o.errorBars)for(i=0;o.errorBars.length>i;i++)o.errorBars[i].reflow(t);o.note&&(r=o.markerBox(),o.marker||(n=r.center(),r=En(n.x,n.y,n.x,n.y)),o.note.reflow(r))},reflowLabel:function(e){var t=this,n=t.options,i=t.label,r=n.labels.position;i&&(r=r===hi?So:r,r=r===wi?xi:r,i.reflow(e),i.box.alignTo(t.markerBox(),r),i.reflow(i.box))},createHighlight:function(){var e=this.options.highlight,t=e.markers,n=this.markerBorder().color,i=this.options.markers,r=new Vn({type:i.type,width:i.size,height:i.size,rotation:i.rotation,background:t.color||n,border:{color:t.border.color,width:t.border.width,opacity:li(t.border.opacity,1)},opacity:li(t.opacity,1)});return r.reflow(this._childBox),r.getElement()},tooltipAnchor:function(e,n){var i=this,r=i.markerBox(),o=i.aboveAxis,a=r.x2+Do,s=o?r.y1-n:r.y2,l=i.owner.pane.clipBox(),c=!l||l.overlaps(r);return c?Ln(a,s):t},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}}),kn(mt.fn,et),kn(mt.fn,tt),vt=mt.extend({init:function(e,t){var n=this;mt.fn.init.call(n,e,t),n.category=e.category},defaults:{labels:{position:Ei},highlight:{opacity:1,border:{width:1,opacity:1}}},createHighlight:function(){var e=this.options.highlight,t=e.border,n=this.options.markers,i=this.box.center(),r=n.size/2-t.width/2,o=new di.Circle(new ci.Circle([i.x,i.y],r),{stroke:{color:t.color||new Pn(n.background).brightness(yi).toHex(),width:t.width,opacity:t.opacity},fill:{color:n.background,opacity:e.opacity}});return o}}),_t=In.extend({init:function(e,t,n){var i=this;In.fn.init.call(i),i.linePoints=e,i.series=t,i.seriesIx=n},options:{closed:!1},points:function(e){var t,n,i=this,r=i.linePoints.concat(e||[]),o=[];for(t=0,n=r.length;n>t;t++)r[t].visible!==!1&&o.push(r[t]._childBox.toRect().center());return o},createVisual:function(){var e,t=this.options,n=this.series,i=n._defaults,r=n.color;Cn(r)&&i&&(r=i.color),e=di.Path.fromPoints(this.points(),{stroke:{color:r,width:n.width,opacity:n.opacity,dashType:n.dashType},zIndex:n.zIndex}),t.closed&&e.close(),this.visual=e},aliasFor:function(e,t){var n=this,i=n.seriesIx;return n.parent.getNearestPoint(t.x,t.y,i)}}),yt={renderSegments:function(){var e,t,n,i,r,o,a,s,l=this,c=l.options,d=c.series,u=l.seriesPoints,h=u.length;for(this._segments=[],t=0;h>t;t++){for(e=d[t],n=l.sortPoints(u[t]),a=n.length,i=[],o=0;a>o;o++)r=n[o],r?i.push(r):l.seriesMissingValues(e)!==gr&&(i.length>1&&(s=l.createSegment(i,e,t,s),this._addSegment(s)),i=[]);i.length>1&&(s=l.createSegment(i,e,t,s),this._addSegment(s))}},_addSegment:function(e){this._segments.push(e),this.children.unshift(e),e.parent=this},sortPoints:function(e){return e},seriesMissingValues:function(e){var t=e.missingValues,n=!t&&this.options.isStacked;return n?Vo:t||gr},getNearestPoint:function(e,t,n){var i,r,o,a,s,l=new Ln(e,t),c=this.seriesPoints[n],d=Sr;for(r=0;c.length>r;r++)o=c[r],o&&ti(o.value)&&null!==o.value&&o.visible!==!1&&(a=o.box,s=a.center().distanceTo(l),d>s&&(i=o,d=s));return i}},wt=at.extend({render:function(){var e=this;at.fn.render.apply(e),e.updateStackRange(),e.renderSegments()},pointType:function(){return mt},createPoint:function(e,t){var n,i,r,o=this,a=t.categoryIx,s=t.category,l=t.series,c=t.seriesIx,d=e.valueFields.value,u=o.seriesMissingValues(l);if(!ti(d)||null===d){if(u!==Vo)return null;d=0}return i=this.pointOptions(l,c),i=o.evalPointOptions(i,d,s,a,l,c),r=e.fields.color||l.color,vn.isFunction(l.color)&&(r=i.color),n=new mt(d,i),n.color=r,o.append(n),n},plotRange:function(e){var t,n,i,r,o=this.plotValue(e);if(this.options.isStacked)for(t=e.categoryIx,n=this.categoryPoints[t],i=0;n.length>i&&(r=n[i],e!==r);i++)o+=this.plotValue(r);return[o,o]},createSegment:function(e,t,n){var i,r=t.style;return new(i=r===co?bt:r===uo?kt:_t)(e,t,n)}}),kn(wt.fn,yt),bt=_t.extend({points:function(e){var t,n=this;return t=n.calculateStepPoints(n.linePoints),e&&e.length&&(t=t.concat(n.calculateStepPoints(e).reverse())),t},calculateStepPoints:function(e){var t,n,i,r,o,a=this,s=a.parent,l=s.plotArea,c=l.seriesCategoryAxis(a.series),d=s.seriesMissingValues(a.series)===gr,u=e.length,h=c.options.reverse,p=c.options.vertical,f=h?2:1,g=h?1:2,m=[];for(i=1;u>i;i++)t=e[i-1],n=e[i],r=t.markerBox().center(),o=n.markerBox().center(),c.options.justified?(m.push(new ci.Point(r.x,r.y)),m.push(p?new ci.Point(r.x,o.y):new ci.Point(o.x,r.y)),m.push(new ci.Point(o.x,o.y))):p?(m.push(new ci.Point(r.x,t.box[Oo+f])),m.push(new ci.Point(r.x,t.box[Oo+g])),d&&m.push(new ci.Point(r.x,n.box[Oo+f])),m.push(new ci.Point(o.x,n.box[Oo+f])),m.push(new ci.Point(o.x,n.box[Oo+g]))):(m.push(new ci.Point(t.box[Lo+f],r.y)),m.push(new ci.Point(t.box[Lo+g],r.y)),d&&m.push(new ci.Point(n.box[Lo+f],r.y)),m.push(new ci.Point(n.box[Lo+f],o.y)),m.push(new ci.Point(n.box[Lo+g],o.y)));return m||[]}}),kt=_t.extend({createVisual:function(){var e,t,n,i=this.series,r=i._defaults,o=i.color;Cn(o)&&r&&(o=r.color),e=new Fn(this.options.closed),t=e.process(this.points()),n=new di.Path({stroke:{color:o,width:i.width,opacity:i.opacity,dashType:i.dashType},zIndex:i.zIndex}),n.segments.push.apply(n.segments,t),this.visual=n}}),xt={points:function(){var e,t,n=this,i=n.parent,r=i.plotArea,o=i.options.invertAxes,a=i.seriesValueAxis(n.series),s=a.lineBox(),l=r.seriesCategoryAxis(n.series),c=l.lineBox(),d=o?c.x1:c.y1,u=n.stackPoints,h=n._linePoints(u),p=o?Lo:Oo;return d=ii(d,s[p+1],s[p+2]),!n.stackPoints&&h.length>1&&(e=h[0],t=ni(h),o?(h.unshift(new ci.Point(d,e.y)),h.push(new ci.Point(d,t.y))):(h.unshift(new ci.Point(e.x,d)),h.push(new ci.Point(t.x,d)))),h},createVisual:function(){var e=this.series,t=e._defaults,n=e.color;Cn(n)&&t&&(n=t.color),this.visual=new di.Group({zIndex:e.zIndex}),this.createArea(n),this.createLine(n)},createLine:function(e){var t,n=this.series,i=kn({color:e,opacity:n.opacity},n.line);i.visible!==!1&&i.width>0&&(t=di.Path.fromPoints(this._linePoints(),{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType,lineCap:"butt"}}),this.visual.append(t))},createArea:function(e){var t=this.series,n=di.Path.fromPoints(this.points(),{fill:{color:e,opacity:t.opacity},stroke:null});this.visual.append(n)}},Ct=_t.extend({init:function(e,t,n,i){var r=this;r.stackPoints=t,_t.fn.init.call(r,e,n,i)},_linePoints:_t.fn.points}),kn(Ct.fn,xt),St=wt.extend({createSegment:function(e,t,n,i){var r,o,a=this,s=a.options,l=s.isStacked,c=(t.line||{}).style;return l&&n>0&&i&&(r=i.linePoints,c!==co&&(r=r.slice(0).reverse())),c===uo?new Tt(e,i,l,t,n):new(o=c===co?Dt:Ct)(e,r,t,n)
  },seriesMissingValues:function(e){return e.missingValues||Vo}}),Tt=Ct.extend({init:function(e,t,n,i,r){var o=this;o.prevSegment=t,o.isStacked=n,_t.fn.init.call(o,e,i,r)},strokeSegments:function(){var e,t,n=this._strokeSegments;return n||(e=new Fn(this.options.closed),t=_t.fn.points.call(this),n=this._strokeSegments=e.process(t)),n},createVisual:function(){var e=this.series,t=e._defaults,n=e.color;Cn(n)&&t&&(n=t.color),this.visual=new di.Group({zIndex:e.zIndex}),this.createFill({fill:{color:n,opacity:e.opacity},stroke:null}),this.createStroke({stroke:kn({color:n,opacity:e.opacity,lineCap:"butt"},e.line)})},createFill:function(t){var n,i,r,o,a,s=this.strokeSegments(),l=s.slice(0),c=this.prevSegment;this.isStacked&&c&&(n=c.strokeSegments(),i=ni(n).anchor(),l.push(new di.Segment(i,i,ni(s).anchor())),r=e.map(n,function(e){return new di.Segment(e.anchor(),e.controlOut(),e.controlIn())}).reverse(),ei(l,r),o=l[0].anchor(),l.push(new di.Segment(o,o,ni(r).anchor()))),a=new di.Path(t),a.segments.push.apply(a.segments,l),this.closeFill(a),this.visual.append(a)},closeFill:function(e){var t=this,n=t.parent,i=t.prevSegment,r=n.plotArea,o=n.options.invertAxes,a=n.seriesValueAxis(t.series),s=a.lineBox(),l=r.seriesCategoryAxis(t.series),c=l.lineBox(),d=o?c.x1:c.y1,u=o?Lo:Oo,h=t.strokeSegments(),p=h[0].anchor(),f=ni(h).anchor();d=ii(d,s[u+1],s[u+2]),n.options.isStacked&&i||!(h.length>1)||(o?e.lineTo(d,f.y).lineTo(d,p.y):e.lineTo(f.x,d).lineTo(p.x,d))},createStroke:function(e){if(e.stroke.width>0){var t=new di.Path(e);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)}}}),Dt=bt.extend({init:function(e,t,n,i){var r=this;r.stackPoints=t,bt.fn.init.call(r,e,n,i)},_linePoints:bt.fn.points}),kn(Dt.fn,xt),At=In.extend({init:function(e,t){var n=this;In.fn.init.call(n,t),n.plotArea=e,n.xAxisRanges={},n.yAxisRanges={},n.points=[],n.seriesPoints=[],n.seriesOptions=[],n._evalSeries=[],n.render()},options:{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0},render:function(){var e=this;e.traverseDataPoints(mn(e.addValue,e))},addErrorBar:function(e,t,n){var i,r=this,o=e.value[t],a=t+"Value",s=t+"ErrorLow",l=t+"ErrorHigh",c=n.seriesIx,d=n.series,u=e.options.errorBars,h=n[s],p=n[l];A(o)&&(A(h)&&A(p)&&(i={low:h,high:p}),u&&ti(u[a])&&(r.seriesErrorRanges=r.seriesErrorRanges||{x:[],y:[]},r.seriesErrorRanges[t][c]=r.seriesErrorRanges[t][c]||new ot(u[a],d,t),i=r.seriesErrorRanges[t][c].getErrorRange(o,u[a])),i&&r.addPointErrorBar(i,e,t))},addPointErrorBar:function(e,t,n){var i,r=this,o=e.low,a=e.high,s=t.series,l=n===Oo,c=t.options.errorBars,d={};t[n+"Low"]=o,t[n+"High"]=a,t.errorBars=t.errorBars||[],i=new gt(o,a,l,r,s,c),t.errorBars.push(i),t.append(i),d[n]=o,r.updateRange(d,s),d[n]=a,r.updateRange(d,s)},addValue:function(e,t){var n,i=this,r=e.x,o=e.y,a=t.seriesIx,s=i.seriesPoints[a];i.updateRange(e,t.series),ti(r)&&null!==r&&ti(o)&&null!==o&&(n=i.createPoint(e,t),n&&(gn(n,t),i.addErrorBar(n,Lo,t),i.addErrorBar(n,Oo,t))),i.points.push(n),s.push(n)},updateRange:function(e,t){var n=this,i=e.x,r=e.y,o=t.xAxis,a=t.yAxis,s=n.xAxisRanges[o],l=n.yAxisRanges[a];ti(i)&&null!==i&&(s=n.xAxisRanges[o]=s||{min:Sr,max:Dr},typeof i===fo&&(i=p(i)),s.min=pn.min(s.min,i),s.max=pn.max(s.max,i)),ti(r)&&null!==r&&(l=n.yAxisRanges[a]=l||{min:Sr,max:Dr},typeof r===fo&&(r=p(r)),l.min=pn.min(l.min,r),l.max=pn.max(l.max,r))},evalPointOptions:function(e,t,n){var i=n.series,r=n.seriesIx,o={defaults:i._defaults,excluded:["data","tooltip","tempate"]},a=this._evalSeries[r];return ti(a)||(this._evalSeries[r]=a=P(e,{},o,!0)),a&&(e=kn({},e),P(e,{value:t,series:i,dataItem:n.dataItem},o)),e},pointType:function(){return mt},pointOptions:function(e,t){var n,i=this.seriesOptions[t];return i||(n=this.pointType().fn.defaults,this.seriesOptions[t]=i=kn({},n,{markers:{opacity:e.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},e)),i},createPoint:function(e,t){var n,i=this,r=t.series,o=this.pointOptions(r,t.seriesIx),a=t.color||r.color;return o=i.evalPointOptions(o,e,t),vn.isFunction(r.color)&&(a=o.color),n=new mt(e,o),n.color=a,i.append(n),n},seriesAxes:function(e){var t=this.plotArea,n=e.xAxis,i=n?t.namedXAxes[n]:t.axisX,r=e.yAxis,o=r?t.namedYAxes[r]:t.axisY;if(!i)throw Error("Unable to locate X axis with name "+n);if(!o)throw Error("Unable to locate Y axis with name "+r);return{x:i,y:o}},reflow:function(e){var t,n,i=this,r=i.points,o=0,a=!i.options.clip;i.traverseDataPoints(function(e,s){t=r[o++],n=i.seriesAxes(s.series);var l,c=n.x.getSlot(e.x,e.x,a),d=n.y.getSlot(e.y,e.y,a);t&&(c&&d?(l=i.pointSlot(c,d),t.reflow(l)):t.visible=!1)}),i.box=e},pointSlot:function(e,t){return new En(e.x1,t.y1,e.x2,t.y2)},traverseDataPoints:function(e){var t,n,i,r,o,a,s,l=this,c=l.options,d=c.series,u=l.seriesPoints;for(n=0;d.length>n;n++)for(i=d[n],r=u[n],r||(u[n]=[]),t=0;i.data.length>t;t++)o=this._bindPoint(i,n,t),a=o.valueFields,s=o.fields,e(a,kn({pointIx:t,series:i,seriesIx:n,dataItem:i.data[t],owner:l},s))},_bindPoint:at.fn._bindPoint,formatPointValue:function(e,t){var n=e.value;return Gn(t,n.x,n.y)},createVisual:fn}),Et=At.extend({render:function(){var e=this;At.fn.render.call(e),e.renderSegments()},createSegment:function(e,t,n){var i,r=t.style;return new(i=r===uo?kt:_t)(e,t,n)}}),kn(Et.fn,yt),Mt=At.extend({options:{tooltip:{format:"{3}"},labels:{format:"{3}"}},addValue:function(e,t){(null!==e.size&&e.size>=0||t.series.negativeValues.visible)&&At.fn.addValue.call(this,e,t)},reflow:function(e){var t=this;t.updateBubblesSize(e),At.fn.reflow.call(t,e)},pointType:function(){return vt},createPoint:function(e,t){var n,i,r=this,o=t.series,a=o.data.length,s=t.pointIx*(hr/a),l={delay:s,duration:hr-s,type:Si},c=t.color||o.color;return 0>e.size&&o.negativeValues.visible&&(c=li(o.negativeValues.color,c)),i=kn({labels:{animation:{delay:s,duration:hr-s}}},this.pointOptions(o,t.seriesIx),{markers:{type:Ii,border:o.border,opacity:o.opacity,animation:l}}),i=r.evalPointOptions(i,e,t),vn.isFunction(o.color)&&(c=i.color),i.markers.background=c,n=new vt(e,i),n.color=c,r.append(n),n},updateBubblesSize:function(e){var t,n,i,r,o,a,s,l,c,d,u,h,p,f,g,m,v=this,_=v.options,y=_.series,w=pn.min(e.width(),e.height());for(t=0;y.length>t;t++)for(i=y[t],r=v.seriesPoints[t],o=v.maxSize(r),a=i.minSize||pn.max(.02*w,10),s=i.maxSize||.2*w,l=a/2,c=s/2,d=pn.PI*l*l,u=pn.PI*c*c,h=u-d,p=h/o,n=0;r.length>n;n++)f=r[n],g=pn.abs(f.value.size)*p,m=pn.sqrt((d+g)/pn.PI),kn(f.options,{markers:{size:2*m,zIndex:c-m},labels:{zIndex:c-m+1}})},maxSize:function(e){var t,n,i=e.length,r=0;for(t=0;i>t;t++)n=e[t].value.size,r=pn.max(r,pn.abs(n));return r},formatPointValue:function(e,t){var n=e.value;return Gn(t,n.x,n.y,n.size,e.category)}}),It=In.extend({init:function(e,t){In.fn.init.call(this,t),this.value=e},options:{border:{_brightness:.8},line:{width:2},overlay:{gradient:lr},tooltip:{format:"<table style='text-align: left;'><th colspan='2'>{4:d}</th><tr><td>Open:</td><td>{0:C}</td></tr><tr><td>High:</td><td>{1:C}</td></tr><tr><td>Low:</td><td>{2:C}</td></tr><tr><td>Close:</td><td>{3:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}}},reflow:function(e){var t,n,i,r=this,o=r.options,a=r.owner,s=r.value,l=a.seriesValueAxis(o),c=[];n=l.getSlot(s.open,s.close),i=l.getSlot(s.low,s.high),n.x1=i.x1=e.x1,n.x2=i.x2=e.x2,r.realBody=n,t=i.center().x,c.push([[t,i.y1],[t,n.y1]]),c.push([[t,n.y2],[t,i.y2]]),r.lines=c,r.box=i.clone().wrap(n),r._rendered||(r._rendered=!0,r.createNote()),r.reflowNote()},reflowNote:function(){var e=this;e.note&&e.note.reflow(e.box)},createVisual:function(){In.fn.createVisual.call(this),this.visual.append(this.mainVisual(this.options)),this.createOverlay()},mainVisual:function(e){var t=new di.Group;return this.createBody(t,e),this.createLines(t,e),t},createBody:function(e,t){var n=di.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:t.opacity},stroke:null});t.border.width>0&&n.options.set("stroke",{color:this.getBorderColor(),width:t.border.width,dashType:t.border.dashType,opacity:li(t.border.opacity,t.opacity)}),qn(n),e.append(n),U(t)&&e.append(this.createGradientOverlay(n,{baseColor:this.color},kn({},t.overlay)))},createLines:function(e,t){this.drawLines(e,t,this.lines,t.line)},drawLines:function(e,t,n,i){var r,o,a={stroke:{color:i.color||this.color,opacity:li(i.opacity,t.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}};for(r=0;n.length>r;r++)o=di.Path.fromPoints(n[r],a),qn(o),e.append(o)},getBorderColor:function(){var e=this,t=e.options,n=t.border,i=n.color;return ti(i)||(i=new Pn(e.color).brightness(n._brightness).toHex()),i},createOverlay:function(){var e=di.Path.fromRect(this.box.toRect(),{fill:{color:Ho,opacity:0},stroke:null});this.visual.append(e)},createHighlight:function(){var e,t=this.options.highlight,n=this.color;return this.color=t.color||this.color,e=this.mainVisual(kn({},this.options,{line:{color:this.getBorderColor()}},t)),this.color=n,e},tooltipAnchor:function(){var e=this,t=e.box,n=e.owner.pane.clipBox()||t;return new Ln(t.x2+Do,pn.max(t.y1,n.y1)+Do)},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}}),kn(It.fn,et),kn(It.fn,tt),Pt=at.extend({options:{},reflowCategories:function(e){var t,n=this,i=n.children,r=i.length;for(t=0;r>t;t++)i[t].reflow(e[t])},addValue:function(e,t){var n,i,r=this,o=t.categoryIx,a=t.category,s=t.series,l=t.seriesIx,c=r.options,d=e.valueFields,u=r.children,h=r.splitValue(d),p=M(h),f=r.categoryPoints[o],g=s.data[o];f||(r.categoryPoints[o]=f=[]),p&&(n=r.createPoint(e,t)),i=u[o],i||(i=new Z({vertical:c.invertAxes,gap:c.gap,spacing:c.spacing}),r.append(i)),n&&(r.updateRange(d,t),i.append(n),n.categoryIx=o,n.category=a,n.series=s,n.seriesIx=l,n.owner=r,n.dataItem=g,n.noteText=e.fields.noteText),r.points.push(n),f.push(n)},pointType:function(){return It},createPoint:function(e,t){var n,i=this,r=t.categoryIx,o=t.category,a=t.series,s=t.seriesIx,l=e.valueFields,c=kn({},a),d=i.pointType(),u=e.fields.color||a.color;return c=i.evalPointOptions(c,l,o,r,a,s),a.type==Di&&l.open>l.close&&(u=e.fields.downColor||a.downColor||a.color),vn.isFunction(a.color)&&(u=c.color),n=new d(l,c),n.color=u,n},splitValue:function(e){return[e.low,e.open,e.close,e.high]},updateRange:function(e,t){var n=this,i=t.series.axis,r=n.valueAxisRanges[i],o=n.splitValue(e);r=n.valueAxisRanges[i]=r||{min:Sr,max:Dr},r=n.valueAxisRanges[i]={min:pn.min.apply(pn,o.concat([r.min])),max:pn.max.apply(pn,o.concat([r.max]))}},formatPointValue:function(e,t){var n=e.value;return Gn(t,n.open,n.high,n.low,n.close,e.category)}}),Ft=It.extend({reflow:function(e){var t,n,i,r,o=this,a=o.options,s=o.owner,l=o.value,c=s.seriesValueAxis(a),d=[],u=[],h=[];r=c.getSlot(l.low,l.high),n=c.getSlot(l.open,l.open),i=c.getSlot(l.close,l.close),n.x1=i.x1=r.x1=e.x1,n.x2=i.x2=r.x2=e.x2,t=r.center().x,d.push([n.x1,n.y1]),d.push([t,n.y1]),u.push([t,i.y1]),u.push([i.x2,i.y1]),h.push([t,r.y1]),h.push([t,r.y2]),o.lines=[d,u,h],o.box=r.clone().wrap(n.clone().wrap(i)),o.reflowNote()},createBody:e.noop}),Bt=Pt.extend({pointType:function(){return Ft}}),Rt=Pt.extend({addValue:function(e,t){var n,i,r=this,o=t.categoryIx,a=t.category,s=t.series,l=t.seriesIx,c=r.options,d=r.children,u=e.valueFields,h=r.splitValue(u),p=M(h),f=r.categoryPoints[o],g=s.data[o];f||(r.categoryPoints[o]=f=[]),p&&(n=r.createPoint(e,t)),i=d[o],i||(i=new Z({vertical:c.invertAxes,gap:c.gap,spacing:c.spacing}),r.append(i)),n&&(r.updateRange(u,t),i.append(n),n.categoryIx=o,n.category=a,n.series=s,n.seriesIx=l,n.owner=r,n.dataItem=g),r.points.push(n),f.push(n)},pointType:function(){return zt},splitValue:function(e){return[e.lower,e.q1,e.median,e.q3,e.upper]},updateRange:function(e,t){var n=this,i=t.series.axis,r=n.valueAxisRanges[i],o=n.splitValue(e).concat(n.filterOutliers(e.outliers));ti(e.mean)&&(o=o.concat(e.mean)),r=n.valueAxisRanges[i]=r||{min:Sr,max:Dr},r=n.valueAxisRanges[i]={min:pn.min.apply(pn,o.concat([r.min])),max:pn.max.apply(pn,o.concat([r.max]))}},formatPointValue:function(e,t){var n=e.value;return Gn(t,n.lower,n.q1,n.median,n.q3,n.upper,n.mean,e.category)},filterOutliers:function(e){var t,n,i=(e||[]).length,r=[];for(t=0;i>t;t++)n=e[t],ti(n)&&T(r,n);return r}}),zt=It.extend({init:function(e,t){var n=this;In.fn.init.call(n,t),n.value=e,n.createNote()},options:{border:{_brightness:.8},line:{width:2},mean:{width:2,dashType:"dash"},overlay:{gradient:lr},tooltip:{format:"<table style='text-align: left;'><th colspan='2'>{6:d}</th><tr><td>Lower:</td><td>{0:C}</td></tr><tr><td>Q1:</td><td>{1:C}</td></tr><tr><td>Median:</td><td>{2:C}</td></tr><tr><td>Mean:</td><td>{5:C}</td></tr><tr><td>Q3:</td><td>{3:C}</td></tr><tr><td>Upper:</td><td>{4:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},outliers:{visible:!0,size:wr,type:zi,background:Ho,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:wr,type:Ii,background:Ho,border:{width:2,opacity:1},opacity:0}},reflow:function(e){var t,n,i,r,o,a=this,s=a.options,l=a.owner,c=a.value,d=l.seriesValueAxis(s);i=d.getSlot(c.q1,c.q3),a.boxSlot=i,n=d.getSlot(c.lower,c.upper),r=d.getSlot(c.median),i.x1=n.x1=e.x1,i.x2=n.x2=e.x2,a.realBody=i,c.mean&&(o=d.getSlot(c.mean),a.meanPoints=[[[e.x1,o.y1],[e.x2,o.y1]]]),t=n.center().x,a.whiskerPoints=[[[t-5,n.y1],[t+5,n.y1],[t,n.y1],[t,i.y1]],[[t-5,n.y2],[t+5,n.y2],[t,n.y2],[t,i.y2]]],a.medianPoints=[[[e.x1,r.y1],[e.x2,r.y1]]],a.box=n.clone().wrap(i),a.reflowNote()},renderOutliers:function(e){var t,n,i,r,o=this,a=e.markers||{},s=o.value,l=s.outliers||[],c=(o.owner.seriesValueAxis(e),3*pn.abs(s.q3-s.q1)),d=[];for(r=0;l.length>r;r++)i=l[r],a=s.q3+c>i&&i>s.q1-c?e.outliers:e.extremes,t=kn({},a.border),ti(t.color)||(t.color=ti(o.color)?o.color:new Pn(a.background).brightness(yi).toHex()),n=new Vn({type:a.type,width:a.size,height:a.size,rotation:a.rotation,background:a.background,border:t,opacity:a.opacity}),n.value=i,d.push(n);return this.reflowOutliers(d),d},reflowOutliers:function(e){var t,n,i,r=this.owner.seriesValueAxis(this.options),o=this.box.center().x;for(t=0;e.length>t;t++)n=e[t].value,i=r.getSlot(n).move(o),this.box=this.box.wrap(i),e[t].reflow(i)},mainVisual:function(e){var t,n,i=It.fn.mainVisual.call(this,e),r=this.renderOutliers(e);for(t=0;r.length>t;t++)n=r[t].getElement(),n&&i.append(n);return i},createLines:function(e,t){this.drawLines(e,t,this.whiskerPoints,t.line),this.drawLines(e,t,this.medianPoints,t.median),this.drawLines(e,t,this.meanPoints,t.mean)},getBorderColor:function(){return this.color?this.color:It.getBorderColor.call(this)}}),kn(zt.fn,et),Ht=In.extend({init:function(e,t,n){var i=this;i.value=e,i.sector=t,In.fn.init.call(i,n)},options:{color:Ho,overlay:{gradient:Zr},border:{width:.5},labels:{visible:!1,distance:35,font:Ui,margin:Yn(.5),align:Ii,zIndex:1,position:Wr},animation:{type:jr},highlight:{visible:!0,border:{width:1}},visible:!0},render:function(){var e,t=this,n=t.options,i=n.labels,r=t.value;t._rendered||t.visible===!1||(t._rendered=!0,i.template?(e=Sn(i.template),r=e({dataItem:t.dataItem,category:t.category,value:t.value,series:t.series,percentage:t.percentage})):i.format&&(r=Gn(i.format,r)),i.visible&&r&&(t.label=new Wn(r,kn({},i,{align:Ei,vAlign:"",animation:{type:rr,delay:t.animationDelay}})),t.append(t.label)))},reflow:function(e){var t=this;t.render(),t.box=e,t.reflowLabel()},reflowLabel:function(){var e,t,n,i,r=this,o=r.sector.clone(),a=r.options,s=r.label,l=a.labels,c=l.distance,d=o.middle();s&&(i=s.box.height(),n=s.box.width(),l.position==Ei?(o.r=pn.abs((o.r-i)/2)+i,e=o.point(d),s.reflow(En(e.x,e.y-i/2,e.x,e.y))):l.position==fr?(o.r=o.r-i/2,e=o.point(d),s.reflow(En(e.x,e.y-i/2,e.x,e.y))):(e=o.clone().expand(c).point(d),e.x>=o.c.x?(t=e.x+n,s.orientation=Xr):(t=e.x-n,s.orientation=mr),s.reflow(En(t,e.y-i,e.x,e.y))))},createVisual:function(){var e,t=this,n=t.sector,i=t.options,r=i.border||{},o=r.width>0?{stroke:{color:r.color,width:r.width,opacity:r.opacity,dashType:r.dashType}}:{},a=i.color,s={color:a,opacity:i.opacity};In.fn.createVisual.call(this),t.value&&(e=t.createSegment(n,kn({fill:s,stroke:{opacity:i.opacity},zIndex:i.zIndex},o)),this.visual.append(e),U(i)&&this.visual.append(this.createGradientOverlay(e,{baseColor:a,fallbackFill:s},kn({center:[n.c.x,n.c.y],innerRadius:n.ir,radius:n.r,userSpace:!0},i.overlay))))},createSegment:function(e,t){return t.singleSegment?new di.Circle(new ci.Circle(new ci.Point(e.c.x,e.c.y),e.r),t):Un.current.createRing(e,t)},createAnimation:function(){var e=this.options,t=this.sector.c;kn(e,{animation:{center:[t.x,t.y],delay:this.animationDelay}}),In.fn.createAnimation.call(this)},createHighlight:function(e){var t=this,n=t.options.highlight||{},i=n.border||{};return t.createSegment(t.sector,kn({},e,{fill:{color:n.color,opacity:n.opacity},stroke:{opacity:i.opacity,width:i.width,color:i.color}}))},tooltipAnchor:function(e,t){var n=this,i=n.sector.adjacentBox(Do,e,t);return new Ln(i.x1,i.y1)},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}}),kn(Ht.fn,et),Lt={createLegendItem:function(e,t,n){var i,r,o,a,s,l=this,c=l.options.legend||{},d=c.labels||{},u=c.inactiveItems||{},h=u.labels||{};n&&n.visibleInLegend!==!1&&(s=n.visible!==!1,i=n.category||"",r=s?d.template:h.template||d.template,r&&(i=Sn(r)({text:i,series:n.series,dataItem:n.dataItem,percentage:n.percentage,value:e})),s?(a={},o=t.color):(a={color:h.color,font:h.font},o=(u.markers||{}).color),i&&l.legendItems.push({pointIndex:n.index,text:i,series:n.series,markerColor:o,labels:a}))}},Ot=In.extend({init:function(e,t){var n=this;In.fn.init.call(n,t),n.plotArea=e,n.points=[],n.legendItems=[],n.render()},options:{startAngle:90,connectors:{width:1,color:"#939393",padding:4},inactiveItems:{markers:{},labels:{}}},render:function(){var e=this;e.traverseDataPoints(mn(e.addValue,e))},traverseDataPoints:function(e){var t,n,i,r,o,a,s,l,c,d,u,h,p,f=this,g=f.options,m=f.plotArea.options.seriesColors||[],v=m.length,_=g.series,y=_.length,w=0;for(r=0;y>r;r++){for(t=_[r],a=t.data,u=V(t),s=360/u,h=ti(t.startAngle)?t.startAngle:g.startAngle,r!=y-1&&t.labels.position==Wr&&(t.labels.position=Ei),p=0;a.length>p;p++)n=q.current.bindPoint(t,p),l=n.valueFields.value,c=pn.abs(l),i=n.fields,o=Zn(c*s,ji),d=1!=a.length&&!!i.explode,Cn(t.color)||(t.color=i.color||m[p%v]),e(l,new Nn(null,0,0,h,o),{owner:f,category:i.category||"",index:w,series:t,seriesIx:r,dataItem:a[p],percentage:c/u,explode:d,visibleInLegend:i.visibleInLegend,visible:i.visible,zIndex:y-r,animationDelay:f.animationDelay(p,r,y)}),n.fields.visible!==!1&&(h+=o),w++;w=0}},evalSegmentOptions:function(e,t,n){var i=n.series;P(e,{value:t,series:i,dataItem:n.dataItem,category:n.category,percentage:n.percentage},{defaults:i._defaults,excluded:["data","template"]})},addValue:function(e,t,n){var i,r=this,o=kn({},n.series,{index:n.index});r.evalSegmentOptions(o,e,n),r.createLegendItem(e,o,n),n.visible!==!1&&(i=new Ht(e,t,o),gn(i,n),r.append(i),r.points.push(i))},reflow:function(e){var t,n,i,r,o,a,s,l,c=this,d=c.options,u=e.clone(),h=5,p=pn.min(u.width(),u.height()),f=p/2,g=p-.85*p,m=li(d.padding,g),v=En(u.x1,u.y1,u.x1+p,u.y1+p),_=v.center(),y=c.seriesConfigs||[],w=u.center(),b=c.points,k=b.length,x=d.series.length,C=[],S=[];for(m=m>f-h?f-h:m,v.translate(w.x-_.x,w.y-_.y),a=f-m,l=Ln(a+v.x1+m,a+v.y1+m),s=0;k>s;s++)r=b[s],o=r.sector,o.r=a,o.c=l,n=r.seriesIx,y.length&&(t=y[n],o.ir=t.ir,o.r=t.r),n==x-1&&r.explode&&(o.c=o.clone().radius(.15*o.r).point(o.middle())),r.reflow(v),i=r.label,i&&i.options.position===Wr&&n==x-1&&(i.orientation===Xr?S.push(i):C.push(i));C.length>0&&(C.sort(c.labelComparator(!0)),c.leftLabelsReflow(C)),S.length>0&&(S.sort(c.labelComparator(!1)),c.rightLabelsReflow(S)),c.box=v},leftLabelsReflow:function(e){var t=this,n=t.distanceBetweenLabels(e);t.distributeLabels(n,e)},rightLabelsReflow:function(e){var t=this,n=t.distanceBetweenLabels(e);t.distributeLabels(n,e)},distanceBetweenLabels:function(e){var t,n,i,r=this,o=r.points,a=o[o.length-1],s=a.sector,l=e[0].box,c=e.length-1,d=s.r+a.options.labels.distance,u=[];for(n=Zn(l.y1-(s.c.y-d-l.height()-l.height()/2)),u.push(n),i=0;c>i;i++)l=e[i].box,t=e[i+1].box,n=Zn(t.y1-l.y2),u.push(n);return n=Zn(s.c.y+d-e[c].box.y2-e[c].box.height()/2),u.push(n),u},distributeLabels:function(e,t){var n,i,r,o,a=this,s=e.length;for(o=0;s>o;o++)for(i=r=o,n=-e[o];n>0&&(i>=0||s>r);)n=a._takeDistance(e,o,--i,n),n=a._takeDistance(e,o,++r,n);a.reflowLabels(e,t)},_takeDistance:function(e,t,n,i){if(e[n]>0){var r=pn.min(e[n],i);i-=r,e[n]-=r,e[t]+=r}return i},reflowLabels:function(e,t){var n,i,r,o,a=this,s=a.points,l=s[s.length-1],c=l.sector,d=t.length,u=l.options.labels,h=u.distance,p=c.c.y-(c.r+h)-t[0].box.height();for(e[0]+=2,o=0;d>o;o++)n=t[o],p+=e[o],r=n.box,i=a.hAlignLabel(r.x2,c.clone().expand(h),p,p+r.height(),n.orientation==Xr),n.orientation==Xr?(u.align!==Ii&&(i=c.r+c.c.x+h),n.reflow(En(i+r.width(),p,i,p))):(u.align!==Ii&&(i=c.c.x-c.r-h),n.reflow(En(i-r.width(),p,i,p))),p+=r.height()},createVisual:function(){var e,t,n,r,o,a,s,l,c,d,u,h,p,f,g=this,m=g.options,v=m.connectors,_=g.points,y=_.length,w=4;for(In.fn.createVisual.call(this),this._connectorLines=[],s=0;y>s;s++)r=_[s],t=r.sector,n=t.middle(),a=r.label,o={seriesId:r.seriesIx},a&&(e=new di.Path({stroke:{color:v.color,width:v.width},animation:{type:rr,delay:r.animationDelay}}),a.options.position===Wr&&0!==r.value&&(l=a.box,c=t.c,d=t.point(n),u=Ln(l.x1,l.center().y),d=t.clone().expand(v.padding).point(n),e.moveTo(d.x,d.y),a.orientation==Xr?(p=Ln(l.x1-v.padding,l.center().y),f=i(c,d,u,p),u=Ln(p.x-w,p.y),f=f||u,f.x=pn.min(f.x,u.x),g.pointInCircle(f,t.c,t.r+w)||t.c.x>f.x?(h=t.c.x+t.r+w,r.options.labels.align!==Bi?u.x>h?e.lineTo(h,d.y):e.lineTo(d.x+2*w,d.y):e.lineTo(h,d.y),e.lineTo(u.x,p.y)):(f.y=p.y,e.lineTo(f.x,f.y))):(p=Ln(l.x2+v.padding,l.center().y),f=i(c,d,u,p),u=Ln(p.x+w,p.y),f=f||u,f.x=pn.max(f.x,u.x),g.pointInCircle(f,t.c,t.r+w)||f.x>t.c.x?(h=t.c.x-t.r-w,r.options.labels.align!==Bi?h>u.x?e.lineTo(h,d.y):e.lineTo(d.x-2*w,d.y):e.lineTo(h,d.y),e.lineTo(u.x,p.y)):(f.y=p.y,e.lineTo(f.x,f.y))),e.lineTo(p.x,p.y),this._connectorLines.push(e),this.visual.append(e)))},labelComparator:function(e){return e=e?-1:1,function(t,n){return t=(t.parent.sector.middle()+270)%360,n=(n.parent.sector.middle()+270)%360,(t-n)*e}},hAlignLabel:function(e,t,n,i,r){var o=t.c.x,a=t.c.y,s=t.r,l=pn.min(pn.abs(a-n),pn.abs(a-i));return l>s?e:o+pn.sqrt(s*s-l*l)*(r?1:-1)},pointInCircle:function(e,t,n){return d(t.x-e.x)+d(t.y-e.y)<d(n)},formatPointValue:function(e,t){return Gn(t,e.value)},animationDelay:function(e){return e*qr}}),kn(Ot.fn,Lt),Nt=Ht.extend({options:{overlay:{gradient:Jr},labels:{position:Ei},animation:{type:jr}},reflowLabel:function(){var e,t,n=this,i=n.sector.clone(),r=n.options,o=n.label,a=r.labels,s=i.middle();o&&(t=o.box.height(),a.position==Ei?(i.r-=(i.r-i.ir)/2,e=i.point(s),o.reflow(new En(e.x,e.y-t/2,e.x,e.y))):Ht.fn.reflowLabel.call(n))},createSegment:function(e,t){return Un.current.createRing(e,t)}}),kn(Nt.fn,et),Vt=Ot.extend({options:{startAngle:90,connectors:{width:1,color:"#939393",padding:4}},addValue:function(e,t,n){var i,r=this,o=kn({},n.series,{index:n.index});r.evalSegmentOptions(o,e,n),r.createLegendItem(e,o,n),e&&n.visible!==!1&&(i=new Nt(e,t,o),gn(i,n),r.append(i),r.points.push(i))},reflow:function(e){var t,n,i,r,o,a,s=this,l=s.options,c=e.clone(),d=5,u=pn.min(c.width(),c.height()),h=u/2,p=u-.85*u,f=li(l.padding,p),g=l.series,m=g.length,v=0,_=0,y=0,w=0;for(s.seriesConfigs=[],f=f>h-d?h-d:f,i=h-f,o=0;m>o;o++)t=g[o],0===o&&ti(t.holeSize)&&(n=t.holeSize,i-=t.holeSize),ti(t.size)?i-=t.size:v++,ti(t.margin)&&o!=m-1&&(i-=t.margin);for(ti(n)||(w=(h-f)/(m+.75),n=.75*w,i-=n),y=n,o=0;m>o;o++)t=g[o],r=li(t.size,i/v),y+=_,a=y+r,s.seriesConfigs.push({ir:y,r:a}),_=t.margin||0,y=a;Ot.fn.reflow.call(s,e)},animationDelay:function(e,t,n){return e*Yi+hr*(t+1)/(n+1)}}),Ut=st.extend({render:function(){st.fn.render.call(this),this.createSegments()},traverseDataPoints:function(e){var t,n,i,r,o,a,s,l,d,u,h=this.options.series,p=this.categoryAxis.options.categories||[],f=c(h),g=!this.options.invertAxes;for(t=0;h.length>t;t++)for(n=h[t],i=0,r=0,o=0;f>o;o++)a=q.current.bindPoint(n,o),s=a.valueFields.value,l=a.fields.summary,d=i,l?"total"===l.toLowerCase()?(a.valueFields.value=i,d=0,u=i):(a.valueFields.value=r,u=d-r,r=0):A(s)&&(r+=s,i+=s,u=i),e(a,{category:p[o],categoryIx:o,series:n,seriesIx:t,total:i,runningTotal:r,from:d,to:u,isVertical:g})},updateRange:function(e,t){st.fn.updateRange.call(this,{value:t.to},t)},aboveAxis:function(e){return e.value>=0},plotRange:function(e){return[e.from,e.to]},createSegments:function(){var e,t,n,i,r,o,a,s=this.options.series,l=this.seriesPoints,c=this.segments=[];for(e=0;s.length>e;e++)if(t=s[e],n=l[e])for(r=0;n.length>r;r++)o=n[r],o&&i&&(a=new Wt(i,o,t),c.push(a),this.append(a)),i=o}}),Wt=In.extend({init:function(e,t,n){var i=this;In.fn.init.call(i),i.from=e,i.to=t,i.series=n},options:{animation:{type:rr,delay:hr}},linePoints:function(){var e,t,n=[],i=this.from,r=i.box,o=this.to.box;return i.isVertical?(e=i.aboveAxis?r.y1:r.y2,n.push([r.x1,e],[o.x2,e])):(t=i.aboveAxis?r.x2:r.x1,n.push([t,r.y1],[t,o.y2])),n},createVisual:function(){var e,t,n;In.fn.createVisual.call(this),e=this.options,t=this.series.line||{},n=di.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}}),qn(n),this.visual.append(n)}}),jt=Mn.extend({init:function(e){var t=this;Mn.fn.init.call(t,e),e=t.options,t.id=vn.guid(),t.createTitle(),t.content=new In,t.content.clipRoot=W,t.chartContainer=new qt({},t),t.append(t.content),t.axes=[],t.charts=[]},options:{zIndex:-1,shrinkToFit:!0,title:{align:mr},visible:!0},createTitle:function(){var e=this,t=e.options.title;typeof t===Vr&&(t=kn({},t,{align:t.position,position:So})),e.title=jn.buildTitle(t,e,jt.fn.options.title)},appendAxis:function(e){var t=this;t.content.append(e),t.axes.push(e),e.pane=t},appendChart:function(e){var t=this;t.chartContainer.parent!==t.content&&t.content.append(t.chartContainer),t.charts.push(e),t.chartContainer.append(e),e.pane=t},empty:function(){var e,t=this,n=t.parent;if(n){for(e=0;t.axes.length>e;e++)n.removeAxis(t.axes[e]);for(e=0;t.charts.length>e;e++)n.removeChart(t.charts[e])}t.axes=[],t.charts=[],t.content.destroy(),t.content.children=[],t.chartContainer.children=[]},reflow:function(e){var t,n=this;ni(n.children)===n.content&&(t=n.children.pop()),Mn.fn.reflow.call(n,e),t&&n.children.push(t),n.title&&(n.contentBox.y1+=n.title.box.height())},renderComplete:function(){this.options.visible&&this.createGridLines()},stackRoot:W,createGridLines:function(){var e,t,n,i,r,o,a=this,s=a.axes,l=s.concat(a.parent.axes),c=[],d=[];for(t=0;s.length>t;t++)for(i=s[t],r=i.options.vertical,e=r?c:d,n=0;l.length>n;n++)0===e.length&&(o=l[n],r!==o.options.vertical&&ei(e,i.createGridLines(o)))},refresh:function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=e.proxy(this.createGradient,this),this.content.renderVisual(),this.content.parent=this,this.visual.append(this.content.visual),this.renderComplete()},clipBox:function(){return this.chartContainer.clipBox}}),qt=In.extend({init:function(e,t){var n=this;In.fn.init.call(n,e),n.pane=t},shouldClip:function(){var e,t=this,n=t.children,i=n.length;for(e=0;i>e;e++)if(n[e].options.clip===!0)return!0;return!1},_clipBox:function(){var e,t,n,i,r=this,o=r.pane,a=o.axes,s=a.length,l=o.box.clone();for(t=0;s>t;t++)i=a[t],e=i.options.vertical?Oo:Lo,n=i.lineBox(),l[e+1]=n[e+1],l[e+2]=n[e+2];return l},createVisual:function(){var e,t,n;this.visual=new di.Group({zIndex:0}),this.shouldClip()&&(e=this.clipBox=this._clipBox(),t=e.toRect(),n=di.Path.fromRect(t),this.visual.clip(n),this.unclipLabels())},stackRoot:W,unclipLabels:function(){var e,t,n,i,r,o=this,a=o.children,s=o.clipBox;for(n=0;a.length>n;n++)for(e=a[n].points||{},r=e.length,i=0;r>i;i++)t=e[i],t&&t.label&&t.label.options.visible&&t.box.overlaps(s)&&(t.label.alignToClipBox&&t.label.alignToClipBox(s),t.label.options.noclip=!0)},destroy:function(){In.fn.destroy.call(this),delete this.parent}}),Gt=In.extend({init:function(e,t){var n=this;In.fn.init.call(n,t),n.series=e,n.initSeries(),n.charts=[],n.options.legend.items=[],n.axes=[],n.crosshairs=[],n.createPanes(),n.render(),n.createCrosshairs()},options:{series:[],plotArea:{margin:{}},background:"",border:{color:bi,width:0},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}},initSeries:function(){var e,t,n=this.series;for(e=0;n.length>e;e++)t=n[e],t.index=e},createPanes:function(){var e,t,n=this,i=[],r=n.options.panes||[],o=pn.max(r.length,1);for(e=0;o>e;e++)t=new jt(r[e]),t.paneIndex=e,i.push(t),n.append(t);n.panes=i},createCrosshairs:function(e){var t,n,i,r,o,a=this;for(e=e||a.panes,t=0;e.length>t;t++)for(i=e[t],n=0;i.axes.length>n;n++)r=i.axes[n],r.options.crosshair&&r.options.crosshair.visible&&(o=new on(r,r.options.crosshair),a.crosshairs.push(o),i.content.append(o))},removeCrosshairs:function(e){var t,n,i=this,r=i.crosshairs,o=e.axes;for(t=r.length-1;t>=0;t--)for(n=0;o.length>n;n++)if(r[t].axis===o[n]){r.splice(t,1);break}},findPane:function(e){var t,n,i=this,r=i.panes;for(t=0;r.length>t;t++)if(r[t].options.name===e){n=r[t];break}return n||r[0]},findPointPane:function(e){var t,n,i=this,r=i.panes;for(t=0;r.length>t;t++)if(r[t].box.containsPoint(e)){n=r[t];break}return n},appendAxis:function(e){var t=this,n=t.findPane(e.options.pane);n.appendAxis(e),t.axes.push(e),e.plotArea=t},removeAxis:function(e){var t,n,i=this,r=[];for(t=0;i.axes.length>t;t++)n=i.axes[t],e!==n?r.push(n):n.destroy();i.axes=r},appendChart:function(e,t){var n=this;n.charts.push(e),t?t.appendChart(e):n.append(e)},removeChart:function(e){var t,n,i=this,r=[];for(t=0;i.charts.length>t;t++)n=i.charts[t],n!==e?r.push(n):n.destroy();i.charts=r},addToLegend:function(e){var t,n,i,r,o,a,s,l,c,d=e.length,u=[],h=this.options.legend,p=h.labels||{},f=h.inactiveItems||{},g=f.labels||{};for(t=0;d>t;t++)n=e[t],l=n.visible!==!1,n.visibleInLegend!==!1&&(i=n.name||"",c=l?p.template:g.template||p.template,c&&(i=Sn(c)({text:i,series:n})),r=n.color,s=n._defaults,Cn(r)&&s&&(r=s.color),l?(o={},a=r):(o={color:g.color,font:g.font},a=f.markers.color),i&&u.push({text:i,labels:o,markerColor:a,series:n,active:l}));ei(h.items,u)},groupAxes:function(e){var t,n,i,r,o=[],a=[];for(i=0;e.length>i;i++)for(t=e[i].axes,r=0;t.length>r;r++)n=t[r],n.options.vertical?a.push(n):o.push(n);return{x:o,y:a,any:o.concat(a)}},groupSeriesByPane:function(){var e,t,n,i=this,r=i.series,o={};for(e=0;r.length>e;e++)n=r[e],t=i.seriesPaneName(n),o[t]?o[t].push(n):o[t]=[n];return o},filterVisibleSeries:function(e){var t,n,i=[];for(t=0;e.length>t;t++)n=e[t],n.visible!==!1&&i.push(n);return i},reflow:function(e){var t=this,n=t.options.plotArea,i=t.panes,r=Yn(n.margin);t.box=e.clone().unpad(r),t.reflowPanes(),t.reflowAxes(i),t.reflowCharts(i)},redraw:function(e){var t,n=this;for(e=[].concat(e),this.initSeries(),t=0;e.length>t;t++)n.removeCrosshairs(e[t]),e[t].empty();for(n.render(e),n.reflowAxes(n.panes),n.reflowCharts(e),n.createCrosshairs(e),t=0;e.length>t;t++)e[t].refresh()},axisCrossingValues:function(e,t){var n,i=e.options,r=[].concat(i.axisCrossingValues||i.axisCrossingValue),o=t.length-r.length,a=r[0]||0;for(n=0;o>n;n++)r.push(a);return r},alignAxisTo:function(e,t,n,i){var r=e.getSlot(n,n,!0),o=e.options.reverse?2:1,a=t.getSlot(i,i,!0),s=t.options.reverse?2:1,l=e.box.translate(a[Lo+s]-r[Lo+o],a[Oo+s]-r[Oo+o]);e.pane!==t.pane&&l.translate(0,e.pane.box.y1-t.pane.box.y1),e.reflow(l)},alignAxes:function(e,t){var n,i,r,o,a=this,s=e[0],l=t[0],c=a.axisCrossingValues(s,t),d=a.axisCrossingValues(l,e),u={},h={},p={},f={};for(o=0;t.length>o;o++)r=t[o],n=r.pane,i=n.id,a.alignAxisTo(r,s,d[o],c[o]),r.options._overlap||(Zn(r.lineBox().x1)===Zn(s.lineBox().x1)&&(u[i]&&r.reflow(r.box.alignTo(u[i].box,mr).translate(-r.options.margin,0)),u[i]=r),Zn(r.lineBox().x2)===Zn(s.lineBox().x2)&&(r._mirrored||(r.options.labels.mirror=!r.options.labels.mirror,r._mirrored=!0),a.alignAxisTo(r,s,d[o],c[o]),h[i]&&r.reflow(r.box.alignTo(h[i].box,Xr).translate(r.options.margin,0)),h[i]=r),0!==o&&l.pane===r.pane&&r.alignTo(l));
  for(o=0;e.length>o;o++)r=e[o],n=r.pane,i=n.id,a.alignAxisTo(r,l,c[o],d[o]),r.options._overlap||(Zn(r.lineBox().y1)===Zn(l.lineBox().y1)&&(r._mirrored||(r.options.labels.mirror=!r.options.labels.mirror,r._mirrored=!0),a.alignAxisTo(r,l,c[o],d[o]),p[i]&&r.reflow(r.box.alignTo(p[i].box,So).translate(0,-r.options.margin)),p[i]=r),Zn(r.lineBox().y2,Ri)===Zn(l.lineBox().y2,Ri)&&(f[i]&&r.reflow(r.box.alignTo(f[i].box,xi).translate(0,r.options.margin)),f[i]=r),0!==o&&r.alignTo(s))},shrinkAxisWidth:function(e){var t,n,i,r=this,o=r.groupAxes(e).any,a=x(o),s=0;for(t=0;e.length>t;t++)n=e[t],n.axes.length>0&&(s=pn.max(s,a.width()-n.contentBox.width()));for(t=0;o.length>t;t++)i=o[t],i.options.vertical||i.reflow(i.box.shrink(s,0))},shrinkAxisHeight:function(e){var t,n,i,r,o,a;for(t=0;e.length>t;t++)for(n=e[t],i=n.axes,r=pn.max(0,x(i).height()-n.contentBox.height()),o=0;i.length>o;o++)a=i[o],a.options.vertical&&a.reflow(a.box.shrink(0,r))},fitAxes:function(e){var t,n,i,r,o,a,s,l,c=this,d=c.groupAxes(e).any,u=0;for(s=0;e.length>s;s++)if(o=e[s],t=o.axes,n=o.contentBox,t.length>0)for(i=x(t),u=pn.max(u,n.x1-i.x1),r=pn.max(n.y1-i.y1,n.y2-i.y2),l=0;t.length>l;l++)a=t[l],a.reflow(a.box.translate(0,r));for(s=0;d.length>s;s++)a=d[s],a.reflow(a.box.translate(u,0))},reflowAxes:function(e){var t,n=this,i=n.groupAxes(e);for(t=0;e.length>t;t++)n.reflowPaneAxes(e[t]);i.x.length>0&&i.y.length>0&&(n.alignAxes(i.x,i.y),n.shrinkAxisWidth(e),n.alignAxes(i.x,i.y),n.shrinkAxisHeight(e),n.alignAxes(i.x,i.y),n.fitAxes(e))},reflowPaneAxes:function(e){var t,n=e.axes,i=n.length;if(i>0)for(t=0;i>t;t++)n[t].reflow(e.contentBox)},reflowCharts:function(e){var t,n,i=this,r=i.charts,o=r.length,a=i.box;for(n=0;o>n;n++)t=r[n].pane,(!t||Qn(t,e))&&r[n].reflow(a)},reflowPanes:function(){var e,t,n,i,r,o=this,a=o.box,s=o.panes,l=s.length,c=a.height(),d=l,u=0,h=a.y1;for(e=0;l>e;e++)t=s[e],i=t.options.height,t.options.width=a.width(),t.options.height?(i.indexOf&&i.indexOf("%")&&(r=parseInt(i,10)/100,t.options.height=r*a.height()),t.reflow(a.clone()),c-=t.options.height):u++;for(e=0;l>e;e++)t=s[e],t.options.height||(t.options.height=c/u);for(e=0;l>e;e++)t=s[e],n=a.clone().move(a.x1,h),t.reflow(n),d--,h+=t.options.height},backgroundBox:function(){var e,t,n,i,r,o,a=this,s=a.axes,l=s.length;for(n=0;l>n;n++)for(r=s[n],i=0;l>i;i++)o=s[i],r.options.vertical!==o.options.vertical&&(e=r.lineBox().clone().wrap(o.lineBox()),t=t?t.wrap(e):e);return t||a.box},createVisual:function(){var e,t,n,i;In.fn.createVisual.call(this),e=this.backgroundBox(),t=this.options.plotArea,n=t.border||{},i=this._bgVisual=di.Path.fromRect(e.toRect(),{fill:{color:t.background,opacity:t.opacity},stroke:{color:n.width?n.color:"",width:n.width,dashType:n.dashType},zIndex:-1}),this.appendVisual(i)},pointsByCategoryIndex:function(e){var t,n,i,r,o,a=this.charts,s=[];if(null!==e)for(t=0;a.length>t;t++)if(o=a[t],"_navigator"!==o.pane.options.name&&(i=a[t].categoryPoints[e],i&&i.length))for(n=0;i.length>n;n++)r=i[n],r&&ti(r.value)&&null!==r.value&&s.push(r);return s},pointsBySeriesIndex:function(e){var t,n,i,r,o,a=this.charts,s=[];for(i=0;a.length>i;i++)for(o=a[i],t=o.points,r=0;t.length>r;r++)n=t[r],n&&n.options.index===e&&s.push(n);return s},paneByPoint:function(e){var t,n,i=this,r=i.panes;for(n=0;r.length>n;n++)if(t=r[n],t.box.containsPoint(e))return t}}),$t=Gt.extend({init:function(e,t){var n,i,r=this;if(r.namedCategoryAxes={},r.namedValueAxes={},r.valueAxisRangeTracker=new Yt,e.length>0)for(r.invertAxes=Qn(e[0].type,[vi,Ti,Bo,Po,Yr,dr]),n=0;e.length>n;n++)if(i=e[n].stack,i&&"100%"===i.type){r.stack100=!0;break}Gt.fn.init.call(r,e,t)},options:{categoryAxis:{categories:[]},valueAxis:{}},render:function(e){var t=this;e=e||t.panes,t.createCategoryAxes(e),t.aggregateCategories(e),t.createCharts(e),t.createValueAxes(e)},removeAxis:function(e){var t=this,n=e.options.name;Gt.fn.removeAxis.call(t,e),e instanceof Q?delete t.namedCategoryAxes[n]:(t.valueAxisRangeTracker.reset(n),delete t.namedValueAxes[n]),e===t.categoryAxis&&delete t.categoryAxis,e===t.valueAxis&&delete t.valueAxis},createCharts:function(e){var t,n,i,r,o=this,a=o.groupSeriesByPane();for(t=0;e.length>t;t++)n=e[t],i=a[n.options.name||"default"]||[],o.addToLegend(i),r=o.filterVisibleSeries(i),r&&(o.createAreaChart(B(r,[pi,Po]),n),o.createBarChart(B(r,[Bi,vi]),n),o.createRangeBarChart(B(r,[Qr,Yr]),n),o.createBulletChart(B(r,[Ti,Fo]),n),o.createCandlestickChart(B(r,Di),n),o.createBoxPlotChart(B(r,Ci),n),o.createOHLCChart(B(r,Ur),n),o.createWaterfallChart(B(r,[Ro,dr]),n),o.createLineChart(B(r,[yr,Bo]),n))},aggregateCategories:function(e){var t,n,i,r,o,a=this,s=a.srcSeries||a.series,l=[];for(t=0;s.length>t;t++)n=s[t],i=a.seriesCategoryAxis(n),r=a.findPane(i.options.pane),o=C(i.options.type,Ni),(o||n.categoryField)&&Qn(r,e)&&(n=a.aggregateSeries(n,i)),l.push(n);a.srcSeries=s,a.series=l},aggregateSeries:function(e,t){var i,r,o,a,s,l=t.options,c=C(t.options.type,Ni),d=l.categories,p=l.srcCategories||d,f=e.data,g=[],m=t.range(),v=kn({},e),_=kn({},e),y=u;for(v.data=a=[],c&&(y=h),i=0;f.length>i;i++)r=e.categoryField?y(e.categoryField,f[i]):p[i],o=t.categoryIndex(r,m),o>-1&&(g[o]=g[o]||[],g[o].push(i));for(s=new cn(_,q.current,n.current),i=0;d.length>i;i++)a[i]=s.aggregatePoints(g[i],d[i]);return v},appendChart:function(e,t){for(var n=this,i=e.options.series,r=n.seriesCategoryAxis(i[0]),o=r.options.categories,a=pn.max(0,c(i)-o.length);a--;)o.push("");n.valueAxisRangeTracker.update(e.valueAxisRanges),Gt.fn.appendChart.call(n,e,t)},seriesPaneName:function(t){var n=this,i=n.options,r=t.axis,o=[].concat(i.valueAxis),a=e.grep(o,function(e){return e.name===r})[0],s=i.panes||[{}],l=(s[0]||{}).name||"default",c=(a||{}).pane||l;return c},seriesCategoryAxis:function(e){var t=this,n=e.categoryAxis,i=n?t.namedCategoryAxes[n]:t.categoryAxis;if(!i)throw Error("Unable to locate category axis with name "+n);return i},stackableChartOptions:function(e,t){var n,i=e.stack,r=i&&"100%"===i.type;return ti(t.options.clip)?n=t.options.clip:r&&(n=!1),{isStacked:i,isStacked100:r,clip:n}},createBarChart:function(e,t){if(0!==e.length){var n=this,i=e[0],r=new st(n,gn({series:e,invertAxes:n.invertAxes,gap:i.gap,spacing:i.spacing},n.stackableChartOptions(i,t)));n.appendChart(r,t)}},createRangeBarChart:function(e,t){if(0!==e.length){var n=this,i=e[0],r=new ct(n,{series:e,invertAxes:n.invertAxes,gap:i.gap,spacing:i.spacing});n.appendChart(r,t)}},createBulletChart:function(e,t){if(0!==e.length){var n=this,i=e[0],r=new dt(n,{series:e,invertAxes:n.invertAxes,gap:i.gap,spacing:i.spacing,clip:t.options.clip});n.appendChart(r,t)}},createLineChart:function(e,t){if(0!==e.length){var n=this,i=e[0],r=new wt(n,gn({invertAxes:n.invertAxes,series:e},n.stackableChartOptions(i,t)));n.appendChart(r,t)}},createAreaChart:function(e,t){if(0!==e.length){var n=this,i=e[0],r=new St(n,gn({invertAxes:n.invertAxes,series:e},n.stackableChartOptions(i,t)));n.appendChart(r,t)}},createOHLCChart:function(e,t){if(0!==e.length){var n=this,i=e[0],r=new Bt(n,{invertAxes:n.invertAxes,gap:i.gap,series:e,spacing:i.spacing,clip:t.options.clip});n.appendChart(r,t)}},createCandlestickChart:function(e,t){if(0!==e.length){var n=this,i=e[0],r=new Pt(n,{invertAxes:n.invertAxes,gap:i.gap,series:e,spacing:i.spacing,clip:t.options.clip});n.appendChart(r,t)}},createBoxPlotChart:function(e,t){if(0!==e.length){var n=this,i=e[0],r=new Rt(n,{invertAxes:n.invertAxes,gap:i.gap,series:e,spacing:i.spacing,clip:t.options.clip});n.appendChart(r,t)}},createWaterfallChart:function(e,t){if(0!==e.length){var n=this,i=e[0],r=new Ut(n,{series:e,invertAxes:n.invertAxes,gap:i.gap,spacing:i.spacing});n.appendChart(r,t)}},axisRequiresRounding:function(e,t){var n,i,r=this,o=B(r.series,$o);for(n=0;o.length>n;n++)if(i=o[n].categoryAxis||"",i===e||!i&&0===t)return!0},createCategoryAxes:function(e){var t,n,i,r,o,a,s,l,c=this,d=c.invertAxes,u=[].concat(c.options.categoryAxis),h=[];for(t=0;u.length>t;t++)if(n=u[t],i=c.findPane(n.pane),Qn(i,e)){if(a=n.name,r=n.categories||[],o=n.type||"",n=kn({vertical:d,axisCrossingValue:d?Sr:0},n),ti(n.justified)||(n.justified=c.isJustified()),c.axisRequiresRounding(a,t)&&(n.justified=!1,n.roundToBaseUnit=!0),s=L(n,r[0])?new K(n):new Q(n),a){if(c.namedCategoryAxes[a])throw Error("Category axis with name "+a+" is already defined");c.namedCategoryAxes[a]=s}s.axisIndex=t,h.push(s),c.appendAxis(s)}l=c.categoryAxis||h[0],c.categoryAxis=l,d?c.axisY=l:c.axisX=l},isJustified:function(){var e,t,n=this,i=n.series;for(e=0;i.length>e;e++)if(t=i[e],!Qn(t.type,[pi,Po]))return!1;return!0},createValueAxes:function(e){var t,n,i,r,o,a,s,l,c,d=this,u=d.valueAxisRangeTracker,h=u.query(),p=[].concat(d.options.valueAxis),f=d.invertAxes,g={vertical:!f},m=[];for(d.stack100&&(g.roundToMajorUnit=!1,g.labels={format:"P0"}),c=0;p.length>c;c++)if(t=p[c],n=d.findPane(t.pane),Qn(n,e)){if(l=t.name,s=C(t.type,kr)?{min:.1,max:1}:{min:0,max:1},o=u.query(l)||h||s,0===c&&o&&h&&(o.min=pn.min(o.min,h.min),o.max=pn.max(o.max,h.max)),a=C(t.type,kr)?zn:Hn,i=new a(o.min,o.max,kn({},g,t)),l){if(d.namedValueAxes[l])throw Error("Value axis with name "+l+" is already defined");d.namedValueAxes[l]=i}i.axisIndex=c,m.push(i),d.appendAxis(i)}r=d.valueAxis||m[0],d.valueAxis=r,f?d.axisX=r:d.axisY=r},click:function(t,n){var i,r,o,a=this,s=t._eventCoordinates(n),l=new Ln(s.x,s.y),c=a.pointPane(l),d=[],u=[];if(c){for(i=c.axes,r=0;i.length>r;r++)o=i[r],o.getValue?T(u,o.getValue(l)):T(d,o.getCategory(l));0===d.length&&T(d,a.categoryAxis.getCategory(l)),d.length>0&&u.length>0&&t.trigger(Gr,{element:e(n.target),originalEvent:n,category:k(d),value:k(u)})}},pointPane:function(e){var t,n,i=this,r=i.panes;for(n=0;r.length>n;n++)if(t=r[n],t.contentBox.containsPoint(e))return t}}),Yt=_n.extend({init:function(){var e=this;e.axisRanges={}},update:function(e){var t,n,i,r=this,o=r.axisRanges;for(i in e)t=o[i],n=e[i],o[i]=t=t||{min:Sr,max:Dr},t.min=pn.min(t.min,n.min),t.max=pn.max(t.max,n.max)},reset:function(e){this.axisRanges[e]=t},query:function(e){return this.axisRanges[e]}}),Qt=Gt.extend({init:function(e,t){var n=this;n.namedXAxes={},n.namedYAxes={},n.xAxisRangeTracker=new Yt,n.yAxisRangeTracker=new Yt,Gt.fn.init.call(n,e,t)},options:{xAxis:{},yAxis:{}},render:function(e){var t,n,i,r,o=this,a=o.groupSeriesByPane();for(e=e||o.panes,t=0;e.length>t;t++)n=e[t],i=a[n.options.name||"default"]||[],o.addToLegend(i),r=o.filterVisibleSeries(i),r&&(o.createScatterChart(B(r,eo),n),o.createScatterLineChart(B(r,to),n),o.createBubbleChart(B(r,Si),n));o.createAxes(e)},appendChart:function(e,t){var n=this;n.xAxisRangeTracker.update(e.xAxisRanges),n.yAxisRangeTracker.update(e.yAxisRanges),Gt.fn.appendChart.call(n,e,t)},removeAxis:function(e){var t=this,n=e.options.name;Gt.fn.removeAxis.call(t,e),e.options.vertical?(t.yAxisRangeTracker.reset(n),delete t.namedYAxes[n]):(t.xAxisRangeTracker.reset(n),delete t.namedXAxes[n]),e===t.axisX&&delete t.axisX,e===t.axisY&&delete t.axisY},seriesPaneName:function(t){var n=this,i=n.options,r=t.xAxis,o=[].concat(i.xAxis),a=e.grep(o,function(e){return e.name===r})[0],s=t.yAxis,l=[].concat(i.yAxis),c=e.grep(l,function(e){return e.name===s})[0],d=i.panes||[{}],u=d[0].name||"default",h=(a||{}).pane||(c||{}).pane||u;return h},createScatterChart:function(e,t){var n=this;e.length>0&&n.appendChart(new At(n,{series:e,clip:t.options.clip}),t)},createScatterLineChart:function(e,t){var n=this;e.length>0&&n.appendChart(new Et(n,{series:e,clip:t.options.clip}),t)},createBubbleChart:function(e,t){var n=this;e.length>0&&n.appendChart(new Mt(n,{series:e,clip:t.options.clip}),t)},createXYAxis:function(e,t,n){var i,r,o,a,s,l,c,d,u=this,h=e.name,p=t?u.namedYAxes:u.namedXAxes,f=t?u.yAxisRangeTracker:u.xAxisRangeTracker,g=kn({},e,{vertical:t}),m=C(g.type,kr),v=f.query(),_=m?{min:.1,max:1}:{min:0,max:1},y=f.query(h)||v||_,w=u.series,b=[g.min,g.max];for(o=0;w.length>o;o++)if(a=w[o],s=a[t?"yAxis":"xAxis"],s==g.name||0===n&&!s){l=q.current.bindPoint(a,0).valueFields,b.push(l[t?"y":"x"]);break}for(0===n&&v&&(y.min=pn.min(y.min,v.min),y.max=pn.max(y.max,v.max)),d=0;b.length>d;d++)if(b[d]instanceof Date){c=!0;break}if(r=C(g.type,Ni)||!g.type&&c?X:m?zn:Hn,i=new r(y.min,y.max,g),h){if(p[h])throw Error((t?"Y":"X")+" axis with name "+h+" is already defined");p[h]=i}return u.appendAxis(i),i},createAxes:function(e){var t,n=this,i=n.options,r=[].concat(i.xAxis),o=[],a=[].concat(i.yAxis),s=[];dn(r,function(i){t=n.findPane(this.pane),Qn(t,e)&&o.push(n.createXYAxis(this,!1,i))}),dn(a,function(i){t=n.findPane(this.pane),Qn(t,e)&&s.push(n.createXYAxis(this,!0,i))}),n.axisX=n.axisX||o[0],n.axisY=n.axisY||s[0]},click:function(t,n){var i,r,o,a,s=this,l=t._eventCoordinates(n),c=new Ln(l.x,l.y),d=s.axes,u=d.length,h=[],p=[];for(i=0;u>i;i++)r=d[i],a=r.options.vertical?p:h,o=r.getValue(c),null!==o&&a.push(o);h.length>0&&p.length>0&&t.trigger(Gr,{element:e(n.target),originalEvent:n,x:k(h),y:k(p)})}}),Kt=Gt.extend({render:function(){var e=this,t=e.series;e.createPieChart(t)},createPieChart:function(e){var t=this,n=e[0],i=new Ot(t,{series:e,padding:n.padding,startAngle:n.startAngle,connectors:n.connectors,legend:t.options.legend});t.appendChart(i)},appendChart:function(e,t){Gt.fn.appendChart.call(this,e,t),ei(this.options.legend.items,e.legendItems)}}),Xt=Kt.extend({render:function(){var e=this,t=e.series;e.createDonutChart(t)},createDonutChart:function(e){var t=this,n=e[0],i=new Vt(t,{series:e,padding:n.padding,connectors:n.connectors,legend:t.options.legend});t.appendChart(i)}}),Zt=di.Animation.extend({options:{easing:"easeOutElastic",duration:hr},setup:function(){this.element.transform(ci.transform().scale(lo,lo,this.options.center))},step:function(e){this.element.transform(ci.transform().scale(e,e,this.options.center))}}),di.AnimationFactory.current.register(jr,Zt),Jt=di.Animation.extend({options:{easing:"easeOutElastic"},setup:function(){var e=this.center=this.element.bbox().center();this.element.transform(ci.transform().scale(lo,lo,e))},step:function(e){this.element.transform(ci.transform().scale(e,e,this.center))}}),di.AnimationFactory.current.register(Si,Jt),en=_n.extend({init:function(){this._points=[]},destroy:function(){this._points=[]},show:function(e){var t,n;for(e=[].concat(e),this.hide(),t=0;e.length>t;t++)n=e[t],n&&n.toggleHighlight&&(n.toggleHighlight(!0),this._points.push(n))},hide:function(){for(var e=this._points;e.length;)e.pop().toggleHighlight(!1)},isHighlighted:function(e){var t,n,i=this._points;for(t=0;i.length>t;t++)if(n=i[t],e==n)return!0;return!1}}),tn=_n.extend({init:function(t,n){var i=this;i.options=kn({},i.options,n),i.chartElement=t,i.template=tn.template,i.template||(i.template=tn.template=si("<div class='"+Hi+"tooltip "+Hi+"chart-tooltip' style='display:none; position: absolute; font: #= d.font #;border: #= d.border.width #px solid;opacity: #= d.opacity #; filter: alpha(opacity=#= d.opacity * 100 #);'></div>")),i.element=e(i.template(i.options)),i.move=mn(i.move,i),i._mouseleave=mn(i._mouseleave,i)},destroy:function(){this._clearShowTimeout(),this.element&&(this.element.off(Mr).remove(),this.element=null)},options:{border:{width:1},opacity:1,animation:{duration:To}},move:function(){var e,t=this,n=t.options,i=t.element;t.anchor&&(e=t._offset(),t.visible||i.css({top:e.top,left:e.left}),t._ensureElement(document.body),i.stop(!0,!0).show().animate({left:e.left,top:e.top},n.animation.duration),t.visible=!0)},_clearShowTimeout:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)},_padding:function(){if(!this._chartPadding){var e=this.chartElement;this._chartPadding={top:parseInt(e.css("paddingTop"),10),left:parseInt(e.css("paddingLeft"),10)}}return this._chartPadding},_offset:function(){var t=this,n=t._measure(),i=t.anchor,r=t._padding(),o=t.chartElement.offset(),a=Zn(i.y+r.top+o.top),s=Zn(i.x+r.left+o.left),l=vn.support.zoomLevel(),c=e(window),d=window.pageYOffset||document.documentElement.scrollTop||0,u=window.pageXOffset||document.documentElement.scrollLeft||0;return a+=t._fit(a-d,n.height,c.outerHeight()/l),s+=t._fit(s-u,n.width,c.outerWidth()/l),{top:a,left:s}},setStyle:function(e,t){var n,i,r=e.background,o=e.border.color;t&&(n=t.color||t.options.color,r=li(r,n),o=li(o,n)),ti(e.color)||(i=new Pn(r).percBrightness(),this.element.toggleClass(Hi+Mo,i>180)),this.element.css({backgroundColor:r,borderColor:o,font:e.font,color:e.color,opacity:e.opacity,borderWidth:e.border.width})},show:function(){this._clearShowTimeout(),this.showTimeout=setTimeout(this.move,Ao)},hide:function(){var e=this;clearTimeout(e.showTimeout),e._hideElement(),e.visible&&(e.point=null,e.visible=!1,e.index=null)},_measure:function(){this._ensureElement();var e={width:this.element.outerWidth(),height:this.element.outerHeight()};return e},_ensureElement:function(){this.element&&this.element.appendTo(document.body).on(Mr,this._mouseleave)},_mouseleave:function(t){var n=t.relatedTarget,i=this.chartElement[0];n&&n!==i&&!e.contains(i,n)&&this.hide()},_hideElement:function(){this.element&&this.element.fadeOut({always:function(){e(this).off(Mr).remove()}})},_pointContent:function(e){var t,n,i=this,r=kn({},i.options,e.options.tooltip);return ti(e.value)&&(t=""+e.value),r.template?(n=Sn(r.template),t=n({value:e.value,category:e.category,series:e.series,dataItem:e.dataItem,percentage:e.percentage,runningTotal:e.runningTotal,total:e.total,low:e.low,high:e.high,xLow:e.xLow,xHigh:e.xHigh,yLow:e.yLow,yHigh:e.yHigh})):r.format&&(t=e.formatValue(r.format)),t},_pointAnchor:function(e){var t=this._measure();return e.tooltipAnchor(t.width,t.height)},_fit:function(e,t,n){var i=0;return e+t>n&&(i=n-(e+t)),0>e&&(i=-e),i}}),nn=tn.extend({show:function(e){var t=this,n=kn({},t.options,e.options.tooltip);e&&e.tooltipAnchor&&t.element&&(t.element.html(t._pointContent(e)),t.anchor=t._pointAnchor(e),t.anchor?(t.setStyle(n,e),tn.fn.show.call(t,e)):t.hide())}}),rn=tn.extend({init:function(e,t,n){var i=this;tn.fn.init.call(i,e,n),i.plotArea=t},options:{sharedTemplate:"<table><th colspan='2'>#= categoryText #</th># for(var i = 0; i < points.length; i++) { ## var point = points[i]; #<tr># if(point.series.name) { # <td> #= point.series.name #:</td># } #<td>#= content(point) #</td></tr># } #</table>",categoryFormat:"{0:d}"},showAt:function(t,n){var i,r=this,o=r.options,a=r.plotArea,s=a.categoryAxis,l=s.pointCategoryIndex(n),c=s.getCategory(n),d=s.getSlot(l);t=e.grep(t,function(e){var t=e.series.tooltip,n=t&&t.visible===!1;return!n}),t.length>0&&(i=r._content(t,c),r.element.html(i),r.anchor=r._slotAnchor(n,d),r.setStyle(o,t[0]),tn.fn.show.call(r))},_slotAnchor:function(e,t){var n,i=this,r=i.plotArea,o=r.categoryAxis,a=this._measure(),s=e.y-a.height/2;return n=o.options.vertical?Ln(e.x,s):Ln(t.center().x,s)},_content:function(e,t){var n,i,r=this;return n=vn.template(r.options.sharedTemplate),i=n({points:e,category:t,categoryText:Gn(r.options.categoryFormat,t),content:r._pointContent})}}),on=In.extend({init:function(e,t){In.fn.init.call(this,t),this.axis=e,this.stickyMode=e instanceof Q},options:{color:bi,width:1,zIndex:-1,tooltip:{visible:!1}},showAt:function(e){var t;this.point=e,this.moveLine(),this.line.visible(!0),t=this.options.tooltip,t.visible&&(this.tooltip||(this.tooltip=new an(this,kn({},t,{stickyMode:this.stickyMode}))),this.tooltip.showAt(e))},hide:function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},moveLine:function(){var e,t,n,i=this,r=i.axis,o=r.options.vertical,a=i.getBox(),s=i.point,l=o?Oo:Lo;t=new ci.Point(a.x1,a.y1),n=o?new ci.Point(a.x2,a.y1):new ci.Point(a.x1,a.y2),s&&(i.stickyMode?(e=r.getSlot(r.pointCategoryIndex(s)),t[l]=n[l]=e.center()[l]):t[l]=n[l]=s[l]),i.box=a,this.line.moveTo(t).lineTo(n)},getBox:function(){var e,t,n,i=this,r=i.axis,o=r.pane.axes,a=o.length,s=r.options.vertical,l=r.lineBox().clone(),c=s?Lo:Oo;for(n=0;a>n;n++)t=o[n],t.options.vertical!=s&&(e?e.wrap(t.lineBox()):e=t.lineBox().clone());return l[c+1]=e[c+1],l[c+2]=e[c+2],l},createVisual:function(){In.fn.createVisual.call(this);var e=this.options;this.line=new di.Path({stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},destroy:function(){var e=this;e.tooltip&&e.tooltip.destroy(),In.fn.destroy.call(e)}}),an=tn.extend({init:function(e,t){var n=this,i=e.axis.getRoot().chart.element;n.crosshair=e,tn.fn.init.call(n,i,kn({},n.options,{background:e.axis.plotArea.options.seriesColors[0]},t)),n.setStyle(n.options)},options:{padding:10},showAt:function(e){var t=this,n=t.element;n&&(t.point=e,t.element.html(t.content(e)),t.anchor=t.getAnchor(),t.move())},move:function(){var e=this,t=e.element,n=e._offset();e._ensureElement(),t.css({top:n.top,left:n.left}).show()},content:function(e){var t,n,i,r=this,o=r.options,a=r.crosshair.axis,s=a.options;return n=t=a[o.stickyMode?"getCategory":"getValue"](e),o.template?(i=Sn(o.template),t=i({value:n})):o.format?t=Gn(o.format,n):s.type===Ni&&(t=Gn(s.labels.dateFormats[s.baseUnit],n)),t},getAnchor:function(){var e,t=this,n=t.options,i=n.position,r=this.crosshair,o=!r.axis.options.vertical,a=r.line.bbox(),s=this._measure(),l=s.width/2,c=s.height/2,d=n.padding;return e=o?i===xi?a.bottomLeft().translate(-l,d):a.topLeft().translate(-l,-s.height-d):i===mr?a.topLeft().translate(-s.width-d,-c):a.topRight().translate(d,-c)},hide:function(){this.element.hide(),this.point=null},destroy:function(){tn.fn.destroy.call(this),this.point=null}}),sn={min:function(e){var t,n,i=Sr,r=e.length;for(t=0;r>t;t++)n=e[t],A(n)&&(i=pn.min(i,n));return i===Sr?e[0]:i},max:function(e){var t,n,i=Dr,r=e.length;for(t=0;r>t;t++)n=e[t],A(n)&&(i=pn.max(i,n));return i===Dr?e[0]:i},sum:function(e){var t,n,i=e.length,r=0;for(t=0;i>t;t++)n=e[t],A(n)&&(r+=n);return r},sumOrNull:function(e){var t=null;return E(e)&&(t=sn.sum(e)),t},count:function(e){var t,n,i=e.length,r=0;for(t=0;i>t;t++)n=e[t],null!==n&&ti(n)&&r++;return r},avg:function(e){var t=e[0],n=E(e);return n>0&&(t=sn.sum(e)/n),t},first:function(e){var t,n,i=e.length;for(t=0;i>t;t++)if(n=e[t],null!==n&&ti(n))return n;return e[0]}},n.prototype={register:function(e,t){for(var n=0;e.length>n;n++)this._defaults[e[n]]=t},query:function(e){return this._defaults[e]}},n.current=new n,ln=yn.extend({init:function(t,n,i){var r,o,a=this,s=t.element,l=n.lineBox(),c=a.getValueAxis(n),d=c.lineBox(),u="."+Hi;yn.fn.init.call(a),a.options=kn({},a.options,i),i=a.options,a.chart=t,a.chartElement=s,a.categoryAxis=n,a._dateAxis=a.categoryAxis instanceof K,a.valueAxis=c,a._dateAxis&&kn(i,{min:p(i.min),max:p(i.max),from:p(i.from),to:p(i.to)}),a.template=ln.template,a.template||(a.template=ln.template=si("<div class='"+Hi+"selector' style='width: #= d.width #px; height: #= d.height #px; top: #= d.offset.top #px; left: #= d.offset.left #px;'><div class='"+Hi+"mask'></div><div class='"+Hi+"mask'></div><div class='"+Hi+"selection'><div class='"+Hi+"selection-bg'></div><div class='"+Hi+"handle "+Hi+"leftHandle'><div></div></div><div class='"+Hi+"handle "+Hi+"rightHandle'><div></div></div></div></div>")),o={left:parseInt(s.css("paddingLeft"),10),right:parseInt(s.css("paddingTop"),10)},a.options=kn({},{width:l.width(),height:d.height(),padding:o,offset:{left:d.x2+o.left,top:d.y1+o.right},from:i.min,to:i.max},i),a.options.visible&&(a.wrapper=r=e(a.template(a.options)).appendTo(s),a.selection=r.find(u+"selection"),a.leftMask=r.find(u+"mask").first(),a.rightMask=r.find(u+"mask").last(),a.leftHandle=r.find(u+"leftHandle"),a.rightHandle=r.find(u+"rightHandle"),a.options.selection={border:{left:parseFloat(a.selection.css("border-left-width"),10),right:parseFloat(a.selection.css("border-right-width"),10)}},a.leftHandle.css("top",(a.selection.height()-a.leftHandle.height())/2),a.rightHandle.css("top",(a.selection.height()-a.rightHandle.height())/2),a.set(a._index(i.from),a._index(i.to)),a.bind(a.events,a.options),a.wrapper[0].style.cssText=a.wrapper[0].style.cssText,a.wrapper.on(Hr,mn(a._mousewheel,a)),vn.UserEvents?a.userEvents=new vn.UserEvents(a.wrapper,{global:!0,stopPropagation:!0,multiTouch:!0,start:mn(a._start,a),move:mn(a._move,a),end:mn(a._end,a),tap:mn(a._tap,a),gesturestart:mn(a._gesturechange,a),gesturechange:mn(a._gesturechange,a)}):a.leftHandle.add(a.rightHandle).removeClass(Hi+"handle"))},events:[io,ro,oo],options:{visible:!0,mousewheel:{zoom:ki},min:Dr,max:Sr},destroy:function(){var e=this,t=e.userEvents;t&&t.destroy(),clearTimeout(e._mwTimeout),e._state=null,e.wrapper.remove()},_rangeEventArgs:function(e){var t=this;return{axis:t.categoryAxis.options,from:t._value(e.from),to:t._value(e.to)}},_start:function(t){var n,i=this,r=i.options,o=e(t.event.target);!i._state&&o&&(i.chart._unsetActivePoint(),i._state={moveTarget:o.parents(".k-handle").add(o).first(),startLocation:t.x?t.x.location:0,range:{from:i._index(r.from),to:i._index(r.to)}},n=i._rangeEventArgs({from:i._index(r.from),to:i._index(r.to)}),i.trigger(io,n)&&(i.userEvents.cancel(),i._state=null))},_move:function(e){if(this._state){var t=this,n=t._state,i=t.options,r=t.categoryAxis.options.categories,o=t._index(i.from),a=t._index(i.to),s=t._index(i.min),l=t._index(i.max),c=n.startLocation-e.x.location,d=n.range,u={from:d.from,to:d.to},h=d.to-d.from,p=n.moveTarget,f=t.wrapper.width()/(r.length-1),g=pn.round(c/f);p&&(e.preventDefault(),p.is(".k-selection, .k-selection-bg")?(d.from=pn.min(pn.max(s,o-g),l-h),d.to=pn.min(d.from+h,l)):p.is(".k-leftHandle")?(d.from=pn.min(pn.max(s,o-g),l-1),d.to=pn.max(d.from+1,d.to)):p.is(".k-rightHandle")&&(d.to=pn.min(pn.max(s+1,a-g),l),d.from=pn.min(d.to-1,d.from)),(d.from!==u.from||d.to!==u.to)&&(t.move(d.from,d.to),t.trigger(ro,t._rangeEventArgs(d))))}},_end:function(){var e=this,t=e._state.range;delete e._state,e.set(t.from,t.to),e.trigger(oo,e._rangeEventArgs(t))},_gesturechange:function(e){if(this._state){var t=this,n=t.chart,i=t._state,r=t.options,o=t.categoryAxis,a=i.range,s=n._toModelCoordinates(e.touches[0].x.location).x,l=n._toModelCoordinates(e.touches[1].x.location).x,c=pn.min(s,l),d=pn.max(s,l);e.preventDefault(),i.moveTarget=null,a.from=o.pointCategoryIndex(new Tn.Point2D(c))||r.min,a.to=o.pointCategoryIndex(new Tn.Point2D(d))||r.max,t.move(a.from,a.to)}},_tap:function(e){var t=this,n=t.options,i=t.chart._eventCoordinates(e),r=t.categoryAxis,o=r.pointCategoryIndex(new Tn.Point2D(i.x,r.box.y1)),a=t._index(n.from),s=t._index(n.to),l=t._index(n.min),c=t._index(n.max),d=s-a,u=a+d/2,h=pn.round(u-o),p={},f=3===e.event.which;t._state||f||(e.preventDefault(),t.chart._unsetActivePoint(),r.options.justified||h--,p.from=pn.min(pn.max(l,a-h),c-d),p.to=pn.min(p.from+d,c),t._start(e),t._state&&(t._state.range=p,t.trigger(ro,t._rangeEventArgs(p)),t._end()))},_mousewheel:function(e){var t,n=this,i=n.options,r=Xn(e);n._start({event:{target:n.selection}}),n._state&&(t=n._state.range,e.preventDefault(),e.stopPropagation(),pn.abs(r)>1&&(r*=Uo),i.mousewheel.reverse&&(r*=-1),n.expand(r)&&n.trigger(ro,{axis:n.categoryAxis.options,delta:r,originalEvent:e,from:n._value(t.from),to:n._value(t.to)}),n._mwTimeout&&clearTimeout(n._mwTimeout),n._mwTimeout=setTimeout(function(){n._end()},zr))},_index:function(e){var t=this,n=t.categoryAxis,i=n.options.categories,r=e;return e instanceof Date&&(r=D(e,i),!n.options.justified&&e>ni(i)&&(r+=1)),r},_value:function(e){var t=this,n=this.categoryAxis,i=n.options.categories,r=e;return t._dateAxis&&(r=e>i.length-1?t.options.max:i[e]),r},_slot:function(e){var t=this,n=this.categoryAxis;return n.getSlot(t._index(e))},move:function(e,t){var n,i,r,o,a=this,s=a.options,l=s.offset,c=s.padding,d=s.selection.border;r=a._slot(e),n=Zn(r.x1-l.left+c.left),a.leftMask.width(n),a.selection.css("left",n),r=a._slot(t),i=Zn(s.width-(r.x1-l.left+c.left)),a.rightMask.width(i),o=s.width-i,o!=s.width&&(o+=d.right),a.rightMask.css("left",o),a.selection.width(pn.max(s.width-(n+i)-d.right,0))},set:function(e,t){var n=this,i=n.options,r=n._index(i.min),o=n._index(i.max);e=ii(n._index(e),r,o),t=ii(n._index(t),e+1,o),i.visible&&n.move(e,t),i.from=n._value(e),i.to=n._value(t)},expand:function(e){var n=this,i=n.options,r=n._index(i.min),o=n._index(i.max),a=i.mousewheel.zoom,s=n._index(i.from),l=n._index(i.to),c={from:s,to:l},d=kn({},c);return n._state&&(c=n._state.range),a!==Xr&&(c.from=ii(ii(s-e,0,l-1),r,o)),a!==mr&&(c.to=ii(ii(l+e,c.from+1,o),r,o)),c.from!==d.from||c.to!==d.to?(n.set(c.from,c.to),!0):t},getValueAxis:function(e){var t,n,i=e.pane.axes,r=i.length;for(t=0;r>t;t++)if(n=i[t],n.options.vertical!==e.options.vertical)return n}}),cn=function(e,t,n){var i,r,o,a=this,s=t.canonicalFields(e),l=t.valueFields(e),c=t.sourceFields(e,s),d=a._seriesFields=[],u=n.query(e.type),h=e.aggregate||u;for(a._series=e,a._binder=t,i=0;s.length>i;i++){if(r=s[i],typeof h===Vr)o=h[r];else{if(0!==i&&!Qn(r,l))break;o=h}o&&d.push({canonicalName:r,name:c[i],transform:Cn(o)?o:sn[o]})}},cn.prototype={aggregatePoints:function(e,t){var n,i,r,o,a,s=this,l=s._bindPoints(e||[]),c=s._series,d=s._seriesFields,u=l.dataItems[0],h={};for(!u||A(u)||un(u)||(a=function(){},a.prototype=u,h=new a),n=0;d.length>n;n++){if(i=d[n],r=s._bindField(l.values,i.canonicalName),o=i.transform(r,c,l.dataItems,t),null!==o&&typeof o===Vr&&!ti(o.length)){h=o;break}ti(o)&&(N(i.name,h),vn.setter(i.name)(h,o))}return h},_bindPoints:function(e){var t,n,i=this,r=i._binder,o=i._series,a=[],s=[];for(t=0;e.length>t;t++)n=e[t],a.push(r.bindPoint(o,n)),s.push(o.data[n]);return{values:a,dataItems:s}},_bindField:function(e,t){var n,i,r,o,a=[],s=e.length;for(n=0;s>n;n++)i=e[n],o=i.valueFields,r=ti(o[t])?o[t]:i.fields[t],a.push(r);return a}},gn(e.easing,{easeOutElastic:function(e,t,n,i){var r=1.70158,o=0,a=i;return 0===e?n:1===e?n+i:(o||(o=.5),a<pn.abs(i)?(a=i,r=o/4):r=o/(2*pn.PI)*pn.asin(i/a),a*pn.pow(2,-10*e)*pn.sin(1.1*(1*e-r)*pn.PI/o)+i+n)}}),Tn.ui.plugin(Qo),j.current.register($t,[vi,Bi,yr,Bo,pi,Po,Di,Ur,Ti,Fo,Ci,Qr,Yr,Ro,dr]),j.current.register(Qt,[eo,to,Si]),j.current.register(Kt,[jr]),j.current.register(Xt,[$i]),q.current.register([vi,Bi,yr,Bo,pi,Po],[Io],[Ai,Fi,Nr,Zi,Ji]),q.current.register([Qr,Yr],[ar,Co],[Ai,Fi,Nr]),q.current.register([Ro,dr],[Io],[Ai,Fi,Nr,go]),n.current.register([vi,Bi,yr,Bo,pi,Po,Ro,dr],{value:xr,color:or,noteText:or,errorLow:Tr,errorHigh:xr}),n.current.register([Qr,Yr],{from:Tr,to:xr,color:or,noteText:or}),q.current.register([eo,to,Si],[Lo,Oo],[Fi,Nr,er,tr,nr,ir]),q.current.register([Si],[Lo,Oo,"size"],[Fi,Ai,Nr]),q.current.register([Di,Ur],["open","high","low","close"],[Ai,Fi,"downColor",Nr]),n.current.register([Di,Ur],{open:xr,high:xr,low:Tr,close:xr,color:or,downColor:or,noteText:or}),q.current.register([Ci],["lower","q1","median","q3","upper","mean","outliers"],[Ai,Fi,Nr]),n.current.register([Ci],{lower:xr,q1:xr,median:xr,q3:xr,upper:xr,mean:xr,outliers:or,color:or,noteText:or}),q.current.register([Ti,Fo],["current","target"],[Ai,Fi,"visibleInLegend",Nr]),n.current.register([Ti,Fo],{current:xr,target:xr,color:or,noteText:or}),q.current.register([jr,$i],[Io],[Ai,Fi,"explode","visibleInLegend","visible"]),kn(Tn,{EQUALLY_SPACED_SERIES:$o,Aggregates:sn,AreaChart:St,AreaSegment:Ct,AxisGroupRangeTracker:Yt,Bar:nt,BarChart:st,BarLabel:G,BubbleChart:Mt,Bullet:ut,BulletChart:dt,CandlestickChart:Pt,Candlestick:It,CategoricalChart:at,CategoricalErrorBar:ft,CategoricalPlotArea:$t,CategoryAxis:Q,ChartContainer:qt,ClusterLayout:Z,Crosshair:on,CrosshairTooltip:an,DateCategoryAxis:K,DateValueAxis:X,DefaultAggregates:n,DonutChart:Vt,DonutPlotArea:Xt,DonutSegment:Nt,ErrorBarBase:pt,ErrorRangeCalculator:ot,Highlight:en,SharedTooltip:rn,Legend:Y,LegendItem:$,LineChart:wt,LinePoint:mt,LineSegment:_t,Pane:jt,PieAnimation:Zt,PieChart:Ot,PieChartMixin:Lt,PiePlotArea:Kt,PieSegment:Ht,PlotAreaBase:Gt,PlotAreaFactory:j,PointEventsMixin:et,RangeBar:lt,RangeBarChart:ct,ScatterChart:At,ScatterErrorBar:gt,ScatterLineChart:Et,Selection:ln,SeriesAggregator:cn,SeriesBinder:q,ShapeElement:Vn,SplineSegment:kt,SplineAreaSegment:Tt,StackWrap:J,Tooltip:nn,OHLCChart:Bt,OHLCPoint:Ft,WaterfallChart:Ut,WaterfallSegment:Wt,XYPlotArea:Qt,addDuration:g,areNumbers:M,axisGroupBox:x,categoriesCount:c,ceilDate:_,countNumbers:E,duration:b,ensureTree:N,indexOf:R,isNumber:A,floorDate:v,filterSeriesByType:B,lteDateIndex:D,evalOptions:P,seriesTotal:V,singleItemOrArray:k,sortDates:z,startOfWeek:m,transpose:O,toDate:p,toTime:f,uniqueDates:H})
  }(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t){t()});