UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

2 lines 170 kB
module.exports=function(t){function e(n){if(i[n])return i[n].exports;var s=i[n]={exports:{},id:n,loaded:!1};return t[n].call(s.exports,s,s.exports,e),s.loaded=!0,s.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}({0:function(t,e,i){t.exports=i(861)},3:function(t,e){t.exports=function(){throw Error("define cannot be used indirect")}},857:function(t,e){t.exports=require("../../kendo.dataviz.core")},859:function(t,e){t.exports=require("../../kendo.drawing")},861:function(t,e,i){var n,s,o;!function(r,define){s=[i(862),i(863),i(859),i(857)],n=r,o="function"==typeof n?n.apply(e,s):n,!(void 0!==o&&(t.exports=o))}(function(){!function(t){function e(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new le(e[i])}function i(t){var e,i,n=t.length,s=0;for(e=0;e<n;e++)i=t[e],et(i)&&s++;return s}function n(t,e){if(null===e)return e;var i=_t(t,!0);return i(e)}function s(t,e,i,n){var o,r,a,h,l;if(void 0===i&&(i={}),void 0===n&&(n=!1),o=i.defaults=i.defaults||{},r=i.depth=i.depth||0,a=!1,i.excluded=i.excluded||[],r>$i)return null;for(h in t)!Pt(h,i.excluded)&&t.hasOwnProperty(h)&&(l=t[h],Rt(l)?(a=!0,n||(t[h]=Tt(l(e),o[h]))):It(l)&&(n||(i.defaults=o[h]),i.depth++,a=s(l,e,i,n)||a,i.depth--));return a}function o(t){var e,i=t.length,n=0;for(e=0;e<i;e++)n=Math.max(n,t[e].data.length);return n}function r(t,e,i,n,s){var o=t.box,r=new ae;return r[e]=o[e+i],r[n]=o[n+s],r}function a(t){for(var e=0;e<t.length;e++)if(yt(t[e].zIndex))return!0}function h(t){var e=t.overlay;return e&&e.gradient&&"none"!==e.gradient}function l(t,e){t.forEach(e)}function c(t,e){var i,n=t.length;for(i=n-1;i>=0;i--)e(t[i],i-n-1)}function u(t){return i(t)===t.length}function p(t){return yt(t)&&null!==t}function d(t){var e,i,n,s=t.series;for(e=0;e<s.length;e++)i=s[e],n=i.data,!n||wt(n[0])||It(n[0])||(i.data=[n])}function g(){return"pane"+Fn++}function f(t,e){null!==e&&t.push(e)}function v(t,e,i){var n,s=e.visible;return yt(s)?s:(n=t.pointVisibility,n?n[i]:void 0)}function x(t){var e,i,n,s=t.data,o=[],r=0,a=0;for(e=0;e<s.length;e++)i=de.current.bindPoint(t,e),n=i.valueFields.value,Dt(n)&&(n=parseFloat(n)),et(n)?(i.visible=v(t,i.fields,e)!==!1,i.value=Math.abs(n),o.push(i),i.visible&&(r+=i.value),0!==n&&a++):o.push(null);return{total:r,points:o,count:a}}function m(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function y(t,e){var i,n,s=[],o=[].concat(e);for(i=0;i<t.length;i++)n=t[i],Pt(n.type,o)&&s.push(n);return s}function _(t,e,i){var n,s;return null===e?e:(n="_date_"+t,s=e[n],s||(s=Nt(i,_t(t,!0)(e)),e[n]=s),s)}function w(t,e){var i=t.type,n=e instanceof Date;return!i&&n||m(i,vt)}function A(t){return 1===t.length?t[0]:t}function b(t){return t.missingValues?t.missingValues:Dn.test(t.type)||t.stack?Le:Me}function S(t,e){var i,n=de.current.bindPoint(t,null,e),s=n.valueFields;for(i in s)if(Q.convertableToNumber(s[i]))return!0}function C(t){var e,i,n=t.start,s=t.dir,o=t.min,r=t.max,a=t.getter,h=t.hasItem,l=t.series,c=n;do c+=s,h(c)&&(i=a(c),e=S(l,i.item));while(o<=c&&c<=r&&!e);if(e)return i}function k(t,e,i,n,s){var o,r,a,h,l,c=e.min,u=e.max,p=c>0&&c<i,d=u+1<i;(p||d)&&(o=b(t),o!==Me?(p&&(r=n(c-1)),d&&(a=n(u+1))):(p&&(h=n(c-1),l=S(t,h.item),r=l?h:C({start:c,dir:-1,min:0,max:i-1,getter:n,hasItem:s,series:t})),d&&(h=n(u+1),l=S(t,h.item),a=l?h:C({start:u,dir:1,min:0,max:i-1,getter:n,hasItem:s,series:t}))),r&&(t._outOfRangeMinPoint=r),a&&(t._outOfRangeMaxPoint=a))}function P(t){var e,i,n,s=t.length;if(s>0)for(i=0;i<s;i++)n=t[i].contentBox(),e?e.wrap(n):e=n.clone();return e||new St}function R(t,e){var i,n;for(i=0;i<t.length;i++)if(n=t[i],n&&n.pane===e)return n}function T(t){return""===t||null===t||"none"===t||"transparent"===t||!yt(t)}function I(t,e,i){var n,s=e,o=t;if(t.indexOf(".")>-1){for(n=t.split(".");n.length>1;)o=n.shift(),yt(s[o])||(s[o]={}),s=s[o];o=n.shift()}s[o]=i}function E(t,e,i){var n=[].concat(e instanceof qt?t.categoryAxis:t.valueAxis);Et(n[e.axisIndex],i)}function V(t,e,i){return Ut(t,function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e})}function L(){this._defaultPrevented=!0}function M(t,e){var i=(e||"").toLowerCase(),n=t.event,s="none"===i&&!(n.ctrlKey||n.shiftKey||n.altKey)||n[i+"Key"];return s}function B(t){var e,i,n={};for(e=0;e<t.length;e++)i=t[e],i.axis.options.name&&(n[i.axis.options.name]={min:i.range.min,max:i.range.max});return n}function O(t){var e=document.createElement("div");return t&&(e.className=t),e}function z(t){for(var e=t;e&&!jt(e,"k-handle");)e=e.parentNode;return e}function H(t,e,i,n){var s=[].concat(i?t.yAxis:t.xAxis)[e];Et(s,n)}function F(t){var e,i,n=Q.rad(t),s=Xt(Math.sin(n),xt),o=Xt(Math.cos(n),xt);return e=Math.abs(s)>Ms?rt:o<0?gt:lt,i=Math.abs(s)<Ls?rt:s<0?ht:at,{horizontal:e,vertical:i}}function D(t,e,i,n){var s,o,r=(n.x-i.x)*(t.y-i.y)-(n.y-i.y)*(t.x-i.x),a=(n.y-i.y)*(e.x-t.x)-(n.x-i.x)*(e.y-t.y);return 0!==a&&(o=r/a,s=new bt(t.x+o*(e.x-t.x),t.y+o*(e.y-t.y))),s}function N(t,e){return t.value.x-e.value.x}function G(t){var e,i,n=mo;for(e=0;e<n.length;e++)i=n[e]+"Axes",t[i]&&(t[n[e]+"Axis"]=t[i],delete t[i])}function q(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function W(t,e){function i(t){var e=(t||{}).color||s.color,i=Et({},a,a[n],s,s[n],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete i[n],i}var n,s,o,r,a=(e||{}).axisDefaults||{};for(r=0;r<mo.length;r++)n=mo[r]+"Axis",s=t.axisDefaults||{},o=[].concat(t[n]),o=o.map(i),t[n]=o.length>1?o:o[0]}function X(t,e){var i,n,s,o=t.series,r=o.length,a=t.seriesDefaults,h=Et({},t.seriesDefaults),l=e?Et({},e.seriesDefaults):{},c=Et({},l);for(Z(h),Z(c),i=0;i<r;i++)n=o[i].type||t.seriesDefaults.type,s=Et({data:[]},c,l[n],{tooltip:t.tooltip},h,a[n]),o[i]._defaults=s,o[i]=Et({},s,o[i]),o[i].data=o[i].data||[]}function Z(t){delete t.bar,delete t.column,delete t.rangeColumn,delete t.line,delete t.verticalLine,delete t.pie,delete t.donut,delete t.area,delete t.verticalArea,delete t.scatter,delete t.scatterLine,delete t.bubble,delete t.candlestick,delete t.ohlc,delete t.boxPlot,delete t.bullet,delete t.verticalBullet,delete t.polarArea,delete t.polarLine,delete t.radarArea,delete t.radarLine,delete t.waterfall}function U(t){var e,i,n,s={};for(e=0;e<t.length;e++)i=t[e],n=i.options.name,n&&(s[n]=i.range());return s}function Y(t,e){void 0===e&&(e=Q.dateComparer);for(var i=1,n=t.length;i<n;i++)if(e(t[i],t[i-1])<0){t.sort(e);break}return t}function j(t,e){var i,n,s,o;for(void 0===e&&(e=Q.dateComparer),i=Y(t,e),n=i.length,s=n>0?[i[0]]:[],o=1;o<n;o++)0!==e(i[o],Vt(s))&&s.push(i[o]);return s}function K(t){var e,i,n,s,o=t.length,r=[];for(e=0;e<o;e++)for(i=t[e],n=i.length,s=0;s<n;s++)r[s]=r[s]||[],r[s].push(i[s]);return r}function $(t,e){var i,n,s,o;for(i in e)!Pt(i,So)&&e.hasOwnProperty(i)&&(n=e[i],s=t[i],yt(s)&&(o=null===n,o||!yt(n)?(delete t[i],o&&delete e[i]):s&&It(n)&&It(s)&&$(s,n)))}function J(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}var Q,tt,et,it,nt,st,ot,rt,at,ht,lt,ct,ut,pt,dt,gt,ft,vt,xt,mt,yt,_t,wt,At,bt,St,Ct,kt,Pt,Rt,Tt,It,Et,Vt,Lt,Mt,Bt,Ot,zt,Ht,Ft,Dt,Nt,Gt,qt,Wt,Xt,Zt,Ut,Yt,jt,Kt,$t,Jt,Qt,te,ee,ie,ne,se,oe,re,ae,he,le,ce,ue,pe,de,ge,fe,ve,xe,me,ye,_e,we,Ae,be,Se,Ce,ke,Pe,Re,Te,Ie,Ee,Ve,Le,Me,Be,Oe,ze,He,Fe,De,Ne,Ge,qe,We,Xe,Ze,Ue,Ye,je,Ke,$e,Je,Qe,ti,ei,ii,ni,si,oi,ri,ai,hi,li,ci,ui,pi,di,gi,fi,vi,xi,mi,yi,_i,wi,Ai,bi,Si,Ci,ki,Pi,Ri,Ti,Ii,Ei,Vi,Li,Mi,Bi,Oi,zi,Hi,Fi,Di,Ni,Gi,qi,Wi,Xi,Zi,Ui,Yi,ji,Ki,$i,Ji,Qi,tn,en,nn,sn,on,rn,an,hn,ln,cn,un,pn,dn,gn,fn,vn,xn,mn,yn,_n,wn,An,bn,Sn,Cn,kn,Pn,Rn,Tn,In,En,Vn,Ln,Mn,Bn,On,zn,Hn,Fn,Dn,Nn,Gn,qn,Wn,Xn,Zn,Un,Yn,jn,Kn,$n,Jn,Qn,ts,es,is,ns,ss,os,rs,as,hs,ls,cs,us,ps,ds,gs,fs,vs,xs,ms,ys,_s,ws,As,bs,Ss,Cs,ks,Ps,Rs,Ts,Is,Es,Vs,Ls,Ms,Bs,Os,zs,Hs,Fs,Ds,Ns,Gs,qs,Ws,Xs,Zs,Us,Ys,js,Ks,$s,Js,Qs,to,eo,io,no,so,oo,ro,ao,ho,lo,co,uo,po,go,fo,vo,xo,mo,yo,_o,wo,Ao,bo,So;window.kendo.dataviz=window.kendo.dataviz||{},Q=kendo.dataviz,tt=Q.Class,et=Q.isNumber,it=Q.constants,nt=it.MAX_VALUE,st=it.MIN_VALUE,ot=it.VALUE,rt=it.CENTER,at=it.TOP,ht=it.BOTTOM,lt=it.LEFT,ct=it.WHITE,ut=it.CIRCLE,pt=it.X,dt=it.Y,gt=it.RIGHT,ft=it.BLACK,vt=it.DATE,xt=it.DEFAULT_PRECISION,mt=it.ARC,yt=Q.defined,_t=Q.getter,wt=Q.isArray,At=Q.ChartElement,bt=Q.Point,St=Q.Box,Ct=Q.alignPathToPixel,kt=Q.setDefaultOptions,Pt=Q.inArray,Rt=Q.isFunction,Tt=Q.valueOrDefault,It=Q.isObject,Et=Q.deepExtend,Vt=Q.last,Lt=Q.eventElement,Mt=Q.getTemplate,Bt=Q.TextBox,Ot=Q.ShapeElement,zt=Q.getSpacing,Ht=Q.CurveProcessor,Ft=Q.append,Dt=Q.isString,Nt=Q.parseDate,Gt=Q.styleValue,qt=Q.CategoryAxis,Wt=Q.BoxElement,Xt=Q.round,Zt=Q.limitValue,Ut=Q.grep,Yt=Q.elementStyles,jt=Q.hasClasses,Kt=Q.bindEvents,$t=Q.services,Jt=Q.unbindEvents,Qt=kendo.support,te=kendo.drawing,ee=te.Path,ie=te.Animation,ne=te.AnimationFactory,se=te.Group,oe=kendo.Color,re=kendo.geometry,ae=re.Point,he=re.transform,le=tt.extend({init:function(t){this._axis=t,this.options=t.options},value:function(t){var e=this._axis,i=e.getCategory?e.getCategory(t):e.getValue(t);return i},slot:function(t,e,i){return void 0===i&&(i=!0),this._axis.slot(t,e,i)},range:function(){return this._axis.range()},valueRange:function(){return this._axis.valueRange()}}),ce=kendo.Class.extend({init:function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t},findAxisByName:function(t){return e(t,this._pane.axes)}}),ue=tt.extend({init:function(t){this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}}),pe={min:function(t){var e,i,n=t.length,s=nt;for(e=0;e<n;e++)i=t[e],et(i)&&(s=Math.min(s,i));return s===nt?t[0]:s},max:function(t){var e,i,n=t.length,s=st;for(e=0;e<n;e++)i=t[e],et(i)&&(s=Math.max(s,i));return s===st?t[0]:s},sum:function(t){var e,i,n=t.length,s=0;for(e=0;e<n;e++)i=t[e],et(i)&&(s+=i);return s},sumOrNull:function(t){var e=null;return i(t)&&(e=pe.sum(t)),e},count:function(t){var e,i,n=t.length,s=0;for(e=0;e<n;e++)i=t[e],null!==i&&yt(i)&&s++;return s},avg:function(t){var e=i(t),n=t[0];return e>0&&(n=pe.sum(t)/e),n},first:function(t){var e,i,n=t.length;for(e=0;e<n;e++)if(i=t[e],null!==i&&yt(i))return i;return t[0]}},de=tt.extend({init:function(){this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}},register:function(t,e,i){var n,s,o=this;for(void 0===e&&(e=[ot]),void 0===i&&(i={}),n=0;n<t.length;n++)s=t[n],o._valueFields[s]=e,o._otherFields[s]=i,o._nullValue[s]=o._makeValue(e,null),o._undefinedValue[s]=o._makeValue(e,void 0)},canonicalFields:function(t){return this.valueFields(t).concat(this.otherFields(t))},valueFields:function(t){return this._valueFields[t.type]||[ot]},otherFields:function(t){return this._otherFields[t.type]||[ot]},bindPoint:function(t,e,i){var n,s,o,r,a,h=t.data,l=yt(i)?i:h[e],c={valueFields:{value:l}},u=this.valueFields(t),p=this._otherFields[t.type];return null===l?s=this._nullValue[t.type]:yt(l)?Array.isArray(l)?(o=l.slice(u.length),s=this._bindFromArray(l,u),n=this._bindFromArray(o,p)):"object"==typeof l&&(r=this.sourceFields(t,u),a=this.sourceFields(t,p),s=this._bindFromObject(l,u,r),n=this._bindFromObject(l,p,a)):s=this._undefinedValue[t.type],yt(s)&&(1===u.length?c.valueFields.value=s[u[0]]:c.valueFields=s),c.fields=n||{},c},_makeValue:function(t,e){var i,n,s={},o=t.length;for(i=0;i<o;i++)n=t[i],s[n]=e;return s},_bindFromArray:function(t,e){var i,n,s={};if(e)for(i=Math.min(e.length,t.length),n=0;n<i;n++)s[e[n]]=t[n];return s},_bindFromObject:function(t,e,i){var s,o,r,a,h;if(void 0===i&&(i=e),s={},e)for(o=e.length,r=0;r<o;r++)a=e[r],h=i[r],null!==h&&(s[a]=n(h,t));return s},sourceFields:function(t,e){var i,n,s,o,r=[];if(e)for(i=e.length,n=0;n<i;n++)s=e[n],o=s===ot?"field":s+"Field",r.push(null!==t[o]?t[o]||s:null);return r}}),de.current=new de,ge="stderr",fe="stddev",ve=/percent(?:\w*)\((\d+)\)/,xe=RegExp("^"+fe+"(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),me=tt.extend({init:function(t,e,i){this.initGlobalRanges(t,e,i)},initGlobalRanges:function(t,e,i){var n,s,o,r,a,h=e.data,l=xe.exec(t);l?(this.valueGetter=this.createValueGetter(e,i),n=this.getAverage(h),s=this.getStandardDeviation(h,n,!1),o=l[1]?parseFloat(l[1]):1,r={low:n.value-s*o,high:n.value+s*o},this.globalRange=function(){return r}):t.indexOf&&t.indexOf(ge)>=0&&(this.valueGetter=this.createValueGetter(e,i),a=this.getStandardError(h,this.getAverage(h)),this.globalRange=function(t){return{low:t-a,high:t+a}})},createValueGetter:function(t,e){var i,n,s,o=t.data,r=de.current,a=r.valueFields(t),h=yt(o[0])?o[0]:{};return wt(h)?(n=e?a.indexOf(e):0,i=_t("["+n+"]")):et(h)?i=_t():typeof h===it.OBJECT&&(s=r.sourceFields(t,a),i=_t(s[a.indexOf(e)])),i},getErrorRange:function(t,e){var i,n,s,o;if(!yt(e))return null;if(this.globalRange)return this.globalRange(t);if(wt(e))i=t-e[0],n=t+e[1];else if(et(s=parseFloat(e)))i=t-s,n=t+s;else{if(!(s=ve.exec(e)))throw Error("Invalid ErrorBar value: "+e);o=t*(parseFloat(s[1])/100),i=t-Math.abs(o),n=t+Math.abs(o)}return{low:i,high:n}},getStandardError:function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},getStandardDeviation:function(t,e,i){var n,s,o=this,r=t.length,a=i?e.count-1:e.count,h=0;for(n=0;n<r;n++)s=o.valueGetter(t[n]),et(s)&&(h+=Math.pow(s-e.value,2));return Math.sqrt(h/a)},getAverage:function(t){var e,i,n=this,s=t.length,o=0,r=0;for(e=0;e<s;e++)i=n.valueGetter(t[e]),et(i)&&(o+=i,r++);return{value:o/r,count:r}}}),ye=Qt.browser||{},_e=600,we="fadeIn",Ae="glass",be=.8,Se=5,Ce=ye.msie?.001:0,ke="errorLow",Pe="errorHigh",Re="xErrorLow",Te="xErrorHigh",Ie="yErrorLow",Ee="yErrorHigh",Ve=8,Le="zero",Me="interpolate",Be="gap",Oe="above",ze="below",He="smooth",Fe="step",De="area",Ne="bar",Ge="boxPlot",qe="bubble",We="bullet",Xe="candlestick",Ze="column",Ue="donut",Ye="funnel",je="horizontalWaterfall",Ke="line",$e="ohlc",Je="pie",Qe="polarArea",ti="polarLine",ei="polarScatter",ii="radarArea",ni="radarColumn",si="radarLine",oi="rangeArea",ri="rangeBar",ai="rangeColumn",hi="scatter",li="scatterLine",ci="verticalArea",ui="verticalBoxPlot",pi="verticalBullet",di="verticalLine",gi="verticalRangeArea",fi="waterfall",vi=[Ne,Ze,$e,Xe,Ge,ui,We,ai,ri,fi,je],xi="legendItemClick",mi="legendItemHover",yi="legendItemLeave",_i="seriesClick",wi="seriesHover",Ai="seriesOver",bi="seriesLeave",Si="plotAreaClick",Ci="plotAreaHover",ki="plotAreaLeave",Pi="drag",Ri="dragEnd",Ti="dragStart",Ii="zoomStart",Ei="zoom",Vi="zoomEnd",Li="selectStart",Mi="select",Bi="selectEnd",Oi="render",zi="showTooltip",Hi="hideTooltip",Fi="paneRender",Di="log",Ni="category",Gi="insideEnd",qi="insideBase",Wi="outsideEnd",Xi="DOMMouseScroll mousewheel",Zi=150,Ui={INITIAL_ANIMATION_DURATION:_e,FADEIN:we,LEGEND_ITEM_CLICK:xi,LEGEND_ITEM_HOVER:mi,LEGEND_ITEM_LEAVE:yi,SERIES_CLICK:_i,SERIES_HOVER:wi,SERIES_OVER:Ai,SERIES_LEAVE:bi,GLASS:Ae,BORDER_BRIGHTNESS:be,TOOLTIP_OFFSET:Se,START_SCALE:Ce,ERROR_LOW_FIELD:ke,ERROR_HIGH_FIELD:Pe,X_ERROR_LOW_FIELD:Re,X_ERROR_HIGH_FIELD:Te,Y_ERROR_LOW_FIELD:Ie,Y_ERROR_HIGH_FIELD:Ee,LINE_MARKER_SIZE:Ve,INTERPOLATE:Me,ZERO:Le,SMOOTH:He,STEP:Fe,CATEGORY:Ni,FUNNEL:Ye,BAR:Ne,CANDLESTICK:Xe,PIE:Je,COLUMN:Ze,AREA:De,VERTICAL_BULLET:pi,BOX_PLOT:Ge,OHLC:$e,WATERFALL:fi,LINE:Ke,BULLET:We,VERTICAL_LINE:di,VERTICAL_AREA:ci,RANGE_AREA:oi,VERTICAL_RANGE_AREA:gi,RANGE_COLUMN:ai,VERTICAL_BOX_PLOT:ui,RANGE_BAR:ri,HORIZONTAL_WATERFALL:je,SCATTER:hi,SCATTER_LINE:li,BUBBLE:qe,RADAR_AREA:ii,RADAR_LINE:si,RADAR_COLUMN:ni,POLAR_LINE:ti,POLAR_AREA:Qe,POLAR_SCATTER:ei,RENDER:Oi,PLOT_AREA_CLICK:Si,PLOT_AREA_HOVER:Ci,PLOT_AREA_LEAVE:ki,LOGARITHMIC:Di,DRAG:Pi,DRAG_START:Ti,DRAG_END:Ri,ZOOM_START:Ii,ZOOM:Ei,ZOOM_END:Vi,SELECT_START:Li,SELECT:Mi,SELECT_END:Bi,PANE_RENDER:Fi,GAP:Be,DONUT:Ue,INSIDE_END:Gi,INSIDE_BASE:qi,OUTSIDE_END:Wi,MOUSEWHEEL:Xi,MOUSEWHEEL_DELAY:Zi,SHOW_TOOLTIP:zi,HIDE_TOOLTIP:Hi,EQUALLY_SPACED_SERIES:vi,ABOVE:Oe,BELOW:ze},Yi=4,ji=At.extend({init:function(t,e,i,n,s,o){At.fn.init.call(this,o),this.low=t,this.high=e,this.isVertical=i,this.chart=n,this.series=s},reflow:function(t){var e,i=this.options.endCaps,n=this.isVertical,s=this.getAxis(),o=s.getSlot(this.low,this.high),r=t.center(),a=this.getCapsWidth(t,n),h=n?r.x:r.y,l=h-a,c=h+a;n?(e=[new bt(r.x,o.y1),new bt(r.x,o.y2)],i&&e.push(new bt(l,o.y1),new bt(c,o.y1),new bt(l,o.y2),new bt(c,o.y2)),this.box=new St(l,o.y1,c,o.y2)):(e=[new bt(o.x1,r.y),new bt(o.x2,r.y)],i&&e.push(new bt(o.x1,l),new bt(o.x1,c),new bt(o.x2,l),new bt(o.x2,c)),this.box=new St(o.x1,l,o.x2,c)),this.linePoints=e},getCapsWidth:function(t,e){var i=e?t.width():t.height(),n=Math.min(Math.floor(i/2),Yi)||Yi;return n},createVisual:function(){var t=this,e=this.options,i=e.visual;i?this.visual=i({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:e.endCaps,color:e.color,line:e.line},createVisual:function(){t.createDefaultVisual();var e=t.visual;return delete t.visual,e}}):this.createDefaultVisual()},createDefaultVisual:function(){var t,e,i=this,n=this,s=n.options,o=n.linePoints,r={stroke:{color:s.color,width:s.line.width,dashType:s.line.dashType}};for(At.fn.createVisual.call(this),t=0;t<o.length;t+=2)e=new ee(r).moveTo(o[t].x,o[t].y).lineTo(o[t+1].x,o[t+1].y),Ct(e),i.visual.append(e)}}),kt(ji,{animation:{type:we,delay:_e},endCaps:!0,line:{width:2},zIndex:1}),Ki=ji.extend({getAxis:function(){var t=this.chart.seriesValueAxis(this.series);return t}}),$i=5,Ji=At.extend({init:function(t,e){At.fn.init.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.categoryAxis=t.seriesCategoryAxis(e.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()},render:function(){this.traverseDataPoints(this.addValue.bind(this))},pointOptions:function(t,e){var i,n=this.seriesOptions[e];return n||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=n=Et({},i,{vertical:!this.options.invertAxes},t)),n},plotValue:function(t){var e,i,n,s,o,r,a,h;if(!t)return 0;if(this.options.isStacked100&&et(t.value)){for(e=t.categoryIx,i=this.categoryPoints[e],n=[],s=0,o=0;o<i.length;o++)if(r=i[o]){if(a=t.series.stack,h=r.series.stack,a&&h&&a.group!==h.group)continue;et(r.value)&&(s+=Math.abs(r.value),n.push(Math.abs(r.value)))}if(s>0)return t.value/s}return t.value},plotRange:function(t,e){var i,n,s,o,r,a,h,l,c,u,p,d,g,f=this;if(void 0===e&&(e=0),i=this.categoryPoints[t.categoryIx],this.options.isStacked){for(n=this.plotValue(t),s=n>=0,o=e,r=!1,a=0;a<i.length&&(h=i[a],t!==h);a++){if(l=t.series.stack,c=h.series.stack,l&&c){if(typeof l===it.STRING&&l!==c)continue;if(l.group&&l.group!==c.group)continue}u=f.plotValue(h),(u>=0&&s||u<0&&!s)&&(o+=u,n+=u,r=!0,f.options.isStacked100&&(n=Math.min(n,1)))}return r&&(o-=e),[o,n]}return p=t.series,d=this.seriesValueAxis(p),g=this.categoryAxisCrossingValue(d),[g,Q.convertableToNumber(t.value)?t.value:g]},stackLimits:function(t,e){var i,n,s,o,r,a=this,h=nt,l=st;for(i=0;i<this.categoryPoints.length;i++)if(n=a.categoryPoints[i])for(s=0;s<n.length;s++)o=n[s],o&&(o.series.stack!==e&&o.series.axis!==t||(r=a.plotRange(o,0)[1],yt(r)&&isFinite(r)&&(l=Math.max(l,r),h=Math.min(h,r))));return{min:h,max:l}},updateStackRange:function(){var t,e,i,n,s,o,r=this,a=this.options,h=a.isStacked,l=a.series,c={};if(h)for(t=0;t<l.length;t++)e=l[t],i=e.axis,n=i+e.stack,s=c[n],s||(s=r.stackLimits(i,e.stack),o=r.errorTotals,o&&(o.negative.length&&(s.min=Math.min(s.min,Q.sparseArrayLimits(o.negative).min)),o.positive.length&&(s.max=Math.max(s.max,Q.sparseArrayLimits(o.positive).max))),s.min!==nt||s.max!==st?c[n]=s:s=null),s&&(r.valueAxisRanges[i]=s)},addErrorBar:function(t,e,i){var n,s=t.value,o=t.series,r=t.seriesIx,a=t.options.errorBars,h=e.fields[ke],l=e.fields[Pe];et(h)&&et(l)?n={low:h,high:l}:a&&yt(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[r]=this.seriesErrorRanges[r]||new me(a.value,o,ot),n=this.seriesErrorRanges[r].getErrorRange(s,a.value)),n&&(t.low=n.low,t.high=n.high,this.addPointErrorBar(t,i))},addPointErrorBar:function(t,e){var i,n,s,o=!this.options.invertAxes,r=t.options.errorBars,a=t.series,h=t.low,l=t.high;this.options.isStacked?(i=this.stackedErrorRange(t,e),h=i.low,l=i.high):(n={categoryIx:e,series:a},this.updateRange({value:h},n),this.updateRange({value:l},n)),s=new Ki(h,l,o,this,a,r),t.errorBars=[s],t.append(s)},stackedErrorRange:function(t,e){var i=this.plotRange(t,0)[1]-t.value,n=t.low+i,s=t.high+i;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},n<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,n)),s>0&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,s)),{low:n,high:s}},addValue:function(e,i){var n,s,o=i.categoryIx,r=i.series,a=i.seriesIx,h=this.categoryPoints[o];h||(this.categoryPoints[o]=h=[]),n=this.seriesPoints[a],n||(this.seriesPoints[a]=n=[]),s=this.createPoint(e,i),s&&(t.extend(s,i),s.owner=this,s.noteText=e.fields.noteText,yt(s.dataItem)||(s.dataItem=r.data[o]),this.addErrorBar(s,e,o)),this.points.push(s),n.push(s),h.push(s),this.updateRange(e.valueFields,i)},evalPointOptions:function(t,e,i,n,o,r){var a,h={defaults:o._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},l=this._evalSeries[r];return yt(l)||(this._evalSeries[r]=l=s(t,{},h,!0)),a=t,l&&(a=Et({},a),s(a,{value:e,category:i,index:n,series:o,dataItem:o.data[n]},h)),a},updateRange:function(t,e){var i=e.series.axis,n=t.value,s=this.valueAxisRanges[i];isFinite(n)&&null!==n&&(s=this.valueAxisRanges[i]=s||{min:nt,max:st},s.min=Math.min(s.min,n),s.max=Math.max(s.max,n))},seriesValueAxis:function(t){var e=this.plotArea,i=t.axis,n=i?e.namedValueAxes[i]:e.valueAxis;if(!n)throw Error("Unable to locate value axis with name "+i);return n},reflow:function(t){var e=this,i=this.categorySlots=[],n=this.points,s=this.categoryAxis,o=0;this.traverseDataPoints(function(t,r){var a,h,l,c=r.categoryIx,u=r.series,p=e.seriesValueAxis(u),d=n[o++],g=i[c];g||(i[c]=g=e.categorySlot(s,c,p)),d&&(a=e.plotRange(d,p.startValue()),h=e.valueSlot(p,a),h?(l=e.pointSlot(g,h),d.aboveAxis=e.aboveAxis(d,p),d.stackValue=a[1],e.options.isStacked100&&(d.percentage=e.plotValue(d)),e.reflowPoint(d,l)):d.visible=!1)}),this.reflowCategories(i),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},valueSlot:function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},limitPoints:function(){var t,e=this,i=this.categoryPoints,n=i[0].concat(Vt(i));for(t=0;t<n.length;t++)n[t]&&e.limitPoint(n[t])},limitPoint:function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},aboveAxis:function(t,e){var i=this.categoryAxisCrossingValue(e),n=t.value;return e.options.reverse?n<i:n>=i},categoryAxisCrossingValue:function(t){var e=this.categoryAxis,i=t.options,n=[].concat(i.axisCrossingValues||i.axisCrossingValue);return n[e.axisIndex||0]||0},reflowPoint:function(t,e){t.reflow(e)},reflowCategories:function(){},pointSlot:function(t,e){var i=this.options,n=i.invertAxes,s=n?e:t,o=n?t:e;return new St(s.x1,o.y1,s.x2,o.y2)},categorySlot:function(t,e){return t.getSlot(e)},traverseDataPoints:function(t){var e,i,n,s,r,a,h,l=this,c=this.options.series,u=o(c),p=c.length;for(e=0;e<p;e++)l._outOfRangeCallback(c[e],"_outOfRangeMinPoint",e,t);for(i=0;i<u;i++)for(n=0;n<p;n++)s=c[n],r=l.categoryAxis.categoryAt(i),a=l._bindPoint(s,n,i),t(a,{category:r,categoryIx:i,series:s,seriesIx:n});for(h=0;h<p;h++)l._outOfRangeCallback(c[h],"_outOfRangeMaxPoint",h,t)},_outOfRangeCallback:function(t,e,i,n){var s,o,r=t[e];r&&(s=r.categoryIx,o=this._bindPoint(t,i,s,r.item),n(o,{category:r.category,categoryIx:s,series:t,seriesIx:i,dataItem:r.item}))},_bindPoint:function(t,e,i,n){var s,o;return this._bindCache||(this._bindCache=[]),s=this._bindCache[e],s||(s=this._bindCache[e]=[]),o=s[i],o||(o=s[i]=de.current.bindPoint(t,i,n)),o},formatPointValue:function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},pointValue:function(t){return t.valueFields.value}}),kt(Ji,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0}),Qi={click:function(t,e){return t.trigger(_i,this.eventArgs(e))},hover:function(t,e){return t.trigger(wi,this.eventArgs(e))},over:function(t,e){return t.trigger(Ai,this.eventArgs(e))},out:function(t,e){return t.trigger(bi,this.eventArgs(e))},eventArgs:function(t){return{value:this.value,percentage:this.percentage,stackValue:this.stackValue,category:this.category,series:this.series,dataItem:this.dataItem,runningTotal:this.runningTotal,total:this.total,element:Lt(t),originalEvent:t,point:this}}},tn={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;t.visible!==!1&&yt(e)&&null!==e&&(this.note=new Q.Note({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},en=At.extend({init:function(t,e){At.fn.init.call(this),this.value=t,this.options=e,this.aboveAxis=Tt(this.options.aboveAxis,!0),this.tooltipTracking=!0},render:function(){var t,e,i,n=this.options,s=n.markers,o=n.labels;this._rendered||(this._rendered=!0,s.visible&&s.size&&(this.marker=this.createMarker(),this.append(this.marker)),o.visible&&(t=Mt(o),e=this.pointData(),i=this.value,t?i=t(e):o.format&&(i=this.formatValue(o.format)),this.label=new Bt(i,Et({align:rt,vAlign:rt,margin:{left:5,right:5},zIndex:Tt(o.zIndex,this.series.zIndex)},o),e),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},markerBorder:function(){var t=this.options.markers,e=t.background,i=Et({color:this.color},t.border);return yt(i.color)||(i.color=new oe(e).brightness(be).toHex()),i},createVisual:function(){},createMarker:function(){var t=this.options.markers,e=new Ot({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:t.opacity,zIndex:Tt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});return e},markerBox:function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},reflow:function(t){var e,i,n,s,o=this,r=this,a=r.options,h=r.aboveAxis,l=a.vertical;if(this.render(),this.box=t,e=t.clone(),l?h?e.y1-=e.height():e.y2+=e.height():h?e.x1+=e.width():e.x2-=e.width(),this._childBox=e,this.marker&&this.marker.reflow(e),this.reflowLabel(e),this.errorBars)for(i=0;i<this.errorBars.length;i++)o.errorBars[i].reflow(e);this.note&&(n=this.markerBox(),a.markers.visible&&a.markers.size||(s=n.center(),n=new St(s.x,s.y,s.x,s.y)),this.note.reflow(n))},reflowLabel:function(t){var e=this,i=e.options,n=e.label,s=i.labels.position;n&&(s=s===Oe?at:s,s=s===ze?ht:s,n.reflow(t),n.box.alignTo(this.markerBox(),s),n.reflow(n.box))},createHighlight:function(){var t=this.options.highlight.markers,e=this.markerBorder().color,i=this.options.markers,n=i.size+(i.border.width||0)+(t.border.width||0),s=new Ot({type:i.type,width:n,height:n,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:Tt(t.border.opacity,1)},opacity:Tt(t.opacity,1)});return s.reflow(this._childBox),s.getElement()},highlightVisual:function(){return(this.marker||{}).visual},highlightVisualArgs:function(){var t,e,i,n,s,o=this.marker;return o?(e=o.paddingBox.toRect(),t=o.visual):(i=this.options.markers.size,n=i/2,s=this.box.center(),e=new re.Rect([s.x-n,s.y-n],[i,i])),{options:this.options,rect:e,visual:t}},tooltipAnchor:function(){var t,e,i,n,s=this.markerBox(),o=this.owner.pane.clipBox(),r=!o||o.overlaps(s);if(r)return t=s.x2+Se,e=lt,this.aboveAxis?(i=s.y1,n=ht):(i=s.y2,n=at),{point:new bt(t,i),align:{horizontal:e,vertical:n}}},formatValue:function(t){return this.owner.formatPointValue(this,t)},overlapsBox:function(t){var e=this.markerBox();return e.overlaps(t)},unclipElements:function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},pointData:function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}}}),en.prototype.defaults={vertical:!0,markers:{visible:!0,background:ct,size:Ve,type:ut,border:{width:2},opacity:1},labels:{visible:!1,position:Oe,margin:zt(3),padding:zt(4),animation:{type:we,delay:_e}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:it.HIGHLIGHT_ZINDEX},errorBars:{line:{width:1}}},Et(en.prototype,Qi),Et(en.prototype,tn),nn=At.extend({init:function(t,e,i){At.fn.init.call(this),this.linePoints=t,this.series=e,this.seriesIx=i},points:function(){return this.toGeometryPoints(this.linePoints)},toGeometryPoints:function(t){var e,i,n=[];for(e=0,i=t.length;e<i;e++)t[e]&&t[e].visible!==!1&&n.push(t[e]._childBox.toRect().center());return n},createVisual:function(){var t=this,e=this.series.visual;e?(this.visual=e({points:this.toGeometryPoints(this.linePoints),series:this.series,sender:this.getSender(),createVisual:function(){return t.segmentVisual(),t.visual}}),this.visual&&!yt(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},segmentVisual:function(){var t,e=this,i=e.options,n=e.series,s=n.color,o=n._defaults;Rt(s)&&o&&(s=o.color),t=ee.fromPoints(this.points(),{stroke:{color:s,width:n.width,opacity:n.opacity,dashType:n.dashType},zIndex:n.zIndex}),i.closed&&t.close(),this.visual=t},aliasFor:function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)}}),kt(nn,{closed:!1}),sn={calculateStepPoints:function(t){var e,i,n,s=this.parent.plotArea.seriesCategoryAxis(this.series),o=s.options,a=o.justified,h=o.vertical,l=o.reverse,c=h?pt:dt,u=h?dt:pt,p=l?2:1,d=p,g=r(t[0],c,p,u,d),f=[g];for(e=1;e<t.length;e++)i=r(t[e],c,p,u,d),g[c]!==i[c]&&(n=new ae,n[c]=g[c],n[u]=i[u],f.push(n,i)),g=i;return a?g!==Vt(f)&&f.push(g):f.push(r(Vt(t),c,p,u,l?1:2)),f}},on=nn.extend({points:function(){return this.calculateStepPoints(this.linePoints)}}),Et(on.prototype,sn),rn=nn.extend({segmentVisual:function(){var t,e,i,n=this.series,s=n._defaults,o=n.color;Rt(o)&&s&&(o=s.color),t=new Ht(this.options.closed),e=t.process(this.points()),i=new ee({stroke:{color:o,width:n.width,opacity:n.opacity,dashType:n.dashType},zIndex:n.zIndex}),i.segments.push.apply(i.segments,e),this.visual=i}}),an={renderSegments:function(){var t,e,i,n,s,o,r,a,h=this,l=this,c=l.options,u=l.seriesPoints,p=c.series,d=u.length;for(this._segments=[],e=0;e<d;e++){for(i=p[e],n=h.sortPoints(u[e]),s=n.length,o=[],r=0;r<s;r++)a=n[r],a?o.push(a):h.seriesMissingValues(i)!==Me&&(o.length>1&&(t=h.createSegment(o,i,e,t),h._addSegment(t)),o=[]);o.length>1&&(t=h.createSegment(o,i,e,t),h._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){var e=t.missingValues,i=!e&&this.options.isStacked;return i?Le:e||Me},getNearestPoint:function(t,e,i){var n,s,o,r,a,h=new bt(t,e),l=this.seriesPoints[i],c=nt;for(s=0;s<l.length;s++)o=l[s],o&&yt(o.value)&&null!==o.value&&o.visible!==!1&&(r=o.box,a=r.center().distanceTo(h),a<c&&(n=o,c=a));return n}},hn=ie.extend({setup:function(){this._setEnd(this.options.box.x1)},step:function(t){var e=this.options.box;this._setEnd(Q.interpolateValue(e.x1,e.x2,t))},_setEnd:function(t){var e=this.element,i=e.segments,n=i[1].anchor(),s=i[2].anchor();e.suspend(),n.setX(t),e.resume(),s.setX(t)}}),kt(hn,{duration:_e}),ne.current.register("clip",hn),ln={createAnimation:function(){var t,e,i=this.getRoot();i&&(i.options||{}).transitions!==!1&&(t=i.size(),e=ee.fromRect(t.toRect()),this.visual.clip(e),this.animation=new hn(e,{box:t}),a(this.options.series)&&this._setChildrenAnimation(e))},_setChildrenAnimation:function(t){var e,i,n=this.animationPoints();for(e=0;e<n.length;e++)i=n[e],i&&i.visual&&yt(i.visual.options.zIndex)&&i.visual.clip(t)}},cn=Ji.extend({render:function(){Ji.fn.render.call(this),this.updateStackRange(),this.renderSegments()},pointType:function(){return en},createPoint:function(t,e){var i,n,s,o=e.categoryIx,r=e.category,a=e.series,h=e.seriesIx,l=this.seriesMissingValues(a),c=t.valueFields.value; if(!yt(c)||null===c){if(l!==Le)return null;c=0}return i=this.pointOptions(a,h),i=this.evalPointOptions(i,c,r,o,a,h),n=t.fields.color||a.color,Rt(a.color)&&(n=i.color),s=new en(c,i),s.color=n,this.append(s),s},plotRange:function(t){var e,i,n,s,o=this,r=this.plotValue(t);if(this.options.isStacked)for(e=t.categoryIx,i=this.categoryPoints[e],n=0;n<i.length&&(s=i[n],t!==s);n++)r+=o.plotValue(s),o.options.isStacked100&&(r=Math.min(r,1));return[r,r]},createSegment:function(t,e,i){var n,s=e.style;return new(n=s===Fe?on:s===He?rn:nn)(t,e,i)},animationPoints:function(){var t,e=this.points,i=[];for(t=0;t<e.length;t++)i.push((e[t]||{}).marker);return i.concat(this._segments)}}),Et(cn.prototype,an,ln),un=nn.extend({init:function(t,e,i,n,s){nn.fn.init.call(this,t,e,i),this.prevSegment=n,this.stackPoints=s},createVisual:function(){var t=this.series,e=t._defaults,i=t.line||{},n=t.color;Rt(n)&&e&&(n=e.color),this.visual=new se({zIndex:t.zIndex}),this.createFill({fill:{color:n,opacity:t.opacity},stroke:null}),i.width>0&&i.visible!==!1&&this.createStroke({stroke:Et({color:n,opacity:t.opacity,lineCap:"butt"},i)})},strokeSegments:function(){var t=this._strokeSegments;return t||(t=this._strokeSegments=this.createStrokeSegments()),t},createStrokeSegments:function(){return this.segmentsFromPoints(this.points())},stackSegments:function(){return this.prevSegment?this.prevSegment.createStackSegments(this.stackPoints):this.createStackSegments(this.stackPoints)},createStackSegments:function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},segmentsFromPoints:function(t){return t.map(function(t){return new re.Segment(t)})},createStroke:function(t){var e=new ee(t);e.segments.push.apply(e.segments,this.strokeSegments()),this.visual.append(e)},hasStackSegment:function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},createFill:function(t){var e,i,n=this.strokeSegments(),s=n.slice(0),o=this.hasStackSegment();o&&(e=this.stackSegments(),Ft(s,e)),i=new ee(t),i.segments.push.apply(i.segments,s),!o&&n.length>1&&this.fillToAxes(i),this.visual.append(i)},fillToAxes:function(t){var e=this.parent,i=e.options.invertAxes,n=e.seriesValueAxis(this.series),s=e.categoryAxisCrossingValue(n),o=n.getSlot(s,s,!0),r=this.strokeSegments(),a=r[0].anchor(),h=Vt(r).anchor(),l=i?o.x1:o.y1;i?t.lineTo(l,h.y).lineTo(l,a.y):t.lineTo(h.x,l).lineTo(a.x,l)}}),pn=un.extend({createStrokeSegments:function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},createStackSegments:function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()}}),Et(pn.prototype,sn),dn=un.extend({createStrokeSegments:function(){var t=new Ht(this.options.closed),e=this.points();return t.process(e)},createStackSegments:function(){var t,e,i=this.strokeSegments(),n=[];for(t=i.length-1;t>=0;t--)e=i[t],n.push(new re.Segment(e.anchor(),e.controlOut(),e.controlIn()));return n}}),gn=cn.extend({createSegment:function(t,e,i,n){var s,o,r,a,h=this.options.isStacked,l=(e.line||{}).style;return h&&i>0&&n&&(r=this.seriesMissingValues(e),"gap"!==r?(o=n.linePoints,s=n):o=this._gapStackPoints(t,i,l)),new(a=l===Fe?pn:l===He?dn:un)(t,e,i,s,o)},reflow:function(t){var e,i,n,s,o=this;if(cn.fn.reflow.call(this,t),e=this._stackPoints)for(i=0;i<e.length;i++)n=e[i],s=o.categoryAxis.getSlot(n.categoryIx),n.reflow(s)},_gapStackPoints:function(t,e,i){var n,s,o,r,a,h,l,c,u=this,p=this.seriesPoints,d=t[0].categoryIx,g=t.length;for(d<0&&(d=0,g--),n=d+g,s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,o=[],this._stackPoints=this._stackPoints||[],r=d;r<n;r++){a=r+s,h=e,l=void 0;do h--,l=p[h][a];while(h>0&&!l);l?(i!==Fe&&r>d&&!p[h][a-1]&&o.push(u._previousSegmentPoint(r,a,a-1,h)),o.push(l),i!==Fe&&r+1<n&&!p[h][a+1]&&o.push(u._previousSegmentPoint(r,a,a+1,h))):(c=u._createGapStackPoint(r),u._stackPoints.push(c),o.push(c))}return o},_previousSegmentPoint:function(t,e,i,n){for(var s,o=this.seriesPoints,r=n;r>0&&!s;)r--,s=o[r][i];return s?s=o[r][e]:(s=this._createGapStackPoint(t),this._stackPoints.push(s)),s},_createGapStackPoint:function(t){var e=this.pointOptions({},0),i=new en(0,e);return i.categoryIx=t,i.series={},i},seriesMissingValues:function(t){return t.missingValues||Le}}),fn=tt.extend({init:function(){this.axisRanges={}},update:function(t){var e,i,n,s=this.axisRanges;for(e in t)i=t[e],n=s[e],s[e]=n=n||{min:nt,max:st},n.min=Math.min(n.min,i.min),n.max=Math.max(n.max,i.max)},reset:function(t){this.axisRanges[t]=void 0},query:function(t){return this.axisRanges[t]}}),vn=At.extend({init:function(t,e,i){At.fn.init.call(this,e),this.textBox=new Bt(t,this.options,i),this.append(this.textBox)},createVisual:function(){this.textBox.options.noclip=this.options.noclip},reflow:function(t){var e=this.options,i=e.vertical,n=e.aboveAxis,s=this.children[0],o=s.options,r=s.box,a=s.options.padding,h=t;o.align=i?rt:lt,o.vAlign=i?at:rt,e.position===Gi?i?(o.vAlign=at,!n&&r.height()<t.height()&&(o.vAlign=ht)):o.align=n?gt:lt:e.position===rt?(o.vAlign=rt,o.align=rt):e.position===qi?i?o.vAlign=n?ht:at:o.align=n?lt:gt:e.position===Wi&&(i?h=n?new St(t.x1,t.y1-r.height(),t.x2,t.y1):new St(t.x1,t.y2,t.x2,t.y2+r.height()):(o.align=rt,h=n?new St(t.x2,t.y1,t.x2+r.width(),t.y2):new St(t.x1-r.width(),t.y1,t.x1,t.y2))),e.rotation||(i?a.left=a.right=(h.width()-s.contentBox.width())/2:a.top=a.bottom=(h.height()-s.contentBox.height())/2),s.reflow(h)},alignToClipBox:function(t){var e,i=this.options.vertical,n=i?dt:pt,s=n+"1",o=n+"2",r=this.children[0],a=this.parent.box;(a[s]<t[s]||t[o]<a[o])&&(e=r.paddingBox.clone(),e[s]=Math.max(a[s],t[s]),e[o]=Math.min(a[o],t[o]),this.reflow(e))}}),kt(vn,{position:Wi,margin:zt(3),padding:zt(4),color:ft,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:we,delay:_e},zIndex:2}),xn=6,mn=At.extend({init:function(t,e){At.fn.init.call(this),this.options=e,this.color=e.color||ct,this.aboveAxis=Tt(this.options.aboveAxis,!0),this.value=t},render:function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},createLabel:function(){var t,e,i,n=this.options,s=n.labels;s.visible&&(t=this.pointData(),e=Mt(s),i=e?e(t):this.formatValue(s.format),this.label=new vn(i,Et({vertical:n.vertical},s),t),this.append(this.label))},formatValue:function(t){return this.owner.formatPointValue(this,t)},reflow:function(t){var e,i,n=this;if(this.render(),e=this.label,this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(i=0;i<this.errorBars.length;i++)n.errorBars[i].reflow(t)},createVisual:function(){var t,e=this,i=this,n=i.box,s=i.options,o=s.visual;this.visible!==!1&&(At.fn.createVisual.call(this),o?(t=this.rectVisual=o({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:n.toRect(),createVisual:function(){var t=new se;return e.createRect(t),t},options:s}),t&&this.visual.append(t)):n.width()>0&&n.height()>0&&this.createRect(this.visual))},createRect:function(t){var e,i,n,s,o,r=this.options,a=r.border,l=yt(a.opacity)?a.opacity:r.opacity,c=this.box.toRect();c.size.width=Math.round(c.size.width),e=this.rectVisual=ee.fromRect(c,{fill:{color:this.color,opacity:r.opacity},stroke:{color:this.getBorderColor(),width:a.width,opacity:l,dashType:a.dashType}}),i=this.box.width(),n=this.box.height(),s=r.vertical?i:n,s>xn&&(Ct(e),(i<1||n<1)&&(e.options.stroke.lineJoin="round")),t.append(e),h(r)&&(o=this.createGradientOverlay(e,{baseColor:this.color},Et({end:r.vertical?void 0:[0,1]},r.overlay)),t.append(o))},createHighlight:function(t){var e=ee.fromRect(this.box.toRect(),t);return Ct(e)},highlightVisual:function(){return this.rectVisual},highlightVisualArgs:function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},getBorderColor:function(){var t=this.color,e=this.options.border,i=e._brightness||be,n=e.color;return yt(n)||(n=new oe(t).brightness(i).toHex()),n},tooltipAnchor:function(){var t,e,i,n,s=this,o=s.options,r=s.box,a=s.aboveAxis,h=this.owner.pane.clipBox()||r,l=lt,c=at;return o.vertical?(t=Math.min(r.x2,h.x2)+Se,a?e=Math.max(r.y1,h.y1):(e=Math.min(r.y2,h.y2),c=ht)):(i=Math.max(r.x1,h.x1),n=Math.min(r.x2,h.x2),o.isStacked?(c=ht,a?(l=gt,t=n):t=i,e=Math.max(r.y1,h.y1)-Se):(a?t=n+Se:(t=i-Se,l=gt),e=Math.max(r.y1,h.y1))),{point:new bt(t,e),align:{horizontal:l,vertical:c}}},overlapsBox:function(t){return this.box.overlaps(t)},pointData:function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,series:this.series}}}),Et(mn.prototype,Qi),Et(mn.prototype,tn),mn.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}},yn=At.extend({init:function(t){At.fn.init.call(this,t),this.forEach=t.rtl?c:l},reflow:function(t){var e=this.options,i=e.vertical,n=e.gap,s=e.spacing,o=this.children,r=o.length,a=i?dt:pt,h=r+n+s*(r-1),l=(i?t.height():t.width())/h,c=t[a+1]+l*(n/2);this.forEach(o,function(e,i){var n=(e.box||t).clone();n[a+1]=c,n[a+2]=c+l,e.reflow(n),i<r-1&&(c+=l*s),c+=l})}}),kt(yn,{vertical:!1,gap:0,spacing:0}),_n=At.extend({reflow:function(t){var e,i,n,s=this,o=this.options.vertical?pt:dt,r=this.children,a=r.length,h=this.box=new St;for(e=0;e<a;e++)i=r[e],i.visible!==!1&&(n=i.box.clone(),n.snapTo(t,o),0===e&&(h=s.box=n.clone()),i.reflow(n),h.wrap(n))}}),kt(_n,{vertical:!0}),wn=Ji.extend({render:function(){Ji.fn.render.call(this),this.updateStackRange()},pointType:function(){return mn},clusterType:function(){return yn},stackType:function(){return _n},stackLimits:function(t,e){var i=Ji.fn.stackLimits.call(this,t,e);return i},createPoint:function(t,e){var i,n,s,o,r,a,h=e.categoryIx,l=e.category,c=e.series,u=e.seriesIx,p=this,d=p.options,g=p.children,f=d.isStacked,v=this.pointValue(t),x=this.pointOptions(c,u),m=x.labels;return f&&m.position===Wi&&(m.position=Gi),x.isStacked=f,i=t.fields.color||c.color,v<0&&x.negativeColor&&(i=x.negativeColor),x=this.evalPointOptions(x,v,l,h,c,u),Rt(c.color)&&(i=x.color),n=this.pointType(),s=new n(v,x),s.color=i,o=g[h],o||(r=this.clusterType(),o=new r({vertical:d.invertAxes,gap:d.gap,spacing:d.spacing,rtl:!d.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),f?(a=this.getStackWrap(c,o),a.append(s)):o.append(s),s},getStackWrap:function(t,e){var i,n,s,o=t.stack,r=o?o.group||o:o,a=e.children;if(typeof r===it.STRING){for(n=0;n<a.length;n++)if(a[n]._stackGroup===r){i=a[n];break}}else i=a[0];return i||(s=this.stackType(),i=new s({vertical:!this.options.invertAxes}),i._stackGroup=r,e.append(i)),i},categorySlot:function(t,e,i){var n,s,o=this.options,r=t.getSlot(e),a=i.startValue();return o.isStacked&&(n=i.getSlot(a,a,!0),s=o.invertAxes?pt:dt,r[s+1]=r[s+2]=n[s+1]),r},reflowCategories:function(t){var e,i=this.children,n=i.length;for(e=0;e<n;e++)i[e].reflow(t[e])},createAnimation:function(){this._setAnimationOptions(),Ji.fn.createAnimation.call(this),a(this.options.series)&&this._setChildrenAnimation()},_setChildrenAnimation:function(){var t,e,i,n=this,s=this.points;for(t=0;t<s.length;t++)e=s[t],i=e.visual,i&&yt(i.options.zIndex)&&(e.options.animation=n.options.animation,e.createAnimation())},_setAnimationOptions:function(){var t,e,i=this.options,n=i.animation||{};i.isStacked?(e=this.seriesValueAxis(i.series[0]),t=e.getSlot(e.startValue())):t=this.categoryAxis.getSlot(0),n.origin=new ae(t.x1,t.y1),n.vertical=!i.invertAxes}}),kt(wn,{animation:{type:Ne}}),An=At.extend({init:function(t,e){At.fn.init.call(this,e),this.value=t},reflow:function(t){var e,i,n=this,s=n.options,o=n.value,r=n.owner,a=r.seriesValueAxis(s),h=a.getSlot(o.open,o.close),l=a.getSlot(o.low,o.high);h.x1=l.x1=t.x1,h.x2=l.x2=t.x2,this.realBody=h,e=l.center().x,i=[],i.push([[e,l.y1],[e,h.y1]]),i.push([[e,h.y2],[e,l.y2]]),this.lines=i,this.box=l.clone().wrap(h),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},reflowNote:function(){this.note&&this.note.reflow(this.box)},createVisual:function(){At.fn.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},mainVisual:function(t){var e=new se;return this.createBody(e,t),this.createLines(e,t),e},createBody:function(t,e){var i=ee.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});e.border.width>0&&i.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:Tt(e.border.opacity,e.opacity)}),Ct(i),t.append(i),h(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},Et({end:e.vertical?void 0:[0,1]},e.overlay)))},createLines:function(t,e){this.drawLines(t,e,this.lines,e.line)},drawLines:function(t,e,i,n){var s,o,r;if(i)for(s={stroke:{color:n.color||this.color,opacity:Tt(n.opacity,e.opacity),width:n.width,dashType:n.dashType,lineCap:"butt"}},o=0;o<i.length;o++)r=ee.fromPoints(i[o],s),Ct(r),t.append(r)},getBorderColor:function(){var t=this.options.border,e=t.color;return yt(e)||(e=new oe(this.color).brightness(t._brightness).toHex()),e},createOverlay:function(){var t=ee.fromRect(this.box.toRect(),{fill:{color:ct,opacity:0},stroke:null});this.visual.append(t)},createHighlight:function(){var t,e=this.options.highlight,i=this.color;return this.color=e.color||this.color,t=this.mainVisual(Et({},this.options,{line:{color:this.getBorderColor()}},e)),this.color=i,t},highlightVisual:function(){return this._mainVisual},highlightVisualArgs:function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},tooltipAnchor:function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new bt(t.x2+Se,Math.max(t.y1,e.y1)+Se),align:{horizontal:lt,vertical:at}}},formatValue:function(t){return this.owner.formatPointValue(this,t)},overlapsBox:function(t){return this.box.overlaps(t)}}),kt(An,{vertical:!0,border:{_brightness:.8},line:{width:2},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{4:d}</th></tr><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:{}}}),Et(An.prototype,Qi),Et(An.prototype,tn),bn=Ji.extend({reflowCategories:function(t){var e,i=this.children,n=i.length;for(e=0;e<n;e++)i[e].reflow(t[e])},addValue:function(t,e){var i,n,s=e.categoryIx,o=e.category,r=e.series,a=e.seriesIx,h=this,l=h.children,c=h.options,p=t.valueFields,d=this.splitValue(p),g=u(d),f=r.data[s],v=this.categoryPoints[s];v||(this.categoryPoints[s]=v=[]),g&&(i=this.createPoint(t,e)),n=l[s],n||(n=new yn({vertical:c.invertAxes,gap:c.gap,spacing:c.spacing,rtl:!c.invertAxes&&(this.chartService||{}).rtl}),this.append(n)),i&&(this.updateRange(p,e),n.append(i),i.categoryIx=s,i.category=o,i.series=r,i.seriesIx=a,i.owner=this,i.dataItem=f,i.noteText=t.fields.noteText),this.points.push(i),v.push(i)},pointType:function(){return An},createPoint:function(t,e){var i,n=e.categoryIx,s=e.category,o=e.series,r=e.seriesIx,a=this.pointType(),h=t.valueFields,l=Et({},o),c=t.fields.color||o.color;return l=this.evalPointOptions(l,h,s,n,o,r),o.type===Xe&&h.open>h.close&&(c=t.fields.downColor||o.downColor||o.color),Rt(o.color)&&(c=l.color),l.vertical=!this.options.invertAxes,i=new a(h,l),i.color=c,i},splitValue:function(t){return[t.low,t.open,t.close,t.high]},updateRange:function(t,e){var i=e.series.axis,n=this.splitValue(t),s=this.valueAxisRanges[i];s=this.valueAxisRanges[i]=s||{min:nt,max:st},s=this.valueAxisRanges[i]={min:Math.min.apply(Math,n.concat([s.min])),max:Math.max.apply(Math,n.concat([s.max]))}},formatPointValue:function(t,e){var i=t.value;return this.chartService.format.auto(e,i.open,i.high,i.low,i.close,t.category)},animationPoints:function(){return this.points}}),Et(bn.prototype,ln),Sn=An.extend({init:function(t,e){An.fn.init.call(this,t,e),this.createNote()},reflow:function(t){var e,i,n,s,o=this,r=o.options,a=o.value,h=o.owner,l=h.seriesValueAxis(r);this.boxSlot=i=l.getSlot(a.q1,a.q3),this.realBody=i,this.reflowBoxSlot(t),this.whiskerSlot=e=l.getSlot(a.lower,a.upper),this.reflowWhiskerSlot(t),n=l.getSlot(a.median),a.mean&&(s=l.getSlot(a.mean),this.meanPoints=this.calcMeanPoints(t,s)),this.whiskerPoints=this.calcWhiskerPoints(i,e),this.medianPoints=this.calcMedianPoints(t,n),this.box=e.clone().wrap(i),this.reflowNote()},reflowBoxSlot:function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},reflowWhiskerSlot:function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},calcMeanPoints:function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},calcWhiskerPoints:function(t,e){var i=e.center().x;return[[[i-5,e.y1],[i+5,e.y1],[i,e.y1],[i,t.y1]],[[i-5,e.y2],[i+5,e.y2],[i,e.y2],[i,t.y2]]]},calcMedianPoints:function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},renderOutliers:function(t){var e,i,n,s,o=this,r=this.value,a=r.outliers||[],h=3*Math.abs(r.q3-r.q1),l=[],c=t.markers||{};for(e=0;e<a.length;e++)i=a[e],c=i<r.q3+h&&i>r.q1-h?t.outliers:t.extremes,n=Et({},c.border),yt(n.color)||(n.color=yt(o.color)?o.color:new oe(c.background).brightness(be).toHex()),s=new Ot({type:c.type,width:c.size,height:c.size,rotation:c.rotation,background:c.background,border:n,opacity:c.opacity}),s.value=i,l.push(s);return this.reflowOutliers(l),l},reflowOutliers:function(t){var e,i,n,s=this,o=this.owner.seriesValueAxis(this.options),r=this.box.center();for(e=0;e<t.length;e++)i=t[e].value,n=o.getSlot(i),s.options.vertical?n.move(r.x):n.move(void 0,r.y),s.box=s.box.wrap(n),t[e].reflow(n)},mainVisual:function(t){var e,i,n=An.fn.mainVisual.call(this,t),s=this.renderOutliers(t);for(e=0;e<s.length;e++)i=s[e].getElement(),i&&n.append(i);return n},createLines:function(t,e){this.drawLines(t,e,this.whiskerPoints,e.