@progress/kendo-react-gauges 4.12.0 → 4.13.0-dev.202111290654
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@progress/kendo-drawing"),require("react"),require("prop-types"),require("@progress/kendo-licensing"),require("@progress/kendo-react-intl")):"function"==typeof define&&define.amd?define(["@progress/kendo-drawing","react","prop-types","@progress/kendo-licensing","@progress/kendo-react-intl"],e):"object"==typeof exports?exports.KendoReactGauges=e(require("@progress/kendo-drawing"),require("react"),require("prop-types"),require("@progress/kendo-licensing"),require("@progress/kendo-react-intl")):t.KendoReactGauges=e(t.KendoDrawing,t.React,t.PropTypes,t.KendoLicensing,t.KendoReactIntl)}(window,(function(t,e,i,o,r){return function(t){var e={};function i(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(o,r,function(e){return t[e]}.bind(null,r));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=9)}([function(e,i){e.exports=t},function(t,i){t.exports=e},function(t,e){t.exports=i},function(t,e,i){"use strict";i.r(e),i.d(e,"autoMajorUnit",(function(){return Yt})),i.d(e,"Point",(function(){return Zt})),i.d(e,"Box",(function(){return $t})),i.d(e,"Ring",(function(){return Jt})),i.d(e,"Sector",(function(){return te})),i.d(e,"ShapeBuilder",(function(){return ie})),i.d(e,"ShapeElement",(function(){return pe})),i.d(e,"ChartElement",(function(){return re})),i.d(e,"BoxElement",(function(){return se})),i.d(e,"RootElement",(function(){return ue})),i.d(e,"FloatElement",(function(){return de})),i.d(e,"Text",(function(){return ve})),i.d(e,"TextBox",(function(){return be})),i.d(e,"Title",(function(){return we})),i.d(e,"AxisLabel",(function(){return Se})),i.d(e,"Axis",(function(){return Te})),i.d(e,"Note",(function(){return Ce})),i.d(e,"CategoryAxis",(function(){return Qe})),i.d(e,"DateCategoryAxis",(function(){return ai})),i.d(e,"DateValueAxis",(function(){return yi})),i.d(e,"NumericAxis",(function(){return di})),i.d(e,"LogarithmicAxis",(function(){return bi})),i.d(e,"PolarAxis",(function(){return ki})),i.d(e,"RadarCategoryAxis",(function(){return Ai})),i.d(e,"RadarNumericAxis",(function(){return Oi})),i.d(e,"RadarLogarithmicAxis",(function(){return Ri})),i.d(e,"CurveProcessor",(function(){return Bi})),i.d(e,"Gradients",(function(){return he})),i.d(e,"rectToBox",(function(){return me})),i.d(e,"ChartAxis",(function(){return Ii})),i.d(e,"ChartPane",(function(){return Ei})),i.d(e,"ChartPlotArea",(function(){return zi})),i.d(e,"findAxisByName",(function(){return Vi})),i.d(e,"Aggregates",(function(){return Ui})),i.d(e,"AreaChart",(function(){return Io})),i.d(e,"AreaSegment",(function(){return To})),i.d(e,"AxisGroupRangeTracker",(function(){return Vo})),i.d(e,"Bar",(function(){return Fo})),i.d(e,"BarChart",(function(){return Yo})),i.d(e,"BarLabel",(function(){return Eo})),i.d(e,"BoxPlotChart",(function(){return or})),i.d(e,"BoxPlot",(function(){return er})),i.d(e,"BubbleChart",(function(){return cr})),i.d(e,"Bullet",(function(){return gr})),i.d(e,"BulletChart",(function(){return vr})),i.d(e,"CandlestickChart",(function(){return Jo})),i.d(e,"Candlestick",(function(){return Ko})),i.d(e,"CategoricalChart",(function(){return lo})),i.d(e,"CategoricalErrorBar",(function(){return so})),i.d(e,"CategoricalPlotArea",(function(){return wn})),i.d(e,"Chart",(function(){return ca})),i.d(e,"ChartContainer",(function(){return kr})),i.d(e,"ClipAnimation",(function(){return ko})),i.d(e,"ClusterLayout",(function(){return No})),i.d(e,"Crosshair",(function(){return Ar})),i.d(e,"CrosshairTooltip",(function(){return _r})),i.d(e,"DefaultAggregates",(function(){return $r})),i.d(e,"DonutChart",(function(){return ds})),i.d(e,"DonutPlotArea",(function(){return gs})),i.d(e,"DonutSegment",(function(){return us})),i.d(e,"ErrorBarBase",(function(){return no})),i.d(e,"ErrorRangeCalculator",(function(){return Xi})),i.d(e,"Highlight",(function(){return Sn})),i.d(e,"SharedTooltip",(function(){return Nn})),i.d(e,"Legend",(function(){return Vn})),i.d(e,"LegendItem",(function(){return Bn})),i.d(e,"LegendLayout",(function(){return jn})),i.d(e,"LineChart",(function(){return Oo})),i.d(e,"LinePoint",(function(){return go})),i.d(e,"LineSegment",(function(){return vo})),i.d(e,"Pane",(function(){return Mr})),i.d(e,"PieAnimation",(function(){return Zn})),i.d(e,"PieChart",(function(){return hs})),i.d(e,"PieChartMixin",(function(){return ss})),i.d(e,"PiePlotArea",(function(){return ls})),i.d(e,"PieSegment",(function(){return ns})),i.d(e,"PlotAreaBase",(function(){return qr})),i.d(e,"PlotAreaEventsMixin",(function(){return Xr})),i.d(e,"PlotAreaFactory",(function(){return En})),i.d(e,"PointEventsMixin",(function(){return co})),i.d(e,"RangeBar",(function(){return Jr})),i.d(e,"RangeBarChart",(function(){return en})),i.d(e,"RangeAreaPoint",(function(){return nn})),i.d(e,"RangeAreaChart",(function(){return cn})),i.d(e,"ScatterChart",(function(){return ar})),i.d(e,"ScatterErrorBar",(function(){return rr})),i.d(e,"ScatterLineChart",(function(){return $n})),i.d(e,"Selection",(function(){return Un})),i.d(e,"SeriesAggregator",(function(){return Zr})),i.d(e,"SeriesBinder",(function(){return Ni})),i.d(e,"SplineSegment",(function(){return wo})),i.d(e,"SplineAreaSegment",(function(){return Bo})),i.d(e,"StackWrap",(function(){return qo})),i.d(e,"Tooltip",(function(){return Gn})),i.d(e,"OHLCChart",(function(){return fn})),i.d(e,"OHLCPoint",(function(){return un})),i.d(e,"WaterfallChart",(function(){return yn})),i.d(e,"WaterfallSegment",(function(){return gn})),i.d(e,"XYPlotArea",(function(){return ts})),i.d(e,"MousewheelZoom",(function(){return Rn})),i.d(e,"ZoomSelection",(function(){return Tn})),i.d(e,"Pannable",(function(){return Mn})),i.d(e,"anyHasZIndex",(function(){return Co})),i.d(e,"appendIfNotNull",(function(){return Or})),i.d(e,"areNumbers",(function(){return $o})),i.d(e,"bindSegments",(function(){return Rr})),i.d(e,"categoriesCount",(function(){return po})),i.d(e,"countNumbers",(function(){return Di})),i.d(e,"equalsIgnoreCase",(function(){return jr})),i.d(e,"evalOptions",(function(){return ao})),i.d(e,"filterSeriesByType",(function(){return Br})),i.d(e,"getDateField",(function(){return Ir})),i.d(e,"getField",(function(){return Gi})),i.d(e,"hasGradientOverlay",(function(){return zo})),i.d(e,"hasValue",(function(){return nr})),i.d(e,"isDateAxis",(function(){return Vr})),i.d(e,"segmentVisible",(function(){return Tr})),i.d(e,"singleItemOrArray",(function(){return Lr})),i.d(e,"createOutOfRangePoints",(function(){return Fr})),i.d(e,"ChartService",(function(){return K})),i.d(e,"DomEventsBuilder",(function(){return Q})),i.d(e,"FormatService",(function(){return q})),i.d(e,"IntlService",(function(){return G})),i.d(e,"TemplateService",(function(){return et})),i.d(e,"Sparkline",(function(){return ma})),i.d(e,"Navigator",(function(){return Ca})),i.d(e,"NavigatorHint",(function(){return wa})),i.d(e,"StockChart",(function(){return Ma})),i.d(e,"constants",(function(){return o})),i.d(e,"Gauge",(function(){return Fa})),i.d(e,"LinearGauge",(function(){return lp})),i.d(e,"LinearPointer",(function(){return $a})),i.d(e,"ArrowLinearPointer",(function(){return ip})),i.d(e,"BarLinearPointer",(function(){return ap})),i.d(e,"LinearScale",(function(){return Xa})),i.d(e,"RadialGauge",(function(){return Pp})),i.d(e,"RadialPointer",(function(){return Sp})),i.d(e,"RadialScale",(function(){return vp})),i.d(e,"ArcGauge",(function(){return Ip})),i.d(e,"RangePointer",(function(){return Bp})),i.d(e,"ArcScale",(function(){return Op})),i.d(e,"CircularGauge",(function(){return Vp})),i.d(e,"Barcode",(function(){return wh})),i.d(e,"addClass",(function(){return _})),i.d(e,"removeClass",(function(){return A})),i.d(e,"alignPathToPixel",(function(){return k})),i.d(e,"clockwise",(function(){return C})),i.d(e,"convertableToNumber",(function(){return O})),i.d(e,"deepExtend",(function(){return j})),i.d(e,"elementStyles",(function(){return E})),i.d(e,"getSpacing",(function(){return z})),i.d(e,"getTemplate",(function(){return it})),i.d(e,"getter",(function(){return nt})),i.d(e,"grep",(function(){return st})),i.d(e,"hasClasses",(function(){return at})),i.d(e,"HashMap",(function(){return ht})),i.d(e,"inArray",(function(){return lt})),i.d(e,"interpolateValue",(function(){return ct})),i.d(e,"InstanceObserver",(function(){return ft})),i.d(e,"isArray",(function(){return b})),i.d(e,"isFunction",(function(){return T})),i.d(e,"isNumber",(function(){return P})),i.d(e,"isObject",(function(){return B})),i.d(e,"isString",(function(){return M})),i.d(e,"map",(function(){return dt})),i.d(e,"mousewheelDelta",(function(){return gt})),i.d(e,"FontLoader",(function(){return Bt})),i.d(e,"setDefaultOptions",(function(){return It})),i.d(e,"sparseArrayLimits",(function(){return Vt})),i.d(e,"styleValue",(function(){return I})),i.d(e,"find",(function(){return Lt})),i.d(e,"elementScale",(function(){return Ft})),i.d(e,"autoTextColor",(function(){return Ut})),i.d(e,"createHashSet",(function(){return Xt})),i.d(e,"append",(function(){return vt})),i.d(e,"bindEvents",(function(){return mt})),i.d(e,"Class",(function(){return S.Class})),i.d(e,"defined",(function(){return xt})),i.d(e,"deg",(function(){return bt})),i.d(e,"elementOffset",(function(){return _t})),i.d(e,"elementSize",(function(){return wt})),i.d(e,"eventElement",(function(){return At})),i.d(e,"eventCoordinates",(function(){return St})),i.d(e,"last",(function(){return kt})),i.d(e,"limitValue",(function(){return Ct})),i.d(e,"logToConsole",(function(){return S.logToConsole})),i.d(e,"objectKey",(function(){return Pt})),i.d(e,"rad",(function(){return Mt})),i.d(e,"round",(function(){return Ot})),i.d(e,"unbindEvents",(function(){return Tt})),i.d(e,"valueOrDefault",(function(){return Rt})),i.d(e,"chartBaseTheme",(function(){return Mh}));var o={};i.r(o),i.d(o,"NAVIGATOR_AXIS",(function(){return Sa})),i.d(o,"NAVIGATOR_PANE",(function(){return Aa}));var r="arc",n="#000",s="bottom",a="center",p="circle",h="date",l=/\{\d+:?/,c="left",u=Number.MAX_VALUE,f=-Number.MAX_VALUE,d="right",g="top",y="value",v="#fff",m="x",x="y";function b(t){return Array.isArray(t)}function _(t,e){for(var i=b(e)?e:[e],o=0;o<i.length;o++){var r=i[o];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var w=/\s+/g;function A(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(w," "))}var S=i(0);function k(t){var e=.5;t.options.stroke&&S.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var i=0;i<t.segments.length;i++)t.segments[i].anchor().round(0).translate(e,e);return t}function C(t,e){return-t.x*e.y+t.y*e.x<0}function P(t){return"number"==typeof t&&!isNaN(t)}function M(t){return"string"==typeof t}function O(t){return P(t)||M(t)&&isFinite(t)}function T(t){return"function"==typeof t}function R(t,e){for(var i in e){var o=e[i],r=typeof o,n=void 0;if((n="object"===r&&null!==o?o.constructor:null)&&n!==Array)if(o instanceof Date)t[i]=new Date(o.getTime());else if(T(o.clone))t[i]=o.clone();else{var s=t[i];t[i]="object"==typeof s&&s||{},R(t[i],o)}else"undefined"!==r&&(t[i]=o)}return t}function j(t){for(var e=arguments,i=arguments.length,o=1;o<i;o++)R(t,e[o]);return t}function B(t){return"object"==typeof t}function I(t){return P(t)?t+"px":t}var V=/width|height|top|left|bottom|right/i;function L(t){return V.test(t)}function E(t,e){var i=M(e)?[e]:e;if(b(i)){for(var o={},r=window.getComputedStyle(t),n=0;n<i.length;n++){var s=i[n];o[s]=L(s)?parseFloat(r[s]):r[s]}return o}if(B(e))for(var a in e)t.style[a]=I(e[a])}function z(t,e){void 0===e&&(e=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof t?i.top=i[d]=i[s]=i[c]=t:(i.top=t.top||e,i[d]=t[d]||e,i[s]=t[s]||e,i[c]=t[c]||e),i}var D={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},F=function(){},U={implementation:{configurable:!0}};F.register=function(t){D=t},U.implementation.get=function(){return D},Object.defineProperties(F,U);var G=F,H=/\{(\d+)(:[^\}]+)?\}/g,N=function(t){this._intlService=t},W={intl:{configurable:!0}};W.intl.get=function(){return this._intlService||G.implementation},W.intl.set=function(t){this._intlService=t},N.prototype.auto=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];var o=this.intl;return M(t)&&t.match(l)?o.format.apply(o,[t].concat(e)):o.toString(e[0],t)},N.prototype.localeAuto=function(t,e,i){var o=this.intl;return M(t)&&t.match(l)?t.replace(H,(function(t,r,n){var s=e[parseInt(r,10)];return o.toString(s,n?n.substring(1):"",i)})):o.toString(e[0],t,i)},Object.defineProperties(N.prototype,W);var q=N,X=function(t,e){void 0===e&&(e={}),this._intlService=e.intlService,this.sender=e.sender||t,this.format=new q(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},Y={intl:{configurable:!0}};Y.intl.get=function(){return this._intlService||G.implementation},Y.intl.set=function(t){this._intlService=t,this.format.intl=t},X.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},X.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(X.prototype,Y);var Z,K=X,$=function(){};$.register=function(t){Z=t},$.create=function(t,e){if(Z)return Z.create(t,e)};var Q=$,J={compile:function(t){return t}},tt=function(){};tt.register=function(t){J=t},tt.compile=function(t){return J.compile(t)};var et=tt;function it(t){var e;return void 0===t&&(t={}),t.template?t.template=e=et.compile(t.template):T(t.content)&&(e=t.content),e}var ot=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,rt={};function nt(t){if(rt[t])return rt[t];var e=[];return t.replace(ot,(function(t,i,o,r){e.push(S.drawing.util.defined(i)?i:o||r)})),rt[t]=function(t){for(var i=t,o=0;o<e.length&&i;o++)i=i[e[o]];return i},rt[t]}function st(t,e){for(var i=t.length,o=[],r=0;r<i;r++)e(t[r])&&o.push(t[r]);return o}function at(t,e){if(t.className)for(var i=e.split(" "),o=0;o<i.length;o++)if(-1!==t.className.indexOf(i[o]))return!0}rt[void 0]=function(t){return t};var pt=function(){this._map={}};pt.prototype.get=function(t){return this._map[this._key(t)]},pt.prototype.set=function(t,e){this._map[this._key(t)]=e},pt.prototype._key=function(t){return t instanceof Date?t.getTime():t};var ht=pt;function lt(t,e){if(e)return-1!==e.indexOf(t)}function ct(t,e,i){return S.drawing.util.round(t+(e-t)*i,3)}var ut=function(t,e){this.observer=t,this.handlerMap=j({},this.handlerMap,e)};ut.prototype.trigger=function(t,e){var i,o=this.observer,r=this.handlerMap;return r[t]?i=this.callObserver(r[t],e):o.trigger&&(i=this.callObserver("trigger",t,e)),i},ut.prototype.callObserver=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];return this.observer[t].apply(this.observer,e)},ut.prototype.requiresHandlers=function(t){if(this.observer.requiresHandlers)return this.observer.requiresHandlers(t);for(var e=0;e<t.length;e++)if(this.handlerMap[t[e]])return!0};var ft=ut;function dt(t,e){for(var i=t.length,o=[],r=0;r<i;r++){var n=e(t[r]);S.drawing.util.defined(n)&&o.push(n)}return o}function gt(t){var e=0;return t.wheelDelta&&(e=(e=-t.wheelDelta/120)>0?Math.ceil(e):Math.floor(e)),t.detail&&(e=S.drawing.util.round(t.detail/3)),e}var yt=S.drawing.util,vt=yt.append,mt=yt.bindEvents,xt=yt.defined,bt=yt.deg,_t=yt.elementOffset,wt=yt.elementSize,At=yt.eventElement,St=yt.eventCoordinates,kt=yt.last,Ct=yt.limitValue,Pt=yt.objectKey,Mt=yt.rad,Ot=yt.round,Tt=yt.unbindEvents,Rt=yt.valueOrDefault,jt=function(){};jt.fetchFonts=function(t,e,i){void 0===i&&(i={depth:0});!t||i.depth>5||!document.fonts||Object.keys(t).forEach((function(o){var r=t[o];"dataSource"!==o&&"$"!==o[0]&&r&&("font"===o?e.push(r):"object"==typeof r&&(i.depth++,jt.fetchFonts(r,e,i),i.depth--))}))},jt.loadFonts=function(t,e){var i=[];if(t.length>0&&document.fonts){try{i=t.map((function(t){return document.fonts.load(t)}))}catch(t){Object(S.logToConsole)(t)}Promise.all(i).then(e,e)}else e()},jt.preloadFonts=function(t,e){var i=[];jt.fetchFonts(t,i),jt.loadFonts(i,e)};var Bt=jt;function It(t,e){var i=t.prototype;i.options?i.options=j({},i.options,e):i.options=e}function Vt(t){for(var e=u,i=f,o=0,r=t.length;o<r;o++){var n=t[o];null!==n&&isFinite(n)&&(e=Math.min(e,n),i=Math.max(i,n))}return{min:e===u?void 0:e,max:i===f?void 0:i}}function Lt(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(e(o,i,t))return o}}var Et=S.geometry.Matrix,zt=/matrix\((.*)\)/;function Dt(t){var e=getComputedStyle(t).transform;return"none"===e?Et.unit():function(t){var e=t.match(zt);if(null===e||2!==e.length)return Et.unit();var i=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(Et,[null].concat(i)))}(e)}function Ft(t){if(!t)return Et.unit();for(var e=Dt(t),i=t.parentElement;i;){var o=Dt(i);e=e.multiplyCopy(o),i=i.parentElement}return e.b=e.c=e.e=e.f=0,e}var Ut=function(t){return new S.Color(t).isDark()?v:n},Gt={},Ht=function(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e},Nt={size:{configurable:!0}};Ht.prototype.values=function(){return this._values.filter((function(t){return t!==Gt}))},Ht.prototype.has=function(t){return void 0!==this._index[t]},Ht.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Ht.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Gt,delete this._index[t])},Ht.prototype.clear=function(){this._index={},this._values=[]},Nt.size.get=function(){return this._values.length},Object.defineProperties(Ht.prototype,Nt);var Wt=function(t){this._set=new Set(t)},qt={size:{configurable:!0}};function Xt(t){return"function"==typeof Set?new Wt(t):new Ht(t)}function Yt(t,e){var i=Ot(e-t,9);if(0===i){if(0===e)return.1;i=Math.abs(e)}var o=Math.pow(10,Math.floor(Math.log(i)/Math.log(10))),r=Ot(i/o,10);return Ot(o*(r<1.904762?.2:r<4.761904?.5:r<9.523809?1:2),10)}Wt.prototype.values=function(){return Array.from(this._set)},Wt.prototype.has=function(t){return this._set.has(t)},Wt.prototype.add=function(t){this._set.add(t)},Wt.prototype.delete=function(t){this._set.delete(t)},Wt.prototype.clear=function(){this._set.clear()},qt.size.get=function(){return this._set.size},Object.defineProperties(Wt.prototype,qt);var Zt=function(t){function e(e,i){t.call(this),this.x=e||0,this.y=i||0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},e.prototype.rotate=function(t,e){var i=Mt(e),o=Math.cos(i),r=Math.sin(i),n=t.x,s=t.y,a=this.x,p=this.y;return this.x=Ot(n+(a-n)*o+(p-s)*r,3),this.y=Ot(s+(p-s)*o-(a-n)*r,3),this},e.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},e.prototype.distanceTo=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},e.onCircle=function(t,i,o){var r=Mt(i);return new e(t.x-o*Math.cos(r),t.y-o*Math.sin(r))},e}(S.Class);function Kt(t,e,i,o,r){var n=Mt(r);return new Zt(i+(t-i)*Math.cos(n)+(e-o)*Math.sin(n),o-(t-i)*Math.sin(n)+(e-o)*Math.cos(n))}var $t=function(t){function e(e,i,o,r){t.call(this),this.x1=e||0,this.y1=i||0,this.x2=o||0,this.y2=r||0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},e.prototype.width=function(){return this.x2-this.x1},e.prototype.height=function(){return this.y2-this.y1},e.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},e.prototype.move=function(t,e){var i=this.height(),o=this.width();return xt(t)&&(this.x1=t,this.x2=this.x1+o),xt(e)&&(this.y1=e,this.y2=this.y1+i),this},e.prototype.wrap=function(t){return this.x1=Math.min(this.x1,t.x1),this.y1=Math.min(this.y1,t.y1),this.x2=Math.max(this.x2,t.x2),this.y2=Math.max(this.y2,t.y2),this},e.prototype.wrapPoint=function(t){var i=b(t),o=i?t[0]:t.x,r=i?t[1]:t.y;return this.wrap(new e(o,r,o,r)),this},e.prototype.snapTo=function(t,e){return e!==m&&e||(this.x1=t.x1,this.x2=t.x2),e!==x&&e||(this.y1=t.y1,this.y2=t.y2),this},e.prototype.alignTo=function(t,e){var i=this.height(),o=this.width(),r=e===g||e===s?x:m,n=r===x?i:o;if(e===a){var p=t.center(),h=this.center();this.x1+=p.x-h.x,this.y1+=p.y-h.y}else this[r+1]=e===g||e===c?t[r+1]-n:t[r+2];return this.x2=this.x1+o,this.y2=this.y1+i,this},e.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},e.prototype.expand=function(t,e){return this.shrink(-t,-e),this},e.prototype.pad=function(t){var e=z(t);return this.x1-=e.left,this.x2+=e.right,this.y1-=e.top,this.y2+=e.bottom,this},e.prototype.unpad=function(t){var e=z(t);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,this.pad(e)},e.prototype.clone=function(){return new e(this.x1,this.y1,this.x2,this.y2)},e.prototype.center=function(){return new Zt(this.x1+this.width()/2,this.y1+this.height()/2)},e.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},e.prototype.points=function(){return[new Zt(this.x1,this.y1),new Zt(this.x2,this.y1),new Zt(this.x2,this.y2),new Zt(this.x1,this.y2)]},e.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},e.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},e.prototype.rotate=function(t){var e=this.width(),i=this.height(),o=this.center(),r=o.x,n=o.y,s=Kt(0,0,r,n,t),a=Kt(e,0,r,n,t),p=Kt(e,i,r,n,t),h=Kt(0,i,r,n,t);return e=Math.max(s.x,a.x,p.x,h.x)-Math.min(s.x,a.x,p.x,h.x),i=Math.max(s.y,a.y,p.y,h.y)-Math.min(s.y,a.y,p.y,h.y),this.x2=this.x1+e,this.y2=this.y1+i,this},e.prototype.toRect=function(){return new S.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},e.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},e.prototype.align=function(t,e,i){var o=e+1,r=e+2,n=e===m?"width":"height",p=this[n]();lt(i,[c,g])?(this[o]=t[o],this[r]=this[o]+p):lt(i,[d,s])?(this[r]=t[r],this[o]=this[r]-p):i===a&&(this[o]=t[o]+(t[n]()-p)/2,this[r]=this[o]+p)},e}(S.Class);function Qt(t,e){return t-e}var Jt=function(t){function e(e,i,o,r,n){t.call(this),this.center=e,this.innerRadius=i,this.radius=o,this.startAngle=r,this.angle=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},e.prototype.middle=function(){return this.startAngle+this.angle/2},e.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},e.prototype.point=function(t,e){var i=Mt(t),o=Math.cos(i),r=Math.sin(i),n=e?this.innerRadius:this.radius,s=Ot(this.center.x-o*n,3),a=Ot(this.center.y-r*n,3);return new Zt(s,a)},e.prototype.adjacentBox=function(t,e,i){var o=this.clone().expand(t),r=o.middle(),n=o.point(r),s=e/2,a=i/2,p=Math.sin(Mt(r)),h=Math.cos(Mt(r)),l=n.x-s,c=n.y-a;return Math.abs(p)<.9&&(l+=s*-h/Math.abs(h)),Math.abs(h)<.9&&(c+=a*-p/Math.abs(p)),new $t(l,c,l+e,c+i)},e.prototype.containsPoint=function(t){var e=this.center,i=this.innerRadius,o=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,a=t.y-e.y,p=new Zt(s,a),h=this.point(r),l=new Zt(h.x-e.x,h.y-e.y),c=this.point(n),u=new Zt(c.x-e.x,c.y-e.y),f=Ot(s*s+a*a,3);return(l.equals(p)||C(l,p))&&!C(u,p)&&f>=i*i&&f<=o*o},e.prototype.getBBox=function(){var t,e=new $t(u,u,f,f),i=Ot(this.startAngle%360),o=Ot((i+this.angle)%360),r=this.innerRadius,n=[0,90,180,270,i,o].sort(Qt),s=n.indexOf(i),a=n.indexOf(o);t=i===o?n:s<a?n.slice(s,a+1):[].concat(n.slice(0,a+1),n.slice(s,n.length));for(var p=0;p<t.length;p++){var h=this.point(t[p]);e.wrapPoint(h),e.wrapPoint(h,r)}return r||e.wrapPoint(this.center),e},e.prototype.expand=function(t){return this.radius+=t,this},e}(S.Class),te=function(t){function e(e,i,o,r){t.call(this,e,0,i,o,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.expand=function(e){return t.prototype.expand.call(this,e)},e.prototype.clone=function(){return new e(this.center,this.radius,this.startAngle,this.angle)},e.prototype.setRadius=function(t){return this.radius=t,this},e}(Jt),ee=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createRing=function(t,e){var i=t.startAngle+180,o=t.angle+i;t.angle>0&&i===o&&(o+=.001);var r=new S.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),s=Math.max(t.innerRadius,0),a=new S.geometry.Arc(r,{startAngle:i,endAngle:o,radiusX:n,radiusY:n}),p=S.drawing.Path.fromArc(a,e).close();if(s){a.radiusX=a.radiusY=s;var h=a.pointAt(o);p.lineTo(h.x,h.y),p.arc(o,i,s,s,!0)}else p.lineTo(r.x,r.y);return p},e}(S.Class);ee.current=new ee;var ie=ee,oe=function(t){function e(e){t.call(this),this.children=[],this.options=j({},this.options,this.initUserOptions(e))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){return t},e.prototype.reflow=function(t){for(var e,i=this.children,o=0;o<i.length;o++){var r=i[o];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},e.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},e.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},e.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},e.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},e.prototype.translateChildren=function(t,e){for(var i=this.children,o=i.length,r=0;r<o;r++)i[r].box.translate(t,e)},e.prototype.append=function(){for(var t=arguments,e=this,i=0;i<arguments.length;i++){var o=t[i];e.children.push(o),o.parent=e}},e.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},e.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this,this.parent&&this.parent.appendVisual(this.visual))},e.prototype.renderChildren=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)t[i].renderVisual()},e.prototype.createVisual=function(){this.visual=new S.drawing.Group({zIndex:this.options.zIndex,visible:Rt(this.options.visible,!0)})},e.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=S.drawing.Animation.create(this.visual,this.options.animation))},e.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):xt(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},e.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},e.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},e.prototype.stackVisual=function(t){var e,i=t.options.zIndex||0,o=this.visual.children,r=o.length;for(e=0;e<r;e++){var n=o[e];if(Rt(n.options.zIndex,0)>i)break}this.visual.insert(e,t)},e.prototype.traverse=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++){var r=e[o];t(r),r.traverse&&r.traverse(t)}},e.prototype.closest=function(t){for(var e=this,i=!1;e&&!i;)(i=t(e))||(e=e.parent);if(i)return e},e.prototype.renderComplete=function(){},e.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},e.prototype.toggleHighlight=function(t,e){var i=this,o=(this.options||{}).highlight||{},r=o.visual,n=this._highlight;if(!n){var s={fill:{color:v,opacity:e||.2},stroke:{color:v,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return i.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);xt(n.options.zIndex)||(n.options.zIndex=Rt(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},e.prototype.createGradientOverlay=function(t,e,i){var o=new S.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(i),closed:t.options.closed},e));return o.segments.elements(t.segments.elements()),o},e.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},e.prototype.supportsPointInactiveOpacity=function(){return!0},e}(S.Class);oe.prototype.options={};var re=oe,ne=function(t){function e(e){t.call(this,e),this.options.margin=z(this.options.margin),this.options.padding=z(this.options.padding)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(e){var i,o=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,p=n&&s,h=r.margin,l=r.padding,c=r.border.width,u=function(){o.align(e,m,r.align),o.align(e,x,r.vAlign),o.paddingBox=i.clone().unpad(h).unpad(c)},f=e.clone();p&&(f.x2=f.x1+n,f.y2=f.y1+s),a&&f.unpad(h).unpad(c).unpad(l),t.prototype.reflow.call(this,f),i=p?this.box=new $t(0,0,n,s):this.box,a&&p?(u(),f=this.contentBox=this.paddingBox.clone().unpad(l)):(f=this.contentBox=i.clone(),i.pad(l).pad(c).pad(h),u()),this.translateChildren(i.x1-f.x1+h.left+c+l.left,i.y1-f.y1+h.top+c+l.top);for(var d=this.children,g=0;g<d.length;g++){var y=d[g];y.reflow(y.box)}},e.prototype.align=function(t,e,i){this.box.align(t,e,i)},e.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(S.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},e.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:Rt(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},e}(re);It(ne,{align:c,vAlign:g,margin:{},padding:{},border:{color:n,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var se=ne,ae=function(t){function e(e,i){t.call(this,e),this.pointData=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options,e=this.paddingBox,i=t.type,o=t.rotation,r=e.center(),n=e.width()/2,s=e.height()/2;if(!t.visible||!this.hasBox())return null;var a,h=this.visualStyle();if(i===p)a=new S.drawing.Circle(new S.geometry.Circle([Ot(e.x1+n,3),Ot(e.y1+s,3)],Math.min(n,s)),h);else if("triangle"===i)a=S.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],h).close();else if("cross"===i)(a=new S.drawing.MultiPath(h)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1);else{var l=e.toRect();if("roundedRect"===i){var c=Rt(t.borderRadius,l.width()/5);l.setCornerRadius(c)}a=S.drawing.Path.fromRect(l,h)}return o&&a.transform(S.geometry.transform().rotate(-o,[r.x,r.y])),a.options.zIndex=t.zIndex,a},e.prototype.createElement=function(){var t=this,e=this.options.visual,i=this.pointData||{};return e?e({value:i.value,dataItem:i.dataItem,sender:this.getSender(),series:i.series,category:i.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},e.prototype.visualOptions=function(){var t=this.options;return{background:t.background,border:t.border,margin:t.margin,padding:t.padding,type:t.type,size:t.width,visible:t.visible}},e.prototype.createVisual=function(){this.visual=this.createElement()},e}(se);It(ae,{type:p,align:a,vAlign:a});var pe=ae,he={glass:{type:"linear",rotation:0,stops:[{offset:0,color:v,opacity:0},{offset:.25,color:v,opacity:.3},{offset:1,color:v,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:v,opacity:.55},{offset:.65,color:v,opacity:0},{offset:.95,color:v,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:v,opacity:.06},{offset:.83,color:v,opacity:.2},{offset:.95,color:v,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:v,opacity:0},{offset:.5,color:v,opacity:.3},{offset:.99,color:v,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:v,opacity:.2},{offset:.15,color:v,opacity:.15},{offset:.17,color:v,opacity:.35},{offset:.85,color:v,opacity:.05},{offset:.87,color:v,opacity:.15},{offset:.99,color:v,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};function le(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var i=Math.min(t.x1,e.x1),o=Math.max(t.x1,e.x1),r=Math.min(t.x2,e.x2),n=Math.max(t.x2,e.x2),s=Math.min(t.y1,e.y1),a=Math.max(t.y1,e.y1),p=Math.min(t.y2,e.y2),h=Math.max(t.y2,e.y2),l=[];return l[0]=new $t(o,s,r,a),l[1]=new $t(i,a,o,p),l[2]=new $t(r,a,n,p),l[3]=new $t(o,p,r,h),t.x1===i&&t.y1===s||e.x1===i&&e.y1===s?(l[4]=new $t(i,s,o,a),l[5]=new $t(r,p,n,h)):(l[4]=new $t(r,s,n,a),l[5]=new $t(i,p,o,h)),st(l,(function(t){return t.height()>0&&t.width()>0}))[0]}var ce=function(t){function e(e){t.call(this,e);var i=this.options;i.width=parseInt(i.width,10),i.height=parseInt(i.height,10),this.gradients={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(){var t=this.options,e=this.children,i=new $t(0,0,t.width,t.height);this.box=i.unpad(t.margin);for(var o=0;o<e.length;o++)e[o].reflow(i),i=le(i,e[o].box)||new $t},e.prototype.createVisual=function(){this.visual=new S.drawing.Group,this.createBackground()},e.prototype.createBackground=function(){var t=this.options,e=t.border||{},i=this.box.clone().pad(t.margin).unpad(e.width),o=S.drawing.Path.fromRect(i.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(o)},e.prototype.getRoot=function(){return this},e.prototype.createGradient=function(t){var e,i=this.gradients,o=Pt(t),r=he[t.gradient];if(i[o])e=i[o];else{var n=Object.assign({},r,t);"linear"===r.type?e=new S.drawing.LinearGradient(n):(t.innerRadius&&(n.stops=function(t){for(var e=t.stops,i=t.innerRadius/t.radius*100,o=e.length,r=[],n=0;n<o;n++){var s=Object.assign({},e[n]);s.offset=(s.offset*(100-i)+i)/100,r.push(s)}return r}(n)),(e=new S.drawing.RadialGradient(n)).supportVML=!1!==r.supportVML),i[o]=e}return e},e.prototype.cleanGradients=function(){var t=this.gradients;for(var e in t)t[e]._observers=[]},e.prototype.size=function(){var t=this.options;return new $t(0,0,t.width,t.height)},e}(re);It(ce,{width:600,height:400,background:v,border:{color:n,width:0},margin:z(5),zIndex:-2});var ue=ce,fe=function(t){function e(e){t.call(this,e),this._initDirection()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=m,this.elementAxis=x,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=x,this.elementAxis=m,this.groupSizeField="height",this.elementSizeField="width",this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},e.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},e.prototype.reflowChildren=function(){var t=this.box,e=this.elementAxis,i=this.groupAxis,o=this.elementSizeField,r=this.groupSizeField,n=this.groupOptions(),s=n.groups,a=n.groupsSize,p=n.maxGroupElementsSize,h=s.length,l=t[i+1]+this.alignStart(a,t[r]());if(h){for(var c=l,u=0;u<h;u++){for(var f=s[u],d=f.groupElements,g=t[e+1],y=d.length,v=0;v<y;v++){var m=d[v],x=this.elementSize(m),b=c+this.alignStart(x[r],f.groupSize),_=new $t;_[i+1]=b,_[i+2]=b+x[r],_[e+1]=g,_[e+2]=g+x[o],m.reflow(_),g+=x[o]+this.elementSpacing}c+=f.groupSize+this.groupSpacing}t[i+1]=l,t[i+2]=l+a,t[e+2]=t[e+1]+p}},e.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===d||o===s?i=e-t:o===a&&(i=(e-t)/2),i},e.prototype.groupOptions=function(){for(var t=this.box,e=this.children,i=this.elementSizeField,o=this.groupSizeField,r=this.elementSpacing,n=this.groupSpacing,s=Ot(t[i]()),a=e.length,p=[],h=0,l=0,c=0,u=0,f=[],d=0;d<a;d++){var g=e[d];g.box||g.reflow(t);var y=this.elementSize(g);this.options.wrap&&Ot(l+r+y[i])>s&&(p.push({groupElements:f,groupSize:h,groupElementsSize:l}),u=Math.max(u,l),c+=n+h,h=0,l=0,f=[]),h=Math.max(h,y[o]),l>0&&(l+=r),l+=y[i],f.push(g)}return p.push({groupElements:f,groupSize:h,groupElementsSize:l}),{groups:p,groupsSize:c+=h,maxGroupElementsSize:u=Math.max(u,l)}},e.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},e.prototype.createVisual=function(){},e}(re);It(fe,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var de=fe,ge=S.drawing.Text,ye=function(t){function e(e,i){t.call(this,i),this.content=e,this.reflow(new $t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=e.size=S.drawing.util.measureText(this.content,{font:e.font});this.baseline=i.baseline,this.box=new $t(t.x1,t.y1,t.x1+i.width,t.y1+i.height)},e.prototype.createVisual=function(){var t=this.options,e=t.font,i=t.color,o=t.opacity,r=t.cursor;this.visual=new ge(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:r})},e}(re);It(ye,{font:"12px sans-serif",color:n});var ve=ye;function me(t){var e=t.origin,i=t.bottomRight();return new $t(e.x,e.y,i.x,i.y)}var xe=/\n/m,be=function(t){function e(e,i,o){t.call(this,i),this.content=e,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new $t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initContainer=function(){var t=this.options,e=String(this.content).split(xe),i=new de({vertical:!0,align:t.align,wrap:!1}),o=j({},t,{opacity:1,animation:null});this.container=i,this.append(i);for(var r=0;r<e.length;r++){var n=new ve(e[r].trim(),o);i.append(n)}},e.prototype.reflow=function(e){var i=this.options,o=i.visual;if(this.container.options.align=i.align,o&&!this._boxReflow){var r=e;r.hasSize()||(this._boxReflow=!0,this.reflow(r),this._boxReflow=!1,r=this.box);var n=this.visual=o(this.visualContext(r));n&&(r=me(n.clippedBBox()||new S.geometry.Rect),n.options.zIndex=i.zIndex),this.box=this.contentBox=this.paddingBox=r}else if(t.prototype.reflow.call(this,e),i.rotation){var s=z(i.margin),a=this.box.unpad(s);this.targetBox=e,this.normalBox=a.clone(),(a=this.rotate()).translate(s.left-s.right,s.top-s.bottom),this.rotatedBox=a.clone(),a.pad(s)}},e.prototype.createVisual=function(){var t=this.options;if(this.visual=new S.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()){var e=S.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle());this.visual.append(e)}},e.prototype.renderVisual=function(){if(this.options.visible)if(this.options.visual){var e=this.visual;e&&!xt(e.options.noclip)&&(e.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()}else t.prototype.renderVisual.call(this)},e.prototype.visualContext=function(t){var e=this,i={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(i,this.data),i},e.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},e.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,m,t.align),this.align(this.targetBox,x,t.vAlign),this.box},e.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),i=e.x,o=e.y,r=this.rotatedBox.center();return S.geometry.transform().translate(r.x-i,r.y-o).rotate(t,[i,o])},e}(se),_e=function(t){function e(e){t.call(this,e),this.append(new be(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(e){t.prototype.reflow.call(this,e),this.box.snapTo(e,m)},e.buildTitle=function(t,i,o){var r,n=t;return"string"==typeof t&&(n={text:t}),(n=Object.assign({visible:!0},o,n))&&n.visible&&n.text&&(r=new e(n),i.append(r)),r},e}(re);It(_e,{color:n,position:g,align:a,margin:z(5),padding:z(5)});var we=_e,Ae=function(t){function e(e,i,o,r,n){t.call(this,i,n),this.text=i,this.value=e,this.index=o,this.dataItem=r,this.reflow(new $t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.visualContext=function(e){var i=t.prototype.visualContext.call(this,e);return i.value=this.value,i.dataItem=this.dataItem,i.format=this.options.format,i.culture=this.options.culture,i},e.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:At(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},e.prototype.rotate=function(){if(this.options.alignRotation!==a){var e=this.normalBox.toRect(),i=this.rotationTransform();this.box=me(e.bbox(i.matrix()))}else t.prototype.rotate.call(this);return this.box},e.prototype.rotationTransform=function(){var e=this.options,i=e.rotation;if(!i)return null;if(e.alignRotation===a)return t.prototype.rotationTransform.call(this);var o=S.geometry.transform().rotate(i).matrix(),r=this.normalBox.toRect(),n=this.targetBox.toRect(),p=e.rotationOrigin||g,h=p===g||p===s?m:x,l=p===g||p===s?x:m,u=p===g||p===c?n.origin:n.bottomRight(),f=r.topLeft().transformCopy(o),d=r.topRight().transformCopy(o),y=r.bottomRight().transformCopy(o),v=r.bottomLeft().transformCopy(o),b=S.geometry.Rect.fromPoints(f,d,y,v),_={};_[l]=n.origin[l]-b.origin[l];var w,A,k=Math.abs(f[l]+_[l]-u[l]),C=Math.abs(d[l]+_[l]-u[l]);Ot(k,10)===Ot(C,10)?(w=f,A=d):C<k?(w=d,A=y):(w=f,A=v);var P=w[h]+(A[h]-w[h])/2;return _[h]=n.center()[h]-P,S.geometry.transform().translate(_.x,_.y).rotate(i)},e}(be);It(Ae,{_autoReflow:!1});var Se=Ae,ke=function(t){function e(e,i,o){t.call(this,i),this.fields=e,this.chartService=o,this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hide=function(){this.options.visible=!1},e.prototype.show=function(){this.options.visible=!0},e.prototype.render=function(){var t=this,e=this.options;if(e.visible){var i,o,r=e.label,n=e.icon,s=new $t,a=function(){return t},h=n.size,l=this.fields.text;if(xt(r)&&r.visible){var c=it(r);c?l=c(this.fields):r.format&&(l=this.chartService.format.auto(r.format,l)),r.color||(r.color="inside"===r.position?"#fff":n.background),this.label=new be(l,j({},r)),this.label.aliasFor=a,"inside"!==r.position||xt(h)||(n.type===p?h=Math.max(this.label.box.width(),this.label.box.height()):(i=this.label.box.width(),o=this.label.box.height()),s.wrap(this.label.box))}n.width=i||h||7,n.height=o||h||7;var u=new pe(j({},n));u.aliasFor=a,this.marker=u,this.append(u),this.label&&this.append(this.label),u.reflow(new $t),this.wrapperBox=s.wrap(u.box)}},e.prototype.reflow=function(t){var e,i,o,r=this.options,n=this.label,a=this.marker,p=this.wrapperBox,h=t.center(),l=r.line.length,u=r.position;r.visible&&(lt(u,[c,d])?u===c?(o=p.alignTo(t,u).translate(-l,t.center().y-p.center().y),r.line.visible&&(e=[t.x1,h.y],this.linePoints=[e,[o.x2,h.y]],i=o.clone().wrapPoint(e))):(o=p.alignTo(t,u).translate(l,t.center().y-p.center().y),r.line.visible&&(e=[t.x2,h.y],this.linePoints=[e,[o.x1,h.y]],i=o.clone().wrapPoint(e))):u===s?(o=p.alignTo(t,u).translate(t.center().x-p.center().x,l),r.line.visible&&(e=[h.x,t.y2],this.linePoints=[e,[h.x,o.y1]],i=o.clone().wrapPoint(e))):(o=p.alignTo(t,u).translate(t.center().x-p.center().x,-l),r.line.visible&&(e=[h.x,t.y1],this.linePoints=[e,[h.x,o.y2]],i=o.clone().wrapPoint(e))),a&&a.reflow(o),n&&(n.reflow(o),a&&("outside"===r.label.position&&n.box.alignTo(a.box,u),n.reflow(n.box))),this.contentBox=o,this.targetBox=t,this.box=i||o)},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},e.prototype.renderVisual=function(){var e=this,i=this.options,o=i.visual;i.visible&&o?(this.visual=o(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:i.background,border:i.background,icon:i.icon,label:i.label,line:i.line,position:i.position,visible:i.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):t.prototype.renderVisual.call(this)},e.prototype.createLine=function(){var t=this.options.line;if(this.linePoints){var e=S.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}});k(e),this.visual.append(e)}},e.prototype.click=function(t,e){var i=this.eventArgs(e);t.trigger("noteClick",i)||e.preventDefault()},e.prototype.over=function(t,e){var i=this.eventArgs(e);t.trigger("noteHover",i)||e.preventDefault()},e.prototype.out=function(t,e){var i=this.eventArgs(e);t.trigger("noteLeave",i)},e.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:At(t),text:xt(e.label)?e.label.text:"",visual:this.visual})},e}(se);It(ke,{icon:{visible:!0,type:p},label:{position:"inside",visible:!0,align:a,vAlign:a},line:{visible:!0},visible:!0,position:g,zIndex:2});var Ce=ke;function Pe(t,e){var i=t.tickX,o=t.tickY,r=t.position,n=new S.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(i,r).lineTo(i+e.size,r):n.moveTo(r,o).lineTo(r,o+e.size),k(n),n}function Me(t,e){var i=t.lineStart,o=t.lineEnd,r=t.position,n=new S.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?n.moveTo(i,r).lineTo(o,r):n.moveTo(r,i).lineTo(r,o),k(n),n}var Oe=function(t){function e(e,i){void 0===i&&(i=new K),t.call(this,e),this.chartService=i,this.options.visible||(this.options=j({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=j({},{color:this.options.line.color,width:this.options.line.width,visible:"none"!==this.options.minorTickType},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=j({},{color:this.options.line.color,width:this.options.line.width,visible:"none"!==this.options.majorTickType},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){},e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},e.prototype.normalizeLabelRotation=function(t){var e=t.rotation;B(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},e.prototype.createLabels=function(){var t=this.options,e=t.vertical?d:a,i=j({},t.labels,{align:e,zIndex:t.zIndex}),o=Math.max(1,i.step);if(this.clearLabels(),i.visible){this.normalizeLabelRotation(i),"auto"===i.rotation&&(i.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=o){var s={index:n,count:r.max},p=this.createAxisLabel(n,i,s);p&&(this.append(p),this.labels.push(p))}}},e.prototype.clearLabels=function(){this.children=st(this.children,(function(t){return!(t instanceof Se)})),this.labels=[]},e.prototype.clearTitle=function(){var t=this;this.title&&(this.children=st(this.children,(function(e){return e!==t.title})),this.title=void 0)},e.prototype.clear=function(){this.clearLabels(),this.clearTitle()},e.prototype.lineBox=function(){var t=this.options,e=this.box,i=t.vertical,o=t.labels.mirror,r=o?e.x1:e.x2,n=o?e.y2:e.y1,s=t.line.width||0;return i?new $t(r,e.y1,r,e.y2-s):new $t(e.x1,n,e.x2-s,n)},e.prototype.createTitle=function(){var t=this.options,e=j({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);if(e.visible&&e.text){var i=new be(e.text,e);this.append(i),this.title=i}},e.prototype.createNotes=function(){var t=this.options,e=t.notes,i=e.data||[];this.notes=[];for(var o=0;o<i.length;o++){var r=j({},e,i[o]);r.value=this.parseNoteValue(r.value);var n=new Ce({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);n.options.visible&&(xt(n.options.position)?t.vertical&&!lt(n.options.position,[c,d])?n.options.position=t.reverse?c:d:t.vertical||lt(n.options.position,[g,s])||(n.options.position=t.reverse?s:g):t.vertical?n.options.position=t.reverse?c:d:n.options.position=t.reverse?s:g,this.append(n),this.notes.push(n))}},e.prototype.parseNoteValue=function(t){return t},e.prototype.renderVisual=function(){t.prototype.renderVisual.call(this),this.createPlotBands()},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.createBackground(),this.createLine()},e.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new S.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},e.prototype.createTicks=function(t){var e=this.options,i=this.lineBox(),o=e.labels.mirror,r=e.majorTicks.visible?e.majorUnit:0,n={vertical:e.vertical};function s(e,r,s){var a=e.length,p=Math.max(1,r.step);if(r.visible)for(var h=r.skip;h<a;h+=p)xt(s)&&h%s==0||(n.tickX=o?i.x2:i.x2-r.size,n.tickY=o?i.y1-r.size:i.y1,n.position=e[h],t.append(Pe(n,r)))}s(this.getMajorTickPositions(),e.majorTicks),s(this.getMinorTickPositions(),e.minorTicks,r/e.minorUnit)},e.prototype.createLine=function(){var t=this.options,e=t.line,i=this.lineBox();if(e.width>0&&e.visible){var o=new S.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});o.moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t._alignLines&&k(o);var r=this._lineGroup=new S.drawing.Group;r.append(o),this.visual.append(r),this.createTicks(r)}},e.prototype.getActualTickSize=function(){var t=this.options,e=0;return t.majorTicks.visible&&t.minorTicks.visible?e=Math.max(t.majorTicks.size,t.minorTicks.size):t.majorTicks.visible?e=t.majorTicks.size:t.minorTicks.visible&&(e=t.minorTicks.size),e},e.prototype.createBackground=function(){var t=this.options,e=this.box,i=t.background;i&&(this._backgroundPath=S.drawing.Path.fromRect(e.toRect(),{fill:{color:i},stroke:null}),this.visual.append(this._backgroundPath))},e.prototype.createPlotBands=function(){var t=this,e=this.options,i=e.plotBands||[],o=e.vertical,r=this.plotArea;if(0!==i.length){for(var n=this._plotbandGroup=new S.drawing.Group({zIndex:-1}),s=st(this.pane.axes,(function(e){return e.options.vertical!==t.options.vertical}))[0],a=0;a<i.length;a++){var p=i[a],h=void 0,l=void 0,u=p.label,f=void 0;if(o?(h=(s||r.axisX).lineBox(),l=t.getSlot(p.from,p.to,!0)):(h=t.getSlot(p.from,p.to,!0),l=(s||r.axisY).lineBox()),u&&(u.vAlign=u.position||c,f=t.createPlotBandLabel(u,p,new $t(h.x1,l.y1,h.x2,l.y2))),0!==h.width()&&0!==l.height()){var d=new S.geometry.Rect([h.x1,l.y1],[h.width(),l.height()]),g=S.drawing.Path.fromRect(d,{fill:{color:p.color,opacity:p.opacity},stroke:null});n.append(g),f&&n.append(f)}}this.appendVisual(n)}},e.prototype.createPlotBandLabel=function(t,e,i){if(!1===t.visible)return null;var o,r=t.text;if(xt(t)&&t.visible){var n=it(t);n?r=n({text:r,item:e}):t.format&&(r=this.chartService.format.auto(t.format,r)),t.color||(t.color=this.options.labels.color)}return(o=new be(r,t)).reflow(i),o.renderVisual(),o.visual},e.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.minorUnit,n=e.vertical,s=t.options.line.visible,a=o.visible?e.majorUnit:0,p=t.lineBox(),h=p[n?"y1":"x1"],l={lineStart:p[n?"x1":"y1"],lineEnd:p[n?"x2":"y2"],vertical:n},c=[],u=this.gridLinesVisual();function f(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r){var a=Ot(t[n]);lt(a,c)||n%i==0||s&&h===a||(l.position=a,u.append(Me(l,e)),c.push(a))}}return f(this.getMajorTickPositions(),o),f(this.getMinorTickPositions(),i,a/r),u.children},e.prototype.reflow=function(t){for(var e=this.options,i=this.labels,o=this.title,r=e.vertical,n=i.length,s=r?"width":"height",a=o?o.box[s]():0,p=this.getActualTickSize()+e.margin+a,h=((this.getRoot()||{}).box||t)[s](),l=0,c=0;c<n;c++){var u=i[c].box[s]();u+p<=h&&(l=Math.max(l,u))}this.box=r?new $t(t.x1,t.y1,t.x1+l+p,t.y2):new $t(t.x1,t.y1,t.x2,t.y1+l+p),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},e.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},e.prototype.labelTickIndex=function(t){return t.index},e.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,i=this.labelsBetweenTicks(),o=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],p=this.labelTickIndex(a),h=o?a.box.height():a.box.width(),l=n[p],c=n[p+1],u=void 0,f=void 0;if(o){if(i)u=l+(c-l)/2-h/2;else u=l-h/2;f=u}else i?(u=l,f=c):f=(u=l-h/2)+h;this.positionLabel(a,r,u,f)}},e.prototype.positionLabel=function(t,e,i,o){void 0===o&&(o=i);var r,n=this.options,a=n.vertical,p=this.lineBox(),h=this.getActualTickSize()+n.margin;if(a){var l=p.x2;e?(l+=h,t.options.rotationOrigin=c):(l-=h+t.box.width(),t.options.rotationOrigin=d),r=t.box.move(l,i)}else{var u=p.y1;e?(u-=h+t.box.height(),t.options.rotationOrigin=s):(u+=h,t.options.rotationOrigin=g),r=new $t(i,u,o,u+t.box.height())}t.reflow(r)},e.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},e.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,i=Math.min(e.length,t.length-1),o=0,r=0;r<i;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,a=this.autoRotateLabelAngle(s,n);if(0!==a&&(o=a),-90===o)break}if(0!==o){for(var p=0;p<e.length;p++)e[p].options.rotation=o,e[p].reflow(new $t);return!0}},e.prototype.arrangeTitle=function(){var t=this.options,e=this.title,i=t.labels.mirror,o=t.vertical;e&&(o?(e.options.align=i?d:c,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?g:s),e.reflow(this.box))},e.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],i=e.options.value,o=void 0;xt(i)?(this.shouldRenderNote(i)?e.show():e.hide(),o=this.noteSlot(i)):e.hide(),e.reflow(o||this.lineBox())}},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.alignTo=function(t){var e=t.lineBox(),i=this.options.vertical,o=i?x:m;this.box.snapTo(e,o),i?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[o+1]-=this.lineBox()[o+1]-e[o+1],this.box[o+2]-=this.lineBox()[o+2]-e[o+2]},e.prototype.axisLabelText=function(t,e,i){var o,r=this,n=it(e),s=function(){return e.format?r.chartService.format.localeAuto(e.format,[t],e.culture):t};n?o=n(Object.assign({},i,{get text(){return s()},value:t,format:e.format,culture:e.culture})):o=s();return o},e.prototype.slot=function(t,e,i){var o=this.getSlot(t,e,i);if(o)return o.toRect()},e.prototype.contentBox=function(){var t=this.box.clone(),e=this.labels;if(e.length){var i=this.options.vertical?x:m;if(this.chartService.isPannable(i)){var o=this.maxLabelOffset();t[i+1]-=o.start,t[i+2]+=o.end}else{e[0].options.visible&&t.wrap(e[0].box);var r=e[e.length-1];r.options.visible&&t.wrap(r.box)}}return t},e.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,i=t.reverse,o=this.labelsBetweenTicks(),r=this.getLabelsTickPositions(),n=e?x:m,s=this.labels,a=i?1:0,p=i?0:1,h=0,l=0,c=0;c<s.length;c++){var u=s[c],f=this.labelTickIndex(u),d=void 0,g=void 0;o?(d=r[f+a],g=r[f+p]):d=g=r[f],h=Math.max(h,d-u.box[n+1]),l=Math.max(l,u.box[n+2]-g)}return{start:h,end:l}},e.prototype.limitRange=function(t,e,i,o,r){var n=this.options;if(t<i&&r<0&&(!xt(n.min)||n.min<=i)||o<e&&r>0&&(!xt(n.max)||o<=n.max))return null;if(e<i&&r>0||o<t&&r<0)return{min:t,max:e};var s=e-t,a=t,p=e;return t<i&&r<0?(a=Ct(t,i,o),p=Ct(t+s,i+s,o)):e>o&&r>0&&(p=Ct(e,i,o),a=Ct(e-s,i,o-s)),{min:a,max:p}},e.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},e.prototype.labelsBetweenTicks=function(){return!this.options.justified},e.prototype.prepareUserOptions=function(){},e}(re);It(Oe,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:n,visible:!0},title:{visible:!0,position:a},majorTicks:{align:"outside",size:4,skip:0,step:1},minorTicks:{align:"outside",size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:"outside",minorTickType:"none",majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:n,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var Te=Oe,Re="days",je="years",Be={years:31536e6,months:26784e5,weeks:6048e5,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1};function Ie(t,e){return t.getTime()-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset())}function Ve(t,e){return new Date(t.getTime()+e)}function Le(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Ee(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),!0)}function ze(t,e,i,o){var r=t;if(t){var n=Le(t),s=n.getHours();i===je?Ee(r=new Date(n.getFullYear()+e,0,1),0):"months"===i?Ee(r=new Date(n.getFullYear(),n.getMonth()+e,1),s):"weeks"===i?Ee(r=ze(function(t,e){void 0===e&&(e=0);var i=0,o=t.getDay();if(!isNaN(o))for(;o!==e;)0===o?o=6:o--,i++;return Ve(t,864e5*-i)}(n,o),7*e,Re),s):i===Re?Ee(r=new Date(n.getFullYear(),n.getMonth(),n.getDate()+e),s):"hours"===i?r=function(t,e){var i=new Date(t);i.setMinutes(0,0,0);var o=6e4*(t.getTimezoneOffset()-i.getTimezoneOffset());return Ve(i,o+36e5*e)}(n,e):"minutes"===i?(r=Ve(n,6e4*e)).getSeconds()>0&&r.setSeconds(0):"seconds"===i?r=Ve(n,1e3*e):"milliseconds"===i&&(r=Ve(n,e)),"milliseconds"!==i&&r.getMilliseconds()>0&&r.setMilliseconds(0)}return r}function De(t,e,i){return ze(Le(t),0,e,i)}function Fe(t,e,i){var o=Le(t);return o&&De(o,e,i).getTime()===o.getTime()?o:ze(o,1,e,i)}function Ue(t,e){return t&&e?t.getTime()-e.getTime():-1}function Ge(t,e){return t.getTime()-e}function He(t){if(b(t)){for(var e=[],i=0;i<t.length;i++)e.push(He(t[i]));return e}if(t)return Le(t).getTime()}function Ne(t,e){return t&&e?He(t)===He(e):t===e}function We(t,e,i){return Ie(t,e)/Be[i]}function qe(t,e,i,o){var r=Le(t),n=Le(e);return("months"===i?r.getMonth()-n.getMonth()+12*(r.getFullYear()-n.getFullYear())+We(r,new Date(r.getFullYear(),r.getMonth()),Re)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():i===je?r.getFullYear()-n.getFullYear()+qe(r,new Date(r.getFullYear(),0),"months",1)/12:i===Re||"weeks"===i?We(r,n,i):Ge(r,e)/Be[i])/o}function Xe(t,e,i){return i===je?e.getFullYear()-t.getFullYear():"months"===i?12*Xe(t,e,je)+e.getMonth()-t.getMonth():i===Re?Math.floor(Ge(e,t)/864e5):Math.floor(Ge(e,t)/Be[i])}function Ye(t,e){return M(e)&&t.parseDate(e)||Le(e)}function Ze(t,e){if(b(e)){for(var i=[],o=0;o<e.length;o++)i.push(Ye(t,e[o]));return i}return Ye(t,e)}function Ke(t,e){return P(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}var $e=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this._ticks={}},e.prototype.categoriesHash=function(){return""},e.prototype.clone=function(){var t=new e(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},e.prototype.initUserOptions=function(t){var e=t.categories||[],i=xt(t.min),o=xt(t.max);if(t.srcCategories=t.categories=e,(i||o)&&e.length){var r,n=i?Math.floor(t.min):0;r=o?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(n,r)}return t},e.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:P(t.min)?t.min%1:0,max:P(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},e.prototype.totalRangeIndices=function(t){var e,i=this.options,o=P(i.min)?i.min:0;if(e=P(i.max)?i.max:P(i.min)?o+i.categories.length:this.totalRange().max||1,t){var r=this.totalRange();o=Ct(o,0,r.max),e=Ct(e,0,r.max)}return{min:o,max:e}},e.prototype.range=function(){var t=this.options;return{min:P(t.min)?t.min:0,max:P(t.max)?t.max:this.totalRange().max}},e.prototype.roundedRange=function(){return this.range()},e.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},e.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,i=t.max,o=this.lineBox();return{scale:(this.options.vertical?o.height():o.width())/(i-e||1)*(this.options.reverse?-1:1),box:o,min:e,max:i}},e.prototype.arrangeLabels=function(){t.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},e.prototype.hideOutOfRangeLabels=function(){var t=this.box,e=this.labels;if(e.length>0){var i=this.options.vertical?x:m,o=t[i+1],r=t[i+2],n=e[0],s=kt(e);(n.box[i+1]>r||n.box[i+2]<o)&&(n.options.visible=!1),(s.box[i+1]>r||s.box[i+2]<o)&&(s.options.visible=!1)}},e.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},e.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},e.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},e.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),i=e.min,o=e.max,r=Math.ceil(o),n=Math.floor(i),s=[];n<=r;)s.push(n),n+=t;return s},e.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,o=e.reverse,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,p=s[(i?x:m)+(o?2:1)],h=this.tickIndices(t),l=[],c=0;c<h.length;c++)l.push(p+Ot(n*(h[c]-a),3));return l},e.prototype.getTicks=function(){var t=this.options,e=this._ticks,i=this.rangeIndices(),o=this.lineBox(),r=o.getHash()+i.min+","+i.max+t.reverse+t.justified;if(e._hash!==r){var n=t.minorTicks.visible||t.minorGridLines.visible;e._hash=r,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,o),e.minorTicks=n?this.filterOutOfRangePositions(this.getTickPositions(.5),o):[]}return e},e.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var i=this.options.vertical?x:m,o=function(t){return e[i+1]<=t&&t<=e[i+2]},r=t.length-1,n=0;!o(t[n])&&n<=r;)n++;for(var s=r;!o(t[s])&&s>=0;)s--;return t.slice(n,s+1)},e.prototype.getSlot=function(t,e,i){var o=this.options,r=o.reverse,n=o.justified,s=o.vertical,a=this.scaleOptions(),p=a.scale,h=a.box,l=a.min,c=s?x:m,u=h[c+(r?2:1)],f=h.clone(),d=!xt(e),g=Rt(t,0),y=Rt(e,g);y=Math.max(y-1,g);var v=u+(g-l)*p,b=u+((y=Math.max(g,y))+1-l)*p;return d&&n&&(b=v),i&&(v=Ct(v,h[c+1],h[c+2]),b=Ct(b,h[c+1],h[c+2])),f[c+1]=r?b:v,f[c+2]=r?v:b,f},e.prototype.limitSlot=function(t){var e=this.options.vertical?x:m,i=this.lineBox(),o=t.clone();return o[e+1]=Ct(t[e+1],i[e+1],i[e+2]),o[e+2]=Ct(t[e+2],i[e+1],i[e+2]),o},e.prototype.slot=function(e,i,o){var r=Math.floor(this.options.min||0),n=e,s=i;return"string"==typeof n?n=this.categoryIndex(n):P(n)&&(n-=r),"string"==typeof s?s=this.categoryIndex(s):P(s)&&(s-=r),t.prototype.slot.call(this,n,s,o)},e.prototype.pointCategoryIndex=function(t){var e=this.options,i=e.reverse,o=e.justified,r=e.vertical?x:m,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,h=n.max,l=i?h:p,c=a[r+1],u=a[r+2],f=t[r];if(f<c||f>u)return null;var d=l+(f-c)/s,g=d%1;return o?d=Math.round(d):0===g&&d>0&&d--,Math.floor(d)},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.options.categories[e]},e.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},e.prototype.categoryAt=function(t,e){var i=this.options;return(e?i.srcCategories:i.categories)[t]},e.prototype.categoriesCount=function(){return(this.options.categories||[]).length},e.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),o=e.vertical?i.height():i.width(),r=e.categories.length,n=Ot(t/(o/r),10);return{min:n,max:r+n}},e.prototype.zoomRange=function(t){var e=this.totalRangeIndices(),i=this.totalRange(),o=i.min,r=i.max,n=Ct(e.min+t,o,r),s=Ct(e.max-t,o,r);if(s-n>0)return{min:n,max:s}},e.prototype.scaleRange=function(t){var e=this.options.categories.length,i=t*e;return{min:-i,max:e+i}},e.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},e.prototype.labelsRange=function(){var t=this.options,e=t.justified,i=t.labels,o=this.totalRangeIndices(!0),r=o.min,n=o.max,s=Math.floor(r);return e?(r=Math.ceil(r),n=Math.floor(n)):(r=Math.floor(r),n=Math.ceil(n)),{min:(r>i.skip?i.skip+i.step*Math.ceil((r-i.skip)/i.step):i.skip)-s,max:(t.categories.length?n+(e?1:0):0)-s}},e.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=o.dataItems?o.dataItems[t]:null,n=Rt(o.categories[t],"");i.dataItem=r;var s=this.axisLabelText(n,e,i);return new Se(n,s,t,r,e)},e.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},e.prototype.noteSlot=function(t){var e=this.options,i=t-Math.floor(e.min||0);return this.getSlot(i)},e.prototype.arrangeNotes=function(){t.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},e.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var i=this.options.vertical?x:m,o=e[i+1],r=e[i+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[i+1]||s.box[i+2]<o)&&s.hide()}},e.prototype.pan=function(t){var e=this.totalRangeIndices(!0),i=this.scaleOptions().scale,o=Ot(t/i,10),r=this.totalRange(),n=e.min+o,s=e.max+o;return this.limitRange(n,s,0,r.max,o)},e.prototype.pointsRange=function(t,e){var i=this.options,o=i.reverse,r=i.vertical?x:m,n=this.totalRangeIndices(!0),s=this.scaleOptions(),a=s.scale,p=s.box[r+(o?2:1)],h=t[r]-p,l=e[r]-p,c=n.min+h/a,u=n.min+l/a,f=Math.min(c,u),d=Math.max(c,u);if(d-f>=.01)return{min:f,max:d}},e.prototype.valueRange=function(){return this.range()},e.prototype.totalIndex=function(t){var e=this.options;return this._categoriesMap?this._categoriesMap.get(t):function(t,e){if(t instanceof Date){for(var i=e.length,o=0;o<i;o++)if(Ne(e[o],t))return o;return-1}return e.indexOf(t)}(t,e.srcCategories)},e.prototype.currentRangeIndices=function(){var t=this.options,e=0;return P(t.min)&&(e=Math.floor(t.min)),{min:e,max:P(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},e.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new ht,e=this.options.srcCategories,i=0;i<e.length;i++)t.set(e[i],i)},e.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},e}(Te);It($e,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:n},labels:{zIndex:1},justified:!1,_deferLabels:!0});var Qe=$e,Je={milliseconds:"HH:mm:ss.fff",seconds:"HH:mm:ss",minutes:"HH:mm",hours:"HH:mm",days:"M/d",weeks:"M/d",months:"MMM 'yy",years:"yyyy"},ti=["milliseconds","seconds","minutes","hours",Re,"weeks","months",je];function ei(t){var e=t._range;return e||((e=t._range=Vt(t)).min=Le(e.min),e.max=Le(e.max)),e}var ii=function(t){this.options=t};ii.prototype.displayIndices=function(){return{min:0,max:1}},ii.prototype.displayRange=function(){return{}},ii.prototype.total=function(){return{}},ii.prototype.valueRange=function(){return{}},ii.prototype.valueIndex=function(){return-1},ii.prototype.values=function(){return[]},ii.prototype.totalIndex=function(){return-1},ii.prototype.valuesCount=function(){return 0},ii.prototype.totalCount=function(){return 0},ii.prototype.dateAt=function(){return null};var oi=function(t,e,i){this.options=i,i.baseUnitStep=i.baseUnitStep||1;var o=i.roundToBaseUnit,r=i.justified;this.start=ze(t,0,i.baseUnit,i.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&Ne(e,n)&&!i.justifyEnd;this.end=this.roundToTotalStep(e,!r,s?1:0);var a=i.min||t;this.valueStart=this.roundToTotalStep(a),this.displayStart=o?this.valueStart:a;var p=i.max;if(p){var h=!r&&Ne(p,this.roundToTotalStep(p))?-1:0;this.valueEnd=this.roundToTotalStep(p,!1,h),this.displayEnd=o?this.roundToTotalStep(p,!r):i.max}else this.valueEnd=n,this.displayEnd=o||s?this.end:e;this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))};function ri(t,e,i){for(var o,r,n,s=ei(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,h=t.maxDateGroups,l="fit"===t.baseUnit,c=e?ti.indexOf(e):0,u=l?ti[c++]:t.baseUnit,f=a/Be[u],d=f;!r||f>=h;){o=o||p[u].slice(0);do{n=o.shift()}while(n&&e===u&&n<i);if(n)f=d/(r=n);else{if(u===kt(ti)){r=Math.ceil(d/h);break}if(!l){f>h&&(r=Math.ceil(d/h));break}u=ti[c++]||kt(ti),d=a/Be[u],o=null}}t.baseUnitStep=r,t.baseUnit=u}function ni(t){var e=(t.baseUnit||"").toLowerCase();return"fit"!==e&&!lt(e,ti)&&function(t){for(var e,i,o=t.categories,r=xt(o)?o.length:0,n=u,s=0;s<r;s++){var a=o[s];if(a&&e){var p=Ie(a,e);p>0&&(i=(n=Math.min(n,p))>=31536e6?je:n>=24192e5?"months":n>=6048e5?"weeks":n>=864e5?Re:n>=36e5?"hours":n>=6e4?"minutes":"seconds")}e=a}t.baseUnit=i||Re}(t),"fit"!==e&&"auto"!==t.baseUnitStep||ri(t),t}oi.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},oi.prototype.displayIndices=function(){if(!this._indices){var t=this.options,e=t.baseUnit,i=t.baseUnitStep,o=qe(this.displayStart,this.valueStart,e,i),r=qe(this.displayEnd,this.valueStart,e,i);this._indices={min:o,max:r}}return this._indices},oi.prototype.total=function(){return{min:this.start,max:this.end}},oi.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},oi.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},oi.prototype.valueIndex=function(t){var e=this.options;return Math.floor(qe(t,this.valueStart,e.baseUnit,e.baseUnitStep))},oi.prototype.totalIndex=function(t){var e=this.options;return Math.floor(qe(t,this.start,e.baseUnit,e.baseUnitStep))},oi.prototype.dateIndex=function(t){var e=this.options;return qe(t,this.valueStart,e.baseUnit,e.baseUnitStep)},oi.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},oi.prototype.values=function(){var t=this._values;if(!t){var e=this.options,i=this.valueRange();this._values=t=[];for(var o=i.min;o<=i.max;)t.push(o),o=ze(o,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},oi.prototype.dateAt=function(t,e){var i=this.options;return ze(e?this.start:this.valueStart,i.baseUnitStep*t,i.baseUnit,i.weekStartDay)},oi.prototype.roundToTotalStep=function(t,e,i){var o=this.options,r=o.baseUnit,n=o.baseUnitStep,s=o.weekStartDay,a=this.start,p=qe(t,a,r,n),h=e?Math.ceil(p):Math.floor(p);return i&&(h+=i),ze(a,h*n,r,s)};var si=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e(Object.assign({},this.options),this.chartService);return t.createLabels(),t},e.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},e.prototype.initUserOptions=function(t){return t},e.prototype.initFields=function(){t.prototype.initFields.call(this);var e=this.chartService,i=e.intl,o=this.options,r=o.categories||[];if(r._parsed||((r=Ze(i,r))._parsed=!0),o=j({roundToBaseUnit:!0},o,{categories:r,min:Ye(i,o.min),max:Ye(i,o.max),weekStartDay:Ke(o,i)}),e.panning&&e.isPannable(o.vertical?x:m)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,this.options=o,o.srcCategories=r,r.length>0){var n=ei(r),s=o.maxDivisions;if(this.dataRange=new oi(n.min,n.max,ni(o)),s){var a=this.dataRange.displayRange(),p=Object.assign({},o,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:a.min,max:a.max,maxDateGroups:s}),h=this.dataRange.options;ri(p,h.baseUnit,h.baseUnitStep),this.divisionRange=new oi(n.min,n.max,p)}else this.divisionRange=this.dataRange}else o.baseUnit=o.baseUnit||Re,this.dataRange=this.divisionRange=new ii(o);this.rangeLabels=[]},e.prototype.tickIndices=function(e){var i=this.dataRange,o=this.divisionRange,r=o.valuesCount();if(!this.options.maxDivisions||!r)return t.prototype.tickIndices.call(this,e);var n=[],s=o.values(),a=0;this.options.justified||(s=s.concat(o.dateAt(r)),a=.5);for(var p=0;p<s.length;p++)if(n.push(i.dateIndex(s[p])+a),1!==e&&p>=1){var h=n.length-1;n.splice(p,0,n[h-1]+(n[h]-n[h-1])*e)}return n},e.prototype.shouldRenderNote=function(t){var e=this.range(),i=this.options.categories||[];return Ue(t,e.min)>=0&&Ue(t,e.max)<=0&&i.length},e.prototype.parseNoteValue=function(t){return Ye(this.chartService.intl,t)},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.translateRange=function(t){var e=this.options,i=e.baseUnit,o=e.weekStartDay,r=e.vertical,n=this.lineBox(),s=r?n.height():n.width(),a=this.range(),p=s/(a.max-a.min),h=Ot(t/p,10);if(a.min&&a.max){var l=Ve(e.min||a.min,h),c=Ve(e.max||a.max,h);a={min:ze(l,0,i,o),max:ze(c,0,i,o)}}return a},e.prototype.scaleRange=function(t){var e=Math.abs(t),i=this.range(),o=i.min,r=i.max;if(o&&r){for(;e--;){var n=Ge(o,r),s=Math.round(.1*n);t<0?(o=Ve(o,s),r=Ve(r,-s)):(o=Ve(o,-s),r=Ve(r,s))}i={min:o,max:r}}return i},e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},e.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,i=this.lineBox(),o=e.vertical?i.height():i.width(),r=this.dataRange.displayRange(),n=r.min,s=r.max,a=this.dataRange.total(),p=Ot(t/(o/(s-n)),10)*(e.reverse?-1:1),h=Ve(n,p),l=Ve(s,p),c=this.limitRange(He(h),He(l),He(a.min),He(a.max),p);return c?(c.min=Le(c.min),c.max=Le(c.max),c.baseUnit=e.baseUnit,c.baseUnitStep=e.baseUnitStep||1,c.userSetBaseUnit=e.userSetBaseUnit,c.userSetBaseUnitStep=e.userSetBaseUnitStep,c):void 0},e.prototype.pointsRange=function(e,i){if(this.isEmpty())return null;var o=t.prototype.pointsRange.call(this,e,i),r=this.dataRange.displayRange(),n=this.dataRange.displayIndices(),s=Ge(r.max,r.min)/(n.max-n.min),a=this.options;return{min:Ve(r.min,o.min*s),max:Ve(r.min,o.max*s),baseUnit:a.userSetBaseUnit||a.baseUnit,baseUnitStep:a.userSetBaseUnitStep||a.baseUnitStep}},e.prototype.zoomRange=function(t){if(this.isEmpty())return null;var e=this.options,i="fit"===e.userSetBaseUnit,o=this.dataRange.total(),r=this.dataRange.displayRange(),n=r.min,s=r.max,a=this.dataRange.options,p=a.weekStartDay,h=a.baseUnit,l=a.baseUnitStep,c=ze(n,t*l,h,p),u=ze(s,-t*l,h,p);if(i){var f,d,g=e.autoBaseUnitSteps,y=e.maxDateGroups,v=kt(g[h])*y*Be[h],m=Ge(s,n),x=Ge(u,c),b=ti.indexOf(h);if(x<Be[h]&&"milliseconds"!==h)h=ti[b-1],c=Ve(n,d=(m-(y-1)*(f=kt(g[h]))*Be[h])/2),u=Ve(s,-d);else if(x>v&&h!==je){var _=0;do{b++,h=ti[b],_=0,d=2*Be[h];do{f=g[h][_],_++}while(_<g[h].length&&d*f<m)}while(h!==je&&d*f<m);(d=(d*f-m)/2)>0&&(c=Ve(n,-d),u=Ve(s,d),c=Ve(c,Ct(u,o.min,o.max)-u),u=Ve(u,Ct(c,o.min,o.max)-c))}}return c<o.min&&(c=o.min),u>o.max&&(u=o.max),c&&u&&Ge(u,c)>0?{min:c,max:u,baseUnit:e.userSetBaseUnit||e.baseUnit,baseUnitStep:e.userSetBaseUnitStep||e.baseUnitStep}:void 0},e.prototype.range=function(){return this.dataRange.displayRange()},e.prototype.createLabels=function(){t.prototype.createLabels.call(this),this.createRangeLabels()},e.prototype.clearLabels=function(){t.prototype.clearLabels.call(this),this.rangeLabels=[]},e.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),t.prototype.arrangeLabels.call(this)},e.prototype.arrangeRangeLabels=function(){var t=this.options,e=this.rangeLabels;if(0!==e.length){var i=this.lineBox(),o=t.vertical,r=t.rangeLabels.mirror||t.labels.mirror,n=e[0];if(n){var s=o?i.y1-n.box.height()/2:i.x1;this.positionLabel(n,r,s)}var a=e[1];if(a){var p=o?i.y2-a.box.height()/2:i.x2;this.positionLabel(a,r,p)}}},e.prototype.autoRotateLabels=function(){t.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},e.prototype.hideOutOfRangeLabels=function(){t.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},e.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var i=t[0];if(i&&i.options.visible)for(var o=0;o<e.length;o++){if(!s(i,e[o]))break}var r=t[1];if(r&&r.options.visible)for(var n=e.length-1;n>0;--n){if(!s(r,e[n]))break}}function s(t,e){return!(e.options.visible&&!e.box.overlaps(t.box))&&(e.options.visible=!1,!0)}},e.prototype.contentBox=function(){for(var e=t.prototype.contentBox.call(this),i=this.rangeLabels,o=0;o<i.length;o++){var r=i[o];r.options.visible&&e.wrap(r.box)}return e},e.prototype.createAxisLabel=function(t,e,i){void 0===i&&(i={});var o=this.options,r=o.dataItems&&!o.maxDivisions?o.dataItems[t]:null,n=this.divisionRange.dateAt(t),s=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||s,i.dataItem=r;var a=this.axisLabelText(n,e,i);if(a)return new Se(n,a,t,r,e)},e.prototype.createRangeLabels=function(){var t=this,e=this.divisionRange,i=e.displayStart,o=e.displayEnd,r=this.options,n=Object.assign({},r.labels,r.rangeLabels,{align:a,zIndex:r.zIndex});if(!0===n.visible){this.normalizeLabelRotation(n),n.alignRotation=a,"auto"===n.rotation&&(n.rotation=0,r.autoRotateRangeLabels=!0);var s=n.dateFormats[this.divisionRange.options.baseUnit];n.format=n.format||s;var p=function(e,i,o){if(o){var r=new Se(i,o,e,null,n);t.append(r),t.rangeLabels.push(r)}};p(0,i,this.axisLabelText(i,n,{index:0,count:2})),p(1,o,this.axisLabelText(o,n,{index:1,count:2}))}},e.prototype.autoRotateRangeLabels=function(){var t=this,e=this.rangeLabels;if(this.options.autoRotateRangeLabels&&!this.options.vertical&&2===e.length){var i=function(e,i,o){var r=2*Math.abs(i[o+1]-i[o]),n=t.autoRotateLabelAngle(e.box,r);0!==n&&(e.options.rotation=n,e.reflow(new $t))},o=this.getMajorTickPositions();i(e[0],o,0),i(e[1],o,o.length-2)}},e.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},e.prototype.slot=function(t,e,i){var o=this.dataRange,r=t,n=e;r instanceof Date&&(r=o.dateIndex(r)),n instanceof Date&&(n=o.dateIndex(n));var s=this.getSlot(r,n,i);if(s)return s.toRect()},e.prototype.getSlot=function(e,i,o){var r=e,n=i;return"object"==typeof r&&(r=this.categoryIndex(r)),"object"==typeof n&&(n=this.categoryIndex(n)),t.prototype.getSlot.call(this,r,n,o)},e.prototype.valueRange=function(){var t=ei(this.options.srcCategories);return{min:Le(t.min),max:Le(t.max)}},e.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},e.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},e.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},e.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},e.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.dataRange.dateAt(e)},e.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},e.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},e.prototype.totalRange=function(){return this.dataRange.total()},e.prototype.totalCount=function(){return this.dataRange.totalCount()},e.prototype.isEmpty=function(){return!this.options.srcCategories.length},e.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=ei(t.srcCategories);return new oi(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},e}(Qe);It(si,{type:h,labels:{dateFormats:Je},rangeLabels:{visible:!1},autoBaseUnitSteps:{milliseconds:[1,10,100],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});var ai=si;function pi(t,e){return Ot(Math.floor(t/e)*e,10)}function hi(t,e){return Ot(Math.ceil(t/e)*e,10)}function li(t){return Math.max(Math.min(t,3e5),-3e5)}var ci=Math.pow(10,-9),ui=function(t){function e(e,i,o,r){t.call(this,Object.assign({},o,{seriesMin:e,seriesMax:i}),r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=function(t,e,i){var o=i.narrowRange,r=function(t,e,i){if(!t&&!e)return 0;var o;if(t>=0&&e>=0){var r=t===e?0:t;if(!1===i||!i&&(e-r)/e>.2)return 0;o=Math.max(0,r-(e-r)/2)}else o=t;return o}(t,e,o),n=function(t,e,i){if(!t&&!e)return 1;var o;if(t<=0&&e<=0){var r=t===e?0:e,n=Math.abs((r-t)/r);if(!1===i||!i&&n>.2)return 0;o=Math.min(0,r-(t-r)/2)}else o=e;return o}(t,e,o),s=Yt(r,n),a={majorUnit:s};!1!==i.roundToMajorUnit&&(r<0&&fi(r,s,1/3)&&(r-=s),n>0&&fi(n,s,1/3)&&(n+=s));return a.min=pi(r,s),a.max=hi(n,s),a}(t.seriesMin,t.seriesMax,t);return this.totalOptions=function(t,e){return{min:xt(e.min)?Math.min(t.min,e.min):t.min,max:xt(e.max)?Math.max(t.max,e.max):t.max,majorUnit:t.majorUnit}}(e,t),function(t,e){var i,o,r=e;if(e){!function(t,e){for(var i=0;i<e.length;i++){var o=e[i];null===t[o]&&(t[o]=void 0)}}(e,["min","max"]),i=xt(e.min),o=xt(e.max);var n=i||o;n&&e.min===e.max&&(e.min>0?e.min=0:e.max=1),e.majorUnit?(t.min=pi(t.min,e.majorUnit),t.max=hi(t.max,e.majorUnit)):n&&(r=j(t,e),t.majorUnit=Yt(r.min,r.max))}t.minorUnit=(r.majorUnit||t.majorUnit)/5;var s=j(t,r);s.min>=s.max&&(i&&!o?s.max=s.min+s.majorUnit:!i&&o&&(s.min=s.max-s.majorUnit));return s}(e,t)},e.prototype.initFields=function(){this.totalMin=this.totalOptions.min,this.totalMax=this.totalOptions.max,this.totalMajorUnit=this.totalOptions.majorUnit,this.seriesMin=this.options.seriesMin,this.seriesMax=this.options.seriesMax},e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.startValue=function(){return 0},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,i=e.max-e.min;return Math.floor(Ot(i/t,3))+1},e.prototype.getTickPositions=function(t,e){var i=this.options,o=i.vertical,r=i.reverse,n=this.lineBox(),s=t*((o?n.height():n.width())/(i.max-i.min)),a=this.getDivisions(t),p=(o?-1:1)*(r?-1:1),h=[],l=n[(o?x:m)+(1===p?1:2)],c=0;e&&(c=e/t);for(var u=0;u<a;u++)u%c!=0&&h.push(Ot(l,3)),l+=s*p;return h},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,i){void 0===i&&(i=!1);var o,r,n=this.options,s=n.vertical,a=n.reverse,p=s?x:m,h=this.lineBox(),l=h[p+(a?2:1)],c=(a?-1:1)*((s?h.height():h.width())/(n.max-n.min)),u=new $t(h.x1,h.y1,h.x1,h.y1),f=t,d=e;return xt(f)||(f=d||0),xt(d)||(d=f||0),i&&(f=Math.max(Math.min(f,n.max),n.min),d=Math.max(Math.min(d,n.max),n.min)),s?(o=n.max-Math.max(f,d),r=n.max-Math.min(f,d)):(o=Math.min(f,d)-n.min,r=Math.max(f,d)-n.min),u[p+1]=li(l+c*(a?r:o)),u[p+2]=li(l+c*(a?o:r)),u},e.prototype.getValue=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=Number(e.max),n=Number(e.min),s=i?x:m,a=this.lineBox(),p=a[s+(o?2:1)],h=i?a.height():a.width(),l=(o?-1:1)*(t[s]-p),c=l*((r-n)/h);return l<0||l>h?null:Ot(i?r-c:n+c,10)},e.prototype.translateRange=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=e.max,n=e.min,s=this.lineBox(),a=i?s.height():s.width(),p=Ot(t/(a/(r-n)),10);return!i&&!o||i&&o||(p=-p),{min:n+p,max:r+p,offset:p}},e.prototype.scaleRange=function(t){var e=this.options,i=-t*e.majorUnit;return{min:e.min-i,max:e.max+i}},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=Ot(o.min+t*o.majorUnit,10),n=this.axisLabelText(r,e,i);return new Se(r,n,t,null,e)},e.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},e.prototype.pan=function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax,e.offset)},e.prototype.pointsRange=function(t,e){var i=this.getValue(t),o=this.getValue(e),r=Math.min(i,o),n=Math.max(i,o);if(this.isValidRange(r,n))return{min:r,max:n}},e.prototype.zoomRange=function(t){var e=this.totalMin,i=this.totalMax,o=this.scaleRange(t),r=Ct(o.min,e,i),n=Ct(o.max,e,i);if(this.isValidRange(r,n))return{min:r,max:n}},e.prototype.isValidRange=function(t,e){return e-t>ci},e}(Te);function fi(t,e,i){var o=Ot(Math.abs(t%e),10);return 0===o||o>e*(1-i)}It(ui,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:n},labels:{format:"#.####################"},zIndex:1});var di=ui,gi=function(t){function e(e,i,o,r){var n=Le(e),s=Le(i),a=r.intl,p=o||{};p=function(t,e,i){var o=i.min||t,r=i.max||e,n=i.baseUnit||(r&&o?function(t){var e="hours";t>=31536e6?e=je:t>=26784e5?e="months":t>=6048e5?e="weeks":t>=864e5&&(e=Re);return e}(Ie(r,o)):"hours"),s=Be[n],a=i.weekStartDay||0,p=De(He(o)-1,n,a)||Le(r),h=Fe(He(r)+1,n,a),l=(i.majorUnit?i.majorUnit:void 0)||hi(Yt(p.getTime(),h.getTime()),s)/s,c=Xe(p,h,n),u=hi(c,l)-c,f=Math.floor(u/2),d=u-f;i.baseUnit||delete i.baseUnit;return i.baseUnit=i.baseUnit||n,i.min=i.min||ze(p,-f,n,a),i.max=i.max||ze(h,d,n,a),i.minorUnit=i.minorUnit||l/5,i.majorUnit=l,i}(n,s,p=j(p||{},{min:Ye(a,p.min),max:Ye(a,p.max),axisCrossingValue:Ze(a,p.axisCrossingValues||p.axisCrossingValue),weekStartDay:Ke(p,a)})),t.call(this,p,r),this.intlService=a,this.seriesMin=n,this.seriesMax=s;var h=p.weekStartDay||0;this.totalMin=He(De(He(n)-1,p.baseUnit,h)),this.totalMax=He(Fe(He(s)+1,p.baseUnit,h))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Xe(e.min,e.max,e.baseUnit)/t+1)},e.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,o=this.lineBox(),r=(i?-1:1)*(e.reverse?-1:1),n=o[(i?x:m)+(1===r?1:2)],s=this.getDivisions(t),a=Ge(e.max,e.min),p=(i?o.height():o.width())/a,h=e.weekStartDay||0,l=[n],c=1;c<s;c++){var u=n+Ge(ze(e.min,c*t,e.baseUnit,h),e.min)*p*r;l.push(Ot(u,3))}return l},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,i){return di.prototype.getSlot.call(this,Ye(this.intlService,t),Ye(this.intlService,e),i)},e.prototype.getValue=function(t){var e=di.prototype.getValue.call(this,t);return null!==e?Le(e):null},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=t*o.majorUnit,n=o.weekStartDay||0,s=o.min;r>0&&(s=ze(s,r,o.baseUnit,n));var a=e.dateFormats[o.baseUnit];e.format=e.format||a;var p=this.axisLabelText(s,e,i);return new Se(s,p,t,null,e)},e.prototype.translateRange=function(t,e){var i=this.options,o=i.baseUnit,r=i.weekStartDay||0,n=this.lineBox(),s=i.vertical?n.height():n.width(),a=this.range(),p=s/Ge(a.max,a.min),h=Ot(t/p,10)*(i.reverse?-1:1),l=Ve(i.min,h),c=Ve(i.max,h);return e||(l=ze(l,0,o,r),c=ze(c,0,o,r)),{min:l,max:c,offset:h}},e.prototype.scaleRange=function(t){for(var e=this.options,i=e.min,o=e.max,r=Math.abs(t);r--;){var n=Ge(i,o),s=Math.round(.1*n);t<0?(i=Ve(i,s),o=Ve(o,-s)):(i=Ve(i,-s),o=Ve(o,s))}return{min:i,max:o}},e.prototype.shouldRenderNote=function(t){var e=this.range();return Ue(t,e.min)>=0&&Ue(t,e.max)<=0},e.prototype.pan=function(t){var e=this.translateRange(t,!0),i=this.limitRange(He(e.min),He(e.max),this.totalMin,this.totalMax,e.offset);if(i)return{min:Le(i.min),max:Le(i.max)}},e.prototype.pointsRange=function(t,e){var i=this.getValue(t),o=this.getValue(e),r=Math.min(i,o),n=Math.max(i,o);return{min:Le(r),max:Le(n)}},e.prototype.zoomRange=function(t){var e=this.scaleRange(t);return{min:Le(Ct(He(e.min),this.totalMin,this.totalMax)),max:Le(Ct(He(e.max),this.totalMin,this.totalMax))}},e}(Te);It(gi,{type:h,majorGridLines:{visible:!0,width:1,color:n},labels:{dateFormats:Je}});var yi=gi,vi=function(t){function e(e,i,o,r){var n=j({majorUnit:10,min:e,max:i},o),s=n.majorUnit,a=function(t,e){var i,o=Ot(xi(t,e),10)%1;i=t<=0?e:0!==o&&(o<.3||o>.9)?Math.pow(e,xi(t,e)+.2):Math.pow(e,Math.ceil(xi(t,e)));return i}(i,s),p=function(t,e,i){var o=i.majorUnit,r=t;t<=0?r=e<=1?Math.pow(o,-2):1:i.narrowRange||(r=Math.pow(o,Math.floor(xi(t,o))));return r}(e,i,n),h=function(t,e,i,o){var r=i.min,n=i.max;xt(i.axisCrossingValue)&&i.axisCrossingValue<=0&&mi();xt(o.max)?o.max<=0&&mi():n=e;xt(o.min)?o.min<=0&&mi():r=t;return{min:r,max:n}}(p,a,n,o);n.max=h.max,n.min=h.min,n.minorUnit=o.minorUnit||Ot(s-1,10),t.call(this,n,r),this.totalMin=xt(o.min)?Math.min(p,o.min):p,this.totalMax=xt(o.max)?Math.max(a,o.max):a,this.logMin=Ot(xi(h.min,s),10),this.logMax=Ot(xi(h.max,s),10),this.seriesMin=e,this.seriesMax=i,this.createLabels()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.startValue=function(){return this.options.min},e.prototype.getSlot=function(t,e,i){var o,r,n=this.options,s=this.logMin,a=this.logMax,p=n.reverse,h=n.vertical,l=n.majorUnit,c=h?x:m,u=this.lineBox(),f=u[c+(p?2:1)],d=(p?-1:1)*((h?u.height():u.width())/(a-s)),g=new $t(u.x1,u.y1,u.x1,u.y1),y=t,v=e;return xt(y)||(y=v||1),xt(v)||(v=y||1),y<=0||v<=0?null:(i&&(y=Math.max(Math.min(y,n.max),n.min),v=Math.max(Math.min(v,n.max),n.min)),y=xi(y,l),v=xi(v,l),h?(o=a-Math.max(y,v),r=a-Math.min(y,v)):(o=Math.min(y,v)-s,r=Math.max(y,v)-s),g[c+1]=li(f+d*(p?r:o)),g[c+2]=li(f+d*(p?o:r)),g)},e.prototype.getValue=function(t){var e=this.options,i=this.logMin,o=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,a=this.lineBox(),p=n===r?1:-1,h=1===p?1:2,l=n?a.height():a.width(),c=(o-i)/l,u=n?x:m,f=a[u+h],d=p*(t[u]-f);if(d<0||d>l)return null;var g=i+d*c;return Ot(Math.pow(s,g),10)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.scaleRange=function(t){var e=this.options.majorUnit,i=-t;return{min:Math.pow(e,this.logMin-i),max:Math.pow(e,this.logMax+i)}},e.prototype.translateRange=function(t){var e=this.options,i=this.logMin,o=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,a=this.lineBox(),p=n?a.height():a.width(),h=Ot(t/(p/(o-i)),10);return!n&&!r||n&&r||(h=-h),{min:Math.pow(s,i+h),max:Math.pow(s,o+h),offset:h}},e.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},e.prototype.getMajorTickPositions=function(){var t=[];return this.traverseMajorTicksPositions((function(e){t.push(e)}),{step:1,skip:0}),t},e.prototype.createTicks=function(t){var e=this.options,i=e.majorTicks,o=e.minorTicks,r=e.vertical,n=e.labels.mirror,s=this.lineBox(),a={vertical:r};function p(e,i){a.tickX=n?s.x2:s.x2-i.size,a.tickY=n?s.y1-i.size:s.y1,a.position=e,t.append(Pe(a,i))}return i.visible&&this.traverseMajorTicksPositions(p,i),o.visible&&this.traverseMinorTicksPositions(p,o),[]},e.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.vertical,n=t.lineBox(),s={lineStart:n[r?"x1":"y1"],lineEnd:n[r?"x2":"y2"],vertical:r},a=[],p=this.gridLinesVisual();function h(t,e){lt(t,a)||(s.position=t,p.append(Me(s,e)),a.push(t))}return o.visible&&this.traverseMajorTicksPositions(h,o),i.visible&&this.traverseMinorTicksPositions(h,i),p.children},e.prototype.traverseMajorTicksPositions=function(t,e){for(var i=this._lineOptions(),o=i.lineStart,r=i.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step){t(Ot(o+r*(a-n),10),e)}},e.prototype.traverseMinorTicksPositions=function(t,e){for(var i=this.options,o=i.min,r=i.max,n=i.minorUnit,s=i.majorUnit,a=this._lineOptions(),p=a.lineStart,h=a.step,l=this.logMin,c=this.logMax,u=Math.floor(l);u<c;u++)for(var f=this._minorIntervalOptions(u),d=e.skip;d<n;d+=e.step){var g=f.value+d*f.minorStep;if(g>r)break;if(g>=o)t(Ot(p+h*(xi(g,s)-l),10),e)}},e.prototype.createAxisLabel=function(t,e,i){var o=Math.ceil(this.logMin+t),r=Math.pow(this.options.majorUnit,o),n=this.axisLabelText(r,e,i);return new Se(r,n,t,null,e)},e.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},e.prototype.pan=function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax,e.offset)},e.prototype.pointsRange=function(t,e){var i=this.getValue(t),o=this.getValue(e);return{min:Math.min(i,o),max:Math.max(i,o)}},e.prototype.zoomRange=function(t){var e=this.options,i=this.totalMin,o=this.totalMax,r=this.scaleRange(t),n=Ct(r.min,i,o),s=Ct(r.max,i,o),a=e.majorUnit,p=s>n&&e.min&&e.max&&Ot(xi(e.max,a)-xi(e.min,a),10)<1,h=!(e.min===i&&e.max===o)&&Ot(xi(s,a)-xi(n,a),10)>=1;if(p||h)return{min:n,max:s}},e.prototype._minorIntervalOptions=function(t){var e=this.options,i=e.minorUnit,o=e.majorUnit,r=Math.pow(o,t);return{value:r,minorStep:(Math.pow(o,t+1)-r)/i}},e.prototype._lineOptions=function(){var t=this.options,e=t.reverse,i=t.vertical,o=i?x:m,r=this.lineBox(),n=i===e?1:-1,s=1===n?1:2;return{step:n*((i?r.height():r.width())/(this.logMax-this.logMin)),lineStart:r[o+s],lineBox:r}},e}(Te);function mi(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function xi(t,e){return Math.log(t)/Math.log(e)}It(vi,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:n},zIndex:1,_deferLabels:!0});var bi=vi,_i={createGridLines:function(t){var e,i,o=this.options,r=Math.abs(this.box.center().y-t.lineBox().y1),n=[],s=!1;return o.majorGridLines.visible&&(e=this.majorGridLineAngles(t),s=!0,n=this.renderMajorGridLines(e,r,o.majorGridLines)),o.minorGridLines.visible&&(i=this.minorGridLineAngles(t,s),vt(n,this.renderMinorGridLines(i,r,o.minorGridLines,t,s))),n},renderMajorGridLines:function(t,e,i){return this.renderGridLines(t,e,i)},renderMinorGridLines:function(t,e,i,o,r){var n=this.radiusCallback&&this.radiusCallback(e,o,r);return this.renderGridLines(t,e,i,n)},renderGridLines:function(t,e,i,o){for(var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},n=this.box.center(),s=new S.geometry.Circle([n.x,n.y],e),a=this.gridLinesVisual(),p=0;p<t.length;p++){var h=new S.drawing.Path(r);o&&(s.radius=o(t[p])),h.moveTo(s.center).lineTo(s.pointAt(t[p]+180)),a.append(h)}return a.children},gridLineAngles:function(t,e,i,o,r){var n=this,s=this.intervals(e,i,o,r),a=t.options,p=a.visible&&!1!==(a.line||{}).visible;return dt(s,(function(t){var e=n.intervalAngle(t);if(!p||90!==e)return e}))}},wi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.range=function(){return{min:0,max:this.options.categories.length}},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.lineBox=function(){return this.box},e.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,i=e.skip||0,o=e.step||1,r=new $t,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(i+n*o).adjacentBox(0,s.width(),s.height()))}},e.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options,n=r.categories.length/t||1,s=360/n,a=i||1,p=[],h=0,l=e||0;l<n;l+=a)h=r.reverse?360-l*s:l*s,h=Ot(h,3)%360,o&<(h,o)||p.push(h);return p},e.prototype.majorIntervals=function(){return this.intervals(1)},e.prototype.minorIntervals=function(){return this.intervals(.5)},e.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},e.prototype.majorAngles=function(){var t=this;return dt(this.majorIntervals(),(function(e){return t.intervalAngle(e)}))},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,n=e?this.intervals(1,r.skip,r.step):null;return this.gridLineAngles(t,.5,o.skip,o.step,n)},e.prototype.radiusCallback=function(t,e,i){if(e.options.type!==r){var o=Mt(360/(2*this.options.categories.length)),n=Math.cos(o)*t,s=this.majorAngles(),a=function(e){return!i&<(e,s)?t:n};return a}},e.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new S.drawing.Group({zIndex:-1}),i=0;i<t.length;i++){var o=t[i],r=this.plotBandSlot(o),n=this.getSlot(o.from),s=o.from-Math.floor(o.from);r.startAngle+=s*n.angle;var a=Math.ceil(o.to)-o.to;r.angle-=(a+s)*n.angle;var p=ie.current.createRing(r,{fill:{color:o.color,opacity:o.opacity},stroke:{opacity:o.opacity}});e.append(p)}this.appendVisual(e)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},e.prototype.getSlot=function(t,e){var i=this.options,o=i.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,p=t;i.reverse&&!o&&(p=(p+1)%s);var h=n[p=Ct(Math.floor(p),0,s-1)];o&&(h-=a/2)<0&&(h+=360);var l=a*(Ct(Math.ceil(e||p),p,s-1)-p+1);return new Jt(r.center(),0,r.height()/2,h,l)},e.prototype.slot=function(t,e){var i=this.getSlot(t,e),o=i.startAngle+180,r=o+i.angle;return new S.geometry.Arc([i.center.x,i.center.y],{startAngle:o,endAngle:r,radiusX:i.radius,radiusY:i.radius})},e.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,i=null,o=0;o<e;o++){if(this.getSlot(o).containsPoint(t)){i=o;break}}return i},e}(Qe);It(wi,{startAngle:90,labels:{margin:z(10)},majorGridLines:{visible:!0},justified:!0}),j(wi.prototype,_i);var Ai=wi,Si=function(t){function e(e,i){t.call(this,e,i);var o=this.options;o.minorUnit=o.minorUnit||o.majorUnit/2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDivisions=function(t){return di.prototype.getDivisions.call(this,t)-1},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,i=this.options.labels,o=i.skip||0,r=i.step||1,n=new $t,s=this.intervals(t.majorUnit,o,r),a=0;a<e.length;a++){e[a].reflow(n);var p=e[a].box;e[a].reflow(this.getSlot(s[a]).adjacentBox(0,p.width(),p.height()))}},e.prototype.lineBox=function(){return this.box},e.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=i||1,p=e||0;p<n;p+=a){var h=(360+r+p*t)%360;o&<(h,o)||s.push(h)}return s},e.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},e.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},e.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,n=e?this.intervals(i.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,i.minorUnit,o.skip,o.step,n)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},e.prototype.getSlot=function(t,e){var i=this.options,o=this.box,r=i.startAngle,n=Ct(t,i.min,i.max),s=Ct(e||n,n,i.max);if(i.reverse&&(n*=-1,s*=-1),(s=(540-s-r)%360)<(n=(540-n-r)%360)){var a=n;n=s,s=a}return new Jt(o.center(),0,o.height()/2,n,s-n)},e.prototype.slot=function(t,e){void 0===e&&(e=t);var i,o,r=this.options,n=360-r.startAngle,s=this.getSlot(t,e),a=Math.min(t,e),p=Math.max(t,e);return r.reverse?(i=a,o=p):(i=360-p,o=360-a),i=(i+n)%360,o=(o+n)%360,new S.geometry.Arc([s.center.x,s.center.y],{startAngle:i,endAngle:o,radiusX:s.radius,radiusY:s.radius})},e.prototype.getValue=function(t){var e=this.options,i=this.box.center(),o=t.x-i.x,r=t.y-i.y,n=Math.round(bt(Math.atan2(r,o))),s=e.startAngle;return e.reverse||(n*=-1,s*=-1),(n+s+360)%360},e.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},e}(Te);It(Si,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:z(10)},majorGridLines:{color:n,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),j(Si.prototype,_i,{createPlotBands:Ai.prototype.createPlotBands,majorAngles:Ai.prototype.majorAngles,range:di.prototype.range,labelsCount:di.prototype.labelsCount,createAxisLabel:di.prototype.createAxisLabel});var ki=Si;function Ci(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var Pi={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,i=t.plotBands;void 0===i&&(i=[]);for(var o=this.plotArea.polarAxis,n=o.majorAngles(),s=o.box.center(),a=this._plotbandGroup=new S.drawing.Group({zIndex:-1}),p=0;p<i.length;p++){var h=i[p],l={fill:{color:h.color,opacity:h.opacity},stroke:{opacity:h.opacity}},c=this.getSlot(h.from,h.to,!0),u=new Jt(s,s.y-c.y2,s.y-c.y1,0,360),f=void 0;f=e===r?ie.current.createRing(u,l):S.drawing.Path.fromPoints(this.plotBandPoints(u,n),l).close(),a.append(f)}this.appendVisual(a)},plotBandPoints:function(t,e){for(var i=[],o=[],r=[t.center.x,t.center.y],n=new S.geometry.Circle(r,t.innerRadius),s=new S.geometry.Circle(r,t.radius),a=0;a<e.length;a++)i.push(n.pointAt(e[a]+180)),o.push(s.pointAt(e[a]+180));return i.reverse(),i.push(i[0]),o.push(o[0]),o.concat(i)},createGridLines:function(t){var e=this.options,i=this.radarMajorGridLinePositions(),o=t.majorAngles(),r=t.box.center(),n=[];if(e.majorGridLines.visible&&(n=this.renderGridLines(r,i,o,e.majorGridLines)),e.minorGridLines.visible){var s=this.radarMinorGridLinePositions();vt(n,this.renderGridLines(r,s,o,e.minorGridLines))}return n},renderGridLines:function(t,e,i,o){var n={stroke:{width:o.width,color:o.color,dashType:o.dashType}},s=o.skip;void 0===s&&(s=0);var a=o.step;void 0===a&&(a=0);for(var p=this.gridLinesVisual(),h=s;h<e.length;h+=a){var l=t.y-e[h];if(l>0){var c=new S.geometry.Circle([t.x,t.y],l);if(o.type===r)p.append(new S.drawing.Circle(c,n));else{for(var u=new S.drawing.Path(n),f=0;f<i.length;f++)u.lineTo(c.pointAt(i[f]+180));u.close(),p.append(u)}}}return p.children},getValue:function(t){var e=this.lineBox(),i=this.plotArea.polarAxis,o=i.majorAngles(),n=i.box.center(),s=t.distanceTo(n),a=s;if(this.options.majorGridLines.type!==r&&o.length>1){var p=t.x-n.x,h=t.y-n.y,l=(bt(Math.atan2(h,p))+540)%360;o.sort((function(t,e){return Ci(t,l)-Ci(e,l)}));var c=90-Ci(o[0],o[1])/2,u=180-Ci(l,o[0])-c;a=s*(Math.sin(Mt(u))/Math.sin(Mt(c)))}return this.axisType().prototype.getValue.call(this,new Zt(e.x1,e.y2-a))}},Mi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},e.prototype.axisType=function(){return t},e}(di);j(Mi.prototype,Pi);var Oi=Mi,Ti=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radarMajorGridLinePositions=function(){var t=[];return this.traverseMajorTicksPositions((function(e){t.push(e)}),this.options.majorGridLines),t},e.prototype.radarMinorGridLinePositions=function(){var t=[];return this.traverseMinorTicksPositions((function(e){t.push(e)}),this.options.minorGridLines),t},e.prototype.axisType=function(){return t},e}(bi);j(Ti.prototype,Pi);var Ri=Ti;function ji(t){return t<=0?-1:1}var Bi=function(t){function e(e){t.call(this),this.closed=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.process=function(t){var e=t.slice(0),i=[],o=this.closed,r=e.length;if(r>2&&(this.removeDuplicates(0,e),r=e.length),r<2||2===r&&e[0].equals(e[1]))return i;var n,s,a=e[0],p=e[1],h=e[2];for(i.push(new S.geometry.Segment(a));a.equals(e[r-1]);)o=!0,e.pop(),r--;if(2===r){var l=this.tangent(a,p,m,x);return kt(i).controlOut(this.firstControlPoint(l,a,p,m,x)),i.push(new S.geometry.Segment(p,this.secondControlPoint(l,a,p,m,x))),i}if(o){a=e[r-1],p=e[0],h=e[1];var c=this.controlPoints(a,p,h);n=c[1],s=c[0]}else{var u=this.tangent(a,p,m,x);n=this.firstControlPoint(u,a,p,m,x)}for(var f=n,d=0;d<=r-3;d++)if(this.removeDuplicates(d,e),d+3<=(r=e.length)){a=e[d],p=e[d+1],h=e[d+2];var g=this.controlPoints(a,p,h);kt(i).controlOut(f),f=g[1];var y=g[0];i.push(new S.geometry.Segment(p,y))}if(o){a=e[r-2],p=e[r-1],h=e[0];var v=this.controlPoints(a,p,h);kt(i).controlOut(f),i.push(new S.geometry.Segment(p,v[0])),kt(i).controlOut(v[1]),i.push(new S.geometry.Segment(h,s))}else{var b=this.tangent(p,h,m,x);kt(i).controlOut(f),i.push(new S.geometry.Segment(h,this.secondControlPoint(b,p,h,m,x)))}return i},e.prototype.removeDuplicates=function(t,e){for(;e[t+1]&&(e[t].equals(e[t+1])||e[t+1].equals(e[t+2]));)e.splice(t+1,1)},e.prototype.invertAxis=function(t,e,i){var o=!1;if(t.x===e.x)o=!0;else if(e.x===i.x)(e.y<i.y&&t.y<=e.y||i.y<e.y&&e.y<=t.y)&&(o=!0);else{var r=this.lineFunction(t,e),n=this.calculateFunction(r,i.x);t.y<=e.y&&i.y<=n||e.y<=t.y&&i.y>=n||(o=!0)}return o},e.prototype.isLine=function(t,e,i){var o=this.lineFunction(t,e),r=this.calculateFunction(o,i.x);return t.x===e.x&&e.x===i.x||Ot(r,1)===Ot(i.y,1)},e.prototype.lineFunction=function(t,e){var i=(e.y-t.y)/(e.x-t.x);return[t.y-i*t.x,i]},e.prototype.controlPoints=function(t,e,i){var o,r=m,n=x,s=!1,a=!1;if(this.isLine(t,e,i))o=this.tangent(t,e,m,x);else{var p={x:this.isMonotonicByField(t,e,i,m),y:this.isMonotonicByField(t,e,i,x)};if(p.x&&p.y)o=this.tangent(t,i,m,x),s=!0;else if(this.invertAxis(t,e,i)&&(r=x,n=m),p[r])o=0;else o=.01*(i[n]<t[n]&&t[n]<=e[n]||t[n]<i[n]&&e[n]<=t[n]?ji((i[n]-t[n])*(e[r]-t[r])):-ji((i[r]-t[r])*(e[n]-t[n]))),a=!0}var h=this.secondControlPoint(o,t,e,r,n);if(a){var l=r;r=n,n=l}var c=this.firstControlPoint(o,e,i,r,n);return s&&(this.restrictControlPoint(t,e,h,o),this.restrictControlPoint(e,i,c,o)),[h,c]},e.prototype.restrictControlPoint=function(t,e,i,o){t.y<e.y?e.y<i.y?(i.x=t.x+(e.y-t.y)/o,i.y=e.y):i.y<t.y&&(i.x=e.x-(e.y-t.y)/o,i.y=t.y):i.y<e.y?(i.x=t.x-(t.y-e.y)/o,i.y=e.y):t.y<i.y&&(i.x=e.x+(t.y-e.y)/o,i.y=t.y)},e.prototype.tangent=function(t,e,i,o){var r,n=e[i]-t[i],s=e[o]-t[o];return r=0===n?0:s/n,r},e.prototype.isMonotonicByField=function(t,e,i,o){return i[o]>e[o]&&e[o]>t[o]||i[o]<e[o]&&e[o]<t[o]},e.prototype.firstControlPoint=function(t,e,i,o,r){var n=e[o],s=.333*(i[o]-n);return this.point(n+s,e[r]+s*t,o,r)},e.prototype.secondControlPoint=function(t,e,i,o,r){var n=e[o],s=i[o],a=.333*(s-n);return this.point(s-a,i[r]-a*t,o,r)},e.prototype.point=function(t,e,i,o){var r=new S.geometry.Point;return r[i]=t,r[o]=e,r},e.prototype.calculateFunction=function(t,e){for(var i=t.length,o=0,r=0;r<i;r++)o+=Math.pow(e,r)*t[r];return o},e}(S.Class),Ii=function(t){function e(e){t.call(this),this._axis=e,this.options=e.options}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.value=function(t){var e=this._axis,i=e.getCategory?e.getCategory(t):e.getValue(t);return i},e.prototype.slot=function(t,e,i){return void 0===i&&(i=!0),this._axis.slot(t,e,i)},e.prototype.range=function(){return this._axis.range()},e.prototype.valueRange=function(){return this._axis.valueRange()},e}(S.Class);function Vi(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new Ii(e[i])}var Li=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};Li.prototype.findAxisByName=function(t){return Vi(t,this._pane.axes)};var Ei=Li,zi=function(t){function e(e){t.call(this),this._plotArea=e,this.visual=e.visual,this.backgroundVisual=e._bgVisual}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(S.Class);function Di(t){for(var e=t.length,i=0,o=0;o<e;o++){P(t[o])&&i++}return i}var Fi={min:function(t){for(var e=t.length,i=u,o=0;o<e;o++){var r=t[o];P(r)&&(i=Math.min(i,r))}return i===u?t[0]:i},max:function(t){for(var e=t.length,i=f,o=0;o<e;o++){var r=t[o];P(r)&&(i=Math.max(i,r))}return i===f?t[0]:i},sum:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];P(r)&&(i+=r)}return i},sumOrNull:function(t){var e=null;return Di(t)&&(e=Fi.sum(t)),e},count:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];null!==r&&xt(r)&&i++}return i},avg:function(t){var e=Di(t),i=t[0];return e>0&&(i=Fi.sum(t)/e),i},first:function(t){for(var e=t.length,i=0;i<e;i++){var o=t[i];if(null!==o&&xt(o))return o}return t[0]}},Ui=Fi;function Gi(t,e){return null===e?e:nt(t)(e)}var Hi=function(t){function e(){t.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e,i){void 0===e&&(e=[y]),void 0===i&&(i={});for(var o=0;o<t.length;o++){var r=t[o];this._valueFields[r]=e,this._otherFields[r]=i,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},e.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},e.prototype.valueFields=function(t){return this._valueFields[t.type]||[y]},e.prototype.otherFields=function(t){return this._otherFields[t.type]||[y]},e.prototype.bindPoint=function(t,e,i){var o,r,n=t.data,s=xt(i)?i:n[e],a={valueFields:{value:s}},p=this.valueFields(t),h=this._otherFields[t.type];if(null===s)r=this._nullValue[t.type];else if(xt(s)){if(Array.isArray(s)){var l=s.slice(p.length);r=this._bindFromArray(s,p),o=this._bindFromArray(l,h)}else if("object"==typeof s){var c=this.sourceFields(t,p),u=this.sourceFields(t,h);r=this._bindFromObject(s,p,c),o=this._bindFromObject(s,h,u)}}else r=this._undefinedValue[t.type];return xt(r)&&(1===p.length?a.valueFields.value=r[p[0]]:a.valueFields=r),a.fields=o||{},a},e.prototype._makeValue=function(t,e){for(var i={},o=t.length,r=0;r<o;r++){i[t[r]]=e}return i},e.prototype._bindFromArray=function(t,e){var i={};if(e)for(var o=Math.min(e.length,t.length),r=0;r<o;r++)i[e[r]]=t[r];return i},e.prototype._bindFromObject=function(t,e,i){void 0===i&&(i=e);var o={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=i[n];null!==a&&(o[s]=Gi(a,t))}return o},e.prototype.sourceFields=function(t,e){var i=[];if(e)for(var o=e.length,r=0;r<o;r++){var n=e[r],s=n===y?"field":n+"Field";i.push(null!==t[s]?t[s]||n:null)}return i},e}(S.Class);Hi.current=new Hi;var Ni=Hi,Wi=/percent(?:\w*)\((\d+)\)/,qi=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),Xi=function(t){function e(e,i,o){t.call(this),this.initGlobalRanges(e,i,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initGlobalRanges=function(t,e,i){var o=e.data,r=qi.exec(t);if(r){this.valueGetter=this.createValueGetter(e,i);var n=this.getAverage(o),s=this.getStandardDeviation(o,n,!1),a=r[1]?parseFloat(r[1]):1,p={low:n.value-s*a,high:n.value+s*a};this.globalRange=function(){return p}}else if(t.indexOf&&t.indexOf("stderr")>=0){this.valueGetter=this.createValueGetter(e,i);var h=this.getStandardError(o,this.getAverage(o));this.globalRange=function(t){return{low:t-h,high:t+h}}}},e.prototype.createValueGetter=function(t,e){var i,o=t.data,r=Ni.current,n=r.valueFields(t),s=xt(o[0])?o[0]:{};if(b(s))i=nt("["+(e?n.indexOf(e):0)+"]");else if(P(s))i=nt();else if("object"==typeof s){i=nt(r.sourceFields(t,n)[n.indexOf(e)])}return i},e.prototype.getErrorRange=function(t,e){var i,o,r;if(!xt(e))return null;if(this.globalRange)return this.globalRange(t);if(b(e))i=t-e[0],o=t+e[1];else if(P(r=parseFloat(e)))i=t-r,o=t+r;else{if(!(r=Wi.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var n=t*(parseFloat(r[1])/100);i=t-Math.abs(n),o=t+Math.abs(n)}return{low:i,high:o}},e.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},e.prototype.getStandardDeviation=function(t,e,i){for(var o=t.length,r=i?e.count-1:e.count,n=0,s=0;s<o;s++){var a=this.valueGetter(t[s]);P(a)&&(n+=Math.pow(a-e.value,2))}return Math.sqrt(n/r)},e.prototype.getAverage=function(t){for(var e=t.length,i=0,o=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);P(n)&&(i+=n,o++)}return{value:i/o,count:o}},e}(S.Class),Yi=S.support.browser||{},Zi=Yi.msie?.001:0,Ki="zero",$i="bar",Qi="column",Ji="line",to="pie",eo="verticalLine",io=[$i,Qi,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],oo="DOMMouseScroll mousewheel",ro=function(t){function e(e,i,o,r,n,s){t.call(this,s),this.low=e,this.high=i,this.isVertical=o,this.chart=r,this.series=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e,i=this.options.endCaps,o=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),s=this.getCapsWidth(t,o),a=o?n.x:n.y,p=a-s,h=a+s;o?(e=[new Zt(n.x,r.y1),new Zt(n.x,r.y2)],i&&e.push(new Zt(p,r.y1),new Zt(h,r.y1),new Zt(p,r.y2),new Zt(h,r.y2)),this.box=new $t(p,r.y1,h,r.y2)):(e=[new Zt(r.x1,n.y),new Zt(r.x2,n.y)],i&&e.push(new Zt(r.x1,p),new Zt(r.x1,h),new Zt(r.x2,p),new Zt(r.x2,h)),this.box=new $t(r.x1,p,r.x2,h)),this.linePoints=e},e.prototype.getCapsWidth=function(t,e){var i=e?t.width():t.height();return Math.min(Math.floor(i/2),4)||4},e.prototype.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()},e.prototype.createDefaultVisual=function(){var e=this.options,i=this.linePoints,o={stroke:{color:e.color,width:e.line.width,dashType:e.line.dashType}};t.prototype.createVisual.call(this);for(var r=0;r<i.length;r+=2){var n=new S.drawing.Path(o).moveTo(i[r].x,i[r].y).lineTo(i[r+1].x,i[r+1].y);k(n),this.visual.append(n)}},e}(re);It(ro,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var no=ro,so=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},e}(no);function ao(t,e,i,o){void 0===i&&(i={}),void 0===o&&(o=!1);var r=i.defaults=i.defaults||{},n=i.depth=i.depth||0,s=!1;if(i.excluded=i.excluded||[],n>5)return null;for(var a in t)if(!lt(a,i.excluded)&&t.hasOwnProperty(a)){var p=t[a];T(p)?(s=!0,o||(t[a]=Rt(p(e),r[a]))):B(p)&&(o||(i.defaults=r[a]),i.depth++,s=ao(p,e,i,o)||s,i.depth--)}return s}function po(t){for(var e=t.length,i=0,o=0;o<e;o++)i=Math.max(i,t[o].data.length);return i}var ho=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this.categoryAxis=e.seriesCategoryAxis(i.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.pointOptions=function(t,e){var i=this.seriesOptions[e];if(!i){var o=this.pointType().prototype.defaults;this.seriesOptions[e]=i=j({},o,{vertical:!this.options.invertAxes},t)}return i},e.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&P(t.value)){for(var e=t.categoryIx,i=this.categoryPoints[e],o=[],r=0,n=0;n<i.length;n++){var s=i[n];if(s){var a=t.series.stack,p=s.series.stack;if(a&&p&&a.group!==p.group)continue;P(s.value)&&(r+=Math.abs(s.value),o.push(Math.abs(s.value)))}}if(r>0)return t.value/r}return t.value},e.prototype.plotRange=function(t,e){void 0===e&&(e=0);var i=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var o=this.plotValue(t),r=o>=0,n=e,s=!1,a=0;a<i.length;a++){var p=i[a];if(t===p)break;var h=t.series.stack,l=p.series.stack;if(h&&l){if("string"==typeof h&&h!==l)continue;if(h.group&&h.group!==l.group)continue}var c=this.plotValue(p);(c>=0&&r||c<0&&!r)&&(n+=c,o+=c,s=!0,this.options.isStacked100&&(o=Math.min(o,1)))}return s&&(n-=e),[n,o]}var u=t.series,f=this.seriesValueAxis(u),d=this.categoryAxisCrossingValue(f);return[d,O(t.value)?t.value:d]},e.prototype.stackLimits=function(t,e){for(var i=u,o=f,r=0;r<this.categoryPoints.length;r++){var n=this.categoryPoints[r];if(n)for(var s=0;s<n.length;s++){var a=n[s];if(a&&(a.series.stack===e||a.series.axis===t)){var p=this.plotRange(a,0)[1];xt(p)&&isFinite(p)&&(o=Math.max(o,p),i=Math.min(i,p))}}}return{min:i,max:o}},e.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,i=t.series,o={};if(e)for(var r=0;r<i.length;r++){var n=i[r],s=n.axis,a=s+n.stack,p=o[a];if(!p){p=this.stackLimits(s,n.stack);var h=this.errorTotals;h&&(h.negative.length&&(p.min=Math.min(p.min,Vt(h.negative).min)),h.positive.length&&(p.max=Math.max(p.max,Vt(h.positive).max))),p.min!==u||p.max!==f?o[a]=p:p=null}p&&(this.valueAxisRanges[s]=p)}},e.prototype.addErrorBar=function(t,e,i){var o,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields.errorLow,h=e.fields.errorHigh;P(p)&&P(h)?o={low:p,high:h}:a&&xt(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Xi(a.value,n,y),o=this.seriesErrorRanges[s].getErrorRange(r,a.value)),o&&(t.low=o.low,t.high=o.high,this.addPointErrorBar(t,i))},e.prototype.addPointErrorBar=function(t,e){var i=!this.options.invertAxes,o=t.options.errorBars,r=t.series,n=t.low,s=t.high;if(this.options.isStacked){var a=this.stackedErrorRange(t,e);n=a.low,s=a.high}else{var p={categoryIx:e,series:r};this.updateRange({value:n},p),this.updateRange({value:s},p)}var h=new so(n,s,i,this,r,o);t.errorBars=[h],t.append(h)},e.prototype.stackedErrorRange=function(t,e){var i=this.plotRange(t,0)[1]-t.value,o=t.low+i,r=t.high+i;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},o<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,o)),r>0&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,r)),{low:o,high:r}},e.prototype.addValue=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.categoryPoints[i];n||(this.categoryPoints[i]=n=[]);var s=this.seriesPoints[r];s||(this.seriesPoints[r]=s=[]);var a=this.createPoint(t,e);a&&(Object.assign(a,e),a.owner=this,a.noteText=t.fields.noteText,xt(a.dataItem)||(a.dataItem=o.data[i]),this.addErrorBar(a,t,i)),this.points.push(a),s.push(a),n.push(a),this.updateRange(t.valueFields,e)},e.prototype.evalPointOptions=function(t,e,i,o,r,n){var s={defaults:r._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},a=this._evalSeries[n];xt(a)||(this._evalSeries[n]=a=ao(t,{},s,!0));var p=t;return a&&ao(p=j({},p),{value:e,category:i,index:o,series:r,dataItem:r.data[o]},s),p},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=t.value,r=this.valueAxisRanges[i];isFinite(o)&&null!==o&&((r=this.valueAxisRanges[i]=r||{min:u,max:f}).min=Math.min(r.min,o),r.max=Math.max(r.max,o))},e.prototype.seriesValueAxis=function(t){var e=this.plotArea,i=t.axis,o=i?e.namedValueAxes[i]:e.valueAxis;if(!o)throw new Error("Unable to locate value axis with name "+i);return o},e.prototype.reflow=function(t){var e=this,i=this.categorySlots=[],o=this.points,r=this.categoryAxis,n=0;this.traverseDataPoints((function(t,s){var a=s.categoryIx,p=s.series,h=e.seriesValueAxis(p),l=o[n++],c=i[a];if(c||(i[a]=c=e.categorySlot(r,a,h)),l){var u=e.plotRange(l,h.startValue()),f=e.valueSlot(h,u);if(f){var d=e.pointSlot(c,f);l.aboveAxis=e.aboveAxis(l,h),l.stackValue=u[1],e.options.isStacked100&&(l.percentage=e.plotValue(l)),e.reflowPoint(l,d)}else l.visible=!1}})),this.reflowCategories(i),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},e.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},e.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(kt(t)),i=0;i<e.length;i++)e[i]&&this.limitPoint(e[i])},e.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},e.prototype.aboveAxis=function(t,e){var i=this.categoryAxisCrossingValue(e),o=t.value;return e.options.reverse?o<i:o>=i},e.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,i=t.options;return[].concat(i.axisCrossingValues||i.axisCrossingValue)[e.axisIndex||0]||0},e.prototype.reflowPoint=function(t,e){t.reflow(e)},e.prototype.reflowCategories=function(){},e.prototype.pointSlot=function(t,e){var i=this.options.invertAxes,o=i?e:t,r=i?t:e;return new $t(o.x1,r.y1,o.x2,r.y2)},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=po(e),o=e.length,r=0;r<o;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<i;n++)for(var s=0;s<o;s++){var a=e[s],p=this.categoryAxis.categoryAt(n);t(this._bindPoint(a,s,n),{category:p,categoryIx:n,categoriesCount:i,series:a,seriesIx:s})}for(var h=0;h<o;h++)this._outOfRangeCallback(e[h],"_outOfRangeMaxPoint",h,t)},e.prototype._outOfRangeCallback=function(t,e,i,o){var r=t[e];if(r){var n=r.categoryIx;o(this._bindPoint(t,i,n,r.item),{category:r.category,categoryIx:n,series:t,seriesIx:i,dataItem:r.item})}},e.prototype._bindPoint=function(t,e,i,o){this._bindCache||(this._bindCache=[]);var r=this._bindCache[e];r||(r=this._bindCache[e]=[]);var n=r[i];return n||(n=r[i]=Ni.current.bindPoint(t,i,o)),n},e.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},e.prototype.pointValue=function(t){return t.valueFields.value},e}(re);It(ho,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var lo=ho,co={click:function(t,e){return t.trigger("seriesClick",this.eventArgs(e))},hover:function(t,e){return t.trigger("seriesHover",this.eventArgs(e))},over:function(t,e){return t.trigger("seriesOver",this.eventArgs(e))},out:function(t,e){return t.trigger("seriesLeave",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:At(t),originalEvent:t,point:this}}},uo={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&xt(e)&&null!==e&&(this.note=new Ce({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},fo=function(t){function e(e,i){t.call(this),this.value=e,this.options=i,this.aboveAxis=Rt(this.options.aboveAxis,!0),this.tooltipTracking=!0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options,e=t.markers,i=t.labels;if(!this._rendered){if(this._rendered=!0,e.visible&&e.size&&(this.marker=this.createMarker(),this.append(this.marker)),i.visible){var o=it(i),r=this.pointData(),n=this.value;o?n=o(r):i.format&&(n=this.formatValue(i.format)),this.label=new be(n,j({align:a,vAlign:a,margin:{left:5,right:5},zIndex:Rt(i.zIndex,this.series.zIndex)},i),r),this.append(this.label)}this.createNote(),this.errorBar&&this.append(this.errorBar)}},e.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,i=j({color:this.color},t.border);return xt(i.color)||(i.color=new S.Color(e).brightness(.8).toHex()),i},e.prototype.createVisual=function(){},e.prototype.createMarker=function(){var t=this.options.markers;return new pe({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:this.series.opacity||t.opacity,zIndex:Rt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},e.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},e.prototype.reflow=function(t){var e=this.options,i=this.aboveAxis,o=e.vertical;this.render(),this.box=t;var r=t.clone();if(o?i?r.y1-=r.height():r.y2+=r.height():i?r.x1+=r.width():r.x2-=r.width(),this._childBox=r,this.marker&&this.marker.reflow(r),this.reflowLabel(r),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(r);if(this.note){var s=this.markerBox();if(!e.markers.visible||!e.markers.size){var a=s.center();s=new $t(a.x,a.y,a.x,a.y)}this.note.reflow(s)}},e.prototype.reflowLabel=function(t){var e=this.options,i=this.label,o=e.labels.position;i&&(o="below"===(o="above"===o?g:o)?s:o,i.reflow(t),i.box.alignTo(this.markerBox(),o),i.reflow(i.box))},e.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,i=this.options.markers,o=i.size+(i.border.width||0)+(t.border.width||0),r=new pe({type:i.type,width:o,height:o,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:Rt(t.border.opacity,1)},opacity:Rt(t.opacity,1)});return r.reflow(this._childBox),r.getElement()},e.prototype.highlightVisual=function(){return(this.marker||{}).visual},e.prototype.highlightVisualArgs=function(){var t,e,i=this.marker;if(i)e=i.paddingBox.toRect(),t=i.visual;else{var o=this.options.markers.size,r=o/2,n=this.box.center();e=new S.geometry.Rect([n.x-r,n.y-r],[o,o])}return{options:this.options,rect:e,visual:t}},e.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var i,o,r=t.x2+5;return this.aboveAxis?(i=t.y1,o=s):(i=t.y2,o=g),{point:new Zt(r,i),align:{horizontal:"left",vertical:o}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},e.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},e}(re);fo.prototype.defaults={vertical:!0,markers:{visible:!0,background:v,size:8,type:p,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:z(3),padding:z(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},j(fo.prototype,co),j(fo.prototype,uo);var go=fo,yo=function(t){function e(e,i,o){t.call(this),this.linePoints=e,this.series=i,this.seriesIx=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.points=function(){return this.toGeometryPoints(this.linePoints)},e.prototype.toGeometryPoints=function(t){for(var e=[],i=0,o=t.length;i<o;i++)t[i]&&!1!==t[i].visible&&e.push(t[i]._childBox.toRect().center());return e},e.prototype.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&&!xt(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},e.prototype.segmentVisual=function(){var t=this.options,e=this.series,i=e.color,o=e._defaults;T(i)&&o&&(i=o.color);var r=S.drawing.Path.fromPoints(this.points(),{stroke:{color:i,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex});t.closed&&r.close(),this.visual=r},e.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},e}(re);It(yo,{closed:!1});var vo=yo;function mo(t,e,i,o,r){var n=t.box,s=new S.geometry.Point;return s[e]=n[e+i],s[o]=n[o+r],s}var xo={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,i=e.justified,o=e.vertical,r=e.reverse,n=o?m:x,s=o?x:m,a=r?2:1,p=a,h=mo(t[0],n,a,s,p),l=[h],c=1;c<t.length;c++){var u=mo(t[c],n,a,s,p);if(h[n]!==u[n]){var f=new S.geometry.Point;f[n]=h[n],f[s]=u[s],l.push(f,u)}h=u}return i?h!==kt(l)&&l.push(h):l.push(mo(kt(t),n,a,s,r?1:2)),l}},bo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.points=function(){return this.calculateStepPoints(this.linePoints)},e}(vo);j(bo.prototype,xo);var _o=bo,wo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.segmentVisual=function(){var t=this.series,e=t._defaults,i=t.color;T(i)&&e&&(i=e.color);var o=new Bi(this.options.closed).process(this.points()),r=new S.drawing.Path({stroke:{color:i,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});r.segments.push.apply(r.segments,o),this.visual=r},e}(vo),Ao={renderSegments:function(){var t,e=this.options,i=this.seriesPoints,o=e.series,r=i.length;this._segments=[];for(var n=0;n<r;n++){for(var s=o[n],a=this.sortPoints(i[n]),p=a.length,h=[],l=0;l<p;l++){var c=a[l];c?h.push(c):"interpolate"!==this.seriesMissingValues(s)&&(h.length>1&&(t=this.createSegment(h,s,n,t),this._addSegment(t)),h=[])}h.length>1&&(t=this.createSegment(h,s,n,t),this._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;return!e&&this.options.isStacked?Ki:e||"interpolate"},getNearestPoint:function(t,e,i){for(var o,r=new Zt(t,e),n=this.seriesPoints[i],s=u,a=0;a<n.length;a++){var p=n[a];if(p&&xt(p.value)&&null!==p.value&&!1!==p.visible){var h=p.box.center().distanceTo(r);h<s&&(o=p,s=h)}}return o}},So=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this._setEnd(this.options.box.x1)},e.prototype.step=function(t){var e=this.options.box;this._setEnd(ct(e.x1,e.x2,t))},e.prototype._setEnd=function(t){var e=this.element,i=e.segments,o=i[1].anchor(),r=i[2].anchor();e.suspend(),o.setX(t),e.resume(),r.setX(t)},e}(S.drawing.Animation);It(So,{duration:600}),S.drawing.AnimationFactory.current.register("clip",So);var ko=So;function Co(t){for(var e=0;e<t.length;e++)if(xt(t[e].zIndex))return!0}var Po={createAnimation:function(){var t=this.getRoot();if(t&&!1!==(t.options||{}).transitions){var e=t.size(),i=S.drawing.Path.fromRect(e.toRect());this.visual.clip(i),this.animation=new ko(i,{box:e}),Co(this.options.series)&&this._setChildrenAnimation(i)}},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),i=0;i<e.length;i++){var o=e[i];o&&o.visual&&xt(o.visual.options.zIndex)&&o.visual.clip(t)}}},Mo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},e.prototype.pointType=function(){return go},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.seriesMissingValues(r),a=t.valueFields.value;if(!xt(a)||null===a){if(s!==Ki)return null;a=0}var p=this.pointOptions(r,n);p=this.evalPointOptions(p,a,o,i,r,n);var h=t.fields.color||r.color;T(r.color)&&(h=p.color);var l=new go(a,p);return l.color=h,this.append(l),l},e.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var i=t.categoryIx,o=this.categoryPoints[i],r=0;r<o.length;r++){var n=o[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},e.prototype.createSegment=function(t,e,i){var o=e.style;return new("step"===o?_o:"smooth"===o?wo:vo)(t,e,i)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e.concat(this._segments)},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(lo);j(Mo.prototype,Ao,Po);var Oo=Mo,To=function(t){function e(e,i,o,r,n){t.call(this,e,i,o),this.prevSegment=r,this.stackPoints=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){var t=this.series,e=t._defaults,i=t.line||{},o=t.color;T(o)&&e&&(o=e.color),this.visual=new S.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:o,opacity:t.opacity},stroke:null}),i.width>0&&!1!==i.visible&&this.createStroke({stroke:j({color:o,opacity:t.opacity,lineCap:"butt"},i)})},e.prototype.strokeSegments=function(){var t=this._strokeSegments;return t||(t=this._strokeSegments=this.createStrokeSegments()),t},e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},e.prototype.stackSegments=function(){return this.prevSegment?this.prevSegment.createStackSegments(this.stackPoints):this.createStackSegments(this.stackPoints)},e.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},e.prototype.segmentsFromPoints=function(t){return t.map((function(t){return new S.geometry.Segment(t)}))},e.prototype.createStroke=function(t){var e=new S.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),this.visual.append(e)},e.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},e.prototype.createFill=function(t){var e=this.strokeSegments(),i=e.slice(0),o=this.hasStackSegment();if(o){var r=this.stackSegments();vt(i,r)}var n=new S.drawing.Path(t);n.segments.push.apply(n.segments,i),!o&&e.length>1&&this.fillToAxes(n),this.visual.append(n)},e.prototype.fillToAxes=function(t){var e=this.parent,i=e.options.invertAxes,o=e.seriesValueAxis(this.series),r=e.categoryAxisCrossingValue(o),n=o.getSlot(r,r,!0),s=this.strokeSegments(),a=s[0].anchor(),p=kt(s).anchor(),h=i?n.x1:n.y1;i?t.lineTo(h,p.y).lineTo(h,a.y):t.lineTo(p.x,h).lineTo(a.x,h)},e}(vo),Ro=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},e.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},e}(To);j(Ro.prototype,xo);var jo=Ro,Bo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){var t=new Bi(this.options.closed),e=this.points();return t.process(e)},e.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],i=t.length-1;i>=0;i--){var o=t[i];e.push(new S.geometry.Segment(o.anchor(),o.controlOut(),o.controlIn()))}return e},e}(To),Io=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,i,o){var r,n,s=this.options.isStacked,a=(e.line||{}).style;s&&i>0&&o&&("gap"!==this.seriesMissingValues(e)?(n=o.linePoints,r=o):n=this._gapStackPoints(t,i,a));return new("step"===a?jo:"smooth"===a?Bo:To)(t,e,i,r,n)},e.prototype.reflow=function(e){t.prototype.reflow.call(this,e);var i=this._stackPoints;if(i)for(var o=0;o<i.length;o++){var r=i[o],n=this.categoryAxis.getSlot(r.categoryIx);r.reflow(n)}},e.prototype._gapStackPoints=function(t,e,i){var o=this.seriesPoints,r=t[0].categoryIx,n=t.length;r<0&&(r=0,n--);var s=r+n,a=this.seriesOptions[0]._outOfRangeMinPoint?1:0,p=[];this._stackPoints=this._stackPoints||[];for(var h=r;h<s;h++){var l=h+a,c=e,u=void 0;do{u=o[--c][l]}while(c>0&&!u);if(u)"step"!==i&&h>r&&!o[c][l-1]&&p.push(this._previousSegmentPoint(h,l,l-1,c)),p.push(u),"step"!==i&&h+1<s&&!o[c][l+1]&&p.push(this._previousSegmentPoint(h,l,l+1,c));else{var f=this._createGapStackPoint(h);this._stackPoints.push(f),p.push(f)}}return p},e.prototype._previousSegmentPoint=function(t,e,i,o){for(var r,n=this.seriesPoints,s=o;s>0&&!r;)r=n[--s][i];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},e.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),i=new go(0,e);return i.categoryIx=t,i.series={},i},e.prototype.seriesMissingValues=function(t){return t.missingValues||Ki},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(Oo),Vo=function(t){function e(){t.call(this),this.axisRanges={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(t){var e=this.axisRanges;for(var i in t){var o=t[i],r=e[i];e[i]=r=r||{min:u,max:f},r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max)}},e.prototype.reset=function(t){this.axisRanges[t]=void 0},e.prototype.query=function(t){return this.axisRanges[t]},e}(S.Class),Lo=function(t){function e(e,i,o){t.call(this,i),this.textBox=new be(e,this.options,o),this.append(this.textBox)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},e.prototype.reflow=function(t){var e=this.options,i=e.vertical,o=e.aboveAxis,r=this.children[0],n=r.options,p=r.box,h=r.options.padding,l=t;n.align=i?a:c,n.vAlign=i?g:a,"insideEnd"===e.position?i?(n.vAlign=g,!o&&p.height()<t.height()&&(n.vAlign=s)):n.align=o?d:c:e.position===a?(n.vAlign=a,n.align=a):"insideBase"===e.position?i?n.vAlign=o?s:g:n.align=o?c:d:"outsideEnd"===e.position&&(i?l=o?new $t(t.x1,t.y1-p.height(),t.x2,t.y1):new $t(t.x1,t.y2,t.x2,t.y2+p.height()):(n.align=a,l=o?new $t(t.x2,t.y1,t.x2+p.width(),t.y2):new $t(t.x1-p.width(),t.y1,t.x1,t.y2))),e.rotation||(i?h.left=h.right=(l.width()-r.contentBox.width())/2:h.top=h.bottom=(l.height()-r.contentBox.height())/2),r.reflow(l)},e.prototype.alignToClipBox=function(t){var e=this.options.vertical?x:m,i=e+"1",o=e+"2",r=this.children[0],n=this.parent.box;if(n[i]<t[i]||t[o]<n[o]){var s=r.paddingBox.clone();s[i]=Math.max(n[i],t[i]),s[o]=Math.min(n[o],t[o]),this.reflow(s)}},e}(re);It(Lo,{position:"outsideEnd",margin:z(3),padding:z(4),color:n,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var Eo=Lo;function zo(t){var e=t.overlay;return e&&e.gradient&&"none"!==e.gradient}var Do=function(t){function e(e,i){t.call(this),this.options=i,this.color=i.color||v,this.aboveAxis=Rt(this.options.aboveAxis,!0),this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},e.prototype.createLabel=function(){var t=this.options,e=t.labels;if(e.visible){var i,o=this.pointData(),r=it(e);i=r?r(o):this.formatValue(e.format),this.label=new Eo(i,j({vertical:t.vertical},e),o),this.append(this.label)}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var i=0;i<this.errorBars.length;i++)this.errorBars[i].reflow(t)},e.prototype.createVisual=function(){var e=this,i=this.box,o=this.options,r=o.visual;if(!1!==this.visible)if(t.prototype.createVisual.call(this),r){var n=this.rectVisual=r({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:i.toRect(),createVisual:function(){var t=new S.drawing.Group;return e.createRect(t),t},options:o});n&&this.visual.append(n)}else i.width()>0&&i.height()>0&&this.createRect(this.visual)},e.prototype.createRect=function(t){var e=this.options,i=e.border,o=xt(i.opacity)?i.opacity:e.opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);var n=this.rectVisual=S.drawing.Path.fromRect(r,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:i.width,opacity:o,dashType:i.dashType}}),s=this.box.width(),a=this.box.height();if((e.vertical?s:a)>6&&(k(n),(s<1||a<1)&&(n.options.stroke.lineJoin="round")),t.append(n),zo(e)){var p=this.createGradientOverlay(n,{baseColor:this.color},j({end:e.vertical?void 0:[0,1]},e.overlay));t.append(p)}},e.prototype.createHighlight=function(t){return k(S.drawing.Path.fromRect(this.box.toRect(),t))},e.prototype.highlightVisual=function(){return this.rectVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},e.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,i=e._brightness||.8,o=e.color;return xt(o)||(o=new S.Color(t).brightness(i).toHex()),o},e.prototype.tooltipAnchor=function(){var t,e,i=this.options,o=this.box,r=this.aboveAxis,n=this.owner.pane.clipBox()||o,a=c,p=g;if(i.vertical)t=Math.min(o.x2,n.x2)+5,r?e=Math.max(o.y1,n.y1):(e=Math.min(o.y2,n.y2),p=s);else{var h=Math.max(o.x1,n.x1),l=Math.min(o.x2,n.x2);i.isStacked?(p=s,r?(a=d,t=l):t=h,e=Math.max(o.y1,n.y1)-5):(r?t=l+5:(t=h-5,a=d),e=Math.max(o.y1,n.y1))}return{point:new Zt(t,e),align:{horizontal:a,vertical:p}}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.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}},e}(re);j(Do.prototype,co),j(Do.prototype,uo),Do.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var Fo=Do;function Uo(t,e){t.forEach(e)}function Go(t,e){for(var i=t.length,o=i-1;o>=0;o--)e(t[o],o-i-1)}var Ho=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Go:Uo}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=e.vertical,o=e.gap,r=e.spacing,n=this.children,s=n.length,a=i?x:m,p=s+o+r*(s-1),h=(i?t.height():t.width())/p,l=t[a+1]+h*(o/2);this.forEach(n,(function(e,i){var o=(e.box||t).clone();o[a+1]=l,o[a+2]=l+h,e.reflow(o),i<s-1&&(l+=h*r),l+=h}))},e}(re);It(Ho,{vertical:!1,gap:0,spacing:0});var No=Ho,Wo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){for(var e=this.options.vertical?m:x,i=this.children,o=i.length,r=this.box=new $t,n=0;n<o;n++){var s=i[n];if(!1!==s.visible){var a=s.box.clone();a.snapTo(t,e),0===n&&(r=this.box=a.clone()),s.reflow(a),r.wrap(a)}}},e}(re);It(Wo,{vertical:!0});var qo=Wo,Xo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.updateStackRange()},e.prototype.pointType=function(){return Fo},e.prototype.clusterType=function(){return No},e.prototype.stackType=function(){return qo},e.prototype.stackLimits=function(e,i){return t.prototype.stackLimits.call(this,e,i)},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=s.isStacked,h=this.pointValue(t),l=this.pointOptions(r,n),c=l.labels;p&&"outsideEnd"===c.position&&(c.position="insideEnd"),l.isStacked=p;var u=t.fields.color||r.color;h<0&&l.negativeColor&&(u=l.negativeColor),l=this.evalPointOptions(l,h,o,i,r,n),T(r.color)&&(u=l.color);var f=new(this.pointType())(h,l);f.color=u;var d=a[i];d||(d=new(this.clusterType())({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(d));p?this.getStackWrap(r,d).append(f):d.append(f);return f},e.prototype.getStackWrap=function(t,e){var i,o=t.stack,r=o&&o.group||o,n=e.children;if("string"==typeof r){for(var s=0;s<n.length;s++)if(n[s]._stackGroup===r){i=n[s];break}}else i=n[0];i||((i=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=r,e.append(i));return i},e.prototype.categorySlot=function(t,e,i){var o=this.options,r=t.getSlot(e),n=i.startValue();if(o.isStacked){var s=i.getSlot(n,n,!0),a=o.invertAxes?m:x;r[a+1]=r[a+2]=s[a+1]}return r},e.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},e.prototype.createAnimation=function(){this._setAnimationOptions(),t.prototype.createAnimation.call(this),Co(this.options.series)&&this._setChildrenAnimation()},e.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var i=t[e],o=i.visual;o&&xt(o.options.zIndex)&&(i.options.animation=this.options.animation,i.createAnimation())}},e.prototype._setAnimationOptions=function(){var t,e=this.options,i=e.animation||{};if(e.isStacked){var o=this.seriesValueAxis(e.series[0]);t=o.getSlot(o.startValue())}else t=this.categoryAxis.getSlot(0);i.origin=new S.geometry.Point(t.x1,t.y1),i.vertical=!e.invertAxes},e}(lo);It(Xo,{animation:{type:$i}});var Yo=Xo,Zo=function(t){function e(e,i){t.call(this,i),this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=this.value,o=this.owner.seriesValueAxis(e),r=o.getSlot(i.open,i.close),n=o.getSlot(i.low,i.high);r.x1=n.x1=t.x1,r.x2=n.x2=t.x2,this.realBody=r;var s=n.center().x,a=[];a.push([[s,n.y1],[s,r.y1]]),a.push([[s,r.y2],[s,n.y2]]),this.lines=a,this.box=n.clone().wrap(r),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},e.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},e.prototype.mainVisual=function(t){var e=new S.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},e.prototype.createBody=function(t,e){var i=S.drawing.Path.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:Rt(e.border.opacity,e.opacity)}),k(i),t.append(i),zo(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},j({end:e.vertical?void 0:[0,1]},e.overlay)))},e.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},e.prototype.drawLines=function(t,e,i,o){if(i)for(var r={stroke:{color:o.color||this.color,opacity:Rt(o.opacity,e.opacity),width:o.width,dashType:o.dashType,lineCap:"butt"}},n=0;n<i.length;n++){var s=S.drawing.Path.fromPoints(i[n],r);k(s),t.append(s)}},e.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return xt(e)||(e=new S.Color(this.color).brightness(t._brightness).toHex()),e},e.prototype.createOverlay=function(){var t=S.drawing.Path.fromRect(this.box.toRect(),{fill:{color:v,opacity:0},stroke:null});this.visual.append(t)},e.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color;this.color=t.color||this.color;var i=this.mainVisual(j({},this.options,{line:{color:this.getBorderColor()}},t));return this.color=e,i},e.prototype.highlightVisual=function(){return this._mainVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},e.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new Zt(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:c,vertical:g}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e}(re);It(Zo,{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:{}}}),j(Zo.prototype,co),j(Zo.prototype,uo);var Ko=Zo;function $o(t){return Di(t)===t.length}var Qo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},e.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=$o(this.splitValue(h)),c=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),l&&(i=this.createPoint(t,e));var f=a[o];f||(f=new No({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(f)),i&&(this.updateRange(h,e),f.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c,i.noteText=t.fields.noteText),this.points.push(i),u.push(i)},e.prototype.pointType=function(){return Ko},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.pointType(),a=t.valueFields,p=j({},r),h=t.fields.color||r.color;p=this.evalPointOptions(p,a,o,i,r,n),"candlestick"===r.type&&a.open>a.close&&(h=t.fields.downColor||r.downColor||r.color),T(r.color)&&(h=p.color),p.vertical=!this.options.invertAxes;var l=new s(a,p);return l.color=h,l},e.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=this.splitValue(t),r=this.valueAxisRanges[i];r=this.valueAxisRanges[i]=r||{min:u,max:f},r=this.valueAxisRanges[i]={min:Math.min.apply(Math,o.concat([r.min])),max:Math.max.apply(Math,o.concat([r.max]))}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.open,i.high,i.low,i.close,t.category)},e.prototype.animationPoints=function(){return this.points},e}(lo);j(Qo.prototype,Po);var Jo=Qo,tr=function(t){function e(e,i){t.call(this,e,i),this.createNote()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e,i,o=this.options,r=this.value,n=this.owner.seriesValueAxis(o);this.boxSlot=i=n.getSlot(r.q1,r.q3),this.realBody=i,this.reflowBoxSlot(t),this.whiskerSlot=e=n.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t);var s=n.getSlot(r.median);if(r.mean){var a=n.getSlot(r.mean);this.meanPoints=this.calcMeanPoints(t,a)}this.whiskerPoints=this.calcWhiskerPoints(i,e),this.medianPoints=this.calcMedianPoints(t,s),this.box=e.clone().wrap(i),this.reflowNote()},e.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},e.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},e.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},e.prototype.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]]]},e.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},e.prototype.renderOutliers=function(t){for(var e=this.value,i=e.outliers||[],o=3*Math.abs(e.q3-e.q1),r=[],n=t.markers||{},s=0;s<i.length;s++){var a=i[s],p=j({},(n=a<e.q3+o&&a>e.q1-o?t.outliers:t.extremes).border);xt(p.color)||(xt(this.color)?p.color=this.color:p.color=new S.Color(n.background).brightness(.8).toHex());var h=new pe({type:n.type,width:n.size,height:n.size,rotation:n.rotation,background:n.background,border:p,opacity:n.opacity});h.value=a,r.push(h)}return this.reflowOutliers(r),r},e.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),i=this.box.center(),o=0;o<t.length;o++){var r=t[o].value,n=e.getSlot(r);this.options.vertical?n.move(i.x):n.move(void 0,i.y),this.box=this.box.wrap(n),t[o].reflow(n)}},e.prototype.mainVisual=function(e){for(var i=t.prototype.mainVisual.call(this,e),o=this.renderOutliers(e),r=0;r<o.length;r++){var n=o[r].getElement();n&&i.append(n)}return i},e.prototype.createLines=function(t,e){this.drawLines(t,e,this.whiskerPoints,e.whiskers),this.drawLines(t,e,this.medianPoints,e.median),this.drawLines(t,e,this.meanPoints,e.mean)},e.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color?this.color:t.prototype.getBorderColor.call(this)},e}(Ko);It(tr,{border:{_brightness:.8},line:{width:2},median:{color:"#f6f6f6"},mean:{width:2,dashType:"dash",color:"#f6f6f6"},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{6:d}</th></tr><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:8,type:"cross",background:v,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:p,background:v,border:{width:2,opacity:1},opacity:0}}),j(tr.prototype,co);var er=tr,ir=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},e.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},e.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e.prototype.calcWhiskerPoints=function(t,e){var i=e.center().y;return[[[e.x1,i-5],[e.x1,i+5],[e.x1,i],[t.x1,i]],[[e.x2,i-5],[e.x2,i+5],[e.x2,i],[t.x2,i]]]},e.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e}(er),or=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=$o(this.splitValue(h)),c=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),l&&(i=this.createPoint(t,e));var f=a[o];f||(f=new No({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(f)),i&&(this.updateRange(h,e),f.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c),this.points.push(i),u.push(i)},e.prototype.pointType=function(){return this.options.invertAxes?ir:er},e.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=this.valueAxisRanges[i],r=this.splitValue(t).concat(this.filterOutliers(t.outliers));xt(t.mean)&&(r=r.concat(t.mean)),o=this.valueAxisRanges[i]=o||{min:u,max:f},o=this.valueAxisRanges[i]={min:Math.min.apply(Math,r.concat([o.min])),max:Math.max.apply(Math,r.concat([o.max]))}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.lower,i.q1,i.median,i.q3,i.upper,i.mean,t.category)},e.prototype.filterOutliers=function(t){for(var e=(t||[]).length,i=[],o=0;o<e;o++){var r=t[o];xt(r)&&null!==r&&i.push(r)}return i},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(Jo),rr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},e}(no);function nr(t){return xt(t)&&null!==t}var sr=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this._initFields(),this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.addErrorBar=function(t,e,i){var o,r=t.value[e],n=e+"Value",s=e+"ErrorLow",a=e+"ErrorHigh",p=i.seriesIx,h=i.series,l=t.options.errorBars,c=i[s],u=i[a];P(r)&&(P(c)&&P(u)&&(o={low:c,high:u}),l&&xt(l[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][p]=this.seriesErrorRanges[e][p]||new Xi(l[n],h,e),o=this.seriesErrorRanges[e][p].getErrorRange(r,l[n])),o&&this.addPointErrorBar(o,t,e))},e.prototype.addPointErrorBar=function(t,e,i){var o=t.low,r=t.high,n=e.series,s=e.options.errorBars,a=i===x,p={};e[i+"Low"]=o,e[i+"High"]=r,e.errorBars=e.errorBars||[];var h=new rr(o,r,a,this,n,s);e.errorBars.push(h),e.append(h),p[i]=o,this.updateRange(p,n),p[i]=r,this.updateRange(p,n)},e.prototype.addValue=function(t,e){var i,o=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],a=this.seriesMissingValues(s),p=this.seriesPoints[n],h=t;nr(o)&&nr(r)||(h=this.createMissingValue(h,a)),h&&((i=this.createPoint(h,e))&&(Object.assign(i,e),this.addErrorBar(i,m,e),this.addErrorBar(i,x,e)),this.updateRange(h,e.series)),this.points.push(i),p.push(i)},e.prototype.seriesMissingValues=function(t){return t.missingValues},e.prototype.createMissingValue=function(){},e.prototype.updateRange=function(t,e){var i=this.chartService.intl,o=e.xAxis,r=e.yAxis,n=t.x,s=t.y,a=this.xAxisRanges[o],p=this.yAxisRanges[r];nr(n)&&(a=this.xAxisRanges[o]=a||{min:u,max:f},M(n)&&(n=Ye(i,n)),a.min=Math.min(a.min,n),a.max=Math.max(a.max,n)),nr(s)&&(p=this.yAxisRanges[r]=p||{min:u,max:f},M(s)&&(s=Ye(i,s)),p.min=Math.min(p.min,s),p.max=Math.max(p.max,s))},e.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},s=this._evalSeries[r];xt(s)||(this._evalSeries[r]=s=ao(t,{},n,!0));var a=t;return s&&ao(a=j({},t),{value:e,series:o,dataItem:i.dataItem},n),a},e.prototype.pointType=function(){return go},e.prototype.pointOptions=function(t,e){var i=this.seriesOptions[e];if(!i){var o=this.pointType().prototype.defaults;this.seriesOptions[e]=i=j({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return i},e.prototype.createPoint=function(t,e){var i=e.series,o=this.pointOptions(i,e.seriesIx),r=e.color||i.color;o=this.evalPointOptions(o,t,e),T(i.color)&&(r=o.color);var n=new go(t,o);return n.color=r,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,i=t.yAxis,o=this.plotArea,r=e?o.namedXAxes[e]:o.axisX,n=i?o.namedYAxes[i]:o.axisY;if(!r)throw new Error("Unable to locate X axis with name "+e);if(!n)throw new Error("Unable to locate Y axis with name "+i);return{x:r,y:n}},e.prototype.reflow=function(t){var e=this,i=this.points,o=!this.options.clip,r=0;this.traverseDataPoints((function(t,n){var s=i[r++],a=e.seriesAxes(n.series),p=a.x.getSlot(t.x,t.x,o),h=a.y.getSlot(t.y,t.y,o);if(s)if(p&&h){var l=e.pointSlot(p,h);s.reflow(l)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new $t(t.x1,e.y1,t.x2,e.y2)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=this.seriesPoints,o=0;o<e.length;o++){var r=e[o];i[o]||(i[o]=[]);for(var n=0;n<r.data.length;n++){var s=this._bindPoint(r,o,n),a=s.valueFields,p=s.fields;t(a,j({pointIx:n,series:r,seriesIx:o,dataItem:r.data[n],owner:this},p))}}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},e}(re);It(sr,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),j(sr.prototype,Po,{_bindPoint:lo.prototype._bindPoint});var ar=sr,pr=function(t){function e(e,i){t.call(this,e,i),this.category=e.category}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,i=this.options.markers,o=this.box.center(),r=(i.size+i.border.width+e.width)/2,n=new S.drawing.Group,s=new S.drawing.Circle(new S.geometry.Circle([o.x,o.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:i.background,stops:[{offset:0,color:i.background,opacity:.3},{offset:1,color:i.background,opacity:0}]})}),a=new S.drawing.Circle(new S.geometry.Circle([o.x,o.y],r),{stroke:{color:e.color||new S.Color(i.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:i.background,opacity:t.opacity}});return n.append(s,a),n},e}(go);pr.prototype.defaults=j({},pr.prototype.defaults,{labels:{position:a},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),pr.prototype.defaults.highlight.zIndex=void 0;var hr=pr,lr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this._maxSize=f,t.prototype._initFields.call(this)},e.prototype.addValue=function(e,i){null!==e.size&&(e.size>0||e.size<0&&i.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(e.size)),t.prototype.addValue.call(this,e,i)):(this.points.push(null),this.seriesPoints[i.seriesIx].push(null))},e.prototype.reflow=function(e){this.updateBubblesSize(e),t.prototype.reflow.call(this,e)},e.prototype.pointType=function(){return hr},e.prototype.createPoint=function(t,e){var i=e.series,o=i.data.length,r=e.pointIx*(600/o),n={delay:r,duration:600-r,type:"bubble"},s=e.color||i.color;t.size<0&&i.negativeValues.visible&&(s=Rt(i.negativeValues.color,s));var a=j({labels:{animation:{delay:r,duration:600-r}}},this.pointOptions(i,e.seriesIx),{markers:{type:p,border:i.border,opacity:i.opacity,animation:n}});a=this.evalPointOptions(a,t,e),T(i.color)&&(s=a.color),a.markers.background=s;var h=new hr(t,a);return h.color=s,this.append(h),h},e.prototype.updateBubblesSize=function(t){for(var e=this.options.series,i=Math.min(t.width(),t.height()),o=0;o<e.length;o++)for(var r=e[o],n=this.seriesPoints[o],s=(r.minSize||Math.max(.02*i,10))/2,a=(r.maxSize||.2*i)/2,p=Math.PI*s*s,h=(Math.PI*a*a-p)/this._maxSize,l=0;l<n.length;l++){var c=n[l];if(c){var u=Math.abs(c.value.size)*h,f=Math.sqrt((p+u)/Math.PI),d=Rt(c.options.zIndex,0)+(1-f/a);j(c.options,{zIndex:d,markers:{size:2*f,zIndex:d},labels:{zIndex:d+1}})}}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.size,t.category)},e.prototype.createAnimation=function(){},e.prototype.createVisual=function(){},e}(ar);It(lr,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var cr=lr,ur=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pe);j(ur.prototype,co);var fr=ur,dr=function(t){function e(e,i){t.call(this,i),this.aboveAxis=this.options.aboveAxis,this.color=i.color||v,this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,xt(this.value.target)&&(this.target=new fr({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:g,align:d}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},e.prototype.reflow=function(t){this.render();var e=this.options,i=this.target,o=this.owner,r=e.invertAxes,n=o.seriesValueAxis(this.options),s=o.categorySlot(o.categoryAxis,e.categoryIx,n),a=n.getSlot(this.value.target),p=r?a:s,h=r?s:a;if(i){var l=new $t(p.x1,h.y1,p.x2,h.y2);i.options.height=r?l.height():e.target.line.width,i.options.width=r?e.target.line.width:l.width(),i.reflow(l)}this.note&&this.note.reflow(t),this.box=t},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options,i=S.drawing.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});e.border.width>0&&i.options.set("stroke",{color:e.border.color||this.color,width:e.border.width,dashType:e.border.dashType,opacity:Rt(e.border.opacity,e.opacity)}),this.bodyVisual=i,k(i),this.visual.append(i)},e.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=S.drawing.Animation.create(this.bodyVisual,this.options.animation))},e.prototype.createHighlight=function(t){return S.drawing.Path.fromRect(this.box.toRect(),t)},e.prototype.highlightVisual=function(){return this.bodyVisual},e.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e}(re);dr.prototype.tooltipAnchor=Fo.prototype.tooltipAnchor,It(dr,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),j(dr.prototype,co),j(dr.prototype,uo);var gr=dr,yr=function(t){function e(e,i){!function(t){for(var e=t.series,i=0;i<e.length;i++){var o=e[i],r=o.data;!r||b(r[0])||B(r[0])||(o.data=[r])}}(i),t.call(this,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},e.prototype.plotRange=function(t){var e=t.series,i=this.seriesValueAxis(e),o=this.categoryAxisCrossingValue(i);return[o,t.value.current||o]},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=t.valueFields,h=j({vertical:!s.invertAxes,overlay:r.overlay,categoryIx:i,invertAxes:s.invertAxes},r),l=t.fields.color||r.color;h=this.evalPointOptions(h,p,o,i,r,n),T(r.color)&&(l=h.color);var c=new gr(p,h);c.color=l;var u=a[i];return u||(u=new No({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(u)),u.append(c),c},e.prototype.updateRange=function(t,e){var i=t.current,o=t.target,r=e.series.axis,n=this.valueAxisRanges[r];xt(i)&&!isNaN(i)&&xt(o&&!isNaN(o))&&((n=this.valueAxisRanges[r]=n||{min:u,max:f}).min=Math.min(n.min,i,o),n.max=Math.max(n.max,i,o))},e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},e.prototype.pointValue=function(t){return t.valueFields.current},e.prototype.aboveAxis=function(t){return t.value.current>0},e.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var i=t[e];i.options.animation=this.options.animation,i.createAnimation()}},e}(lo);yr.prototype._setAnimationOptions=Yo.prototype._setAnimationOptions,It(yr,{animation:{type:$i}});var vr=yr,mr=function(t){function e(e,i){t.call(this),this.chartService=e,this.options=j({},this.options,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getStyle=function(t,e){var i=t.background,o=t.border.color;if(e){var r=e.color||e.options.color;i=Rt(i,r),o=Rt(o,r)}var n=z(t.padding||{},"auto");return{backgroundColor:i,borderColor:o,font:t.font,color:t.color,opacity:t.opacity,borderWidth:I(t.border.width),paddingTop:I(n.top),paddingBottom:I(n.bottom),paddingLeft:I(n.left),paddingRight:I(n.right)}},e.prototype.show=function(t,e,i){t.format=e.format;var o=this.getStyle(e,i);t.style=o;var r=new S.Color(o.backgroundColor);xt(e.color)||r.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},e.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},e.prototype.destroy=function(){delete this.chartService},e}(S.Class);It(mr,{border:{width:1},opacity:1});var xr=mr,br=function(t){function e(e,i,o){t.call(this,e,o),this.crosshair=i,this.formatService=e.format,this.initAxisName()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initAxisName=function(){var t,e=this.crosshair.axis;t=e.plotArea.categoryAxis?e.getCategory?"categoryAxis":"valueAxis":e.options.vertical?"yAxis":"xAxis",this.axisName=t},e.prototype.showAt=function(t){var e=this.crosshair.axis,i=this.options,o=e[i.stickyMode?"getCategory":"getValue"](t),r=o;i.format?r=this.formatService.auto(i.format,o):e.options.type===h&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],o)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},e.prototype.hide=function(){this.chartService.notify("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},e.prototype.getAnchor=function(){var t,e,i,o=this.crosshair,r=this.options,n=r.position,p=r.padding,h=!o.axis.options.vertical,l=o.line.bbox();return h?(t=a,n===s?(e=g,i=l.bottomLeft().translate(0,p)):(e=s,i=l.topLeft().translate(0,-p))):(e=a,n===c?(t=d,i=l.topLeft().translate(-p,0)):(t=c,i=l.topRight().translate(p,0))),{point:i,align:{horizontal:t,vertical:e}}},e}(xr);It(br,{padding:10});var _r=br,wr=function(t){function e(e,i,o){t.call(this,o),this.axis=i,this.stickyMode=i instanceof Qe;var r=this.options.tooltip;r.visible&&(this.tooltip=new _r(e,this,j({},r,{stickyMode:this.stickyMode})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},e.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},e.prototype.moveLine=function(){var t,e=this.axis,i=this.point,o=e.options.vertical,r=this.getBox(),n=o?x:m,s=new S.geometry.Point(r.x1,r.y1);if(t=o?new S.geometry.Point(r.x2,r.y1):new S.geometry.Point(r.x1,r.y2),i)if(this.stickyMode){var a=e.getSlot(e.pointCategoryIndex(i));s[n]=t[n]=a.center()[n]}else s[n]=t[n]=i[n];this.box=r,this.line.moveTo(s).lineTo(t)},e.prototype.getBox=function(){for(var t,e=this.axis,i=e.pane.axes,o=i.length,r=e.options.vertical,n=e.lineBox().clone(),s=r?m:x,a=0;a<o;a++){var p=i[a];p.options.vertical!==r&&(t?t.wrap(p.lineBox()):t=p.lineBox().clone())}return n[s+1]=t[s+1],n[s+2]=t[s+2],n},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options;this.line=new S.drawing.Path({stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},e.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),t.prototype.destroy.call(this)},e}(re);It(wr,{color:n,width:2,zIndex:-1,tooltip:{visible:!1}});var Ar=wr,Sr=function(t){function e(e,i){t.call(this,e),this.pane=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.shouldClip=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)if(!0===t[i].options.clip)return!0;return!1},e.prototype._clipBox=function(){return this.pane.chartsBox()},e.prototype.createVisual=function(){if(this.visual=new S.drawing.Group({zIndex:0}),this.shouldClip()){var t=(this.clipBox=this._clipBox()).toRect(),e=S.drawing.Path.fromRect(t);k(e),this.visual.clip(e),this.unclipLabels()}},e.prototype.stackRoot=function(){return this},e.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,i=0;i<t.length;i++)for(var o=t[i].points||{},r=o.length,n=0;n<r;n++){var s=o[n];if(s&&!1!==s.visible&&s.overlapsBox&&s.overlapsBox(e))if(s.unclipElements)s.unclipElements();else{var a=s.label,p=s.note;a&&a.options.visible&&(a.alignToClipBox&&a.alignToClipBox(e),a.options.noclip=!0),p&&p.options.visible&&(p.options.noclip=!0)}}},e.prototype.destroy=function(){t.prototype.destroy.call(this),delete this.parent},e}(re);Sr.prototype.isStackRoot=!0;var kr=Sr,Cr=function(t){function e(e){t.call(this,e),this.id="pane"+Pr++,this.createTitle(),this.content=new re,this.chartContainer=new kr({},this),this.append(this.content),this.axes=[],this.charts=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createTitle=function(){var t=this.options.title;B(t)&&(t=j({},t,{align:t.position,position:g})),this.title=we.buildTitle(t,this,e.prototype.options.title)},e.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},e.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},e.prototype.appendChart=function(t){this.chartContainer.parent!==this.content&&this.content.append(this.chartContainer),this.charts.push(t),this.chartContainer.append(t),t.pane=this},e.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var i=0;i<this.charts.length;i++)t.removeChart(this.charts[i])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},e.prototype.reflow=function(e){var i;kt(this.children)===this.content&&(i=this.children.pop()),t.prototype.reflow.call(this,e),i&&this.children.push(i),this.title&&(this.contentBox.y1+=this.title.box.height())},e.prototype.visualStyle=function(){var e=t.prototype.visualStyle.call(this);return e.zIndex=-10,e},e.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},e.prototype.stackRoot=function(){return this},e.prototype.clipRoot=function(){return this},e.prototype.createGridLines=function(){for(var t=this.axes,e=t.concat(this.parent.axes),i=[],o=[],r=0;r<t.length;r++)for(var n=t[r],s=n.options.vertical,a=s?i:o,p=0;p<e.length;p++)if(0===a.length){var h=e[p];s!==h.options.vertical&&vt(a,n.createGridLines(h))}},e.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),this.content.parent=this,this.title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},e.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,i=new $t,o=0;o<e;o++){var r=t[o],n=r.options.vertical?x:m,s=r.lineBox();i[n+1]=s[n+1],i[n+2]=s[n+2]}if(0===i.x2)for(var a=this.parent.axes,p=a.length,h=0;h<p;h++){var l=a[h];if(!l.options.vertical){var c=l.lineBox();i.x1=c.x1,i.x2=c.x2}}return i},e.prototype.clipBox=function(){return this.chartContainer.clipBox},e.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Ei(this),index:this.paneIndex,name:this.options.name})},e}(se),Pr=1;Cr.prototype.isStackRoot=!0,It(Cr,{zIndex:-1,shrinkToFit:!0,title:{align:c},visible:!0});var Mr=Cr;function Or(t,e){null!==e&&t.push(e)}function Tr(t,e,i){var o=e.visible;if(xt(o))return o;var r=t.pointVisibility;return r?r[i]:void 0}function Rr(t){for(var e=t.data,i=[],o=0,r=0,n=0;n<e.length;n++){var s=Ni.current.bindPoint(t,n),a=s.valueFields.value;M(a)&&(a=parseFloat(a)),P(a)?(s.visible=!1!==Tr(t,s.fields,n),s.value=Math.abs(a),i.push(s),s.visible&&(o+=s.value),0!==a&&r++):i.push(null)}return{total:o,points:i,count:r}}function jr(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function Br(t,e){for(var i=[],o=[].concat(e),r=0;r<t.length;r++){var n=t[r];lt(n.type,o)&&i.push(n)}return i}function Ir(t,e,i){if(null===e)return e;var o="_date_"+t,r=e[o];return r||(r=Ye(i,nt(t)(e)),e[o]=r),r}function Vr(t,e){var i=t.type,o=e instanceof Date;return!i&&o||jr(i,h)}function Lr(t){return 1===t.length?t[0]:t}var Er=/area/i;function zr(t,e){var i=Ni.current.bindPoint(t,null,e).valueFields;for(var o in i)if(O(i[o]))return!0}function Dr(t){var e,i,o=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,h=t.series,l=o;do{p(l+=r)&&(e=zr(h,(i=a(l)).item))}while(n<=l&&l<=s&&!e);if(e)return i}function Fr(t,e,i,o,r){var n=e.min,s=e.max,a=n>0&&n<i,p=s+1<i;if(a||p){var h,l,c;if("interpolate"!==function(t){return t.missingValues?t.missingValues:Er.test(t.type)||t.stack?Ki:"interpolate"}(t))a&&(h=o(n-1)),p&&(l=o(s+1));else a&&(h=zr(t,(c=o(n-1)).item)?c:Dr({start:n,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),p&&(l=zr(t,(c=o(s+1)).item)?c:Dr({start:s,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}));h&&(t._outOfRangeMinPoint=h),l&&(t._outOfRangeMaxPoint=l)}}var Ur=function(t){function e(e,i,o){t.call(this,i),this.initFields(e,i),this.series=e,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.items=[],this.axes=[],this.crosshairs=[],this.chartService=o,this.originalOptions=i,this.createPanes(),this.render(),this.createCrosshairs()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){},e.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},e.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,i=this.options.panes||[],o=Math.max(i.length,1),r=[],n=j({title:{color:t.color}},e),s=0;s<o;s++){var a=j({},n,i[s]);M(a.title)&&(a.title=j({text:a.title},n.title));var p=new Mr(a);p.paneIndex=s,r.push(p),this.append(p)}this.panes=r},e.prototype.crosshairOptions=function(t){return t.options.crosshair},e.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.axes.length;o++){var r=i.axes[o],n=this.crosshairOptions(r);if(n&&n.visible){var s=new Ar(this.chartService,r,n);this.crosshairs.push(s),i.content.append(s)}}},e.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,i=t.axes,o=e.length-1;o>=0;o--)for(var r=0;r<i.length;r++)if(e[o].axis===i[r]){e.splice(o,1);break}},e.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},e.prototype.findPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].options.name===t){e=i[o];break}return e||i[0]},e.prototype.findPointPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].box.containsPoint(t)){e=i[o];break}return e},e.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},e.prototype.removeAxis=function(t){for(var e=[],i=0;i<this.axes.length;i++){var o=this.axes[i];t!==o?e.push(o):o.destroy()}this.axes=e},e.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},e.prototype.removeChart=function(t){for(var e=[],i=0;i<this.charts.length;i++){var o=this.charts[i];o!==t?e.push(o):o.destroy()}this.charts=e},e.prototype.addToLegend=function(t){for(var e=t.length,i=this.options.legend,o=i.labels||{},r=i.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var p=t[a],h=!1!==p.visible;if(!1!==p.visibleInLegend){var l=p.name,c=h?it(o):it(n)||it(o);c&&(l=c({text:nr(l)?l:"",series:p}));var u=p._defaults,f=p.color;T(f)&&u&&(f=u.color);var d=void 0,g=void 0;h?(d={},g=f):(d={color:n.color,font:n.font},g=r.markers.color),nr(l)&&""!==l&&s.push({text:l,labels:d,markerColor:g,series:p,active:h})}}vt(i.items,s)},e.prototype.groupAxes=function(t){for(var e=[],i=[],o=0;o<t.length;o++)for(var r=t[o].axes,n=0;n<r.length;n++){var s=r[n];s.options.vertical?i.push(s):e.push(s)}return{x:e,y:i,any:e.concat(i)}},e.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},i=0;i<t.length;i++){var o=t[i],r=this.seriesPaneName(o);e[r]?e[r].push(o):e[r]=[o]}return e},e.prototype.filterVisibleSeries=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];!1!==o.visible&&e.push(o)}return e},e.prototype.reflow=function(t){var e=this.options.plotArea,i=this.panes,o=z(e.margin);this.box=t.clone().unpad(o),this.reflowPanes(),this.detachLabels(),this.reflowAxes(i),this.reflowCharts(i)},e.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();var i=this.getRoot();i&&i.cleanGradients();for(var o=0;o<e.length;o++)this.removeCrosshairs(e[o]),e[o].empty();this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var r=0;r<e.length;r++)e[r].refresh()},e.prototype.axisCrossingValues=function(t,e){for(var i=t.options,o=[].concat(i.axisCrossingValues||i.axisCrossingValue),r=e.length-o.length,n=o[0]||0,s=0;s<r;s++)o.push(n);return o},e.prototype.alignAxisTo=function(t,e,i,o){var r=t.getSlot(i,i,!0),n=t.options.reverse?2:1,s=e.getSlot(o,o,!0),a=e.options.reverse?2:1,p=t.box.translate(s[m+a]-r[m+n],s[x+a]-r[x+n]);t.pane!==e.pane&&p.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(p)},e.prototype.alignAxes=function(t,e){for(var i=t[0],o=e[0],r=this.axisCrossingValues(i,e),n=this.axisCrossingValues(o,t),a={},p={},h={},l={},u=0;u<e.length;u++){var f=e[u],y=f.pane,v=y.id,m=!1!==f.options.visible,x=Nr(t,y)||i,b=r;x!==i&&(b=this.axisCrossingValues(x,e)),this.alignAxisTo(f,x,n[u],b[u]),f.options._overlap||(Ot(f.lineBox().x1)===Ot(x.lineBox().x1)&&(a[v]&&f.reflow(f.box.alignTo(a[v].box,c).translate(-f.options.margin,0)),m&&(a[v]=f)),Ot(f.lineBox().x2)===Ot(x.lineBox().x2)&&(f._mirrored||(f.options.labels.mirror=!f.options.labels.mirror,f._mirrored=!0),this.alignAxisTo(f,x,n[u],b[u]),p[v]&&f.reflow(f.box.alignTo(p[v].box,d).translate(f.options.margin,0)),m&&(p[v]=f)),0!==u&&o.pane===f.pane&&(f.alignTo(o),f.reflow(f.box)))}for(var _=0;_<t.length;_++){var w=t[_],A=w.pane,S=A.id,k=!1!==w.options.visible,C=Nr(e,A)||o,P=n;C!==o&&(P=this.axisCrossingValues(C,t)),this.alignAxisTo(w,C,r[_],P[_]),w.options._overlap||(Ot(w.lineBox().y1)===Ot(C.lineBox().y1)&&(w._mirrored||(w.options.labels.mirror=!w.options.labels.mirror,w._mirrored=!0),this.alignAxisTo(w,C,r[_],P[_]),h[S]&&w.reflow(w.box.alignTo(h[S].box,g).translate(0,-w.options.margin)),k&&(h[S]=w)),Ot(w.lineBox().y2,3)===Ot(C.lineBox().y2,3)&&(l[S]&&w.reflow(w.box.alignTo(l[S].box,s).translate(0,w.options.margin)),k&&(l[S]=w)),0!==_&&(w.alignTo(i),w.reflow(w.box)))}},e.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,i=Hr(e),o=0,r=0;r<t.length;r++){var n=t[r];n.axes.length>0&&(o=Math.max(o,i.width()-n.contentBox.width()))}if(0!==o)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(o,0))}},e.prototype.shrinkAxisHeight=function(t){for(var e,i=0;i<t.length;i++){var o=t[i],r=o.axes,n=Math.max(0,Hr(r).height()-o.contentBox.height());if(0!==n){for(var s=0;s<r.length;s++){var a=r[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},e.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,i=0,o=0;o<t.length;o++){var r=t[o],n=r.axes,s=r.contentBox;if(n.length>0){var a=Hr(n),p=Math.max(s.y1-a.y1,s.y2-a.y2);i=Math.max(i,s.x1-a.x1);for(var h=0;h<n.length;h++){var l=n[h];l.reflow(l.box.translate(0,p))}}}for(var c=0;c<e.length;c++){var u=e[c];u.reflow(u.box.translate(i,0))}},e.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),i=0;i<t.length;i++)this.reflowPaneAxes(t[i]);e.x.length>0&&e.y.length>0&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},e.prototype.autoRotateAxisLabels=function(t){for(var e,i=this.panes,o=Wr(i),r=0;r<o.length;r++){o[r].autoRotateLabels()&&(e=!0)}if(e){for(var n=0;n<i.length;n++)this.reflowPaneAxes(i[n]);t.x.length>0&&t.y.length>0&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(i))}},e.prototype.reflowPaneAxes=function(t){var e=t.axes,i=e.length;if(i>0)for(var o=0;o<i;o++)e[o].reflow(t.contentBox)},e.prototype.reflowCharts=function(t){for(var e=this.charts,i=e.length,o=this.box,r=0;r<i;r++){var n=e[r].pane;n&&!lt(n,t)||e[r].reflow(o)}},e.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,i=e.length,o=t.height(),r=0,n=t.y1,s=0;s<i;s++){var a=e[s],p=a.options.height;if(a.options.width=t.width(),a.options.height){if(p.indexOf&&p.indexOf("%")){var h=parseInt(p,10)/100;a.options.height=h*t.height()}a.reflow(t.clone()),o-=a.options.height}else r++}for(var l=0;l<i;l++){var c=e[l];c.options.height||(c.options.height=o/r)}for(var u=0;u<i;u++){var f=e[u],d=t.clone().move(t.x1,n);f.reflow(d),n+=f.options.height}},e.prototype.backgroundBox=function(){for(var t,e=this.axes,i=e.length,o=0;o<i;o++)for(var r=e[o],n=0;n<i;n++){var s=e[n];if(r.options.vertical!==s.options.vertical){var a=r.lineBox().clone().wrap(s.lineBox());t=t?t.wrap(a):a}}return t||this.box},e.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],i=0;i<t.length;i++)e.push(t[i].chartsBox());return e},e.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)t.paths.push(S.drawing.Path.fromRect(e[i].toRect()))},e.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)if(e[i].containsPoint(t))return!0},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e,i=this.options.plotArea,o=i.opacity,r=i.background,n=i.border;void 0===n&&(n={}),""!==(e=r)&&null!==e&&"none"!==e&&"transparent"!==e&&xt(e)||(r=v,o=0);var s=this._bgVisual=new S.drawing.MultiPath({fill:{color:r,opacity:o},stroke:{color:n.width?n.color:"",width:n.width,dashType:n.dashType},zIndex:-1});this.addBackgroundPaths(s),this.appendVisual(s)},e.prototype.pointsByCategoryIndex=function(t){var e=this.charts,i=[];if(null!==t)for(var o=0;o<e.length;o++){if("_navigator"!==e[o].pane.options.name){var r=e[o].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&xt(s.value)&&null!==s.value&&i.push(s)}}}return i},e.prototype.pointsBySeriesIndex=function(t){return this.filterPoints((function(e){return e.series.index===t}))},e.prototype.pointsBySeriesName=function(t){return this.filterPoints((function(e){return e.series.name===t}))},e.prototype.filterPoints=function(t){for(var e=this.charts,i=[],o=0;o<e.length;o++)for(var r=e[o].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&i.push(s)}return i},e.prototype.findPoint=function(t){for(var e=this.charts,i=0;i<e.length;i++)for(var o=e[i].points,r=0;r<o.length;r++){var n=o[r];if(n&&!1!==n.visible&&t(n))return n}},e.prototype.paneByPoint=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.box.containsPoint(t))return o}},e.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,i=t.y;this.detachAxisGroupLabels(i,e),this.detachAxisGroupLabels(e,i)},e.prototype.detachAxisGroupLabels=function(t,e){for(var i=0,o=0;o<t.length;o++){var r=t[o],n=r.pane,s=Nr(e,n)||e[0],a=o+i,p=this.createLabelAxis(r,a,s);if(p){i++;var h=n.axes.indexOf(r)+i;n.appendAxisAt(p,h)}}},e.prototype.createLabelAxis=function(t,e,i){var o=t.options.labels,r=o.position,n="end"!==r&&"start"!==r,s=o.visible;if(n||!1===s)return null;var a=this.groupAxes(this.panes),p=i.options.vertical?a.x:a.y,h=this.axisCrossingValues(i,p),l="end"===r,c=i.range(),u=l?c.max:c.min;if(Ct(h[e],c.min,c.max)-u==0)return null;h.splice(e+1,0,u),i.options.axisCrossingValues=h;var f=t.clone();return t.clear(),f.options.name=void 0,f.options.line.visible=!1,f.options.crosshair=void 0,f.options.notes=void 0,f.options.plotBands=void 0,f},e}(re);function Gr(t){return!t.pane.axes.some((function(e){return e.options.vertical===t.options.vertical&&e!==t&&!1!==e.options.visible}))}function Hr(t){for(var e,i=t.length,o=0;o<i;o++){var r=t[o],n=!1!==r.options.visible;if(n||Gr(r)){var s=n?r.contentBox():r.lineBox();e?e.wrap(s):e=s.clone()}}return e||new $t}function Nr(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}var Wr=function(t){return t.reduce((function(t,e){return t.concat(e.axes)}),[])};It(Ur,{series:[],plotArea:{margin:{}},background:"",border:{color:n,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var qr=Ur,Xr={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};function Yr(t,e,i){var o=e,r=t;if(t.indexOf(".")>-1){for(var n=t.split(".");n.length>1;)r=n.shift(),xt(o[r])||(o[r]={}),o=o[r];r=n.shift()}o[r]=i}var Zr=function(t){function e(e,i,o){t.call(this);var r=i.canonicalFields(e),n=i.valueFields(e),s=i.sourceFields(e,r),a=this._seriesFields=[],p=o.query(e.type),h=e.aggregate||p;this._series=e,this._binder=i;for(var l=0;l<r.length;l++){var c=r[l],u=void 0;if(B(h))u=h[c];else{if(0!==l&&!lt(c,n))break;u=h}u&&a.push({canonicalName:c,name:s[l],transform:T(u)?u:Ui[u]})}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.aggregatePoints=function(t,e){var i=this._series,o=this._seriesFields,r=this._bindPoints(t||[]),n=r.dataItems[0],s={};if(n&&!P(n)&&!b(n)){var a=function(){};a.prototype=n,s=new a}for(var p=0;p<o.length;p++){var h=o[p],l=this._bindField(r.values,h.canonicalName),c=h.transform(l,i,r.dataItems,e);if(!(null===c||!B(c)||xt(c.length)||c instanceof Date)){s=c;break}xt(c)&&Yr(h.name,s,c)}return s},e.prototype._bindPoints=function(t){for(var e=this._binder,i=this._series,o=[],r=[],n=0;n<t.length;n++){var s=t[n];o.push(e.bindPoint(i,s)),r.push(i.data[s])}return{values:o,dataItems:r}},e.prototype._bindField=function(t,e){for(var i=[],o=t.length,r=0;r<o;r++){var n=t[r],s=n.valueFields,a=void 0;a=xt(s[e])?s[e]:n.fields[e],i.push(a)}return i},e}(S.Class),Kr=function(t){function e(){t.call(this),this._defaults={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e){for(var i=0;i<t.length;i++)this._defaults[t[i]]=e},e.prototype.query=function(t){return this._defaults[t]},e}(S.Class);Kr.current=new Kr;var $r=Kr,Qr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createLabel=function(){var t=this.options.labels,e=j({},t,t.from),i=j({},t,t.to);e.visible&&(this.labelFrom=this._createLabel(e),this.append(this.labelFrom)),i.visible&&(this.labelTo=this._createLabel(i),this.append(this.labelTo))},e.prototype._createLabel=function(t){var e,i=it(t),o=this.pointData();return e=i?i(o):this.formatValue(t.format),new Eo(e,j({vertical:this.options.vertical},t),o)},e.prototype.reflow=function(t){this.render();var e=this.labelFrom,i=this.labelTo,o=this.value;this.box=t,e&&(e.options.aboveAxis=o.from>o.to,e.reflow(t)),i&&(i.options.aboveAxis=o.to>o.from,i.reflow(t)),this.note&&this.note.reflow(t)},e}(Fo);Qr.prototype.defaults=j({},Qr.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var Jr=Qr,tn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return Jr},e.prototype.pointValue=function(t){return t.valueFields},e.prototype.formatPointValue=function(t,e){return null===t.value.from&&null===t.value.to?"":this.chartService.format.auto(e,t.value.from,t.value.to)},e.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=t.from,r=t.to,n=this.valueAxisRanges[i];null!==t&&P(o)&&P(r)&&((n=this.valueAxisRanges[i]=n||{min:u,max:f}).min=Math.min(n.min,o),n.max=Math.max(n.max,o),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r))},e.prototype.aboveAxis=function(t){var e=t.value;return e.from<e.to},e}(Yo);tn.prototype.plotLimits=lo.prototype.plotLimits;var en=tn,on=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.aliasFor=function(){return this.parent},e}(go),rn=function(t){function e(e,i){t.call(this),this.value=e,this.options=i,this.aboveAxis=Rt(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){if(!this._rendered){this._rendered=!0;var t=this.options,e=t.markers,i=t.labels,o=this.value,r=this.fromPoint=new on(o,j({},this.options,{labels:i.from,markers:e.from})),n=this.toPoint=new on(o,j({},this.options,{labels:i.to,markers:e.to}));this.copyFields(r),this.copyFields(n),this.append(r),this.append(n)}},e.prototype.reflow=function(t){this.render();var e=t.from,i=t.to;this.positionLabels(e,i),this.fromPoint.reflow(e),this.toPoint.reflow(i),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},e.prototype.createHighlight=function(){var t=new S.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},e.prototype.highlightVisual=function(){return this.visual},e.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},e.prototype.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,i,o,r=this.box,n=r.center();return this.options.vertical?(e=n.x,i=r.y1-5,o=s):(e=r.x2+5,i=n.y,o=a),{point:new Zt(e,i),align:{horizontal:"left",vertical:o}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},e.prototype.initLabelsFormat=function(){var t=this.options.labels;t.format||(t.from&&t.from.format||(t.from=Object.assign({},t.from,{format:"{0}"})),t.to&&t.to.format||(t.to=Object.assign({},t.to,{format:"{1}"})))},e.prototype.positionLabels=function(t,e){var i,o,r=this.options,n=r.labels,s=r.vertical;"auto"===n.position&&(s?e.y1<=t.y1?(o="above",i="below"):(o="below",i="above"):e.x1<=t.x1?(o=c,i=d):(o=d,i=c),n.from&&n.from.position||(this.fromPoint.options.labels.position=i),n.to&&n.to.position||(this.toPoint.options.labels.position=o))},e.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},e}(re);j(rn.prototype,co),j(rn.prototype,uo),rn.prototype.defaults={markers:{visible:!1,background:v,size:8,type:p,border:{width:2},opacity:1},labels:{visible:!1,margin:z(3),padding:z(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:v,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var nn=rn,sn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))),t},e.prototype.createStroke=function(t){var e=new S.drawing.Path(t),i=new S.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),i.segments.push.apply(i.segments,this.stackSegments()),this.visual.append(e),this.visual.append(i)},e.prototype.hasStackSegment=function(){return!0},e.prototype.fromPoints=function(){return this.linePoints.map((function(t){return t.fromPoint}))},e.prototype.toPoints=function(){return this.linePoints.map((function(t){return t.toPoint}))},e}(To),an=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())),t},e.prototype.createCurveSegments=function(t){return(new Bi).process(this.toGeometryPoints(t))},e}(sn),pn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},e}(sn);j(pn.prototype,xo);var hn=pn,ln=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.pointType=function(){return nn},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=t.valueFields;if(!nr(s.from)&&!nr(s.to)){if(this.seriesMissingValues(r)!==Ki)return null;s={from:0,to:0}}var a=this.pointOptions(r,n);a=this.evalPointOptions(a,s,o,i,r,n);var p=t.fields.color||r.color;T(r.color)&&(p=a.color);var h=new nn(s,a);return h.color=p,this.append(h),h},e.prototype.createSegment=function(t,e,i){var o=(e.line||{}).style;return new("smooth"===o?an:"step"===o?hn:sn)(t,e,i)},e.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},e.prototype.valueSlot=function(t,e){var i=t.getSlot(e[0],e[0],!this.options.clip),o=t.getSlot(e[1],e[1],!this.options.clip);if(i&&o)return{from:i,to:o}},e.prototype.pointSlot=function(t,e){var i,o,r=e.from,n=e.to;return this.options.invertAxes?(i=new $t(r.x1,t.y1,r.x2,t.y2),o=new $t(n.x1,t.y1,n.x2,t.y2)):(i=new $t(t.x1,r.y1,t.x2,r.y2),o=new $t(t.x1,n.y1,t.x2,n.y2)),{from:i,to:o}},e.prototype.addValue=function(e,i){var o=e.valueFields;P(o.from)||(o.from=o.to),P(o.to)||(o.to=o.from),t.prototype.addValue.call(this,e,i)},e.prototype.updateRange=function(t,e){if(null!==t&&P(t.from)&&P(t.to)){var i=e.series.axis,o=this.valueAxisRanges[i]=this.valueAxisRanges[i]||{min:u,max:f},r=t.from,n=t.to;o.min=Math.min(o.min,r,n),o.max=Math.max(o.max,r,n)}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.from,i.to)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++){var o=t[i];o&&(e.push((o.fromPoint||{}).marker),e.push((o.toPoint||{}).marker))}return e.concat(this._segments)},e}(lo);j(ln.prototype,Ao,Po);var cn=ln,un=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=this.value,o=this.owner.seriesValueAxis(e),r=[],n=[],s=[],a=o.getSlot(i.low,i.high),p=o.getSlot(i.open,i.open),h=o.getSlot(i.close,i.close);p.x1=h.x1=a.x1=t.x1,p.x2=h.x2=a.x2=t.x2;var l=a.center().x;r.push([p.x1,p.y1]),r.push([l,p.y1]),n.push([l,h.y1]),n.push([h.x2,h.y1]),s.push([l,a.y1]),s.push([l,a.y2]),this.lines=[r,n,s],this.box=a.clone().wrap(p.clone().wrap(h)),this.reflowNote()},e.prototype.createBody=function(){},e}(Ko),fn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return un},e}(Jo),dn=function(t){function e(e,i,o){t.call(this),this.from=e,this.to=i,this.series=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linePoints=function(){var t=this.from,e=this.from.box,i=this.to.box,o=[];if(t.isVertical){var r=t.aboveAxis?e.y1:e.y2;o.push([e.x1,r],[i.x2,r])}else{var n=t.aboveAxis?e.x2:e.x1;o.push([n,e.y1],[n,i.y2])}return o},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.series.line||{},i=S.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}});k(i),this.visual.append(i)},e}(re);It(dn,{animation:{type:"fadeIn",delay:600}});var gn=dn,yn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.createSegments()},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=po(e),o=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,p=0;p<i;p++){var h=Ni.current.bindPoint(n,p),l=h.valueFields.value,c=h.fields.summary,u=s,f=void 0;c?"total"===c.toLowerCase()?(h.valueFields.value=s,u=0,f=s):(h.valueFields.value=a,f=u-a,a=0):P(l)&&(a+=l,f=s+=l),t(h,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:f,isVertical:o})}},e.prototype.updateRange=function(e,i){t.prototype.updateRange.call(this,{value:i.to},i)},e.prototype.aboveAxis=function(t){return t.value>=0},e.prototype.plotRange=function(t){return[t.from,t.to]},e.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,i=this.segments=[],o=0;o<t.length;o++){var r=t[o],n=e[o];if(n)for(var s=void 0,a=0;a<n.length;a++){var p=n[a];if(p&&s){var h=new gn(s,p,r);i.push(h),this.append(h)}s=p}}},e}(Yo),vn=["area","verticalArea","rangeArea","verticalRangeArea"],mn=[Ji,eo].concat(vn),xn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new Vo,t.length>0){this.invertAxes=lt(t[0].type,[$i,"bullet",eo,"verticalArea","verticalRangeArea","rangeBar","horizontalWaterfall","verticalBoxPlot"]);for(var e=0;e<t.length;e++){var i=t[e].stack;if(i&&"100%"===i.type){this.stack100=!0;break}}}},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.createCategoryAxes(t),this.aggregateCategories(t),this.createCategoryAxesLabels(t),this.createCharts(t),this.createValueAxes(t)},e.prototype.removeAxis=function(e){var i=e.options.name;t.prototype.removeAxis.call(this,e),e instanceof Qe?delete this.namedCategoryAxes[i]:(this.valueAxisRangeTracker.reset(i),delete this.namedValueAxes[i]),e===this.categoryAxis&&delete this.categoryAxis,e===this.valueAxis&&delete this.valueAxis},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);if(n)for(var s=this.groupSeriesByCategoryAxis(n),a=0;a<s.length;a++)this.createChartGroup(s[a],o)}},e.prototype.createChartGroup=function(t,e){this.createAreaChart(Br(t,["area","verticalArea"]),e),this.createRangeAreaChart(Br(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(Br(t,[Qi,$i]),e),this.createRangeBarChart(Br(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(Br(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(Br(t,"candlestick"),e),this.createBoxPlotChart(Br(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(Br(t,"ohlc"),e),this.createWaterfallChart(Br(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(Br(t,[Ji,eo]),e)},e.prototype.aggregateCategories=function(t){var e=this.srcSeries||this.series,i=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var o=0;o<e.length;o++){var r=e[o],n=this.seriesCategoryAxis(r),s=this.findPane(n.options.pane);r=(jr(n.options.type,h)||r.categoryField)&<(s,t)?this.aggregateSeries(r,n):this.filterSeries(r,n),i.push(r)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=i},e.prototype.filterSeries=function(t,e){var i=(t.data||{}).length;if(e._seriesMax=Math.max(e._seriesMax||0,i),!P(e.options.min)&&!P(e.options.max))return t;var o=e.currentRangeIndices(),r=lt(t.type,mn),n=j({},t);return n.data=(n.data||[]).slice(o.min,o.max+1),r&&Fr(n,o,i,(function(i){return{item:t.data[i],category:e.categoryAt(i,!0),categoryIx:i-o.min}}),(function(e){return xt(t.data[e])})),n},e.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},e.prototype.seriesSourcePoints=function(t,e){var i=t.index+";"+e.categoriesHash();if(this._seriesPointsCache[i])return this._currentPointsCache[i]=this._seriesPointsCache[i],this._seriesPointsCache[i];var o=e.options,r=o.srcCategories,n=jr(o.type,h),s=t.data,a=n?Ir:Gi,p=[];n||e.mapCategories();for(var l=0;l<s.length;l++){var c=void 0;if(c=t.categoryField?a(t.categoryField,s[l],this.chartService.intl):r[l],xt(c)&&null!==c){var u=e.totalIndex(c);p[u]=p[u]||{items:[],category:c},p[u].items.push(l)}}return this._currentPointsCache[i]=p,p},e.prototype.aggregateSeries=function(t,e){if(!t.data.length)return t;for(var i=this.seriesSourcePoints(t,e),o=j({},t),r=new Zr(j({},t),Ni.current,$r.current),n=o.data=[],s=e.options.dataItems||[],a=e.currentRangeIndices(),p=function(t){var o=t-a.min,n=i[t];if(n||(n=i[t]={}),n.categoryIx=o,!n.item){var s=e.categoryAt(t,!0);n.category=s,n.item=r.aggregatePoints(n.items,s)}return n},h=a.min;h<=a.max;h++){var l=p(h);n[l.categoryIx]=l.item,l.items&&l.items.length&&(s[l.categoryIx]=l.item)}return lt(o.type,mn)&&Fr(o,a,e.totalCount(),p,(function(t){return i[t]})),e.options.dataItems=s,o},e.prototype.appendChart=function(e,i){var o=e.options.series,r=this.seriesCategoryAxis(o[0]),n=r.options.categories,s=Math.max(0,po(o)-n.length);if(s>0)for(n=r.options.categories=r.options.categories.slice(0);s--;)n.push("");this.valueAxisRangeTracker.update(e.valueAxisRanges),t.prototype.appendChart.call(this,e,i)},e.prototype.seriesPaneName=function(t){var e=this.options,i=t.axis,o=st([].concat(e.valueAxis),(function(t){return t.name===i}))[0],r=((e.panes||[{}])[0]||{}).name||"default";return(o||{}).pane||r},e.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,i=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!i)throw new Error("Unable to locate category axis with name "+e);return i},e.prototype.stackableChartOptions=function(t,e){var i=t.stack;return{isStacked:i,isStacked100:i&&"100%"===i.type,clip:e.options.clip}},e.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],i={},o=0;o<t.length;o++){var r=t[o].categoryAxis||"$$default$$";i.hasOwnProperty(r)||(i[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=_n(t,e[s],s);0!==a.length&&n.push(a)}return n},e.prototype.createBarChart=function(t,e){if(0!==t.length){var i=t[0],o=new Yo(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing},this.stackableChartOptions(i,e)));this.appendChart(o,e)}},e.prototype.createRangeBarChart=function(t,e){if(0!==t.length){var i=t[0],o=new en(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing});this.appendChart(o,e)}},e.prototype.createBulletChart=function(t,e){if(0!==t.length){var i=t[0],o=new vr(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=t[0],o=new Oo(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(i,e)));this.appendChart(o,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var i=t[0],o=new Io(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(i,e)));this.appendChart(o,e)}},e.prototype.createRangeAreaChart=function(t,e){if(0!==t.length){var i=new cn(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createOHLCChart=function(t,e){if(0!==t.length){var i=t[0],o=new fn(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createCandlestickChart=function(t,e){if(0!==t.length){var i=t[0],o=new Jo(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createBoxPlotChart=function(t,e){if(0!==t.length){var i=t[0],o=new or(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createWaterfallChart=function(t,e){if(0!==t.length){var i=t[0],o=new yn(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing});this.appendChart(o,e)}},e.prototype.axisRequiresRounding=function(t,e){for(var i=Br(this.series,io),o=0;o<this.series.length;o++){var r=this.series[o];if(lt(r.type,vn)){var n=r.line;n&&"step"===n.style&&i.push(r)}}for(var s=0;s<i.length;s++){var a=i[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},e.prototype.aggregatedAxis=function(t,e){for(var i=this.series,o=0;o<i.length;o++){var r=i[o].categoryAxis||"";if((r===t||!r&&0===e)&&i[o].categoryField)return!0}},e.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof Qe&&t[e].createLabels()},e.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,i=[].concat(this.options.categoryAxis),o=[],r=0;r<i.length;r++){var n=i[r];if(lt(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=j({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?u:0},n),xt(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0;if(p=Vr(n,a[0])?new ai(n,this.chartService):new Qe(n,this.chartService),i[r].categories=p.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=p}p.axisIndex=r,o.push(p),this.appendAxis(p)}}var h=this.categoryAxis||o[0];this.categoryAxis=h,e?this.axisY=h:this.axisX=h},e.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++){if(!lt(t[e].type,vn))return!1}return!0},e.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,i=e.query(),o=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<o.length;a++){var p=o[a];if(lt(this.findPane(p.pane),t)){var h=p.name,l=jr(p.type,"log")?{min:.1,max:1}:{min:0,max:1},c=e.query(h)||i||l;0===a&&c&&i&&(c.min=Math.min(c.min,i.min),c.max=Math.max(c.max,i.max));var u=new(jr(p.type,"log")?bi:di)(c.min,c.max,j({},n,p),this.chartService);if(h){if(this.namedValueAxes[h])throw new Error("Value axis with name "+h+" is already defined");this.namedValueAxes[h]=u}u.axisIndex=a,s.push(u),this.appendAxis(u)}}var f=this.valueAxis||s[0];this.valueAxis=f,r?this.axisX=f:this.axisY=f},e.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Zt(o.x,o.y),n=this.pointPane(r),s=[],a=[];if(n){for(var p=n.axes,h=0;h<p.length;h++){var l=p[h];l.getValue?Or(a,l.getValue(r)):Or(s,l.getCategory(r))}0===s.length&&Or(s,this.categoryAxis.getCategory(r)),s.length>0&&a.length>0&&t.trigger(i,{element:At(e),originalEvent:e,category:Lr(s),value:Lr(a)})}},e.prototype.pointPane=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.contentBox.containsPoint(t))return o}},e.prototype.updateAxisOptions=function(t,e){bn(this.options,t,e),bn(this.originalOptions,t,e)},e}(qr);function bn(t,e,i){j([].concat(e instanceof Qe?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}function _n(t,e,i){return st(t,(function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e}))}It(xn,{categoryAxis:{},valueAxis:{}}),j(xn.prototype,Xr);var wn=xn;function An(){this._defaultPrevented=!0}var Sn=function(t){function e(){t.call(this),this._points=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._points=[]},e.prototype.show=function(t,e){var i=[].concat(t);this.hide();for(var o=0;o<i.length;o++){var r=i[o];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},e.prototype.togglePointHighlight=function(t,e,i){var o=(t.options.highlight||{}).toggle;if(o){var r={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:An,visual:t.highlightVisual(),show:e};o(r),r._defaultPrevented||t.toggleHighlight(e,i)}else t.toggleHighlight(e,i)},e.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},e.prototype.isHighlighted=function(t){for(var e=this._points,i=0;i<e.length;i++){if(t===e[i])return!0}return!1},e}(S.Class);function kn(t,e){var i=(e||"").toLowerCase(),o=t.event;return"none"===i&&!(o.ctrlKey||o.shiftKey||o.altKey)||o[i+"Key"]}function Cn(t){for(var e={},i=0;i<t.length;i++){var o=t[i];o.axis.options.name&&(e[o.axis.options.name]={min:o.range.min,max:o.range.max})}return e}var Pn=function(t){function e(e,i){t.call(this),this.plotArea=e,this.options=j({},this.options,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.start=function(t){return this._active=kn(t,this.options.key),this._active},e.prototype.move=function(t){if(this._active){var e=this.axisRanges=this._panAxes(t,m).concat(this._panAxes(t,x));if(e.length)return this.axisRanges=e,Cn(e)}},e.prototype.end=function(){var t=this._active;return this._active=!1,t},e.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var i=0;i<e.length;i++){var o=e[i];t.updateAxisOptions(o.axis,o.range)}t.redraw(t.panes)}},e.prototype.destroy=function(){delete this.plotArea},e.prototype._panAxes=function(t,e){var i=this.plotArea,o=-t[e].delta,r=(this.options.lock||"").toLowerCase(),n=[];if(0!==o&&(r||"").toLowerCase()!==e)for(var s=i.axes,a=0;a<s.length;a++){var p=s[a];if(e===m&&!p.options.vertical||e===x&&p.options.vertical){var h=p.pan(o);h&&(h.limitRange=!0,n.push({axis:p,range:h}))}}return n},e}(S.Class);Pn.prototype.options={key:"none",lock:"none"};var Mn=Pn,On=function(t){function e(e,i){t.call(this),this.chart=e,this.options=j({},this.options,i),this.createElement()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createElement=function(){var t=this._marquee=document.createElement("div");t.className="k-marquee";var e=document.createElement("div");e.className="k-marquee-color",t.appendChild(e)},e.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},e.prototype.setStyles=function(t){E(this._marquee,t)},e.prototype.start=function(t){if(kn(t,this.options.key)){var e=this.chart,i=e._eventCoordinates(t),o=this._zoomPane=e._plotArea.paneByPoint(i),r=o?o.chartsBox().clone():null;if(o&&r){var n=this._elementOffset();return r.translate(n.left,n.top),this._zoomPaneClipBox=r,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}}return!1},e.prototype._elementOffset=function(){var t=this.chart.element,e=E(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,o=e.paddingTop,r=_t(t);return{left:i+r.left,top:o+r.top}},e.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},e.prototype.end=function(t){if(this._zoomPane){var e=this._elementOffset(),i=this._selectionPosition(t);i.left-=e.left,i.top-=e.top;var o={x:i.left,y:i.top},r={x:i.left+i.width,y:i.top+i.height};return this._updateAxisRanges(o,r),this.removeElement(),delete this._zoomPane,Cn(this.axisRanges)}},e.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},e.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},e.prototype._updateAxisRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;if((i!==m||a)&&(i!==x||!a)&&xt(s.axisIndex)){var p=s.pointsRange(t,e);p&&o.push({axis:s,range:p})}}this.axisRanges=o},e.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,i={x:t.x.startLocation,y:t.y.startLocation},o=t.x.location,r=t.y.location,n=(this.options.lock||"").toLowerCase(),s=Math.min(i.x,o),a=Math.min(i.y,r),p=Math.abs(i.x-o),h=Math.abs(i.y-r);return n===m&&(s=e.x1,p=e.width()),n===x&&(a=e.y1,h=e.height()),o>e.x2&&(p=e.x2-i.x),o<e.x1&&(p=i.x-e.x1),r>e.y2&&(h=e.y2-i.y),r<e.y1&&(h=i.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:h}},e}(S.Class);On.prototype.options={key:"shift",lock:"none"};var Tn=On,Rn=function(t){function e(e,i){t.call(this),this.chart=e,this.options=j({},this.options,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.updateRanges=function(t){for(var e=(this.options.lock||"").toLowerCase(),i=[],o=this.chart._plotArea.axes,r=0;r<o.length;r++){var n=o[r],s=n.options.vertical;if((e!==m||s)&&(e!==x||!s)&&n.zoomRange){var a=n.zoomRange(-t);a&&i.push({axis:n,range:a})}}return this.axisRanges=i,Cn(i)},e.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},e.prototype.destroy=function(){delete this.chart},e}(S.Class),jn=function(t){function e(e,i){t.call(this,e),this.chartService=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.children,e=this.options,i=e.vertical;this.visual=new S.drawing.Layout(null,{spacing:i?0:e.spacing,lineSpacing:i?e.spacing:0,orientation:i?"vertical":"horizontal",reverse:e.rtl,alignItems:i?"start":"center"});for(var o=0;o<t.length;o++){var r=t[o];r.reflow(new $t),r.renderVisual()}},e.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();var e=this.visual.clippedBBox();this.box=e?me(e):new $t},e.prototype.renderVisual=function(){this.addVisual()},e.prototype.createVisual=function(){},e}(re),Bn=function(t){function e(e){t.call(this,e),this.createContainer(),e.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainer=function(){this.container=new de({vertical:!1,wrap:!1,align:a,spacing:this.options.spacing}),this.append(this.container)},e.prototype.createMarker=function(){this.container.append(new pe(this.markerOptions()))},e.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return j({},t.markers,{background:e,border:{color:e}})},e.prototype.createLabel=function(){var t=this.options,e=j({},t.labels);this.container.append(new be(t.text,e))},e.prototype.renderComplete=function(){t.prototype.renderComplete.call(this);var e=this.options.cursor||{},i=this._itemOverlay=S.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:v,opacity:0},stroke:null,cursor:e.style||e});this.appendVisual(i)},e.prototype.click=function(t,e){var i=this.eventArgs(e);!t.trigger("legendItemClick",i)&&e&&"contextmenu"===e.type&&e.preventDefault()},e.prototype.over=function(t,e){var i=this.eventArgs(e);return t.trigger("legendItemHover",i)||t._legendItemHover(i.seriesIndex,i.pointIndex),!0},e.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},e.prototype.eventArgs=function(t){var e=this.options;return{element:At(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},e.prototype.renderVisual=function(){var e=this,i=this.options,o=i.visual;o?(this.visual=o({active:i.active,series:i.series,sender:this.getSender(),pointIndex:i.pointIndex,options:{markers:this.markerOptions(),labels:i.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this.addVisual()):t.prototype.renderVisual.call(this)},e}(se),In=function(t){function e(e,i){void 0===i&&(i={}),t.call(this,e),this.chartService=i,lt(this.options.position,[g,d,s,c,"custom"])||(this.options.position=d),this.createContainers(),this.createLegendTitle(e.title),this.createItems()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainers=function(){var t=this.options,e=t.position,i=t.align,o=e,r=a;"custom"===e?o=c:lt(e,[g,s])?(o="start"===i?c:"end"===i?d:a,r=e):i&&("start"===i?r=g:"end"===i&&(r=s)),this.container=new se({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new se({vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},e.prototype.createItems=function(){var t=this.getService(),e=this.options,i=this.isVertical(),o=new jn({vertical:i,spacing:e.spacing,rtl:t.rtl},t),r=e.items;e.reverse&&(r=r.slice(0).reverse());for(var n=r.length,s=0;s<n;s++){var a=r[s];o.append(new Bn(j({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}o.render(),this.itemsContainer.append(o)},e.prototype.isVertical=function(){var t=this.options,e=t.orientation,i=t.position;return"custom"===i&&"horizontal"!==e||(xt(e)?"horizontal"!==e:lt(i,[c,d]))},e.prototype.hasItems=function(){return this.container.children[0].children.length>0},e.prototype.reflow=function(t){var e=this.options,i=t.clone();this.hasItems()?("custom"===e.position?(this.containerCustomReflow(i),this.box=i):this.containerReflow(i),this.hasTitle()&&this.title.reflow(new $t(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=i},e.prototype.containerReflow=function(t){var e=this.options,i=this.container,o=e.position,r=e.width,n=e.height,a=o===g||o===s?m:x,p=this.isVertical(),h=t.clone(),l=t.clone();o!==c&&o!==d||(l.y1=h.y1=0),p&&n?(l.y2=l.y1+n,l.align(h,x,i.options.vAlign)):!p&&r&&(l.x2=l.x1+r,l.align(h,m,i.options.align)),i.reflow(l);var u=(l=i.box).clone();(e.offsetX||e.offsetY)&&(l.translate(e.offsetX,e.offsetY),i.reflow(l)),u[a+1]=t[a+1],u[a+2]=t[a+2],this.box=u},e.prototype.containerCustomReflow=function(t){var e=this.options,i=this.container,o=e.offsetX,r=e.offsetY,n=e.width,s=e.height,a=this.isVertical(),p=t.clone();a&&s?p.y2=p.y1+s:!a&&n&&(p.x2=p.x1+n),i.reflow(p),p=i.box,i.reflow(new $t(o,r,o+p.width(),r+p.height()))},e.prototype.renderVisual=function(){this.hasItems()&&t.prototype.renderVisual.call(this)},e.prototype.createLegendTitle=function(t){var e=j({},{color:n,position:g,align:a},t),i=e.text;if(t&&!1!==t.visible){if(xt(e)&&e.visible){var o=it(e);o?i=o({text:i}):e.format&&(i=this.chartService.format.auto(e.format,i))}this.title=new be(i,e),this.createTitleLayout(),this.appendTitleLayoutContent()}},e.prototype.createTitleLayout=function(){this.layout=new de({vertical:!0,wrap:!1}),this.container.append(this.layout)},e.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},e.prototype.appendTitleLayoutContent=function(){this.options.title.position===s?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e}(re);It(In,{position:d,items:[],offsetX:0,offsetY:0,margin:z(5),padding:z(5),border:{color:n,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:c,vAlign:a}});var Vn=In,Ln=function(t){function e(){t.call(this),this._registry=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},e.prototype.create=function(t,e,i){for(var o,r=this._registry,n=r[0],s=0;s<r.length;s++){var a=r[s];if((o=Br(t,a.seriesTypes)).length>0){n=a;break}}return new n.type(o,e,i)},e}(S.Class);Ln.current=new Ln;var En=Ln;function zn(t){var e=document.createElement("div");return t&&(e.className=t),e}function Dn(t){for(var e=t;e&&!at(e,"k-handle");)e=e.parentNode;return e}var Fn=function(t){function e(e,i,o,r){t.call(this);var n=e.element;this.options=j({},this.options,o),this.chart=e,this.observer=r,this.chartElement=n,this.categoryAxis=i,this._dateAxis=this.categoryAxis instanceof ai,this.initOptions(),this.visible=this.options.visible&&n.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onPane=function(t){return this.categoryAxis.pane===t},e.prototype.createElements=function(){var t=this.options,e=this.wrapper=zn("k-selector");E(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var i=this.selection=zn("k-selection");this.leftMask=zn("k-mask"),this.rightMask=zn("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i),i.appendChild(zn("k-selection-bg"));var o=this.leftHandle=zn("k-handle k-left-handle"),r=this.rightHandle=zn("k-handle k-right-handle");o.appendChild(zn()),r.appendChild(zn()),i.appendChild(o),i.appendChild(r),this.chartElement.appendChild(e);var n=E(i,["borderLeftWidth","borderRightWidth","height"]),s=E(o,"height").height,a=E(r,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},E(o,{top:(n.height-s)/2}),E(r,{top:(n.height-a)/2}),e.style.cssText=e.style.cssText},e.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),mt(this.wrapper,((t={})[oo]=this._mousewheelHandler,t))),this._domEvents=Q.create(this.wrapper,{stopPropagation:!0,start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),press:this._press.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)})},e.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),i=this.chart.chartService.intl;this._dateAxis&&j(t,{min:Ye(i,t.min),max:Ye(i,t.max),from:Ye(i,t.from),to:Ye(i,t.to)});var o=E(this.chartElement,["paddingLeft","paddingTop"]),r=o.paddingLeft,n=o.paddingTop;this.options=j({},{width:e.width(),height:e.height()+.1,padding:{left:r,top:n},offset:{left:e.x1+r,top:e.y1+n},from:t.min,to:t.max},t)},e.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Tt(this.wrapper,((t={})[oo]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},e.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},e.prototype._start=function(t){var e=this.options,i=At(t);if(!this._state&&i){this.chart._unsetActivePoint(),this._state={moveTarget:Dn(i)||i,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}};var o=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)});this.trigger("selectStart",o)&&(this._state=null)}},e.prototype._press=function(t){var e;(e=this._state?this._state.moveTarget:Dn(At(t)))&&_(e,"k-handle-active")},e.prototype._move=function(t){if(this._state){var e=this._state,i=this.options,o=this.categoryAxis,r=e.range,n=e.moveTarget,s=o.options.reverse,a=this._index(i.from),p=this._index(i.to),h=this._index(i.min),l=this._index(i.max),c=e.startLocation-t.x.location,u=r.from,f=r.to,d=r.to-r.from,g=E(this.wrapper,"width").width/(o.categoriesCount()-1),y=Math.round(c/g)*(s?-1:1);if(n){var v=at(n,"k-left-handle"),m=at(n,"k-right-handle");at(n,"k-selection k-selection-bg")?(r.from=Math.min(Math.max(h,a-y),l-d),r.to=Math.min(r.from+d,l)):v&&!s||m&&s?(r.from=Math.min(Math.max(h,a-y),l-1),r.to=Math.max(r.from+1,r.to)):(v&&s||m&&!s)&&(r.to=Math.min(Math.max(h+1,p-y),l),r.from=Math.min(r.to-1,r.from)),r.from===u&&r.to===f||(this.move(r.from,r.to),this.trigger("select",this._rangeEventArgs(r)))}}},e.prototype._end=function(){if(this._state){var t=this._state.moveTarget;t&&A(t,"k-handle-active");var e=this._state.range;this.set(e.from,e.to),this.trigger("selectEnd",this._rangeEventArgs(e)),delete this._state}},e.prototype._tap=function(t){var e=this.options,i=this.categoryAxis,o=this.chart._eventCoordinates(t),r=i.pointCategoryIndex(new Zt(o.x,i.box.y1)),n=this._index(e.from),s=this._index(e.to),a=this._index(e.min),p=this._index(e.max),h=s-n,l=n+h/2,c={},u=3===t.event.which,f=Math.round(l-r);this._state||u||(this.chart._unsetActivePoint(),i.options.justified||f--,c.from=Math.min(Math.max(a,n-f),p-h),c.to=Math.min(c.from+h,p),this._start(t),this._state&&(this._state.range=c,this.trigger("select",this._rangeEventArgs(c)),this._end()))},e.prototype._mousewheel=function(t){var e=this,i=gt(t);if(this._start({target:this.selection}),this._state){var o=this._state.range;t.preventDefault(),t.stopPropagation(),Math.abs(i)>1&&(i*=3),this.options.mousewheel.reverse&&(i*=-1),this.expand(i)&&this.trigger("select",{axis:this.categoryAxis.options,delta:i,originalEvent:t,from:this._value(o.from),to:this._value(o.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._end()}),150)}},e.prototype._gesturestart=function(t){var e=this.options;this._state={range:{from:this._index(e.from),to:this._index(e.to)}};var i=this._rangeEventArgs(this._state.range);this.trigger("selectStart",i)?this._state=null:t.preventDefault()},e.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},e.prototype._gesturechange=function(t){var e=this.chart,i=this._state,o=this.options,r=this.categoryAxis,n=i.range,s=e._toModelCoordinates(t.touches[0].x.location).x,a=e._toModelCoordinates(t.touches[1].x.location).x,p=Math.min(s,a),h=Math.max(s,a);t.preventDefault(),n.from=r.pointCategoryIndex(new Zt(p))||o.min,n.to=r.pointCategoryIndex(new Zt(h))||o.max,this.move(n.from,n.to),this.trigger("select",this._rangeEventArgs(n))},e.prototype._index=function(t){var e=t;return t instanceof Date&&(e=this.categoryAxis.categoryIndex(t)),e},e.prototype._value=function(t){var e=t;return this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max&&(e=this.options.max),e},e.prototype._slot=function(t){var e=this.categoryAxis,i=this._index(t);return e.getSlot(i,i,!0)},e.prototype.move=function(t,e){var i=this.options,o=this.categoryAxis.options.reverse,r=i.offset,n=i.padding,s=i.selection.border,a=o?e:t,p=o?t:e,h="x"+(o?2:1),l=this._slot(a),c=Ot(l[h]-r.left+n.left);E(this.leftMask,{width:c}),E(this.selection,{left:c}),l=this._slot(p);var u=Ot(i.width-(l[h]-r.left+n.left));E(this.rightMask,{width:u});var f=i.width-u;f!==i.width&&(f+=s.right),E(this.rightMask,{left:f}),E(this.selection,{width:Math.max(i.width-(c+u)-s.right,0)})},e.prototype.set=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),n=Ct(this._index(t),o,r),s=Ct(this._index(e),n+1,r);i.visible&&this.move(n,s),i.from=this._value(n),i.to=this._value(s)},e.prototype.expand=function(t){var e=this.options,i=this._index(e.min),o=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),s=this._index(e.to),a={from:n,to:s},p=j({},a);if(this._state&&(a=this._state.range),r!==d&&(a.from=Ct(Ct(n-t,0,s-1),i,o)),r!==c&&(a.to=Ct(Ct(s+t,a.from+1,o),i,o)),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},e.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},e}(S.Class);It(Fn,{visible:!0,mousewheel:{zoom:"both"},min:f,max:u});var Un=Fn,Gn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.show=function(e){if(e&&e.tooltipAnchor&&(!this._current||this._current!==e)){var i=j({},this.options,e.options.tooltip),o=e.tooltipAnchor();o?(this._current=e,t.prototype.show.call(this,{point:e,anchor:o},i,e)):this.hide()}},e.prototype.hide=function(){delete this._current,t.prototype.hide.call(this)},e}(xr),Hn=function(t){function e(e,i){t.call(this,e.chartService,i),this.plotArea=e,this.formatService=e.chartService.format}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.showAt=function(t,e){var i=st(t,(function(t){var e=t.series.tooltip;return!(e&&!1===e.visible)}));if(i.length>0){var o=i[0],r=this.plotArea.categoryAxis.getSlot(o.categoryIx),n=e?this._slotAnchor(e,r):this._defaultAnchor(o,r);this.show({anchor:n,shared:!0,points:t,category:o.category,categoryText:this.formatService.auto(this.options.categoryFormat,o.category),series:this.plotArea.series},this.options)}},e.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},e.prototype._defaultAnchor=function(t,e){var i=t.owner.pane.chartsBox(),o=this.plotArea.categoryAxis.options.vertical,r=i.center(),n=e.center();return{point:o?new Zt(r.x,n.y):new Zt(n.x,r.y),align:{horizontal:"center",vertical:"center"}}},e}(xr);It(Hn,{categoryFormat:"{0:d}"});var Nn=Hn,Wn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.element,e=this.options;if(t.bbox()){this.origin=e.origin;var i=e.vertical?x:m,o=this.fromScale=new S.geometry.Point(1,1);o[i]=Zi,t.transform(S.geometry.transform().scale(o.x,o.y))}else this.abort()},e.prototype.step=function(t){var e=ct(this.fromScale.x,1,t),i=ct(this.fromScale.y,1,t);this.element.transform(S.geometry.transform().scale(e,i,this.origin))},e.prototype.abort=function(){t.prototype.abort.call(this),this.element.transform(null)},e}(S.drawing.Animation);It(Wn,{duration:600}),S.drawing.AnimationFactory.current.register($i,Wn);var qn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(S.geometry.transform().scale(Zi,Zi,t))},e.prototype.step=function(t){this.element.transform(S.geometry.transform().scale(t,t,this.center))},e}(S.drawing.Animation);It(qn,{easing:"easeOutElastic"}),S.drawing.AnimationFactory.current.register("bubble",qn);var Xn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},e.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},e}(S.drawing.Animation);It(Xn,{duration:200,easing:"linear"}),S.drawing.AnimationFactory.current.register("fadeIn",Xn);var Yn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this.element.transform(S.geometry.transform().scale(Zi,Zi,this.options.center))},e.prototype.step=function(t){this.element.transform(S.geometry.transform().scale(t,t,this.options.center))},e}(S.drawing.Animation);It(Yn,{easing:"easeOutElastic",duration:600}),S.drawing.AnimationFactory.current.register(to,Yn);var Zn=Yn,Kn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.createSegment=function(t,e,i){return new("smooth"===e.style?wo:vo)(t,e,i)},e.prototype.animationPoints=function(){return t.prototype.animationPoints.call(this).concat(this._segments)},e.prototype.createMissingValue=function(t,e){if(e===Ki){var i={x:t.x,y:t.y};return nr(i.x)||(i.x=0),nr(i.y)||(i.y=0),i}},e}(ar);j(Kn.prototype,Ao);var $n=Kn,Qn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new Vo,this.yAxisRangeTracker=new Vo},e.prototype.render=function(t){void 0===t&&(t=this.panes);for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);n&&(this.createScatterChart(Br(n,"scatter"),o),this.createScatterLineChart(Br(n,"scatterLine"),o),this.createBubbleChart(Br(n,"bubble"),o))}this.createAxes(t)},e.prototype.appendChart=function(e,i){this.xAxisRangeTracker.update(e.xAxisRanges),this.yAxisRangeTracker.update(e.yAxisRanges),t.prototype.appendChart.call(this,e,i)},e.prototype.removeAxis=function(e){var i=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?(this.yAxisRangeTracker.reset(i),delete this.namedYAxes[i]):(this.xAxisRangeTracker.reset(i),delete this.namedXAxes[i]),e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=st([].concat(e.xAxis),(function(t){return t.name===i}))[0],r=t.yAxis,n=st([].concat(e.yAxis),(function(t){return t.name===r}))[0],s=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(n||{}).pane||s},e.prototype.createScatterChart=function(t,e){t.length>0&&this.appendChart(new ar(this,{series:t,clip:e.options.clip}),e)},e.prototype.createScatterLineChart=function(t,e){t.length>0&&this.appendChart(new $n(this,{series:t,clip:e.options.clip}),e)},e.prototype.createBubbleChart=function(t,e){t.length>0&&this.appendChart(new cr(this,{series:t,clip:e.options.clip}),e)},e.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=j({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=jr(a.type,"log"),l=s.query(),c=p?{min:.1,max:1}:{min:0,max:1},u=s.query(r)||l||c,f=[a.min,a.max],d=this.series,g=0;g<d.length;g++){var y=d[g],v=y[e?"yAxis":"xAxis"];if(v===a.name||0===i&&!v){var m=Ni.current.bindPoint(y,0).valueFields;f.push(m[e?"y":"x"]);break}}0===i&&l&&(u.min=Math.min(u.min,l.min),u.max=Math.max(u.max,l.max));for(var x=0;x<f.length;x++)if(f[x]instanceof Date){o=!0;break}var b=new(jr(a.type,h)||!a.type&&o?yi:p?bi:di)(u.min,u.max,a,this.chartService);if(b.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=b}return this.appendAxis(b),b},e.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++){lt(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s))}for(var a=0;a<r.length;a++){lt(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a))}this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},e.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new Zt(o.x,o.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h],c=l.options.vertical?p:a,u=l.getValue(r);null!==u&&c.push(u)}a.length>0&&p.length>0&&t.trigger(i,{element:At(e),originalEvent:e,x:Lr(a),y:Lr(p)})},e.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),r=(i?o.y:o.x).indexOf(t);Jn(this.options,r,i,e),Jn(this.originalOptions,r,i,e)},e}(qr);function Jn(t,e,i,o){j([].concat(i?t.yAxis:t.xAxis)[e],o)}It(Qn,{xAxis:{},yAxis:{}}),j(Qn.prototype,Xr);var ts=Qn,es=function(t){function e(e,i,o){t.call(this,o),this.value=e,this.sector=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options.labels,e=this.owner.chartService,i=this.value;if(!this._rendered&&!1!==this.visible){this._rendered=!0;var o=it(t),r=this.pointData();if(o?i=o(r):t.format&&(i=e.format.auto(t.format,i)),t.visible&&(i||0===i)){if(t.position===a||"insideEnd"===t.position)t.color||(t.color=Ut(this.options.color)),t.background||(t.background=this.options.color);else{var n=e.theme.seriesDefaults.labels;t.color=t.color||n.color,t.background=t.background||n.background}this.label=new be(i,j({},t,{align:a,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),r),this.append(this.label)}}},e.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},e.prototype.reflowLabel=function(){var t=this.options.labels,e=this.label,i=this.sector.clone(),o=t.distance,r=i.middle();if(e){var n,s=e.box.height(),p=e.box.width();if(t.position===a)i.radius=Math.abs((i.radius-s)/2)+s,n=i.point(r),e.reflow(new $t(n.x,n.y-s/2,n.x,n.y));else if("insideEnd"===t.position)i.radius=i.radius-s/2,n=i.point(r),e.reflow(new $t(n.x,n.y-s/2,n.x,n.y));else{var h;(n=i.clone().expand(o).point(r)).x>=i.center.x?(h=n.x+p,e.orientation=d):(h=n.x-p,e.orientation=c),e.reflow(new $t(h,n.y-s,n.x,n.y))}}},e.prototype.createVisual=function(){var e=this,i=this.sector,o=this.options;if(t.prototype.createVisual.call(this),this.value)if(o.visual){var r=(i.startAngle+180)%360,n=o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new S.geometry.Point(i.center.x,i.center.y),radius:i.radius,innerRadius:i.innerRadius,startAngle:r,endAngle:r+i.angle,options:o,sender:this.getSender(),createVisual:function(){var t=new S.drawing.Group;return e.createSegmentVisual(t),t}});n&&this.visual.append(n)}else this.createSegmentVisual(this.visual)},e.prototype.createSegmentVisual=function(t){var e=this.sector,i=this.options,o=i.border||{},r=o.width>0?{stroke:{color:o.color,width:o.width,opacity:o.opacity,dashType:o.dashType}}:{},n=i.color,s={color:n,opacity:i.opacity},a=this.createSegment(e,j({fill:s,stroke:{opacity:i.opacity},zIndex:i.zIndex},r));t.append(a),zo(i)&&t.append(this.createGradientOverlay(a,{baseColor:n,fallbackFill:s},j({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},i.overlay)))},e.prototype.createSegment=function(t,e){return e.singleSegment?new S.drawing.Circle(new S.geometry.Circle(new S.geometry.Point(t.center.x,t.center.y),t.radius),e):ie.current.createRing(t,e)},e.prototype.createAnimation=function(){var e=this.options,i=this.sector.center;j(e,{animation:{center:[i.x,i.y],delay:this.animationDelay}}),t.prototype.createAnimation.call(this)},e.prototype.createHighlight=function(t){var e=this.options.highlight||{},i=e.border||{};return this.createSegment(this.sector,j({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:i.opacity,width:i.width,color:i.color}}))},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new S.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},e.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:rs(e+180)}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},e}(re),is=Ot(Mt(30),10),os=Ot(Mt(60),10);function rs(t){var e=Mt(t),i=Ot(Math.sin(e),10),o=Ot(Math.cos(e),10);return{horizontal:Math.abs(i)>os?a:o<0?d:c,vertical:Math.abs(i)<is?a:i<0?s:g}}It(es,{color:v,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:z(.5),align:p,zIndex:1,position:"outsideEnd"},animation:{type:to},highlight:{visible:!0,border:{width:1}},visible:!0}),j(es.prototype,co);var ns=es,ss={createLegendItem:function(t,e,i){var o=this.options.legend||{},r=o.labels||{},n=o.inactiveItems||{},s=n.labels||{};if(i&&!1!==i.visibleInLegend){var a,p,h=!1!==i.visible,l=h?it(r):it(s)||it(r),c=i.category;l&&(c=l({text:c,series:i.series,dataItem:i.dataItem,percentage:i.percentage,value:t})),h?(a={},p=e.color):(a={color:s.color,font:s.font},p=(n.markers||{}).color),nr(c)&&""!==c&&this.legendItems.push({active:h,pointIndex:i.index,text:c,series:i.series,markerColor:p,labels:a})}}},as=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this.points=[],this.legendItems=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.traverseDataPoints=function(t){var e=this.options,i=this.plotArea.options.seriesColors;void 0===i&&(i=[]);for(var o=i.length,r=e.series,n=r.length,s=0;s<n;s++){var p=r[s],h=p.data,l=Rr(p),c=l.total,u=l.points,f=l.count,d=360/c,g=void 0;isFinite(d)||(g=360/f);var y=void 0;y=xt(p.startAngle)?p.startAngle:e.startAngle,s!==n-1&&"outsideEnd"===p.labels.position&&(p.labels.position=a);for(var v=0;v<u.length;v++){var m=u[v];if(m){var x=m.fields,b=m.value,_=m.visible,w=0!==b?g||b*d:0,A=1!==h.length&&Boolean(x.explode);T(p.color)||(p.color=x.color||i[v%o]),t(m.valueFields.value,new Jt(null,0,0,y,w),{owner:this,category:xt(x.category)?x.category:"",index:v,series:p,seriesIx:s,dataItem:h[v],percentage:0!==c?b/c:0,explode:A,visibleInLegend:x.visibleInLegend,visible:_,zIndex:n-s,animationDelay:this.animationDelay(v,s,n)}),!1!==_&&(y+=w)}}}},e.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;ao(t,{value:e,series:o,dataItem:i.dataItem,category:i.category,percentage:i.percentage},{defaults:o._defaults,excluded:["data","content","template","visual","toggle"]})},e.prototype.addValue=function(t,e,i){var o=j({},i.series,{index:i.index});if(this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible){var r=new ns(t,e,o);Object.assign(r,i),this.append(r),this.points.push(r)}},e.prototype.reflow=function(t){var e=this.options,i=this.points,o=this.seriesConfigs;void 0===o&&(o=[]);var r=i.length,n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,p=s-.85*s,h=new $t(n.x1,n.y1,n.x1+s,n.y1+s),l=h.center(),c=n.center(),u=e.series.length,f=[],g=[],y=Rt(e.padding,p);this.targetBox=t,y=y>a-5?a-5:y,h.translate(c.x-l.x,c.y-l.y);for(var v=a-y,m=new Zt(v+h.x1+y,v+h.y1+y),x=0;x<r;x++){var b=i[x],_=b.sector,w=b.seriesIx;if(_.radius=v,_.center=m,o.length){var A=o[w];_.innerRadius=A.innerRadius,_.radius=A.radius}w===u-1&&b.explode&&(_.center=_.clone().setRadius(.15*_.radius).point(_.middle())),b.reflow(h);var S=b.label;S&&"outsideEnd"===S.options.position&&w===u-1&&(S.orientation===d?g.push(S):f.push(S))}f.length>0&&(f.sort(this.labelComparator(!0)),this.leftLabelsReflow(f)),g.length>0&&(g.sort(this.labelComparator(!1)),this.rightLabelsReflow(g)),this.box=h},e.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},e.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},e.prototype.distanceBetweenLabels=function(t){var e=kt(this.points),i=e.sector,o=t.length-1,r=i.radius+e.options.labels.distance,n=[],s=t[0].box,a=Ot(s.y1-(i.center.y-r-s.height()-s.height()/2));n.push(a);for(var p=0;p<o;p++){var h=t[p+1].box;s=t[p].box,a=Ot(h.y1-s.y2),n.push(a)}return a=Ot(i.center.y+r-t[o].box.y2-t[o].box.height()/2),n.push(a),n},e.prototype.distributeLabels=function(t,e){for(var i,o,r,n=t.length,s=0;s<n;s++)for(r=-t[s],i=o=s;r>0&&(i>=0||o<n);)r=this._takeDistance(t,s,--i,r),r=this._takeDistance(t,s,++o,r);this.reflowLabels(t,e)},e.prototype._takeDistance=function(t,e,i,o){var r=o;if(t[i]>0){var n=Math.min(t[i],r);r-=n,t[i]-=n,t[e]+=n}return r},e.prototype.reflowLabels=function(t,e){var i,o=kt(this.points),r=o.sector,n=o.options.labels,s=e.length,a=n.distance,h=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var l=0;l<s;l++){var c=e[l],u=c.box;h+=t[l],i=this.hAlignLabel(u.x2,r.clone().expand(a),h,h+u.height(),c.orientation===d),c.orientation===d?(n.align!==p&&(i=r.radius+r.center.x+a),c.reflow(new $t(i+u.width(),h,i,h))):(n.align!==p&&(i=r.center.x-r.radius-a),c.reflow(new $t(i-u.width(),h,i,h))),h+=u.height()}},e.prototype.createVisual=function(){var e=this.options.connectors,i=this.points,o=i.length;t.prototype.createVisual.call(this),this._connectorLines=[];for(var r=0;r<o;r++){var n=i[r],s=n.sector,a=n.label,p=s.middle(),h=(n.options.connectors||{}).color||e.color;if(a){var l=new S.drawing.Path({stroke:{color:h,width:e.width},animation:{type:"fadeIn",delay:n.animationDelay}});if("outsideEnd"===a.options.position){var c=a.box,u=s.center,f=s.point(p),g=new Zt(c.x1,c.center().y),y=void 0,v=void 0,m=void 0;f=s.clone().expand(e.padding).point(p),l.moveTo(f.x,f.y),a.orientation===d?(m=ps(u,f,g,v=new Zt(c.x1-e.padding,c.center().y)),g=new Zt(v.x-4,v.y),(m=m||g).x=Math.min(m.x,g.x),this.pointInCircle(m,s.center,s.radius+4)||m.x<s.center.x?(y=s.center.x+s.radius+4,n.options.labels.align!==Qi?y<g.x?l.lineTo(y,f.y):l.lineTo(f.x+8,f.y):l.lineTo(y,f.y),l.lineTo(g.x,v.y)):(m.y=v.y,l.lineTo(m.x,m.y))):(m=ps(u,f,g,v=new Zt(c.x2+e.padding,c.center().y)),g=new Zt(v.x+4,v.y),(m=m||g).x=Math.max(m.x,g.x),this.pointInCircle(m,s.center,s.radius+4)||m.x>s.center.x?(y=s.center.x-s.radius-4,n.options.labels.align!==Qi?y>g.x?l.lineTo(y,f.y):l.lineTo(f.x-8,f.y):l.lineTo(y,f.y),l.lineTo(g.x,v.y)):(m.y=v.y,l.lineTo(m.x,m.y))),l.lineTo(v.x,v.y),this._connectorLines.push(l),this.visual.append(l)}}}},e.prototype.renderVisual=function(){if(t.prototype.renderVisual.call(this),Lt(this.options.series,(function(t){return t.autoFit}))){var e=this.targetBox,i=this.box.center(),o=this.visual.bbox();if(!o)return;var r=o.bottomRight(),n=Math.min((i.y-e.y1)/(i.y-o.origin.y),(e.y2-i.y)/(r.y-i.y),(i.x-e.x1)/(i.x-o.origin.x),(e.x2-i.x)/(r.x-i.x));n<1&&this.visual.transform(S.geometry.transform().scale(n,n,[i.x,i.y]))}},e.prototype.labelComparator=function(t){var e=t?-1:1;return function(t,i){return((t.parent.sector.middle()+270)%360-(i.parent.sector.middle()+270)%360)*e}},e.prototype.hAlignLabel=function(t,e,i,o,r){var n=e.radius,s=e.center,a=s.x,p=s.y,h=Math.min(Math.abs(p-i),Math.abs(p-o));return h>n?t:a+Math.sqrt(n*n-h*h)*(r?1:-1)},e.prototype.pointInCircle=function(t,e,i){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(i,2)},e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},e.prototype.animationDelay=function(t){return 70*t},e.prototype.stackRoot=function(){return this},e}(re);function ps(t,e,i,o){var r,n=(o.x-i.x)*(t.y-i.y)-(o.y-i.y)*(t.x-i.x),s=(o.y-i.y)*(e.x-t.x)-(o.x-i.x)*(e.y-t.y);if(0!==s){var a=n/s;r=new Zt(t.x+a*(e.x-t.x),t.y+a*(e.y-t.y))}return r}It(as,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),j(as.prototype,ss),as.prototype.isStackRoot=!0;var hs=as,ls=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createPieChart(this.series)},e.prototype.createPieChart=function(t){var e=t[0],i=new hs(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(i)},e.prototype.appendChart=function(e,i){t.prototype.appendChart.call(this,e,i),vt(this.options.legend.items,e.legendItems)},e}(qr),cs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowLabel=function(){var e=this.options.labels,i=this.label,o=this.sector.clone(),r=o.middle();if(i){var n=i.box.height();if(e.position===a){o.radius-=(o.radius-o.innerRadius)/2;var s=o.point(r);i.reflow(new $t(s.x,s.y-n/2,s.x,s.y))}else t.prototype.reflowLabel.call(this)}},e.prototype.createSegment=function(t,e){return ie.current.createRing(t,e)},e}(ns);It(cs,{overlay:{gradient:"roundedGlass"},labels:{position:a},animation:{type:to}}),j(cs.prototype,co);var us=cs,fs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addValue=function(t,e,i){var o=j({},i.series,{index:i.index});if(this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),t&&!1!==i.visible){var r=new us(t,e,o);Object.assign(r,i),this.append(r),this.points.push(r)}},e.prototype.reflow=function(e){for(var i,o=this.options,r=e.clone(),n=Math.min(r.width(),r.height()),s=n/2,a=n-.85*n,p=o.series,h=p.length,l=Rt(o.padding,a),c=s-(l=l>s-5?s-5:l),u=0,f=0;f<h;f++){var d=p[f];0===f&&xt(d.holeSize)&&(i=d.holeSize,c-=d.holeSize),xt(d.size)?c-=d.size:u++,xt(d.margin)&&f!==h-1&&(c-=d.margin)}xt(i)||(c-=i=.75*((s-l)/(h+.75)));var g,y=i,v=0;this.seriesConfigs=[];for(var m=0;m<h;m++){var x=p[m];g=(y+=v)+Rt(x.size,c/u),this.seriesConfigs.push({innerRadius:y,radius:g}),v=x.margin||0,y=g}t.prototype.reflow.call(this,e)},e.prototype.animationDelay=function(t,e,i){return 50*t+600*(e+1)/(i+1)},e}(hs);It(fs,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var ds=fs,gs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createDonutChart(this.series)},e.prototype.createDonutChart=function(t){var e=t[0],i=new ds(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(i)},e}(ls),ys=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.valueAxisRangeTracker=new Vo},e.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},e.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),i=t.options.reverse?e.max:e.min,o=t.getSlot(i),r=this.polarAxis.getSlot(0).center,n=t.box.translate(r.x-o.x1,r.y-o.y1);t.reflow(n)},e.prototype.createValueAxis=function(){var t,e,i=this.valueAxisRangeTracker,o=i.query(),r=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1});"log"===r.type?(t=Ri,e={min:.1,max:1}):(t=Oi,e={min:0,max:1});var n=i.query(name)||o||e;n&&o&&(n.min=Math.min(n.min,o.min),n.max=Math.max(n.max,o.max));var s=new t(n.min,n.max,r,this.chartService);this.valueAxis=s,this.appendAxis(s)},e.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,i=this.polarAxis,o=this.box,r=.15*Math.min(o.width(),o.height()),n=z(t.padding||{},r),s=o.clone().unpad(n),p=s.clone();p.y2=p.y1+Math.min(p.width(),p.height()),p.align(s,x,a);var h=p.clone().shrink(0,p.height()/2);i.reflow(p),e.reflow(h);var l=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:l})),this.axisBox=p,this.alignAxes(p)},e.prototype.backgroundBox=function(){return this.box},e.prototype.detachLabels=function(){},e}(qr),vs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointSlot=function(t,e){var i=t.center.y-e.y1,o=Zt.onCircle(t.center,t.startAngle,i);return new $t(o.x,o.y,o.x,o.y)},e}(ar);It(vs,{clip:!1});var ms=vs,xs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}($n);xs.prototype.pointSlot=ms.prototype.pointSlot,It(xs,{clip:!1});var bs=xs,_s=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},e.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},e.prototype.strokeSegments=function(){var t=this._strokeSegments;if(!t){var e=this._polarAxisCenter(),i=new Bi(!1),o=this.points();o.push(e),(t=this._strokeSegments=i.process(o)).pop()}return t},e}(Bo),ws=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),i=new S.geometry.Segment([e.x,e.y]);t.segments.unshift(i),t.segments.push(i)},e}(To);function As(t,e){return t.value.x-e.value.x}var Ss=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,i){return"smooth"===(e.line||{}).style?new _s(t,e,i):new ws(t,e,i)},e.prototype.createMissingValue=function(t,e){var i;return nr(t.x)&&"interpolate"!==e&&(i={x:t.x,y:t.y},e===Ki&&(i.y=0)),i},e.prototype.seriesMissingValues=function(t){return t.missingValues||Ki},e.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},e.prototype.sortPoints=function(t){if(t.sort(As),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];if(i)nr(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e]}return t},e}(bs),ks=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createPolarAxis=function(){var t=new ki(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},e.prototype.valueAxisOptions=function(t){return j(t,{majorGridLines:{type:r},minorGridLines:{type:r}},this.options.yAxis)},e.prototype.createValueAxis=function(){t.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},e.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),qr.prototype.appendChart.call(this,t,e)},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Br(t,["polarLine"]),e),this.createScatterChart(Br(t,["polarScatter"]),e),this.createAreaChart(Br(t,["polarArea"]),e)},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=new bs(this,{series:t});this.appendChart(i,e)}},e.prototype.createScatterChart=function(t,e){if(0!==t.length){var i=new ms(this,{series:t});this.appendChart(i,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var i=new Ss(this,{series:t});this.appendChart(i,e)}},e.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Zt(o.x,o.y),n=this.axisX.getValue(r),s=this.axisY.getValue(r);null!==n&&null!==s&&t.trigger(i,{element:At(e),x:n,y:s})},e.prototype.createCrosshairs=function(){},e}(ys);It(ks,{xAxis:{},yAxis:{}}),j(ks.prototype,Xr);var Cs=ks;var Ps=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointSlot=function(t,e){var i=t.center.y-e.y1,o=Zt.onCircle(t.center,t.middle(),i);return new $t(o.x,o.y,o.x,o.y)},e.prototype.renderSegments=function(){if(t.prototype.renderSegments.call(this),this._segments&&this._segments.length>1)for(var e=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[o.seriesIx]=e[o.seriesIx]||[],e[o.seriesIx].push(o)}return e}(this._segments),i=0;i<e.length;i++){var o=e[i];if(o&&o.length>1){var r=o[0].linePoints[0],n=kt(o),s=kt(n.linePoints),a=0===r.categoryIx,p=s.categoryIx===s.categoriesCount-1;a&&p&&kt(o).linePoints.push(r)}}},e.prototype.createSegment=function(t,e,i){var o=new("smooth"===e.style?wo:vo)(t,e,i),r=this.seriesMissingValues(e);return t.length!==e.data.length&&"interpolate"!==r||(o.options.closed=!0),o},e}(Oo);It(Ps,{clip:!1,limitPoints:!1});var Ms=Ps,Os=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(){},e}(Bo),Ts=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(){},e}(To),Rs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,i,o){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&i>0&&o&&(n=o.linePoints.slice(0),r=o),"smooth"===p?(s=new Os(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new Ts(t,e,i,r,n)),s},e.prototype.seriesMissingValues=function(t){return t.missingValues||Ki},e}(Ms),js=function(t){function e(e,i){t.call(this,e,null,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(us);It(js,{overlay:{gradient:"none"},labels:{distance:10}});var Bs=js,Is=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Go:Uo}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=this.children,o=e.gap,r=e.spacing,n=i.length,s=n+o+r*(n-1),a=t.angle/s,p=t.startAngle+a*(o/2);this.forEach(i,(function(e){var i=t.clone();i.startAngle=p,i.angle=a,e.sector&&(i.radius=e.sector.radius),e.reflow(i),e.sector=i,p+=a+a*r}))},e}(re);It(Is,{gap:1,spacing:0});var Vs=Is,Ls=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options.reverse,i=this.children,o=i.length,r=e?o-1:0,n=e?-1:1;this.box=new $t;for(var s=r;s>=0&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},e}(re),Es=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return Bs},e.prototype.clusterType=function(){return Vs},e.prototype.stackType=function(){return Ls},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.pointSlot=function(t,e){var i=t.clone(),o=t.center.y;return i.radius=o-e.y1,i.innerRadius=o-e.y2,i},e.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},e.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),t.prototype.createAnimation.call(this)},e}(Yo);Es.prototype.reflow=lo.prototype.reflow,It(Es,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var zs=Es,Ds=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createPolarAxis=function(){var t=new Ai(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},e.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&j(t,{majorGridLines:{type:r},minorGridLines:{type:r}}),this._isStacked100&&j(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),j(t,this.options.valueAxis)},e.prototype.aggregateCategories=function(){wn.prototype.aggregateCategories.call(this,this.panes)},e.prototype.createCategoryAxesLabels=function(){wn.prototype.createCategoryAxesLabels.call(this,this.panes)},e.prototype.filterSeries=function(t){return t},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Br(t,["radarArea"]),e),this.createLineChart(Br(t,["radarLine"]),e),this.createBarChart(Br(t,["radarColumn"]),e)},e.prototype.chartOptions=function(t){var e={series:t},i=t[0];if(i){var o=this.filterVisibleSeries(t),r=i.stack;e.isStacked=r&&o.length>1,e.isStacked100=r&&"100%"===r.type&&o.length>1,e.isStacked100&&(this._isStacked100=!0)}return e},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var i=new Rs(this,this.chartOptions(t));this.appendChart(i,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=new Ms(this,this.chartOptions(t));this.appendChart(i,e)}},e.prototype.createBarChart=function(t,e){if(0!==t.length){var i=t[0],o=this.chartOptions(t);o.gap=i.gap,o.spacing=i.spacing;var r=new zs(this,o);this.appendChart(r,e),this._hasBarCharts=!0}},e.prototype.seriesCategoryAxis=function(){return this.categoryAxis},e.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Zt(o.x,o.y),n=this.categoryAxis.getCategory(r),s=this.valueAxis.getValue(r);null!==n&&null!==s&&t.trigger(i,{element:At(e),category:n,value:s})},e.prototype.createCrosshairs=function(){},e}(ys);j(Ds.prototype,Xr,{appendChart:wn.prototype.appendChart,aggregateSeries:wn.prototype.aggregateSeries,seriesSourcePoints:wn.prototype.seriesSourcePoints}),It(Ds,{categoryAxis:{categories:[]},valueAxis:{}});var Fs=Ds,Us=function(t){function e(e,i,o){t.call(this,i),this.value=e,this.options.index=o.index}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.points,i=this.children[0];this.box=new $t(e[0].x,e[0].y,e[1].x,e[2].y),i&&i.reflow(new $t(t.x1,e[0].y,t.x2,e[2].y))},e.prototype.createVisual=function(){var e,i=this,o=this.options;t.prototype.createVisual.call(this),(e=o.visual?o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:o,sender:this.getSender(),createVisual:function(){return i.createPath()}}):this.createPath())&&this.visual.append(e)},e.prototype.createPath=function(){var t=this.options,e=t.border;return S.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},e.prototype.createHighlight=function(t){return S.drawing.Path.fromPoints(this.points,t)},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=S.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},e.prototype.tooltipAnchor=function(){var t=this.box;return{point:new Zt(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e}(re);It(Us,{color:v,border:{width:1}}),j(Us.prototype,co);var Gs=Us,Hs=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.points=[],this.labels=[],this.legendItems=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},e.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors;void 0===e&&(e=[]);var i=t.series[0],o=i.data;if(o)for(var r=Rr(i),n=r.total,s=r.points,a=0;a<s.length;a++){var p=s[a];if(p){var h=p.fields;T(i.color)||(i.color=h.color||e[a%e.length]),h=j({index:a,owner:this,series:i,dataItem:o[a],percentage:p.value/n},h,{visible:p.visible});var l=p.valueFields.value,c=this.createSegment(l,h),u=this.createLabel(l,h);c&&u&&c.append(u)}}},e.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;ao(t,{value:e,series:o,dataItem:i.dataItem,index:i.index},{defaults:o._defaults,excluded:["data","content","template","toggle","visual"]})},e.prototype.createSegment=function(t,e){var i=j({},e.series);if(this.evalSegmentOptions(i,t,e),this.createLegendItem(t,i,e),!1!==e.visible){var o=new Gs(t,i,e);return Object.assign(o,e),this.append(o),this.points.push(o),o}},e.prototype.createLabel=function(t,e){var i=e.series,o=e.dataItem,r=j({},this.options.labels,i.labels),n=t;if(r.visible){var s=it(r),a={dataItem:o,value:t,percentage:e.percentage,category:e.category,series:i};s?n=s(a):r.format&&(n=this.plotArea.chartService.format.auto(r.format,n)),r.color||(r.color=Ut(i.color),r.background||(r.background=i.color)),this.evalSegmentOptions(r,t,e);var p=new be(n,j({vAlign:r.position},r),a);return this.labels.push(p),p}},e.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},i=0;i<t.length;i++){var o=t[i].options.align;if(o!==a){var r=t[i].box.width();o===c?e.left=Math.max(e.left,r):e.right=Math.max(e.right,r)}}return e},e.prototype.dynamicSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=r[0],a=s,p=0;p<r.length;p++)r[p].percentage>a.percentage&&(a=r[p]);for(var h=s.percentage/a.percentage*e,l=(e-h)/2,c=0,u=0;u<n;u++){var f=r[u].percentage,d=r[u+1],g=d?d.percentage:f,y=r[u].points=[],v=o.dynamicHeight?i*f:i/n,m=void 0;m=Ct(m=f?(e-h*(g/f))/2:g?0:e/2,0,e),y.push(new S.geometry.Point(t.x1+l,t.y1+c)),y.push(new S.geometry.Point(t.x1+e-l,t.y1+c)),y.push(new S.geometry.Point(t.x1+e-m,t.y1+v+c)),y.push(new S.geometry.Point(t.x1+m,t.y1+v+c)),l=m,c+=v+o.segmentSpacing,h=Ct(e-2*m,0,e)}},e.prototype.constantSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=o.neckRatio<=1,a=s?o.neckRatio*e:e,p=s?0:(e-e/o.neckRatio)/2,h=((s?e:e-2*p)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],f=r[c].percentage,d=o.dynamicHeight?h*f:h/n,g=o.dynamicHeight?i*f:i/n;u.push(new S.geometry.Point(t.x1+p,t.y1+l)),u.push(new S.geometry.Point(t.x1+e-p,t.y1+l)),u.push(new S.geometry.Point(t.x1+e-p-d,t.y1+g+l)),u.push(new S.geometry.Point(t.x1+p+d,t.y1+g+l)),p+=d,l+=g+o.segmentSpacing}},e.prototype.reflow=function(t){var e=this.points,i=e.length;if(i){var o=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-o.segmentSpacing*(i-1),s=r.width();o.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<i;a++)e[a].reflow(t)}},e}(re);It(Hs,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:a,position:a,zIndex:1}}),j(Hs.prototype,ss);var Ns=Hs,Ws=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createFunnelChart(this.series)},e.prototype.createFunnelChart=function(t){var e=t[0],i=new Ns(this,{series:t,legend:this.options.legend,neckRatio:e.neckRatio,dynamicHeight:e.dynamicHeight,dynamicSlope:e.dynamicSlope,segmentSpacing:e.segmentSpacing,highlight:e.highlight});this.appendChart(i)},e.prototype.appendChart=function(e,i){t.prototype.appendChart.call(this,e,i),vt(this.options.legend.items,e.legendItems)},e}(qr),qs=function(t,e){void 0===e&&(e=.05);var i=Object(S.parseColor)(t),o=1-e;return function(t){var e=i.toHSL(),r=100-e.l,n=o-t;return e.l+=Math.min(n*r,r),e.toCss()}},Xs=function(t){function e(e,i){t.call(this),this.options=i,this.color=i.color||v,this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},e.prototype.createLabel=function(){var t=this.options.labels;if(t.visible){var e,i=this.pointData(),o=it(t),r=t.color;e=o?o(i):this.formatValue(t.format),r||(r=Ut(this.color)),this.label=new be(e,j({align:a,vAlign:a,margin:{left:5,right:5},zIndex:Rt(t.zIndex,this.series.zIndex)},t,{color:r}),i),this.append(this.label)}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.reflow=function(t){this.render();var e=this.label;this.box=t,e&&e.reflow(this.markerBox()),this.note&&this.note.reflow(t),this.marker.reflow(this.markerBox())},e.prototype.markerBox=function(){var t=this.options.markers,e=t.border,i=this.box.toRect(),o="roundedRect"===Rt(t.type,"rect"),r=Rt(e.width,o?1:0),n=Math.round(r/2);if(t.size){var s=i.center();i.size.width=i.size.height=t.size,i.origin.x=Math.round(s.x-i.size.width/2),i.origin.y=Math.round(s.y-i.size.height/2)}return i.size.width-=r,i.size.height-=r,i.origin.y+=n+.5,i.origin.x+=n+.5,me(i)},e.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,i=Rt(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:i,dashType:e.dashType}},e.prototype.createMarker=function(){var t=this.options,e=t.markers,i=new pe({type:Rt(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:Rt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});this.marker=i,this.append(i)},e.prototype.createHighlight=function(t){var e=this.options,i=this.options.highlight.markers||this.options.markers,o=new pe({type:Rt(i.type,"rect"),width:i.size,height:i.size,rotation:i.rotation,background:i.color||this.color,border:this.markerBorder(),borderRadius:i.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:Rt(e.zIndex,this.series.zIndex)});o.reflow(this.markerBox());var r=o.getElement();return r.options.fill=t.fill,r.options.stroke=t.stroke,r},e.prototype.highlightVisual=function(){return this.rectVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},e.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new Zt(t,e),align:{horizontal:a,vertical:s}}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.unclipElements=function(){},e.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},e}(re);j(Xs.prototype,co),j(Xs.prototype,uo),Xs.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};var Ys=Xs,Zs=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this._initFields(),this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:u,max:f},this._evalSeries=[]},e.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},e.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.data.length;o++){var r=this._bindPoint(i,e,o).valueFields;this.valueRange.min=Math.min(this.valueRange.min,r.value),this.valueRange.max=Math.max(this.valueRange.max,r.value)}},e.prototype.addValue=function(t,e){var i;t&&(i=this.createPoint(t,e))&&Object.assign(i,e),this.points.push(i)},e.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle"]},s=this._evalSeries[r];xt(s)||(this._evalSeries[r]=s=ao(t,{},n,!0));var a=t;return s&&ao(a=j({},t),{value:e,series:o,dataItem:i.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),a},e.prototype.pointType=function(){return Ys},e.prototype.pointOptions=function(t,e){var i=this.seriesOptions[e];if(!i){var o=this.pointType().prototype.defaults;this.seriesOptions[e]=i=j({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return i},e.prototype.createPoint=function(t,e){var i=e.series,o=this.pointOptions(i,e.seriesIx),r=e.color||i.color;(o=this.evalPointOptions(o,t,e),T(i.color))?r=o.color:r=qs(r)(t.value/this.valueRange.max);var n=new Ys(t,o);return n.color=r,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,i=t.yAxis,o=this.plotArea,r=e?o.namedXAxes[e]:o.axisX,n=i?o.namedYAxes[i]:o.axisY;if(!r)throw new Error("Unable to locate X axis with name "+e);if(!n)throw new Error("Unable to locate Y axis with name "+i);return{xAxis:r,yAxis:n}},e.prototype.reflow=function(t){var e=this,i=this.points,o=!this.options.clip,r=0;this.traverseDataPoints((function(t,n){var s=i[r++],a=e.seriesAxes(n.series),p=a.xAxis,h=a.yAxis,l=p.categoryIndex(t.x),c=h.categoryIndex(t.y),u=p.getSlot(l,l,o),f=h.getSlot(c,c,o);if(s)if(u&&f){var d=e.pointSlot(u,f);s.reflow(d)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new $t(t.x1,e.y1,t.x2,e.y2)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=0;i<e.length;i++)for(var o=e[i],r=this.seriesAxes(o),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),p=s.currentRangeIndices(),h=0;h<o.data.length;h++){var l=this._bindPoint(o,i,h),c=l.valueFields,u=l.fields,f=n.totalIndex(c.x),d=s.totalIndex(c.y),g=a.min<=f&&f<=a.max,y=p.min<=d&&d<=p.max;g&&y&&t(c,j({pointIx:h,series:o,seriesIx:i,dataItem:o.data[h],owner:this},u))}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.value)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},e}(re);It(Zs,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),j(Zs.prototype,{_bindPoint:lo.prototype._bindPoint});var Ks=Zs,$s=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},e.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var i=t[e],o=i.data||[],r=this.seriesAxes(i),n=r.xAxis,s=r.yAxis,a=Xt(n.categories||[]),p=Xt(s.categories||[]),h=0;h<o.length;h++){var l=Ni.current.bindPoint(i,h).valueFields,c=l.x,u=l.y;a.has(c)||a.add(c),p.has(u)||p.add(u)}n.categories=a.values(),s.categories=p.values()}},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);n&&this.createHeatmapChart(Br(n,["heatmap"]),o)}},e.prototype.createHeatmapChart=function(t,e){var i=new Ks(this,{series:t});this.appendChart(i,e)},e.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=st([].concat(e.xAxis),(function(t){return t.name===i}))[0],r=t.yAxis,n=st([].concat(e.yAxis),(function(t){return t.name===r}))[0],s=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(n||{}).pane||s},e.prototype.seriesAxes=function(t){var e,i,o=this.options,r=[].concat(o.xAxis),n=t.xAxis;e=n?r.find((function(t){return t.name===n})):r[0];var s=[].concat(o.yAxis),a=t.yAxis;if(i=a?s.find((function(t){return t.name===a})):s[0],!e)throw new Error("Unable to locate X axis with name "+n);if(!i)throw new Error("Unable to locate Y axis with name "+a);return{xAxis:e,yAxis:i}},e.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},e.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),a=s.categories?s.categories[0]:null,p=[s.min,s.max,a],l=this.series,c=0;c<l.length;c++){var u=l[c],f=u[e?"yAxis":"xAxis"];if(f===s.name||0===i&&!f){var d=Ni.current.bindPoint(u,0).valueFields;p.push(d[e?"y":"x"]);break}}for(var g=0;g<p.length;g++)if(p[g]instanceof Date){o=!0;break}var y=new(jr(s.type,h)||!s.type&&o?ai:Qe)(s,this.chartService);if(y.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=y}return this.appendAxis(y),y.mapCategories(),y},e.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++){lt(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s))}for(var a=0;a<r.length;a++){lt(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a))}this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},e.prototype.removeAxis=function(e){var i=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?delete this.namedYAxes[i]:delete this.namedXAxes[i],e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new Zt(o.x,o.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h];Or(l.options.vertical?p:a,l.getCategory(r))}a.length>0&&p.length>0&&t.trigger(i,{element:At(e),originalEvent:e,x:Lr(a),y:Lr(p)})},e.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),r=(i?o.y:o.x).indexOf(t);Qs(this.options,r,i,e),Qs(this.originalOptions,r,i,e)},e.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},e}(qr);function Qs(t,e,i,o){j([].concat(i?t.yAxis:t.xAxis)[e],o)}It($s,{xAxis:{},yAxis:{}}),j($s.prototype,Xr);var Js=$s,ta="color",ea="first",ia="max";En.current.register(wn,[$i,Qi,Ji,eo,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),En.current.register(ts,["scatter","scatterLine","bubble"]),En.current.register(ls,[to]),En.current.register(gs,["donut"]),En.current.register(Ws,["funnel"]),En.current.register(Cs,["polarArea","polarLine","polarScatter"]),En.current.register(Fs,["radarArea","radarColumn","radarLine"]),En.current.register(Js,["heatmap"]),Ni.current.register([$i,Qi,Ji,eo,"area","verticalArea"],[y],["category",ta,"noteText","errorLow","errorHigh"]),Ni.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",ta,"noteText"]),Ni.current.register(["waterfall","horizontalWaterfall"],[y],["category",ta,"noteText","summary"]),Ni.current.register(["polarArea","polarLine","polarScatter"],[m,x],[ta]),Ni.current.register(["radarArea","radarColumn","radarLine"],[y],[ta]),Ni.current.register(["funnel"],[y],["category",ta,"visibleInLegend","visible"]),$r.current.register([$i,Qi,Ji,eo,"area","verticalArea","waterfall","horizontalWaterfall"],{value:ia,color:ea,noteText:ea,errorLow:"min",errorHigh:ia}),$r.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:ia,color:ea,noteText:ea}),$r.current.register(["radarArea","radarColumn","radarLine"],{value:ia,color:ea}),Ni.current.register(["scatter","scatterLine","bubble"],[m,x],[ta,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Ni.current.register(["bubble"],[m,x,"size"],[ta,"category","noteText"]),Ni.current.register(["heatmap"],[m,x,y],[ta,"noteText"]),Ni.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",ta,"downColor","noteText"]),$r.current.register(["candlestick","ohlc"],{open:ia,high:ia,low:"min",close:ia,color:ea,downColor:ea,noteText:ea}),Ni.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",ta,"noteText"]),$r.current.register(["boxPlot","verticalBoxPlot"],{lower:ia,q1:ia,median:ia,q3:ia,upper:ia,mean:ia,outliers:ea,color:ea,noteText:ea}),Ni.current.register(["bullet","verticalBullet"],["current","target"],["category",ta,"visibleInLegend","noteText"]),$r.current.register(["bullet","verticalBullet"],{current:ia,target:ia,color:ea,noteText:ea}),Ni.current.register([to,"donut"],[y],["category",ta,"explode","visibleInLegend","visible"]);var oa=["category",y,m,x],ra=function(t){function e(e,i,o,r){var n=this;void 0===r&&(r={}),t.call(this),this.observers=[],this.addObserver(r.observer),this.chartService=new K(this,r),this.chartService.theme=o,this._initElement(e);var s=j({},this.options,i);this._originalOptions=j({},s),this._theme=o,this._initTheme(s,o),this._initHandlers(),this._initSurface(),this.bindCategories(),Bt.preloadFonts(i,(function(){n.fontLoaded=!0,n._destroyed||(n.trigger("init"),n._redraw(),n._attachEvents())}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},e.prototype._setElementClass=function(t){_(t,"k-chart")},e.prototype._initTheme=function(t,e){for(var i=[],o=t.series||[],r=0;r<o.length;r++)i.push(Object.assign({},o[r]));t.series=i,function(t){for(var e=oa,i=0;i<e.length;i++){var o=e[i]+"Axes";t[o]&&(t[e[i]+"Axis"]=t[o],delete t[o])}}(t),this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=j({},e,t),this.applySeriesColors()},e.prototype.getSize=function(){var t=this.options.chartArea||{};return{width:t.width?parseInt(t.width,10):Math.floor(this.element.offsetWidth),height:t.height?parseInt(t.height,10):Math.floor(this.element.offsetHeight)}},e.prototype.resize=function(t){var e=this.getSize(),i=this._size,o=e.width>0||e.height>0;t||o&&(!i||e.width!==i.width||e.height!==i.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):o&&this._selections&&Lt(this._selections,(function(t){return!t.visible}))&&(this._destroySelections(),this._setupSelection())},e.prototype._resize=function(){this._noTransitionsRedraw()},e.prototype.redraw=function(t){if(this.applyDefaults(this.options),this.applySeriesColors(),t){var e=this._model._plotArea,i=e.findPane(t);e.redraw(i)}else this._redraw()},e.prototype.getAxis=function(t){return Vi(t,this._plotArea.axes)},e.prototype.findAxisByName=function(t){return this.getAxis(t)},e.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,i=0;i<e.length;i++)if(e[i].options.name===t)return new Ei(e[i])},e.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Ei(e[t])},e.prototype.plotArea=function(){return new zi(this._plotArea)},e.prototype.toggleHighlight=function(t,e){var i,o,r,n=this._plotArea,s=(n.srcSeries||n.series||[])[0];T(e)?i=n.filterPoints(e):(B(e)?(o=e.series,r=e.category):o=r=e,i="donut"===s.type?na(n.pointsBySeriesName(o),r):s.type===to||"funnel"===s.type?na((n.charts[0]||{}).points,r):n.pointsBySeriesName(o));i&&this.togglePointsHighlight(t,i)},e.prototype.togglePointsHighlight=function(t,e){for(var i=this._highlight,o=0;o<e.length;o++)i.togglePointHighlight(e[o],t)},e.prototype.showTooltip=function(t){var e,i,o=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;if(T(t)?(e=n.findPoint(t))&&o&&(i=e.categoryIx):o&&xt(t)&&(i=n.categoryAxis.categoryIndex(t)),o){if(i>=0){var s=this._plotArea.pointsByCategoryIndex(i);r.showAt(s)}}else e&&r.show(e)},e.prototype.hideTooltip=function(){this._tooltip.hide()},e.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),i=this.options.chartArea||{};i.width&&wt(e,{width:i.width}),i.height&&wt(e,{height:i.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=S.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},e.prototype._surfaceWrap=function(){return this.element},e.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._model=t,this._plotArea=t._plotArea,t.renderVisual(),!1!==this.options.transitions&&t.traverse((function(t){t.animation&&t.animation.setup()})),this._initSurface(),this.surface.draw(t.visual),!1!==this.options.transitions&&t.traverse((function(t){t.animation&&t.animation.play()})),this._tooltip=this._createTooltip(),this._highlight=new Sn,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),la(this._plotArea.panes),this._navState||this._cancelDomEvents()},e.prototype.exportVisual=function(t){var e;if(t&&(t.width||t.height||t.options)){var i=this.options,o=j({},t.options,{chartArea:{width:t.width,height:t.height}});ha(this._originalOptions,o),this.options=j({},this._originalOptions,o),this._initTheme(this.options,this._theme),this.bindCategories();var r=this._getModel();r.renderVisual(),la(r._plotArea.panes),e=r.visual,this.options=i}else e=this.surface.exportVisual();return e},e.prototype._sharedTooltip=function(){return this._plotArea instanceof wn&&this.options.tooltip&&this.options.tooltip.shared},e.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Mn(this._plotArea,t.pannable))},e.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Tn(this,e))},e.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Rn(this,e))},e.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,i=(e||{}).selection,o=(e||{}).mousewheel,r=!(t||!1!==e&&!1!==i||this.requiresHandlers(["dragStart","drag","dragEnd"])),n=(!1===e||!1===o)&&!this.requiresHandlers(["zoomStart","zoom","zoomEnd"]),s=this.element;this._dragZoomEnabled&&r&&n?(s.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||r&&n||(s.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!r,!n)},e.prototype._toggleDomEvents=function(t,e){var i=this.domEvents;i&&(i.toggleDrag&&i.toggleDrag(t),i.toggleZoom&&i.toggleZoom(e))},e.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new Gn(this.chartService,t)},e.prototype._createSharedTooltip=function(t){return new Nn(this._plotArea,t)},e.prototype.applyDefaults=function(t,e){!function(t,e){var i,o,r,n=(e||{}).axisDefaults||{};function s(t){var e=(t||{}).color||o.color,r=j({},n,n[i],o,o[i],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete r[i],r}for(var a=0;a<oa.length;a++)i=oa[a]+"Axis",o=t.axisDefaults||{},r=(r=[].concat(t[i])).map(s),t[i]=r.length>1?r:r[0]}(t,e),function(t,e){var i=t.series,o=i.length,r=t.seriesDefaults,n=j({},t.seriesDefaults),s=e?j({},e.seriesDefaults):{},a=j({},s);sa(n),sa(a);for(var p=0;p<o;p++){var h=i[p].type||t.seriesDefaults.type,l=j({data:[]},a,s[h],{tooltip:t.tooltip},n,r[h]);i[p]._defaults=l,i[p]=j({},l,i[p]),i[p].data=i[p].data||[]}}(t,e)},e.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,i=t.seriesColors||[],o=0;o<e.length;o++){var r=e[o],n=i[o%i.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},e.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),i=new ue(this._modelOptions());return i.chart=this,i._plotArea=e,we.buildTitle(t.title,i),t.legend&&t.legend.visible&&i.append(new Vn(e.options.legend,this.chartService)),i.append(e),i.reflow(),i},e.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return j({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},e.prototype._createPlotArea=function(t){var e=this.options;return En.current.create(t?[]:e.series,e,this.chartService)},e.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],i=0;i<t.length;i++){var o=t[i],r=o.options;if(o instanceof Qe&&r.select&&!r.vertical){var n=o.range(),s=new Un(this,o,j({min:n.min,max:n.max},r.select));e.push(s)}}},e.prototype._selectStart=function(t){return this.trigger("selectStart",t)},e.prototype._select=function(t){return this.trigger("select",t)},e.prototype._selectEnd=function(t){return this.trigger("selectEnd",t)},e.prototype._initHandlers=function(){this._clickHandler=this._click.bind(this),this._mousewheelHandler=this._mousewheel.bind(this),this._mouseleaveHandler=this._mouseleave.bind(this),this._surfaceMouseenterHandler=this._mouseover.bind(this),this._surfaceMouseleaveHandler=this._mouseout.bind(this),this._mousemove=Object(S.throttle)(this._mousemove.bind(this),20)},e.prototype.addObserver=function(t){t&&this.observers.push(t)},e.prototype.removeObserver=function(t){var e=this.observers.indexOf(t);e>=0&&this.observers.splice(e,1)},e.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},e.prototype.trigger=function(t,e){void 0===e&&(e={}),"showTooltip"===t&&(e.anchor.point=this._toDocumentCoordinates(e.anchor.point)),e.sender=this;for(var i=this.observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},e.prototype._attachEvents=function(){var t,e,i=this.element;this._touchAction=i.style.touchAction,mt(i,((t={}).contextmenu=this._clickHandler,t[oo]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&mt(i,((e={}).mousemove=this._mousemove,e)),this.domEvents=Q.create(this.element,{start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)}),this._toggleDragZoomEvents()},e.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger("plotAreaLeave"),this._plotArea.hovered=!1)},e.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},e.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},e.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger("zoomEnd",{}))},e.prototype._gesturechange=function(t){var e=this._mousewheelZoom;if(e&&!this._stopChartHandlers(t)){t.preventDefault();var i=this._gestureDistance,o=-t.distance/i+1;if(Math.abs(o)>=.1){o=Math.round(10*o),this._gestureDistance=t.distance;var r={delta:o,axisRanges:aa(this._plotArea.axes),originalEvent:t};if(this._zooming||!this.trigger("zoomStart",r))this._zooming||(this._zooming=!0),(r.axisRanges=e.updateRanges(o))&&!this.trigger("zoom",r)&&e.zoom()}}},e.prototype._mouseout=function(t){if(t.element){var e=this._drawingChartElement(t.element,t);e&&e.leave&&e.leave(this,t.originalEvent)}},e.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers(["dragStart","drag","dragEnd"])&&this._startNavigation(t,e,"dragStart"),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection&&this._zoomSelection.start(t)&&this.trigger("zoomStart",{axisRanges:aa(this._plotArea.axes),originalEvent:t}))},e.prototype._move=function(t){var e=this._navState,i=this._pannable;if(!this._stopChartHandlers(t)){if(i){var o=i.move(t);o&&!this.trigger("drag",{axisRanges:o,originalEvent:t})&&i.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a=n[s];if(a.options.name){var p=a.options.vertical?t.y:t.x,h=p.startLocation-p.location;0!==h&&(r[a.options.name]=a.translateRange(h))}}e.axisRanges=r,this.trigger("drag",{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},e.prototype._end=function(t){if(!this._stopChartHandlers(t)){var e=this._pannable;if(e&&e.end(t)?(this.surface.resumeTracking(),this.trigger("dragEnd",{axisRanges:aa(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,"dragEnd"),this._zoomSelection){var i=this._zoomSelection.end(t);i&&!this.trigger("zoom",{axisRanges:i,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger("zoomEnd",{axisRanges:i,originalEvent:t}))}}},e.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var i=this._eventCoordinates(t),o=this._plotArea.paneByPoint(i);if(o)for(var r=0;r<e.length;r++)if(e[r].onPane(o))return!0},e.prototype._mousewheel=function(t){var e=this,i=gt(t),o=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(o){var n={delta:i,axisRanges:aa(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger("zoomStart",n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=o.updateRanges(i),n.axisRanges&&!this.trigger("zoom",n)&&o.zoom(),this._mwTimeout=setTimeout((function(){e.trigger("zoomEnd",n),e._zooming=!1,e.surface&&e.surface.resumeTracking()}),150))}else{var s=this._navState;if(!s)this._startNavigation(t,r,"zoomStart")||(s=this._navState);if(s){var a=s.totalDelta||i;s.totalDelta=a+i;for(var p=this._navState.axes,h={},l=0;l<p.length;l++){var c=p[l],u=c.options.name;u&&(h[u]=c.scaleRange(-a))}this.trigger("zoom",{delta:i,axisRanges:h,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._endNavigation(t,"zoomEnd")}),150)}}},e.prototype._startNavigation=function(t,e,i){var o=this._model._plotArea,r=o.findPointPane(e),n=o.axes.slice(0);if(r){var s=aa(n);this.trigger(i,{axisRanges:s,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:s,pane:r,axes:n})}},e.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},e.prototype._getChartElement=function(t,e){var i=this.surface.eventTarget(t);if(i)return this._drawingChartElement(i,t,e)},e.prototype._drawingChartElement=function(t,e,i){for(var o,r=t;r&&!o;)o=r.chartElement,r=r.parent;if(o)return o.aliasFor&&(o=o.aliasFor(e,this._eventCoordinates(e))),i&&(o=o.closest(i))&&o.aliasFor&&(o=o.aliasFor()),o},e.prototype._eventCoordinates=function(t){var e=St(t);return this._toModelCoordinates(e.x,e.y)},e.prototype._elementPadding=function(){if(!this._padding){var t=E(this.element,["paddingLeft","paddingTop"]),e=t.paddingLeft,i=t.paddingTop;this._padding={top:i,left:e}}return this._padding},e.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),i=_t(this.element);return{left:Ot(t.x+e.left+i.left),top:Ot(t.y+e.top+i.top)}},e.prototype._toModelCoordinates=function(t,e){var i=this.element,o=_t(i),r=this._elementPadding(),n=Ft(i).invert(),s=new S.geometry.Point(t-o.left-r.left,e-o.top-r.top).transform(n);return new Zt(s.x,s.y)},e.prototype._tap=function(t){var e=this,i=this.surface.eventTarget(t),o=this._drawingChartElement(i,t),r=this._sharedTooltip();this._startHover(i,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(o,t),this.handlingTap=!0,setTimeout((function(){e.handlingTap=!1}),0)},e.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},e.prototype._propagateClick=function(t,e){for(var i=t;i;)i.click&&i.click(this,e),i=i.parent},e.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var i=this._drawingChartElement(t,e,(function(t){return(t.hover||t.over)&&!(t instanceof qr)})),o=this._activePoint,r=this._plotArea.series.length>1,n=this._hasInactiveOpacity();return this._updateHoveredPoint(i,e),i&&o!==i&&i.hover?(this._activePoint=i,this._sharedTooltip()||i.hover(this,e)||(this._displayTooltip(i),n?this._displayInactiveOpacity(i,r):this._highlight.show(i))):!i&&n&&(r&&this._activeChartInstance&&(this._updateSeriesOpacity(i,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null),i},e.prototype._displayTooltip=function(t){j({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},e.prototype._displayInactiveOpacity=function(t,e,i){var o=this._activeChartInstance=this._chartInstanceFromPoint(t);if(o)if(e)this._updateSeriesOpacity(t),this._applySeriesOpacity(o.children,null,!0),this._applySeriesOpacity(o.children,t.series),this._highlight.show(i||t);else{var r;if(!o.supportsPointInactiveOpacity())return void this._highlight.show(t);(r=this._getInactivePoints(t,o))&&r.length&&this._highlight.show(r,1-this._getInactiveOpacityForSeries(t.series))}},e.prototype._getInactivePoints=function(t,e){return this._getAllPointsOfType(e,t.constructor).filter((function(e){return e!==t}))},e.prototype._getAllPointsOfType=function(t,e){for(var i=[],o=0;o<t.children.length;o++){var r=t.children[o];r.constructor===e?i.push(r):r.children&&r.children.length&&(i=i.concat(this._getAllPointsOfType(r,e)))}return i},e.prototype._updateHoveredPoint=function(t,e){var i=this._hoveredPoint;i&&i!==t&&(i.out(this,e),this._hoveredPoint=null),t&&i!==t&&t.over&&(this._hoveredPoint=t,t.over(this,e))},e.prototype._updateSeriesOpacity=function(t,e){for(var i=this._plotArea,o=i.series.length,r=0;r<o;r++){var n=i.series[r],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},e.prototype._applySeriesOpacity=function(t,e,i,o){for(var r=0;r<t.length;r++){var n=t[r],s=n.series||o;if(s&&n.visual){var a=o?o.opacity:n.series.opacity;(s!==e||i)&&n.visual.opacity(i?1:a)}n.children&&n.children.length&&this._applySeriesOpacity(n.children,e,i,n.series)}},e.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},e.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=this.options.series.filter((function(t){return void 0!==t.highlight.inactiveOpacity})).length>0;return t||e},e.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},e.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},e.prototype._mouseover=function(t){var e,i=this._startHover(t.element,t.originalEvent);i&&i.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),mt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)))},e.prototype._mouseMoveTracking=function(t){var e,i=this.options,o=this._tooltip,r=this._highlight,n=this._activePoint,s=this._eventCoordinates(t);if(this._plotArea.box.containsPoint(s)){if(n&&n.tooltipTracking&&n.series&&n.parent.getNearestPoint){var a=n.parent.getNearestPoint(s.x,s.y,n.seriesIx);if(a&&a!==n)if(this._activePoint=a,!a.hover(this,t))j({},i.tooltip,a.options.tooltip).visible&&o.show(a),r.show(a)}}else Tt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null},e.prototype._mousemove=function(t){var e=this._eventCoordinates(t),i=this._plotArea;if(this._trackCrosshairs(e),i.hover){var o=i.backgroundContainsPoint(e);o?(i.hovered=!0,this._plotArea.hover(this,t)):i.hovered&&!o&&(this.trigger("plotAreaLeave"),i.hovered=!1)}this._sharedTooltip()&&this._trackSharedTooltip(e,t)},e.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,i=0;i<e.length;i++){var o=e[i];o.box.containsPoint(t)?o.showAt(t):o.hide()}},e.prototype._trackSharedTooltip=function(t,e,i){if(!this._suppressHover){var o=this.options.tooltip,r=this._plotArea,n=this._plotArea.categoryAxis,s=this._tooltip,a=this._highlight;if(r.backgroundContainsPoint(t)){var p=n.pointCategoryIndex(t);if(p!==this._tooltipCategoryIx||!this._sharedHighlight&&i){var h=r.pointsByCategoryIndex(p),l=h.map((function(t){return t.eventArgs(e)})),c=l[0]||{};c.categoryPoints=l,h.length>0&&!this.trigger("seriesHover",c)?(o.visible&&s.showAt(h,t),a.show(h),this._sharedHighlight=!0):s.hide(),this._tooltipCategoryIx=p}else i&&this._sharedHighlight&&(a.hide(),s.hide(),this._sharedHighlight=!1)}else this._sharedHighlight&&(a.hide(),s.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1)}},e.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},e.prototype._unsetActivePoint=function(t){var e=this._tooltip,i=this._highlight;this._activePoint=null,this._hoveredPoint=null,!e||t&&t.keepTooltipOpen||e.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,i&&i.hide()},e.prototype._deferRedraw=function(){this._redraw()},e.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},e.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),i=0;i<e.length;i++){var o=e[i];!1!==o.autoBind&&this.bindCategoryAxisFromSeries(o,i)}},e.prototype.bindCategoryAxisFromSeries=function(t,e){for(var i,o=this.options.series,r=o.length,n=new ht,s=[],a=!1,p=0;p<r;p++){var h=o[p],l=h.categoryAxis===t.name||!h.categoryAxis&&0===e,c=h.data,u=c.length,f=h.categoryField&&l;if(a=f||a,f&&u>0)for(var d=(i=Vr(t,Gi(h.categoryField,c[0])))?Ir:Gi,g=0;g<u;g++){var y=c[g],v=d(h.categoryField,y,this.chartService.intl);!i&&n.get(v)||(s.push([v,y]),i||n.set(v,!0))}}if(s.length>0){i&&(s=function(t,e){void 0===e&&(e=Ue);for(var i=function(t,e){void 0===e&&(e=Ue);for(var i=1,o=t.length;i<o;i++)if(e(t[i],t[i-1])<0){t.sort(e);break}return t}(t,e),o=i.length,r=o>0?[i[0]]:[],n=1;n<o;n++)0!==e(i[n],kt(r))&&r.push(i[n]);return r}(s,(function(t,e){return Ue(t[0],e[0])})));var m=function(t){for(var e=t.length,i=[],o=0;o<e;o++)for(var r=t[o],n=r.length,s=0;s<n;s++)i[s]=i[s]||[],i[s].push(r[s]);return i}(s);t.categories=m[0]}else a&&(t.categories=[])},e.prototype._isBindable=function(t){for(var e=Ni.current.valueFields(t),i=!0,o=0;o<e.length;o++){var r=e[o];if(r===y?r="field":r+="Field",!xt(t[r])){i=!1;break}}return i},e.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(e.transitions=!1,t=!0),this._redraw(),t&&(e.transitions=!0)},e.prototype._legendItemHover=function(t,e){var i,o=this._plotArea,r=this._highlight,n=(o.srcSeries||o.series)[t];if(i=lt(n.type,[to,"donut","funnel"])?o.findPoint((function(i){return i.series.index===t&&i.index===e})):o.pointsBySeriesIndex(t),this._hasInactiveOpacity()&&n.visible&&i){var s=o.series.length>1,a=i.length?i[0]:i;this._displayInactiveOpacity(a,s,i)}else r.show(i)},e.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},e.prototype.updateMouseMoveHandler=function(){var t,e;Tt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&mt(this.element,((e={}).mousemove=this._mousemove,e))},e.prototype.applyOptions=function(t,e){ha(this._originalOptions,t),this._originalOptions=j(this._originalOptions,t),this.options=j({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},e.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},e.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},e.prototype.setIntlService=function(t){this.chartService.intl=t},e.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},e.prototype.destroy=function(){var t,e;this._destroyed=!0,Tt(this.element,((t={}).contextmenu=this._clickHandler,t[oo]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Tt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},e.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},e.prototype._destroySelections=function(){var t=this._selections;if(t)for(;t.length>0;)t.shift().destroy()},e.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._destroySelections(),this._tooltip&&this._tooltip.destroy(),this._highlight&&this._highlight.destroy(),this._zoomSelection&&(this._zoomSelection.destroy(),delete this._zoomSelection),this._pannable&&(this._pannable.destroy(),delete this._pannable),this._mousewheelZoom&&(this._mousewheelZoom.destroy(),delete this._mousewheelZoom)},e}(S.Class);function na(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function sa(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 aa(t){for(var e={},i=0;i<t.length;i++){var o=t[i],r=o.options.name;r&&(e[r]=o.range())}return e}var pa=["data","categories"];function ha(t,e){for(var i in e)if(!lt(i,pa)&&e.hasOwnProperty(i)){var o=e[i],r=t[i];if(xt(r)){var n=null===o;n||!xt(o)?(delete t[i],n&&delete e[i]):r&&B(o)&&B(r)&&ha(r,o)}}}function la(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}It(ra,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:Qi,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});var ca=ra,ua=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._slotAnchor=function(t,e){var i=this.plotArea.categoryAxis.options.vertical,o=i?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:i?new Zt(this.plotArea.box.x2,e.center().y):new Zt(e.center().x,-2),align:o}},e.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},e}(Nn),fa=[$i,"bullet"];function da(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[i]=o.style.display,o.style.display="none"}return e}function ga(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function ya(t){return P(t)?[t]:t}var va=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._setElementClass=function(t){_(t,"k-sparkline")},e.prototype._initElement=function(e){t.prototype._initElement.call(this,e),this._initialWidth=Math.floor(wt(e).width)},e.prototype._resize=function(){var e=this.element,i=da(e.childNodes);this._initialWidth=Math.floor(wt(e).width),ga(e.childNodes,i),t.prototype._resize.call(this)},e.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=da(e.childNodes),o=document.createElement("span");o.innerHTML=" ",e.appendChild(o);var r=j({width:this._autoWidth,height:wt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return wt(e,{width:r.width,height:r.height}),e.removeChild(o),ga(e.childNodes,i),this.surface&&this.surface.resize(),r},e.prototype._surfaceWrap=function(){if(!this.stage){var t=this.stage=document.createElement("span");this.element.appendChild(t)}return this.stage},e.prototype._createPlotArea=function(e){var i=t.prototype._createPlotArea.call(this,e);return this._autoWidth=this._initialWidth||this._calculateWidth(i),i},e.prototype._calculateWidth=function(t){for(var e=this.options,i=z(e.chartArea.margin),o=t.charts,r=this._surfaceWrap(),n=0,s=0;s<o.length;s++){var a=o[s],p=(a.options.series||[])[0];if(p){if(p.type===$i)return 150;if("bullet"===p.type)return 150;if(p.type===to)return wt(r).height;var h=a.categoryAxis;if(h){var l=h.categoriesCount()*(!a.options.isStacked&<(p.type,[Qi,"verticalBullet"])?a.seriesOptions.length:1);n=Math.max(n,l)}}}var c=n*e.pointWidth;return c>0&&(c+=i.left+i.right),c},e.prototype._createSharedTooltip=function(t){return new ua(this._plotArea,t)},e.normalizeOptions=function(t){var e=ya(t);return(e=b(e)?{seriesDefaults:{data:e}}:j({},e)).series||(e.series=[{data:ya(e.data)}]),j(e,{seriesDefaults:{type:e.type}}),(lt(e.series[0].type,fa)||lt(e.seriesDefaults.type,fa))&&(e=j({},{categoryAxis:{crosshair:{visible:!1}}},e)),e},e}(ca);It(va,{chartArea:{margin:2},axisDefaults:{visible:!1,majorGridLines:{visible:!1},valueAxis:{narrowRange:!0}},seriesDefaults:{type:"line",area:{line:{width:.5}},bar:{stack:!0},padding:2,width:.5,overlay:{gradient:null},highlight:{visible:!1},border:{width:0},markers:{size:2,visible:!1}},tooltip:{visible:!0,shared:!0},categoryAxis:{crosshair:{visible:!0,tooltip:{visible:!1}}},legend:{visible:!1},transitions:!1,pointWidth:5,panes:[{clip:!1}]});var ma=va,xa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this._initialOpacity=parseFloat(E(this.element,"opacity").opacity)},e.prototype.step=function(t){E(this.element,{opacity:String(ct(this._initialOpacity,0,t))})},e.prototype.abort=function(){t.prototype.abort.call(this),E(this.element,{display:"none",opacity:String(this._initialOpacity)})},e.prototype.cancel=function(){t.prototype.abort.call(this),E(this.element,{opacity:String(this._initialOpacity)})},e}(S.drawing.Animation);function ba(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}var _a=function(t){function e(e,i,o){t.call(this),this.options=j({},this.options,o),this.container=e,this.chartService=i;var r=E(e,["paddingLeft","paddingTop"]);this.chartPadding={top:r.paddingTop,left:r.paddingLeft},this.createElements(),e.appendChild(this.element)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createElements=function(){var t=this.element=ba("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=ba("k-tooltip k-chart-tooltip"),i=this.scroll=ba("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(i)},e.prototype.show=function(t,e,i){var o=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=Le(He(t)+He(e-t)/2),p=.4*i.width(),h=i.center().x-p,l=(i.center().x-h)/(r.max-r.min),c=a-r.min,u=this.chartService.intl.format(r.format,t,e),f=it(r);this.clearHideTimeout(),this._visible||(E(o,{visibility:"hidden",display:"block"}),this._visible=!0),f&&(u=f({from:t,to:e})),s.innerHTML=u,E(s,{left:i.center().x-s.offsetWidth/2,top:i.y1});var d=E(s,["marginTop","borderTopWidth","height"]);E(n,{width:p,left:h+c*l,top:i.y1+d.marginTop+d.borderTopWidth+d.height/2}),E(o,{visibility:"visible"})},e.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},e.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout((function(){t._visible=!1,t._hideAnimation=new xa(t.element),t._hideAnimation.setup(),t._hideAnimation.play()}),this.options.hideDelay)},e.prototype.destroy=function(){this.clearHideTimeout(),this.container&&this.container.removeChild(this.element),delete this.container,delete this.chartService,delete this.element,delete this.tooltip,delete this.scroll},e}(S.Class);It(_a,{format:"{0:d} - {1:d}",hideDelay:500});var wa=_a,Aa="_navigator",Sa=Aa;function ka(){}var Ca=function(t){function e(e){var i;t.call(this),this.chart=e;var o=this.options=j({},this.options,e.options.navigator),r=o.select;r&&(r.from=this.parseDate(r.from),r.to=this.parseDate(r.to)),xt(o.hint.visible)||(o.hint.visible=o.visible),this.chartObserver=new ft(this,((i={}).drag="_drag",i.dragEnd="_dragEnd",i.zoom="_zoom",i.zoomEnd="_zoomEnd",i)),e.addObserver(this.chartObserver)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parseDate=function(t){return Ye(this.chart.chartService.intl,t)},e.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},e.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},e.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},e.prototype.initSelection=function(){var t,e=this.chart,i=this.options,o=this.mainAxis(),r=o.roundedRange(),n=r.min,s=r.max,a=i.select,p=a.from,h=a.to,l=a.mousewheel,c=(t=o,ka.prototype=t,new ka);0!==o.categoriesCount()&&(this.clean(),c.box=o.box,this.selection=new Un(e,c,{min:n,max:s,from:p||n,to:h||s,mousewheel:Rt(l,{zoom:"left"}),visible:i.visible},new ft(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),i.hint.visible&&(this.hint=new wa(e.element,e.chartService,{min:n,max:s,template:it(i.hint),format:i.hint.format})))},e.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Sa].roundedRange(),e=t.min,i=t.max,o=this.options.select||{},r=o.from||e;r<e&&(r=e);var n=o.to||i;n>i&&(n=i),this.options.select=j({},o,{from:r,to:n}),this.filterAxes()},e.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(kt(e.panes),t)},e.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,i=e.panes.slice(0,-1);e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(i)},e.prototype._drag=function(t){var e,i=this.chart,o=this.selection,r=i._eventCoordinates(t.originalEvent),n=this.mainAxis(),s=n.roundedRange(),a=n.pane.box.containsPoint(r),p=i._plotArea.categoryAxis,h=t.axisRanges[p.options.name],l=this.options.select;if(h&&!a&&o){e=l.from&&l.to?He(l.to)-He(l.from):He(o.options.to)-He(o.options.from);var c=Le(Ct(He(h.min),s.min,He(s.max)-e)),u=Le(Ct(He(c)+e,He(s.min)+e,s.max));this.options.select={from:c,to:u},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(c,u),this.showHint(c,u)}},e.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},e.prototype.readSelection=function(){var t=this.selection.options,e=t.from,i=t.to,o=this.options.select;o.from=e,o.to=i},e.prototype.filterAxes=function(){var t=this.options.select;void 0===t&&(t={});for(var e=this.chart.options.categoryAxis,i=t.from,o=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==Aa&&(n.min=i,n.max=o)}},e.prototype.filter=function(){var t=this.chart,e=this.options.select;if(t.requiresHandlers(["navigatorFilter"])){var i=this.mainAxis(),o={from:e.from,to:e.to};if("category"!==i.options.type){var r=new ai(j({baseUnit:"fit"},t.options.categoryAxis[0],{categories:[e.from,e.to]}),t.chartService).options;o.from=ze(r.min,-r.baseUnitStep,r.baseUnit),o.to=ze(r.max,r.baseUnitStep,r.baseUnit)}this.chart.trigger("navigatorFilter",o)}},e.prototype._zoom=function(t){var e=this.chart._plotArea.categoryAxis,i=this.selection,o=this.options,r=o.select,n=o.liveDrag,s=this.mainAxis(),a=t.delta;if(i){var p=s.categoryIndex(i.options.from),h=s.categoryIndex(i.options.to);t.originalEvent.preventDefault(),Math.abs(a)>1&&(a*=3),h-p>1?(i.expand(a),this.readSelection()):(e.options.min=r.from,r.from=e.scaleRange(-t.delta).min),n&&(this.filterAxes(),this.redrawSlaves()),i.set(r.from,r.to),this.showHint(this.options.select.from,this.options.select.to)}},e.prototype._zoomEnd=function(t){this._dragEnd(t)},e.prototype.showHint=function(t,e){var i=this.chart._plotArea;this.hint&&this.hint.show(t,e,i.backgroundBox())},e.prototype._selectStart=function(t){return this.chart._selectStart(t)},e.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},e.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},e.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Sa]},e.prototype.select=function(t,e){var i=this.options.select;return t&&e&&(i.from=this.parseDate(t),i.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:i.from,to:i.to}},e.setup=function(t,i){if(void 0===t&&(t={}),void 0===i&&(i={}),!t.__navi){t.__navi=!0;var o=j({},i.navigator,t.navigator),r=t.panes=[].concat(t.panes),n=j({},o.pane,{name:Aa});o.visible||(n.visible=!1,n.height=.1),r.push(n),e.attachAxes(t,o),e.attachSeries(t,o,i)}},e.attachAxes=function(t,e){var i=e.series||[],o=t.categoryAxis=[].concat(t.categoryAxis),r=t.valueAxis=[].concat(t.valueAxis),n=0===Br(i,io).length,s=j({type:"date",pane:Aa,roundToBaseUnit:!n,justified:n,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),a=e.categoryAxis;o.push(j({},s,{maxDateGroups:200},a,{name:Sa,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),j({},s,a,{name:Sa+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),j({},s,a,{name:Sa+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(j({name:Sa,pane:Aa,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},e.attachSeries=function(t,e,i){for(var o=t.series=t.series||[],r=[].concat(e.series||[]),n=i.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)o.push(j({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:Sa,categoryAxis:Sa,autoBind:e.autoBindElements}))},e}(S.Class),Pa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.applyDefaults=function(e,i){var o=wt(this.element).width||600,r=i,n={seriesDefaults:{categoryField:e.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(o/28)}}};r&&(r=j({},r,n)),Ca.setup(e,r),t.prototype.applyDefaults.call(this,e,r)},e.prototype._setElementClass=function(t){_(t,"k-chart k-stockchart")},e.prototype.setOptions=function(e){this.destroyNavigator(),t.prototype.setOptions.call(this,e)},e.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},e.prototype._resize=function(){this.noTransitionsRedraw()},e.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},e.prototype._dirty=function(){var t=this.options,e=st([].concat(t.series,t.navigator.series),(function(t){return t&&t.visible})).length,i=this._seriesCount!==e;return this._seriesCount=e,i},e.prototype._fullRedraw=function(){var e=this.navigator;e||(e=this.navigator=new Ca(this),this.trigger("navigatorCreated",{navigator:e})),e.clean(),e.setRange(),t.prototype._redraw.call(this),e.initSelection()},e.prototype._trackSharedTooltip=function(e){var i=this._plotArea.paneByPoint(e);i&&i.options.name===Aa?this._unsetActivePoint():t.prototype._trackSharedTooltip.call(this,e)},e.prototype.bindCategories=function(){t.prototype.bindCategories.call(this),this.copyNavigatorCategories()},e.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),i=0;i<e.length;i++){var o=e[i];o.name===Sa?t=o.categories:t&&o.pane===Aa&&(o.categories=t)}},e.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},e.prototype.destroy=function(){this.destroyNavigator(),t.prototype.destroy.call(this)},e.prototype._stopChartHandlers=function(e){var i=this._eventCoordinates(e),o=this._plotArea.paneByPoint(i);return t.prototype._stopChartHandlers.call(this,e)||o&&o.options.name===Aa},e.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e}(ca);It(Pa,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!0},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});var Ma=Pa,Oa=Math.PI/180;function Ta(t,e){var i=t.getOrigin(),o=t.getSize(),r=z(e);return t.setOrigin([i.x-r.left,i.y-r.top]),t.setSize([o.width+(r.left+r.right),o.height+(r.top+r.bottom)]),t}var Ra=S.drawing.Group,ja=S.drawing.Path,Ba=S.drawing.Text;function Ia(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",s=ja.fromRect(new S.geometry.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),a=new Ba(t.text,new S.geometry.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),p=Ta(a.bbox().clone(),e.padding),h=ja.fromRect(p,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),l=new Ra;return l.append(s),l.append(h),l.append(a),l}function Va(t,e,i){var o=xt(t.from)?t.from:f,r=xt(t.to)?t.to:u;return t.from=Math.max(Math.min(r,o),e),t.to=Math.min(Math.max(r,o),i),t}function La(t,e){var i=z(e);return i.left=-i.left,i.top=-i.top,i.right=-i.right,i.bottom=-i.bottom,Ta(t,i)}var Ea=S.drawing.Path,za=S.drawing.Surface,Da=function(t){function e(e,i,o,r){void 0===r&&(r={}),t.call(this),this.element=e,this.theme=o,this.contextService=new K(this,r),this._originalOptions=j({},this.options,i),this.options=j({},this._originalOptions),this._initTheme(o),this.redraw()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},e.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},e.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},e.prototype.exportVisual=function(){return this._visuals},e.prototype.allValues=function(t){var e=this.pointers,i=[];if(0===arguments.length){for(var o=0;o<e.length;o++)i.push(e[o].value());return i}if(b(t))for(var r=0;r<t.length;r++)P(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},e.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),i=[].concat(t),o=0;o<i.length;o++)e[o].value=i[o]},e.prototype.resize=function(){this.noTransitionsRedraw()},e.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},e.prototype.redraw=function(){var t=this._surfaceSize(),e=new S.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();var i=La(e.bbox(),this._gaugeAreaMargin);this.reflow(i)},e.prototype.setOptions=function(t,e){this._originalOptions=j(this._originalOptions,t),this.options=j({},this._originalOptions),this._initTheme(e),this.redraw()},e.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},e.prototype.setIntlService=function(t){this.contextService.intl=t},e.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=j({},e,this.options);var i=this.options,o=i.pointer;if(b(o)){for(var r=[],n=0;n<o.length;n++)r.push(j({},e.pointer,o[n]));i.pointer=r}},e.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),i=t.border||{},o=new S.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,i.width>0&&(o=La(o,i.width)),Ea.fromRect(o,{stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},e.prototype._initSurface=function(){var t=this.options,e=this.surface,i=this._surfaceElement(),o=this._surfaceSize();wt(i,o),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=za.create(i,{type:t.renderAs}))},e.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&j(e,t.gaugeArea),e},e.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},e.prototype.getSize=function(){return this._getSize()},e.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),i=t.offsetWidth,o=t.offsetHeight;return i||(i=e.width),o||(o=e.height),{width:i,height:o}},e.prototype._defaultSize=function(){return{width:200,height:200}},e.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},e}(S.Class);It(Da,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var Fa=Da,Ua=S.drawing.Path,Ga=S.drawing.Group,Ha=S.geometry.Point;function Na(t,e){var i,o,r=t.position,n=t.tickX,s=t.tickY;return t.vertical?(i=new Ha(n,r),o=new Ha(n+e.size,r)):(i=new Ha(r,s),o=new Ha(r,s+e.size)),new Ua({stroke:{color:e.color,width:e.width}}).moveTo(i).lineTo(o)}function Wa(t,e,i,o){var r=e.length;if(o.visible)for(var n=i.mirror,s=i.lineBox,a=o.skip;a<r;a+=o.step)a%o.skipUnit!=0&&(i.tickX=n?s.x2:s.x2-o.size,i.tickY=n?s.y1-o.size:s.y1,i.position=e[a],t.append(Na(i,o)))}var qa=function(t){function e(e,i){var o=e||{};!xt(o.reverse)&&!1===o.vertical&&(i||{}).rtl&&(o=Object.assign({},o,{reverse:!0})),t.call(this,0,1,o,i),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=j({},this.options,t);return(e=j({},e,{labels:{mirror:e.mirror}})).majorUnit=e.majorUnit||Yt(e.min,e.max),e},e.prototype.initFields=function(){},e.prototype.render=function(){var t=this.elements=new Ga,e=this.renderLabels(),i=this.renderLine(),o=this.renderTicks(),r=this.renderRanges();return t.append(i,e,o,r),t},e.prototype.renderRanges=function(){for(var t=this.options,e=t.min,i=t.max,o=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new Ga,a=n.length,p=t.rangeSize||t.minorTicks.size/2,h=0;h<a;h++){var l=Va(n[h],e,i),c=this.getSlot(l.from,l.to),u=o?this.lineBox():c,f=o?c:this.lineBox();o?u.x1-=p*(r?-1:1):f.y2+=p*(r?-1:1),s.append(Ua.fromRect(new S.geometry.Rect([u.x1,f.y1],[u.x2-u.x1,f.y2-f.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},e.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,i=new Ga,o=0;o<t.length;o++)i.append(Ia(t[o],e.labels));return i},e.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new Ga;if(t.width>0&&t.visible){var o=new Ua({stroke:{color:t.color,dashType:t.dashType,width:t.width}});o.moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),i.append(o)}return i},e.prototype.renderTicks=function(){var t=new Ga,e=this.options,i=e.majorTicks.visible?e.majorUnit:0,o={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return Wa(t,this.getMajorTickPositions(),o,e.majorTicks),Wa(t,this.getMinorTickPositions(),o,j({},{skipUnit:i/e.minorUnit},e.minorTicks)),t},e}(di);It(qa,{min:0,max:50,majorTicks:{size:15,align:"inside",color:n,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:n,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var Xa=qa,Ya=function(t){function e(e,i){t.call(this);var o=e.options,r=o.min,n=o.max,s=this.options=j({},this.options,i);s.fill=s.color,this.scale=e,xt(s.value)?s.value=Ct(s.value,r,n):s.value=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.value=function(t){var e=this.options,i=e.value;if(0===arguments.length)return i;var o=this.scale.options,r=o.min,n=o.max;e._oldValue=xt(e._oldValue)?e.value:r,e.value=Ct(t,r,n),this.elements&&this.repaint()},e}(S.Class);It(Ya,{color:n});var Za=Ya,Ka=function(t){function e(e,i){t.call(this,e,i),this.options=j({track:{visible:xt(i.track)}},this.options)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(){var t,e,i,o=this.options,r=this.scale,n=r.options,s=n.mirror,a=n.vertical,p=r.lineBox(),h=o.track.size||o.size,l=o.size/2,c=z(o.margin),u=a?c[s?"left":"right"]:c[s?"bottom":"top"];u=s?-u:u,a?(i=new $t(p.x1+u,p.y1,p.x1+u,p.y2),s?i.x1-=h:i.x2+=h,"barPointer"!==o.shape&&(t=e=new $t(p.x2+u,p.y1-l,p.x2+u,p.y2+l))):(i=new $t(p.x1,p.y1-u,p.x2,p.y1-u),s?i.y2+=h:i.y1-=h,"barPointer"!==o.shape&&(t=e=new $t(p.x1-l,p.y1-u,p.x2+l,p.y1-u))),this.trackBox=i,this.pointerRangeBox=e,this.box=t||i.clone().pad(o.border.width)},e.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:xt(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},e.prototype._margin=function(){var t=this.scale,e=this.options,i=t.options,o=i.mirror,r=i.vertical,n=z(e.margin);return r?n[o?"left":"right"]:n[o?"bottom":"top"]},e}(Za);It(Ka,{shape:"barPointer",track:{border:{width:1}},color:n,border:{width:1},opacity:1,margin:z(3),animation:{type:"barPointer"},visible:!0});var $a=Ka,Qa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.options,e=t.margin,i=t.from,o=t.to,r=t.vertical,n=r?"x1":"y1";t.mirror===r?(i[n]-=e,o[n]-=e):(i[n]+=e,o[n]+=e);var s=this.fromScale=new S.geometry.Point(i.x1,i.y1),a=this.toScale=new S.geometry.Point(o.x1,o.y1);0!==t.duration&&(t.duration=Math.max(s.distanceTo(a)/t.duration*1e3,1))},e.prototype.step=function(t){var e=ct(this.fromScale.x,this.toScale.x,t),i=ct(this.fromScale.y,this.toScale.y,t);this.element.transform(S.geometry.transform().translate(e,i))},e}(S.drawing.Animation);It(Qa,{easing:"linear",duration:250}),S.drawing.AnimationFactory.current.register("arrowPointer",Qa);var Ja=Qa,tp=S.geometry.Point,ep=S.drawing.Path,ip=function(t){function e(e,i){t.call(this,e,i),xt(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointerShape=function(){var t=this.scale,e=this.options.size,i=e/2,o=t.options.mirror?-1:1;return t.options.vertical?[new tp(0,0-i),new tp(0-o*e,0),new tp(0,0+i)]:[new tp(0-i,0),new tp(0,0+o*e),new tp(0+i,0)]},e.prototype.repaint=function(){var t=this.scale,e=this.options,i=new Ja(this.elements,j(e.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:this._margin(e.margin),from:t.getSlot(e._oldValue),to:t.getSlot(e.value)}));!1===e.animation.transitions&&(i.options.duration=0),i.setup(),i.play()},e.prototype.render=function(){var t=this.scale,e=this.options,i=this.getElementOptions(),o=this.pointerShape(e.value);e.animation.type="arrowPointer";var r=new ep({stroke:i.stroke,fill:i.fill}).moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).close(),n=t.getSlot(e.value);return r.transform(S.geometry.transform().translate(n.x1,n.y1)),this.elements=r,r},e}($a),op=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?x:m,i=this.to=t.newPoints[0][e],o=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(i-o)/t.speed*1e3,1)),this._set(o)},e.prototype.step=function(t){var e=ct(this.from,this.to,t);this._set(e)},e.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),i=this.options.newPoints;i[0][e](t),i[1][e](t)},e}(S.drawing.Animation);It(op,{easing:"linear",speed:250}),S.drawing.AnimationFactory.current.register("barPointer",op);var rp=op,np=S.drawing.Group,sp=S.drawing.Path,ap=function(t){function e(e,i){t.call(this,e,i),xt(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointerShape=function(t){var e=this.scale,i=this.options,o=e.options,r=o.mirror,n=o.vertical,s=r===n?-1:1,a=i.size*s,p=e.getSlot(e.options.min),h=e.getSlot(t),l=n?x:m,c=n?m:x,u=this._margin()*s,f=new S.geometry.Point;f[l]=p[l+"1"],f[c]=p[c+"1"];var d=new S.geometry.Point;d[l]=h[l+"1"],d[c]=h[c+"1"],n?(f.translate(u,0),d.translate(u,0)):(f.translate(0,u),d.translate(0,u));var g=d.clone(),y=f.clone();return n?(g.translate(a,0),y.translate(a,0)):(g.translate(0,a),y.translate(0,a)),[f,d,g,y]},e.prototype.repaint=function(){var t=this.scale,e=this.options,i=this.pointerShape(e.value),o=this.pointerPath,r=this.pointerShape(e._oldValue);o.moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).lineTo(i[3]).close();var n=new rp(o,j(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[i[1],i[2]]}));!1===e.animation.transitions&&(n.options.duration=0),n.setup(),n.play()},e.prototype.render=function(){var t=new np,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());var i=this.pointerPath=new sp({stroke:e.stroke,fill:e.fill});return t.append(i),this.elements=t,t},e.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},i=this.trackBox.clone().pad(e.width||0);return new sp.fromRect(i.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},e}($a),pp=S.drawing.Group,hp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.pointers,i=t.origin.x,o=t.origin.y,r=new $t(i,o,i+t.width(),o+t.height());this.scale.reflow(r),this._shrinkScaleWidth(r);for(var n=0;n<e.length;n++)e[n].reflow();this.bbox=this._getBox(r),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},e.prototype._buildVisual=function(){var t=new pp,e=this.scale.render(),i=this.pointers;t.append(this.gaugeArea),t.append(e);for(var o=0;o<i.length;o++){var r=i[o];t.append(r.render()),r.value(r.options.value)}this._visuals=t},e.prototype._createModel=function(){var t=this.options,e=this.scale=new Xa(t.scale,this.contextService);this.pointers=[];var i=t.pointer;i=b(i)?i:[i];for(var o=0;o<i.length;o++){var r=j({},i[o],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?ip:ap;this.pointers.push(new n(e,r))}},e.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},e.prototype._getBox=function(t){for(var e,i=this.scale,o=this.pointers,r=t.center(),n=o[0].box.clone().wrap(i.box),s=0;s<o.length;s++)n.wrap(o[s].box.clone());return i.options.vertical?(e=n.width()/2,n=new $t(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,n=new $t(t.x1,r.y-e,t.x2,r.y+e)),n},e.prototype._alignElements=function(){for(var t,e=this.scale,i=this.pointers,o=e.box,r=i[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<i.length;s++)r.wrap(i[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new $t(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new $t(o.x1,o.y1+t,o.x2,o.y2+t)));for(var a=0;a<i.length;a++)i[a].reflow(this.bbox)},e.prototype._shrinkScaleWidth=function(t){var e=this.scale;if(!e.options.vertical){var i=e.contentBox().width()-t.width();i>0&&(e.box.shrink(i,0),e.box.alignTo(t,"center"),e.reflow(e.box))}},e.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,i=t.box.clone(),o=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());i[o+1]+=Math.max(i[o+1]-r[o+1],0),i[o+2]-=Math.max(r[o+2]-i[o+2],0),t.reflow(i);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},e}(Fa);It(hp,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var lp=hp,cp=S.drawing.Arc,up=S.drawing.Path,fp=S.drawing.Group;function dp(t,e,i,o){var r=new fp,n=t.center,s=t.getRadiusX();if(o.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),h=new S.geometry.Point(n.x+s-o.size,n.y).rotate(e[a],n);r.append(new up({stroke:{color:o.color,width:o.width}}).moveTo(p).lineTo(h))}return r}function gp(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}var yp=function(t){function e(e,i){t.call(this,0,1,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=j({},this.options,t);return e.majorUnit=e.majorUnit||Yt(e.min,e.max),e.minorUnit=e.minorUnit||e.majorUnit/10,e},e.prototype.initFields=function(){},e.prototype.render=function(t,e){var i=this.renderArc(t,e);this.bbox=i.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},e.prototype.reflow=function(t){var e=t.center(),i=Math.min(t.height(),t.width())/2;if(!xt(this.bbox))return this.render(e,i);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},e.prototype.slotAngle=function(t){var e=this.options,i=e.min,o=e.max,r=e.reverse,n=e.startAngle,s=e.endAngle,a=s-n;return(r?s-(t-i)/(o-i)*a:(t-i)/(o-i)*a+n)+180},e.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},e.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,i=t.minorTicks,o=0;return e.visible&&(o=e.size),i.visible&&(o=Math.max(i.size,o)),o},e.prototype.labelsCount=function(){var e=t.prototype.labelsCount.call(this),i=this.options;return i.endAngle-i.startAngle>=360&&i.max%i.majorUnit==0&&(e-=1),e},e.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),i=e.getRadiusX(),o=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*i,n=new fp,s=.05*i;xt(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,p="inside"===a.position,h=xt(this.labelElements);p&&(i-=this.ticksSize(),this.hasRanges()&&!h&&(i-=r+s),e.setRadiusX(i).setRadiusY(i));for(var l=this.labels,c=l.length,u=z(a.padding),f=(u.left+u.right)/2,d=(u.top+u.bottom)/2,g=0;g<c;g++){var y=l[g],v=y.box.width()/2,m=y.box.height()/2,x=o[g],b=(x-180)*Oa,_=e.pointAt(x),w=_.x+Math.cos(b)*(v+f)*(p?1:-1),A=_.y+Math.sin(b)*(m+d)*(p?1:-1);y.reflow(new $t(w-v,A-m,w+v,A+m));var k=new S.geometry.Point(y.box.x1,y.box.y1),C=void 0;if(h){var P=(C=this.labelElements.children[g]).bbox().origin,M=C.transform()||S.geometry.transform();M.translate(k.x-P.x,k.y-P.y),C.transform(M)}else C=Ia(y,t.labels),n.append(C);this.bbox=S.geometry.Rect.union(this.bbox,C.bbox())}return n},e.prototype.repositionRanges=function(){var t=this.ranges.children;if(t.length>0){var e=this.options,i=e.rangeDistance,o=e.rangeSize,r=this.getRangeRadius();"inside"===this.options.labels.position&&(r+=o+i);for(var n=r+o/2,s=0;s<t.length;s++)t[s]._geometry.setRadiusX(n).setRadiusY(n);this.bbox=S.geometry.Rect.union(this.bbox,this.ranges.bbox())}},e.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new fp;if(e){var o=this.options,r=o.rangeSize,n=o.reverse,s=o.rangeDistance,a=this.getRangeRadius();this.radius(this.radius()-r-s);for(var p=0;p<e;p++){var h=t[p],l=this.slotAngle(h[n?"to":"from"]),c=this.slotAngle(h[n?"from":"to"]);c-l!=0&&i.append(this.createRange(l,c,a,h))}}return i},e.prototype.createRange=function(t,e,i,o){var r=this.options.rangeSize,n=new S.geometry.Arc(this.arc.center,{radiusX:i+r/2,radiusY:i+r/2,startAngle:t,endAngle:e});return new cp(n,{stroke:{width:r,color:o.color,opacity:o.opacity,lineCap:o.lineCap}})},e.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],i=e.length,o=[];if(i){var r=t.min,n=t.max,s=t.rangePlaceholderColor;o.push(gp(r,n,s));for(var a=0;a<i;a++)for(var p=Va(e[a],r,n),h=o.length,l=0;l<h;l++){var c=o[l];if(c.from<=p.from&&p.from<=c.to){o.push(gp(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&o.push(gp(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return o},e.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,i=e.rangeSize,o=e.rangeDistance,r=e.majorTicks.size;return"outside"===e.labels.position?t.getRadiusX()-r-o-i:t.getRadiusX()-i},e.prototype.renderArc=function(t,e){var i=this.options;return this.arc=new S.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:i.startAngle+180,endAngle:i.endAngle+180})},e.prototype.renderTicks=function(){var t=this.arc,e=this.options,i=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=dp(i,this.majorTickAngles,e.majorUnit,e.majorTicks);var o=new fp;o.append(this.majorTicks);var r=e.majorTicks.size,n=e.minorTicks.size;if(this._tickDifference=r-n,"outside"===e.labels.position){var s=i.getRadiusX();i.setRadiusX(s-r+n).setRadiusY(s-r+n)}return this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=dp(i,this.minorTickAngles,e.minorUnit,e.minorTicks),o.append(this.minorTicks),o},e.prototype.normalizeTickAngles=function(t){for(var e=this.options,i=e.majorUnit/e.minorUnit,o=t.length-1;o>=0;o--)o%i==0&&t.splice(o,1);return t},e.prototype.tickAngles=function(t,e){var i=this.options,o=i.reverse,r=i.max-i.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,p=n/s;o&&(a+=n,p=-p),n>=360&&i.max%e==0&&(s-=1);for(var h=[],l=0;l<s;l++)h.push(Ot(a,3)),a+=p;return Ot(a)<=t.endAngle&&h.push(a),h},e.prototype.radius=function(t){if(!t)return this.arc.getRadiusX();this.arc.setRadiusX(t).setRadiusY(t),this.repositionTicks(this.majorTicks.children,this.majorTickAngles),this.repositionTicks(this.minorTicks.children,this.minorTickAngles,!0)},e.prototype.repositionTicks=function(t,e,i){var o=i&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();i&&"outside"===this.options.labels.position&&0!==o&&(r=this.arc.clone()).setRadiusX(n-o).setRadiusY(n-o);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),p=t[s].segments,h=a.x-p[0].anchor().x,l=a.y-p[0].anchor().y;t[s].transform((new S.geometry.transform).translate(h,l))}},e}(di);It(yp,{min:0,max:100,majorTicks:{size:15,align:"inside",color:n,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:n,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var vp=yp,mp=function(t){function e(e,i){t.call(this,e,i);var o=this.options;o.duration=Math.max(Math.abs(o.newAngle-o.oldAngle)/o.duration*1e3,1)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this.options,i=ct(e.oldAngle,e.newAngle,t);this.element.transform(S.geometry.transform().rotate(i,e.center))},e}(S.drawing.Animation);It(mp,{easing:"linear",duration:150}),S.drawing.AnimationFactory.current.register("radialPointer",mp);var xp=mp,bp=S.drawing.Circle,_p=S.drawing.Group,wp=S.drawing.Path,Ap=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setAngle=function(t){this.elements.transform(S.geometry.transform().rotate(t,this.center))},e.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),o=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(o):new xp(this.elements,j(e.animation,{oldAngle:i,newAngle:o})).play()},e.prototype.render=function(){var t=this.scale,e=this.options,i=new _p;return!1!==e.animation&&j(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),i.append(this._renderNeedle(),this._renderCap()),this.elements=i,this.setAngle(Oa),i},e.prototype.reflow=function(t){var e=this.center=t.center,i=Ct(this.options.length||1,.1,1.5),o=this.radius=t.getRadiusX()*i,r=this.capSize=Math.round(o*this.options.cap.size);this.bbox=S.geometry.Rect.fromPoints(new S.geometry.Point(e.x-r,e.y-r),new S.geometry.Point(e.x+r,e.y+r))},e.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,i=this.options.color,o=new wp({fill:{color:i},stroke:{color:i,width:.5}});return o.moveTo(e.x+this.radius-t,e.y).lineTo(e.x,e.y-this.capSize/2).lineTo(e.x,e.y+this.capSize/2).close(),o},e.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,i=new S.geometry.Circle(this.center,this.capSize);return new bp(i,{fill:{color:e},stroke:{color:e}})},e}(Za);It(Ap,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var Sp=Ap,kp=S.drawing.Group,Cp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var i=0;i<e.length;i++)e[i].reflow(this.scale.arc),this._initialPlotArea=S.geometry.Rect.union(this._initialPlotArea,e[i].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},e.prototype._buildVisual=function(t,e,i){var o=this._visuals=new kp;o.append(t),o.append(i.ticks),o.append(i.ranges),this._buildPointers(e),o.append(i.labelElements)},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),this._visuals.append(i.elements),i.value(i.options.value)}},e.prototype.fitScale=function(t){for(var e,i,o,r,n,s=this.scale.arc,a=this._initialPlotArea,p=Math.abs(this.getDiff(a,t)),h=Ot(p,3),l=Ot(-p,3),c=0,u=0;!(!(u++<100)||(c=n===o?c+1:0)>5||h!==r&&0<=(e=this.getPlotBox(h,t,s))&&e<=2||l!==r&&0<=(o=this.getPlotBox(l,t,s))&&o<=2||(r=e>0&&o>0?2*h:e<0&&o<0?2*l:Ot((h+l)/2||1,3),0<=(i=this.getPlotBox(r,t,s))&&i<=2));)n=o,i>0?(l=r,o=i):(h=r,e=i)},e.prototype.getPlotBox=function(t,e,i){var o=this.scale,r=this.pointers,n=i.getRadiusX(),s=i.clone();s.setRadiusX(n+t).setRadiusY(n+t),o.arc=s,o.reflow(e),this.plotBbox=o.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=S.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},e.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},e.prototype.alignScale=function(t){var e=this.plotBbox.center(),i=t.center(),o=e.x-i.x,r=e.y-i.y,n=this.scale,s=this.pointers;n.arc.center.x-=o,n.arc.center.y-=r,n.reflow(t);for(var a=0;a<s.length;a++)s[a].reflow(n.arc),this.plotBbox=S.geometry.Rect.union(n.bbox,s[a].bbox)},e.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new vp(t.scale,this.contextService);this.pointers=[];for(var o=b(e)?e:[e],r=0;r<o.length;r++){var n=new Sp(i,j({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e}(Fa);It(Cp,{transitions:!0,gaugeArea:{background:""}});var Pp=Cp,Mp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},e.prototype.hasRanges=function(){return!0},e.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},e.prototype.addRange=function(t,e,i){var o=this.options.reverse,r=this.slotAngle(o?e:t),n=this.slotAngle(o?t:e),s=this.createRange(r,n,this.getRangeRadius(),i);return this.ranges.append(s),s},e}(vp);It(Mp,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var Op=Mp,Tp=function(t){function e(e,i){t.call(this,e,i);var o=this.options,r=Math.abs(o.newAngle-o.oldAngle)/o.duration*1e3;o.duration=Ct(r,150,800);var n=e.elements.options.get("stroke.color"),s=e.currentColor();n!==s&&(this.startColor=new S.Color(n),this.color=new S.Color(s))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this.options,i=this.startColor,o=this.color,r=ct(e.oldAngle,e.newAngle,t);if(this.element.angle(r),o){var n=Ot(ct(i.r,o.r,t)),s=Ot(ct(i.g,o.g,t)),a=Ot(ct(i.b,o.b,t));this.element.stroke(new S.Color(n,s,a).toHex())}},e}(S.drawing.Animation);It(Tp,{easing:"linear",duration:150}),S.drawing.AnimationFactory.current.register("radialRangePointer",Tp);var Rp=Tp,jp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),o=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(o),this.stroke(this.currentColor())):(this.animation=new Rp(this,j(e.animation,{oldAngle:i,newAngle:o})),this.animation.play())},e.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},e.prototype.stroke=function(t){this.elements.stroke(t)},e.prototype.render=function(){if(!this.elements){var t=this.scale,e=this.options;!1!==e.animation&&j(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),this.elements=t.addRange(t.options.min,this.options.value,{color:this.currentColor(),opacity:e.opacity,lineCap:t.options.rangeLineCap})}},e.prototype.currentColor=function(){var t=this.scale.options,e=t.min,i=t.max,o=this.options,r=o.colors,n=o.color,s=o.value,a=P(s)?s:e;if(r)for(var p=0;p<r.length;p++){var h=r[p],l=h.color,c=h.from;void 0===c&&(c=e);var u=h.to;if(void 0===u&&(u=i),c<=a&&a<=u)return l}return n},e.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e}(Za);It(jp,{animation:{type:"radialRangePointer",duration:150}});var Bp=jp,Ip=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initTheme=function(e){t.prototype._initTheme.call(this,e),this.options.color=this.options.color||(this.theme.pointer||{}).color},e.prototype._createModel=function(){var t=this.options,e=this.scale=new Op(t.scale,this.contextService),i=new Bp(e,j({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[i]},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),i.value(i.options.value)}},e.prototype._setValueOptions=function(t){this.options.value=t},e.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},e.prototype.centerLabelPosition=function(t,e){var i=this.getSize(),o=this.scale.arc.center,r=o.x-t/2,n=o.y-e/2;if(t<i.width){var s=r+t;r=Math.max(r,0),s>i.width&&(r-=s-i.width)}if(e<i.height){var a=this.scale.bbox,p=a.bottomRight().y,h=n+e;n=Math.max(n,a.origin.y),h>p&&(n-=h-p)}return{left:r,top:n}},e}(Pp),Vp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._createModel=function(){var e=this.options.scale;"number"!=typeof e.startAngle&&(e.startAngle=90),e.endAngle=e.startAngle+360,t.prototype._createModel.call(this)},e}(Ip),Lp=function(t){function e(e){t.call(this),this.setOptions(e),this.initProperties()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){},e.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},e.prototype.encode=function(t,e,i){var o=xt(t)?String(t):t;return this.initValue(o,e,i),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},e.prototype.initValue=function(){},e.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},e.prototype.addData=function(){},e.prototype.invalidCharacterError=function(t){throw new Error("Character '"+t+"' is not valid for symbology "+this.name)},e}(S.Class);It(Lp,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Ep=Object.assign,zp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Ep(this,{name:"Code 11",characterMap:["111121","211121","121121","221111","112121","212111","122111","111221","211211","211111","112111"],cCheckSumTotal:10,kCheckSumTotal:9,kCheckSumMinLength:10,checkSumMod:11,DASH_VALUE:10,DASH:"-",START:"112211",STOP:"11221"})},e.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},e.prototype.addCheckSum=function(){var t=this.value,e=t.length,i=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;if(this.checksum=String(i),this.addPattern(this.characterMap[i]),++e>=this.kCheckSumMinLength){var o=(i+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod;this.checksum+=o,this.addPattern(this.characterMap[o])}},e.prototype.getWeightedSum=function(t,e,i){for(var o=0,r=0;r<t.length;r++)o+=this.weightedValue(this.getValue(t.charAt(r)),e,r,i);return o},e.prototype.weightedValue=function(t,e,i,o){return((e-i)%o||o)*t},e.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},e.prototype.addCharacter=function(t){var e=this.getValue(t),i=this.characterMap[e];this.addPattern(i)},e.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e),this.totalUnits+=e},e}(Lp);It(zp,{addCheckSum:!0});var Dp=Object.assign,Fp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Dp(this,{minBaseUnitLength:.7})},e.prototype.addData=function(){var t=this.value;this.addStart();for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.pushCheckSum(),this.addStop(),this.prepareValues()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},e.prototype.addBase=function(){},e}(Lp),Up=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Dp(this,{name:"Code 39",checkSumMod:43,minRatio:2.5,maxRatio:3,gapWidth:1,splitCharacter:"|",patternMappings:{b:"1|",w:"1|",B:"ratio|",W:"ratio|"},characterMap:{0:{pattern:"bwbWBwBwb",value:0},1:{pattern:"BwbWbwbwB",value:1},2:{pattern:"bwBWbwbwB",value:2},3:{pattern:"BwBWbwbwb",value:3},4:{pattern:"bwbWBwbwB",value:4},5:{pattern:"BwbWBwbwb",value:5},6:{pattern:"bwBWBwbwb",value:6},7:{pattern:"bwbWbwBwB",value:7},8:{pattern:"BwbWbwBwb",value:8},9:{pattern:"bwBWbwBwb",value:9},A:{pattern:"BwbwbWbwB",value:10},B:{pattern:"bwBwbWbwB",value:11},C:{pattern:"BwBwbWbwb",value:12},D:{pattern:"bwbwBWbwB",value:13},E:{pattern:"BwbwBWbwb",value:14},F:{pattern:"bwBwBWbwb",value:15},G:{pattern:"bwbwbWBwB",value:16},H:{pattern:"BwbwbWBwb",value:17},I:{pattern:"bwBwbWBwb",value:18},J:{pattern:"bwbwBWBwb",value:19},K:{pattern:"BwbwbwbWB",value:20},L:{pattern:"bwBwbwbWB",value:21},M:{pattern:"BwBwbwbWb",value:22},N:{pattern:"bwbwBwbWB",value:23},O:{pattern:"BwbwBwbWb",value:24},P:{pattern:"bwBwBwbWb",value:25},Q:{pattern:"bwbwbwBWB",value:26},R:{pattern:"BwbwbwBWb",value:27},S:{pattern:"bwBwbwBWb",value:28},T:{pattern:"bwbwBwBWb",value:29},U:{pattern:"BWbwbwbwB",value:30},V:{pattern:"bWBwbwbwB",value:31},W:{pattern:"BWBwbwbwb",value:32},X:{pattern:"bWbwBwbwB",value:33},Y:{pattern:"BWbwBwbwb",value:34},Z:{pattern:"bWBwBwbwb",value:35},"-":{pattern:"bWbwbwBwB",value:36},".":{pattern:"BWbwbwBwb",value:37}," ":{pattern:"bWBwbwBwb",value:38},$:{pattern:"bWbWbWbwb",value:39},"/":{pattern:"bWbWbwbWb",value:40},"+":{pattern:"bWbwbWbWb",value:41},"%":{pattern:"bwbWbWbWb",value:42},START:{pattern:"bWbwBwBwb"}}})},e.prototype.initValue=function(t,e,i){this.width=e,this.height=i,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},e.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,i=this.minRatio,o=Math.max(.15*this.width,24),r=this.maxRatio;if(this.height<o)throw new Error("Insufficient Height. The minimum height for value: "+this.value+" is: "+o);for(t=this.getBaseUnit(r);t<e&&r>i;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e){var n=Math.ceil(this.getBaseWidth(i)*e);throw new Error("Insufficient width. The minimum width for value: "+this.value+" is: "+n)}this.ratio=r,this.baseUnit=t,this.patternString=this.patternString.substring(0,this.patternString.length-1),this.pattern=this.pattern.concat(this.patternString.replace(/ratio/g,r).split(this.splitCharacter))},e.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},e.prototype.getBaseWidth=function(t){var e=3*(t+2);return this.quietZoneLength+e*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},e.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},e.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},e.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},e.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},e.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},e}(Fp);It(Up,{addCheckSum:!1});var Gp={addCharacter:function(t){this.characterMap[t]?this.addBase(this.characterMap[t]):t.charCodeAt(0)>127?this.invalidCharacterError(t):this.addExtended(t.charCodeAt(0))},addExtended:function(t){for(var e,i=0;i<this.extendedMappings.length;i++)if(e=this.extendedMappings[i].call(this,t)){for(var o=0;o<e.length;o++){var r=e[o];this.addBase(r)}return void(this.dataLength+=e.length-1)}},extendedMappings:[function(t){if(97<=t&&t<=122)return[this.characterMap[this.shiftCharacters[0]],this.characterMap[String.fromCharCode(t-32)]]},function(t){if(33<=t&&t<=58)return[this.characterMap[this.shiftCharacters[1]],this.characterMap[String.fromCharCode(t+32)]]},function(t){if(1<=t&&t<=26)return[this.characterMap[this.shiftCharacters[2]],this.characterMap[String.fromCharCode(t+64)]]},function(t){var e,i;if(this.specialAsciiCodes[t]){e=[];for(var o=0;o<this.specialAsciiCodes[t].length;o++)e.push(this.characterMap[this.shiftCharacters[3]]),e.push(this.characterMap[this.specialAsciiCodes[t][o]])}else i=6*Math.floor(t/32)+(t-27)%32+64,e=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(i)]];return e}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]},Hp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),j(this,Gp,{name:"Code 39 extended",characterMap:{SHIFT0:{pattern:"bWbwbWbWb",value:41},SHIFT1:{pattern:"bWbWbwbWb",value:40},SHIFT2:{pattern:"bWbWbWbwb",value:39},SHIFT3:{pattern:"bwbWbWbWb",value:42}}})},e}(Up),Np=Object.assign,Wp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Np(this,{name:"Code 93",cCheckSumTotal:20,kCheckSumTotal:15,checkSumMod:47,characterMap:{0:{pattern:"131112",value:0},1:{pattern:"111213",value:1},2:{pattern:"111312",value:2},3:{pattern:"111411",value:3},4:{pattern:"121113",value:4},5:{pattern:"121212",value:5},6:{pattern:"121311",value:6},7:{pattern:"111114",value:7},8:{pattern:"131211",value:8},9:{pattern:"141111",value:9},A:{pattern:"211113",value:10},B:{pattern:"211212",value:11},C:{pattern:"211311",value:12},D:{pattern:"221112",value:13},E:{pattern:"221211",value:14},F:{pattern:"231111",value:15},G:{pattern:"112113",value:16},H:{pattern:"112212",value:17},I:{pattern:"112311",value:18},J:{pattern:"122112",value:19},K:{pattern:"132111",value:20},L:{pattern:"111123",value:21},M:{pattern:"111222",value:22},N:{pattern:"111321",value:23},O:{pattern:"121122",value:24},P:{pattern:"131121",value:25},Q:{pattern:"212112",value:26},R:{pattern:"212211",value:27},S:{pattern:"211122",value:28},T:{pattern:"211221",value:29},U:{pattern:"221121",value:30},V:{pattern:"222111",value:31},W:{pattern:"112122",value:32},X:{pattern:"112221",value:33},Y:{pattern:"122121",value:34},Z:{pattern:"123111",value:35},"-":{pattern:"121131",value:36},".":{pattern:"311112",value:37}," ":{pattern:"311211",value:38},$:{pattern:"321111",value:39},"/":{pattern:"112131",value:40},"+":{pattern:"113121",value:41},"%":{pattern:"211131",value:42},SHIFT0:{pattern:"122211",value:46},SHIFT1:{pattern:"311121",value:45},SHIFT2:{pattern:"121221",value:43},SHIFT3:{pattern:"312111",value:44},START:{pattern:"111141"},TERMINATION_BAR:"1"}})},e.prototype.initValue=function(t,e,i){this.value=t,this.width=e,this.height=i,this.pattern=[],this.values=[],this.dataLength=t.length},e.prototype.prepareValues=function(){var t=Math.max(.15*this.width,24);if(this.height<t)throw new Error("Insufficient Height");if(this.setBaseUnit(),this.baseUnit<this.minBaseUnitLength)throw new Error("Insufficient Width")},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},e.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},e.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},e.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},e.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var i=0;i<e.length;i++)t=this.characterMap[this._findCharacterByValue(e[i])],this.addPattern(t.pattern)},e.prototype._getCheckValues=function(){var t,e,i=this.values,o=i.length,r=0;for(e=o-1;e>=0;e--)r+=this.weightedValue(i[e],o-e,this.cCheckSumTotal);for(t=r%this.checkSumMod,r=this.weightedValue(t,1,this.kCheckSumTotal),e=o-1;e>=0;e--)r+=this.weightedValue(i[e],o-e+1,this.kCheckSumTotal);return[t,r%this.checkSumMod]},e.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},e.prototype.weightedValue=function(t,e,i){return(e%i||i)*t},e.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e)},e}(Fp),qp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),j(this,Gp,{name:"Code 93 extended",pushCheckSum:function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var i=0;i<e.length;i++)if(t=e[i],this.shiftValuesAsciiCodes[t])this.addExtended(this.shiftValuesAsciiCodes[t]);else{var o=this._findCharacterByValue(t);this.addPattern(this.characterMap[o].pattern)}}})},e}(Wp),Xp=/^\d+$/,Yp=Object.assign,Zp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Yp(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},e.prototype.initValue=function(t,e,i){this.height=i,this.width=e,this.baseHeight=i/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.START),this.pattern.pop()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},e.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},e.prototype.validate=function(t){if(Xp.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!lt(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(","))},e.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=this.height-this.baseHeight*t.charAt(i),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},e}(Lp),Kp=/^\d+$/,$p=/^[a-z0-9]+$/i,Qp=Object.assign,Jp=function(t){function e(e){t.call(this),this.encoding=e,this.initProperties()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){},e.prototype.addStart=function(){},e.prototype.is=function(){},e.prototype.isCode=function(){return!1},e.prototype.move=function(){},e.prototype.pushState=function(){},e}(S.Class),th=function(t){function e(e,i){t.call(this,e),this.states=i,this._initMoves(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),j(this,{FNC4:"FNC4",SHIFT:98})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var i=t.charCodeAt(e);return this.isCode(i)},e.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},e.prototype.pushState=function(t){var e,i=this.states,o=t.value,r=o.length;if(lt("C",i)){var n=o.substr(t.index).match(/\d{4,}/g);n&&(r=o.indexOf(n[0],t.index))}for(;(e=t.value.charCodeAt(t.index))>=0&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},e.prototype._initMoves=function(t){this._moves=[],lt(this.FNC4,t)&&this._moves.push(this._moveFNC),lt(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},e.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},e.prototype._shiftState=function(t){if(t.previousState===this.shiftKey&&(t.index+1>=t.value.length||this.encoding[this.shiftKey].is(t.value,t.index+1)))return this.encoding.addPattern(this.SHIFT),t.shifted=!0,!0},e.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},e}(Jp),eh={};eh.A=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Qp(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},e.prototype.isCode=function(t){return 0<=t&&t<96},e.prototype.getValue=function(t){return t<32?t+64:t-32},e}(th),eh.B=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Qp(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},e.prototype.isCode=function(t){return 32<=t&&t<128},e.prototype.getValue=function(t){return t-32},e}(th),eh.C=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Qp(this,{key:"C",MOVE:99,START:105})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var i=ph(t,e,4);return(e+4<=t.length||2===t.length)&&Kp.test(i)},e.prototype.move=function(){this.encoding.addPattern(this.MOVE)},e.prototype.pushState=function(t){for(var e;(e=ph(t.value,t.index,2))&&Kp.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},e.prototype.getValue=function(t){return t},e}(Jp),eh.FNC4=function(t){function e(e,i){t.call(this,e),this._initSubStates(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Qp(this,{key:"FNC4",dependentStates:["A","B"]})},e.prototype.addStart=function(t){var e=t.value.charCodeAt(0)-128,i=this._getSubState(e);this.encoding[i].addStart()},e.prototype.is=function(t,e){var i=t.charCodeAt(e);return this.isCode(i)},e.prototype.isCode=function(t){return 128<=t&&t<256},e.prototype.pushState=function(t){var e,i=this._initSubState(t),o=this.encoding,r=i.value.length;if(t.index+=r,r<3)for(;i.index<r;i.index++)e=i.value.charCodeAt(i.index),i.state=this._getSubState(e),i.previousState!==i.state&&(i.previousState=i.state,o[i.state].move(i)),o.addPattern(o[i.state].MOVE),o.addPattern(o[i.state].getValue(e));else i.state!==i.previousState&&o[i.state].move(i),this._pushStart(i),o.pushData(i,this.subStates),t.index<t.value.length&&this._pushStart(i);t.fnc=!0,t.state=i.state},e.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},e.prototype._initSubState=function(t){var e={value:this._getAll(t.value,t.index),index:0};return e.state=this._getSubState(e.value.charCodeAt(0)),e.previousState=t.previousState===this.key?e.state:t.previousState,e},e.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)lt(t[e],this.dependentStates)&&this.subStates.push(t[e])},e.prototype._getSubState=function(t){for(var e=0;e<this.subStates.length;e++)if(this.encoding[this.subStates[e]].isCode(t))return this.subStates[e]},e.prototype._getAll=function(t,e){for(var i,o="",r=e;(i=t.charCodeAt(r++))&&this.isCode(i);)o+=String.fromCharCode(i-128);return o},e}(Jp),eh.FNC1=function(t){function e(e,i){t.call(this,e),this.states=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Qp(this,{key:"FNC1",startState:"C",startAI:"(",endAI:")",dependentStates:["C","B"],applicationIdentifiers:{22:{max:29,type:"alphanumeric"},402:{length:17},7004:{max:4,type:"alphanumeric"},242:{max:6,type:"alphanumeric"},8020:{max:25,type:"alphanumeric"},703:{min:3,max:30,type:"alphanumeric"},8008:{min:8,max:12,type:"alphanumeric"},253:{min:13,max:17,type:"alphanumeric"},8003:{min:14,max:30,type:"alphanumeric"},multiKey:[{ids:["15","17","8005","8100"],ranges:[[11,13],[310,316],[320,336],[340,369]],type:{length:6}},{ids:["240","241","250","251","400","401","403","7002","8004","8007","8110"],ranges:[[-9]],type:{max:30,type:"alphanumeric"}},{ids:["7001"],ranges:[[410,414]],type:{length:13}},{ids:["10","21","254","420","8002"],type:{max:20,type:"alphanumeric"}},{ids:["00","8006","8017","8018"],type:{length:18}},{ids:["01","02","8001"],type:{length:14}},{ids:["422"],ranges:[[424,426]],type:{length:3}},{ids:["20","8102"],type:{length:2}},{ids:["30","37"],type:{max:8,type:"alphanumeric"}},{ids:["390","392"],type:{max:15,type:"alphanumeric"}},{ids:["421","423"],type:{min:3,max:15,type:"alphanumeric"}},{ids:["391","393"],type:{min:3,max:18,type:"alphanumeric"}},{ids:["7003","8101"],type:{length:10}}]},START:102})},e.prototype.addStart=function(){this.encoding[this.startState].addStart()},e.prototype.is=function(){return lt(this.key,this.states)},e.prototype.pushState=function(t){var e,i,o,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,p={state:this.startState};r.addPattern(this.START);for(;;){if(p.index=0,(e=(o=n.charAt(a)===this.startAI?2:0)>0?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)i=a+o+e.id.length+e.ai.length;else if((i=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+o<n.length)throw new Error("Separators are required after variable length identifiers");i=n.length}if(p.value=n.substring(a,i).replace(s,""),this.validate(e,p.value),r.pushData(p,this.dependentStates),i>=n.length)break;a=i,p.state!==this.startState&&(r[this.startState].move(p),p.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},e.prototype.validate=function(t,e){var i=e.substr(t.id.length),o=t.ai;if(!o.type&&!Kp.test(i))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===o.type&&!$p.test(i))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(o.length&&o.length!==i.length)throw new Error("Application identifier "+t.id+" must be "+o.length+" characters long.");if(o.min&&o.min>i.length)throw new Error("Application identifier "+t.id+" must be at least "+o.min+" characters long.");if(o.max&&o.max<i.length)throw new Error("Application identifier "+t.id+" must be at most "+o.max+" characters long.")},e.prototype.getByLength=function(t,e){for(var i,o,r=2;r<=4;r++)if(i=ph(t,e,r),o=this.getApplicationIdentifier(i)||this.getApplicationIdentifier(i.substring(0,i.length-1)))return{id:i,ai:o};this.unsupportedAIError(i)},e.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},e.prototype.getBySeparator=function(t,e){var i=t.indexOf(this.startAI,e),o=t.indexOf(this.endAI,i),r=t.substring(i+1,o),n=this.getApplicationIdentifier(r)||this.getApplicationIdentifier(r.substr(r.length-1));return n||this.unsupportedAIError(r),{ai:n,id:r}},e.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,i=e.multiKey;if(e[t])return e[t];for(var o=0;o<i.length;o++){if(i[o].ids&<(t,i[o].ids))return i[o].type;if(i[o].ranges)for(var r=i[o].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return i[o].type}},e}(Jp);var ih=function(t){function e(e){t.call(this,e),this._initStates()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Qp(this,{characterMap:[212222,222122,222221,121223,121322,131222,122213,122312,132212,221213,221312,231212,112232,122132,122231,113222,123122,123221,223211,221132,221231,213212,223112,312131,311222,321122,321221,312212,322112,322211,212123,212321,232121,111323,131123,131321,112313,132113,132311,211313,231113,231311,112133,112331,132131,113123,113321,133121,313121,211331,231131,213113,213311,213131,311123,311321,331121,312113,312311,332111,314111,221411,431111,111224,111422,121124,121421,141122,141221,112214,112412,122114,122411,142112,142211,241211,221114,413111,241112,134111,111242,121142,121241,114212,124112,124211,411212,421112,421211,212141,214121,412121,111143,111341,131141,114113,114311,411113,411311,113141,114131,311141,411131,211412,211214,211232,2331112],STOP:106})},e.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new eh[this.states[t]](this,this.states)},e.prototype.initValue=function(t,e,i){this.pattern=[],this.value=t,this.width=e,this.height=i,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},e.prototype.addData=function(){var t={value:this.value,index:0,state:""};0!==this.value.length&&(t.state=t.previousState=this.getNextState(t,this.states),this.addStart(t),this.pushData(t,this.states),this.addCheckSum(),this.addStop(),this.setBaseUnit())},e.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);)if(t.shifted){var i=t.state;t.state=t.previousState,t.previousState=i,t.shifted=!1}else t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t)},e.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},e.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},e.prototype.addStop=function(){this.addPattern(this.STOP)},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},e.prototype.addPattern=function(t){for(var e,i=this.characterMap[t].toString(),o=0;o<i.length;o++)e=parseInt(i.charAt(o),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},e.prototype.getNextState=function(t,e){for(var i=0;i<e.length;i++)if(this[e[i]].is(t.value,t.index))return e[i];this.invalidCharacterError(t.value.charAt(t.index))},e}(Lp),oh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Qp(this,{name:"Code 128 A",states:["A"]})},e}(ih),rh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Qp(this,{name:"Code 128 B",states:["B"]})},e}(ih),nh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Qp(this,{name:"Code 128 C",states:["C"]})},e}(ih),sh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Qp(this,{name:"Code 128",states:["C","B","A","FNC4"]})},e}(ih),ah=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Qp(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},e}(ih);function ph(t,e,i){return t.substring(e,e+i)}var hh=Object.assign,lh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),hh(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:gh})},e.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},e.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},e.prototype.addCheckSum=function(){var t=this.checkSums[this.checkSumType].call(this.checkSums,this.value);this.checksum=t.join("");for(var e=0;e<t.length;e++)this.checkSumLength++,this.addPattern(this.characterMap[t[e]])},e}(Lp),ch=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),hh(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},e}(lh),uh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),hh(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},e}(lh),fh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),hh(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},e}(lh),dh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),hh(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},e}(lh),gh={Modulo10:function(t){var e,i,o,r=[0,""],n=t.length%2;for(e=0;e<t.length;e++)r[(e+n)%2]+=parseInt(t.charAt(e),10);for(o=r[0],i=(2*r[1]).toString(),e=0;e<i.length;e++)o+=parseInt(i.charAt(e),10);return[(10-o%10)%10]},Modulo11:function(t){for(var e,i=0,o=t.length,r=0;r<o;r++)i+=(((o-r)%6||6)+1)*t.charAt(r);return 10!==(e=(11-i%11)%11)?[e]:[1,0]},Modulo11Modulo10:function(t){var e,i=this.Modulo11(t);return e=t+i[0],i.concat(this.Modulo10(e))},Modulo10Modulo10:function(t){var e,i=this.Modulo10(t);return e=t+i[0],i.concat(this.Modulo10(e))}},yh=Object.assign,vh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),yh(this,{name:"EAN 13",keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}})},e.prototype.initValue=function(t,e,i){var o=String(t);if(12!==o.length||/\D/.test(o))throw new Error('The value of the "EAN13" encoding should be 12 symbols');this.pattern=[],this.options.height=i,this.baseUnit=e/(95+this.quietZoneLength),this.value=o,this.checksum=this.calculateChecksum(),this.leftKey=o[0],this.leftPart=o.substr(1,6),this.rightPart=o.substr(7)+this.checksum},e.prototype.addData=function(){this.addPieces(this.characterMap.start),this.addSide(this.leftPart,this.leftKey),this.addPieces(this.characterMap.middle),this.addSide(this.rightPart),this.addPieces(this.characterMap.start)},e.prototype.addSide=function(t,e){for(var i=0;i<t.length;i++)e&&parseInt(this.keyTable[e].charAt(i),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(i)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(i)],!0)},e.prototype.addPieces=function(t,e){for(var i=0;i<t.length;i++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[i]}):this.pattern.push(t[i])},e.prototype.calculateChecksum=function(){for(var t=0,e=0,i=this.value.split("").reverse().join(""),o=0;o<i.length;o++)o%2?e+=parseInt(i.charAt(o),10):t+=parseInt(i.charAt(o),10);return(10-(3*t+e)%10)%10},e}(Lp),mh=Object.assign,xh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),mh(this,{name:"EAN 8"})},e.prototype.initValue=function(t,e,i){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=i,this.checksum=this.calculateChecksum(this.value),this.leftPart=this.value.substr(0,4),this.rightPart=this.value.substr(4)+this.checksum,this.pattern=[],this.baseUnit=e/(67+this.quietZoneLength)},e}(vh),bh={code11:zp,code39:Up,code39extended:Hp,code93:Wp,code93extended:qp,code128:sh,code128a:oh,code128b:rh,code128c:nh};bh["gs1-128"]=ah,bh.msimod10=ch,bh.msimod11=uh,bh.msimod1010=fh,bh.msimod1110=dh,bh.postnet=Zp,bh.ean8=xh,bh.ean13=vh;var _h=function(t){function e(e,i){t.call(this),this.options=j({},this.options,i),this.element=e,this._initElement(),this._initSurface(),this._setOptions(i),i&&xt(i.value)&&this.redraw()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._destroySurface()},e.prototype._initElement=function(){_(this.element,"k-barcode"),this.element.style.display="block"},e.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},e.prototype._createSurface=function(){return S.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},e.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},e.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},e.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},e.prototype.setOptions=function(t){this._setOptions(t),this.redraw()},e.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t.width,height:t.height}),this.createVisual(),this.surface.draw(this.visual)},e.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},e.prototype._resize=function(){this.redraw()},e.prototype.createVisual=function(){this.visual=this._render()},e.prototype._render=function(){var t,e,i=this.options,o=i.value,r=i.text,n=z(r.margin),s=this._getSize(),a=i.border||{},p=this.encoding,h=new $t(0,0,s.width,s.height).unpad(a.width).unpad(i.padding),l=h.height(),c=new S.drawing.Group;return this.contentBox=h,c.append(this._getBackground(s)),r.visible&&(l-=S.drawing.util.measureText(o,{font:r.font}).height+n.top+n.bottom),t=p.encode(o,h.width(),l),r.visible&&(e=o,i.checksum&&xt(p.checksum)&&(e+=" "+p.checksum),c.append(this._getText(e))),this.barHeight=l,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),c.append(this._bandsGroup),c},e.prototype.exportVisual=function(){return this._render()},e.prototype._getSize=function(){var t=this.element,e=t.clientWidth,i=t.clientHeight,o=new S.geometry.Size(300,100);return e>0&&(o.width=e),i&&(o.height=i),this.options.width&&(o.width=this.options.width),this.options.height&&(o.height=this.options.height),o},e.prototype.value=function(t){if(!xt(t))return this.options.value;this.options.value=String(t),this.redraw()},e.prototype._getBands=function(t,e){for(var i,o,r=this.contentBox,n=r.x1,s=new S.drawing.Group,a=0;a<t.length;a++){if(i=(o=B(t[a])?t[a]:{width:t[a],y1:0,y2:this.barHeight}).width*e,a%2){var p=S.geometry.Rect.fromPoints(new S.geometry.Point(n,o.y1+r.y1),new S.geometry.Point(n+i,o.y2+r.y1)),h=S.drawing.Path.fromRect(p,{fill:{color:this.options.color},stroke:null});s.append(h)}n+=i}return s},e.prototype._getBackground=function(t){var e=this.options,i=e.border||{},o=new $t(0,0,t.width,t.height).unpad(i.width/2);return S.drawing.Path.fromRect(o.toRect(),{fill:{color:e.background},stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType}})},e.prototype._getText=function(t){var e=this.options.text,i=this._textbox=new be(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return i.reflow(this.contentBox),i.renderVisual(),i.visual},e.prototype._setOptions=function(t){if(this.type=(t.type||this.options.type).toLowerCase(),"upca"===this.type&&(this.type="ean13",t.value="0"+t.value),"upce"===this.type&&(this.type="ean8",t.value="0"+t.value),!bh[this.type])throw new Error("Encoding "+this.type+" is not supported.");this.encoding=new bh[this.type],this.options=j({},this.options,t)},e}(S.Class);It(_h,{name:"Barcode",renderAs:"svg",value:"",type:"code39",checksum:!1,width:0,height:0,color:"black",background:"white",text:{visible:!0,font:"16px Consolas, Monaco, Sans Mono, monospace, sans-serif",color:"black",margin:{top:0,bottom:0,left:0,right:0}},border:{width:0,dashType:"solid",color:"black"},padding:{top:0,bottom:0,left:0,right:0}});var wh=_h,Ah="Arial, Helvetica, sans-serif",Sh="12px "+Ah,kh="16px "+Ah,Ch=function(){return{icon:{border:{width:1}},label:{font:Sh,padding:3},line:{length:10,width:2},visible:!0}},Ph=function(t){return{visible:!0,labels:{font:"11px Arial, Helvetica, sans-serif"},overlay:t.gradients?{}:{gradient:"none"},area:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},rangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalRangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},bar:{gap:1.5,spacing:.4},boxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},bubble:{border:{width:0},labels:{background:"transparent"},opacity:.6},bullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},candlestick:{border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:"#000",width:1},spacing:.3},column:{gap:1.5,spacing:.4},heatmap:{labels:{color:"",background:"transparent",visible:!0},highlight:{border:{width:0}}},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},donut:{margin:1},funnel:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},horizontalWaterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4},line:{width:2},notes:Ch(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},spacing:.3},radarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},radarLine:{markers:{visible:!1},width:2},polarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},polarLine:{markers:{visible:!1},width:2},rangeBar:{gap:1.5,spacing:.4},rangeColumn:{gap:1.5,spacing:.4},scatterLine:{width:1},verticalArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalBoxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},verticalBullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},verticalLine:{width:2},waterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4}}},Mh=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Sh},notes:Ch(),title:{font:kh,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:Ph(t),title:{font:kh},legend:{labels:{font:Sh}}}}},function(t,e,i){"use strict";i.r(e),i.d(e,"BrowserSupportService",(function(){return r})),i.d(e,"canUseDOM",(function(){return n})),i.d(e,"canUseRef",(function(){return s})),i.d(e,"classNames",(function(){return a})),i.d(e,"cloneDate",(function(){return h})),i.d(e,"clone",(function(){return l})),i.d(e,"cloneObject",(function(){return c})),i.d(e,"cloneValue",(function(){return u})),i.d(e,"cloneArray",(function(){return f})),i.d(e,"Draggable",(function(){return P})),i.d(e,"focusFirstFocusableChild",(function(){return M})),i.d(e,"FormComponent",(function(){return O})),i.d(e,"getTabIndex",(function(){return T})),i.d(e,"getter",(function(){return I})),i.d(e,"guid",(function(){return V})),i.d(e,"Keys",(function(){return L})),i.d(e,"noop",(function(){return E})),i.d(e,"getScrollbarWidth",(function(){return z})),i.d(e,"setScrollbarWidth",(function(){return D})),i.d(e,"setter",(function(){return G})),i.d(e,"mapTree",(function(){return W})),i.d(e,"mapTreeItem",(function(){return q})),i.d(e,"extendDataItem",(function(){return X})),i.d(e,"getItemPath",(function(){return Y})),i.d(e,"validatePackage",(function(){return K})),i.d(e,"hasRelativeStackingContext",(function(){return $})),i.d(e,"dispatchEvent",(function(){return Q})),i.d(e,"AsyncFocusBlur",(function(){return et})),i.d(e,"createPropsContext",(function(){return rt})),i.d(e,"withPropsContext",(function(){return nt})),i.d(e,"useDir",(function(){return st})),i.d(e,"useAsyncFocusBlur",(function(){return J})),i.d(e,"useDraggable",(function(){return at})),i.d(e,"useRtl",(function(){return pt})),i.d(e,"useMouse",(function(){return ht})),i.d(e,"useCustomComponent",(function(){return lt})),i.d(e,"usePropsContext",(function(){return it})),i.d(e,"Icon",(function(){return dt})),i.d(e,"SvgIcon",(function(){return mt})),i.d(e,"Typography",(function(){return Rt}));var o=function(){return"undefined"!=typeof document?document:{}},r=function(){function t(){}return Object.defineProperty(t.prototype,"scrollbarWidth",{get:function(){var t=o();if(!this.scrollbar&&t&&t.createElement){var e=t.createElement("div");e.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",e.innerHTML=" ",t.body.appendChild(e),this.scrollbar=e.offsetWidth-e.scrollWidth,t.body.removeChild(e)}return this.scrollbar},enumerable:!0,configurable:!0}),t}(),n=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),s=function(t){return"string"!=typeof Comment&&(function(t){return Boolean("function"==typeof t&&!!t.prototype.isReactComponent)}(t)||function(t){return Boolean(t.$$typeof&&"function"==typeof t.render)}(t))},a=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.filter((function(t){return!0!==t&&!!t})).map((function(t){return Array.isArray(t)?a.apply(void 0,t):"object"==typeof t?Object.keys(t).map((function(e,i){return t[i]||t[e]&&e||null})).filter((function(t){return null!==t})).join(" "):t})).filter((function(t){return!!t})).join(" ")},p=i(1),h=function(t){return t?new Date(t.getTime()):null};function l(t){var e={};return c(t,e),e}function c(t,e){for(var i in t)if(t.hasOwnProperty(i)){var o=t[i];e[i]=u(o,e[i])}}function u(t,e){if(Array.isArray(t))return f(t);if(t instanceof Date)return h(t);if(p.isValidElement(t))return p.cloneElement(t,t.props);if(t&&"object"==typeof t){var i=e||{};return c(t,i),i}return t}function f(t){return t.map((function(t){return u(t,void 0)}))}var d=i(2),g=function(t,e){return function(i){return e(t(i))}},y=function(t,e,i){return t.addEventListener&&t.addEventListener(e,i)},v=function(t,e,i){return t&&t.removeEventListener&&t.removeEventListener(e,i)},m=function(){},x=function(t){return t.preventDefault()},b=/touch/;function _(t){return t.type.match(b)?{pageX:t.changedTouches[0].pageX,pageY:t.changedTouches[0].pageY,clientX:t.changedTouches[0].clientX,clientY:t.changedTouches[0].clientY,type:t.type,originalEvent:t,isTouch:!0}:{pageX:t.pageX,pageY:t.pageY,clientX:t.clientX,clientY:t.clientY,offsetX:t.offsetX,offsetY:t.offsetY,type:t.type,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,originalEvent:t}}var w=function(t){var e=this,i=t.press;void 0===i&&(i=m);var o=t.drag;void 0===o&&(o=m);var r=t.release;void 0===r&&(r=m);var n=t.mouseOnly;void 0===n&&(n=!1),this._pressHandler=g(_,i),this._dragHandler=g(_,o),this._releaseHandler=g(_,r),this._ignoreMouse=!1,this._mouseOnly=n,this._touchstart=function(t){1===t.touches.length&&e._pressHandler(t)},this._touchmove=function(t){1===t.touches.length&&e._dragHandler(t)},this._touchend=function(t){0===t.touches.length&&1===t.changedTouches.length&&(e._releaseHandler(t),e._ignoreMouse=!0,setTimeout(e._restoreMouse,2e3))},this._restoreMouse=function(){e._ignoreMouse=!1},this._mousedown=function(t){var i=t.which;i&&i>1||e._ignoreMouse||(y(e.document,"mousemove",e._mousemove),y(e.document,"mouseup",e._mouseup),e._pressHandler(t))},this._mousemove=function(t){e._dragHandler(t)},this._mouseup=function(t){v(e.document,"mousemove",e._mousemove),v(e.document,"mouseup",e._mouseup),e._releaseHandler(t)},this._pointerdown=function(t){t.isPrimary&&0===t.button&&(y(e.document,"pointermove",e._pointermove),y(e.document,"pointerup",e._pointerup),y(e.document,"pointercancel",e._pointerup),y(e.document,"contextmenu",x),e._pressHandler(t))},this._pointermove=function(t){t.isPrimary&&e._dragHandler(t)},this._pointerup=function(t){t.isPrimary&&(v(e.document,"pointermove",e._pointermove),v(e.document,"pointerup",e._pointerup),v(e.document,"pointercancel",e._pointerup),v(e.document,"contextmenu",x),e._releaseHandler(t))}},A={document:{configurable:!0}};w.supportPointerEvent=function(){return"undefined"!=typeof window&&window.PointerEvent},A.document.get=function(){return this._element?this._element.ownerDocument:document},w.prototype.bindTo=function(t){t!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=t,this._bindToCurrent())},w.prototype._bindToCurrent=function(){var t=this._element;this._usePointers()?y(t,"pointerdown",this._pointerdown):(y(t,"mousedown",this._mousedown),this._mouseOnly||(y(t,"touchstart",this._touchstart),y(t,"touchmove",this._touchmove),y(t,"touchend",this._touchend)))},w.prototype._unbindFromCurrent=function(){var t=this._element;if(this._usePointers())return v(t,"pointerdown",this._pointerdown),v(this.document,"pointermove",this._pointermove),v(this.document,"pointerup",this._pointerup),v(this.document,"contextmenu",x),void v(this.document,"pointercancel",this._pointerup);v(t,"mousedown",this._mousedown),this._mouseOnly||(v(t,"touchstart",this._touchstart),v(t,"touchmove",this._touchmove),v(t,"touchend",this._touchend))},w.prototype._usePointers=function(){return!this._mouseOnly&&w.supportPointerEvent()},w.prototype.update=function(t){var e=t.press;void 0===e&&(e=m);var i=t.drag;void 0===i&&(i=m);var o=t.release;void 0===o&&(o=m);var r=t.mouseOnly;void 0===r&&(r=!1),this._pressHandler=g(_,e),this._dragHandler=g(_,i),this._releaseHandler=g(_,o),this._mouseOnly=r},w.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},Object.defineProperties(w.prototype,A),w.default=w;var S,k=w,C=(S=function(t,e){return(S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),P=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.element=null,e.draggable=new k({press:function(t){e.element&&e.props.onPress&&e.props.onPress.call(void 0,{target:e,event:t,element:e.element})},drag:function(t){e.element&&e.props.onDrag&&e.props.onDrag.call(void 0,{target:e,event:t,element:e.element})},release:function(t){e.element&&e.props.onRelease&&e.props.onRelease.call(void 0,{target:e,event:t})}}),e.childRef=function(t){var i=e.props.childRef;e.element=t,i&&"function"==typeof i&&i(t)},e}return C(e,t),e.prototype.componentDidMount=function(){this.element&&this.draggable.bindTo(this.element)},e.prototype.componentWillUnmount=function(){this.draggable.destroy()},e.prototype.render=function(){return p.cloneElement(p.Children.only(this.props.children),{ref:this.childRef})},e.propTypes={children:d.element.isRequired},e}(p.Component),M=function(t){if(t){if((t instanceof HTMLInputElement||-1!==t.tabIndex)&&t.focus)return void t.focus();var e=t.querySelector('input, [tabindex]:not([tabindex="-1"])');e&&e.focus&&e.focus()}},O=function(){},T=function(t,e,i){var o="string"==typeof t?parseInt(t,void 0):t;if(NaN!==o)return void 0!==o?o:e?i?void 0:-1:0},R=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function j(t){var e=[];return t.replace(R,(function(t,i,o,r){e.push(void 0!==i?i:o||r)})),e}var B={};function I(t){if(B[t])return B[t];var e=j(t);return B[t]=function(t){for(var i=t,o=0;o<e.length&&i;o++)i=i[e[o]];return i},B[t]}B.undefined=function(){};var V=function(){var t,e,i="";for(t=0;t<32;t++)e=16*Math.random()|0,8!==t&&12!==t&&16!==t&&20!==t||(i+="-"),i+=(12===t?4:16===t?3&e|8:e).toString(16);return i},L={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46},E=function(){},z=function(){return!(!n||!document.body)&&(new r).scrollbarWidth},D=function(){if(!n||!document.body)return!1;var t=(new r).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width",t+"px")},F={undefined:function(t){return t}},U=function(t,e){return e&&e.arrays&&!isNaN(Number(t))?[]:{}};function G(t){if(F[t])return F[t];var e=j(t);return F[t]=function(t,i,o){for(var r=t,n=e.length-1,s=0;s<n&&r;s++)r=r[e[s]]=r[e[s]]||U(e[s+1],o);r[e[n]]=i},F[t]}var H=function(){return(H=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function N(t,e,i){var o;return i?H({},t,((o={})[e]=i.length?i.slice():void 0,o)):t&&t[e]?t[e].slice():[]}var W=function(t,e,i){return t.map((function(t){return function t(e,i,o){if(e[i]){var r=N(e,i).map((function(e){return t(e,i,o)}));return o(N(e,i,r))}return o(e)}(t,e,i)})).slice()},q=function(t,e,i,o){for(var r=t,n=[],s=0;s<e.length;s++)r=r[e[s]],r=Array.isArray(r)?r:r[i],n.push(r);var a=n.length>1?n[n.length-2]:t,p=e[e.length-1],h=o(a[p]);a.splice(p,1,h)},X=function(t,e,i){var o;return Object.assign({},t,t[e]?((o={})[e]=t[e].slice(),o):{},i||{})},Y=function(t,e,i){var o=[],r=e.slice();if(r.length){var n=t[r.shift()||0];for(o.push(n);r.length&&i;)n=n[i][r.shift()||0],o.push(n)}return o},Z=i(6);function K(t){if(void 0!==Z)Z.validatePackage(t);else{var e="License activation failed for "+t.name+"\n";e+="The @progress/kendo-licensing script is not loaded.\n",e+="See "+t.licensingDocsUrl+" for more information.\n",console.warn(e)}}var $=function(t){if(!n)return!1;var e=t?t.ownerDocument:document;if(!e||!e.body)return!1;var i=e.createElement("div");i.style.transform="matrix(10, 0, 0, 10, 0, 0)",i.innerHTML='<div style="position: fixed; top: 10px;">child</div>',e.body.appendChild(i);var o=10!==i.children[0].getBoundingClientRect().top;return e.body.removeChild(i),o};function Q(t,e,i,o){if(t){var r={syntheticEvent:e,nativeEvent:e.nativeEvent,target:i};t.call(void 0,Object.assign(r,o))}}function J(t){var e=t.onFocus,i=t.onBlur,o=t.onSyncFocus,r=t.onSyncBlur,n=p.useRef(!1),s=p.useRef(0),a=p.useCallback((function(t){clearTimeout(s.current),s.current=window.setTimeout((function(){return t()}))}),[s]),h=p.useCallback((function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];clearTimeout(s.current),o&&o.call.apply(o,[void 0].concat(t)),n.current||(n.current=!0,e&&e.call.apply(e,[void 0].concat(t)))}),[n,e,o]),l=p.useCallback((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];r&&r.call.apply(r,[void 0].concat(t)),a((function(){n.current&&i&&(n.current=!1,i.call.apply(i,[void 0].concat(t)))}))}),[n,a,i,r]);return p.useEffect((function(){return function(){clearTimeout(s.current)}}),[]),{onFocus:h,onBlur:l}}var tt=function(){return(tt=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},et=function(t){var e=t.children,i=J({onFocus:t.onFocus,onBlur:t.onBlur,onSyncFocus:t.onSyncFocus,onSyncBlur:t.onSyncBlur});return e.call(void 0,tt({},i))},it=function(t,e){return p.useContext(t)(e)},ot=function(){return(ot=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},rt=function(){return p.createContext((function(t){return t}))},nt=function(t,e){return p.forwardRef((function(i,o){var r=it(t,i);return p.createElement(e,ot({},r,{ref:o}))}))};function st(t,e,i){var o=p.useState(e),r=o[0],n=o[1];return p.useEffect((function(){if(!r&&window&&t.current){var e=window.getComputedStyle(t.current).direction;e&&n(e)}}),i),r}function at(t,e){var i=e.onPress,o=e.onDrag,r=e.onRelease,n=p.useMemo((function(){return new k({press:i,drag:o,release:r})}),[]);p.useEffect((function(){var e=t.current;if(e)return n.bindTo(e),function(){n.destroy()}}),[]),p.useEffect((function(){n.update({press:i,drag:o,release:r})}),[i,o,r])}function pt(t,e,i){var o=p.useState(e),r=o[0],n=o[1];return p.useEffect((function(){if(!r&&window&&t.current){var e=window.getComputedStyle(t.current).direction;e&&n(e)}}),i),r}var ht=function(t,e,i){void 0===i&&(i={});var o=p.useCallback((function(o){i.onMouseDown&&i.onMouseDown.call(void 0,o),t.onMouseDown&&t.onMouseDown.call(void 0,{target:e.current,syntheticEvent:o})}),[i.onMouseDown,t.onMouseDown,e]),r=p.useCallback((function(o){i.onMouseUp&&i.onMouseUp.call(void 0,o),t.onMouseUp&&t.onMouseUp.call(void 0,{target:e.current,syntheticEvent:o})}),[i.onMouseUp,t.onMouseUp,e]);return{onClick:p.useCallback((function(o){i.onClick&&i.onClick.call(void 0,o),t.onClick&&t.onClick.call(void 0,{target:e.current,syntheticEvent:o})}),[i.onClick,t.onClick,e]),onMouseUp:r,onMouseDown:o,onDoubleClick:p.useCallback((function(o){i.onDoubleClick&&i.onDoubleClick.call(void 0,o),t.onDoubleClick&&t.onDoubleClick.call(void 0,{target:e.current,syntheticEvent:o})}),[i.onDoubleClick,t.onDoubleClick,e]),onMouseEnter:p.useCallback((function(o){i.onMouseEnter&&i.onMouseEnter.call(void 0,o),t.onMouseEnter&&t.onMouseEnter.call(void 0,{target:e.current,syntheticEvent:o})}),[i.onMouseEnter,t.onMouseEnter,e]),onMouseLeave:p.useCallback((function(o){i.onMouseLeave&&i.onMouseLeave.call(void 0,o),t.onMouseLeave&&t.onMouseLeave.call(void 0,{target:e.current,syntheticEvent:o})}),[i.onMouseLeave,t.onMouseLeave,e]),onMouseMove:p.useCallback((function(o){i.onMouseMove&&i.onMouseMove.call(void 0,o),t.onMouseMove&&t.onMouseMove.call(void 0,{target:e.current,syntheticEvent:o})}),[i.onMouseMove,t.onMouseMove,e]),onMouseOut:p.useCallback((function(o){i.onMouseOut&&i.onMouseOut.call(void 0,o),t.onMouseOut&&t.onMouseOut.call(void 0,{target:e.current,syntheticEvent:o})}),[i.onMouseOut,t.onMouseOut,e]),onMouseOver:p.useCallback((function(o){i.onMouseOver&&i.onMouseOver.call(void 0,o),t.onMouseOver&&t.onMouseOver.call(void 0,{target:e.current,syntheticEvent:o})}),[i.onMouseOver,t.onMouseOver,e])}},lt=function(t){return p.isValidElement(t)?[t.type,t.props]:[t,{}]},ct={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl"},ut=function(){return(ut=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ft=function(t,e){var i={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&(i[o[r]]=t[o[r]])}return i},dt=p.forwardRef((function(t,e){var i=t.className,o=t.name,r=t.themeColor,n=t.size,s=t.flip,h=t.style,l=ft(t,["className","name","themeColor","size","flip","style"]),c=p.useRef(null),u=p.useRef(null);p.useImperativeHandle(c,(function(){return{element:u.current}})),p.useImperativeHandle(e,(function(){return c.current}));var f=p.useMemo((function(){return r||gt.themeColor}),[r]),d=p.useMemo((function(){return n||gt.size}),[n]),g=p.useMemo((function(){return s||gt.flip}),[s]),y=p.useMemo((function(){return a("k-icon","k-i-"+o,"k-color-"+f,{"k-flip-h":"horizontal"===g||"both"===g,"k-flip-v":"vertical"===g||"both"===g},ct[d],i)}),[o,f,d,g,i]),v=ht(t,c);return p.createElement("span",ut({ref:u},l,v,{className:y,style:h,role:"presentation"}))}));dt.propTypes={style:d.object,classNames:d.string,name:d.string,themeColor:d.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:d.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:d.oneOf(["default","horizontal","vertical","both"])};var gt={size:"default",themeColor:"inherit",flip:"default"};dt.displayName="KendoIcon";var yt=function(){return(yt=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},vt=function(t,e){var i={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&(i[o[r]]=t[o[r]])}return i},mt=p.forwardRef((function(t,e){var i=t.children,o=t.className,r=t.svgClassName,n=t.icon,s=t.flip,h=t.size,l=t.style,c=t.svgStyle,u=t.themeColor,f=t.viewBox,d=vt(t,["children","className","svgClassName","icon","flip","size","style","svgStyle","themeColor","viewBox"]),g=p.useRef(null);p.useImperativeHandle(e,(function(){return{element:g.current}}));var y=p.useMemo((function(){return n?n.name:xt.icon}),[n]),v=p.useMemo((function(){return u||xt.themeColor}),[u]),m=p.useMemo((function(){return h||xt.size}),[h]),x=p.useMemo((function(){return s||xt.flip}),[s]),b=p.useMemo((function(){return f||xt.viewBox}),[f]),_=p.useMemo((function(){return a("k-svg-icon","k-color-"+v,"k-svg-i-"+y,{"k-flip-h":"horizontal"===x||"both"===x,"k-flip-v":"vertical"===x||"both"===x},ct[m],o)}),[y,v,m,x,o]),w=p.useMemo((function(){return t.width&&t.height?yt({width:t.width,height:t.height},l):t.width?yt({width:t.width,height:t.width},l):t.height?yt({width:t.height,height:t.height},l):yt({},l)}),[t.width,t.height,l]);return p.createElement("span",{className:_,style:w,ref:g},p.createElement("svg",yt({className:r,style:c,"aria-hidden":!0,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:n?n.viewBox:b,dangerouslySetInnerHTML:n?{__html:n.content}:void 0},d),n?void 0:i))}));mt.propTypes={style:d.object,classNames:d.string,children:d.any,icon:d.object,themeColor:d.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:d.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:d.oneOf(["default","horizontal","vertical","both"])};var xt={size:"default",themeColor:"inherit",flip:"default",icon:"",viewBox:"0 0 24 24"};mt.displayName="KendoSvgIcon";var bt={xsmall:"k-fs-xs",small:"k-fs-sm",medium:"k-fs-md",large:"k-fs-lg",xlarge:"k-fs-xl"},_t={light:"k-font-weight-light",normal:"k-font-weight-normal",bold:"k-font-weight-bold"},wt={xsmall:"k-m-xs",small:"k-m-sm",medium:"k-m-md",large:"k-m-lg",xlarge:"k-m-xl",thin:"k-m-thin",hair:"k-m-hair"},At={xsmall:"xs",small:"sm",medium:"md",large:"lg",xlarge:"xl",thin:"thin",hair:"hair"},St={top:"k-mt-",right:"k-mr-",bottom:"k-mb-",left:"k-ml-"},kt={left:"k-text-left",right:"k-text-right",center:"k-text-center",justify:"k-text-justify"},Ct={lowercase:"k-text-lowercase",uppercase:"k-text-uppercase",capitalize:"k-text-capitalize"},Pt={inherit:"k-color-inherit",primary:"k-color-primary",secondary:"k-color-secondary",tertiary:"k-color-tertiary",info:"k-color-info",success:"k-color-success",warning:"k-color-warning",error:"k-color-error",dark:"k-color-dark",light:"k-color-light",inverse:"k-color-inverse"},Mt=function(){return(Mt=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Ot=function(t,e){var i={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&(i[o[r]]=t[o[r]])}return i},Tt=function(t){var e=p.forwardRef((function(e,i){var o=e.className,r=e.fontSize,n=e.fontWeight,s=e.textAlign,a=e.textTransform,h=e.themeColor,l=e.margin,c=Ot(e,["className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),u=p.useRef(null),f=p.useRef(null);p.useImperativeHandle(u,(function(){return{element:f.current,props:e}})),p.useImperativeHandle(i,(function(){return u.current}));var d=t,g=function(){if(void 0!==l){if("string"==typeof l)return[wt[l]];if("number"==typeof l&&l>=0&&l<=24)return["k-m-"+l];if("object"==typeof l){var t=[];return Object.keys(l).forEach((function(e){var i,o;null!==l[e]&&void 0!==l[e]&&t.push((i=e,o=l[e],""+St[i]+("string"==typeof o?At[o]:o)))})),t.join(" ")}}};return p.createElement(d,Mt({ref:f,className:["k-"+("p"===t?"paragraph":t),bt[r],_t[n],kt[s],Ct[a],Pt[h],g(),o].filter((function(t){return void 0!==t})).join(" ")},c),e.children)}));return e.propTypes={style:d.object,className:d.string,fontSize:d.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:d.oneOf(["light","normal","bold"]),margin:d.oneOfType([d.number,d.object,d.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:d.oneOf(["left","right","center","justify"]),textTransform:d.oneOf(["lowercase","uppercase","capitalize"]),themeColor:d.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"])},e.displayName="KendoReactTypography"+t.toUpperCase(),e},Rt={h1:Tt("h1"),h2:Tt("h2"),h3:Tt("h3"),h4:Tt("h4"),h5:Tt("h5"),h6:Tt("h6"),p:Tt("p"),code:Tt("code"),pre:Tt("pre")}},function(t,e,i){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),n=this&&this.__rest||function(t,e){var i={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&(i[o[r]]=t[o[r]])}return i};Object.defineProperty(e,"__esModule",{value:!0});var s=i(1),a=i(2),p=i(10),h=i(11),l=i(12),c=i(13),u=i(14),f=i(4),d=i(8),g=i(4),y=i(15),v=function(t){function e(e){var i=t.call(this,e)||this;return i.gaugeInstance=null,i._element=null,i.themeStore={},i.themeUnsubscriber=Function.prototype,i.observersStore={},i.onWindowResize=function(){null!==i.gaugeInstance&&(i.gaugeInstance.resize(),i.trigger("render",{sender:i}))},g.validatePackage(y.packageMetadata),i.themeStore=l.default(c.themeReducer),i.observersStore=l.default(c.observersReducer),i.contextValue={observersStore:i.observersStore},i}return r(e,t),Object.defineProperty(e.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),e.prototype.componentDidMount=function(){h.loadTheme(this.themeStore,this.instantiateCoreGauge.bind(this)),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize),this.trigger("render",{sender:this})},e.prototype.componentDidUpdate=function(t){var e=this.props,i=e.dir,o=(e.children,e.deriveOptionsFromParent,e.getTarget,e.gaugeConstructor,e.className,e.renderAs),r=n(e,["dir","children","deriveOptionsFromParent","getTarget","gaugeConstructor","className","renderAs"]),s=(t.dir,t.children,t.deriveOptionsFromParent,t.getTarget,t.gaugeConstructor,t.className,t.renderAs),a=n(t,["dir","children","deriveOptionsFromParent","getTarget","gaugeConstructor","className","renderAs"]);if(null!==this.gaugeInstance){var h=p.provideIntlService(this),l=this.gaugeInstance.contextService,c=h.locale!==l._intlService.locale,f=u.isOptionsChanged(a,r),d=r;if(c&&(this.gaugeInstance.contextService._intlService=h,this.gaugeInstance.contextService.format._intlService=h,f||this.gaugeInstance.noTransitionsRedraw()),f||(o||"svg")!==(s||"svg"))this.refresh();else if(Object.keys(r).indexOf("pointer")>-1)Array.isArray(d.pointer)?this.refreshAllValues(d.pointer.map((function(t){return t.value}))):this.refreshValue((d.pointer||{}).value);else this.refreshValue(d.value);t.dir!==i&&this.gaugeInstance.setDirection(this.getDirection(i)),this.trigger("render",{sender:this})}},e.prototype.componentWillUnmount=function(){this.themeUnsubscriber(),null!==this.gaugeInstance&&(this.gaugeInstance.destroy(),this.gaugeInstance=null),window.removeEventListener("resize",this.onWindowResize)},e.prototype.render=function(){var t=this,e=this.props,i=e.style,o=void 0===i?{}:i,r=e.className,n=e.children,a=Object.assign({},o,{position:"relative"});return s.createElement(d.GaugeContext.Provider,{value:this.contextValue},s.createElement("div",{style:a,ref:function(e){return t._element=e},className:r},n))},e.prototype.instantiateCoreGauge=function(){var t=this.props,e=t.dir,i=t.gaugeConstructor,o=this.getGaugeOptions();this.gaugeInstance=new i(this.element,o,this.themeStore.getState(),{rtl:this.getDirection(e),intlService:p.provideIntlService(this),sender:this})},e.prototype.refresh=function(){if(null!==this.gaugeInstance){var t=this.themeStore.getState(),e=this.getGaugeOptions();this.gaugeInstance.setOptions(e,t)}},e.prototype.refreshValue=function(t){this.gaugeInstance.value(t)},e.prototype.refreshAllValues=function(t){this.gaugeInstance.allValues(t)},e.prototype.getDirection=function(t){var e=this;return"rtl"===(void 0!==t?t:f.canUseDOM&&window.getComputedStyle(e.element).direction||"ltr")},e.prototype.getGaugeOptions=function(){var t=this.props,e=t.renderAs,i=t.transitions,o=t.deriveOptionsFromParent,r=Object.assign({renderAs:e,transitions:i});return o&&(r=o(r)),r},e.prototype.trigger=function(t,e){for(var i=this.observersStore.getState(),o=0;o<i.length;o++)i[o].trigger(t,e)},e.propTypes={dir:a.string,renderAs:a.oneOf(["svg","canvas"])},e.defaultProps={renderAs:"svg"},e}(s.Component);e.BaseGauge=v,p.registerForIntl(v)},function(t,e){t.exports=o},function(t,e,i){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},s=this&&this.__rest||function(t,e){var i={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&(i[o[r]]=t[o[r]])}return i};Object.defineProperty(e,"__esModule",{value:!0});var a=i(1),p=i(5),h=i(3),l=i(16),c=i(0),u=i(4),f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.gaugeType=h.ArcGauge,e.getTarget=function(){return e},e.deriveOptionsFromParent=function(t){var i=e.props,o=i.value,r=i.color,n=i.colors,s=i.opacity,a=i.scale;return Object.assign({},t,{value:o,color:r,colors:n,opacity:s,scale:a})},e}return r(e,t),Object.defineProperty(e.prototype,"gaugeInstance",{get:function(){return this._baseGauge?this._baseGauge.gaugeInstance:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"surface",{get:function(){return this._baseGauge?this._baseGauge.surface:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this._baseGauge?this._baseGauge.element:null},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this,e=this.props,i=e.children,o=e.arcCenterRender,r=e.centerRender,h=e.className,c=s(e,["children","arcCenterRender","centerRender","className"]);return a.createElement(p.BaseGauge,n({},c,{deriveOptionsFromParent:this.deriveOptionsFromParent,ref:function(e){return t._baseGauge=e},gaugeConstructor:this.gaugeType,getTarget:this.getTarget,className:u.classNames("k-gauge k-arcgauge",h)}),i,a.createElement(l.ArcCenter,{render:r||o}))},e.prototype.exportVisual=function(t){return null!==this.gaugeInstance&&this.element?c.drawDOM(this.element,t):Promise.resolve(new c.Group)},e}(a.Component);e.ArcGauge=f},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=i(1);e.GaugeContext=o.createContext(null),e.GaugeContext.displayName="GaugeContext"},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=i(7);e.ArcGauge=o.ArcGauge;var r=i(17);e.CircularGauge=r.CircularGauge;var n=i(18);e.LinearGauge=n.LinearGauge;var s=i(19);e.RadialGauge=s.RadialGauge},function(t,e){t.exports=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=i(3),r=function(){function t(t){this.store=t}return t.prototype.setStyle=function(t,e){this.store.dispatch({type:"set",payload:{field:t,value:e}})},t.prototype.setColors=function(){this.mapColor("pointer.color","gauge-pointer"),this.mapColor("scale.rangePlaceholderColor","gauge-track"),this.mapColor("scale.labels.color","normal-text-color"),this.mapColor("scale.minorTicks.color","normal-text-color"),this.mapColor("scale.majorTicks.color","normal-text-color"),this.mapColor("scale.line.color","normal-text-color")},t.prototype.mapColor=function(t,e){this.setStyle(t,this.queryStyle(e).backgroundColor)},t.prototype.queryStyle=function(t){var e=this.element;return window.getComputedStyle(e.querySelector(".k-var--"+t))},t}();e.loadTheme=function(t,e){var i=new r(t);if("undefined"!=typeof document){var n=i.element=document.createElement("div");n.style.display="none",n.innerHTML='\n <div class="k-var--gauge-pointer"></div>\n <div class="k-var--gauge-track"></div>\n <div class="k-var--normal-text-color"></div>\n',document.body.appendChild(n);try{t.dispatch({type:"push",payload:o.chartBaseTheme()}),i.setColors()}finally{document.body.removeChild(i.element),delete i.element,e()}}else t.dispatch({type:"push",payload:o.chartBaseTheme()})}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=i(4);e.THROTTLE_MS=1e3/60;e.default=function(t){var i,r,n=[],s=function(s){i=t(i,s),o.canUseDOM&&(window.clearTimeout(r),r=window.setTimeout((function(){return n.forEach((function(t){return t()}))}),e.THROTTLE_MS))};return s({}),{getState:function(){return i},dispatch:s,subscribe:function(t){return n.push(t),function(){return n=n.filter((function(e){return e!==t}))}}}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.optionsReducer=function(t,e){return e.gaugeCollectionIdxKey?o.collectionConfigurationItem(t,e):e.gaugeKey?o.configurationItem(t,e):{}};e.themeReducer=function(t,e){if(!e.type)return{};switch(e.type){case"set":return o.themeItem(t,e);case"push":return Object.assign(t,e.payload);default:return t}};e.observersReducer=function(t,e){if(!e.type)return[];switch(e.type){case"add":return t.concat([e.payload]);case"remove":return t.filter((function(t){return t!==e.payload}));default:return t}};var o={configurationItem:function(t,e){var i;return Object.assign(t,((i={})[e.gaugeKey]=e.payload,i))},collectionConfigurationItem:function(t,e){var i,o=!1,r=e.gaugeCollectionIdxKey.split("_"),n=r[0],s=r[1],a=t[n].map((function(t,i){return parseInt(s,10)===i?(o=!0,e.payload):t}));return!1===o&&a.splice(parseInt(s,10),0,e.payload),Object.assign(t,((i={})[n]=a,i))},themeItem:function(t,e){for(var i={},o=Object.assign(i,t),r=e.payload,n=r.field,s=r.value,a=n.split("."),p=a.shift();a.length>0;)i=i[p]=i[p]||{},p=a.shift();return i[p]=s,o}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){return"object"==typeof t},r=function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!0;for(var i in t)if("value"!==i&&t.hasOwnProperty(i)){var n=t[i],s=e[i];if(o(n)&&o(s)?r(n,s):n!==s)return!0}return!1};e.isOptionsChanged=function(t,e){if(!t||!e)return!0;if(t=[].concat(t),e=[].concat(e),t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(r(t[i],e[i]))return!0;return!1}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.packageMetadata={name:"@progress/kendo-react-gauges",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1637584905,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},function(t,e,i){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),s=i(3),a=i(8),p=function(t){function e(e,i){var o=t.call(this,e,i)||this;return o.state={arcCenterStyles:null,arcCenterValue:{value:0,color:""}},o._element=null,o.gaugeObserver=new s.InstanceObserver(o,{render:"onRender"}),i.observersStore.dispatch({type:"add",payload:o.gaugeObserver}),o}return r(e,t),e.prototype.render=function(){var t=this,e=this.props.render,i=this.state,o=i.arcCenterStyles,r=i.arcCenterValue,s=o||{zIndex:-1},a=null;return e&&(a=n.createElement("div",{className:"k-arcgauge-label",ref:function(e){return t._element=e},style:s},e(r.value,r.color))),a},e.prototype.onRender=function(t){if(this._element){var e=t.sender.gaugeInstance,i=this._element.offsetWidth,o=this._element.offsetHeight,r=e.centerLabelPosition(i,o);this.setState({arcCenterStyles:{left:r.left,top:r.top},arcCenterValue:{value:e.value(),color:e.currentColor()}})}},e.contextType=a.GaugeContext,e}(n.Component);e.ArcCenter=p},function(t,e,i){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0});var n=i(7),s=i(3),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.gaugeType=s.CircularGauge,e}return r(e,t),e}(n.ArcGauge);e.CircularGauge=a},function(t,e,i){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},s=this&&this.__rest||function(t,e){var i={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&(i[o[r]]=t[o[r]])}return i};Object.defineProperty(e,"__esModule",{value:!0});var a=i(1),p=i(5),h=i(3),l=i(0),c=i(4),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.getTarget=function(){return e},e.deriveOptionsFromParent=function(t){var i=e.props,o=i.pointer,r=i.scale;return Object.assign({},t,{pointer:o,scale:r})},e}return r(e,t),Object.defineProperty(e.prototype,"gaugeInstance",{get:function(){return null!==this._baseGauge?this._baseGauge.gaugeInstance:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"surface",{get:function(){return null!==this._baseGauge?this._baseGauge.surface:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return null!==this._baseGauge?this._baseGauge.element:null},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this,e=this.props,i=e.children,o=e.className,r=s(e,["children","className"]);return a.createElement(p.BaseGauge,n({},r,{deriveOptionsFromParent:this.deriveOptionsFromParent,ref:function(e){return t._baseGauge=e},gaugeConstructor:h.LinearGauge,getTarget:this.getTarget,className:c.classNames("k-gauge",o)}),i)},e.prototype.exportVisual=function(t){return null!==this.gaugeInstance?Promise.resolve(this.gaugeInstance.exportVisual(t)):Promise.resolve(new l.Group)},e}(a.Component);e.LinearGauge=u},function(t,e,i){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},s=this&&this.__rest||function(t,e){var i={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&(i[o[r]]=t[o[r]])}return i};Object.defineProperty(e,"__esModule",{value:!0});var a=i(1),p=i(5),h=i(3),l=i(0),c=i(4),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.getTarget=function(){return e},e.deriveOptionsFromParent=function(t){var i=e.props,o=i.pointer,r=i.scale;return Object.assign({},t,{pointer:o,scale:r})},e}return r(e,t),Object.defineProperty(e.prototype,"gaugeInstance",{get:function(){return null!==this._baseGauge?this._baseGauge.gaugeInstance:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"surface",{get:function(){return null!==this._baseGauge?this._baseGauge.surface:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return null!==this._baseGauge?this._baseGauge.element:null},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this,e=this.props,i=e.children,o=e.className,r=s(e,["children","className"]);return a.createElement(p.BaseGauge,n({},r,{deriveOptionsFromParent:this.deriveOptionsFromParent,ref:function(e){return t._baseGauge=e},gaugeConstructor:h.RadialGauge,getTarget:this.getTarget,className:c.classNames("k-gauge",o)}),i)},e.prototype.exportVisual=function(t){return null!==this.gaugeInstance?Promise.resolve(this.gaugeInstance.exportVisual(t)):Promise.resolve(new l.Group)},e}(a.Component);e.RadialGauge=u}])}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@progress/kendo-drawing"),require("react"),require("prop-types"),require("@progress/kendo-licensing"),require("@progress/kendo-react-intl")):"function"==typeof define&&define.amd?define(["@progress/kendo-drawing","react","prop-types","@progress/kendo-licensing","@progress/kendo-react-intl"],e):"object"==typeof exports?exports.KendoReactGauges=e(require("@progress/kendo-drawing"),require("react"),require("prop-types"),require("@progress/kendo-licensing"),require("@progress/kendo-react-intl")):t.KendoReactGauges=e(t.KendoDrawing,t.React,t.PropTypes,t.KendoLicensing,t.KendoReactIntl)}(window,(function(t,e,o,r,i){return function(t){var e={};function o(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,r){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(r,i,function(e){return t[e]}.bind(null,i));return r},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=9)}([function(e,o){e.exports=t},function(t,o){t.exports=e},function(t,e){t.exports=o},function(t,e,o){"use strict";o.r(e),o.d(e,"autoMajorUnit",(function(){return Kt})),o.d(e,"Point",(function(){return Qt})),o.d(e,"Box",(function(){return $t})),o.d(e,"Ring",(function(){return te})),o.d(e,"Sector",(function(){return ee})),o.d(e,"ShapeBuilder",(function(){return re})),o.d(e,"ShapeElement",(function(){return le})),o.d(e,"ChartElement",(function(){return ne})),o.d(e,"BoxElement",(function(){return ae})),o.d(e,"RootElement",(function(){return de})),o.d(e,"FloatElement",(function(){return ge})),o.d(e,"Text",(function(){return me})),o.d(e,"TextBox",(function(){return we})),o.d(e,"Title",(function(){return Ce})),o.d(e,"AxisLabel",(function(){return Se})),o.d(e,"Axis",(function(){return Re})),o.d(e,"Note",(function(){return Pe})),o.d(e,"CategoryAxis",(function(){return Je})),o.d(e,"DateCategoryAxis",(function(){return po})),o.d(e,"DateValueAxis",(function(){return mo})),o.d(e,"NumericAxis",(function(){return yo})),o.d(e,"LogarithmicAxis",(function(){return _o})),o.d(e,"PolarAxis",(function(){return Po})),o.d(e,"RadarCategoryAxis",(function(){return So})),o.d(e,"RadarNumericAxis",(function(){return Ro})),o.d(e,"RadarLogarithmicAxis",(function(){return Io})),o.d(e,"CurveProcessor",(function(){return jo})),o.d(e,"Gradients",(function(){return he})),o.d(e,"rectToBox",(function(){return xe})),o.d(e,"ChartAxis",(function(){return Eo})),o.d(e,"ChartPane",(function(){return zo})),o.d(e,"ChartPlotArea",(function(){return Uo})),o.d(e,"findAxisByName",(function(){return Do})),o.d(e,"Aggregates",(function(){return No})),o.d(e,"AreaChart",(function(){return jr})),o.d(e,"AreaSegment",(function(){return Rr})),o.d(e,"AxisGroupRangeTracker",(function(){return Er})),o.d(e,"Bar",(function(){return Hr})),o.d(e,"BarChart",(function(){return Kr})),o.d(e,"BarLabel",(function(){return Vr})),o.d(e,"BoxPlotChart",(function(){return ii})),o.d(e,"BoxPlot",(function(){return oi})),o.d(e,"BubbleChart",(function(){return ui})),o.d(e,"Bullet",(function(){return yi})),o.d(e,"BulletChart",(function(){return mi})),o.d(e,"CandlestickChart",(function(){return ti})),o.d(e,"Candlestick",(function(){return Zr})),o.d(e,"CategoricalChart",(function(){return ur})),o.d(e,"CategoricalErrorBar",(function(){return pr})),o.d(e,"CategoricalPlotArea",(function(){return Cn})),o.d(e,"Chart",(function(){return ua})),o.d(e,"ChartContainer",(function(){return Ai})),o.d(e,"ClipAnimation",(function(){return Ar})),o.d(e,"ClusterLayout",(function(){return Wr})),o.d(e,"Crosshair",(function(){return ki})),o.d(e,"CrosshairTooltip",(function(){return _i})),o.d(e,"DefaultAggregates",(function(){return $i})),o.d(e,"DonutChart",(function(){return gs})),o.d(e,"DonutPlotArea",(function(){return ys})),o.d(e,"DonutSegment",(function(){return ds})),o.d(e,"ErrorBarBase",(function(){return ar})),o.d(e,"ErrorRangeCalculator",(function(){return Ko})),o.d(e,"Highlight",(function(){return Sn})),o.d(e,"SharedTooltip",(function(){return Wn})),o.d(e,"Legend",(function(){return En})),o.d(e,"LegendItem",(function(){return Ln})),o.d(e,"LegendLayout",(function(){return In})),o.d(e,"LineChart",(function(){return Tr})),o.d(e,"LinePoint",(function(){return yr})),o.d(e,"LineSegment",(function(){return mr})),o.d(e,"Pane",(function(){return Mi})),o.d(e,"PieAnimation",(function(){return Qn})),o.d(e,"PieChart",(function(){return hs})),o.d(e,"PieChartMixin",(function(){return as})),o.d(e,"PiePlotArea",(function(){return cs})),o.d(e,"PieSegment",(function(){return ss})),o.d(e,"PlotAreaBase",(function(){return Yi})),o.d(e,"PlotAreaEventsMixin",(function(){return qi})),o.d(e,"PlotAreaFactory",(function(){return Vn})),o.d(e,"PointEventsMixin",(function(){return dr})),o.d(e,"RangeBar",(function(){return tn})),o.d(e,"RangeBarChart",(function(){return on})),o.d(e,"RangeAreaPoint",(function(){return sn})),o.d(e,"RangeAreaChart",(function(){return un})),o.d(e,"ScatterChart",(function(){return pi})),o.d(e,"ScatterErrorBar",(function(){return ni})),o.d(e,"ScatterLineChart",(function(){return $n})),o.d(e,"Selection",(function(){return Fn})),o.d(e,"SeriesAggregator",(function(){return Qi})),o.d(e,"SeriesBinder",(function(){return Xo})),o.d(e,"SplineSegment",(function(){return Cr})),o.d(e,"SplineAreaSegment",(function(){return Lr})),o.d(e,"StackWrap",(function(){return Yr})),o.d(e,"Tooltip",(function(){return Nn})),o.d(e,"OHLCChart",(function(){return fn})),o.d(e,"OHLCPoint",(function(){return dn})),o.d(e,"WaterfallChart",(function(){return vn})),o.d(e,"WaterfallSegment",(function(){return yn})),o.d(e,"XYPlotArea",(function(){return es})),o.d(e,"MousewheelZoom",(function(){return Bn})),o.d(e,"ZoomSelection",(function(){return Rn})),o.d(e,"Pannable",(function(){return Mn})),o.d(e,"anyHasZIndex",(function(){return Pr})),o.d(e,"appendIfNotNull",(function(){return Ti})),o.d(e,"areNumbers",(function(){return $r})),o.d(e,"bindSegments",(function(){return Bi})),o.d(e,"categoriesCount",(function(){return hr})),o.d(e,"countNumbers",(function(){return Ho})),o.d(e,"equalsIgnoreCase",(function(){return Ii})),o.d(e,"evalOptions",(function(){return lr})),o.d(e,"filterSeriesByType",(function(){return Li})),o.d(e,"getDateField",(function(){return ji})),o.d(e,"getField",(function(){return Go})),o.d(e,"hasGradientOverlay",(function(){return zr})),o.d(e,"hasValue",(function(){return si})),o.d(e,"isDateAxis",(function(){return Ei})),o.d(e,"segmentVisible",(function(){return Ri})),o.d(e,"singleItemOrArray",(function(){return Di})),o.d(e,"createOutOfRangePoints",(function(){return Hi})),o.d(e,"ChartService",(function(){return Q})),o.d(e,"DomEventsBuilder",(function(){return $})),o.d(e,"FormatService",(function(){return X})),o.d(e,"IntlService",(function(){return F})),o.d(e,"TemplateService",(function(){return et})),o.d(e,"Sparkline",(function(){return xa})),o.d(e,"Navigator",(function(){return Pa})),o.d(e,"NavigatorHint",(function(){return Ca})),o.d(e,"StockChart",(function(){return Ma})),o.d(e,"constants",(function(){return r})),o.d(e,"Gauge",(function(){return Ha})),o.d(e,"LinearGauge",(function(){return cp})),o.d(e,"LinearPointer",(function(){return $a})),o.d(e,"ArrowLinearPointer",(function(){return rp})),o.d(e,"BarLinearPointer",(function(){return pp})),o.d(e,"LinearScale",(function(){return qa})),o.d(e,"RadialGauge",(function(){return Op})),o.d(e,"RadialPointer",(function(){return Sp})),o.d(e,"RadialScale",(function(){return mp})),o.d(e,"ArcGauge",(function(){return jp})),o.d(e,"RangePointer",(function(){return Lp})),o.d(e,"ArcScale",(function(){return Tp})),o.d(e,"CircularGauge",(function(){return Ep})),o.d(e,"Barcode",(function(){return Cl})),o.d(e,"QRCode",(function(){return Sh})),o.d(e,"addClass",(function(){return w})),o.d(e,"removeClass",(function(){return C})),o.d(e,"alignPathToPixel",(function(){return S})),o.d(e,"clockwise",(function(){return A})),o.d(e,"convertableToNumber",(function(){return M})),o.d(e,"deepExtend",(function(){return B})),o.d(e,"elementStyles",(function(){return D})),o.d(e,"getSpacing",(function(){return V})),o.d(e,"getTemplate",(function(){return ot})),o.d(e,"getter",(function(){return nt})),o.d(e,"grep",(function(){return st})),o.d(e,"hasClasses",(function(){return at})),o.d(e,"HashMap",(function(){return lt})),o.d(e,"inArray",(function(){return ht})),o.d(e,"interpolateValue",(function(){return ct})),o.d(e,"InstanceObserver",(function(){return dt})),o.d(e,"isArray",(function(){return b})),o.d(e,"isFunction",(function(){return T})),o.d(e,"isNumber",(function(){return P})),o.d(e,"isObject",(function(){return I})),o.d(e,"isString",(function(){return O})),o.d(e,"map",(function(){return ft})),o.d(e,"mousewheelDelta",(function(){return yt})),o.d(e,"FontLoader",(function(){return Lt})),o.d(e,"setDefaultOptions",(function(){return jt})),o.d(e,"sparseArrayLimits",(function(){return Et})),o.d(e,"styleValue",(function(){return L})),o.d(e,"find",(function(){return Dt})),o.d(e,"elementScale",(function(){return Ht})),o.d(e,"autoTextColor",(function(){return Ft})),o.d(e,"createHashSet",(function(){return qt})),o.d(e,"append",(function(){return mt})),o.d(e,"bindEvents",(function(){return xt})),o.d(e,"Class",(function(){return k.Class})),o.d(e,"defined",(function(){return bt})),o.d(e,"deg",(function(){return wt})),o.d(e,"elementOffset",(function(){return _t})),o.d(e,"elementSize",(function(){return Ct})),o.d(e,"eventElement",(function(){return kt})),o.d(e,"eventCoordinates",(function(){return St})),o.d(e,"last",(function(){return At})),o.d(e,"limitValue",(function(){return Pt})),o.d(e,"logToConsole",(function(){return k.logToConsole})),o.d(e,"objectKey",(function(){return Ot})),o.d(e,"rad",(function(){return Mt})),o.d(e,"round",(function(){return Tt})),o.d(e,"unbindEvents",(function(){return Rt})),o.d(e,"valueOrDefault",(function(){return Bt})),o.d(e,"chartBaseTheme",(function(){return Rh}));var r={};o.r(r),o.d(r,"NAVIGATOR_AXIS",(function(){return Sa})),o.d(r,"NAVIGATOR_PANE",(function(){return ka}));var i="arc",n="#000",s="bottom",a="center",p="circle",l="date",h=/\{\d+:?/,c="left",u=Number.MAX_VALUE,d=-Number.MAX_VALUE,f="right",g="top",y="value",v="#fff",m="x",x="y";function b(t){return Array.isArray(t)}function w(t,e){for(var o=b(e)?e:[e],r=0;r<o.length;r++){var i=o[r];-1===t.className.indexOf(i)&&(t.className+=" "+i)}}var _=/\s+/g;function C(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(_," "))}var k=o(0);function S(t){var e=.5;t.options.stroke&&k.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var o=0;o<t.segments.length;o++)t.segments[o].anchor().round(0).translate(e,e);return t}function A(t,e){return-t.x*e.y+t.y*e.x<0}function P(t){return"number"==typeof t&&!isNaN(t)}function O(t){return"string"==typeof t}function M(t){return P(t)||O(t)&&isFinite(t)}function T(t){return"function"==typeof t}function R(t,e){for(var o in e){var r=e[o],i=typeof r,n=void 0;if((n="object"===i&&null!==r?r.constructor:null)&&n!==Array)if(r instanceof Date)t[o]=new Date(r.getTime());else if(T(r.clone))t[o]=r.clone();else{var s=t[o];t[o]="object"==typeof s&&s||{},R(t[o],r)}else"undefined"!==i&&(t[o]=r)}return t}function B(t){for(var e=arguments,o=arguments.length,r=1;r<o;r++)R(t,e[r]);return t}function I(t){return"object"==typeof t}function L(t){return P(t)?t+"px":t}var j=/width|height|top|left|bottom|right/i;function E(t){return j.test(t)}function D(t,e){var o=O(e)?[e]:e;if(b(o)){for(var r={},i=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];r[s]=E(s)?parseFloat(i[s]):i[s]}return r}if(I(e))for(var a in e)t.style[a]=L(e[a])}function V(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o.top=o[f]=o[s]=o[c]=t:(o.top=t.top||e,o[f]=t[f]||e,o[s]=t[s]||e,o[c]=t[c]||e),o}var z={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},U=function(){},H={implementation:{configurable:!0}};U.register=function(t){z=t},H.implementation.get=function(){return z},Object.defineProperties(U,H);var F=U,N=/\{(\d+)(:[^\}]+)?\}/g,G=function(t){this._intlService=t},W={intl:{configurable:!0}};W.intl.get=function(){return this._intlService||F.implementation},W.intl.set=function(t){this._intlService=t},G.prototype.auto=function(t){for(var e=[],o=arguments.length-1;o-- >0;)e[o]=arguments[o+1];var r=this.intl;return O(t)&&t.match(h)?r.format.apply(r,[t].concat(e)):r.toString(e[0],t)},G.prototype.localeAuto=function(t,e,o){var r=this.intl;return O(t)&&t.match(h)?t.replace(N,(function(t,i,n){var s=e[parseInt(i,10)];return r.toString(s,n?n.substring(1):"",o)})):r.toString(e[0],t,o)},Object.defineProperties(G.prototype,W);var X=G,Y=function(t,e){void 0===e&&(e={}),this._intlService=e.intlService,this.sender=e.sender||t,this.format=new X(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},q={intl:{configurable:!0}};q.intl.get=function(){return this._intlService||F.implementation},q.intl.set=function(t){this._intlService=t,this.format.intl=t},Y.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},Y.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(Y.prototype,q);var K,Q=Y,Z=function(){};Z.register=function(t){K=t},Z.create=function(t,e){if(K)return K.create(t,e)};var $=Z,J={compile:function(t){return t}},tt=function(){};tt.register=function(t){J=t},tt.compile=function(t){return J.compile(t)};var et=tt;function ot(t){var e;return void 0===t&&(t={}),t.template?t.template=e=et.compile(t.template):T(t.content)&&(e=t.content),e}var rt=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,it={};function nt(t){if(it[t])return it[t];var e=[];return t.replace(rt,(function(t,o,r,i){e.push(k.drawing.util.defined(o)?o:r||i)})),it[t]=function(t){for(var o=t,r=0;r<e.length&&o;r++)o=o[e[r]];return o},it[t]}function st(t,e){for(var o=t.length,r=[],i=0;i<o;i++)e(t[i])&&r.push(t[i]);return r}function at(t,e){if(t.className)for(var o=e.split(" "),r=0;r<o.length;r++)if(-1!==t.className.indexOf(o[r]))return!0}it[void 0]=function(t){return t};var pt=function(){this._map={}};pt.prototype.get=function(t){return this._map[this._key(t)]},pt.prototype.set=function(t,e){this._map[this._key(t)]=e},pt.prototype._key=function(t){return t instanceof Date?t.getTime():t};var lt=pt;function ht(t,e){if(e)return-1!==e.indexOf(t)}function ct(t,e,o){return k.drawing.util.round(t+(e-t)*o,3)}var ut=function(t,e){this.observer=t,this.handlerMap=B({},this.handlerMap,e)};ut.prototype.trigger=function(t,e){var o,r=this.observer,i=this.handlerMap;return i[t]?o=this.callObserver(i[t],e):r.trigger&&(o=this.callObserver("trigger",t,e)),o},ut.prototype.callObserver=function(t){for(var e=[],o=arguments.length-1;o-- >0;)e[o]=arguments[o+1];return this.observer[t].apply(this.observer,e)},ut.prototype.requiresHandlers=function(t){if(this.observer.requiresHandlers)return this.observer.requiresHandlers(t);for(var e=0;e<t.length;e++)if(this.handlerMap[t[e]])return!0};var dt=ut;function ft(t,e){for(var o=t.length,r=[],i=0;i<o;i++){var n=e(t[i]);k.drawing.util.defined(n)&&r.push(n)}return r}var gt=k.support.browser||{};function yt(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,gt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),e=e>0?Math.ceil(e):Math.floor(e)}var vt=k.drawing.util,mt=vt.append,xt=vt.bindEvents,bt=vt.defined,wt=vt.deg,_t=vt.elementOffset,Ct=vt.elementSize,kt=vt.eventElement,St=vt.eventCoordinates,At=vt.last,Pt=vt.limitValue,Ot=vt.objectKey,Mt=vt.rad,Tt=vt.round,Rt=vt.unbindEvents,Bt=vt.valueOrDefault,It=function(){};It.fetchFonts=function(t,e,o){void 0===o&&(o={depth:0});!t||o.depth>5||!document.fonts||Object.keys(t).forEach((function(r){var i=t[r];"dataSource"!==r&&"$"!==r[0]&&i&&("font"===r?e.push(i):"object"==typeof i&&(o.depth++,It.fetchFonts(i,e,o),o.depth--))}))},It.loadFonts=function(t,e){var o=[];if(t.length>0&&document.fonts){try{o=t.map((function(t){return document.fonts.load(t)}))}catch(t){Object(k.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},It.preloadFonts=function(t,e){var o=[];It.fetchFonts(t,o),It.loadFonts(o,e)};var Lt=It;function jt(t,e){var o=t.prototype;o.options?o.options=B({},o.options,e):o.options=e}function Et(t){for(var e=u,o=d,r=0,i=t.length;r<i;r++){var n=t[r];null!==n&&isFinite(n)&&(e=Math.min(e,n),o=Math.max(o,n))}return{min:e===u?void 0:e,max:o===d?void 0:o}}function Dt(t,e){for(var o=0;o<t.length;o++){var r=t[o];if(e(r,o,t))return r}}var Vt=k.geometry.Matrix,zt=/matrix\((.*)\)/;function Ut(t){var e=getComputedStyle(t).transform;return"none"===e?Vt.unit():function(t){var e=t.match(zt);if(null===e||2!==e.length)return Vt.unit();var o=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(Vt,[null].concat(o)))}(e)}function Ht(t){if(!t)return Vt.unit();for(var e=Ut(t),o=t.parentElement;o;){var r=Ut(o);e=e.multiplyCopy(r),o=o.parentElement}return e.b=e.c=e.e=e.f=0,e}var Ft=function(t){return new k.Color(t).isDark()?v:n},Nt={},Gt=function(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e},Wt={size:{configurable:!0}};Gt.prototype.values=function(){return this._values.filter((function(t){return t!==Nt}))},Gt.prototype.has=function(t){return void 0!==this._index[t]},Gt.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Gt.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Nt,delete this._index[t])},Gt.prototype.clear=function(){this._index={},this._values=[]},Wt.size.get=function(){return this._values.length},Object.defineProperties(Gt.prototype,Wt);var Xt=function(t){this._set=new Set(t)},Yt={size:{configurable:!0}};Xt.prototype.values=function(){return Array.from(this._set)},Xt.prototype.has=function(t){return this._set.has(t)},Xt.prototype.add=function(t){this._set.add(t)},Xt.prototype.delete=function(t){this._set.delete(t)},Xt.prototype.clear=function(){this._set.clear()},Yt.size.get=function(){return this._set.size},Object.defineProperties(Xt.prototype,Yt);function qt(t){return function(){var t=!1;"function"==typeof Set&&(t=new Set([1]).has(1));return t}()?new Xt(t):new Gt(t)}function Kt(t,e){var o=Tt(e-t,9);if(0===o){if(0===e)return.1;o=Math.abs(e)}var r=Math.pow(10,Math.floor(Math.log(o)/Math.log(10))),i=Tt(o/r,10);return Tt(r*(i<1.904762?.2:i<4.761904?.5:i<9.523809?1:2),10)}var Qt=function(t){function e(e,o){t.call(this),this.x=e||0,this.y=o||0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},e.prototype.rotate=function(t,e){var o=Mt(e),r=Math.cos(o),i=Math.sin(o),n=t.x,s=t.y,a=this.x,p=this.y;return this.x=Tt(n+(a-n)*r+(p-s)*i,3),this.y=Tt(s+(p-s)*r-(a-n)*i,3),this},e.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},e.prototype.distanceTo=function(t){var e=this.x-t.x,o=this.y-t.y;return Math.sqrt(e*e+o*o)},e.onCircle=function(t,o,r){var i=Mt(o);return new e(t.x-r*Math.cos(i),t.y-r*Math.sin(i))},e}(k.Class);function Zt(t,e,o,r,i){var n=Mt(i);return new Qt(o+(t-o)*Math.cos(n)+(e-r)*Math.sin(n),r-(t-o)*Math.sin(n)+(e-r)*Math.cos(n))}var $t=function(t){function e(e,o,r,i){t.call(this),this.x1=e||0,this.y1=o||0,this.x2=r||0,this.y2=i||0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},e.prototype.width=function(){return this.x2-this.x1},e.prototype.height=function(){return this.y2-this.y1},e.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},e.prototype.move=function(t,e){var o=this.height(),r=this.width();return bt(t)&&(this.x1=t,this.x2=this.x1+r),bt(e)&&(this.y1=e,this.y2=this.y1+o),this},e.prototype.wrap=function(t){return this.x1=Math.min(this.x1,t.x1),this.y1=Math.min(this.y1,t.y1),this.x2=Math.max(this.x2,t.x2),this.y2=Math.max(this.y2,t.y2),this},e.prototype.wrapPoint=function(t){var o=b(t),r=o?t[0]:t.x,i=o?t[1]:t.y;return this.wrap(new e(r,i,r,i)),this},e.prototype.snapTo=function(t,e){return e!==m&&e||(this.x1=t.x1,this.x2=t.x2),e!==x&&e||(this.y1=t.y1,this.y2=t.y2),this},e.prototype.alignTo=function(t,e){var o=this.height(),r=this.width(),i=e===g||e===s?x:m,n=i===x?o:r;if(e===a){var p=t.center(),l=this.center();this.x1+=p.x-l.x,this.y1+=p.y-l.y}else this[i+1]=e===g||e===c?t[i+1]-n:t[i+2];return this.x2=this.x1+r,this.y2=this.y1+o,this},e.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},e.prototype.expand=function(t,e){return this.shrink(-t,-e),this},e.prototype.pad=function(t){var e=V(t);return this.x1-=e.left,this.x2+=e.right,this.y1-=e.top,this.y2+=e.bottom,this},e.prototype.unpad=function(t){var e=V(t);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,this.pad(e)},e.prototype.clone=function(){return new e(this.x1,this.y1,this.x2,this.y2)},e.prototype.center=function(){return new Qt(this.x1+this.width()/2,this.y1+this.height()/2)},e.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},e.prototype.points=function(){return[new Qt(this.x1,this.y1),new Qt(this.x2,this.y1),new Qt(this.x2,this.y2),new Qt(this.x1,this.y2)]},e.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},e.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},e.prototype.rotate=function(t){var e=this.width(),o=this.height(),r=this.center(),i=r.x,n=r.y,s=Zt(0,0,i,n,t),a=Zt(e,0,i,n,t),p=Zt(e,o,i,n,t),l=Zt(0,o,i,n,t);return e=Math.max(s.x,a.x,p.x,l.x)-Math.min(s.x,a.x,p.x,l.x),o=Math.max(s.y,a.y,p.y,l.y)-Math.min(s.y,a.y,p.y,l.y),this.x2=this.x1+e,this.y2=this.y1+o,this},e.prototype.toRect=function(){return new k.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},e.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},e.prototype.align=function(t,e,o){var r=e+1,i=e+2,n=e===m?"width":"height",p=this[n]();ht(o,[c,g])?(this[r]=t[r],this[i]=this[r]+p):ht(o,[f,s])?(this[i]=t[i],this[r]=this[i]-p):o===a&&(this[r]=t[r]+(t[n]()-p)/2,this[i]=this[r]+p)},e}(k.Class);function Jt(t,e){return t-e}var te=function(t){function e(e,o,r,i,n){t.call(this),this.center=e,this.innerRadius=o,this.radius=r,this.startAngle=i,this.angle=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},e.prototype.middle=function(){return this.startAngle+this.angle/2},e.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},e.prototype.point=function(t,e){var o=Mt(t),r=Math.cos(o),i=Math.sin(o),n=e?this.innerRadius:this.radius,s=Tt(this.center.x-r*n,3),a=Tt(this.center.y-i*n,3);return new Qt(s,a)},e.prototype.adjacentBox=function(t,e,o){var r=this.clone().expand(t),i=r.middle(),n=r.point(i),s=e/2,a=o/2,p=Math.sin(Mt(i)),l=Math.cos(Mt(i)),h=n.x-s,c=n.y-a;return Math.abs(p)<.9&&(h+=s*-l/Math.abs(l)),Math.abs(l)<.9&&(c+=a*-p/Math.abs(p)),new $t(h,c,h+e,c+o)},e.prototype.containsPoint=function(t){var e=this.center,o=this.innerRadius,r=this.radius,i=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,a=t.y-e.y,p=new Qt(s,a),l=this.point(i),h=new Qt(l.x-e.x,l.y-e.y),c=this.point(n),u=new Qt(c.x-e.x,c.y-e.y),d=Tt(s*s+a*a,3);return(h.equals(p)||A(h,p))&&!A(u,p)&&d>=o*o&&d<=r*r},e.prototype.getBBox=function(){var t,e=new $t(u,u,d,d),o=Tt(this.startAngle%360),r=Tt((o+this.angle)%360),i=this.innerRadius,n=[0,90,180,270,o,r].sort(Jt),s=n.indexOf(o),a=n.indexOf(r);t=o===r?n:s<a?n.slice(s,a+1):[].concat(n.slice(0,a+1),n.slice(s,n.length));for(var p=0;p<t.length;p++){var l=this.point(t[p]);e.wrapPoint(l),e.wrapPoint(l,i)}return i||e.wrapPoint(this.center),e},e.prototype.expand=function(t){return this.radius+=t,this},e}(k.Class),ee=function(t){function e(e,o,r,i){t.call(this,e,0,o,r,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.expand=function(e){return t.prototype.expand.call(this,e)},e.prototype.clone=function(){return new e(this.center,this.radius,this.startAngle,this.angle)},e.prototype.setRadius=function(t){return this.radius=t,this},e}(te),oe=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createRing=function(t,e){var o=t.startAngle+180,r=t.angle+o;t.angle>0&&o===r&&(r+=.001);var i=new k.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),s=Math.max(t.innerRadius,0),a=new k.geometry.Arc(i,{startAngle:o,endAngle:r,radiusX:n,radiusY:n}),p=k.drawing.Path.fromArc(a,e).close();if(s){a.radiusX=a.radiusY=s;var l=a.pointAt(r);p.lineTo(l.x,l.y),p.arc(r,o,s,s,!0)}else p.lineTo(i.x,i.y);return p},e}(k.Class);oe.current=new oe;var re=oe,ie=function(t){function e(e){t.call(this),this.children=[],this.options=B({},this.options,this.initUserOptions(e))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){return t},e.prototype.reflow=function(t){for(var e,o=this.children,r=0;r<o.length;r++){var i=o[r];i.reflow(t),e=e?e.wrap(i.box):i.box.clone()}this.box=e||t},e.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},e.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},e.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},e.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},e.prototype.translateChildren=function(t,e){for(var o=this.children,r=o.length,i=0;i<r;i++)o[i].box.translate(t,e)},e.prototype.append=function(){for(var t=arguments,e=this,o=0;o<arguments.length;o++){var r=t[o];e.children.push(r),r.parent=e}},e.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},e.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this,this.parent&&this.parent.appendVisual(this.visual))},e.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},e.prototype.createVisual=function(){this.visual=new k.drawing.Group({zIndex:this.options.zIndex,visible:Bt(this.options.visible,!0)})},e.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=k.drawing.Animation.create(this.visual,this.options.animation))},e.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):bt(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},e.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},e.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},e.prototype.stackVisual=function(t){var e,o=t.options.zIndex||0,r=this.visual.children,i=r.length;for(e=0;e<i;e++){var n=r[e];if(Bt(n.options.zIndex,0)>o)break}this.visual.insert(e,t)},e.prototype.traverse=function(t){for(var e=this.children,o=e.length,r=0;r<o;r++){var i=e[r];t(i),i.traverse&&i.traverse(t)}},e.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},e.prototype.renderComplete=function(){},e.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},e.prototype.toggleHighlight=function(t,e){var o=this,r=(this.options||{}).highlight||{},i=r.visual,n=this._highlight;if(!n){var s={fill:{color:v,opacity:e||.2},stroke:{color:v,width:1,opacity:e||.2}};if(i){if(!(n=this._highlight=i(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return o.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);bt(n.options.zIndex)||(n.options.zIndex=Bt(r.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},e.prototype.createGradientOverlay=function(t,e,o){var r=new k.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return r.segments.elements(t.segments.elements()),r},e.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},e.prototype.supportsPointInactiveOpacity=function(){return!0},e}(k.Class);ie.prototype.options={};var ne=ie,se=function(t){function e(e){t.call(this,e),this.options.margin=V(this.options.margin),this.options.padding=V(this.options.padding)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(e){var o,r=this,i=this.options,n=i.width,s=i.height,a=i.shrinkToFit,p=n&&s,l=i.margin,h=i.padding,c=i.border.width,u=function(){r.align(e,m,i.align),r.align(e,x,i.vAlign),r.paddingBox=o.clone().unpad(l).unpad(c)},d=e.clone();p&&(d.x2=d.x1+n,d.y2=d.y1+s),a&&d.unpad(l).unpad(c).unpad(h),t.prototype.reflow.call(this,d),o=p?this.box=new $t(0,0,n,s):this.box,a&&p?(u(),d=this.contentBox=this.paddingBox.clone().unpad(h)):(d=this.contentBox=o.clone(),o.pad(h).pad(c).pad(l),u()),this.translateChildren(o.x1-d.x1+l.left+c+h.left,o.y1-d.y1+l.top+c+h.top);for(var f=this.children,g=0;g<f.length;g++){var y=f[g];y.reflow(y.box)}},e.prototype.align=function(t,e,o){this.box.align(t,e,o)},e.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(k.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},e.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:Bt(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},e}(ne);jt(se,{align:c,vAlign:g,margin:{},padding:{},border:{color:n,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var ae=se,pe=function(t){function e(e,o){t.call(this,e),this.pointData=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options,e=this.paddingBox,o=t.type,r=t.rotation,i=e.center(),n=e.width()/2,s=e.height()/2;if(!t.visible||!this.hasBox())return null;var a,l=this.visualStyle();if(o===p)a=new k.drawing.Circle(new k.geometry.Circle([Tt(e.x1+n,3),Tt(e.y1+s,3)],Math.min(n,s)),l);else if("triangle"===o)a=k.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],l).close();else if("cross"===o)(a=new k.drawing.MultiPath(l)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1);else{var h=e.toRect();if("roundedRect"===o){var c=Bt(t.borderRadius,h.width()/5);h.setCornerRadius(c)}a=k.drawing.Path.fromRect(h,l)}return r&&a.transform(k.geometry.transform().rotate(-r,[i.x,i.y])),a.options.zIndex=t.zIndex,a},e.prototype.createElement=function(){var t=this,e=this.options.visual,o=this.pointData||{};return e?e({value:o.value,dataItem:o.dataItem,sender:this.getSender(),series:o.series,category:o.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},e.prototype.visualOptions=function(){var t=this.options;return{background:t.background,border:t.border,margin:t.margin,padding:t.padding,type:t.type,size:t.width,visible:t.visible}},e.prototype.createVisual=function(){this.visual=this.createElement()},e}(ae);jt(pe,{type:p,align:a,vAlign:a});var le=pe,he={glass:{type:"linear",rotation:0,stops:[{offset:0,color:v,opacity:0},{offset:.25,color:v,opacity:.3},{offset:1,color:v,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:v,opacity:.55},{offset:.65,color:v,opacity:0},{offset:.95,color:v,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:v,opacity:.06},{offset:.83,color:v,opacity:.2},{offset:.95,color:v,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:v,opacity:0},{offset:.5,color:v,opacity:.3},{offset:.99,color:v,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:v,opacity:.2},{offset:.15,color:v,opacity:.15},{offset:.17,color:v,opacity:.35},{offset:.85,color:v,opacity:.05},{offset:.87,color:v,opacity:.15},{offset:.99,color:v,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};function ce(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var o=Math.min(t.x1,e.x1),r=Math.max(t.x1,e.x1),i=Math.min(t.x2,e.x2),n=Math.max(t.x2,e.x2),s=Math.min(t.y1,e.y1),a=Math.max(t.y1,e.y1),p=Math.min(t.y2,e.y2),l=Math.max(t.y2,e.y2),h=[];return h[0]=new $t(r,s,i,a),h[1]=new $t(o,a,r,p),h[2]=new $t(i,a,n,p),h[3]=new $t(r,p,i,l),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(h[4]=new $t(o,s,r,a),h[5]=new $t(i,p,n,l)):(h[4]=new $t(i,s,n,a),h[5]=new $t(o,p,r,l)),st(h,(function(t){return t.height()>0&&t.width()>0}))[0]}var ue=function(t){function e(e){t.call(this,e);var o=this.options;o.width=parseInt(o.width,10),o.height=parseInt(o.height,10),this.gradients={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(){var t=this.options,e=this.children,o=new $t(0,0,t.width,t.height);this.box=o.unpad(t.margin);for(var r=0;r<e.length;r++)e[r].reflow(o),o=ce(o,e[r].box)||new $t},e.prototype.createVisual=function(){this.visual=new k.drawing.Group,this.createBackground()},e.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),r=k.drawing.Path.fromRect(o.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(r)},e.prototype.getRoot=function(){return this},e.prototype.createGradient=function(t){var e,o=this.gradients,r=Ot(t),i=he[t.gradient];if(o[r])e=o[r];else{var n=Object.assign({},i,t);"linear"===i.type?e=new k.drawing.LinearGradient(n):(t.innerRadius&&(n.stops=function(t){for(var e=t.stops,o=t.innerRadius/t.radius*100,r=e.length,i=[],n=0;n<r;n++){var s=Object.assign({},e[n]);s.offset=(s.offset*(100-o)+o)/100,i.push(s)}return i}(n)),(e=new k.drawing.RadialGradient(n)).supportVML=!1!==i.supportVML),o[r]=e}return e},e.prototype.cleanGradients=function(){var t=this.gradients;for(var e in t)t[e]._observers=[]},e.prototype.size=function(){var t=this.options;return new $t(0,0,t.width,t.height)},e}(ne);jt(ue,{width:600,height:400,background:v,border:{color:n,width:0},margin:V(5),zIndex:-2});var de=ue,fe=function(t){function e(e){t.call(this,e),this._initDirection()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=m,this.elementAxis=x,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=x,this.elementAxis=m,this.groupSizeField="height",this.elementSizeField="width",this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},e.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},e.prototype.reflowChildren=function(){var t=this.box,e=this.elementAxis,o=this.groupAxis,r=this.elementSizeField,i=this.groupSizeField,n=this.groupOptions(),s=n.groups,a=n.groupsSize,p=n.maxGroupElementsSize,l=s.length,h=t[o+1]+this.alignStart(a,t[i]());if(l){for(var c=h,u=0;u<l;u++){for(var d=s[u],f=d.groupElements,g=t[e+1],y=f.length,v=0;v<y;v++){var m=f[v],x=this.elementSize(m),b=c+this.alignStart(x[i],d.groupSize),w=new $t;w[o+1]=b,w[o+2]=b+x[i],w[e+1]=g,w[e+2]=g+x[r],m.reflow(w),g+=x[r]+this.elementSpacing}c+=d.groupSize+this.groupSpacing}t[o+1]=h,t[o+2]=h+a,t[e+2]=t[e+1]+p}},e.prototype.alignStart=function(t,e){var o=0,r=this.options.align;return r===f||r===s?o=e-t:r===a&&(o=(e-t)/2),o},e.prototype.groupOptions=function(){for(var t=this.box,e=this.children,o=this.elementSizeField,r=this.groupSizeField,i=this.elementSpacing,n=this.groupSpacing,s=Tt(t[o]()),a=e.length,p=[],l=0,h=0,c=0,u=0,d=[],f=0;f<a;f++){var g=e[f];g.box||g.reflow(t);var y=this.elementSize(g);this.options.wrap&&Tt(h+i+y[o])>s&&(p.push({groupElements:d,groupSize:l,groupElementsSize:h}),u=Math.max(u,h),c+=n+l,l=0,h=0,d=[]),l=Math.max(l,y[r]),h>0&&(h+=i),h+=y[o],d.push(g)}return p.push({groupElements:d,groupSize:l,groupElementsSize:h}),{groups:p,groupsSize:c+=l,maxGroupElementsSize:u=Math.max(u,h)}},e.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},e.prototype.createVisual=function(){},e}(ne);jt(fe,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var ge=fe,ye=k.drawing.Text,ve=function(t){function e(e,o){t.call(this,o),this.content=e,this.reflow(new $t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,o=e.size=k.drawing.util.measureText(this.content,{font:e.font});this.baseline=o.baseline,this.box=new $t(t.x1,t.y1,t.x1+o.width,t.y1+o.height)},e.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,r=t.opacity,i=t.cursor;this.visual=new ye(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:r},cursor:i})},e}(ne);jt(ve,{font:"12px sans-serif",color:n});var me=ve;function xe(t){var e=t.origin,o=t.bottomRight();return new $t(e.x,e.y,o.x,o.y)}var be=/\n/m,we=function(t){function e(e,o,r){t.call(this,o),this.content=e,this.data=r,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new $t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initContainer=function(){var t=this.options,e=String(this.content).split(be),o=new ge({vertical:!0,align:t.align,wrap:!1}),r=B({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var i=0;i<e.length;i++){var n=new me(e[i].trim(),r);o.append(n)}},e.prototype.reflow=function(e){var o=this.options,r=o.visual;if(this.container.options.align=o.align,r&&!this._boxReflow){var i=e;i.hasSize()||(this._boxReflow=!0,this.reflow(i),this._boxReflow=!1,i=this.box);var n=this.visual=r(this.visualContext(i));n&&(i=xe(n.clippedBBox()||new k.geometry.Rect),n.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=i}else if(t.prototype.reflow.call(this,e),o.rotation){var s=V(o.margin),a=this.box.unpad(s);this.targetBox=e,this.normalBox=a.clone(),(a=this.rotate()).translate(s.left-s.right,s.top-s.bottom),this.rotatedBox=a.clone(),a.pad(s)}},e.prototype.createVisual=function(){var t=this.options;if(this.visual=new k.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()){var e=k.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle());this.visual.append(e)}},e.prototype.renderVisual=function(){if(this.options.visible)if(this.options.visual){var e=this.visual;e&&!bt(e.options.noclip)&&(e.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()}else t.prototype.renderVisual.call(this)},e.prototype.visualContext=function(t){var e=this,o={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(o,this.data),o},e.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},e.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,m,t.align),this.align(this.targetBox,x,t.vAlign),this.box},e.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),o=e.x,r=e.y,i=this.rotatedBox.center();return k.geometry.transform().translate(i.x-o,i.y-r).rotate(t,[o,r])},e}(ae),_e=function(t){function e(e){t.call(this,e),this.append(new we(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(e){t.prototype.reflow.call(this,e),this.box.snapTo(e,m)},e.buildTitle=function(t,o,r){var i,n=t;return"string"==typeof t&&(n={text:t}),(n=Object.assign({visible:!0},r,n))&&n.visible&&n.text&&(i=new e(n),o.append(i)),i},e}(ne);jt(_e,{color:n,position:g,align:a,margin:V(5),padding:V(5)});var Ce=_e,ke=function(t){function e(e,o,r,i,n){t.call(this,o,n),this.text=o,this.value=e,this.index=r,this.dataItem=i,this.reflow(new $t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.visualContext=function(e){var o=t.prototype.visualContext.call(this,e);return o.value=this.value,o.dataItem=this.dataItem,o.format=this.options.format,o.culture=this.options.culture,o},e.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:kt(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},e.prototype.rotate=function(){if(this.options.alignRotation!==a){var e=this.normalBox.toRect(),o=this.rotationTransform();this.box=xe(e.bbox(o.matrix()))}else t.prototype.rotate.call(this);return this.box},e.prototype.rotationTransform=function(){var e=this.options,o=e.rotation;if(!o)return null;if(e.alignRotation===a)return t.prototype.rotationTransform.call(this);var r=k.geometry.transform().rotate(o).matrix(),i=this.normalBox.toRect(),n=this.targetBox.toRect(),p=e.rotationOrigin||g,l=p===g||p===s?m:x,h=p===g||p===s?x:m,u=p===g||p===c?n.origin:n.bottomRight(),d=i.topLeft().transformCopy(r),f=i.topRight().transformCopy(r),y=i.bottomRight().transformCopy(r),v=i.bottomLeft().transformCopy(r),b=k.geometry.Rect.fromPoints(d,f,y,v),w={};w[h]=n.origin[h]-b.origin[h];var _,C,S=Math.abs(d[h]+w[h]-u[h]),A=Math.abs(f[h]+w[h]-u[h]);Tt(S,10)===Tt(A,10)?(_=d,C=f):A<S?(_=f,C=y):(_=d,C=v);var P=_[l]+(C[l]-_[l])/2;return w[l]=n.center()[l]-P,k.geometry.transform().translate(w.x,w.y).rotate(o)},e}(we);jt(ke,{_autoReflow:!1});var Se=ke,Ae=function(t){function e(e,o,r){t.call(this,o),this.fields=e,this.chartService=r,this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hide=function(){this.options.visible=!1},e.prototype.show=function(){this.options.visible=!0},e.prototype.render=function(){var t=this,e=this.options;if(e.visible){var o,r,i=e.label,n=e.icon,s=new $t,a=function(){return t},l=n.size,h=this.fields.text;if(bt(i)&&i.visible){var c=ot(i);c?h=c(this.fields):i.format&&(h=this.chartService.format.auto(i.format,h)),i.color||(i.color="inside"===i.position?"#fff":n.background),this.label=new we(h,B({},i)),this.label.aliasFor=a,"inside"!==i.position||bt(l)||(n.type===p?l=Math.max(this.label.box.width(),this.label.box.height()):(o=this.label.box.width(),r=this.label.box.height()),s.wrap(this.label.box))}n.width=o||l||7,n.height=r||l||7;var u=new le(B({},n));u.aliasFor=a,this.marker=u,this.append(u),this.label&&this.append(this.label),u.reflow(new $t),this.wrapperBox=s.wrap(u.box)}},e.prototype.reflow=function(t){var e,o,r,i=this.options,n=this.label,a=this.marker,p=this.wrapperBox,l=t.center(),h=i.line.length,u=i.position;i.visible&&(ht(u,[c,f])?u===c?(r=p.alignTo(t,u).translate(-h,t.center().y-p.center().y),i.line.visible&&(e=[t.x1,l.y],this.linePoints=[e,[r.x2,l.y]],o=r.clone().wrapPoint(e))):(r=p.alignTo(t,u).translate(h,t.center().y-p.center().y),i.line.visible&&(e=[t.x2,l.y],this.linePoints=[e,[r.x1,l.y]],o=r.clone().wrapPoint(e))):u===s?(r=p.alignTo(t,u).translate(t.center().x-p.center().x,h),i.line.visible&&(e=[l.x,t.y2],this.linePoints=[e,[l.x,r.y1]],o=r.clone().wrapPoint(e))):(r=p.alignTo(t,u).translate(t.center().x-p.center().x,-h),i.line.visible&&(e=[l.x,t.y1],this.linePoints=[e,[l.x,r.y2]],o=r.clone().wrapPoint(e))),a&&a.reflow(r),n&&(n.reflow(r),a&&("outside"===i.label.position&&n.box.alignTo(a.box,u),n.reflow(n.box))),this.contentBox=r,this.targetBox=t,this.box=o||r)},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},e.prototype.renderVisual=function(){var e=this,o=this.options,r=o.visual;o.visible&&r?(this.visual=r(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:o.background,border:o.background,icon:o.icon,label:o.label,line:o.line,position:o.position,visible:o.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):t.prototype.renderVisual.call(this)},e.prototype.createLine=function(){var t=this.options.line;if(this.linePoints){var e=k.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}});S(e),this.visual.append(e)}},e.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},e.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},e.prototype.out=function(t,e){var o=this.eventArgs(e);t.trigger("noteLeave",o)},e.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:kt(t),text:bt(e.label)?e.label.text:"",visual:this.visual})},e}(ae);jt(Ae,{icon:{visible:!0,type:p},label:{position:"inside",visible:!0,align:a,vAlign:a},line:{visible:!0},visible:!0,position:g,zIndex:2});var Pe=Ae;function Oe(t,e){var o=t.tickX,r=t.tickY,i=t.position,n=new k.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(o,i).lineTo(o+e.size,i):n.moveTo(i,r).lineTo(i,r+e.size),S(n),n}function Me(t,e){var o=t.lineStart,r=t.lineEnd,i=t.position,n=new k.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?n.moveTo(o,i).lineTo(r,i):n.moveTo(i,o).lineTo(i,r),S(n),n}var Te=function(t){function e(e,o){void 0===o&&(o=new Q),t.call(this,e),this.chartService=o,this.options.visible||(this.options=B({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=B({},{color:this.options.line.color,width:this.options.line.width,visible:"none"!==this.options.minorTickType},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=B({},{color:this.options.line.color,width:this.options.line.width,visible:"none"!==this.options.majorTickType},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){},e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},e.prototype.normalizeLabelRotation=function(t){var e=t.rotation;I(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},e.prototype.createLabels=function(){var t=this.options,e=t.vertical?f:a,o=B({},t.labels,{align:e,zIndex:t.zIndex}),r=Math.max(1,o.step);if(this.clearLabels(),o.visible){this.normalizeLabelRotation(o),"auto"===o.rotation&&(o.rotation=0,t.autoRotateLabels=!0);for(var i=this.labelsRange(),n=i.min;n<i.max;n+=r){var s={index:n,count:i.max},p=this.createAxisLabel(n,o,s);p&&(this.append(p),this.labels.push(p))}}},e.prototype.clearLabels=function(){this.children=st(this.children,(function(t){return!(t instanceof Se)})),this.labels=[]},e.prototype.clearTitle=function(){var t=this;this.title&&(this.children=st(this.children,(function(e){return e!==t.title})),this.title=void 0)},e.prototype.clear=function(){this.clearLabels(),this.clearTitle()},e.prototype.lineBox=function(){var t=this.options,e=this.box,o=t.vertical,r=t.labels.mirror,i=r?e.x1:e.x2,n=r?e.y2:e.y1,s=t.line.width||0;return o?new $t(i,e.y1,i,e.y2-s):new $t(e.x1,n,e.x2-s,n)},e.prototype.createTitle=function(){var t=this.options,e=B({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);if(e.visible&&e.text){var o=new we(e.text,e);this.append(o),this.title=o}},e.prototype.createNotes=function(){var t=this.options,e=t.notes,o=e.data||[];this.notes=[];for(var r=0;r<o.length;r++){var i=B({},e,o[r]);i.value=this.parseNoteValue(i.value);var n=new Pe({value:i.value,text:i.label.text,dataItem:i},i,this.chartService);n.options.visible&&(bt(n.options.position)?t.vertical&&!ht(n.options.position,[c,f])?n.options.position=t.reverse?c:f:t.vertical||ht(n.options.position,[g,s])||(n.options.position=t.reverse?s:g):t.vertical?n.options.position=t.reverse?c:f:n.options.position=t.reverse?s:g,this.append(n),this.notes.push(n))}},e.prototype.parseNoteValue=function(t){return t},e.prototype.renderVisual=function(){t.prototype.renderVisual.call(this),this.createPlotBands()},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.createBackground(),this.createLine()},e.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new k.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},e.prototype.createTicks=function(t){var e=this.options,o=this.lineBox(),r=e.labels.mirror,i=e.majorTicks.visible?e.majorUnit:0,n={vertical:e.vertical};function s(e,i,s){var a=e.length,p=Math.max(1,i.step);if(i.visible)for(var l=i.skip;l<a;l+=p)bt(s)&&l%s==0||(n.tickX=r?o.x2:o.x2-i.size,n.tickY=r?o.y1-i.size:o.y1,n.position=e[l],t.append(Oe(n,i)))}s(this.getMajorTickPositions(),e.majorTicks),s(this.getMinorTickPositions(),e.minorTicks,i/e.minorUnit)},e.prototype.createLine=function(){var t=this.options,e=t.line,o=this.lineBox();if(e.width>0&&e.visible){var r=new k.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});r.moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&S(r);var i=this._lineGroup=new k.drawing.Group;i.append(r),this.visual.append(i),this.createTicks(i)}},e.prototype.getActualTickSize=function(){var t=this.options,e=0;return t.majorTicks.visible&&t.minorTicks.visible?e=Math.max(t.majorTicks.size,t.minorTicks.size):t.majorTicks.visible?e=t.majorTicks.size:t.minorTicks.visible&&(e=t.minorTicks.size),e},e.prototype.createBackground=function(){var t=this.options,e=this.box,o=t.background;o&&(this._backgroundPath=k.drawing.Path.fromRect(e.toRect(),{fill:{color:o},stroke:null}),this.visual.append(this._backgroundPath))},e.prototype.createPlotBands=function(){var t=this,e=this.options,o=e.plotBands||[],r=e.vertical,i=this.plotArea;if(0!==o.length){for(var n=this._plotbandGroup=new k.drawing.Group({zIndex:-1}),s=st(this.pane.axes,(function(e){return e.options.vertical!==t.options.vertical}))[0],a=0;a<o.length;a++){var p=o[a],l=void 0,h=void 0,u=p.label,d=void 0;if(r?(l=(s||i.axisX).lineBox(),h=t.getSlot(p.from,p.to,!0)):(l=t.getSlot(p.from,p.to,!0),h=(s||i.axisY).lineBox()),u&&(u.vAlign=u.position||c,d=t.createPlotBandLabel(u,p,new $t(l.x1,h.y1,l.x2,h.y2))),0!==l.width()&&0!==h.height()){var f=new k.geometry.Rect([l.x1,h.y1],[l.width(),h.height()]),g=k.drawing.Path.fromRect(f,{fill:{color:p.color,opacity:p.opacity},stroke:null});n.append(g),d&&n.append(d)}}this.appendVisual(n)}},e.prototype.createPlotBandLabel=function(t,e,o){if(!1===t.visible)return null;var r,i=t.text;if(bt(t)&&t.visible){var n=ot(t);n?i=n({text:i,item:e}):t.format&&(i=this.chartService.format.auto(t.format,i)),t.color||(t.color=this.options.labels.color)}return(r=new we(i,t)).reflow(o),r.renderVisual(),r.visual},e.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,r=e.majorGridLines,i=e.minorUnit,n=e.vertical,s=t.options.line.visible,a=r.visible?e.majorUnit:0,p=t.lineBox(),l=p[n?"y1":"x1"],h={lineStart:p[n?"x1":"y1"],lineEnd:p[n?"x2":"y2"],vertical:n},c=[],u=this.gridLinesVisual();function d(t,e,o){var r=t.length,i=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<r;n+=i){var a=Tt(t[n]);ht(a,c)||n%o==0||s&&l===a||(h.position=a,u.append(Me(h,e)),c.push(a))}}return d(this.getMajorTickPositions(),r),d(this.getMinorTickPositions(),o,a/i),u.children},e.prototype.reflow=function(t){for(var e=this.options,o=this.labels,r=this.title,i=e.vertical,n=o.length,s=i?"width":"height",a=r?r.box[s]():0,p=this.getActualTickSize()+e.margin+a,l=((this.getRoot()||{}).box||t)[s](),h=0,c=0;c<n;c++){var u=o[c].box[s]();u+p<=l&&(h=Math.max(h,u))}this.box=i?new $t(t.x1,t.y1,t.x1+h+p,t.y2):new $t(t.x1,t.y1,t.x2,t.y1+h+p),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},e.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},e.prototype.labelTickIndex=function(t){return t.index},e.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,o=this.labelsBetweenTicks(),r=t.vertical,i=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],p=this.labelTickIndex(a),l=r?a.box.height():a.box.width(),h=n[p],c=n[p+1],u=void 0,d=void 0;if(r){if(o)u=h+(c-h)/2-l/2;else u=h-l/2;d=u}else o?(u=h,d=c):d=(u=h-l/2)+l;this.positionLabel(a,i,u,d)}},e.prototype.positionLabel=function(t,e,o,r){void 0===r&&(r=o);var i,n=this.options,a=n.vertical,p=this.lineBox(),l=this.getActualTickSize()+n.margin;if(a){var h=p.x2;e?(h+=l,t.options.rotationOrigin=c):(h-=l+t.box.width(),t.options.rotationOrigin=f),i=t.box.move(h,o)}else{var u=p.y1;e?(u-=l+t.box.height(),t.options.rotationOrigin=s):(u+=l,t.options.rotationOrigin=g),i=new $t(o,u,r,u+t.box.height())}t.reflow(i)},e.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},e.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,o=Math.min(e.length,t.length-1),r=0,i=0;i<o;i++){var n=Math.abs(t[i+1]-t[i]),s=e[i].box,a=this.autoRotateLabelAngle(s,n);if(0!==a&&(r=a),-90===r)break}if(0!==r){for(var p=0;p<e.length;p++)e[p].options.rotation=r,e[p].reflow(new $t);return!0}},e.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,r=t.vertical;e&&(r?(e.options.align=o?f:c,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?g:s),e.reflow(this.box))},e.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,r=void 0;bt(o)?(this.shouldRenderNote(o)?e.show():e.hide(),r=this.noteSlot(o)):e.hide(),e.reflow(r||this.lineBox())}},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.alignTo=function(t){var e=t.lineBox(),o=this.options.vertical,r=o?x:m;this.box.snapTo(e,r),o?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[r+1]-=this.lineBox()[r+1]-e[r+1],this.box[r+2]-=this.lineBox()[r+2]-e[r+2]},e.prototype.axisLabelText=function(t,e,o){var r,i=this,n=ot(e),s=function(){return e.format?i.chartService.format.localeAuto(e.format,[t],e.culture):t};n?r=n(Object.assign({},o,{get text(){return s()},value:t,format:e.format,culture:e.culture})):r=s();return r},e.prototype.slot=function(t,e,o){var r=this.getSlot(t,e,o);if(r)return r.toRect()},e.prototype.contentBox=function(){var t=this.box.clone(),e=this.labels;if(e.length){var o=this.options.vertical?x:m;if(this.chartService.isPannable(o)){var r=this.maxLabelOffset();t[o+1]-=r.start,t[o+2]+=r.end}else{e[0].options.visible&&t.wrap(e[0].box);var i=e[e.length-1];i.options.visible&&t.wrap(i.box)}}return t},e.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,o=t.reverse,r=this.labelsBetweenTicks(),i=this.getLabelsTickPositions(),n=e?x:m,s=this.labels,a=o?1:0,p=o?0:1,l=0,h=0,c=0;c<s.length;c++){var u=s[c],d=this.labelTickIndex(u),f=void 0,g=void 0;r?(f=i[d+a],g=i[d+p]):f=g=i[d],l=Math.max(l,f-u.box[n+1]),h=Math.max(h,u.box[n+2]-g)}return{start:l,end:h}},e.prototype.limitRange=function(t,e,o,r,i){var n=this.options;if(t<o&&i<0&&(!bt(n.min)||n.min<=o)||r<e&&i>0&&(!bt(n.max)||r<=n.max))return null;if(e<o&&i>0||r<t&&i<0)return{min:t,max:e};var s=e-t,a=t,p=e;return t<o&&i<0?(a=Pt(t,o,r),p=Pt(t+s,o+s,r)):e>r&&i>0&&(p=Pt(e,o,r),a=Pt(e-s,o,r-s)),{min:a,max:p}},e.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},e.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},e.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),o=t?e.height():e.width(),r=t?x:m,i=this.lineDir(),n=r+(1===i?1:2).toString();return{axis:r,axisOrigin:n,axisDir:i,lineBox:e,lineSize:o,lineStart:e[n]}},e.prototype.pointOffset=function(t){var e=this.lineInfo(),o=e.axis,r=e.axisDir,i=e.axisOrigin,n=e.lineBox,s=e.lineSize;return(r>0?t[o]-n[i]:n[i]-t[o])/s},e.prototype.scaleToDelta=function(t,e){var o=Pt(t,-.999,.999);return o>0?e*Math.min(1,o):e-e/(1+o)},e.prototype.labelsBetweenTicks=function(){return!this.options.justified},e.prototype.prepareUserOptions=function(){},e}(ne);jt(Te,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:n,visible:!0},title:{visible:!0,position:a},majorTicks:{align:"outside",size:4,skip:0,step:1},minorTicks:{align:"outside",size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:"outside",minorTickType:"none",majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:n,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var Re=Te,Be="days",Ie="years",Le={years:31536e6,months:26784e5,weeks:6048e5,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1};function je(t,e){return t.getTime()-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset())}function Ee(t,e){return new Date(t.getTime()+e)}function De(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Ve(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),!0)}function ze(t,e,o,r){var i=t;if(t){var n=De(t),s=n.getHours();o===Ie?Ve(i=new Date(n.getFullYear()+e,0,1),0):"months"===o?Ve(i=new Date(n.getFullYear(),n.getMonth()+e,1),s):"weeks"===o?Ve(i=ze(function(t,e){void 0===e&&(e=0);var o=0,r=t.getDay();if(!isNaN(r))for(;r!==e;)0===r?r=6:r--,o++;return Ee(t,864e5*-o)}(n,r),7*e,Be),s):o===Be?Ve(i=new Date(n.getFullYear(),n.getMonth(),n.getDate()+e),s):"hours"===o?i=function(t,e){var o=new Date(t);o.setMinutes(0,0,0);var r=6e4*(t.getTimezoneOffset()-o.getTimezoneOffset());return Ee(o,r+36e5*e)}(n,e):"minutes"===o?(i=Ee(n,6e4*e)).getSeconds()>0&&i.setSeconds(0):"seconds"===o?i=Ee(n,1e3*e):"milliseconds"===o&&(i=Ee(n,e)),"milliseconds"!==o&&i.getMilliseconds()>0&&i.setMilliseconds(0)}return i}function Ue(t,e,o){return ze(De(t),0,e,o)}function He(t,e,o){var r=De(t);return r&&Ue(r,e,o).getTime()===r.getTime()?r:ze(r,1,e,o)}function Fe(t,e){return t&&e?t.getTime()-e.getTime():-1}function Ne(t,e){return t.getTime()-e}function Ge(t){if(b(t)){for(var e=[],o=0;o<t.length;o++)e.push(Ge(t[o]));return e}if(t)return De(t).getTime()}function We(t,e){return t&&e?Ge(t)===Ge(e):t===e}function Xe(t,e,o){return je(t,e)/Le[o]}function Ye(t,e,o,r){var i=De(t),n=De(e);return("months"===o?i.getMonth()-n.getMonth()+12*(i.getFullYear()-n.getFullYear())+Xe(i,new Date(i.getFullYear(),i.getMonth()),Be)/new Date(i.getFullYear(),i.getMonth()+1,0).getDate():o===Ie?i.getFullYear()-n.getFullYear()+Ye(i,new Date(i.getFullYear(),0),"months",1)/12:o===Be||"weeks"===o?Xe(i,n,o):Ne(i,e)/Le[o])/r}function qe(t,e,o){return o===Ie?e.getFullYear()-t.getFullYear():"months"===o?12*qe(t,e,Ie)+e.getMonth()-t.getMonth():o===Be?Math.floor(Ne(e,t)/864e5):Math.floor(Ne(e,t)/Le[o])}function Ke(t,e){return O(e)&&t.parseDate(e)||De(e)}function Qe(t,e){if(b(e)){for(var o=[],r=0;r<e.length;r++)o.push(Ke(t,e[r]));return o}return Ke(t,e)}function Ze(t,e){return P(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}var $e=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this._ticks={}},e.prototype.categoriesHash=function(){return""},e.prototype.clone=function(){var t=new e(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},e.prototype.initUserOptions=function(t){var e=t.categories||[],o=bt(t.min),r=bt(t.max);if(t.srcCategories=t.categories=e,(o||r)&&e.length){var i,n=o?Math.floor(t.min):0;i=r?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(n,i)}return t},e.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:P(t.min)?t.min%1:0,max:P(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},e.prototype.totalRangeIndices=function(t){var e,o=this.options,r=P(o.min)?o.min:0;if(e=P(o.max)?o.max:P(o.min)?r+o.categories.length:this.totalRange().max||1,t){var i=this.totalRange();r=Pt(r,0,i.max),e=Pt(e,0,i.max)}return{min:r,max:e}},e.prototype.range=function(){var t=this.options;return{min:P(t.min)?t.min:0,max:P(t.max)?t.max:this.totalRange().max}},e.prototype.roundedRange=function(){return this.range()},e.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},e.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,o=t.max,r=this.lineBox();return{scale:(this.options.vertical?r.height():r.width())/(o-e||1)*(this.options.reverse?-1:1),box:r,min:e,max:o}},e.prototype.arrangeLabels=function(){t.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},e.prototype.hideOutOfRangeLabels=function(){var t=this.box,e=this.labels;if(e.length>0){var o=this.options.vertical?x:m,r=t[o+1],i=t[o+2],n=e[0],s=At(e);(n.box[o+1]>i||n.box[o+2]<r)&&(n.options.visible=!1),(s.box[o+1]>i||s.box[o+2]<r)&&(s.options.visible=!1)}},e.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},e.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},e.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},e.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),o=e.min,r=e.max,i=Math.ceil(r),n=Math.floor(o),s=[];n<=i;)s.push(n),n+=t;return s},e.prototype.getTickPositions=function(t){for(var e=this.options,o=e.vertical,r=e.reverse,i=this.scaleOptions(),n=i.scale,s=i.box,a=i.min,p=s[(o?x:m)+(r?2:1)],l=this.tickIndices(t),h=[],c=0;c<l.length;c++)h.push(p+Tt(n*(l[c]-a),3));return h},e.prototype.getTicks=function(){var t=this.options,e=this._ticks,o=this.rangeIndices(),r=this.lineBox(),i=r.getHash()+o.min+","+o.max+t.reverse+t.justified;if(e._hash!==i){var n=t.minorTicks.visible||t.minorGridLines.visible;e._hash=i,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,r),e.minorTicks=n?this.filterOutOfRangePositions(this.getTickPositions(.5),r):[]}return e},e.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?x:m,r=function(t){return e[o+1]<=t&&t<=e[o+2]},i=t.length-1,n=0;!r(t[n])&&n<=i;)n++;for(var s=i;!r(t[s])&&s>=0;)s--;return t.slice(n,s+1)},e.prototype.lineInfo=function(){var t=this.options,e=t.vertical,o=t.reverse,r=this.lineBox(),i=e?r.height():r.width(),n=e?x:m,s=o?-1:1,a=n+(1===s?1:2).toString();return{axis:n,axisOrigin:a,axisDir:s,lineBox:r,lineSize:i,lineStart:r[a]}},e.prototype.lineDir=function(){return this.options.reverse?-1:1},e.prototype.getSlot=function(t,e,o){var r=this.options,i=r.reverse,n=r.justified,s=this.scaleOptions(),a=s.scale,p=s.box,l=s.min,h=this.lineInfo(),c=h.axis,u=h.lineStart,d=p.clone(),f=!bt(e),g=Bt(t,0),y=Bt(e,g);y=Math.max(y-1,g);var v=u+(g-l)*a,m=u+((y=Math.max(g,y))+1-l)*a;return f&&n&&(m=v),o&&(v=Pt(v,p[c+1],p[c+2]),m=Pt(m,p[c+1],p[c+2])),d[c+1]=i?m:v,d[c+2]=i?v:m,d},e.prototype.limitSlot=function(t){var e=this.options.vertical?x:m,o=this.lineBox(),r=t.clone();return r[e+1]=Pt(t[e+1],o[e+1],o[e+2]),r[e+2]=Pt(t[e+2],o[e+1],o[e+2]),r},e.prototype.slot=function(e,o,r){var i=Math.floor(this.options.min||0),n=e,s=o;return"string"==typeof n?n=this.categoryIndex(n):P(n)&&(n-=i),"string"==typeof s?s=this.categoryIndex(s):P(s)&&(s-=i),t.prototype.slot.call(this,n,s,r)},e.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,r=e.justified,i=e.vertical?x:m,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,l=n.max,h=o?l:p,c=a[i+1],u=a[i+2],d=t[i];if(d<c||d>u)return null;var f=h+(d-c)/s,g=f%1;return r?f=Math.round(f):0===g&&f>0&&f--,Math.floor(f)},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.options.categories[e]},e.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},e.prototype.categoryAt=function(t,e){var o=this.options;return(e?o.srcCategories:o.categories)[t]},e.prototype.categoriesCount=function(){return(this.options.categories||[]).length},e.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),r=e.vertical?o.height():o.width(),i=e.categories.length,n=Tt(t/(r/i),10);return{min:n,max:i+n}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),r=this.totalRangeIndices(),i=r.max-r.min,n=this.scaleToDelta(t,i),s=o*n,a=(1-o)*n,p=r.min+s,l=r.max-a;return l-p<.1&&(l=p+.1),{min:p,max:l}},e.prototype.zoomRange=function(t,e){var o=this.totalRange(),r=o.min,i=o.max,n=this.scaleRange(t,e);return{min:Pt(n.min,r,i),max:Pt(n.max,r,i)}},e.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},e.prototype.labelsRange=function(){var t=this.options,e=t.justified,o=t.labels,r=this.totalRangeIndices(!0),i=r.min,n=r.max,s=Math.floor(i);return e?(i=Math.ceil(i),n=Math.floor(n)):(i=Math.floor(i),n=Math.ceil(n)),{min:(i>o.skip?o.skip+o.step*Math.ceil((i-o.skip)/o.step):o.skip)-s,max:(t.categories.length?n+(e?1:0):0)-s}},e.prototype.createAxisLabel=function(t,e,o){var r=this.options,i=r.dataItems?r.dataItems[t]:null,n=Bt(r.categories[t],"");o.dataItem=i;var s=this.axisLabelText(n,e,o);return new Se(n,s,t,i,e)},e.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},e.prototype.noteSlot=function(t){var e=this.options,o=t-Math.floor(e.min||0);return this.getSlot(o)},e.prototype.arrangeNotes=function(){t.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},e.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var o=this.options.vertical?x:m,r=e[o+1],i=e[o+2],n=0;n<t.length;n++){var s=t[n];s.box&&(i<s.box[o+1]||s.box[o+2]<r)&&s.hide()}},e.prototype.pan=function(t){var e=this.totalRangeIndices(!0),o=this.scaleOptions().scale,r=Tt(t/o,10),i=this.totalRange(),n=e.min+r,s=e.max+r;return this.limitRange(n,s,0,i.max,r)},e.prototype.pointsRange=function(t,e){var o=this.options,r=o.reverse,i=o.vertical?x:m,n=this.totalRangeIndices(!0),s=this.scaleOptions(),a=s.scale,p=s.box[i+(r?2:1)],l=t[i]-p,h=e[i]-p,c=n.min+l/a,u=n.min+h/a,d=Math.min(c,u),f=Math.max(c,u);if(f-d>=.01)return{min:d,max:f}},e.prototype.valueRange=function(){return this.range()},e.prototype.totalIndex=function(t){var e=this.options;return this._categoriesMap?this._categoriesMap.get(t):function(t,e){if(t instanceof Date){for(var o=e.length,r=0;r<o;r++)if(We(e[r],t))return r;return-1}return e.indexOf(t)}(t,e.srcCategories)},e.prototype.currentRangeIndices=function(){var t=this.options,e=0;return P(t.min)&&(e=Math.floor(t.min)),{min:e,max:P(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},e.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new lt,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},e.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},e}(Re);jt($e,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:n},labels:{zIndex:1},justified:!1,_deferLabels:!0});var Je=$e,to={milliseconds:"HH:mm:ss.fff",seconds:"HH:mm:ss",minutes:"HH:mm",hours:"HH:mm",days:"M/d",weeks:"M/d",months:"MMM 'yy",years:"yyyy"},eo=["milliseconds","seconds","minutes","hours",Be,"weeks","months",Ie];function oo(t){var e=t._range;return e||((e=t._range=Et(t)).min=De(e.min),e.max=De(e.max)),e}var ro=function(t){this.options=t};ro.prototype.displayIndices=function(){return{min:0,max:1}},ro.prototype.displayRange=function(){return{}},ro.prototype.total=function(){return{}},ro.prototype.valueRange=function(){return{}},ro.prototype.valueIndex=function(){return-1},ro.prototype.values=function(){return[]},ro.prototype.totalIndex=function(){return-1},ro.prototype.valuesCount=function(){return 0},ro.prototype.totalCount=function(){return 0},ro.prototype.dateAt=function(){return null};var io=function(t,e,o){this.options=o,o.baseUnitStep=o.baseUnitStep||1;var r=o.roundToBaseUnit,i=o.justified;this.start=ze(t,0,o.baseUnit,o.weekStartDay);var n=this.roundToTotalStep(e),s=!i&&We(e,n)&&!o.justifyEnd;this.end=this.roundToTotalStep(e,!i,s?1:0);var a=o.min||t;this.valueStart=this.roundToTotalStep(a),this.displayStart=r?this.valueStart:a;var p=o.max;if(p){var l=!i&&We(p,this.roundToTotalStep(p))?-1:0;this.valueEnd=this.roundToTotalStep(p,!1,l),this.displayEnd=r?this.roundToTotalStep(p,!i):o.max}else this.valueEnd=n,this.displayEnd=r||s?this.end:e;this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))};function no(t,e,o){for(var r,i,n,s=oo(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,l=t.maxDateGroups,h="fit"===t.baseUnit,c=e?eo.indexOf(e):0,u=h?eo[c++]:t.baseUnit,d=a/Le[u],f=d;!i||d>=l;){r=r||p[u].slice(0);do{n=r.shift()}while(n&&e===u&&n<o);if(n)d=f/(i=n);else{if(u===At(eo)){i=Math.ceil(f/l);break}if(!h){d>l&&(i=Math.ceil(f/l));break}u=eo[c++]||At(eo),f=a/Le[u],r=null}}t.baseUnitStep=i,t.baseUnit=u}function so(t){var e=(t.baseUnit||"").toLowerCase();return"fit"!==e&&!ht(e,eo)&&function(t){for(var e,o,r=t.categories,i=bt(r)?r.length:0,n=u,s=0;s<i;s++){var a=r[s];if(a&&e){var p=je(a,e);p>0&&(o=(n=Math.min(n,p))>=31536e6?Ie:n>=24192e5?"months":n>=6048e5?"weeks":n>=864e5?Be:n>=36e5?"hours":n>=6e4?"minutes":"seconds")}e=a}t.baseUnit=o||Be}(t),"fit"!==e&&"auto"!==t.baseUnitStep||no(t),t}io.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},io.prototype.displayIndices=function(){if(!this._indices){var t=this.options,e=t.baseUnit,o=t.baseUnitStep,r=Ye(this.displayStart,this.valueStart,e,o),i=Ye(this.displayEnd,this.valueStart,e,o);this._indices={min:r,max:i}}return this._indices},io.prototype.total=function(){return{min:this.start,max:this.end}},io.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},io.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},io.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Ye(t,this.valueStart,e.baseUnit,e.baseUnitStep))},io.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Ye(t,this.start,e.baseUnit,e.baseUnitStep))},io.prototype.dateIndex=function(t){var e=this.options;return Ye(t,this.valueStart,e.baseUnit,e.baseUnitStep)},io.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},io.prototype.values=function(){var t=this._values;if(!t){var e=this.options,o=this.valueRange();this._values=t=[];for(var r=o.min;r<=o.max;)t.push(r),r=ze(r,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},io.prototype.dateAt=function(t,e){var o=this.options;return ze(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},io.prototype.roundToTotalStep=function(t,e,o){var r=this.options,i=r.baseUnit,n=r.baseUnitStep,s=r.weekStartDay,a=this.start,p=Ye(t,a,i,n),l=e?Math.ceil(p):Math.floor(p);return o&&(l+=o),ze(a,l*n,i,s)};var ao=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e(Object.assign({},this.options),this.chartService);return t.createLabels(),t},e.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},e.prototype.initUserOptions=function(t){return t},e.prototype.initFields=function(){t.prototype.initFields.call(this);var e=this.chartService,o=e.intl,r=this.options,i=r.categories||[];if(i._parsed||((i=Qe(o,i))._parsed=!0),r=B({roundToBaseUnit:!0},r,{categories:i,min:Ke(o,r.min),max:Ke(o,r.max),weekStartDay:Ze(r,o)}),e.panning&&e.isPannable(r.vertical?x:m)&&(r.roundToBaseUnit=!1),r.userSetBaseUnit=r.userSetBaseUnit||r.baseUnit,r.userSetBaseUnitStep=r.userSetBaseUnitStep||r.baseUnitStep,this.options=r,r.srcCategories=i,i.length>0){var n=oo(i),s=r.maxDivisions;if(this.dataRange=new io(n.min,n.max,so(r)),s){var a=this.dataRange.displayRange(),p=Object.assign({},r,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:a.min,max:a.max,maxDateGroups:s}),l=this.dataRange.options;no(p,l.baseUnit,l.baseUnitStep),this.divisionRange=new io(n.min,n.max,p)}else this.divisionRange=this.dataRange}else r.baseUnit=r.baseUnit||Be,this.dataRange=this.divisionRange=new ro(r);this.rangeLabels=[]},e.prototype.tickIndices=function(e){var o=this.dataRange,r=this.divisionRange,i=r.valuesCount();if(!this.options.maxDivisions||!i)return t.prototype.tickIndices.call(this,e);var n=[],s=r.values(),a=0;this.options.justified||(s=s.concat(r.dateAt(i)),a=.5);for(var p=0;p<s.length;p++)if(n.push(o.dateIndex(s[p])+a),1!==e&&p>=1){var l=n.length-1;n.splice(p,0,n[l-1]+(n[l]-n[l-1])*e)}return n},e.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return Fe(t,e.min)>=0&&Fe(t,e.max)<=0&&o.length},e.prototype.parseNoteValue=function(t){return Ke(this.chartService.intl,t)},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.translateRange=function(t){var e=this.options,o=e.baseUnit,r=e.weekStartDay,i=e.vertical,n=this.lineBox(),s=i?n.height():n.width(),a=this.range(),p=s/(a.max-a.min),l=Tt(t/p,10);if(a.min&&a.max){var h=Ee(e.min||a.min,l),c=Ee(e.max||a.max,l);a={min:ze(h,0,o,r),max:ze(c,0,o,r)}}return a},e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},e.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,o=this.lineBox(),r=e.vertical?o.height():o.width(),i=this.dataRange.displayRange(),n=i.min,s=i.max,a=this.dataRange.total(),p=Tt(t/(r/(s-n)),10)*(e.reverse?-1:1),l=Ee(n,p),h=Ee(s,p),c=this.limitRange(Ge(l),Ge(h),Ge(a.min),Ge(a.max),p);return c?(c.min=De(c.min),c.max=De(c.max),c.baseUnit=e.baseUnit,c.baseUnitStep=e.baseUnitStep||1,c.userSetBaseUnit=e.userSetBaseUnit,c.userSetBaseUnitStep=e.userSetBaseUnitStep,c):void 0},e.prototype.pointsRange=function(e,o){if(this.isEmpty())return null;var r=t.prototype.pointsRange.call(this,e,o),i=this.dataRange.displayRange(),n=this.dataRange.displayIndices(),s=Ne(i.max,i.min)/(n.max-n.min),a=this.options;return{min:Ee(i.min,r.min*s),max:Ee(i.min,r.max*s),baseUnit:a.userSetBaseUnit||a.baseUnit,baseUnitStep:a.userSetBaseUnitStep||a.baseUnitStep}},e.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,r="fit"===o.userSetBaseUnit,i=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,a=n.max,p=Math.abs(this.pointOffset(e)),l=a-s,h=this.scaleToDelta(t,l),c=Math.round(p*h),u=Math.round((1-p)*h),d=this.dataRange.options.baseUnit,f=new Date(s.getTime()+c),g=new Date(a.getTime()-u);if(r){var y,v,m=o.autoBaseUnitSteps,x=o.maxDateGroups,b=At(m[d])*x*Le[d],w=Ne(a,s),_=Ne(g,f),C=eo.indexOf(d);if(_<Le[d]&&"milliseconds"!==d)d=eo[C-1],f=Ee(s,v=(w-(x-1)*(y=At(m[d]))*Le[d])/2),g=Ee(a,-v);else if(_>b&&d!==Ie){var k=0;do{C++,d=eo[C],k=0,v=2*Le[d];do{y=m[d][k],k++}while(k<m[d].length&&v*y<w)}while(d!==Ie&&v*y<w);(v=(v*y-w)/2)>0&&(f=Ee(s,-v),g=Ee(a,v),f=Ee(f,Pt(g,i.min,i.max)-g),g=Ee(g,Pt(f,i.min,i.max)-f))}}return f&&g&&Ne(g,f)>0?{min:f,max:g,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},e.prototype.zoomRange=function(t,e){var o=this.dataRange.total(),r=this.scaleRange(t,e);return r&&(r.min<o.min&&(r.min=o.min),r.max>o.max&&(r.max=o.max)),r},e.prototype.range=function(){return this.dataRange.displayRange()},e.prototype.createLabels=function(){t.prototype.createLabels.call(this),this.createRangeLabels()},e.prototype.clearLabels=function(){t.prototype.clearLabels.call(this),this.rangeLabels=[]},e.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),t.prototype.arrangeLabels.call(this)},e.prototype.arrangeRangeLabels=function(){var t=this.options,e=this.rangeLabels;if(0!==e.length){var o=this.lineBox(),r=t.vertical,i=t.rangeLabels.mirror||t.labels.mirror,n=e[0];if(n){var s=r?o.y1-n.box.height()/2:o.x1;this.positionLabel(n,i,s)}var a=e[1];if(a){var p=r?o.y2-a.box.height()/2:o.x2;this.positionLabel(a,i,p)}}},e.prototype.autoRotateLabels=function(){t.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},e.prototype.hideOutOfRangeLabels=function(){t.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},e.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var o=t[0];if(o&&o.options.visible)for(var r=0;r<e.length;r++){if(!s(o,e[r]))break}var i=t[1];if(i&&i.options.visible)for(var n=e.length-1;n>0;--n){if(!s(i,e[n]))break}}function s(t,e){return!(e.options.visible&&!e.box.overlaps(t.box))&&(e.options.visible=!1,!0)}},e.prototype.contentBox=function(){for(var e=t.prototype.contentBox.call(this),o=this.rangeLabels,r=0;r<o.length;r++){var i=o[r];i.options.visible&&e.wrap(i.box)}return e},e.prototype.createAxisLabel=function(t,e,o){void 0===o&&(o={});var r=this.options,i=r.dataItems&&!r.maxDivisions?r.dataItems[t]:null,n=this.divisionRange.dateAt(t),s=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||s,o.dataItem=i;var a=this.axisLabelText(n,e,o);if(a)return new Se(n,a,t,i,e)},e.prototype.createRangeLabels=function(){var t=this,e=this.divisionRange,o=e.displayStart,r=e.displayEnd,i=this.options,n=Object.assign({},i.labels,i.rangeLabels,{align:a,zIndex:i.zIndex});if(!0===n.visible){this.normalizeLabelRotation(n),n.alignRotation=a,"auto"===n.rotation&&(n.rotation=0,i.autoRotateRangeLabels=!0);var s=n.dateFormats[this.divisionRange.options.baseUnit];n.format=n.format||s;var p=function(e,o,r){if(r){var i=new Se(o,r,e,null,n);t.append(i),t.rangeLabels.push(i)}};p(0,o,this.axisLabelText(o,n,{index:0,count:2})),p(1,r,this.axisLabelText(r,n,{index:1,count:2}))}},e.prototype.autoRotateRangeLabels=function(){var t=this,e=this.rangeLabels;if(this.options.autoRotateRangeLabels&&!this.options.vertical&&2===e.length){var o=function(e,o,r){var i=2*Math.abs(o[r+1]-o[r]),n=t.autoRotateLabelAngle(e.box,i);0!==n&&(e.options.rotation=n,e.reflow(new $t))},r=this.getMajorTickPositions();o(e[0],r,0),o(e[1],r,r.length-2)}},e.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},e.prototype.slot=function(t,e,o){var r=this.dataRange,i=t,n=e;i instanceof Date&&(i=r.dateIndex(i)),n instanceof Date&&(n=r.dateIndex(n));var s=this.getSlot(i,n,o);if(s)return s.toRect()},e.prototype.getSlot=function(e,o,r){var i=e,n=o;return"object"==typeof i&&(i=this.categoryIndex(i)),"object"==typeof n&&(n=this.categoryIndex(n)),t.prototype.getSlot.call(this,i,n,r)},e.prototype.valueRange=function(){var t=oo(this.options.srcCategories);return{min:De(t.min),max:De(t.max)}},e.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},e.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},e.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},e.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},e.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.dataRange.dateAt(e)},e.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},e.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},e.prototype.totalRange=function(){return this.dataRange.total()},e.prototype.totalCount=function(){return this.dataRange.totalCount()},e.prototype.isEmpty=function(){return!this.options.srcCategories.length},e.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=oo(t.srcCategories);return new io(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},e}(Je);jt(ao,{type:l,labels:{dateFormats:to},rangeLabels:{visible:!1},autoBaseUnitSteps:{milliseconds:[1,10,100],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});var po=ao;function lo(t,e){return Tt(Math.floor(t/e)*e,10)}function ho(t,e){return Tt(Math.ceil(t/e)*e,10)}function co(t){return Math.max(Math.min(t,3e5),-3e5)}var uo=Math.pow(10,-9),fo=function(t){function e(e,o,r,i){t.call(this,Object.assign({},r,{seriesMin:e,seriesMax:o}),i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=function(t,e,o){var r=o.narrowRange,i=function(t,e,o){if(!t&&!e)return 0;var r;if(t>=0&&e>=0){var i=t===e?0:t;if(!1===o||!o&&(e-i)/e>.2)return 0;r=Math.max(0,i-(e-i)/2)}else r=t;return r}(t,e,r),n=function(t,e,o){if(!t&&!e)return 1;var r;if(t<=0&&e<=0){var i=t===e?0:e,n=Math.abs((i-t)/i);if(!1===o||!o&&n>.2)return 0;r=Math.min(0,i-(t-i)/2)}else r=e;return r}(t,e,r),s=Kt(i,n),a={majorUnit:s};!1!==o.roundToMajorUnit&&(i<0&&go(i,s,1/3)&&(i-=s),n>0&&go(n,s,1/3)&&(n+=s));return a.min=lo(i,s),a.max=ho(n,s),a}(t.seriesMin,t.seriesMax,t);return this.totalOptions=function(t,e){return{min:bt(e.min)?Math.min(t.min,e.min):t.min,max:bt(e.max)?Math.max(t.max,e.max):t.max,majorUnit:t.majorUnit}}(e,t),function(t,e){var o,r,i=e;if(e){!function(t,e){for(var o=0;o<e.length;o++){var r=e[o];null===t[r]&&(t[r]=void 0)}}(e,["min","max"]),o=bt(e.min),r=bt(e.max);var n=o||r;n&&e.min===e.max&&(e.min>0?e.min=0:e.max=1),e.majorUnit?(t.min=lo(t.min,e.majorUnit),t.max=ho(t.max,e.majorUnit)):n&&(i=B(t,e),t.majorUnit=Kt(i.min,i.max))}t.minorUnit=(i.majorUnit||t.majorUnit)/5;var s=B(t,i);s.min>=s.max&&(o&&!r?s.max=s.min+s.majorUnit:!o&&r&&(s.min=s.max-s.majorUnit));return s}(e,t)},e.prototype.initFields=function(){this.totalMin=this.totalOptions.min,this.totalMax=this.totalOptions.max,this.totalMajorUnit=this.totalOptions.majorUnit,this.seriesMin=this.options.seriesMin,this.seriesMax=this.options.seriesMax},e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.startValue=function(){return 0},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,o=e.max-e.min;return Math.floor(Tt(o/t,3))+1},e.prototype.getTickPositions=function(t,e){var o=this.options,r=this.lineInfo(),i=r.axisDir,n=r.axisOrigin,s=r.lineBox,a=t*(r.lineSize/(o.max-o.min)),p=this.getDivisions(t),l=[],h=s[n],c=0;e&&(c=e/t);for(var u=0;u<p;u++)u%c!=0&&l.push(Tt(h,3)),h+=a*i;return l},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,o){void 0===o&&(o=!1);var r=this.options,i=this.lineInfo(),n=i.axis,s=i.axisDir,a=i.lineBox,p=i.lineSize,l=i.lineStart,h=s*(p/(r.max-r.min)),c=Bt(t,e||0),u=Bt(e,t||0);o&&(c=Pt(c,r.min,r.max),u=Pt(u,r.min,r.max));var d=Math.min(c,u)-r.min,f=Math.max(c,u)-r.min,g=new $t(a.x1,a.y1,a.x1,a.y1);return g[n+1]=co(l+h*(s>0?d:f)),g[n+2]=co(l+h*(s>0?f:d)),g},e.prototype.getValue=function(t){var e=this.options,o=Number(e.max),r=Number(e.min),i=this.pointOffset(t);return i<0||i>1?null:Tt(r+i*(o-r),10)},e.prototype.translateRange=function(t){var e=this.options,o=e.vertical,r=e.reverse,i=e.max,n=e.min,s=this.lineInfo().lineSize,a=Tt(t/(s/(i-n)),10);return!o&&!r||o&&r||(a=-a),{min:n+a,max:i+a,offset:a}},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e,o){var r=this.options,i=Tt(r.min+t*r.majorUnit,10),n=this.axisLabelText(i,e,o);return new Se(i,n,t,null,e)},e.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},e.prototype.pan=function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax,e.offset)},e.prototype.pointsRange=function(t,e){var o=this.getValue(t),r=this.getValue(e),i=Math.min(o,r),n=Math.max(o,r);if(this.isValidRange(i,n))return{min:i,max:n}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),r=this.options.max-this.options.min,i=this.scaleToDelta(t,r),n=o*i,s=(1-o)*i,a=Tt(this.options.min+n,10),p=Tt(this.options.max-s,10);return p-a<uo&&(p=a+uo),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var o=this.totalMin,r=this.totalMax,i=this.scaleRange(t,e);return{min:Pt(i.min,o,r),max:Pt(i.max,o,r)}},e.prototype.isValidRange=function(t,e){return e-t>uo},e}(Re);function go(t,e,o){var r=Tt(Math.abs(t%e),10);return 0===r||r>e*(1-o)}jt(fo,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:n},labels:{format:"#.####################"},zIndex:1});var yo=fo,vo=function(t){function e(e,o,r,i){var n=De(e),s=De(o),a=i.intl,p=r||{};p=function(t,e,o){var r=o.min||t,i=o.max||e,n=o.baseUnit||(i&&r?function(t){var e="hours";t>=31536e6?e=Ie:t>=26784e5?e="months":t>=6048e5?e="weeks":t>=864e5&&(e=Be);return e}(je(i,r)):"hours"),s=Le[n],a=o.weekStartDay||0,p=Ue(Ge(r)-1,n,a)||De(i),l=He(Ge(i)+1,n,a),h=(o.majorUnit?o.majorUnit:void 0)||ho(Kt(p.getTime(),l.getTime()),s)/s,c=qe(p,l,n),u=ho(c,h)-c,d=Math.floor(u/2),f=u-d;o.baseUnit||delete o.baseUnit;return o.baseUnit=o.baseUnit||n,o.min=o.min||ze(p,-d,n,a),o.max=o.max||ze(l,f,n,a),o.minorUnit=o.minorUnit||h/5,o.majorUnit=h,o}(n,s,p=B(p||{},{min:Ke(a,p.min),max:Ke(a,p.max),axisCrossingValue:Qe(a,p.axisCrossingValues||p.axisCrossingValue),weekStartDay:Ze(p,a)})),t.call(this,p,i),this.intlService=a,this.seriesMin=n,this.seriesMax=s;var l=p.weekStartDay||0;this.totalMin=Ge(Ue(Ge(n)-1,p.baseUnit,l)),this.totalMax=Ge(He(Ge(s)+1,p.baseUnit,l))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){var e=this.options;return Math.floor(qe(e.min,e.max,e.baseUnit)/t+1)},e.prototype.getTickPositions=function(t){for(var e=this.options,o=this.lineInfo(),r=o.axisDir,i=o.lineSize,n=o.lineStart,s=this.getDivisions(t),a=i/Ne(e.max,e.min),p=e.weekStartDay||0,l=[n],h=1;h<s;h++){var c=n+Ne(ze(e.min,h*t,e.baseUnit,p),e.min)*a*r;l.push(Tt(c,3))}return l},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,o){return yo.prototype.getSlot.call(this,Ke(this.intlService,t),Ke(this.intlService,e),o)},e.prototype.getValue=function(t){var e=yo.prototype.getValue.call(this,t);return null!==e?De(e):null},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e,o){var r=this.options,i=t*r.majorUnit,n=r.weekStartDay||0,s=r.min;i>0&&(s=ze(s,i,r.baseUnit,n));var a=e.dateFormats[r.baseUnit];e.format=e.format||a;var p=this.axisLabelText(s,e,o);return new Se(s,p,t,null,e)},e.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),r=e.vertical,i=e.reverse,n=r?o.height():o.width(),s=this.range(),a=n/Ne(s.max,s.min),p=Tt(t/a,10);return!r&&!i||r&&i||(p=-p),{min:Ee(e.min,p),max:Ee(e.max,p),offset:p}},e.prototype.shouldRenderNote=function(t){var e=this.range();return Fe(t,e.min)>=0&&Fe(t,e.max)<=0},e.prototype.pan=function(t){var e=this.translateRange(t,!0),o=this.limitRange(Ge(e.min),Ge(e.max),this.totalMin,this.totalMax,e.offset);if(o)return{min:De(o.min),max:De(o.max)}},e.prototype.pointsRange=function(t,e){var o=this.getValue(t),r=this.getValue(e),i=Math.min(o,r),n=Math.max(o,r);return{min:De(i),max:De(n)}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),r=this.options.max-this.options.min,i=this.scaleToDelta(t,r),n=o*i,s=(1-o)*i,a=De(Ge(this.options.min)+n),p=De(Ge(this.options.max)-s);return p-a<1e3&&(p=De(Ge(a)+1e3)),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e);return{min:De(Pt(Ge(o.min),this.totalMin,this.totalMax)),max:De(Pt(Ge(o.max),this.totalMin,this.totalMax))}},e}(Re);jt(vo,{type:l,majorGridLines:{visible:!0,width:1,color:n},labels:{dateFormats:to}});var mo=vo,xo=function(t){function e(e,o,r,i){var n=B({majorUnit:10,min:e,max:o},r),s=n.majorUnit,a=function(t,e){var o,r=Tt(wo(t,e),10)%1;o=t<=0?e:0!==r&&(r<.3||r>.9)?Math.pow(e,wo(t,e)+.2):Math.pow(e,Math.ceil(wo(t,e)));return o}(o,s),p=function(t,e,o){var r=o.majorUnit,i=t;t<=0?i=e<=1?Math.pow(r,-2):1:o.narrowRange||(i=Math.pow(r,Math.floor(wo(t,r))));return i}(e,o,n),l=function(t,e,o,r){var i=o.min,n=o.max;bt(o.axisCrossingValue)&&o.axisCrossingValue<=0&&bo();bt(r.max)?r.max<=0&&bo():n=e;bt(r.min)?r.min<=0&&bo():i=t;return{min:i,max:n}}(p,a,n,r);n.max=l.max,n.min=l.min,n.minorUnit=r.minorUnit||Tt(s-1,10),t.call(this,n,i),this.totalMin=bt(r.min)?Math.min(p,r.min):p,this.totalMax=bt(r.max)?Math.max(a,r.max):a,this.logMin=Tt(wo(l.min,s),10),this.logMax=Tt(wo(l.max,s),10),this.seriesMin=e,this.seriesMax=o,this.createLabels()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.startValue=function(){return this.options.min},e.prototype.getSlot=function(t,e,o){var r=this.options,i=this.logMin,n=this.logMax,s=r.majorUnit,a=r.min,p=r.max,l=this.lineInfo(),h=l.axis,c=l.axisDir,u=l.lineBox,d=l.lineSize,f=l.lineStart,g=c*(d/(n-i)),y=Bt(t,e||1),v=Bt(e,t||1);if(y<=0||v<=0)return null;o&&(y=Pt(y,a,p),v=Pt(v,a,p)),y=wo(y,s),v=wo(v,s);var m=Math.min(y,v)-i,x=Math.max(y,v)-i,b=new $t(u.x1,u.y1,u.x1,u.y1);return b[h+1]=co(f+g*(c>0?m:x)),b[h+2]=co(f+g*(c>0?x:m)),b},e.prototype.getValue=function(t){var e=this.options,o=this.logMin,r=this.logMax,i=e.majorUnit,n=this.lineInfo(),s=n.axis,a=n.axisDir,p=n.lineStart,l=n.lineSize,h=(r-o)/l,c=a*(t[s]-p);if(c<0||c>l)return null;var u=o+c*h;return Tt(Math.pow(i,u),10)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.translateRange=function(t){var e=this.options,o=this.logMin,r=this.logMax,i=e.reverse,n=e.vertical,s=e.majorUnit,a=this.lineBox(),p=n?a.height():a.width(),l=Tt(t/(p/(r-o)),10);return!n&&!i||n&&i||(l=-l),{min:Math.pow(s,o+l),max:Math.pow(s,r+l),offset:l}},e.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},e.prototype.getMajorTickPositions=function(){var t=[];return this.traverseMajorTicksPositions((function(e){t.push(e)}),{step:1,skip:0}),t},e.prototype.createTicks=function(t){var e=this.options,o=e.majorTicks,r=e.minorTicks,i=e.vertical,n=e.labels.mirror,s=this.lineBox(),a={vertical:i};function p(e,o){a.tickX=n?s.x2:s.x2-o.size,a.tickY=n?s.y1-o.size:s.y1,a.position=e,t.append(Oe(a,o))}return o.visible&&this.traverseMajorTicksPositions(p,o),r.visible&&this.traverseMinorTicksPositions(p,r),[]},e.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,r=e.majorGridLines,i=e.vertical,n=t.lineBox(),s={lineStart:n[i?"x1":"y1"],lineEnd:n[i?"x2":"y2"],vertical:i},a=[],p=this.gridLinesVisual();function l(t,e){ht(t,a)||(s.position=t,p.append(Me(s,e)),a.push(t))}return r.visible&&this.traverseMajorTicksPositions(l,r),o.visible&&this.traverseMinorTicksPositions(l,o),p.children},e.prototype.traverseMajorTicksPositions=function(t,e){for(var o=this.lineInfo(),r=o.lineStart,i=o.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step){t(Tt(r+i*(a-n),10),e)}},e.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,r=o.min,i=o.max,n=o.minorUnit,s=o.majorUnit,a=this.lineInfo(),p=a.lineStart,l=a.step,h=this.logMin,c=this.logMax,u=Math.floor(h);u<c;u++)for(var d=this._minorIntervalOptions(u),f=e.skip;f<n;f+=e.step){var g=d.value+f*d.minorStep;if(g>i)break;if(g>=r)t(Tt(p+l*(wo(g,s)-h),10),e)}},e.prototype.createAxisLabel=function(t,e,o){var r=Math.ceil(this.logMin+t),i=Math.pow(this.options.majorUnit,r),n=this.axisLabelText(i,e,o);return new Se(i,n,t,null,e)},e.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},e.prototype.pan=function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax,e.offset)},e.prototype.pointsRange=function(t,e){var o=this.getValue(t),r=this.getValue(e);return{min:Math.min(o,r),max:Math.max(o,r)}},e.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,r=wo(this.options.min,o),i=wo(this.options.max,o),n=Math.abs(this.pointOffset(e)),s=i-r,a=this.scaleToDelta(t,s),p=Math.pow(o,r+n*a),l=Math.pow(o,i-(1-n)*a);return l-p<1e-6&&(l=p+1e-6),{min:p,max:l}},e.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e),r=this.totalMin,i=this.totalMax;return{min:Pt(o.min,r,i),max:Pt(o.max,r,i)}},e.prototype._minorIntervalOptions=function(t){var e=this.options,o=e.minorUnit,r=e.majorUnit,i=Math.pow(r,t);return{value:i,minorStep:(Math.pow(r,t+1)-i)/o}},e.prototype.lineInfo=function(){var e=t.prototype.lineInfo.call(this);return e.step=e.axisDir*(e.lineSize/(this.logMax-this.logMin)),e},e}(Re);function bo(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function wo(t,e){return Math.log(t)/Math.log(e)}jt(xo,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:n},zIndex:1,_deferLabels:!0});var _o=xo,Co={createGridLines:function(t){var e,o,r=this.options,i=Math.abs(this.box.center().y-t.lineBox().y1),n=[],s=!1;return r.majorGridLines.visible&&(e=this.majorGridLineAngles(t),s=!0,n=this.renderMajorGridLines(e,i,r.majorGridLines)),r.minorGridLines.visible&&(o=this.minorGridLineAngles(t,s),mt(n,this.renderMinorGridLines(o,i,r.minorGridLines,t,s))),n},renderMajorGridLines:function(t,e,o){return this.renderGridLines(t,e,o)},renderMinorGridLines:function(t,e,o,r,i){var n=this.radiusCallback&&this.radiusCallback(e,r,i);return this.renderGridLines(t,e,o,n)},renderGridLines:function(t,e,o,r){for(var i={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=this.box.center(),s=new k.geometry.Circle([n.x,n.y],e),a=this.gridLinesVisual(),p=0;p<t.length;p++){var l=new k.drawing.Path(i);r&&(s.radius=r(t[p])),l.moveTo(s.center).lineTo(s.pointAt(t[p]+180)),a.append(l)}return a.children},gridLineAngles:function(t,e,o,r,i){var n=this,s=this.intervals(e,o,r,i),a=t.options,p=a.visible&&!1!==(a.line||{}).visible;return ft(s,(function(t){var e=n.intervalAngle(t);if(!p||90!==e)return e}))}},ko=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.range=function(){return{min:0,max:this.options.categories.length}},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.lineBox=function(){return this.box},e.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,o=e.skip||0,r=e.step||1,i=new $t,n=0;n<t.length;n++){t[n].reflow(i);var s=t[n].box;t[n].reflow(this.getSlot(o+n*r).adjacentBox(0,s.width(),s.height()))}},e.prototype.intervals=function(t,e,o,r){void 0===r&&(r=!1);for(var i=this.options,n=i.categories.length/t||1,s=360/n,a=o||1,p=[],l=0,h=e||0;h<n;h+=a)l=i.reverse?360-h*s:h*s,l=Tt(l,3)%360,r&&ht(l,r)||p.push(l);return p},e.prototype.majorIntervals=function(){return this.intervals(1)},e.prototype.minorIntervals=function(){return this.intervals(.5)},e.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},e.prototype.majorAngles=function(){var t=this;return ft(this.majorIntervals(),(function(e){return t.intervalAngle(e)}))},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var o=this.options,r=o.minorGridLines,i=o.majorGridLines,n=e?this.intervals(1,i.skip,i.step):null;return this.gridLineAngles(t,.5,r.skip,r.step,n)},e.prototype.radiusCallback=function(t,e,o){if(e.options.type!==i){var r=Mt(360/(2*this.options.categories.length)),n=Math.cos(r)*t,s=this.majorAngles(),a=function(e){return!o&&ht(e,s)?t:n};return a}},e.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new k.drawing.Group({zIndex:-1}),o=0;o<t.length;o++){var r=t[o],i=this.plotBandSlot(r),n=this.getSlot(r.from),s=r.from-Math.floor(r.from);i.startAngle+=s*n.angle;var a=Math.ceil(r.to)-r.to;i.angle-=(a+s)*n.angle;var p=re.current.createRing(i,{fill:{color:r.color,opacity:r.opacity},stroke:{opacity:r.opacity}});e.append(p)}this.appendVisual(e)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},e.prototype.getSlot=function(t,e){var o=this.options,r=o.justified,i=this.box,n=this.majorAngles(),s=n.length,a=360/s,p=t;o.reverse&&!r&&(p=(p+1)%s);var l=n[p=Pt(Math.floor(p),0,s-1)];r&&(l-=a/2)<0&&(l+=360);var h=a*(Pt(Math.ceil(e||p),p,s-1)-p+1);return new te(i.center(),0,i.height()/2,l,h)},e.prototype.slot=function(t,e){var o=this.getSlot(t,e),r=o.startAngle+180,i=r+o.angle;return new k.geometry.Arc([o.center.x,o.center.y],{startAngle:r,endAngle:i,radiusX:o.radius,radiusY:o.radius})},e.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,o=null,r=0;r<e;r++){if(this.getSlot(r).containsPoint(t)){o=r;break}}return o},e}(Je);jt(ko,{startAngle:90,labels:{margin:V(10)},majorGridLines:{visible:!0},justified:!0}),B(ko.prototype,Co);var So=ko,Ao=function(t){function e(e,o){t.call(this,e,o);var r=this.options;r.minorUnit=r.minorUnit||r.majorUnit/2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDivisions=function(t){return yo.prototype.getDivisions.call(this,t)-1},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,o=this.options.labels,r=o.skip||0,i=o.step||1,n=new $t,s=this.intervals(t.majorUnit,r,i),a=0;a<e.length;a++){e[a].reflow(n);var p=e[a].box;e[a].reflow(this.getSlot(s[a]).adjacentBox(0,p.width(),p.height()))}},e.prototype.lineBox=function(){return this.box},e.prototype.intervals=function(t,e,o,r){void 0===r&&(r=!1);for(var i=this.options.min,n=this.getDivisions(t),s=[],a=o||1,p=e||0;p<n;p+=a){var l=(360+i+p*t)%360;r&&ht(l,r)||s.push(l)}return s},e.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},e.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},e.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var o=this.options,r=o.minorGridLines,i=o.majorGridLines,n=e?this.intervals(o.majorUnit,i.skip,i.step):null;return this.gridLineAngles(t,o.minorUnit,r.skip,r.step,n)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},e.prototype.getSlot=function(t,e){var o=this.options,r=this.box,i=o.startAngle,n=Pt(t,o.min,o.max),s=Pt(e||n,n,o.max);if(o.reverse&&(n*=-1,s*=-1),(s=(540-s-i)%360)<(n=(540-n-i)%360)){var a=n;n=s,s=a}return new te(r.center(),0,r.height()/2,n,s-n)},e.prototype.slot=function(t,e){void 0===e&&(e=t);var o,r,i=this.options,n=360-i.startAngle,s=this.getSlot(t,e),a=Math.min(t,e),p=Math.max(t,e);return i.reverse?(o=a,r=p):(o=360-p,r=360-a),o=(o+n)%360,r=(r+n)%360,new k.geometry.Arc([s.center.x,s.center.y],{startAngle:o,endAngle:r,radiusX:s.radius,radiusY:s.radius})},e.prototype.getValue=function(t){var e=this.options,o=this.box.center(),r=t.x-o.x,i=t.y-o.y,n=Math.round(wt(Math.atan2(i,r))),s=e.startAngle;return e.reverse||(n*=-1,s*=-1),(n+s+360)%360},e.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},e}(Re);jt(Ao,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:V(10)},majorGridLines:{color:n,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),B(Ao.prototype,Co,{createPlotBands:So.prototype.createPlotBands,majorAngles:So.prototype.majorAngles,range:yo.prototype.range,labelsCount:yo.prototype.labelsCount,createAxisLabel:yo.prototype.createAxisLabel});var Po=Ao;function Oo(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var Mo={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,o=t.plotBands;void 0===o&&(o=[]);for(var r=this.plotArea.polarAxis,n=r.majorAngles(),s=r.box.center(),a=this._plotbandGroup=new k.drawing.Group({zIndex:-1}),p=0;p<o.length;p++){var l=o[p],h={fill:{color:l.color,opacity:l.opacity},stroke:{opacity:l.opacity}},c=this.getSlot(l.from,l.to,!0),u=new te(s,s.y-c.y2,s.y-c.y1,0,360),d=void 0;d=e===i?re.current.createRing(u,h):k.drawing.Path.fromPoints(this.plotBandPoints(u,n),h).close(),a.append(d)}this.appendVisual(a)},plotBandPoints:function(t,e){for(var o=[],r=[],i=[t.center.x,t.center.y],n=new k.geometry.Circle(i,t.innerRadius),s=new k.geometry.Circle(i,t.radius),a=0;a<e.length;a++)o.push(n.pointAt(e[a]+180)),r.push(s.pointAt(e[a]+180));return o.reverse(),o.push(o[0]),r.push(r[0]),r.concat(o)},createGridLines:function(t){var e=this.options,o=this.radarMajorGridLinePositions(),r=t.majorAngles(),i=t.box.center(),n=[];if(e.majorGridLines.visible&&(n=this.renderGridLines(i,o,r,e.majorGridLines)),e.minorGridLines.visible){var s=this.radarMinorGridLinePositions();mt(n,this.renderGridLines(i,s,r,e.minorGridLines))}return n},renderGridLines:function(t,e,o,r){var n={stroke:{width:r.width,color:r.color,dashType:r.dashType}},s=r.skip;void 0===s&&(s=0);var a=r.step;void 0===a&&(a=0);for(var p=this.gridLinesVisual(),l=s;l<e.length;l+=a){var h=t.y-e[l];if(h>0){var c=new k.geometry.Circle([t.x,t.y],h);if(r.type===i)p.append(new k.drawing.Circle(c,n));else{for(var u=new k.drawing.Path(n),d=0;d<o.length;d++)u.lineTo(c.pointAt(o[d]+180));u.close(),p.append(u)}}}return p.children},getValue:function(t){var e=this.lineBox(),o=this.plotArea.polarAxis,r=o.majorAngles(),n=o.box.center(),s=t.distanceTo(n),a=s;if(this.options.majorGridLines.type!==i&&r.length>1){var p=t.x-n.x,l=t.y-n.y,h=(wt(Math.atan2(l,p))+540)%360;r.sort((function(t,e){return Oo(t,h)-Oo(e,h)}));var c=90-Oo(r[0],r[1])/2,u=180-Oo(h,r[0])-c;a=s*(Math.sin(Mt(u))/Math.sin(Mt(c)))}return this.axisType().prototype.getValue.call(this,new Qt(e.x1,e.y2-a))}},To=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},e.prototype.axisType=function(){return t},e}(yo);B(To.prototype,Mo);var Ro=To,Bo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radarMajorGridLinePositions=function(){var t=[];return this.traverseMajorTicksPositions((function(e){t.push(e)}),this.options.majorGridLines),t},e.prototype.radarMinorGridLinePositions=function(){var t=[];return this.traverseMinorTicksPositions((function(e){t.push(e)}),this.options.minorGridLines),t},e.prototype.axisType=function(){return t},e}(_o);B(Bo.prototype,Mo);var Io=Bo;function Lo(t){return t<=0?-1:1}var jo=function(t){function e(e){t.call(this),this.closed=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.process=function(t){var e=t.slice(0),o=[],r=this.closed,i=e.length;if(i>2&&(this.removeDuplicates(0,e),i=e.length),i<2||2===i&&e[0].equals(e[1]))return o;var n,s,a=e[0],p=e[1],l=e[2];for(o.push(new k.geometry.Segment(a));a.equals(e[i-1]);)r=!0,e.pop(),i--;if(2===i){var h=this.tangent(a,p,m,x);return At(o).controlOut(this.firstControlPoint(h,a,p,m,x)),o.push(new k.geometry.Segment(p,this.secondControlPoint(h,a,p,m,x))),o}if(r){a=e[i-1],p=e[0],l=e[1];var c=this.controlPoints(a,p,l);n=c[1],s=c[0]}else{var u=this.tangent(a,p,m,x);n=this.firstControlPoint(u,a,p,m,x)}for(var d=n,f=0;f<=i-3;f++)if(this.removeDuplicates(f,e),f+3<=(i=e.length)){a=e[f],p=e[f+1],l=e[f+2];var g=this.controlPoints(a,p,l);At(o).controlOut(d),d=g[1];var y=g[0];o.push(new k.geometry.Segment(p,y))}if(r){a=e[i-2],p=e[i-1],l=e[0];var v=this.controlPoints(a,p,l);At(o).controlOut(d),o.push(new k.geometry.Segment(p,v[0])),At(o).controlOut(v[1]),o.push(new k.geometry.Segment(l,s))}else{var b=this.tangent(p,l,m,x);At(o).controlOut(d),o.push(new k.geometry.Segment(l,this.secondControlPoint(b,p,l,m,x)))}return o},e.prototype.removeDuplicates=function(t,e){for(;e[t+1]&&(e[t].equals(e[t+1])||e[t+1].equals(e[t+2]));)e.splice(t+1,1)},e.prototype.invertAxis=function(t,e,o){var r=!1;if(t.x===e.x)r=!0;else if(e.x===o.x)(e.y<o.y&&t.y<=e.y||o.y<e.y&&e.y<=t.y)&&(r=!0);else{var i=this.lineFunction(t,e),n=this.calculateFunction(i,o.x);t.y<=e.y&&o.y<=n||e.y<=t.y&&o.y>=n||(r=!0)}return r},e.prototype.isLine=function(t,e,o){var r=this.lineFunction(t,e),i=this.calculateFunction(r,o.x);return t.x===e.x&&e.x===o.x||Tt(i,1)===Tt(o.y,1)},e.prototype.lineFunction=function(t,e){var o=(e.y-t.y)/(e.x-t.x);return[t.y-o*t.x,o]},e.prototype.controlPoints=function(t,e,o){var r,i=m,n=x,s=!1,a=!1;if(this.isLine(t,e,o))r=this.tangent(t,e,m,x);else{var p={x:this.isMonotonicByField(t,e,o,m),y:this.isMonotonicByField(t,e,o,x)};if(p.x&&p.y)r=this.tangent(t,o,m,x),s=!0;else if(this.invertAxis(t,e,o)&&(i=x,n=m),p[i])r=0;else r=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?Lo((o[n]-t[n])*(e[i]-t[i])):-Lo((o[i]-t[i])*(e[n]-t[n]))),a=!0}var l=this.secondControlPoint(r,t,e,i,n);if(a){var h=i;i=n,n=h}var c=this.firstControlPoint(r,e,o,i,n);return s&&(this.restrictControlPoint(t,e,l,r),this.restrictControlPoint(e,o,c,r)),[l,c]},e.prototype.restrictControlPoint=function(t,e,o,r){t.y<e.y?e.y<o.y?(o.x=t.x+(e.y-t.y)/r,o.y=e.y):o.y<t.y&&(o.x=e.x-(e.y-t.y)/r,o.y=t.y):o.y<e.y?(o.x=t.x-(t.y-e.y)/r,o.y=e.y):t.y<o.y&&(o.x=e.x+(t.y-e.y)/r,o.y=t.y)},e.prototype.tangent=function(t,e,o,r){var i,n=e[o]-t[o],s=e[r]-t[r];return i=0===n?0:s/n,i},e.prototype.isMonotonicByField=function(t,e,o,r){return o[r]>e[r]&&e[r]>t[r]||o[r]<e[r]&&e[r]<t[r]},e.prototype.firstControlPoint=function(t,e,o,r,i){var n=e[r],s=.333*(o[r]-n);return this.point(n+s,e[i]+s*t,r,i)},e.prototype.secondControlPoint=function(t,e,o,r,i){var n=e[r],s=o[r],a=.333*(s-n);return this.point(s-a,o[i]-a*t,r,i)},e.prototype.point=function(t,e,o,r){var i=new k.geometry.Point;return i[o]=t,i[r]=e,i},e.prototype.calculateFunction=function(t,e){for(var o=t.length,r=0,i=0;i<o;i++)r+=Math.pow(e,i)*t[i];return r},e}(k.Class),Eo=function(t){function e(e){t.call(this),this._axis=e,this.options=e.options}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.value=function(t){var e=this._axis,o=e.getCategory?e.getCategory(t):e.getValue(t);return o},e.prototype.slot=function(t,e,o){return void 0===o&&(o=!0),this._axis.slot(t,e,o)},e.prototype.range=function(){return this._axis.range()},e.prototype.valueRange=function(){return this._axis.valueRange()},e}(k.Class);function Do(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new Eo(e[o])}var Vo=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};Vo.prototype.findAxisByName=function(t){return Do(t,this._pane.axes)};var zo=Vo,Uo=function(t){function e(e){t.call(this),this._plotArea=e,this.visual=e.visual,this.backgroundVisual=e._bgVisual}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(k.Class);function Ho(t){for(var e=t.length,o=0,r=0;r<e;r++){P(t[r])&&o++}return o}var Fo={min:function(t){for(var e=t.length,o=u,r=0;r<e;r++){var i=t[r];P(i)&&(o=Math.min(o,i))}return o===u?t[0]:o},max:function(t){for(var e=t.length,o=d,r=0;r<e;r++){var i=t[r];P(i)&&(o=Math.max(o,i))}return o===d?t[0]:o},sum:function(t){for(var e=t.length,o=0,r=0;r<e;r++){var i=t[r];P(i)&&(o+=i)}return o},sumOrNull:function(t){var e=null;return Ho(t)&&(e=Fo.sum(t)),e},count:function(t){for(var e=t.length,o=0,r=0;r<e;r++){var i=t[r];null!==i&&bt(i)&&o++}return o},avg:function(t){var e=Ho(t),o=t[0];return e>0&&(o=Fo.sum(t)/e),o},first:function(t){for(var e=t.length,o=0;o<e;o++){var r=t[o];if(null!==r&&bt(r))return r}return t[0]}},No=Fo;function Go(t,e){return null===e?e:nt(t)(e)}var Wo=function(t){function e(){t.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e,o){void 0===e&&(e=[y]),void 0===o&&(o={});for(var r=0;r<t.length;r++){var i=t[r];this._valueFields[i]=e,this._otherFields[i]=o,this._nullValue[i]=this._makeValue(e,null),this._undefinedValue[i]=this._makeValue(e,void 0)}},e.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},e.prototype.valueFields=function(t){return this._valueFields[t.type]||[y]},e.prototype.otherFields=function(t){return this._otherFields[t.type]||[y]},e.prototype.bindPoint=function(t,e,o){var r,i,n=t.data,s=bt(o)?o:n[e],a={valueFields:{value:s}},p=this.valueFields(t),l=this._otherFields[t.type];if(null===s)i=this._nullValue[t.type];else if(bt(s)){if(Array.isArray(s)){var h=s.slice(p.length);i=this._bindFromArray(s,p),r=this._bindFromArray(h,l)}else if("object"==typeof s){var c=this.sourceFields(t,p),u=this.sourceFields(t,l);i=this._bindFromObject(s,p,c),r=this._bindFromObject(s,l,u)}}else i=this._undefinedValue[t.type];return bt(i)&&(1===p.length?a.valueFields.value=i[p[0]]:a.valueFields=i),a.fields=r||{},a},e.prototype._makeValue=function(t,e){for(var o={},r=t.length,i=0;i<r;i++){o[t[i]]=e}return o},e.prototype._bindFromArray=function(t,e){var o={};if(e)for(var r=Math.min(e.length,t.length),i=0;i<r;i++)o[e[i]]=t[i];return o},e.prototype._bindFromObject=function(t,e,o){void 0===o&&(o=e);var r={};if(e)for(var i=e.length,n=0;n<i;n++){var s=e[n],a=o[n];null!==a&&(r[s]=Go(a,t))}return r},e.prototype.sourceFields=function(t,e){var o=[];if(e)for(var r=e.length,i=0;i<r;i++){var n=e[i],s=n===y?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o},e}(k.Class);Wo.current=new Wo;var Xo=Wo,Yo=/percent(?:\w*)\((\d+)\)/,qo=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),Ko=function(t){function e(e,o,r){t.call(this),this.initGlobalRanges(e,o,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initGlobalRanges=function(t,e,o){var r=e.data,i=qo.exec(t);if(i){this.valueGetter=this.createValueGetter(e,o);var n=this.getAverage(r),s=this.getStandardDeviation(r,n,!1),a=i[1]?parseFloat(i[1]):1,p={low:n.value-s*a,high:n.value+s*a};this.globalRange=function(){return p}}else if(t.indexOf&&t.indexOf("stderr")>=0){this.valueGetter=this.createValueGetter(e,o);var l=this.getStandardError(r,this.getAverage(r));this.globalRange=function(t){return{low:t-l,high:t+l}}}},e.prototype.createValueGetter=function(t,e){var o,r=t.data,i=Xo.current,n=i.valueFields(t),s=bt(r[0])?r[0]:{};if(b(s))o=nt("["+(e?n.indexOf(e):0)+"]");else if(P(s))o=nt();else if("object"==typeof s){o=nt(i.sourceFields(t,n)[n.indexOf(e)])}return o},e.prototype.getErrorRange=function(t,e){var o,r,i;if(!bt(e))return null;if(this.globalRange)return this.globalRange(t);if(b(e))o=t-e[0],r=t+e[1];else if(P(i=parseFloat(e)))o=t-i,r=t+i;else{if(!(i=Yo.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var n=t*(parseFloat(i[1])/100);o=t-Math.abs(n),r=t+Math.abs(n)}return{low:o,high:r}},e.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},e.prototype.getStandardDeviation=function(t,e,o){for(var r=t.length,i=o?e.count-1:e.count,n=0,s=0;s<r;s++){var a=this.valueGetter(t[s]);P(a)&&(n+=Math.pow(a-e.value,2))}return Math.sqrt(n/i)},e.prototype.getAverage=function(t){for(var e=t.length,o=0,r=0,i=0;i<e;i++){var n=this.valueGetter(t[i]);P(n)&&(o+=n,r++)}return{value:o/r,count:r}},e}(k.Class),Qo=k.support.browser||{},Zo=Qo.msie?.001:0,$o="zero",Jo="bar",tr="column",er="line",or="pie",rr="verticalLine",ir=[Jo,tr,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],nr="DOMMouseScroll mousewheel",sr=function(t){function e(e,o,r,i,n,s){t.call(this,s),this.low=e,this.high=o,this.isVertical=r,this.chart=i,this.series=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e,o=this.options.endCaps,r=this.isVertical,i=this.getAxis().getSlot(this.low,this.high),n=t.center(),s=this.getCapsWidth(t,r),a=r?n.x:n.y,p=a-s,l=a+s;r?(e=[new Qt(n.x,i.y1),new Qt(n.x,i.y2)],o&&e.push(new Qt(p,i.y1),new Qt(l,i.y1),new Qt(p,i.y2),new Qt(l,i.y2)),this.box=new $t(p,i.y1,l,i.y2)):(e=[new Qt(i.x1,n.y),new Qt(i.x2,n.y)],o&&e.push(new Qt(i.x1,p),new Qt(i.x1,l),new Qt(i.x2,p),new Qt(i.x2,l)),this.box=new $t(i.x1,p,i.x2,l)),this.linePoints=e},e.prototype.getCapsWidth=function(t,e){var o=e?t.width():t.height();return Math.min(Math.floor(o/2),4)||4},e.prototype.createVisual=function(){var t=this,e=this.options,o=e.visual;o?this.visual=o({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()},e.prototype.createDefaultVisual=function(){var e=this.options,o=this.linePoints,r={stroke:{color:e.color,width:e.line.width,dashType:e.line.dashType}};t.prototype.createVisual.call(this);for(var i=0;i<o.length;i+=2){var n=new k.drawing.Path(r).moveTo(o[i].x,o[i].y).lineTo(o[i+1].x,o[i+1].y);S(n),this.visual.append(n)}},e}(ne);jt(sr,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var ar=sr,pr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},e}(ar);function lr(t,e,o,r){void 0===o&&(o={}),void 0===r&&(r=!1);var i=o.defaults=o.defaults||{},n=o.depth=o.depth||0,s=!1;if(o.excluded=o.excluded||[],n>5)return null;for(var a in t)if(!ht(a,o.excluded)&&t.hasOwnProperty(a)){var p=t[a];T(p)?(s=!0,r||(t[a]=Bt(p(e),i[a]))):I(p)&&(r||(o.defaults=i[a]),o.depth++,s=lr(p,e,o,r)||s,o.depth--)}return s}function hr(t){for(var e=t.length,o=0,r=0;r<e;r++)o=Math.max(o,t[r].data.length);return o}var cr=function(t){function e(e,o){t.call(this,o),this.plotArea=e,this.chartService=e.chartService,this.categoryAxis=e.seriesCategoryAxis(o.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.pointOptions=function(t,e){var o=this.seriesOptions[e];if(!o){var r=this.pointType().prototype.defaults;this.seriesOptions[e]=o=B({},r,{vertical:!this.options.invertAxes},t)}return o},e.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&P(t.value)){for(var e=t.categoryIx,o=this.categoryPoints[e],r=[],i=0,n=0;n<o.length;n++){var s=o[n];if(s){var a=t.series.stack,p=s.series.stack;if(a&&p&&a.group!==p.group)continue;P(s.value)&&(i+=Math.abs(s.value),r.push(Math.abs(s.value)))}}if(i>0)return t.value/i}return t.value},e.prototype.plotRange=function(t,e){void 0===e&&(e=0);var o=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var r=this.plotValue(t),i=r>=0,n=e,s=!1,a=0;a<o.length;a++){var p=o[a];if(t===p)break;var l=t.series.stack,h=p.series.stack;if(l&&h){if("string"==typeof l&&l!==h)continue;if(l.group&&l.group!==h.group)continue}var c=this.plotValue(p);(c>=0&&i||c<0&&!i)&&(n+=c,r+=c,s=!0,this.options.isStacked100&&(r=Math.min(r,1)))}return s&&(n-=e),[n,r]}var u=t.series,d=this.seriesValueAxis(u),f=this.categoryAxisCrossingValue(d);return[f,M(t.value)?t.value:f]},e.prototype.stackLimits=function(t,e){for(var o=u,r=d,i=0;i<this.categoryPoints.length;i++){var n=this.categoryPoints[i];if(n)for(var s=0;s<n.length;s++){var a=n[s];if(a&&(a.series.stack===e||a.series.axis===t)){var p=this.plotRange(a,0)[1];bt(p)&&isFinite(p)&&(r=Math.max(r,p),o=Math.min(o,p))}}}return{min:o,max:r}},e.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,o=t.series,r={};if(e)for(var i=0;i<o.length;i++){var n=o[i],s=n.axis,a=s+n.stack,p=r[a];if(!p){p=this.stackLimits(s,n.stack);var l=this.errorTotals;l&&(l.negative.length&&(p.min=Math.min(p.min,Et(l.negative).min)),l.positive.length&&(p.max=Math.max(p.max,Et(l.positive).max))),p.min!==u||p.max!==d?r[a]=p:p=null}p&&(this.valueAxisRanges[s]=p)}},e.prototype.addErrorBar=function(t,e,o){var r,i=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields.errorLow,l=e.fields.errorHigh;P(p)&&P(l)?r={low:p,high:l}:a&&bt(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Ko(a.value,n,y),r=this.seriesErrorRanges[s].getErrorRange(i,a.value)),r&&(t.low=r.low,t.high=r.high,this.addPointErrorBar(t,o))},e.prototype.addPointErrorBar=function(t,e){var o=!this.options.invertAxes,r=t.options.errorBars,i=t.series,n=t.low,s=t.high;if(this.options.isStacked){var a=this.stackedErrorRange(t,e);n=a.low,s=a.high}else{var p={categoryIx:e,series:i};this.updateRange({value:n},p),this.updateRange({value:s},p)}var l=new pr(n,s,o,this,i,r);t.errorBars=[l],t.append(l)},e.prototype.stackedErrorRange=function(t,e){var o=this.plotRange(t,0)[1]-t.value,r=t.low+o,i=t.high+o;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},r<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,r)),i>0&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,i)),{low:r,high:i}},e.prototype.addValue=function(t,e){var o=e.categoryIx,r=e.series,i=e.seriesIx,n=this.categoryPoints[o];n||(this.categoryPoints[o]=n=[]);var s=this.seriesPoints[i];s||(this.seriesPoints[i]=s=[]);var a=this.createPoint(t,e);a&&(Object.assign(a,e),a.owner=this,a.noteText=t.fields.noteText,bt(a.dataItem)||(a.dataItem=r.data[o]),this.addErrorBar(a,t,o)),this.points.push(a),s.push(a),n.push(a),this.updateRange(t.valueFields,e)},e.prototype.evalPointOptions=function(t,e,o,r,i,n){var s={defaults:i._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},a=this._evalSeries[n];bt(a)||(this._evalSeries[n]=a=lr(t,{},s,!0));var p=t;return a&&lr(p=B({},p),{value:e,category:o,index:r,series:i,dataItem:i.data[r]},s),p},e.prototype.updateRange=function(t,e){var o=e.series.axis,r=t.value,i=this.valueAxisRanges[o];isFinite(r)&&null!==r&&((i=this.valueAxisRanges[o]=i||{min:u,max:d}).min=Math.min(i.min,r),i.max=Math.max(i.max,r))},e.prototype.seriesValueAxis=function(t){var e=this.plotArea,o=t.axis,r=o?e.namedValueAxes[o]:e.valueAxis;if(!r)throw new Error("Unable to locate value axis with name "+o);return r},e.prototype.reflow=function(t){var e=this,o=this.categorySlots=[],r=this.points,i=this.categoryAxis,n=0;this.traverseDataPoints((function(t,s){var a=s.categoryIx,p=s.series,l=e.seriesValueAxis(p),h=r[n++],c=o[a];if(c||(o[a]=c=e.categorySlot(i,a,l)),h){var u=e.plotRange(h,l.startValue()),d=e.valueSlot(l,u);if(d){var f=e.pointSlot(c,d);h.aboveAxis=e.aboveAxis(h,l),h.stackValue=u[1],e.options.isStacked100&&(h.percentage=e.plotValue(h)),e.reflowPoint(h,f)}else h.visible=!1}})),this.reflowCategories(o),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},e.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},e.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(At(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},e.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},e.prototype.aboveAxis=function(t,e){var o=this.categoryAxisCrossingValue(e),r=t.value;return e.options.reverse?r<o:r>=o},e.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,o=t.options;return[].concat(o.axisCrossingValues||o.axisCrossingValue)[e.axisIndex||0]||0},e.prototype.reflowPoint=function(t,e){t.reflow(e)},e.prototype.reflowCategories=function(){},e.prototype.pointSlot=function(t,e){var o=this.options.invertAxes,r=o?e:t,i=o?t:e;return new $t(r.x1,i.y1,r.x2,i.y2)},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=hr(e),r=e.length,i=0;i<r;i++)this._outOfRangeCallback(e[i],"_outOfRangeMinPoint",i,t);for(var n=0;n<o;n++)for(var s=0;s<r;s++){var a=e[s],p=this.categoryAxis.categoryAt(n);t(this._bindPoint(a,s,n),{category:p,categoryIx:n,categoriesCount:o,series:a,seriesIx:s})}for(var l=0;l<r;l++)this._outOfRangeCallback(e[l],"_outOfRangeMaxPoint",l,t)},e.prototype._outOfRangeCallback=function(t,e,o,r){var i=t[e];if(i){var n=i.categoryIx;r(this._bindPoint(t,o,n,i.item),{category:i.category,categoryIx:n,series:t,seriesIx:o,dataItem:i.item})}},e.prototype._bindPoint=function(t,e,o,r){this._bindCache||(this._bindCache=[]);var i=this._bindCache[e];i||(i=this._bindCache[e]=[]);var n=i[o];return n||(n=i[o]=Xo.current.bindPoint(t,o,r)),n},e.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},e.prototype.pointValue=function(t){return t.valueFields.value},e}(ne);jt(cr,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var ur=cr,dr={click:function(t,e){return t.trigger("seriesClick",this.eventArgs(e))},hover:function(t,e){return t.trigger("seriesHover",this.eventArgs(e))},over:function(t,e){return t.trigger("seriesOver",this.eventArgs(e))},out:function(t,e){return t.trigger("seriesLeave",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:kt(t),originalEvent:t,point:this}}},fr={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&bt(e)&&null!==e&&(this.note=new Pe({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},gr=function(t){function e(e,o){t.call(this),this.value=e,this.options=o,this.aboveAxis=Bt(this.options.aboveAxis,!0),this.tooltipTracking=!0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options,e=t.markers,o=t.labels;if(!this._rendered){if(this._rendered=!0,e.visible&&e.size&&(this.marker=this.createMarker(),this.append(this.marker)),o.visible){var r=ot(o),i=this.pointData(),n=this.value;r?n=r(i):o.format&&(n=this.formatValue(o.format)),this.label=new we(n,B({align:a,vAlign:a,margin:{left:5,right:5},zIndex:Bt(o.zIndex,this.series.zIndex)},o),i),this.append(this.label)}this.createNote(),this.errorBar&&this.append(this.errorBar)}},e.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,o=B({color:this.color},t.border);return bt(o.color)||(o.color=new k.Color(e).brightness(.8).toHex()),o},e.prototype.createVisual=function(){},e.prototype.createMarker=function(){var t=this.options.markers;return new le({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:this.series.opacity||t.opacity,zIndex:Bt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},e.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},e.prototype.reflow=function(t){var e=this.options,o=this.aboveAxis,r=e.vertical;this.render(),this.box=t;var i=t.clone();if(r?o?i.y1-=i.height():i.y2+=i.height():o?i.x1+=i.width():i.x2-=i.width(),this._childBox=i,this.marker&&this.marker.reflow(i),this.reflowLabel(i),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(i);if(this.note){var s=this.markerBox();if(!e.markers.visible||!e.markers.size){var a=s.center();s=new $t(a.x,a.y,a.x,a.y)}this.note.reflow(s)}},e.prototype.reflowLabel=function(t){var e=this.options,o=this.label,r=e.labels.position;o&&(r="below"===(r="above"===r?g:r)?s:r,o.reflow(t),o.box.alignTo(this.markerBox(),r),o.reflow(o.box))},e.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,o=this.options.markers,r=o.size+(o.border.width||0)+(t.border.width||0),i=new le({type:o.type,width:r,height:r,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:Bt(t.border.opacity,1)},opacity:Bt(t.opacity,1)});return i.reflow(this._childBox),i.getElement()},e.prototype.highlightVisual=function(){return(this.marker||{}).visual},e.prototype.highlightVisualArgs=function(){var t,e,o=this.marker;if(o)e=o.paddingBox.toRect(),t=o.visual;else{var r=this.options.markers.size,i=r/2,n=this.box.center();e=new k.geometry.Rect([n.x-i,n.y-i],[r,r])}return{options:this.options,rect:e,visual:t}},e.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var o,r,i=t.x2+5;return this.aboveAxis?(o=t.y1,r=s):(o=t.y2,r=g),{point:new Qt(i,o),align:{horizontal:"left",vertical:r}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},e.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},e}(ne);gr.prototype.defaults={vertical:!0,markers:{visible:!0,background:v,size:8,type:p,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:V(3),padding:V(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},B(gr.prototype,dr),B(gr.prototype,fr);var yr=gr,vr=function(t){function e(e,o,r){t.call(this),this.linePoints=e,this.series=o,this.seriesIx=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.points=function(){return this.toGeometryPoints(this.linePoints)},e.prototype.toGeometryPoints=function(t){for(var e=[],o=0,r=t.length;o<r;o++)t[o]&&!1!==t[o].visible&&e.push(t[o]._childBox.toRect().center());return e},e.prototype.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&&!bt(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},e.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,r=e._defaults;T(o)&&r&&(o=r.color);var i=k.drawing.Path.fromPoints(this.points(),{stroke:{color:o,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex});t.closed&&i.close(),this.visual=i},e.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},e}(ne);jt(vr,{closed:!1});var mr=vr;function xr(t,e,o,r,i){var n=t.box,s=new k.geometry.Point;return s[e]=n[e+o],s[r]=n[r+i],s}var br={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,o=e.justified,r=e.vertical,i=e.reverse,n=r?m:x,s=r?x:m,a=i?2:1,p=a,l=xr(t[0],n,a,s,p),h=[l],c=1;c<t.length;c++){var u=xr(t[c],n,a,s,p);if(l[n]!==u[n]){var d=new k.geometry.Point;d[n]=l[n],d[s]=u[s],h.push(d,u)}l=u}return o?l!==At(h)&&h.push(l):h.push(xr(At(t),n,a,s,i?1:2)),h}},wr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.points=function(){return this.calculateStepPoints(this.linePoints)},e}(mr);B(wr.prototype,br);var _r=wr,Cr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color;T(o)&&e&&(o=e.color);var r=new jo(this.options.closed).process(this.points()),i=new k.drawing.Path({stroke:{color:o,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});i.segments.push.apply(i.segments,r),this.visual=i},e}(mr),kr={renderSegments:function(){var t,e=this.options,o=this.seriesPoints,r=e.series,i=o.length;this._segments=[];for(var n=0;n<i;n++){for(var s=r[n],a=this.sortPoints(o[n]),p=a.length,l=[],h=0;h<p;h++){var c=a[h];c?l.push(c):"interpolate"!==this.seriesMissingValues(s)&&(l.length>1&&(t=this.createSegment(l,s,n,t),this._addSegment(t)),l=[])}l.length>1&&(t=this.createSegment(l,s,n,t),this._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;return!e&&this.options.isStacked?$o:e||"interpolate"},getNearestPoint:function(t,e,o){for(var r,i=new Qt(t,e),n=this.seriesPoints[o],s=u,a=0;a<n.length;a++){var p=n[a];if(p&&bt(p.value)&&null!==p.value&&!1!==p.visible){var l=p.box.center().distanceTo(i);l<s&&(r=p,s=l)}}return r}},Sr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this._setEnd(this.options.box.x1)},e.prototype.step=function(t){var e=this.options.box;this._setEnd(ct(e.x1,e.x2,t))},e.prototype._setEnd=function(t){var e=this.element,o=e.segments,r=o[1].anchor(),i=o[2].anchor();e.suspend(),r.setX(t),e.resume(),i.setX(t)},e}(k.drawing.Animation);jt(Sr,{duration:600}),k.drawing.AnimationFactory.current.register("clip",Sr);var Ar=Sr;function Pr(t){for(var e=0;e<t.length;e++)if(bt(t[e].zIndex))return!0}var Or={createAnimation:function(){var t=this.getRoot();if(t&&!1!==(t.options||{}).transitions){var e=t.size(),o=k.drawing.Path.fromRect(e.toRect());this.visual.clip(o),this.animation=new Ar(o,{box:e}),Pr(this.options.series)&&this._setChildrenAnimation(o)}},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),o=0;o<e.length;o++){var r=e[o];r&&r.visual&&bt(r.visual.options.zIndex)&&r.visual.clip(t)}}},Mr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},e.prototype.pointType=function(){return yr},e.prototype.createPoint=function(t,e){var o=e.categoryIx,r=e.category,i=e.series,n=e.seriesIx,s=this.seriesMissingValues(i),a=t.valueFields.value;if(!bt(a)||null===a){if(s!==$o)return null;a=0}var p=this.pointOptions(i,n);p=this.evalPointOptions(p,a,r,o,i,n);var l=t.fields.color||i.color;T(i.color)&&(l=p.color);var h=new yr(a,p);return h.color=l,this.append(h),h},e.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var o=t.categoryIx,r=this.categoryPoints[o],i=0;i<r.length;i++){var n=r[i];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},e.prototype.createSegment=function(t,e,o){var r=e.style;return new("step"===r?_r:"smooth"===r?Cr:mr)(t,e,o)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e.concat(this._segments)},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(ur);B(Mr.prototype,kr,Or);var Tr=Mr,Rr=function(t){function e(e,o,r,i,n){t.call(this,e,o,r),this.prevSegment=i,this.stackPoints=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){var t=this.series,e=t._defaults,o=t.line||{},r=t.color;T(r)&&e&&(r=e.color),this.visual=new k.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:r,opacity:t.opacity},stroke:null}),o.width>0&&!1!==o.visible&&this.createStroke({stroke:B({color:r,opacity:t.opacity,lineCap:"butt"},o)})},e.prototype.strokeSegments=function(){var t=this._strokeSegments;return t||(t=this._strokeSegments=this.createStrokeSegments()),t},e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},e.prototype.stackSegments=function(){return this.prevSegment?this.prevSegment.createStackSegments(this.stackPoints):this.createStackSegments(this.stackPoints)},e.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},e.prototype.segmentsFromPoints=function(t){return t.map((function(t){return new k.geometry.Segment(t)}))},e.prototype.createStroke=function(t){var e=new k.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),this.visual.append(e)},e.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},e.prototype.createFill=function(t){var e=this.strokeSegments(),o=e.slice(0),r=this.hasStackSegment();if(r){var i=this.stackSegments();mt(o,i)}var n=new k.drawing.Path(t);n.segments.push.apply(n.segments,o),!r&&e.length>1&&this.fillToAxes(n),this.visual.append(n)},e.prototype.fillToAxes=function(t){var e=this.parent,o=e.options.invertAxes,r=e.seriesValueAxis(this.series),i=e.categoryAxisCrossingValue(r),n=r.getSlot(i,i,!0),s=this.strokeSegments(),a=s[0].anchor(),p=At(s).anchor(),l=o?n.x1:n.y1;o?t.lineTo(l,p.y).lineTo(l,a.y):t.lineTo(p.x,l).lineTo(a.x,l)},e}(mr),Br=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},e.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},e}(Rr);B(Br.prototype,br);var Ir=Br,Lr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){var t=new jo(this.options.closed),e=this.points();return t.process(e)},e.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;o>=0;o--){var r=t[o];e.push(new k.geometry.Segment(r.anchor(),r.controlOut(),r.controlIn()))}return e},e}(Rr),jr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,o,r){var i,n,s=this.options.isStacked,a=(e.line||{}).style;s&&o>0&&r&&("gap"!==this.seriesMissingValues(e)?(n=r.linePoints,i=r):n=this._gapStackPoints(t,o,a));return new("step"===a?Ir:"smooth"===a?Lr:Rr)(t,e,o,i,n)},e.prototype.reflow=function(e){t.prototype.reflow.call(this,e);var o=this._stackPoints;if(o)for(var r=0;r<o.length;r++){var i=o[r],n=this.categoryAxis.getSlot(i.categoryIx);i.reflow(n)}},e.prototype._gapStackPoints=function(t,e,o){var r=this.seriesPoints,i=t[0].categoryIx,n=t.length;i<0&&(i=0,n--);var s=i+n,a=this.seriesOptions[0]._outOfRangeMinPoint?1:0,p=[];this._stackPoints=this._stackPoints||[];for(var l=i;l<s;l++){var h=l+a,c=e,u=void 0;do{u=r[--c][h]}while(c>0&&!u);if(u)"step"!==o&&l>i&&!r[c][h-1]&&p.push(this._previousSegmentPoint(l,h,h-1,c)),p.push(u),"step"!==o&&l+1<s&&!r[c][h+1]&&p.push(this._previousSegmentPoint(l,h,h+1,c));else{var d=this._createGapStackPoint(l);this._stackPoints.push(d),p.push(d)}}return p},e.prototype._previousSegmentPoint=function(t,e,o,r){for(var i,n=this.seriesPoints,s=r;s>0&&!i;)i=n[--s][o];return i?i=n[s][e]:(i=this._createGapStackPoint(t),this._stackPoints.push(i)),i},e.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),o=new yr(0,e);return o.categoryIx=t,o.series={},o},e.prototype.seriesMissingValues=function(t){return t.missingValues||$o},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(Tr),Er=function(t){function e(){t.call(this),this.axisRanges={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(t){var e=this.axisRanges;for(var o in t){var r=t[o],i=e[o];e[o]=i=i||{min:u,max:d},i.min=Math.min(i.min,r.min),i.max=Math.max(i.max,r.max)}},e.prototype.reset=function(t){this.axisRanges[t]=void 0},e.prototype.query=function(t){return this.axisRanges[t]},e}(k.Class),Dr=function(t){function e(e,o,r){t.call(this,o),this.textBox=new we(e,this.options,r),this.append(this.textBox)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},e.prototype.reflow=function(t){var e=this.options,o=e.vertical,r=e.aboveAxis,i=this.children[0],n=i.options,p=i.box,l=i.options.padding,h=t;n.align=o?a:c,n.vAlign=o?g:a,"insideEnd"===e.position?o?(n.vAlign=g,!r&&p.height()<t.height()&&(n.vAlign=s)):n.align=r?f:c:e.position===a?(n.vAlign=a,n.align=a):"insideBase"===e.position?o?n.vAlign=r?s:g:n.align=r?c:f:"outsideEnd"===e.position&&(o?h=r?new $t(t.x1,t.y1-p.height(),t.x2,t.y1):new $t(t.x1,t.y2,t.x2,t.y2+p.height()):(n.align=a,h=r?new $t(t.x2,t.y1,t.x2+p.width(),t.y2):new $t(t.x1-p.width(),t.y1,t.x1,t.y2))),e.rotation||(o?l.left=l.right=(h.width()-i.contentBox.width())/2:l.top=l.bottom=(h.height()-i.contentBox.height())/2),i.reflow(h)},e.prototype.alignToClipBox=function(t){var e=this.options.vertical?x:m,o=e+"1",r=e+"2",i=this.children[0],n=this.parent.box;if(n[o]<t[o]||t[r]<n[r]){var s=i.paddingBox.clone();s[o]=Math.max(n[o],t[o]),s[r]=Math.min(n[r],t[r]),this.reflow(s)}},e}(ne);jt(Dr,{position:"outsideEnd",margin:V(3),padding:V(4),color:n,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var Vr=Dr;function zr(t){var e=t.overlay;return e&&e.gradient&&"none"!==e.gradient}var Ur=function(t){function e(e,o){t.call(this),this.options=o,this.color=o.color||v,this.aboveAxis=Bt(this.options.aboveAxis,!0),this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},e.prototype.createLabel=function(){var t=this.options,e=t.labels;if(e.visible){var o,r=this.pointData(),i=ot(e);o=i?i(r):this.formatValue(e.format),this.label=new Vr(o,B({vertical:t.vertical},e),r),this.append(this.label)}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var o=0;o<this.errorBars.length;o++)this.errorBars[o].reflow(t)},e.prototype.createVisual=function(){var e=this,o=this.box,r=this.options,i=r.visual;if(!1!==this.visible)if(t.prototype.createVisual.call(this),i){var n=this.rectVisual=i({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:o.toRect(),createVisual:function(){var t=new k.drawing.Group;return e.createRect(t),t},options:r});n&&this.visual.append(n)}else o.width()>0&&o.height()>0&&this.createRect(this.visual)},e.prototype.createRect=function(t){var e=this.options,o=e.border,r=bt(o.opacity)?o.opacity:e.opacity,i=this.box.toRect();i.size.width=Math.round(i.size.width);var n=this.rectVisual=k.drawing.Path.fromRect(i,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:o.width,opacity:r,dashType:o.dashType}}),s=this.box.width(),a=this.box.height();if((e.vertical?s:a)>6&&(S(n),(s<1||a<1)&&(n.options.stroke.lineJoin="round")),t.append(n),zr(e)){var p=this.createGradientOverlay(n,{baseColor:this.color},B({end:e.vertical?void 0:[0,1]},e.overlay));t.append(p)}},e.prototype.createHighlight=function(t){return S(k.drawing.Path.fromRect(this.box.toRect(),t))},e.prototype.highlightVisual=function(){return this.rectVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},e.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,r=e.color;return bt(r)||(r=new k.Color(t).brightness(o).toHex()),r},e.prototype.tooltipAnchor=function(){var t,e,o=this.options,r=this.box,i=this.aboveAxis,n=this.owner.pane.clipBox()||r,a=c,p=g;if(o.vertical)t=Math.min(r.x2,n.x2)+5,i?e=Math.max(r.y1,n.y1):(e=Math.min(r.y2,n.y2),p=s);else{var l=Math.max(r.x1,n.x1),h=Math.min(r.x2,n.x2);o.isStacked?(p=s,i?(a=f,t=h):t=l,e=Math.max(r.y1,n.y1)-5):(i?t=h+5:(t=l-5,a=f),e=Math.max(r.y1,n.y1))}return{point:new Qt(t,e),align:{horizontal:a,vertical:p}}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.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}},e}(ne);B(Ur.prototype,dr),B(Ur.prototype,fr),Ur.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var Hr=Ur;function Fr(t,e){t.forEach(e)}function Nr(t,e){for(var o=t.length,r=o-1;r>=0;r--)e(t[r],r-o-1)}var Gr=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Nr:Fr}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,o=e.vertical,r=e.gap,i=e.spacing,n=this.children,s=n.length,a=o?x:m,p=s+r+i*(s-1),l=(o?t.height():t.width())/p,h=t[a+1]+l*(r/2);this.forEach(n,(function(e,o){var r=(e.box||t).clone();r[a+1]=h,r[a+2]=h+l,e.reflow(r),o<s-1&&(h+=l*i),h+=l}))},e}(ne);jt(Gr,{vertical:!1,gap:0,spacing:0});var Wr=Gr,Xr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){for(var e=this.options.vertical?m:x,o=this.children,r=o.length,i=this.box=new $t,n=0;n<r;n++){var s=o[n];if(!1!==s.visible){var a=s.box.clone();a.snapTo(t,e),0===n&&(i=this.box=a.clone()),s.reflow(a),i.wrap(a)}}},e}(ne);jt(Xr,{vertical:!0});var Yr=Xr,qr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.updateStackRange()},e.prototype.pointType=function(){return Hr},e.prototype.clusterType=function(){return Wr},e.prototype.stackType=function(){return Yr},e.prototype.stackLimits=function(e,o){return t.prototype.stackLimits.call(this,e,o)},e.prototype.createPoint=function(t,e){var o=e.categoryIx,r=e.category,i=e.series,n=e.seriesIx,s=this.options,a=this.children,p=s.isStacked,l=this.pointValue(t),h=this.pointOptions(i,n),c=h.labels;p&&"outsideEnd"===c.position&&(c.position="insideEnd"),h.isStacked=p;var u=t.fields.color||i.color;l<0&&h.negativeColor&&(u=h.negativeColor),h=this.evalPointOptions(h,l,r,o,i,n),T(i.color)&&(u=h.color);var d=new(this.pointType())(l,h);d.color=u;var f=a[o];f||(f=new(this.clusterType())({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(f));p?this.getStackWrap(i,f).append(d):f.append(d);return d},e.prototype.getStackWrap=function(t,e){var o,r=t.stack,i=r&&r.group||r,n=e.children;if("string"==typeof i){for(var s=0;s<n.length;s++)if(n[s]._stackGroup===i){o=n[s];break}}else o=n[0];o||((o=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=i,e.append(o));return o},e.prototype.categorySlot=function(t,e,o){var r=this.options,i=t.getSlot(e),n=o.startValue();if(r.isStacked){var s=o.getSlot(n,n,!0),a=r.invertAxes?m:x;i[a+1]=i[a+2]=s[a+1]}return i},e.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,r=0;r<o;r++)e[r].reflow(t[r])},e.prototype.createAnimation=function(){this._setAnimationOptions(),t.prototype.createAnimation.call(this),Pr(this.options.series)&&this._setChildrenAnimation()},e.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],r=o.visual;r&&bt(r.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},e.prototype._setAnimationOptions=function(){var t,e=this.options,o=e.animation||{};if(e.isStacked){var r=this.seriesValueAxis(e.series[0]);t=r.getSlot(r.startValue())}else t=this.categoryAxis.getSlot(0);o.origin=new k.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes},e}(ur);jt(qr,{animation:{type:Jo}});var Kr=qr,Qr=function(t){function e(e,o){t.call(this,o),this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,o=this.value,r=this.owner.seriesValueAxis(e),i=r.getSlot(o.open,o.close),n=r.getSlot(o.low,o.high);i.x1=n.x1=t.x1,i.x2=n.x2=t.x2,this.realBody=i;var s=n.center().x,a=[];a.push([[s,n.y1],[s,i.y1]]),a.push([[s,i.y2],[s,n.y2]]),this.lines=a,this.box=n.clone().wrap(i),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},e.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},e.prototype.mainVisual=function(t){var e=new k.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},e.prototype.createBody=function(t,e){var o=k.drawing.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});e.border.width>0&&o.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:Bt(e.border.opacity,e.opacity)}),S(o),t.append(o),zr(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},B({end:e.vertical?void 0:[0,1]},e.overlay)))},e.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},e.prototype.drawLines=function(t,e,o,r){if(o)for(var i={stroke:{color:r.color||this.color,opacity:Bt(r.opacity,e.opacity),width:r.width,dashType:r.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=k.drawing.Path.fromPoints(o[n],i);S(s),t.append(s)}},e.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return bt(e)||(e=new k.Color(this.color).brightness(t._brightness).toHex()),e},e.prototype.createOverlay=function(){var t=k.drawing.Path.fromRect(this.box.toRect(),{fill:{color:v,opacity:0},stroke:null});this.visual.append(t)},e.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color;this.color=t.color||this.color;var o=this.mainVisual(B({},this.options,{line:{color:this.getBorderColor()}},t));return this.color=e,o},e.prototype.highlightVisual=function(){return this._mainVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},e.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new Qt(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:c,vertical:g}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e}(ne);jt(Qr,{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:{}}}),B(Qr.prototype,dr),B(Qr.prototype,fr);var Zr=Qr;function $r(t){return Ho(t)===t.length}var Jr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,r=0;r<o;r++)e[r].reflow(t[r])},e.prototype.addValue=function(t,e){var o,r=e.categoryIx,i=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,l=t.valueFields,h=$r(this.splitValue(l)),c=n.data[r],u=this.categoryPoints[r];u||(this.categoryPoints[r]=u=[]),h&&(o=this.createPoint(t,e));var d=a[r];d||(d=new Wr({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),o&&(this.updateRange(l,e),d.append(o),o.categoryIx=r,o.category=i,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c,o.noteText=t.fields.noteText),this.points.push(o),u.push(o)},e.prototype.pointType=function(){return Zr},e.prototype.createPoint=function(t,e){var o=e.categoryIx,r=e.category,i=e.series,n=e.seriesIx,s=this.pointType(),a=t.valueFields,p=B({},i),l=t.fields.color||i.color;p=this.evalPointOptions(p,a,r,o,i,n),"candlestick"===i.type&&a.open>a.close&&(l=t.fields.downColor||i.downColor||i.color),T(i.color)&&(l=p.color),p.vertical=!this.options.invertAxes;var h=new s(a,p);return h.color=l,h},e.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},e.prototype.updateRange=function(t,e){var o=e.series.axis,r=this.splitValue(t),i=this.valueAxisRanges[o];i=this.valueAxisRanges[o]=i||{min:u,max:d},i=this.valueAxisRanges[o]={min:Math.min.apply(Math,r.concat([i.min])),max:Math.max.apply(Math,r.concat([i.max]))}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.open,o.high,o.low,o.close,t.category)},e.prototype.animationPoints=function(){return this.points},e}(ur);B(Jr.prototype,Or);var ti=Jr,ei=function(t){function e(e,o){t.call(this,e,o),this.createNote()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e,o,r=this.options,i=this.value,n=this.owner.seriesValueAxis(r);this.boxSlot=o=n.getSlot(i.q1,i.q3),this.realBody=o,this.reflowBoxSlot(t),this.whiskerSlot=e=n.getSlot(i.lower,i.upper),this.reflowWhiskerSlot(t);var s=n.getSlot(i.median);if(i.mean){var a=n.getSlot(i.mean);this.meanPoints=this.calcMeanPoints(t,a)}this.whiskerPoints=this.calcWhiskerPoints(o,e),this.medianPoints=this.calcMedianPoints(t,s),this.box=e.clone().wrap(o),this.reflowNote()},e.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},e.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},e.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},e.prototype.calcWhiskerPoints=function(t,e){var o=e.center().x;return[[[o-5,e.y1],[o+5,e.y1],[o,e.y1],[o,t.y1]],[[o-5,e.y2],[o+5,e.y2],[o,e.y2],[o,t.y2]]]},e.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},e.prototype.renderOutliers=function(t){for(var e=this.value,o=e.outliers||[],r=3*Math.abs(e.q3-e.q1),i=[],n=t.markers||{},s=0;s<o.length;s++){var a=o[s],p=B({},(n=a<e.q3+r&&a>e.q1-r?t.outliers:t.extremes).border);bt(p.color)||(bt(this.color)?p.color=this.color:p.color=new k.Color(n.background).brightness(.8).toHex());var l=new le({type:n.type,width:n.size,height:n.size,rotation:n.rotation,background:n.background,border:p,opacity:n.opacity});l.value=a,i.push(l)}return this.reflowOutliers(i),i},e.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),o=this.box.center(),r=0;r<t.length;r++){var i=t[r].value,n=e.getSlot(i);this.options.vertical?n.move(o.x):n.move(void 0,o.y),this.box=this.box.wrap(n),t[r].reflow(n)}},e.prototype.mainVisual=function(e){for(var o=t.prototype.mainVisual.call(this,e),r=this.renderOutliers(e),i=0;i<r.length;i++){var n=r[i].getElement();n&&o.append(n)}return o},e.prototype.createLines=function(t,e){this.drawLines(t,e,this.whiskerPoints,e.whiskers),this.drawLines(t,e,this.medianPoints,e.median),this.drawLines(t,e,this.meanPoints,e.mean)},e.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color?this.color:t.prototype.getBorderColor.call(this)},e}(Zr);jt(ei,{border:{_brightness:.8},line:{width:2},median:{color:"#f6f6f6"},mean:{width:2,dashType:"dash",color:"#f6f6f6"},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{6:d}</th></tr><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:8,type:"cross",background:v,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:p,background:v,border:{width:2,opacity:1},opacity:0}}),B(ei.prototype,dr);var oi=ei,ri=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},e.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},e.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e.prototype.calcWhiskerPoints=function(t,e){var o=e.center().y;return[[[e.x1,o-5],[e.x1,o+5],[e.x1,o],[t.x1,o]],[[e.x2,o-5],[e.x2,o+5],[e.x2,o],[t.x2,o]]]},e.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e}(oi),ii=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addValue=function(t,e){var o,r=e.categoryIx,i=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,l=t.valueFields,h=$r(this.splitValue(l)),c=n.data[r],u=this.categoryPoints[r];u||(this.categoryPoints[r]=u=[]),h&&(o=this.createPoint(t,e));var d=a[r];d||(d=new Wr({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),o&&(this.updateRange(l,e),d.append(o),o.categoryIx=r,o.category=i,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c),this.points.push(o),u.push(o)},e.prototype.pointType=function(){return this.options.invertAxes?ri:oi},e.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},e.prototype.updateRange=function(t,e){var o=e.series.axis,r=this.valueAxisRanges[o],i=this.splitValue(t).concat(this.filterOutliers(t.outliers));bt(t.mean)&&(i=i.concat(t.mean)),r=this.valueAxisRanges[o]=r||{min:u,max:d},r=this.valueAxisRanges[o]={min:Math.min.apply(Math,i.concat([r.min])),max:Math.max.apply(Math,i.concat([r.max]))}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.lower,o.q1,o.median,o.q3,o.upper,o.mean,t.category)},e.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],r=0;r<e;r++){var i=t[r];bt(i)&&null!==i&&o.push(i)}return o},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(ti),ni=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},e}(ar);function si(t){return bt(t)&&null!==t}var ai=function(t){function e(e,o){t.call(this,o),this.plotArea=e,this.chartService=e.chartService,this._initFields(),this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.addErrorBar=function(t,e,o){var r,i=t.value[e],n=e+"Value",s=e+"ErrorLow",a=e+"ErrorHigh",p=o.seriesIx,l=o.series,h=t.options.errorBars,c=o[s],u=o[a];P(i)&&(P(c)&&P(u)&&(r={low:c,high:u}),h&&bt(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][p]=this.seriesErrorRanges[e][p]||new Ko(h[n],l,e),r=this.seriesErrorRanges[e][p].getErrorRange(i,h[n])),r&&this.addPointErrorBar(r,t,e))},e.prototype.addPointErrorBar=function(t,e,o){var r=t.low,i=t.high,n=e.series,s=e.options.errorBars,a=o===x,p={};e[o+"Low"]=r,e[o+"High"]=i,e.errorBars=e.errorBars||[];var l=new ni(r,i,a,this,n,s);e.errorBars.push(l),e.append(l),p[o]=r,this.updateRange(p,n),p[o]=i,this.updateRange(p,n)},e.prototype.addValue=function(t,e){var o,r=t.x,i=t.y,n=e.seriesIx,s=this.options.series[n],a=this.seriesMissingValues(s),p=this.seriesPoints[n],l=t;si(r)&&si(i)||(l=this.createMissingValue(l,a)),l&&((o=this.createPoint(l,e))&&(Object.assign(o,e),this.addErrorBar(o,m,e),this.addErrorBar(o,x,e)),this.updateRange(l,e.series)),this.points.push(o),p.push(o)},e.prototype.seriesMissingValues=function(t){return t.missingValues},e.prototype.createMissingValue=function(){},e.prototype.updateRange=function(t,e){var o=this.chartService.intl,r=e.xAxis,i=e.yAxis,n=t.x,s=t.y,a=this.xAxisRanges[r],p=this.yAxisRanges[i];si(n)&&(a=this.xAxisRanges[r]=a||{min:u,max:d},O(n)&&(n=Ke(o,n)),a.min=Math.min(a.min,n),a.max=Math.max(a.max,n)),si(s)&&(p=this.yAxisRanges[i]=p||{min:u,max:d},O(s)&&(s=Ke(o,s)),p.min=Math.min(p.min,s),p.max=Math.max(p.max,s))},e.prototype.evalPointOptions=function(t,e,o){var r=o.series,i=o.seriesIx,n={defaults:r._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},s=this._evalSeries[i];bt(s)||(this._evalSeries[i]=s=lr(t,{},n,!0));var a=t;return s&&lr(a=B({},t),{value:e,series:r,dataItem:o.dataItem},n),a},e.prototype.pointType=function(){return yr},e.prototype.pointOptions=function(t,e){var o=this.seriesOptions[e];if(!o){var r=this.pointType().prototype.defaults;this.seriesOptions[e]=o=B({},r,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return o},e.prototype.createPoint=function(t,e){var o=e.series,r=this.pointOptions(o,e.seriesIx),i=e.color||o.color;r=this.evalPointOptions(r,t,e),T(o.color)&&(i=r.color);var n=new yr(t,r);return n.color=i,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,r=this.plotArea,i=e?r.namedXAxes[e]:r.axisX,n=o?r.namedYAxes[o]:r.axisY;if(!i)throw new Error("Unable to locate X axis with name "+e);if(!n)throw new Error("Unable to locate Y axis with name "+o);return{x:i,y:n}},e.prototype.reflow=function(t){var e=this,o=this.points,r=!this.options.clip,i=0;this.traverseDataPoints((function(t,n){var s=o[i++],a=e.seriesAxes(n.series),p=a.x.getSlot(t.x,t.x,r),l=a.y.getSlot(t.y,t.y,r);if(s)if(p&&l){var h=e.pointSlot(p,l);s.reflow(h)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new $t(t.x1,e.y1,t.x2,e.y2)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=this.seriesPoints,r=0;r<e.length;r++){var i=e[r];o[r]||(o[r]=[]);for(var n=0;n<i.data.length;n++){var s=this._bindPoint(i,r,n),a=s.valueFields,p=s.fields;t(a,B({pointIx:n,series:i,seriesIx:r,dataItem:i.data[n],owner:this},p))}}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},e}(ne);jt(ai,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),B(ai.prototype,Or,{_bindPoint:ur.prototype._bindPoint});var pi=ai,li=function(t){function e(e,o){t.call(this,e,o),this.category=e.category}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,o=this.options.markers,r=this.box.center(),i=(o.size+o.border.width+e.width)/2,n=new k.drawing.Group,s=new k.drawing.Circle(new k.geometry.Circle([r.x,r.y+i/5+e.width/2],i+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:o.background,stops:[{offset:0,color:o.background,opacity:.3},{offset:1,color:o.background,opacity:0}]})}),a=new k.drawing.Circle(new k.geometry.Circle([r.x,r.y],i),{stroke:{color:e.color||new k.Color(o.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:o.background,opacity:t.opacity}});return n.append(s,a),n},e}(yr);li.prototype.defaults=B({},li.prototype.defaults,{labels:{position:a},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),li.prototype.defaults.highlight.zIndex=void 0;var hi=li,ci=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this._maxSize=d,t.prototype._initFields.call(this)},e.prototype.addValue=function(e,o){null!==e.size&&(e.size>0||e.size<0&&o.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(e.size)),t.prototype.addValue.call(this,e,o)):(this.points.push(null),this.seriesPoints[o.seriesIx].push(null))},e.prototype.reflow=function(e){this.updateBubblesSize(e),t.prototype.reflow.call(this,e)},e.prototype.pointType=function(){return hi},e.prototype.createPoint=function(t,e){var o=e.series,r=o.data.length,i=e.pointIx*(600/r),n={delay:i,duration:600-i,type:"bubble"},s=e.color||o.color;t.size<0&&o.negativeValues.visible&&(s=Bt(o.negativeValues.color,s));var a=B({labels:{animation:{delay:i,duration:600-i}}},this.pointOptions(o,e.seriesIx),{markers:{type:p,border:o.border,opacity:o.opacity,animation:n}});a=this.evalPointOptions(a,t,e),T(o.color)&&(s=a.color),a.markers.background=s;var l=new hi(t,a);return l.color=s,this.append(l),l},e.prototype.updateBubblesSize=function(t){for(var e=this.options.series,o=Math.min(t.width(),t.height()),r=0;r<e.length;r++)for(var i=e[r],n=this.seriesPoints[r],s=(i.minSize||Math.max(.02*o,10))/2,a=(i.maxSize||.2*o)/2,p=Math.PI*s*s,l=(Math.PI*a*a-p)/this._maxSize,h=0;h<n.length;h++){var c=n[h];if(c){var u=Math.abs(c.value.size)*l,d=Math.sqrt((p+u)/Math.PI),f=Bt(c.options.zIndex,0)+(1-d/a);B(c.options,{zIndex:f,markers:{size:2*d,zIndex:f},labels:{zIndex:f+1}})}}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},e.prototype.createAnimation=function(){},e.prototype.createVisual=function(){},e}(pi);jt(ci,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var ui=ci,di=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(le);B(di.prototype,dr);var fi=di,gi=function(t){function e(e,o){t.call(this,o),this.aboveAxis=this.options.aboveAxis,this.color=o.color||v,this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,bt(this.value.target)&&(this.target=new fi({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:g,align:f}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},e.prototype.reflow=function(t){this.render();var e=this.options,o=this.target,r=this.owner,i=e.invertAxes,n=r.seriesValueAxis(this.options),s=r.categorySlot(r.categoryAxis,e.categoryIx,n),a=n.getSlot(this.value.target),p=i?a:s,l=i?s:a;if(o){var h=new $t(p.x1,l.y1,p.x2,l.y2);o.options.height=i?h.height():e.target.line.width,o.options.width=i?e.target.line.width:h.width(),o.reflow(h)}this.note&&this.note.reflow(t),this.box=t},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options,o=k.drawing.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});e.border.width>0&&o.options.set("stroke",{color:e.border.color||this.color,width:e.border.width,dashType:e.border.dashType,opacity:Bt(e.border.opacity,e.opacity)}),this.bodyVisual=o,S(o),this.visual.append(o)},e.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=k.drawing.Animation.create(this.bodyVisual,this.options.animation))},e.prototype.createHighlight=function(t){return k.drawing.Path.fromRect(this.box.toRect(),t)},e.prototype.highlightVisual=function(){return this.bodyVisual},e.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e}(ne);gi.prototype.tooltipAnchor=Hr.prototype.tooltipAnchor,jt(gi,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),B(gi.prototype,dr),B(gi.prototype,fr);var yi=gi,vi=function(t){function e(e,o){!function(t){for(var e=t.series,o=0;o<e.length;o++){var r=e[o],i=r.data;!i||b(i[0])||I(i[0])||(r.data=[i])}}(o),t.call(this,e,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,r=0;r<o;r++)e[r].reflow(t[r])},e.prototype.plotRange=function(t){var e=t.series,o=this.seriesValueAxis(e),r=this.categoryAxisCrossingValue(o);return[r,t.value.current||r]},e.prototype.createPoint=function(t,e){var o=e.categoryIx,r=e.category,i=e.series,n=e.seriesIx,s=this.options,a=this.children,p=t.valueFields,l=B({vertical:!s.invertAxes,overlay:i.overlay,categoryIx:o,invertAxes:s.invertAxes},i),h=t.fields.color||i.color;l=this.evalPointOptions(l,p,r,o,i,n),T(i.color)&&(h=l.color);var c=new yi(p,l);c.color=h;var u=a[o];return u||(u=new Wr({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(u)),u.append(c),c},e.prototype.updateRange=function(t,e){var o=t.current,r=t.target,i=e.series.axis,n=this.valueAxisRanges[i];bt(o)&&!isNaN(o)&&bt(r&&!isNaN(r))&&((n=this.valueAxisRanges[i]=n||{min:u,max:d}).min=Math.min(n.min,o,r),n.max=Math.max(n.max,o,r))},e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},e.prototype.pointValue=function(t){return t.valueFields.current},e.prototype.aboveAxis=function(t){return t.value.current>0},e.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var o=t[e];o.options.animation=this.options.animation,o.createAnimation()}},e}(ur);vi.prototype._setAnimationOptions=Kr.prototype._setAnimationOptions,jt(vi,{animation:{type:Jo}});var mi=vi,xi=function(t){function e(e,o){t.call(this),this.chartService=e,this.options=B({},this.options,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getStyle=function(t,e){var o=t.background,r=t.border.color;if(e){var i=e.color||e.options.color;o=Bt(o,i),r=Bt(r,i)}var n=V(t.padding||{},"auto");return{backgroundColor:o,borderColor:r,font:t.font,color:t.color,opacity:t.opacity,borderWidth:L(t.border.width),paddingTop:L(n.top),paddingBottom:L(n.bottom),paddingLeft:L(n.left),paddingRight:L(n.right)}},e.prototype.show=function(t,e,o){t.format=e.format;var r=this.getStyle(e,o);t.style=r;var i=new k.Color(r.backgroundColor);bt(e.color)||i.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},e.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},e.prototype.destroy=function(){delete this.chartService},e}(k.Class);jt(xi,{border:{width:1},opacity:1});var bi=xi,wi=function(t){function e(e,o,r){t.call(this,e,r),this.crosshair=o,this.formatService=e.format,this.initAxisName()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initAxisName=function(){var t,e=this.crosshair.axis;t=e.plotArea.categoryAxis?e.getCategory?"categoryAxis":"valueAxis":e.options.vertical?"yAxis":"xAxis",this.axisName=t},e.prototype.showAt=function(t){var e=this.crosshair.axis,o=this.options,r=e[o.stickyMode?"getCategory":"getValue"](t),i=r;o.format?i=this.formatService.auto(o.format,r):e.options.type===l&&(i=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],r)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:i,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},e.prototype.hide=function(){this.chartService.notify("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},e.prototype.getAnchor=function(){var t,e,o,r=this.crosshair,i=this.options,n=i.position,p=i.padding,l=!r.axis.options.vertical,h=r.line.bbox();return l?(t=a,n===s?(e=g,o=h.bottomLeft().translate(0,p)):(e=s,o=h.topLeft().translate(0,-p))):(e=a,n===c?(t=f,o=h.topLeft().translate(-p,0)):(t=c,o=h.topRight().translate(p,0))),{point:o,align:{horizontal:t,vertical:e}}},e}(bi);jt(wi,{padding:10});var _i=wi,Ci=function(t){function e(e,o,r){t.call(this,r),this.axis=o,this.stickyMode=o instanceof Je;var i=this.options.tooltip;i.visible&&(this.tooltip=new _i(e,this,B({},i,{stickyMode:this.stickyMode})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},e.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},e.prototype.moveLine=function(){var t,e=this.axis,o=this.point,r=e.options.vertical,i=this.getBox(),n=r?x:m,s=new k.geometry.Point(i.x1,i.y1);if(t=r?new k.geometry.Point(i.x2,i.y1):new k.geometry.Point(i.x1,i.y2),o)if(this.stickyMode){var a=e.getSlot(e.pointCategoryIndex(o));s[n]=t[n]=a.center()[n]}else s[n]=t[n]=o[n];this.box=i,this.line.moveTo(s).lineTo(t)},e.prototype.getBox=function(){for(var t,e=this.axis,o=e.pane.axes,r=o.length,i=e.options.vertical,n=e.lineBox().clone(),s=i?m:x,a=0;a<r;a++){var p=o[a];p.options.vertical!==i&&(t?t.wrap(p.lineBox()):t=p.lineBox().clone())}return n[s+1]=t[s+1],n[s+2]=t[s+2],n},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options;this.line=new k.drawing.Path({stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},e.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),t.prototype.destroy.call(this)},e}(ne);jt(Ci,{color:n,width:2,zIndex:-1,tooltip:{visible:!1}});var ki=Ci,Si=function(t){function e(e,o){t.call(this,e),this.pane=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.shouldClip=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)if(!0===t[o].options.clip)return!0;return!1},e.prototype._clipBox=function(){return this.pane.chartsBox()},e.prototype.createVisual=function(){if(this.visual=new k.drawing.Group({zIndex:0}),this.shouldClip()){var t=(this.clipBox=this._clipBox()).toRect(),e=k.drawing.Path.fromRect(t);S(e),this.visual.clip(e),this.unclipLabels()}},e.prototype.stackRoot=function(){return this},e.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,o=0;o<t.length;o++)for(var r=t[o].points||{},i=r.length,n=0;n<i;n++){var s=r[n];if(s&&!1!==s.visible&&s.overlapsBox&&s.overlapsBox(e))if(s.unclipElements)s.unclipElements();else{var a=s.label,p=s.note;a&&a.options.visible&&(a.alignToClipBox&&a.alignToClipBox(e),a.options.noclip=!0),p&&p.options.visible&&(p.options.noclip=!0)}}},e.prototype.destroy=function(){t.prototype.destroy.call(this),delete this.parent},e}(ne);Si.prototype.isStackRoot=!0;var Ai=Si,Pi=function(t){function e(e){t.call(this,e),this.id="pane"+Oi++,this.createTitle(),this.content=new ne,this.chartContainer=new Ai({},this),this.append(this.content),this.axes=[],this.charts=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createTitle=function(){var t=this.options.title;I(t)&&(t=B({},t,{align:t.position,position:g})),this.title=Ce.buildTitle(t,this,e.prototype.options.title)},e.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},e.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},e.prototype.appendChart=function(t){this.chartContainer.parent!==this.content&&this.content.append(this.chartContainer),this.charts.push(t),this.chartContainer.append(t),t.pane=this},e.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var o=0;o<this.charts.length;o++)t.removeChart(this.charts[o])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},e.prototype.reflow=function(e){var o;At(this.children)===this.content&&(o=this.children.pop()),t.prototype.reflow.call(this,e),o&&this.children.push(o),this.title&&(this.contentBox.y1+=this.title.box.height())},e.prototype.visualStyle=function(){var e=t.prototype.visualStyle.call(this);return e.zIndex=-10,e},e.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},e.prototype.stackRoot=function(){return this},e.prototype.clipRoot=function(){return this},e.prototype.createGridLines=function(){for(var t=this.axes,e=t.concat(this.parent.axes),o=[],r=[],i=0;i<t.length;i++)for(var n=t[i],s=n.options.vertical,a=s?o:r,p=0;p<e.length;p++)if(0===a.length){var l=e[p];s!==l.options.vertical&&mt(a,n.createGridLines(l))}},e.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),this.content.parent=this,this.title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},e.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new $t,r=0;r<e;r++){var i=t[r],n=i.options.vertical?x:m,s=i.lineBox();o[n+1]=s[n+1],o[n+2]=s[n+2]}if(0===o.x2)for(var a=this.parent.axes,p=a.length,l=0;l<p;l++){var h=a[l];if(!h.options.vertical){var c=h.lineBox();o.x1=c.x1,o.x2=c.x2}}return o},e.prototype.clipBox=function(){return this.chartContainer.clipBox},e.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new zo(this),index:this.paneIndex,name:this.options.name})},e}(ae),Oi=1;Pi.prototype.isStackRoot=!0,jt(Pi,{zIndex:-1,shrinkToFit:!0,title:{align:c},visible:!0});var Mi=Pi;function Ti(t,e){null!==e&&t.push(e)}function Ri(t,e,o){var r=e.visible;if(bt(r))return r;var i=t.pointVisibility;return i?i[o]:void 0}function Bi(t){for(var e=t.data,o=[],r=0,i=0,n=0;n<e.length;n++){var s=Xo.current.bindPoint(t,n),a=s.valueFields.value;O(a)&&(a=parseFloat(a)),P(a)?(s.visible=!1!==Ri(t,s.fields,n),s.value=Math.abs(a),o.push(s),s.visible&&(r+=s.value),0!==a&&i++):o.push(null)}return{total:r,points:o,count:i}}function Ii(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function Li(t,e){for(var o=[],r=[].concat(e),i=0;i<t.length;i++){var n=t[i];ht(n.type,r)&&o.push(n)}return o}function ji(t,e,o){if(null===e)return e;var r="_date_"+t,i=e[r];return i||(i=Ke(o,nt(t)(e)),e[r]=i),i}function Ei(t,e){var o=t.type,r=e instanceof Date;return!o&&r||Ii(o,l)}function Di(t){return 1===t.length?t[0]:t}var Vi=/area/i;function zi(t,e){var o=Xo.current.bindPoint(t,null,e).valueFields;for(var r in o)if(M(o[r]))return!0}function Ui(t){var e,o,r=t.start,i=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,l=t.series,h=r;do{p(h+=i)&&(e=zi(l,(o=a(h)).item))}while(n<=h&&h<=s&&!e);if(e)return o}function Hi(t,e,o,r,i){var n=e.min,s=e.max,a=n>0&&n<o,p=s+1<o;if(a||p){var l,h,c;if("interpolate"!==function(t){return t.missingValues?t.missingValues:Vi.test(t.type)||t.stack?$o:"interpolate"}(t))a&&(l=r(n-1)),p&&(h=r(s+1));else a&&(l=zi(t,(c=r(n-1)).item)?c:Ui({start:n,dir:-1,min:0,max:o-1,getter:r,hasItem:i,series:t})),p&&(h=zi(t,(c=r(s+1)).item)?c:Ui({start:s,dir:1,min:0,max:o-1,getter:r,hasItem:i,series:t}));l&&(t._outOfRangeMinPoint=l),h&&(t._outOfRangeMaxPoint=h)}}var Fi=function(t){function e(e,o,r){t.call(this,o),this.initFields(e,o),this.series=e,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.items=[],this.axes=[],this.crosshairs=[],this.chartService=r,this.originalOptions=o,this.createPanes(),this.render(),this.createCrosshairs()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){},e.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},e.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,o=this.options.panes||[],r=Math.max(o.length,1),i=[],n=B({title:{color:t.color}},e),s=0;s<r;s++){var a=B({},n,o[s]);O(a.title)&&(a.title=B({text:a.title},n.title));var p=new Mi(a);p.paneIndex=s,i.push(p),this.append(p)}this.panes=i},e.prototype.crosshairOptions=function(t){return t.options.crosshair},e.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var o=t[e],r=0;r<o.axes.length;r++){var i=o.axes[r],n=this.crosshairOptions(i);if(n&&n.visible){var s=new ki(this.chartService,i,n);this.crosshairs.push(s),o.content.append(s)}}},e.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,o=t.axes,r=e.length-1;r>=0;r--)for(var i=0;i<o.length;i++)if(e[r].axis===o[i]){e.splice(r,1);break}},e.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},e.prototype.findPane=function(t){for(var e,o=this.panes,r=0;r<o.length;r++)if(o[r].options.name===t){e=o[r];break}return e||o[0]},e.prototype.findPointPane=function(t){for(var e,o=this.panes,r=0;r<o.length;r++)if(o[r].box.containsPoint(t)){e=o[r];break}return e},e.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},e.prototype.removeAxis=function(t){for(var e=[],o=0;o<this.axes.length;o++){var r=this.axes[o];t!==r?e.push(r):r.destroy()}this.axes=e},e.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},e.prototype.removeChart=function(t){for(var e=[],o=0;o<this.charts.length;o++){var r=this.charts[o];r!==t?e.push(r):r.destroy()}this.charts=e},e.prototype.addToLegend=function(t){for(var e=t.length,o=this.options.legend,r=o.labels||{},i=o.inactiveItems||{},n=i.labels||{},s=[],a=0;a<e;a++){var p=t[a],l=!1!==p.visible;if(!1!==p.visibleInLegend){var h=p.name,c=l?ot(r):ot(n)||ot(r);c&&(h=c({text:si(h)?h:"",series:p}));var u=p._defaults,d=p.color;T(d)&&u&&(d=u.color);var f=void 0,g=void 0;l?(f={},g=d):(f={color:n.color,font:n.font},g=i.markers.color),si(h)&&""!==h&&s.push({text:h,labels:f,markerColor:g,series:p,active:l})}}mt(o.items,s)},e.prototype.groupAxes=function(t){for(var e=[],o=[],r=0;r<t.length;r++)for(var i=t[r].axes,n=0;n<i.length;n++){var s=i[n];s.options.vertical?o.push(s):e.push(s)}return{x:e,y:o,any:e.concat(o)}},e.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},o=0;o<t.length;o++){var r=t[o],i=this.seriesPaneName(r);e[i]?e[i].push(r):e[i]=[r]}return e},e.prototype.filterVisibleSeries=function(t){for(var e=[],o=0;o<t.length;o++){var r=t[o];!1!==r.visible&&e.push(r)}return e},e.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,r=V(e.margin);this.box=t.clone().unpad(r),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},e.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();var o=this.getRoot();o&&o.cleanGradients();for(var r=0;r<e.length;r++)this.removeCrosshairs(e[r]),e[r].empty();this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var i=0;i<e.length;i++)e[i].refresh()},e.prototype.axisCrossingValues=function(t,e){for(var o=t.options,r=[].concat(o.axisCrossingValues||o.axisCrossingValue),i=e.length-r.length,n=r[0]||0,s=0;s<i;s++)r.push(n);return r},e.prototype.alignAxisTo=function(t,e,o,r){var i=t.getSlot(o,o,!0),n=t.options.reverse?2:1,s=e.getSlot(r,r,!0),a=e.options.reverse?2:1,p=t.box.translate(s[m+a]-i[m+n],s[x+a]-i[x+n]);t.pane!==e.pane&&p.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(p)},e.prototype.alignAxes=function(t,e){for(var o=t[0],r=e[0],i=this.axisCrossingValues(o,e),n=this.axisCrossingValues(r,t),a={},p={},l={},h={},u=0;u<e.length;u++){var d=e[u],y=d.pane,v=y.id,m=!1!==d.options.visible,x=Wi(t,y)||o,b=i;x!==o&&(b=this.axisCrossingValues(x,e)),this.alignAxisTo(d,x,n[u],b[u]),d.options._overlap||(Tt(d.lineBox().x1)===Tt(x.lineBox().x1)&&(a[v]&&d.reflow(d.box.alignTo(a[v].box,c).translate(-d.options.margin,0)),m&&(a[v]=d)),Tt(d.lineBox().x2)===Tt(x.lineBox().x2)&&(d._mirrored||(d.options.labels.mirror=!d.options.labels.mirror,d._mirrored=!0),this.alignAxisTo(d,x,n[u],b[u]),p[v]&&d.reflow(d.box.alignTo(p[v].box,f).translate(d.options.margin,0)),m&&(p[v]=d)),0!==u&&r.pane===d.pane&&(d.alignTo(r),d.reflow(d.box)))}for(var w=0;w<t.length;w++){var _=t[w],C=_.pane,k=C.id,S=!1!==_.options.visible,A=Wi(e,C)||r,P=n;A!==r&&(P=this.axisCrossingValues(A,t)),this.alignAxisTo(_,A,i[w],P[w]),_.options._overlap||(Tt(_.lineBox().y1)===Tt(A.lineBox().y1)&&(_._mirrored||(_.options.labels.mirror=!_.options.labels.mirror,_._mirrored=!0),this.alignAxisTo(_,A,i[w],P[w]),l[k]&&_.reflow(_.box.alignTo(l[k].box,g).translate(0,-_.options.margin)),S&&(l[k]=_)),Tt(_.lineBox().y2,3)===Tt(A.lineBox().y2,3)&&(h[k]&&_.reflow(_.box.alignTo(h[k].box,s).translate(0,_.options.margin)),S&&(h[k]=_)),0!==w&&(_.alignTo(o),_.reflow(_.box)))}},e.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=Gi(e),r=0,i=0;i<t.length;i++){var n=t[i];n.axes.length>0&&(r=Math.max(r,o.width()-n.contentBox.width()))}if(0!==r)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(r,0))}},e.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var r=t[o],i=r.axes,n=Math.max(0,Gi(i).height()-r.contentBox.height());if(0!==n){for(var s=0;s<i.length;s++){var a=i[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},e.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,o=0,r=0;r<t.length;r++){var i=t[r],n=i.axes,s=i.contentBox;if(n.length>0){var a=Gi(n),p=Math.max(s.y1-a.y1,s.y2-a.y2);o=Math.max(o,s.x1-a.x1);for(var l=0;l<n.length;l++){var h=n[l];h.reflow(h.box.translate(0,p))}}}for(var c=0;c<e.length;c++){var u=e[c];u.reflow(u.box.translate(o,0))}},e.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),o=0;o<t.length;o++)this.reflowPaneAxes(t[o]);e.x.length>0&&e.y.length>0&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},e.prototype.autoRotateAxisLabels=function(t){for(var e,o=this.panes,r=Xi(o),i=0;i<r.length;i++){r[i].autoRotateLabels()&&(e=!0)}if(e){for(var n=0;n<o.length;n++)this.reflowPaneAxes(o[n]);t.x.length>0&&t.y.length>0&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(o))}},e.prototype.reflowPaneAxes=function(t){var e=t.axes,o=e.length;if(o>0)for(var r=0;r<o;r++)e[r].reflow(t.contentBox)},e.prototype.reflowCharts=function(t){for(var e=this.charts,o=e.length,r=this.box,i=0;i<o;i++){var n=e[i].pane;n&&!ht(n,t)||e[i].reflow(r)}},e.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,o=e.length,r=t.height(),i=0,n=t.y1,s=0;s<o;s++){var a=e[s],p=a.options.height;if(a.options.width=t.width(),a.options.height){if(p.indexOf&&p.indexOf("%")){var l=parseInt(p,10)/100;a.options.height=l*t.height()}a.reflow(t.clone()),r-=a.options.height}else i++}for(var h=0;h<o;h++){var c=e[h];c.options.height||(c.options.height=r/i)}for(var u=0;u<o;u++){var d=e[u],f=t.clone().move(t.x1,n);d.reflow(f),n+=d.options.height}},e.prototype.backgroundBox=function(){for(var t,e=this.axes,o=e.length,r=0;r<o;r++)for(var i=e[r],n=0;n<o;n++){var s=e[n];if(i.options.vertical!==s.options.vertical){var a=i.lineBox().clone().wrap(s.lineBox());t=t?t.wrap(a):a}}return t||this.box},e.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},e.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(k.drawing.Path.fromRect(e[o].toRect()))},e.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e,o=this.options.plotArea,r=o.opacity,i=o.background,n=o.border;void 0===n&&(n={}),""!==(e=i)&&null!==e&&"none"!==e&&"transparent"!==e&&bt(e)||(i=v,r=0);var s=this._bgVisual=new k.drawing.MultiPath({fill:{color:i,opacity:r},stroke:{color:n.width?n.color:"",width:n.width,dashType:n.dashType},zIndex:-1});this.addBackgroundPaths(s),this.appendVisual(s)},e.prototype.pointsByCategoryIndex=function(t){var e=this.charts,o=[];if(null!==t)for(var r=0;r<e.length;r++){if("_navigator"!==e[r].pane.options.name){var i=e[r].categoryPoints[t];if(i&&i.length)for(var n=0;n<i.length;n++){var s=i[n];s&&bt(s.value)&&null!==s.value&&o.push(s)}}}return o},e.prototype.pointsBySeriesIndex=function(t){return this.filterPoints((function(e){return e.series.index===t}))},e.prototype.pointsBySeriesName=function(t){return this.filterPoints((function(e){return e.series.name===t}))},e.prototype.filterPoints=function(t){for(var e=this.charts,o=[],r=0;r<e.length;r++)for(var i=e[r].points,n=0;n<i.length;n++){var s=i[n];s&&!1!==s.visible&&t(s)&&o.push(s)}return o},e.prototype.findPoint=function(t){for(var e=this.charts,o=0;o<e.length;o++)for(var r=e[o].points,i=0;i<r.length;i++){var n=r[i];if(n&&!1!==n.visible&&t(n))return n}},e.prototype.paneByPoint=function(t){for(var e=this.panes,o=0;o<e.length;o++){var r=e[o];if(r.box.containsPoint(t))return r}},e.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,o=t.y;this.detachAxisGroupLabels(o,e),this.detachAxisGroupLabels(e,o)},e.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,r=0;r<t.length;r++){var i=t[r],n=i.pane,s=Wi(e,n)||e[0],a=r+o,p=this.createLabelAxis(i,a,s);if(p){o++;var l=n.axes.indexOf(i)+o;n.appendAxisAt(p,l)}}},e.prototype.createLabelAxis=function(t,e,o){var r=t.options.labels,i=r.position,n="end"!==i&&"start"!==i,s=r.visible;if(n||!1===s)return null;var a=this.groupAxes(this.panes),p=o.options.vertical?a.x:a.y,l=this.axisCrossingValues(o,p),h="end"===i,c=o.range(),u=h?c.max:c.min;if(Pt(l[e],c.min,c.max)-u==0)return null;l.splice(e+1,0,u),o.options.axisCrossingValues=l;var d=t.clone();return t.clear(),d.options.name=void 0,d.options.line.visible=!1,d.options.crosshair=void 0,d.options.notes=void 0,d.options.plotBands=void 0,d},e}(ne);function Ni(t){return!t.pane.axes.some((function(e){return e.options.vertical===t.options.vertical&&e!==t&&!1!==e.options.visible}))}function Gi(t){for(var e,o=t.length,r=0;r<o;r++){var i=t[r],n=!1!==i.options.visible;if(n||Ni(i)){var s=n?i.contentBox():i.lineBox();e?e.wrap(s):e=s.clone()}}return e||new $t}function Wi(t,e){for(var o=0;o<t.length;o++){var r=t[o];if(r&&r.pane===e)return r}}var Xi=function(t){return t.reduce((function(t,e){return t.concat(e.axes)}),[])};jt(Fi,{series:[],plotArea:{margin:{}},background:"",border:{color:n,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var Yi=Fi,qi={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};function Ki(t,e,o){var r=e,i=t;if(t.indexOf(".")>-1){for(var n=t.split(".");n.length>1;)i=n.shift(),bt(r[i])||(r[i]={}),r=r[i];i=n.shift()}r[i]=o}var Qi=function(t){function e(e,o,r){t.call(this);var i=o.canonicalFields(e),n=o.valueFields(e),s=o.sourceFields(e,i),a=this._seriesFields=[],p=r.query(e.type),l=e.aggregate||p;this._series=e,this._binder=o;for(var h=0;h<i.length;h++){var c=i[h],u=void 0;if(I(l))u=l[c];else{if(0!==h&&!ht(c,n))break;u=l}u&&a.push({canonicalName:c,name:s[h],transform:T(u)?u:No[u]})}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.aggregatePoints=function(t,e){var o=this._series,r=this._seriesFields,i=this._bindPoints(t||[]),n=i.dataItems[0],s={};if(n&&!P(n)&&!b(n)){var a=function(){};a.prototype=n,s=new a}for(var p=0;p<r.length;p++){var l=r[p],h=this._bindField(i.values,l.canonicalName),c=l.transform(h,o,i.dataItems,e);if(!(null===c||!I(c)||bt(c.length)||c instanceof Date)){s=c;break}bt(c)&&Ki(l.name,s,c)}return s},e.prototype._bindPoints=function(t){for(var e=this._binder,o=this._series,r=[],i=[],n=0;n<t.length;n++){var s=t[n];r.push(e.bindPoint(o,s)),i.push(o.data[s])}return{values:r,dataItems:i}},e.prototype._bindField=function(t,e){for(var o=[],r=t.length,i=0;i<r;i++){var n=t[i],s=n.valueFields,a=void 0;a=bt(s[e])?s[e]:n.fields[e],o.push(a)}return o},e}(k.Class),Zi=function(t){function e(){t.call(this),this._defaults={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},e.prototype.query=function(t){return this._defaults[t]},e}(k.Class);Zi.current=new Zi;var $i=Zi,Ji=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createLabel=function(){var t=this.options.labels,e=B({},t,t.from),o=B({},t,t.to);e.visible&&(this.labelFrom=this._createLabel(e),this.append(this.labelFrom)),o.visible&&(this.labelTo=this._createLabel(o),this.append(this.labelTo))},e.prototype._createLabel=function(t){var e,o=ot(t),r=this.pointData();return e=o?o(r):this.formatValue(t.format),new Vr(e,B({vertical:this.options.vertical},t),r)},e.prototype.reflow=function(t){this.render();var e=this.labelFrom,o=this.labelTo,r=this.value;this.box=t,e&&(e.options.aboveAxis=r.from>r.to,e.reflow(t)),o&&(o.options.aboveAxis=r.to>r.from,o.reflow(t)),this.note&&this.note.reflow(t)},e}(Hr);Ji.prototype.defaults=B({},Ji.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var tn=Ji,en=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return tn},e.prototype.pointValue=function(t){return t.valueFields},e.prototype.formatPointValue=function(t,e){return null===t.value.from&&null===t.value.to?"":this.chartService.format.auto(e,t.value.from,t.value.to)},e.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},e.prototype.updateRange=function(t,e){var o=e.series.axis,r=t.from,i=t.to,n=this.valueAxisRanges[o];null!==t&&P(r)&&P(i)&&((n=this.valueAxisRanges[o]=n||{min:u,max:d}).min=Math.min(n.min,r),n.max=Math.max(n.max,r),n.min=Math.min(n.min,i),n.max=Math.max(n.max,i))},e.prototype.aboveAxis=function(t){var e=t.value;return e.from<e.to},e}(Kr);en.prototype.plotLimits=ur.prototype.plotLimits;var on=en,rn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.aliasFor=function(){return this.parent},e}(yr),nn=function(t){function e(e,o){t.call(this),this.value=e,this.options=o,this.aboveAxis=Bt(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){if(!this._rendered){this._rendered=!0;var t=this.options,e=t.markers,o=t.labels,r=this.value,i=this.fromPoint=new rn(r,B({},this.options,{labels:o.from,markers:e.from})),n=this.toPoint=new rn(r,B({},this.options,{labels:o.to,markers:e.to}));this.copyFields(i),this.copyFields(n),this.append(i),this.append(n)}},e.prototype.reflow=function(t){this.render();var e=t.from,o=t.to;this.positionLabels(e,o),this.fromPoint.reflow(e),this.toPoint.reflow(o),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},e.prototype.createHighlight=function(){var t=new k.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},e.prototype.highlightVisual=function(){return this.visual},e.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},e.prototype.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,o,r,i=this.box,n=i.center();return this.options.vertical?(e=n.x,o=i.y1-5,r=s):(e=i.x2+5,o=n.y,r=a),{point:new Qt(e,o),align:{horizontal:"left",vertical:r}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},e.prototype.initLabelsFormat=function(){var t=this.options.labels;t.format||(t.from&&t.from.format||(t.from=Object.assign({},t.from,{format:"{0}"})),t.to&&t.to.format||(t.to=Object.assign({},t.to,{format:"{1}"})))},e.prototype.positionLabels=function(t,e){var o,r,i=this.options,n=i.labels,s=i.vertical;"auto"===n.position&&(s?e.y1<=t.y1?(r="above",o="below"):(r="below",o="above"):e.x1<=t.x1?(r=c,o=f):(r=f,o=c),n.from&&n.from.position||(this.fromPoint.options.labels.position=o),n.to&&n.to.position||(this.toPoint.options.labels.position=r))},e.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},e}(ne);B(nn.prototype,dr),B(nn.prototype,fr),nn.prototype.defaults={markers:{visible:!1,background:v,size:8,type:p,border:{width:2},opacity:1},labels:{visible:!1,margin:V(3),padding:V(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:v,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var sn=nn,an=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))),t},e.prototype.createStroke=function(t){var e=new k.drawing.Path(t),o=new k.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),o.segments.push.apply(o.segments,this.stackSegments()),this.visual.append(e),this.visual.append(o)},e.prototype.hasStackSegment=function(){return!0},e.prototype.fromPoints=function(){return this.linePoints.map((function(t){return t.fromPoint}))},e.prototype.toPoints=function(){return this.linePoints.map((function(t){return t.toPoint}))},e}(Rr),pn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())),t},e.prototype.createCurveSegments=function(t){return(new jo).process(this.toGeometryPoints(t))},e}(an),ln=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},e}(an);B(ln.prototype,br);var hn=ln,cn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.pointType=function(){return sn},e.prototype.createPoint=function(t,e){var o=e.categoryIx,r=e.category,i=e.series,n=e.seriesIx,s=t.valueFields;if(!si(s.from)&&!si(s.to)){if(this.seriesMissingValues(i)!==$o)return null;s={from:0,to:0}}var a=this.pointOptions(i,n);a=this.evalPointOptions(a,s,r,o,i,n);var p=t.fields.color||i.color;T(i.color)&&(p=a.color);var l=new sn(s,a);return l.color=p,this.append(l),l},e.prototype.createSegment=function(t,e,o){var r=(e.line||{}).style;return new("smooth"===r?pn:"step"===r?hn:an)(t,e,o)},e.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},e.prototype.valueSlot=function(t,e){var o=t.getSlot(e[0],e[0],!this.options.clip),r=t.getSlot(e[1],e[1],!this.options.clip);if(o&&r)return{from:o,to:r}},e.prototype.pointSlot=function(t,e){var o,r,i=e.from,n=e.to;return this.options.invertAxes?(o=new $t(i.x1,t.y1,i.x2,t.y2),r=new $t(n.x1,t.y1,n.x2,t.y2)):(o=new $t(t.x1,i.y1,t.x2,i.y2),r=new $t(t.x1,n.y1,t.x2,n.y2)),{from:o,to:r}},e.prototype.addValue=function(e,o){var r=e.valueFields;P(r.from)||(r.from=r.to),P(r.to)||(r.to=r.from),t.prototype.addValue.call(this,e,o)},e.prototype.updateRange=function(t,e){if(null!==t&&P(t.from)&&P(t.to)){var o=e.series.axis,r=this.valueAxisRanges[o]=this.valueAxisRanges[o]||{min:u,max:d},i=t.from,n=t.to;r.min=Math.min(r.min,i,n),r.max=Math.max(r.max,i,n)}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.from,o.to)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++){var r=t[o];r&&(e.push((r.fromPoint||{}).marker),e.push((r.toPoint||{}).marker))}return e.concat(this._segments)},e}(ur);B(cn.prototype,kr,Or);var un=cn,dn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,o=this.value,r=this.owner.seriesValueAxis(e),i=[],n=[],s=[],a=r.getSlot(o.low,o.high),p=r.getSlot(o.open,o.open),l=r.getSlot(o.close,o.close);p.x1=l.x1=a.x1=t.x1,p.x2=l.x2=a.x2=t.x2;var h=a.center().x;i.push([p.x1,p.y1]),i.push([h,p.y1]),n.push([h,l.y1]),n.push([l.x2,l.y1]),s.push([h,a.y1]),s.push([h,a.y2]),this.lines=[i,n,s],this.box=a.clone().wrap(p.clone().wrap(l)),this.reflowNote()},e.prototype.createBody=function(){},e}(Zr),fn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return dn},e}(ti),gn=function(t){function e(e,o,r){t.call(this),this.from=e,this.to=o,this.series=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linePoints=function(){var t=this.from,e=this.from.box,o=this.to.box,r=[];if(t.isVertical){var i=t.aboveAxis?e.y1:e.y2;r.push([e.x1,i],[o.x2,i])}else{var n=t.aboveAxis?e.x2:e.x1;r.push([n,e.y1],[n,o.y2])}return r},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.series.line||{},o=k.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}});S(o),this.visual.append(o)},e}(ne);jt(gn,{animation:{type:"fadeIn",delay:600}});var yn=gn,vn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.createSegments()},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=hr(e),r=!this.options.invertAxes,i=0;i<e.length;i++)for(var n=e[i],s=0,a=0,p=0;p<o;p++){var l=Xo.current.bindPoint(n,p),h=l.valueFields.value,c=l.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(l.valueFields.value=s,u=0,d=s):(l.valueFields.value=a,d=u-a,a=0):P(h)&&(a+=h,d=s+=h),t(l,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:i,total:s,runningTotal:a,from:u,to:d,isVertical:r})}},e.prototype.updateRange=function(e,o){t.prototype.updateRange.call(this,{value:o.to},o)},e.prototype.aboveAxis=function(t){return t.value>=0},e.prototype.plotRange=function(t){return[t.from,t.to]},e.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,o=this.segments=[],r=0;r<t.length;r++){var i=t[r],n=e[r];if(n)for(var s=void 0,a=0;a<n.length;a++){var p=n[a];if(p&&s){var l=new yn(s,p,i);o.push(l),this.append(l)}s=p}}},e}(Kr),mn=["area","verticalArea","rangeArea","verticalRangeArea"],xn=[er,rr].concat(mn),bn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new Er,t.length>0){this.invertAxes=ht(t[0].type,[Jo,"bullet",rr,"verticalArea","verticalRangeArea","rangeBar","horizontalWaterfall","verticalBoxPlot"]);for(var e=0;e<t.length;e++){var o=t[e].stack;if(o&&"100%"===o.type){this.stack100=!0;break}}}},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.createCategoryAxes(t),this.aggregateCategories(t),this.createCategoryAxesLabels(t),this.createCharts(t),this.createValueAxes(t)},e.prototype.removeAxis=function(e){var o=e.options.name;t.prototype.removeAxis.call(this,e),e instanceof Je?delete this.namedCategoryAxes[o]:(this.valueAxisRangeTracker.reset(o),delete this.namedValueAxes[o]),e===this.categoryAxis&&delete this.categoryAxis,e===this.valueAxis&&delete this.valueAxis},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var r=t[o],i=e[r.options.name||"default"]||[];this.addToLegend(i);var n=this.filterVisibleSeries(i);if(n)for(var s=this.groupSeriesByCategoryAxis(n),a=0;a<s.length;a++)this.createChartGroup(s[a],r)}},e.prototype.createChartGroup=function(t,e){this.createAreaChart(Li(t,["area","verticalArea"]),e),this.createRangeAreaChart(Li(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(Li(t,[tr,Jo]),e),this.createRangeBarChart(Li(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(Li(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(Li(t,"candlestick"),e),this.createBoxPlotChart(Li(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(Li(t,"ohlc"),e),this.createWaterfallChart(Li(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(Li(t,[er,rr]),e)},e.prototype.aggregateCategories=function(t){var e=this.srcSeries||this.series,o=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var r=0;r<e.length;r++){var i=e[r],n=this.seriesCategoryAxis(i),s=this.findPane(n.options.pane);i=(Ii(n.options.type,l)||i.categoryField)&&ht(s,t)?this.aggregateSeries(i,n):this.filterSeries(i,n),o.push(i)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=o},e.prototype.filterSeries=function(t,e){var o=(t.data||{}).length;if(e._seriesMax=Math.max(e._seriesMax||0,o),!P(e.options.min)&&!P(e.options.max))return t;var r=e.currentRangeIndices(),i=ht(t.type,xn),n=B({},t);return n.data=(n.data||[]).slice(r.min,r.max+1),i&&Hi(n,r,o,(function(o){return{item:t.data[o],category:e.categoryAt(o,!0),categoryIx:o-r.min}}),(function(e){return bt(t.data[e])})),n},e.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},e.prototype.seriesSourcePoints=function(t,e){var o=t.index+";"+e.categoriesHash();if(this._seriesPointsCache[o])return this._currentPointsCache[o]=this._seriesPointsCache[o],this._seriesPointsCache[o];var r=e.options,i=r.srcCategories,n=Ii(r.type,l),s=t.data,a=n?ji:Go,p=[];n||e.mapCategories();for(var h=0;h<s.length;h++){var c=void 0;if(c=t.categoryField?a(t.categoryField,s[h],this.chartService.intl):i[h],bt(c)&&null!==c){var u=e.totalIndex(c);p[u]=p[u]||{items:[],category:c},p[u].items.push(h)}}return this._currentPointsCache[o]=p,p},e.prototype.aggregateSeries=function(t,e){if(!t.data.length)return t;for(var o=this.seriesSourcePoints(t,e),r=B({},t),i=new Qi(B({},t),Xo.current,$i.current),n=r.data=[],s=e.options.dataItems||[],a=e.currentRangeIndices(),p=function(t){var r=t-a.min,n=o[t];if(n||(n=o[t]={}),n.categoryIx=r,!n.item){var s=e.categoryAt(t,!0);n.category=s,n.item=i.aggregatePoints(n.items,s)}return n},l=a.min;l<=a.max;l++){var h=p(l);n[h.categoryIx]=h.item,h.items&&h.items.length&&(s[h.categoryIx]=h.item)}return ht(r.type,xn)&&Hi(r,a,e.totalCount(),p,(function(t){return o[t]})),e.options.dataItems=s,r},e.prototype.appendChart=function(e,o){var r=e.options.series,i=this.seriesCategoryAxis(r[0]),n=i.options.categories,s=Math.max(0,hr(r)-n.length);if(s>0)for(n=i.options.categories=i.options.categories.slice(0);s--;)n.push("");this.valueAxisRangeTracker.update(e.valueAxisRanges),t.prototype.appendChart.call(this,e,o)},e.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,r=st([].concat(e.valueAxis),(function(t){return t.name===o}))[0],i=((e.panes||[{}])[0]||{}).name||"default";return(r||{}).pane||i},e.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,o=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!o)throw new Error("Unable to locate category axis with name "+e);return o},e.prototype.stackableChartOptions=function(t,e){var o=t.stack;return{isStacked:o,isStacked100:o&&"100%"===o.type,clip:e.options.clip}},e.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],o={},r=0;r<t.length;r++){var i=t[r].categoryAxis||"$$default$$";o.hasOwnProperty(i)||(o[i]=!0,e.push(i))}for(var n=[],s=0;s<e.length;s++){var a=_n(t,e[s],s);0!==a.length&&n.push(a)}return n},e.prototype.createBarChart=function(t,e){if(0!==t.length){var o=t[0],r=new Kr(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(o,e)));this.appendChart(r,e)}},e.prototype.createRangeBarChart=function(t,e){if(0!==t.length){var o=t[0],r=new on(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing});this.appendChart(r,e)}},e.prototype.createBulletChart=function(t,e){if(0!==t.length){var o=t[0],r=new mi(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip});this.appendChart(r,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=t[0],r=new Tr(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e)));this.appendChart(r,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=t[0],r=new jr(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e)));this.appendChart(r,e)}},e.prototype.createRangeAreaChart=function(t,e){if(0!==t.length){var o=new un(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createOHLCChart=function(t,e){if(0!==t.length){var o=t[0],r=new fn(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(r,e)}},e.prototype.createCandlestickChart=function(t,e){if(0!==t.length){var o=t[0],r=new ti(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(r,e)}},e.prototype.createBoxPlotChart=function(t,e){if(0!==t.length){var o=t[0],r=new ii(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(r,e)}},e.prototype.createWaterfallChart=function(t,e){if(0!==t.length){var o=t[0],r=new vn(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing});this.appendChart(r,e)}},e.prototype.axisRequiresRounding=function(t,e){for(var o=Li(this.series,ir),r=0;r<this.series.length;r++){var i=this.series[r];if(ht(i.type,mn)){var n=i.line;n&&"step"===n.style&&o.push(i)}}for(var s=0;s<o.length;s++){var a=o[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},e.prototype.aggregatedAxis=function(t,e){for(var o=this.series,r=0;r<o.length;r++){var i=o[r].categoryAxis||"";if((i===t||!i&&0===e)&&o[r].categoryField)return!0}},e.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof Je&&t[e].createLabels()},e.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,o=[].concat(this.options.categoryAxis),r=[],i=0;i<o.length;i++){var n=o[i];if(ht(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=B({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?u:0},n),bt(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,i)&&(n.justified=!1);var p=void 0;if(p=Ei(n,a[0])?new po(n,this.chartService):new Je(n,this.chartService),o[i].categories=p.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=p}p.axisIndex=i,r.push(p),this.appendAxis(p)}}var l=this.categoryAxis||r[0];this.categoryAxis=l,e?this.axisY=l:this.axisX=l},e.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++){if(!ht(t[e].type,mn))return!1}return!0},e.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,o=e.query(),r=[].concat(this.options.valueAxis),i=this.invertAxes,n={vertical:!i,reverse:i&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<r.length;a++){var p=r[a];if(ht(this.findPane(p.pane),t)){var l=p.name,h=Ii(p.type,"log")?{min:.1,max:1}:{min:0,max:1},c=e.query(l)||o||h;0===a&&c&&o&&(c.min=Math.min(c.min,o.min),c.max=Math.max(c.max,o.max));var u=new(Ii(p.type,"log")?_o:yo)(c.min,c.max,B({},n,p),this.chartService);if(l){if(this.namedValueAxes[l])throw new Error("Value axis with name "+l+" is already defined");this.namedValueAxes[l]=u}u.axisIndex=a,s.push(u),this.appendAxis(u)}}var d=this.valueAxis||s[0];this.valueAxis=d,i?this.axisX=d:this.axisY=d},e.prototype._dispatchEvent=function(t,e,o){var r=t._eventCoordinates(e),i=new Qt(r.x,r.y),n=this.pointPane(i),s=[],a=[];if(n){for(var p=n.axes,l=0;l<p.length;l++){var h=p[l];h.getValue?Ti(a,h.getValue(i)):Ti(s,h.getCategory(i))}0===s.length&&Ti(s,this.categoryAxis.getCategory(i)),s.length>0&&a.length>0&&t.trigger(o,{element:kt(e),originalEvent:e,category:Di(s),value:Di(a)})}},e.prototype.pointPane=function(t){for(var e=this.panes,o=0;o<e.length;o++){var r=e[o];if(r.contentBox.containsPoint(t))return r}},e.prototype.updateAxisOptions=function(t,e){wn(this.options,t,e),wn(this.originalOptions,t,e)},e}(Yi);function wn(t,e,o){B([].concat(e instanceof Je?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}function _n(t,e,o){return st(t,(function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e}))}jt(bn,{categoryAxis:{},valueAxis:{}}),B(bn.prototype,qi);var Cn=bn;function kn(){this._defaultPrevented=!0}var Sn=function(t){function e(){t.call(this),this._points=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._points=[]},e.prototype.show=function(t,e){var o=[].concat(t);this.hide();for(var r=0;r<o.length;r++){var i=o[r];i&&i.toggleHighlight&&i.hasHighlight()&&(this.togglePointHighlight(i,!0,e),this._points.push(i))}},e.prototype.togglePointHighlight=function(t,e,o){var r=(t.options.highlight||{}).toggle;if(r){var i={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:kn,visual:t.highlightVisual(),show:e};r(i),i._defaultPrevented||t.toggleHighlight(e,o)}else t.toggleHighlight(e,o)},e.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},e.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++){if(t===e[o])return!0}return!1},e}(k.Class);function An(t,e){var o=(e||"").toLowerCase(),r=t.event;return"none"===o&&!(r.ctrlKey||r.shiftKey||r.altKey)||r[o+"Key"]}function Pn(t){for(var e={},o=0;o<t.length;o++){var r=t[o];r.axis.options.name&&(e[r.axis.options.name]={min:r.range.min,max:r.range.max})}return e}var On=function(t){function e(e,o){t.call(this),this.plotArea=e,this.options=B({},this.options,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.start=function(t){return this._active=An(t,this.options.key),this._active},e.prototype.move=function(t){if(this._active){var e=this.axisRanges=this._panAxes(t,m).concat(this._panAxes(t,x));if(e.length)return this.axisRanges=e,Pn(e)}},e.prototype.end=function(){var t=this._active;return this._active=!1,t},e.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var o=0;o<e.length;o++){var r=e[o];t.updateAxisOptions(r.axis,r.range)}t.redraw(t.panes)}},e.prototype.destroy=function(){delete this.plotArea},e.prototype._panAxes=function(t,e){var o=this.plotArea,r=-t[e].delta,i=(this.options.lock||"").toLowerCase(),n=[];if(0!==r&&(i||"").toLowerCase()!==e)for(var s=o.axes,a=0;a<s.length;a++){var p=s[a];if(e===m&&!p.options.vertical||e===x&&p.options.vertical){var l=p.pan(r);l&&(l.limitRange=!0,n.push({axis:p,range:l}))}}return n},e}(k.Class);On.prototype.options={key:"none",lock:"none"};var Mn=On,Tn=function(t){function e(e,o){t.call(this),this.chart=e,this.options=B({},this.options,o),this.createElement()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createElement=function(){var t=this._marquee=document.createElement("div");t.className="k-marquee";var e=document.createElement("div");e.className="k-marquee-color",t.appendChild(e)},e.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},e.prototype.setStyles=function(t){D(this._marquee,t)},e.prototype.start=function(t){if(An(t,this.options.key)){var e=this.chart,o=e._eventCoordinates(t),r=this._zoomPane=e._plotArea.paneByPoint(o),i=r?r.chartsBox().clone():null;if(r&&i){var n=this._elementOffset();return i.translate(n.left,n.top),this._zoomPaneClipBox=i,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}}return!1},e.prototype._elementOffset=function(){var t=this.chart.element,e=D(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,r=e.paddingTop,i=_t(t);return{left:o+i.left,top:r+i.top}},e.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},e.prototype.end=function(t){if(this._zoomPane){var e=this._elementOffset(),o=this._selectionPosition(t);o.left-=e.left,o.top-=e.top;var r={x:o.left,y:o.top},i={x:o.left+o.width,y:o.top+o.height};return this._updateAxisRanges(r,i),this.removeElement(),delete this._zoomPane,Pn(this.axisRanges)}},e.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,o=0;o<t.length;o++){var r=t[o];e.updateAxisOptions(r.axis,r.range)}e.redraw(e.panes)}},e.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},e.prototype._updateAxisRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),r=[],i=this._zoomPane.axes,n=0;n<i.length;n++){var s=i[n],a=s.options.vertical;if((o!==m||a)&&(o!==x||!a)&&bt(s.axisIndex)){var p=s.pointsRange(t,e);p&&r.push({axis:s,range:p})}}this.axisRanges=r},e.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,o={x:t.x.startLocation,y:t.y.startLocation},r=t.x.location,i=t.y.location,n=(this.options.lock||"").toLowerCase(),s=Math.min(o.x,r),a=Math.min(o.y,i),p=Math.abs(o.x-r),l=Math.abs(o.y-i);return n===m&&(s=e.x1,p=e.width()),n===x&&(a=e.y1,l=e.height()),r>e.x2&&(p=e.x2-o.x),r<e.x1&&(p=o.x-e.x1),i>e.y2&&(l=e.y2-o.y),i<e.y1&&(l=o.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:l}},e}(k.Class);Tn.prototype.options={key:"shift",lock:"none"};var Rn=Tn,Bn=function(t){function e(e,o){t.call(this),this.chart=e,this.options=B({rate:.3},this.options,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.updateRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),r=[],i=this.chart._plotArea.axes,n=0;n<i.length;n++){var s=i[n],a=s.options.vertical;if((o!==m||a)&&(o!==x||!a)&&s.zoomRange){var p=Pt(this.options.rate,.01,.9),l=s.zoomRange(-t*p,e);l&&r.push({axis:s,range:l})}}return this.axisRanges=r,Pn(r)},e.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var o=0;o<t.length;o++){var r=t[o];e.updateAxisOptions(r.axis,r.range)}e.redraw(e.panes)}},e.prototype.destroy=function(){delete this.chart},e}(k.Class),In=function(t){function e(e,o){t.call(this,e),this.chartService=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.children,e=this.options,o=e.vertical;this.visual=new k.drawing.Layout(null,{spacing:o?0:e.spacing,lineSpacing:o?e.spacing:0,orientation:o?"vertical":"horizontal",reverse:e.rtl,alignItems:o?"start":"center"});for(var r=0;r<t.length;r++){var i=t[r];i.reflow(new $t),i.renderVisual()}},e.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();var e=this.visual.clippedBBox();this.box=e?xe(e):new $t},e.prototype.renderVisual=function(){this.addVisual()},e.prototype.createVisual=function(){},e}(ne),Ln=function(t){function e(e){t.call(this,e),this.createContainer(),e.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainer=function(){this.container=new ge({vertical:!1,wrap:!1,align:a,spacing:this.options.spacing}),this.append(this.container)},e.prototype.createMarker=function(){this.container.append(new le(this.markerOptions()))},e.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return B({},t.markers,{background:e,border:{color:e}})},e.prototype.createLabel=function(){var t=this.options,e=B({},t.labels);this.container.append(new we(t.text,e))},e.prototype.renderComplete=function(){t.prototype.renderComplete.call(this);var e=this.options.cursor||{},o=this._itemOverlay=k.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:v,opacity:0},stroke:null,cursor:e.style||e});this.appendVisual(o)},e.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger("legendItemClick",o)&&e&&"contextmenu"===e.type&&e.preventDefault()},e.prototype.over=function(t,e){var o=this.eventArgs(e);return t.trigger("legendItemHover",o)||t._legendItemHover(o.seriesIndex,o.pointIndex),!0},e.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},e.prototype.eventArgs=function(t){var e=this.options;return{element:kt(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},e.prototype.renderVisual=function(){var e=this,o=this.options,r=o.visual;r?(this.visual=r({active:o.active,series:o.series,sender:this.getSender(),pointIndex:o.pointIndex,options:{markers:this.markerOptions(),labels:o.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this.addVisual()):t.prototype.renderVisual.call(this)},e}(ae),jn=function(t){function e(e,o){void 0===o&&(o={}),t.call(this,e),this.chartService=o,ht(this.options.position,[g,f,s,c,"custom"])||(this.options.position=f),this.createContainers(),this.createLegendTitle(e.title),this.createItems()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainers=function(){var t=this.options,e=t.position,o=t.align,r=e,i=a;"custom"===e?r=c:ht(e,[g,s])?(r="start"===o?c:"end"===o?f:a,i=e):o&&("start"===o?i=g:"end"===o&&(i=s)),this.container=new ae({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:i,align:r,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new ae({vAlign:i,align:r,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},e.prototype.createItems=function(){var t=this.getService(),e=this.options,o=this.isVertical(),r=new In({vertical:o,spacing:e.spacing,rtl:t.rtl},t),i=e.items;e.reverse&&(i=i.slice(0).reverse());for(var n=i.length,s=0;s<n;s++){var a=i[s];r.append(new Ln(B({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}r.render(),this.itemsContainer.append(r)},e.prototype.isVertical=function(){var t=this.options,e=t.orientation,o=t.position;return"custom"===o&&"horizontal"!==e||(bt(e)?"horizontal"!==e:ht(o,[c,f]))},e.prototype.hasItems=function(){return this.container.children[0].children.length>0},e.prototype.reflow=function(t){var e=this.options,o=t.clone();this.hasItems()?("custom"===e.position?(this.containerCustomReflow(o),this.box=o):this.containerReflow(o),this.hasTitle()&&this.title.reflow(new $t(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=o},e.prototype.containerReflow=function(t){var e=this.options,o=this.container,r=e.position,i=e.width,n=e.height,a=r===g||r===s?m:x,p=this.isVertical(),l=t.clone(),h=t.clone();r!==c&&r!==f||(h.y1=l.y1=0),p&&n?(h.y2=h.y1+n,h.align(l,x,o.options.vAlign)):!p&&i&&(h.x2=h.x1+i,h.align(l,m,o.options.align)),o.reflow(h);var u=(h=o.box).clone();(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),o.reflow(h)),u[a+1]=t[a+1],u[a+2]=t[a+2],this.box=u},e.prototype.containerCustomReflow=function(t){var e=this.options,o=this.container,r=e.offsetX,i=e.offsetY,n=e.width,s=e.height,a=this.isVertical(),p=t.clone();a&&s?p.y2=p.y1+s:!a&&n&&(p.x2=p.x1+n),o.reflow(p),p=o.box,o.reflow(new $t(r,i,r+p.width(),i+p.height()))},e.prototype.renderVisual=function(){this.hasItems()&&t.prototype.renderVisual.call(this)},e.prototype.createLegendTitle=function(t){var e=B({},{color:n,position:g,align:a},t),o=e.text;if(t&&!1!==t.visible){if(bt(e)&&e.visible){var r=ot(e);r?o=r({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))}this.title=new we(o,e),this.createTitleLayout(),this.appendTitleLayoutContent()}},e.prototype.createTitleLayout=function(){this.layout=new ge({vertical:!0,wrap:!1}),this.container.append(this.layout)},e.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},e.prototype.appendTitleLayoutContent=function(){this.options.title.position===s?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e}(ne);jt(jn,{position:f,items:[],offsetX:0,offsetY:0,margin:V(5),padding:V(5),border:{color:n,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:c,vAlign:a}});var En=jn,Dn=function(t){function e(){t.call(this),this._registry=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},e.prototype.create=function(t,e,o){for(var r,i=this._registry,n=i[0],s=0;s<i.length;s++){var a=i[s];if((r=Li(t,a.seriesTypes)).length>0){n=a;break}}return new n.type(r,e,o)},e}(k.Class);Dn.current=new Dn;var Vn=Dn;function zn(t){var e=document.createElement("div");return t&&(e.className=t),e}function Un(t){for(var e=t;e&&!at(e,"k-handle");)e=e.parentNode;return e}var Hn=function(t){function e(e,o,r,i){t.call(this);var n=e.element;this.options=B({},this.options,r),this.chart=e,this.observer=i,this.chartElement=n,this.categoryAxis=o,this._dateAxis=this.categoryAxis instanceof po,this.initOptions(),this.visible=this.options.visible&&n.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onPane=function(t){return this.categoryAxis.pane===t},e.prototype.createElements=function(){var t=this.options,e=this.wrapper=zn("k-selector");D(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var o=this.selection=zn("k-selection");this.leftMask=zn("k-mask"),this.rightMask=zn("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),o.appendChild(zn("k-selection-bg"));var r=this.leftHandle=zn("k-handle k-left-handle"),i=this.rightHandle=zn("k-handle k-right-handle");r.appendChild(zn()),i.appendChild(zn()),o.appendChild(r),o.appendChild(i),this.chartElement.appendChild(e);var n=D(o,["borderLeftWidth","borderRightWidth","height"]),s=D(r,"height").height,a=D(i,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},D(r,{top:(n.height-s)/2}),D(i,{top:(n.height-a)/2}),e.style.cssText=e.style.cssText},e.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),xt(this.wrapper,((t={})[nr]=this._mousewheelHandler,t))),this._domEvents=$.create(this.wrapper,{stopPropagation:!0,start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),press:this._press.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)})},e.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl;this._dateAxis&&B(t,{min:Ke(o,t.min),max:Ke(o,t.max),from:Ke(o,t.from),to:Ke(o,t.to)});var r=D(this.chartElement,["paddingLeft","paddingTop"]),i=r.paddingLeft,n=r.paddingTop;this.options=B({},{width:e.width(),height:e.height()+.1,padding:{left:i,top:n},offset:{left:e.x1+i,top:e.y1+n},from:t.min,to:t.max},t)},e.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Rt(this.wrapper,((t={})[nr]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},e.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},e.prototype._start=function(t){var e=this.options,o=kt(t);if(!this._state&&o){this.chart._unsetActivePoint(),this._state={moveTarget:Un(o)||o,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}};var r=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)});this.trigger("selectStart",r)&&(this._state=null)}},e.prototype._press=function(t){var e;(e=this._state?this._state.moveTarget:Un(kt(t)))&&w(e,"k-handle-active")},e.prototype._move=function(t){if(this._state){var e=this._state,o=this.options,r=this.categoryAxis,i=e.range,n=e.moveTarget,s=r.options.reverse,a=this._index(o.from),p=this._index(o.to),l=this._index(o.min),h=this._index(o.max),c=e.startLocation-t.x.location,u=i.from,d=i.to,f=i.to-i.from,g=D(this.wrapper,"width").width/(r.categoriesCount()-1),y=Math.round(c/g)*(s?-1:1);if(n){var v=at(n,"k-left-handle"),m=at(n,"k-right-handle");at(n,"k-selection k-selection-bg")?(i.from=Math.min(Math.max(l,a-y),h-f),i.to=Math.min(i.from+f,h)):v&&!s||m&&s?(i.from=Math.min(Math.max(l,a-y),h-1),i.to=Math.max(i.from+1,i.to)):(v&&s||m&&!s)&&(i.to=Math.min(Math.max(l+1,p-y),h),i.from=Math.min(i.to-1,i.from)),i.from===u&&i.to===d||(this.move(i.from,i.to),this.trigger("select",this._rangeEventArgs(i)))}}},e.prototype._end=function(){if(this._state){var t=this._state.moveTarget;t&&C(t,"k-handle-active");var e=this._state.range;this.set(e.from,e.to),this.trigger("selectEnd",this._rangeEventArgs(e)),delete this._state}},e.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,r=this.chart._eventCoordinates(t),i=o.pointCategoryIndex(new Qt(r.x,o.box.y1)),n=this._index(e.from),s=this._index(e.to),a=this._index(e.min),p=this._index(e.max),l=s-n,h=n+l/2,c={},u=3===t.event.which,d=Math.round(h-i);this._state||u||(this.chart._unsetActivePoint(),o.options.justified||d--,c.from=Math.min(Math.max(a,n-d),p-l),c.to=Math.min(c.from+l,p),this._start(t),this._state&&(this._state.range=c,this.trigger("select",this._rangeEventArgs(c)),this._end()))},e.prototype._mousewheel=function(t){var e=this,o=yt(t);if(this._start({target:this.selection}),this._state){var r=this._state.range;t.preventDefault(),t.stopPropagation(),Math.abs(o)>1&&(o*=3),this.options.mousewheel.reverse&&(o*=-1),this.expand(o)&&this.trigger("select",{axis:this.categoryAxis.options,delta:o,originalEvent:t,from:this._value(r.from),to:this._value(r.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._end()}),150)}},e.prototype._gesturestart=function(t){var e=this.options;this._state={range:{from:this._index(e.from),to:this._index(e.to)}};var o=this._rangeEventArgs(this._state.range);this.trigger("selectStart",o)?this._state=null:t.preventDefault()},e.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},e.prototype._gesturechange=function(t){var e=this.chart,o=this._state,r=this.options,i=this.categoryAxis,n=o.range,s=e._toModelCoordinates(t.touches[0].x.location).x,a=e._toModelCoordinates(t.touches[1].x.location).x,p=Math.min(s,a),l=Math.max(s,a);t.preventDefault(),n.from=i.pointCategoryIndex(new Qt(p))||r.min,n.to=i.pointCategoryIndex(new Qt(l))||r.max,this.move(n.from,n.to),this.trigger("select",this._rangeEventArgs(n))},e.prototype._index=function(t){var e=t;return t instanceof Date&&(e=this.categoryAxis.categoryIndex(t)),e},e.prototype._value=function(t){var e=t;return this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max&&(e=this.options.max),e},e.prototype._slot=function(t){var e=this.categoryAxis,o=this._index(t);return e.getSlot(o,o,!0)},e.prototype.move=function(t,e){var o=this.options,r=this.categoryAxis.options.reverse,i=o.offset,n=o.padding,s=o.selection.border,a=r?e:t,p=r?t:e,l="x"+(r?2:1),h=this._slot(a),c=Tt(h[l]-i.left+n.left);D(this.leftMask,{width:c}),D(this.selection,{left:c}),h=this._slot(p);var u=Tt(o.width-(h[l]-i.left+n.left));D(this.rightMask,{width:u});var d=o.width-u;d!==o.width&&(d+=s.right),D(this.rightMask,{left:d}),D(this.selection,{width:Math.max(o.width-(c+u)-s.right,0)})},e.prototype.set=function(t,e){var o=this.options,r=this._index(o.min),i=this._index(o.max),n=Pt(this._index(t),r,i),s=Pt(this._index(e),n+1,i);o.visible&&this.move(n,s),o.from=this._value(n),o.to=this._value(s)},e.prototype.expand=function(t){var e=this.options,o=this._index(e.min),r=this._index(e.max),i=e.mousewheel.zoom,n=this._index(e.from),s=this._index(e.to),a={from:n,to:s},p=B({},a);if(this._state&&(a=this._state.range),i!==f&&(a.from=Pt(Pt(n-t,0,s-1),o,r)),i!==c&&(a.to=Pt(Pt(s+t,a.from+1,r),o,r)),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},e.prototype.zoom=function(t,e){var o=this.options,r=this._index(o.min),i=this._index(o.max),n=this._index(o.from),s=this._index(o.to),a={from:n,to:s},p=B({},a),l=this.categoryAxis.options.reverse,h=m+(l?"2":"1"),c=this.categoryAxis.lineBox(),u=Math.abs(c[h]-e.x),d=c.width(),f=Tt(u/d,2),g=Tt(f*t),y=Tt((1-f)*t);if(this._state&&(a=this._state.range),a.from=Pt(Pt(n-g,0,s-1),r,i),a.to=Pt(Pt(s+y,a.from+1,i),r,i),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},e.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},e}(k.Class);jt(Hn,{visible:!0,mousewheel:{zoom:"both"},min:d,max:u});var Fn=Hn,Nn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.show=function(e){if(e&&e.tooltipAnchor&&(!this._current||this._current!==e)){var o=B({},this.options,e.options.tooltip),r=e.tooltipAnchor();r?(this._current=e,t.prototype.show.call(this,{point:e,anchor:r},o,e)):this.hide()}},e.prototype.hide=function(){delete this._current,t.prototype.hide.call(this)},e}(bi),Gn=function(t){function e(e,o){t.call(this,e.chartService,o),this.plotArea=e,this.formatService=e.chartService.format}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.showAt=function(t,e){var o=st(t,(function(t){var e=t.series.tooltip;return!(e&&!1===e.visible)}));if(o.length>0){var r=o[0],i=this.plotArea.categoryAxis.getSlot(r.categoryIx),n=e?this._slotAnchor(e,i):this._defaultAnchor(r,i);this.show({anchor:n,shared:!0,points:t,category:r.category,categoryText:this.formatService.auto(this.options.categoryFormat,r.category),series:this.plotArea.series},this.options)}},e.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},e.prototype._defaultAnchor=function(t,e){var o=t.owner.pane.chartsBox(),r=this.plotArea.categoryAxis.options.vertical,i=o.center(),n=e.center();return{point:r?new Qt(i.x,n.y):new Qt(n.x,i.y),align:{horizontal:"center",vertical:"center"}}},e}(bi);jt(Gn,{categoryFormat:"{0:d}"});var Wn=Gn,Xn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.element,e=this.options;if(t.bbox()){this.origin=e.origin;var o=e.vertical?x:m,r=this.fromScale=new k.geometry.Point(1,1);r[o]=Zo,t.transform(k.geometry.transform().scale(r.x,r.y))}else this.abort()},e.prototype.step=function(t){var e=ct(this.fromScale.x,1,t),o=ct(this.fromScale.y,1,t);this.element.transform(k.geometry.transform().scale(e,o,this.origin))},e.prototype.abort=function(){t.prototype.abort.call(this),this.element.transform(null)},e}(k.drawing.Animation);jt(Xn,{duration:600}),k.drawing.AnimationFactory.current.register(Jo,Xn);var Yn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(k.geometry.transform().scale(Zo,Zo,t))},e.prototype.step=function(t){this.element.transform(k.geometry.transform().scale(t,t,this.center))},e}(k.drawing.Animation);jt(Yn,{easing:"easeOutElastic"}),k.drawing.AnimationFactory.current.register("bubble",Yn);var qn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},e.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},e}(k.drawing.Animation);jt(qn,{duration:200,easing:"linear"}),k.drawing.AnimationFactory.current.register("fadeIn",qn);var Kn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this.element.transform(k.geometry.transform().scale(Zo,Zo,this.options.center))},e.prototype.step=function(t){this.element.transform(k.geometry.transform().scale(t,t,this.options.center))},e}(k.drawing.Animation);jt(Kn,{easing:"easeOutElastic",duration:600}),k.drawing.AnimationFactory.current.register(or,Kn);var Qn=Kn,Zn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.createSegment=function(t,e,o){return new("smooth"===e.style?Cr:mr)(t,e,o)},e.prototype.animationPoints=function(){return t.prototype.animationPoints.call(this).concat(this._segments)},e.prototype.createMissingValue=function(t,e){if(e===$o){var o={x:t.x,y:t.y};return si(o.x)||(o.x=0),si(o.y)||(o.y=0),o}},e}(pi);B(Zn.prototype,kr);var $n=Zn,Jn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new Er,this.yAxisRangeTracker=new Er},e.prototype.render=function(t){void 0===t&&(t=this.panes);for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var r=t[o],i=e[r.options.name||"default"]||[];this.addToLegend(i);var n=this.filterVisibleSeries(i);n&&(this.createScatterChart(Li(n,"scatter"),r),this.createScatterLineChart(Li(n,"scatterLine"),r),this.createBubbleChart(Li(n,"bubble"),r))}this.createAxes(t)},e.prototype.appendChart=function(e,o){this.xAxisRangeTracker.update(e.xAxisRanges),this.yAxisRangeTracker.update(e.yAxisRanges),t.prototype.appendChart.call(this,e,o)},e.prototype.removeAxis=function(e){var o=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?(this.yAxisRangeTracker.reset(o),delete this.namedYAxes[o]):(this.xAxisRangeTracker.reset(o),delete this.namedXAxes[o]),e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,r=st([].concat(e.xAxis),(function(t){return t.name===o}))[0],i=t.yAxis,n=st([].concat(e.yAxis),(function(t){return t.name===i}))[0],s=(e.panes||[{}])[0].name||"default";return(r||{}).pane||(n||{}).pane||s},e.prototype.createScatterChart=function(t,e){t.length>0&&this.appendChart(new pi(this,{series:t,clip:e.options.clip}),e)},e.prototype.createScatterLineChart=function(t,e){t.length>0&&this.appendChart(new $n(this,{series:t,clip:e.options.clip}),e)},e.prototype.createBubbleChart=function(t,e){t.length>0&&this.appendChart(new ui(this,{series:t,clip:e.options.clip}),e)},e.prototype.createXYAxis=function(t,e,o){for(var r,i=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=B({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=Ii(a.type,"log"),h=s.query(),c=p?{min:.1,max:1}:{min:0,max:1},u=s.query(i)||h||c,d=[a.min,a.max],f=this.series,g=0;g<f.length;g++){var y=f[g],v=y[e?"yAxis":"xAxis"];if(v===a.name||0===o&&!v){var m=Xo.current.bindPoint(y,0).valueFields;d.push(m[e?"y":"x"]);break}}0===o&&h&&(u.min=Math.min(u.min,h.min),u.max=Math.max(u.max,h.max));for(var x=0;x<d.length;x++)if(d[x]instanceof Date){r=!0;break}var b=new(Ii(a.type,l)||!a.type&&r?mo:p?_o:yo)(u.min,u.max,a,this.chartService);if(b.axisIndex=o,i){if(n[i])throw new Error((e?"Y":"X")+" axis with name "+i+" is already defined");n[i]=b}return this.appendAxis(b),b},e.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),r=[],i=[].concat(e.yAxis),n=[],s=0;s<o.length;s++){ht(this.findPane(o[s].pane),t)&&r.push(this.createXYAxis(o[s],!1,s))}for(var a=0;a<i.length;a++){ht(this.findPane(i[a].pane),t)&&n.push(this.createXYAxis(i[a],!0,a))}this.axisX=this.axisX||r[0],this.axisY=this.axisY||n[0]},e.prototype._dispatchEvent=function(t,e,o){for(var r=t._eventCoordinates(e),i=new Qt(r.x,r.y),n=this.axes,s=n.length,a=[],p=[],l=0;l<s;l++){var h=n[l],c=h.options.vertical?p:a,u=h.getValue(i);null!==u&&c.push(u)}a.length>0&&p.length>0&&t.trigger(o,{element:kt(e),originalEvent:e,x:Di(a),y:Di(p)})},e.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,r=this.groupAxes(this.panes),i=(o?r.y:r.x).indexOf(t);ts(this.options,i,o,e),ts(this.originalOptions,i,o,e)},e}(Yi);function ts(t,e,o,r){B([].concat(o?t.yAxis:t.xAxis)[e],r)}jt(Jn,{xAxis:{},yAxis:{}}),B(Jn.prototype,qi);var es=Jn,os=function(t){function e(e,o,r){t.call(this,r),this.value=e,this.sector=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options.labels,e=this.owner.chartService,o=this.value;if(!this._rendered&&!1!==this.visible){this._rendered=!0;var r=ot(t),i=this.pointData();if(r?o=r(i):t.format&&(o=e.format.auto(t.format,o)),t.visible&&(o||0===o)){if(t.position===a||"insideEnd"===t.position)t.color||(t.color=Ft(this.options.color)),t.background||(t.background=this.options.color);else{var n=e.theme.seriesDefaults.labels;t.color=t.color||n.color,t.background=t.background||n.background}this.label=new we(o,B({},t,{align:a,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),i),this.append(this.label)}}},e.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},e.prototype.reflowLabel=function(){var t=this.options.labels,e=this.label,o=this.sector.clone(),r=t.distance,i=o.middle();if(e){var n,s=e.box.height(),p=e.box.width();if(t.position===a)o.radius=Math.abs((o.radius-s)/2)+s,n=o.point(i),e.reflow(new $t(n.x,n.y-s/2,n.x,n.y));else if("insideEnd"===t.position)o.radius=o.radius-s/2,n=o.point(i),e.reflow(new $t(n.x,n.y-s/2,n.x,n.y));else{var l;(n=o.clone().expand(r).point(i)).x>=o.center.x?(l=n.x+p,e.orientation=f):(l=n.x-p,e.orientation=c),e.reflow(new $t(l,n.y-s,n.x,n.y))}}},e.prototype.createVisual=function(){var e=this,o=this.sector,r=this.options;if(t.prototype.createVisual.call(this),this.value)if(r.visual){var i=(o.startAngle+180)%360,n=r.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new k.geometry.Point(o.center.x,o.center.y),radius:o.radius,innerRadius:o.innerRadius,startAngle:i,endAngle:i+o.angle,options:r,sender:this.getSender(),createVisual:function(){var t=new k.drawing.Group;return e.createSegmentVisual(t),t}});n&&this.visual.append(n)}else this.createSegmentVisual(this.visual)},e.prototype.createSegmentVisual=function(t){var e=this.sector,o=this.options,r=o.border||{},i=r.width>0?{stroke:{color:r.color,width:r.width,opacity:r.opacity,dashType:r.dashType}}:{},n=o.color,s={color:n,opacity:o.opacity},a=this.createSegment(e,B({fill:s,stroke:{opacity:o.opacity},zIndex:o.zIndex},i));t.append(a),zr(o)&&t.append(this.createGradientOverlay(a,{baseColor:n,fallbackFill:s},B({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},o.overlay)))},e.prototype.createSegment=function(t,e){return e.singleSegment?new k.drawing.Circle(new k.geometry.Circle(new k.geometry.Point(t.center.x,t.center.y),t.radius),e):re.current.createRing(t,e)},e.prototype.createAnimation=function(){var e=this.options,o=this.sector.center;B(e,{animation:{center:[o.x,o.y],delay:this.animationDelay}}),t.prototype.createAnimation.call(this)},e.prototype.createHighlight=function(t){var e=this.options.highlight||{},o=e.border||{};return this.createSegment(this.sector,B({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:o.opacity,width:o.width,color:o.color}}))},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new k.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},e.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:ns(e+180)}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},e}(ne),rs=Tt(Mt(30),10),is=Tt(Mt(60),10);function ns(t){var e=Mt(t),o=Tt(Math.sin(e),10),r=Tt(Math.cos(e),10);return{horizontal:Math.abs(o)>is?a:r<0?f:c,vertical:Math.abs(o)<rs?a:o<0?s:g}}jt(os,{color:v,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:V(.5),align:p,zIndex:1,position:"outsideEnd"},animation:{type:or},highlight:{visible:!0,border:{width:1}},visible:!0}),B(os.prototype,dr);var ss=os,as={createLegendItem:function(t,e,o){var r=this.options.legend||{},i=r.labels||{},n=r.inactiveItems||{},s=n.labels||{};if(o&&!1!==o.visibleInLegend){var a,p,l=!1!==o.visible,h=l?ot(i):ot(s)||ot(i),c=o.category;h&&(c=h({text:c,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),l?(a={},p=e.color):(a={color:s.color,font:s.font},p=(n.markers||{}).color),si(c)&&""!==c&&this.legendItems.push({active:l,pointIndex:o.index,text:c,series:o.series,markerColor:p,labels:a})}}},ps=function(t){function e(e,o){t.call(this,o),this.plotArea=e,this.chartService=e.chartService,this.points=[],this.legendItems=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.traverseDataPoints=function(t){var e=this.options,o=this.plotArea.options.seriesColors;void 0===o&&(o=[]);for(var r=o.length,i=e.series,n=i.length,s=0;s<n;s++){var p=i[s],l=p.data,h=Bi(p),c=h.total,u=h.points,d=h.count,f=360/c,g=void 0;isFinite(f)||(g=360/d);var y=void 0;y=bt(p.startAngle)?p.startAngle:e.startAngle,s!==n-1&&"outsideEnd"===p.labels.position&&(p.labels.position=a);for(var v=0;v<u.length;v++){var m=u[v];if(m){var x=m.fields,b=m.value,w=m.visible,_=0!==b?g||b*f:0,C=1!==l.length&&Boolean(x.explode);T(p.color)||(p.color=x.color||o[v%r]),t(m.valueFields.value,new te(null,0,0,y,_),{owner:this,category:bt(x.category)?x.category:"",index:v,series:p,seriesIx:s,dataItem:l[v],percentage:0!==c?b/c:0,explode:C,visibleInLegend:x.visibleInLegend,visible:w,zIndex:n-s,animationDelay:this.animationDelay(v,s,n)}),!1!==w&&(y+=_)}}}},e.prototype.evalSegmentOptions=function(t,e,o){var r=o.series;lr(t,{value:e,series:r,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:r._defaults,excluded:["data","content","template","visual","toggle"]})},e.prototype.addValue=function(t,e,o){var r=B({},o.series,{index:o.index});if(this.evalSegmentOptions(r,t,o),this.createLegendItem(t,r,o),!1!==o.visible){var i=new ss(t,e,r);Object.assign(i,o),this.append(i),this.points.push(i)}},e.prototype.reflow=function(t){var e=this.options,o=this.points,r=this.seriesConfigs;void 0===r&&(r=[]);var i=o.length,n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,p=s-.85*s,l=new $t(n.x1,n.y1,n.x1+s,n.y1+s),h=l.center(),c=n.center(),u=e.series.length,d=[],g=[],y=Bt(e.padding,p);this.targetBox=t,y=y>a-5?a-5:y,l.translate(c.x-h.x,c.y-h.y);for(var v=a-y,m=new Qt(v+l.x1+y,v+l.y1+y),x=0;x<i;x++){var b=o[x],w=b.sector,_=b.seriesIx;if(w.radius=v,w.center=m,r.length){var C=r[_];w.innerRadius=C.innerRadius,w.radius=C.radius}_===u-1&&b.explode&&(w.center=w.clone().setRadius(.15*w.radius).point(w.middle())),b.reflow(l);var k=b.label;k&&"outsideEnd"===k.options.position&&_===u-1&&(k.orientation===f?g.push(k):d.push(k))}d.length>0&&(d.sort(this.labelComparator(!0)),this.leftLabelsReflow(d)),g.length>0&&(g.sort(this.labelComparator(!1)),this.rightLabelsReflow(g)),this.box=l},e.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},e.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},e.prototype.distanceBetweenLabels=function(t){var e=At(this.points),o=e.sector,r=t.length-1,i=o.radius+e.options.labels.distance,n=[],s=t[0].box,a=Tt(s.y1-(o.center.y-i-s.height()-s.height()/2));n.push(a);for(var p=0;p<r;p++){var l=t[p+1].box;s=t[p].box,a=Tt(l.y1-s.y2),n.push(a)}return a=Tt(o.center.y+i-t[r].box.y2-t[r].box.height()/2),n.push(a),n},e.prototype.distributeLabels=function(t,e){for(var o,r,i,n=t.length,s=0;s<n;s++)for(i=-t[s],o=r=s;i>0&&(o>=0||r<n);)i=this._takeDistance(t,s,--o,i),i=this._takeDistance(t,s,++r,i);this.reflowLabels(t,e)},e.prototype._takeDistance=function(t,e,o,r){var i=r;if(t[o]>0){var n=Math.min(t[o],i);i-=n,t[o]-=n,t[e]+=n}return i},e.prototype.reflowLabels=function(t,e){var o,r=At(this.points),i=r.sector,n=r.options.labels,s=e.length,a=n.distance,l=i.center.y-(i.radius+a)-e[0].box.height();t[0]+=2;for(var h=0;h<s;h++){var c=e[h],u=c.box;l+=t[h],o=this.hAlignLabel(u.x2,i.clone().expand(a),l,l+u.height(),c.orientation===f),c.orientation===f?(n.align!==p&&(o=i.radius+i.center.x+a),c.reflow(new $t(o+u.width(),l,o,l))):(n.align!==p&&(o=i.center.x-i.radius-a),c.reflow(new $t(o-u.width(),l,o,l))),l+=u.height()}},e.prototype.createVisual=function(){var e=this.options.connectors,o=this.points,r=o.length;t.prototype.createVisual.call(this),this._connectorLines=[];for(var i=0;i<r;i++){var n=o[i],s=n.sector,a=n.label,p=s.middle(),l=(n.options.connectors||{}).color||e.color;if(a){var h=new k.drawing.Path({stroke:{color:l,width:e.width},animation:{type:"fadeIn",delay:n.animationDelay}});if("outsideEnd"===a.options.position){var c=a.box,u=s.center,d=s.point(p),g=new Qt(c.x1,c.center().y),y=void 0,v=void 0,m=void 0;d=s.clone().expand(e.padding).point(p),h.moveTo(d.x,d.y),a.orientation===f?(m=ls(u,d,g,v=new Qt(c.x1-e.padding,c.center().y)),g=new Qt(v.x-4,v.y),(m=m||g).x=Math.min(m.x,g.x),this.pointInCircle(m,s.center,s.radius+4)||m.x<s.center.x?(y=s.center.x+s.radius+4,n.options.labels.align!==tr?y<g.x?h.lineTo(y,d.y):h.lineTo(d.x+8,d.y):h.lineTo(y,d.y),h.lineTo(g.x,v.y)):(m.y=v.y,h.lineTo(m.x,m.y))):(m=ls(u,d,g,v=new Qt(c.x2+e.padding,c.center().y)),g=new Qt(v.x+4,v.y),(m=m||g).x=Math.max(m.x,g.x),this.pointInCircle(m,s.center,s.radius+4)||m.x>s.center.x?(y=s.center.x-s.radius-4,n.options.labels.align!==tr?y>g.x?h.lineTo(y,d.y):h.lineTo(d.x-8,d.y):h.lineTo(y,d.y),h.lineTo(g.x,v.y)):(m.y=v.y,h.lineTo(m.x,m.y))),h.lineTo(v.x,v.y),this._connectorLines.push(h),this.visual.append(h)}}}},e.prototype.renderVisual=function(){if(t.prototype.renderVisual.call(this),Dt(this.options.series,(function(t){return t.autoFit}))){var e=this.targetBox,o=this.box.center(),r=this.visual.bbox();if(!r)return;var i=r.bottomRight(),n=Math.min((o.y-e.y1)/(o.y-r.origin.y),(e.y2-o.y)/(i.y-o.y),(o.x-e.x1)/(o.x-r.origin.x),(e.x2-o.x)/(i.x-o.x));n<1&&this.visual.transform(k.geometry.transform().scale(n,n,[o.x,o.y]))}},e.prototype.labelComparator=function(t){var e=t?-1:1;return function(t,o){return((t.parent.sector.middle()+270)%360-(o.parent.sector.middle()+270)%360)*e}},e.prototype.hAlignLabel=function(t,e,o,r,i){var n=e.radius,s=e.center,a=s.x,p=s.y,l=Math.min(Math.abs(p-o),Math.abs(p-r));return l>n?t:a+Math.sqrt(n*n-l*l)*(i?1:-1)},e.prototype.pointInCircle=function(t,e,o){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(o,2)},e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},e.prototype.animationDelay=function(t){return 70*t},e.prototype.stackRoot=function(){return this},e}(ne);function ls(t,e,o,r){var i,n=(r.x-o.x)*(t.y-o.y)-(r.y-o.y)*(t.x-o.x),s=(r.y-o.y)*(e.x-t.x)-(r.x-o.x)*(e.y-t.y);if(0!==s){var a=n/s;i=new Qt(t.x+a*(e.x-t.x),t.y+a*(e.y-t.y))}return i}jt(ps,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),B(ps.prototype,as),ps.prototype.isStackRoot=!0;var hs=ps,cs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createPieChart(this.series)},e.prototype.createPieChart=function(t){var e=t[0],o=new hs(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(o)},e.prototype.appendChart=function(e,o){t.prototype.appendChart.call(this,e,o),mt(this.options.legend.items,e.legendItems)},e}(Yi),us=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowLabel=function(){var e=this.options.labels,o=this.label,r=this.sector.clone(),i=r.middle();if(o){var n=o.box.height();if(e.position===a){r.radius-=(r.radius-r.innerRadius)/2;var s=r.point(i);o.reflow(new $t(s.x,s.y-n/2,s.x,s.y))}else t.prototype.reflowLabel.call(this)}},e.prototype.createSegment=function(t,e){return re.current.createRing(t,e)},e}(ss);jt(us,{overlay:{gradient:"roundedGlass"},labels:{position:a},animation:{type:or}}),B(us.prototype,dr);var ds=us,fs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addValue=function(t,e,o){var r=B({},o.series,{index:o.index});if(this.evalSegmentOptions(r,t,o),this.createLegendItem(t,r,o),t&&!1!==o.visible){var i=new ds(t,e,r);Object.assign(i,o),this.append(i),this.points.push(i)}},e.prototype.reflow=function(e){for(var o,r=this.options,i=e.clone(),n=Math.min(i.width(),i.height()),s=n/2,a=n-.85*n,p=r.series,l=p.length,h=Bt(r.padding,a),c=s-(h=h>s-5?s-5:h),u=0,d=0;d<l;d++){var f=p[d];0===d&&bt(f.holeSize)&&(o=f.holeSize,c-=f.holeSize),bt(f.size)?c-=f.size:u++,bt(f.margin)&&d!==l-1&&(c-=f.margin)}bt(o)||(c-=o=.75*((s-h)/(l+.75)));var g,y=o,v=0;this.seriesConfigs=[];for(var m=0;m<l;m++){var x=p[m];g=(y+=v)+Bt(x.size,c/u),this.seriesConfigs.push({innerRadius:y,radius:g}),v=x.margin||0,y=g}t.prototype.reflow.call(this,e)},e.prototype.animationDelay=function(t,e,o){return 50*t+600*(e+1)/(o+1)},e}(hs);jt(fs,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var gs=fs,ys=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createDonutChart(this.series)},e.prototype.createDonutChart=function(t){var e=t[0],o=new gs(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(o)},e}(cs),vs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.valueAxisRangeTracker=new Er},e.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},e.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),o=t.options.reverse?e.max:e.min,r=t.getSlot(o),i=this.polarAxis.getSlot(0).center,n=t.box.translate(i.x-r.x1,i.y-r.y1);t.reflow(n)},e.prototype.createValueAxis=function(){var t,e,o=this.valueAxisRangeTracker,r=o.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1});"log"===i.type?(t=Io,e={min:.1,max:1}):(t=Ro,e={min:0,max:1});var n=o.query(name)||r||e;n&&r&&(n.min=Math.min(n.min,r.min),n.max=Math.max(n.max,r.max));var s=new t(n.min,n.max,i,this.chartService);this.valueAxis=s,this.appendAxis(s)},e.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,o=this.polarAxis,r=this.box,i=.15*Math.min(r.width(),r.height()),n=V(t.padding||{},i),s=r.clone().unpad(n),p=s.clone();p.y2=p.y1+Math.min(p.width(),p.height()),p.align(s,x,a);var l=p.clone().shrink(0,p.height()/2);o.reflow(p),e.reflow(l);var h=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:h})),this.axisBox=p,this.alignAxes(p)},e.prototype.backgroundBox=function(){return this.box},e.prototype.detachLabels=function(){},e}(Yi),ms=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointSlot=function(t,e){var o=t.center.y-e.y1,r=Qt.onCircle(t.center,t.startAngle,o);return new $t(r.x,r.y,r.x,r.y)},e}(pi);jt(ms,{clip:!1});var xs=ms,bs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}($n);bs.prototype.pointSlot=xs.prototype.pointSlot,jt(bs,{clip:!1});var ws=bs,_s=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},e.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},e.prototype.strokeSegments=function(){var t=this._strokeSegments;if(!t){var e=this._polarAxisCenter(),o=new jo(!1),r=this.points();r.push(e),(t=this._strokeSegments=o.process(r)).pop()}return t},e}(Lr),Cs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),o=new k.geometry.Segment([e.x,e.y]);t.segments.unshift(o),t.segments.push(o)},e}(Rr);function ks(t,e){return t.value.x-e.value.x}var Ss=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,o){return"smooth"===(e.line||{}).style?new _s(t,e,o):new Cs(t,e,o)},e.prototype.createMissingValue=function(t,e){var o;return si(t.x)&&"interpolate"!==e&&(o={x:t.x,y:t.y},e===$o&&(o.y=0)),o},e.prototype.seriesMissingValues=function(t){return t.missingValues||$o},e.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},e.prototype.sortPoints=function(t){if(t.sort(ks),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];if(o)si(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e]}return t},e}(ws),As=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createPolarAxis=function(){var t=new Po(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},e.prototype.valueAxisOptions=function(t){return B(t,{majorGridLines:{type:i},minorGridLines:{type:i}},this.options.yAxis)},e.prototype.createValueAxis=function(){t.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},e.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Yi.prototype.appendChart.call(this,t,e)},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Li(t,["polarLine"]),e),this.createScatterChart(Li(t,["polarScatter"]),e),this.createAreaChart(Li(t,["polarArea"]),e)},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=new ws(this,{series:t});this.appendChart(o,e)}},e.prototype.createScatterChart=function(t,e){if(0!==t.length){var o=new xs(this,{series:t});this.appendChart(o,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=new Ss(this,{series:t});this.appendChart(o,e)}},e.prototype._dispatchEvent=function(t,e,o){var r=t._eventCoordinates(e),i=new Qt(r.x,r.y),n=this.axisX.getValue(i),s=this.axisY.getValue(i);null!==n&&null!==s&&t.trigger(o,{element:kt(e),x:n,y:s})},e.prototype.createCrosshairs=function(){},e}(vs);jt(As,{xAxis:{},yAxis:{}}),B(As.prototype,qi);var Ps=As;var Os=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointSlot=function(t,e){var o=t.center.y-e.y1,r=Qt.onCircle(t.center,t.middle(),o);return new $t(r.x,r.y,r.x,r.y)},e.prototype.renderSegments=function(){if(t.prototype.renderSegments.call(this),this._segments&&this._segments.length>1)for(var e=function(t){for(var e=[],o=0;o<t.length;o++){var r=t[o];e[r.seriesIx]=e[r.seriesIx]||[],e[r.seriesIx].push(r)}return e}(this._segments),o=0;o<e.length;o++){var r=e[o];if(r&&r.length>1){var i=r[0].linePoints[0],n=At(r),s=At(n.linePoints),a=0===i.categoryIx,p=s.categoryIx===s.categoriesCount-1;a&&p&&At(r).linePoints.push(i)}}},e.prototype.createSegment=function(t,e,o){var r=new("smooth"===e.style?Cr:mr)(t,e,o),i=this.seriesMissingValues(e);return t.length!==e.data.length&&"interpolate"!==i||(r.options.closed=!0),r},e}(Tr);jt(Os,{clip:!1,limitPoints:!1});var Ms=Os,Ts=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(){},e}(Lr),Rs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(){},e}(Rr),Bs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,o,r){var i,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&o>0&&r&&(n=r.linePoints.slice(0),i=r),"smooth"===p?(s=new Ts(t,e,o,i,n)).options.closed=!0:(t.push(t[0]),s=new Rs(t,e,o,i,n)),s},e.prototype.seriesMissingValues=function(t){return t.missingValues||$o},e}(Ms),Is=function(t){function e(e,o){t.call(this,e,null,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ds);jt(Is,{overlay:{gradient:"none"},labels:{distance:10}});var Ls=Is,js=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Nr:Fr}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,o=this.children,r=e.gap,i=e.spacing,n=o.length,s=n+r+i*(n-1),a=t.angle/s,p=t.startAngle+a*(r/2);this.forEach(o,(function(e){var o=t.clone();o.startAngle=p,o.angle=a,e.sector&&(o.radius=e.sector.radius),e.reflow(o),e.sector=o,p+=a+a*i}))},e}(ne);jt(js,{gap:1,spacing:0});var Es=js,Ds=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options.reverse,o=this.children,r=o.length,i=e?r-1:0,n=e?-1:1;this.box=new $t;for(var s=i;s>=0&&s<r;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},e}(ne),Vs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return Ls},e.prototype.clusterType=function(){return Es},e.prototype.stackType=function(){return Ds},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.pointSlot=function(t,e){var o=t.clone(),r=t.center.y;return o.radius=r-e.y1,o.innerRadius=r-e.y2,o},e.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},e.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),t.prototype.createAnimation.call(this)},e}(Kr);Vs.prototype.reflow=ur.prototype.reflow,jt(Vs,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var zs=Vs,Us=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createPolarAxis=function(){var t=new So(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},e.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&B(t,{majorGridLines:{type:i},minorGridLines:{type:i}}),this._isStacked100&&B(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),B(t,this.options.valueAxis)},e.prototype.aggregateCategories=function(){Cn.prototype.aggregateCategories.call(this,this.panes)},e.prototype.createCategoryAxesLabels=function(){Cn.prototype.createCategoryAxesLabels.call(this,this.panes)},e.prototype.filterSeries=function(t){return t},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Li(t,["radarArea"]),e),this.createLineChart(Li(t,["radarLine"]),e),this.createBarChart(Li(t,["radarColumn"]),e)},e.prototype.chartOptions=function(t){var e={series:t},o=t[0];if(o){var r=this.filterVisibleSeries(t),i=o.stack;e.isStacked=i&&r.length>1,e.isStacked100=i&&"100%"===i.type&&r.length>1,e.isStacked100&&(this._isStacked100=!0)}return e},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=new Bs(this,this.chartOptions(t));this.appendChart(o,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=new Ms(this,this.chartOptions(t));this.appendChart(o,e)}},e.prototype.createBarChart=function(t,e){if(0!==t.length){var o=t[0],r=this.chartOptions(t);r.gap=o.gap,r.spacing=o.spacing;var i=new zs(this,r);this.appendChart(i,e),this._hasBarCharts=!0}},e.prototype.seriesCategoryAxis=function(){return this.categoryAxis},e.prototype._dispatchEvent=function(t,e,o){var r=t._eventCoordinates(e),i=new Qt(r.x,r.y),n=this.categoryAxis.getCategory(i),s=this.valueAxis.getValue(i);null!==n&&null!==s&&t.trigger(o,{element:kt(e),category:n,value:s})},e.prototype.createCrosshairs=function(){},e}(vs);B(Us.prototype,qi,{appendChart:Cn.prototype.appendChart,aggregateSeries:Cn.prototype.aggregateSeries,seriesSourcePoints:Cn.prototype.seriesSourcePoints}),jt(Us,{categoryAxis:{categories:[]},valueAxis:{}});var Hs=Us,Fs=function(t){function e(e,o,r){t.call(this,o),this.value=e,this.options.index=r.index}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.points,o=this.children[0];this.box=new $t(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new $t(t.x1,e[0].y,t.x2,e[2].y))},e.prototype.createVisual=function(){var e,o=this,r=this.options;t.prototype.createVisual.call(this),(e=r.visual?r.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:r,sender:this.getSender(),createVisual:function(){return o.createPath()}}):this.createPath())&&this.visual.append(e)},e.prototype.createPath=function(){var t=this.options,e=t.border;return k.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},e.prototype.createHighlight=function(t){return k.drawing.Path.fromPoints(this.points,t)},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=k.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},e.prototype.tooltipAnchor=function(){var t=this.box;return{point:new Qt(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e}(ne);jt(Fs,{color:v,border:{width:1}}),B(Fs.prototype,dr);var Ns=Fs,Gs=function(t){function e(e,o){t.call(this,o),this.plotArea=e,this.points=[],this.labels=[],this.legendItems=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},e.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors;void 0===e&&(e=[]);var o=t.series[0],r=o.data;if(r)for(var i=Bi(o),n=i.total,s=i.points,a=0;a<s.length;a++){var p=s[a];if(p){var l=p.fields;T(o.color)||(o.color=l.color||e[a%e.length]),l=B({index:a,owner:this,series:o,dataItem:r[a],percentage:p.value/n},l,{visible:p.visible});var h=p.valueFields.value,c=this.createSegment(h,l),u=this.createLabel(h,l);c&&u&&c.append(u)}}},e.prototype.evalSegmentOptions=function(t,e,o){var r=o.series;lr(t,{value:e,series:r,dataItem:o.dataItem,index:o.index},{defaults:r._defaults,excluded:["data","content","template","toggle","visual"]})},e.prototype.createSegment=function(t,e){var o=B({},e.series);if(this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible){var r=new Ns(t,o,e);return Object.assign(r,e),this.append(r),this.points.push(r),r}},e.prototype.createLabel=function(t,e){var o=e.series,r=e.dataItem,i=B({},this.options.labels,o.labels),n=t;if(i.visible){var s=ot(i),a={dataItem:r,value:t,percentage:e.percentage,category:e.category,series:o};s?n=s(a):i.format&&(n=this.plotArea.chartService.format.auto(i.format,n)),i.color||(i.color=Ft(o.color),i.background||(i.background=o.color)),this.evalSegmentOptions(i,t,e);var p=new we(n,B({vAlign:i.position},i),a);return this.labels.push(p),p}},e.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},o=0;o<t.length;o++){var r=t[o].options.align;if(r!==a){var i=t[o].box.width();r===c?e.left=Math.max(e.left,i):e.right=Math.max(e.right,i)}}return e},e.prototype.dynamicSlopeReflow=function(t,e,o){for(var r=this.options,i=this.points,n=i.length,s=i[0],a=s,p=0;p<i.length;p++)i[p].percentage>a.percentage&&(a=i[p]);for(var l=s.percentage/a.percentage*e,h=(e-l)/2,c=0,u=0;u<n;u++){var d=i[u].percentage,f=i[u+1],g=f?f.percentage:d,y=i[u].points=[],v=r.dynamicHeight?o*d:o/n,m=void 0;m=Pt(m=d?(e-l*(g/d))/2:g?0:e/2,0,e),y.push(new k.geometry.Point(t.x1+h,t.y1+c)),y.push(new k.geometry.Point(t.x1+e-h,t.y1+c)),y.push(new k.geometry.Point(t.x1+e-m,t.y1+v+c)),y.push(new k.geometry.Point(t.x1+m,t.y1+v+c)),h=m,c+=v+r.segmentSpacing,l=Pt(e-2*m,0,e)}},e.prototype.constantSlopeReflow=function(t,e,o){for(var r=this.options,i=this.points,n=i.length,s=r.neckRatio<=1,a=s?r.neckRatio*e:e,p=s?0:(e-e/r.neckRatio)/2,l=((s?e:e-2*p)-a)/2,h=0,c=0;c<n;c++){var u=i[c].points=[],d=i[c].percentage,f=r.dynamicHeight?l*d:l/n,g=r.dynamicHeight?o*d:o/n;u.push(new k.geometry.Point(t.x1+p,t.y1+h)),u.push(new k.geometry.Point(t.x1+e-p,t.y1+h)),u.push(new k.geometry.Point(t.x1+e-p-f,t.y1+g+h)),u.push(new k.geometry.Point(t.x1+p+f,t.y1+g+h)),p+=f,h+=g+r.segmentSpacing}},e.prototype.reflow=function(t){var e=this.points,o=e.length;if(o){var r=this.options,i=t.clone().unpad(this.labelPadding()),n=i.height()-r.segmentSpacing*(o-1),s=i.width();r.dynamicSlope?this.dynamicSlopeReflow(i,s,n):this.constantSlopeReflow(i,s,n);for(var a=0;a<o;a++)e[a].reflow(t)}},e}(ne);jt(Gs,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:a,position:a,zIndex:1}}),B(Gs.prototype,as);var Ws=Gs,Xs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createFunnelChart(this.series)},e.prototype.createFunnelChart=function(t){var e=t[0],o=new Ws(this,{series:t,legend:this.options.legend,neckRatio:e.neckRatio,dynamicHeight:e.dynamicHeight,dynamicSlope:e.dynamicSlope,segmentSpacing:e.segmentSpacing,highlight:e.highlight});this.appendChart(o)},e.prototype.appendChart=function(e,o){t.prototype.appendChart.call(this,e,o),mt(this.options.legend.items,e.legendItems)},e}(Yi),Ys=function(t,e){void 0===e&&(e=.05);var o=Object(k.parseColor)(t),r=1-e;return function(t){var e=o.toHSL(),i=100-e.l,n=r-t;return e.l+=Math.min(n*i,i),e.toCss()}},qs=function(t){function e(e,o){t.call(this),this.options=o,this.color=o.color||v,this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},e.prototype.createLabel=function(){var t=this.options.labels;if(t.visible){var e,o=this.pointData(),r=ot(t),i=t.color;e=r?r(o):this.formatValue(t.format),i||(i=Ft(this.color)),this.label=new we(e,B({align:a,vAlign:a,margin:{left:5,right:5},zIndex:Bt(t.zIndex,this.series.zIndex)},t,{color:i}),o),this.append(this.label)}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.reflow=function(t){this.render();var e=this.label;this.box=t,e&&e.reflow(this.markerBox()),this.note&&this.note.reflow(t),this.marker.reflow(this.markerBox())},e.prototype.markerBox=function(){var t=this.options.markers,e=t.border,o=this.box.toRect(),r="roundedRect"===Bt(t.type,"rect"),i=Bt(e.width,r?1:0),n=Math.round(i/2);if(t.size){var s=o.center();o.size.width=o.size.height=t.size,o.origin.x=Math.round(s.x-o.size.width/2),o.origin.y=Math.round(s.y-o.size.height/2)}return o.size.width-=i,o.size.height-=i,o.origin.y+=n+.5,o.origin.x+=n+.5,xe(o)},e.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,o=Bt(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:o,dashType:e.dashType}},e.prototype.createMarker=function(){var t=this.options,e=t.markers,o=new le({type:Bt(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:Bt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});this.marker=o,this.append(o)},e.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,r=new le({type:Bt(o.type,"rect"),width:o.size,height:o.size,rotation:o.rotation,background:o.color||this.color,border:this.markerBorder(),borderRadius:o.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:Bt(e.zIndex,this.series.zIndex)});r.reflow(this.markerBox());var i=r.getElement();return i.options.fill=t.fill,i.options.stroke=t.stroke,i},e.prototype.highlightVisual=function(){return this.rectVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},e.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new Qt(t,e),align:{horizontal:a,vertical:s}}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.unclipElements=function(){},e.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},e}(ne);B(qs.prototype,dr),B(qs.prototype,fr),qs.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};var Ks=qs,Qs=function(t){function e(e,o){t.call(this,o),this.plotArea=e,this.chartService=e.chartService,this._initFields(),this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:u,max:d},this._evalSeries=[]},e.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},e.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var o=t[e],r=0;r<o.data.length;r++){var i=this._bindPoint(o,e,r).valueFields;this.valueRange.min=Math.min(this.valueRange.min,i.value),this.valueRange.max=Math.max(this.valueRange.max,i.value)}},e.prototype.addValue=function(t,e){var o;t&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},e.prototype.evalPointOptions=function(t,e,o){var r=o.series,i=o.seriesIx,n={defaults:r._defaults,excluded:["data","tooltip","content","template","visual","toggle"]},s=this._evalSeries[i];bt(s)||(this._evalSeries[i]=s=lr(t,{},n,!0));var a=t;return s&&lr(a=B({},t),{value:e,series:r,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),a},e.prototype.pointType=function(){return Ks},e.prototype.pointOptions=function(t,e){var o=this.seriesOptions[e];if(!o){var r=this.pointType().prototype.defaults;this.seriesOptions[e]=o=B({},r,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return o},e.prototype.createPoint=function(t,e){var o=e.series,r=this.pointOptions(o,e.seriesIx),i=e.color||o.color;(r=this.evalPointOptions(r,t,e),T(o.color))?i=r.color:i=Ys(i)(t.value/this.valueRange.max);var n=new Ks(t,r);return n.color=i,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,r=this.plotArea,i=e?r.namedXAxes[e]:r.axisX,n=o?r.namedYAxes[o]:r.axisY;if(!i)throw new Error("Unable to locate X axis with name "+e);if(!n)throw new Error("Unable to locate Y axis with name "+o);return{xAxis:i,yAxis:n}},e.prototype.reflow=function(t){var e=this,o=this.points,r=!this.options.clip,i=0;this.traverseDataPoints((function(t,n){var s=o[i++],a=e.seriesAxes(n.series),p=a.xAxis,l=a.yAxis,h=p.categoryIndex(t.x),c=l.categoryIndex(t.y),u=p.getSlot(h,h,r),d=l.getSlot(c,c,r);if(s)if(u&&d){var f=e.pointSlot(u,d);s.reflow(f)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new $t(t.x1,e.y1,t.x2,e.y2)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=0;o<e.length;o++)for(var r=e[o],i=this.seriesAxes(r),n=i.xAxis,s=i.yAxis,a=n.currentRangeIndices(),p=s.currentRangeIndices(),l=0;l<r.data.length;l++){var h=this._bindPoint(r,o,l),c=h.valueFields,u=h.fields,d=n.totalIndex(c.x),f=s.totalIndex(c.y),g=a.min<=d&&d<=a.max,y=p.min<=f&&f<=p.max;g&&y&&t(c,B({pointIx:l,series:r,seriesIx:o,dataItem:r.data[l],owner:this},u))}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.value)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},e}(ne);jt(Qs,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),B(Qs.prototype,{_bindPoint:ur.prototype._bindPoint});var Zs=Qs,$s=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},e.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var o=t[e],r=o.data||[],i=this.seriesAxes(o),n=i.xAxis,s=i.yAxis,a=qt(n.categories||[]),p=qt(s.categories||[]),l=0;l<r.length;l++){var h=Xo.current.bindPoint(o,l).valueFields,c=h.x,u=h.y;a.has(c)||a.add(c),p.has(u)||p.add(u)}n.categories=a.values(),s.categories=p.values()}},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var r=t[o],i=e[r.options.name||"default"]||[];this.addToLegend(i);var n=this.filterVisibleSeries(i);n&&this.createHeatmapChart(Li(n,["heatmap"]),r)}},e.prototype.createHeatmapChart=function(t,e){var o=new Zs(this,{series:t});this.appendChart(o,e)},e.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,r=st([].concat(e.xAxis),(function(t){return t.name===o}))[0],i=t.yAxis,n=st([].concat(e.yAxis),(function(t){return t.name===i}))[0],s=(e.panes||[{}])[0].name||"default";return(r||{}).pane||(n||{}).pane||s},e.prototype.seriesAxes=function(t){var e,o,r=this.options,i=[].concat(r.xAxis),n=t.xAxis;e=n?i.find((function(t){return t.name===n})):i[0];var s=[].concat(r.yAxis),a=t.yAxis;if(o=a?s.find((function(t){return t.name===a})):s[0],!e)throw new Error("Unable to locate X axis with name "+n);if(!o)throw new Error("Unable to locate Y axis with name "+a);return{xAxis:e,yAxis:o}},e.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},e.prototype.createXYAxis=function(t,e,o){for(var r,i=t.name,n=e?this.namedYAxes:this.namedXAxes,s=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),a=s.categories?s.categories[0]:null,p=[s.min,s.max,a],h=this.series,c=0;c<h.length;c++){var u=h[c],d=u[e?"yAxis":"xAxis"];if(d===s.name||0===o&&!d){var f=Xo.current.bindPoint(u,0).valueFields;p.push(f[e?"y":"x"]);break}}for(var g=0;g<p.length;g++)if(p[g]instanceof Date){r=!0;break}var y=new(Ii(s.type,l)||!s.type&&r?po:Je)(s,this.chartService);if(y.axisIndex=o,i){if(n[i])throw new Error((e?"Y":"X")+" axis with name "+i+" is already defined");n[i]=y}return this.appendAxis(y),y.mapCategories(),y},e.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),r=[],i=[].concat(e.yAxis),n=[],s=0;s<o.length;s++){ht(this.findPane(o[s].pane),t)&&r.push(this.createXYAxis(o[s],!1,s))}for(var a=0;a<i.length;a++){ht(this.findPane(i[a].pane),t)&&n.push(this.createXYAxis(i[a],!0,a))}this.axisX=this.axisX||r[0],this.axisY=this.axisY||n[0]},e.prototype.removeAxis=function(e){var o=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?delete this.namedYAxes[o]:delete this.namedXAxes[o],e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype._dispatchEvent=function(t,e,o){for(var r=t._eventCoordinates(e),i=new Qt(r.x,r.y),n=this.axes,s=n.length,a=[],p=[],l=0;l<s;l++){var h=n[l];Ti(h.options.vertical?p:a,h.getCategory(i))}a.length>0&&p.length>0&&t.trigger(o,{element:kt(e),originalEvent:e,x:Di(a),y:Di(p)})},e.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,r=this.groupAxes(this.panes),i=(o?r.y:r.x).indexOf(t);Js(this.options,i,o,e),Js(this.originalOptions,i,o,e)},e.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},e}(Yi);function Js(t,e,o,r){B([].concat(o?t.yAxis:t.xAxis)[e],r)}jt($s,{xAxis:{},yAxis:{}}),B($s.prototype,qi);var ta=$s,ea="color",oa="first",ra="max";Vn.current.register(Cn,[Jo,tr,er,rr,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),Vn.current.register(es,["scatter","scatterLine","bubble"]),Vn.current.register(cs,[or]),Vn.current.register(ys,["donut"]),Vn.current.register(Xs,["funnel"]),Vn.current.register(Ps,["polarArea","polarLine","polarScatter"]),Vn.current.register(Hs,["radarArea","radarColumn","radarLine"]),Vn.current.register(ta,["heatmap"]),Xo.current.register([Jo,tr,er,rr,"area","verticalArea"],[y],["category",ea,"noteText","errorLow","errorHigh"]),Xo.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",ea,"noteText"]),Xo.current.register(["waterfall","horizontalWaterfall"],[y],["category",ea,"noteText","summary"]),Xo.current.register(["polarArea","polarLine","polarScatter"],[m,x],[ea]),Xo.current.register(["radarArea","radarColumn","radarLine"],[y],[ea]),Xo.current.register(["funnel"],[y],["category",ea,"visibleInLegend","visible"]),$i.current.register([Jo,tr,er,rr,"area","verticalArea","waterfall","horizontalWaterfall"],{value:ra,color:oa,noteText:oa,errorLow:"min",errorHigh:ra}),$i.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:ra,color:oa,noteText:oa}),$i.current.register(["radarArea","radarColumn","radarLine"],{value:ra,color:oa}),Xo.current.register(["scatter","scatterLine","bubble"],[m,x],[ea,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Xo.current.register(["bubble"],[m,x,"size"],[ea,"category","noteText"]),Xo.current.register(["heatmap"],[m,x,y],[ea,"noteText"]),Xo.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",ea,"downColor","noteText"]),$i.current.register(["candlestick","ohlc"],{open:ra,high:ra,low:"min",close:ra,color:oa,downColor:oa,noteText:oa}),Xo.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",ea,"noteText"]),$i.current.register(["boxPlot","verticalBoxPlot"],{lower:ra,q1:ra,median:ra,q3:ra,upper:ra,mean:ra,outliers:oa,color:oa,noteText:oa}),Xo.current.register(["bullet","verticalBullet"],["current","target"],["category",ea,"visibleInLegend","noteText"]),$i.current.register(["bullet","verticalBullet"],{current:ra,target:ra,color:oa,noteText:oa}),Xo.current.register([or,"donut"],[y],["category",ea,"explode","visibleInLegend","visible"]);var ia=["category",y,m,x],na=function(t){function e(e,o,r,i){var n=this;void 0===i&&(i={}),t.call(this),this.observers=[],this.addObserver(i.observer),this.chartService=new Q(this,i),this.chartService.theme=r,this._initElement(e);var s=B({},this.options,o);this._originalOptions=B({},s),this._theme=r,this._initTheme(s,r),this._initHandlers(),this._initSurface(),this.bindCategories(),Lt.preloadFonts(o,(function(){n.fontLoaded=!0,n._destroyed||(n.trigger("init"),n._redraw(),n._attachEvents())}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},e.prototype._setElementClass=function(t){w(t,"k-chart")},e.prototype._initTheme=function(t,e){for(var o=[],r=t.series||[],i=0;i<r.length;i++)o.push(Object.assign({},r[i]));t.series=o,function(t){for(var e=ia,o=0;o<e.length;o++){var r=e[o]+"Axes";t[r]&&(t[e[o]+"Axis"]=t[r],delete t[r])}}(t),this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=B({},e,t),this.applySeriesColors()},e.prototype.getSize=function(){var t=this.options.chartArea||{};return{width:t.width?parseInt(t.width,10):Math.floor(this.element.offsetWidth),height:t.height?parseInt(t.height,10):Math.floor(this.element.offsetHeight)}},e.prototype.resize=function(t){var e=this.getSize(),o=this._size,r=e.width>0||e.height>0;t||r&&(!o||e.width!==o.width||e.height!==o.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):r&&this._selections&&Dt(this._selections,(function(t){return!t.visible}))&&(this._destroySelections(),this._setupSelection())},e.prototype._resize=function(){this._noTransitionsRedraw()},e.prototype.redraw=function(t){if(this.applyDefaults(this.options),this.applySeriesColors(),t){var e=this._model._plotArea,o=e.findPane(t);e.redraw(o)}else this._redraw()},e.prototype.getAxis=function(t){return Do(t,this._plotArea.axes)},e.prototype.findAxisByName=function(t){return this.getAxis(t)},e.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,o=0;o<e.length;o++)if(e[o].options.name===t)return new zo(e[o])},e.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new zo(e[t])},e.prototype.plotArea=function(){return new Uo(this._plotArea)},e.prototype.toggleHighlight=function(t,e){var o,r,i,n=this._plotArea,s=(n.srcSeries||n.series||[])[0];T(e)?o=n.filterPoints(e):(I(e)?(r=e.series,i=e.category):r=i=e,o="donut"===s.type?sa(n.pointsBySeriesName(r),i):s.type===or||"funnel"===s.type?sa((n.charts[0]||{}).points,i):n.pointsBySeriesName(r));o&&this.togglePointsHighlight(t,o)},e.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,r=0;r<e.length;r++)o.togglePointHighlight(e[r],t)},e.prototype.showTooltip=function(t){var e,o,r=this._sharedTooltip(),i=this._tooltip,n=this._plotArea;if(T(t)?(e=n.findPoint(t))&&r&&(o=e.categoryIx):r&&bt(t)&&(o=n.categoryAxis.categoryIndex(t)),r){if(o>=0){var s=this._plotArea.pointsByCategoryIndex(o);i.showAt(s)}}else e&&i.show(e)},e.prototype.hideTooltip=function(){this._tooltip.hide()},e.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),o=this.options.chartArea||{};o.width&&Ct(e,{width:o.width}),o.height&&Ct(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=k.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},e.prototype._surfaceWrap=function(){return this.element},e.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._model=t,this._plotArea=t._plotArea,t.renderVisual(),!1!==this.options.transitions&&t.traverse((function(t){t.animation&&t.animation.setup()})),this._initSurface(),this.surface.draw(t.visual),!1!==this.options.transitions&&t.traverse((function(t){t.animation&&t.animation.play()})),this._tooltip=this._createTooltip(),this._highlight=new Sn,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),ca(this._plotArea.panes),this._navState||this._cancelDomEvents()},e.prototype.exportVisual=function(t){var e;if(t&&(t.width||t.height||t.options)){var o=this.options,r=B({},t.options,{chartArea:{width:t.width,height:t.height}});ha(this._originalOptions,r),this.options=B({},this._originalOptions,r),this._initTheme(this.options,this._theme),this.bindCategories();var i=this._getModel();i.renderVisual(),ca(i._plotArea.panes),e=i.visual,this.options=o}else e=this.surface.exportVisual();return e},e.prototype._sharedTooltip=function(){return this._plotArea instanceof Cn&&this.options.tooltip&&this.options.tooltip.shared},e.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Mn(this._plotArea,t.pannable))},e.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Rn(this,e))},e.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Bn(this,e))},e.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,o=(e||{}).selection,r=(e||{}).mousewheel,i=!(t||!1!==e&&!1!==o||this.requiresHandlers(["dragStart","drag","dragEnd"])),n=(!1===e||!1===r)&&!this.requiresHandlers(["zoomStart","zoom","zoomEnd"]),s=this.element;this._dragZoomEnabled&&i&&n?(s.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||i&&n||(s.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!i,!n)},e.prototype._toggleDomEvents=function(t,e){var o=this.domEvents;o&&(o.toggleDrag&&o.toggleDrag(t),o.toggleZoom&&o.toggleZoom(e))},e.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new Nn(this.chartService,t)},e.prototype._createSharedTooltip=function(t){return new Wn(this._plotArea,t)},e.prototype.applyDefaults=function(t,e){!function(t,e){var o,r,i,n=(e||{}).axisDefaults||{};function s(t){var e=(t||{}).color||r.color,i=B({},n,n[o],r,r[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete i[o],i}for(var a=0;a<ia.length;a++)o=ia[a]+"Axis",r=t.axisDefaults||{},i=(i=[].concat(t[o])).map(s),t[o]=i.length>1?i:i[0]}(t,e),function(t,e){var o=t.series,r=o.length,i=t.seriesDefaults,n=B({},t.seriesDefaults),s=e?B({},e.seriesDefaults):{},a=B({},s);aa(n),aa(a);for(var p=0;p<r;p++){var l=o[p].type||t.seriesDefaults.type,h=B({data:[]},a,s[l],{tooltip:t.tooltip},n,i[l]);o[p]._defaults=h,o[p]=B({},h,o[p]),o[p].data=o[p].data||[]}}(t,e)},e.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,o=t.seriesColors||[],r=0;r<e.length;r++){var i=e[r],n=o[r%o.length],s=i._defaults;i.color=i.color||n,s&&(s.color=s.color||n)}},e.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new de(this._modelOptions());return o.chart=this,o._plotArea=e,Ce.buildTitle(t.title,o),t.legend&&t.legend.visible&&o.append(new En(e.options.legend,this.chartService)),o.append(e),o.reflow(),o},e.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return B({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},e.prototype._createPlotArea=function(t){var e=this.options;return Vn.current.create(t?[]:e.series,e,this.chartService)},e.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],o=0;o<t.length;o++){var r=t[o],i=r.options;if(r instanceof Je&&i.select&&!i.vertical){var n=r.range(),s=new Fn(this,r,B({min:n.min,max:n.max},i.select));e.push(s)}}},e.prototype._selectStart=function(t){return this.trigger("selectStart",t)},e.prototype._select=function(t){return this.trigger("select",t)},e.prototype._selectEnd=function(t){return this.trigger("selectEnd",t)},e.prototype._initHandlers=function(){this._clickHandler=this._click.bind(this),this._mousewheelHandler=this._mousewheel.bind(this),this._mouseleaveHandler=this._mouseleave.bind(this),this._surfaceMouseenterHandler=this._mouseover.bind(this),this._surfaceMouseleaveHandler=this._mouseout.bind(this),this._mousemove=Object(k.throttle)(this._mousemove.bind(this),20)},e.prototype.addObserver=function(t){t&&this.observers.push(t)},e.prototype.removeObserver=function(t){var e=this.observers.indexOf(t);e>=0&&this.observers.splice(e,1)},e.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},e.prototype.trigger=function(t,e){void 0===e&&(e={}),"showTooltip"===t&&(e.anchor.point=this._toDocumentCoordinates(e.anchor.point)),e.sender=this;for(var o=this.observers,r=!1,i=0;i<o.length;i++)o[i].trigger(t,e)&&(r=!0);return r},e.prototype._attachEvents=function(){var t,e,o=this.element;this._touchAction=o.style.touchAction,xt(o,((t={}).contextmenu=this._clickHandler,t[nr]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&xt(o,((e={}).mousemove=this._mousemove,e)),this.domEvents=$.create(this.element,{start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)}),this._toggleDragZoomEvents()},e.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger("plotAreaLeave"),this._plotArea.hovered=!1)},e.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},e.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},e.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger("zoomEnd",{}))},e.prototype._gesturechange=function(t){var e=this._mousewheelZoom;if(e&&!this._stopChartHandlers(t)){t.preventDefault();var o=this._gestureDistance,r=-t.distance/o+1;if(Math.abs(r)>=.1){r=Math.round(10*r),this._gestureDistance=t.distance;var i={delta:r,axisRanges:pa(this._plotArea.axes),originalEvent:t};if(this._zooming||!this.trigger("zoomStart",i)){var n=this._eventCoordinates(t);this._zooming||(this._zooming=!0),(i.axisRanges=e.updateRanges(r,n))&&!this.trigger("zoom",i)&&e.zoom()}}}},e.prototype._mouseout=function(t){if(t.element){var e=this._drawingChartElement(t.element,t);e&&e.leave&&e.leave(this,t.originalEvent)}},e.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers(["dragStart","drag","dragEnd"])&&this._startNavigation(t,e,"dragStart"),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection&&this._zoomSelection.start(t)&&this.trigger("zoomStart",{axisRanges:pa(this._plotArea.axes),originalEvent:t}))},e.prototype._move=function(t){var e=this._navState,o=this._pannable;if(!this._stopChartHandlers(t)){if(o){var r=o.move(t);r&&!this.trigger("drag",{axisRanges:r,originalEvent:t})&&o.pan()}else if(e){for(var i={},n=e.axes,s=0;s<n.length;s++){var a=n[s];if(a.options.name){var p=a.options.vertical?t.y:t.x,l=p.startLocation-p.location;0!==l&&(i[a.options.name]=a.translateRange(l))}}e.axisRanges=i,this.trigger("drag",{axisRanges:i,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},e.prototype._end=function(t){if(!this._stopChartHandlers(t)){var e=this._pannable;if(e&&e.end(t)?(this.surface.resumeTracking(),this.trigger("dragEnd",{axisRanges:pa(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,"dragEnd"),this._zoomSelection){var o=this._zoomSelection.end(t);o&&!this.trigger("zoom",{axisRanges:o,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger("zoomEnd",{axisRanges:o,originalEvent:t}))}}},e.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var o=this._eventCoordinates(t),r=this._plotArea.paneByPoint(o);if(r)for(var i=0;i<e.length;i++)if(e[i].onPane(r))return!0},e.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return Bt(t.rate,.3)},e.prototype._mousewheel=function(t){var e=this,o=yt(t),r=this._mousewheelZoom,i=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(i))if(r){var n={delta:o,axisRanges:pa(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger("zoomStart",n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=r.updateRanges(o,i),n.axisRanges&&!this.trigger("zoom",n)&&r.zoom(),this._mwTimeout=setTimeout((function(){e.trigger("zoomEnd",n),e._zooming=!1,e.surface&&e.surface.resumeTracking()}),150))}else{var s=this._navState;if(!s)this._startNavigation(t,i,"zoomStart")||(s=this._navState);if(s){var a=s.totalDelta||o;s.totalDelta=a+o;for(var p=this._navState.axes,l={},h=0;h<p.length;h++){var c=p[h],u=c.options.name;u&&(l[u]=c.scaleRange(-a*e._mousewheelZoomRate(),i))}this.trigger("zoom",{delta:o,axisRanges:l,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._endNavigation(t,"zoomEnd")}),150)}}},e.prototype._startNavigation=function(t,e,o){var r=this._model._plotArea,i=r.findPointPane(e),n=r.axes.slice(0);if(i){var s=pa(n);this.trigger(o,{axisRanges:s,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:s,pane:i,axes:n})}},e.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},e.prototype._getChartElement=function(t,e){var o=this.surface.eventTarget(t);if(o)return this._drawingChartElement(o,t,e)},e.prototype._drawingChartElement=function(t,e,o){for(var r,i=t;i&&!r;)r=i.chartElement,i=i.parent;if(r)return r.aliasFor&&(r=r.aliasFor(e,this._eventCoordinates(e))),o&&(r=r.closest(o))&&r.aliasFor&&(r=r.aliasFor()),r},e.prototype._eventCoordinates=function(t){var e=St(t);return this._toModelCoordinates(e.x,e.y)},e.prototype._elementPadding=function(){if(!this._padding){var t=D(this.element,["paddingLeft","paddingTop"]),e=t.paddingLeft,o=t.paddingTop;this._padding={top:o,left:e}}return this._padding},e.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),o=_t(this.element);return{left:Tt(t.x+e.left+o.left),top:Tt(t.y+e.top+o.top)}},e.prototype._toModelCoordinates=function(t,e){var o=this.element,r=_t(o),i=this._elementPadding(),n=Ht(o).invert(),s=new k.geometry.Point(t-r.left-i.left,e-r.top-i.top).transform(n);return new Qt(s.x,s.y)},e.prototype._tap=function(t){var e=this,o=this.surface.eventTarget(t),r=this._drawingChartElement(o,t),i=this._sharedTooltip();this._startHover(o,t)||i||this._unsetActivePoint(),i&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(r,t),this.handlingTap=!0,setTimeout((function(){e.handlingTap=!1}),0)},e.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},e.prototype._propagateClick=function(t,e){for(var o=t;o;)o.click&&o.click(this,e),o=o.parent},e.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var o=this._drawingChartElement(t,e,(function(t){return(t.hover||t.over)&&!(t instanceof Yi)})),r=this._activePoint,i=this._plotArea.series.length>1,n=this._hasInactiveOpacity();return this._updateHoveredPoint(o,e),o&&r!==o&&o.hover?(this._activePoint=o,this._sharedTooltip()||o.hover(this,e)||(this._displayTooltip(o),n?this._displayInactiveOpacity(o,i):this._highlight.show(o))):!o&&n&&(i&&this._activeChartInstance&&(this._updateSeriesOpacity(o,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null),o},e.prototype._displayTooltip=function(t){B({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},e.prototype._displayInactiveOpacity=function(t,e,o){var r=this._activeChartInstance=this._chartInstanceFromPoint(t);if(r)if(e)this._updateSeriesOpacity(t),this._applySeriesOpacity(r.children,null,!0),this._applySeriesOpacity(r.children,t.series),this._highlight.show(o||t);else{var i;if(!r.supportsPointInactiveOpacity())return void this._highlight.show(t);(i=this._getInactivePoints(t,r))&&i.length&&this._highlight.show(i,1-this._getInactiveOpacityForSeries(t.series))}},e.prototype._getInactivePoints=function(t,e){return this._getAllPointsOfType(e,t.constructor).filter((function(e){return e!==t}))},e.prototype._getAllPointsOfType=function(t,e){for(var o=[],r=0;r<t.children.length;r++){var i=t.children[r];i.constructor===e?o.push(i):i.children&&i.children.length&&(o=o.concat(this._getAllPointsOfType(i,e)))}return o},e.prototype._updateHoveredPoint=function(t,e){var o=this._hoveredPoint;o&&o!==t&&(o.out(this,e),this._hoveredPoint=null),t&&o!==t&&t.over&&(this._hoveredPoint=t,t.over(this,e))},e.prototype._updateSeriesOpacity=function(t,e){for(var o=this._plotArea,r=o.series.length,i=0;i<r;i++){var n=o.series[i],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},e.prototype._applySeriesOpacity=function(t,e,o,r){for(var i=0;i<t.length;i++){var n=t[i],s=n.series||r;if(s&&(s.highlight||{}).visible&&n.visual){var a=r?r.opacity:n.series.opacity;(s!==e||o)&&n.visual.opacity(o?1:a)}n.children&&n.children.length&&this._applySeriesOpacity(n.children,e,o,n.series)}},e.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},e.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=this.options.series.filter((function(t){return void 0!==t.highlight.inactiveOpacity})).length>0;return t||e},e.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},e.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},e.prototype._mouseover=function(t){var e,o=this._startHover(t.element,t.originalEvent);o&&o.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),xt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)))},e.prototype._mouseMoveTracking=function(t){var e,o=this.options,r=this._tooltip,i=this._highlight,n=this._activePoint,s=this._eventCoordinates(t);if(this._plotArea.box.containsPoint(s)){if(n&&n.tooltipTracking&&n.series&&n.parent.getNearestPoint){var a=n.parent.getNearestPoint(s.x,s.y,n.seriesIx);if(a&&a!==n)if(this._activePoint=a,!a.hover(this,t))B({},o.tooltip,a.options.tooltip).visible&&r.show(a),i.show(a)}}else Rt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null},e.prototype._mousemove=function(t){var e=this._eventCoordinates(t),o=this._plotArea;if(this._trackCrosshairs(e),o.hover){var r=o.backgroundContainsPoint(e);r?(o.hovered=!0,this._plotArea.hover(this,t)):o.hovered&&!r&&(this.trigger("plotAreaLeave"),o.hovered=!1)}this._sharedTooltip()&&this._trackSharedTooltip(e,t)},e.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,o=0;o<e.length;o++){var r=e[o];r.box.containsPoint(t)?r.showAt(t):r.hide()}},e.prototype._trackSharedTooltip=function(t,e,o){if(!this._suppressHover){var r=this.options.tooltip,i=this._plotArea,n=this._plotArea.categoryAxis,s=this._tooltip,a=this._highlight;if(i.backgroundContainsPoint(t)){var p=n.pointCategoryIndex(t);if(p!==this._tooltipCategoryIx||!this._sharedHighlight&&o){var l=i.pointsByCategoryIndex(p),h=l.map((function(t){return t.eventArgs(e)})),c=h[0]||{};c.categoryPoints=h,l.length>0&&!this.trigger("seriesHover",c)?(r.visible&&s.showAt(l,t),a.show(l),this._sharedHighlight=!0):s.hide(),this._tooltipCategoryIx=p}else o&&this._sharedHighlight&&(a.hide(),s.hide(),this._sharedHighlight=!1)}else this._sharedHighlight&&(a.hide(),s.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1)}},e.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},e.prototype._unsetActivePoint=function(t){var e=this._tooltip,o=this._highlight;this._activePoint=null,this._hoveredPoint=null,!e||t&&t.keepTooltipOpen||e.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,o&&o.hide()},e.prototype._deferRedraw=function(){this._redraw()},e.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},e.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),o=0;o<e.length;o++){var r=e[o];!1!==r.autoBind&&this.bindCategoryAxisFromSeries(r,o)}},e.prototype.bindCategoryAxisFromSeries=function(t,e){for(var o,r=this.options.series,i=r.length,n=new lt,s=[],a=!1,p=0;p<i;p++){var l=r[p],h=l.categoryAxis===t.name||!l.categoryAxis&&0===e,c=l.data,u=c.length,d=l.categoryField&&h;if(a=d||a,d&&u>0)for(var f=(o=Ei(t,Go(l.categoryField,c[0])))?ji:Go,g=0;g<u;g++){var y=c[g],v=f(l.categoryField,y,this.chartService.intl);!o&&n.get(v)||(s.push([v,y]),o||n.set(v,!0))}}if(s.length>0){o&&(s=function(t,e){void 0===e&&(e=Fe);for(var o=function(t,e){void 0===e&&(e=Fe);for(var o=1,r=t.length;o<r;o++)if(e(t[o],t[o-1])<0){t.sort(e);break}return t}(t,e),r=o.length,i=r>0?[o[0]]:[],n=1;n<r;n++)0!==e(o[n],At(i))&&i.push(o[n]);return i}(s,(function(t,e){return Fe(t[0],e[0])})));var m=function(t){for(var e=t.length,o=[],r=0;r<e;r++)for(var i=t[r],n=i.length,s=0;s<n;s++)o[s]=o[s]||[],o[s].push(i[s]);return o}(s);t.categories=m[0]}else a&&(t.categories=[])},e.prototype._isBindable=function(t){for(var e=Xo.current.valueFields(t),o=!0,r=0;r<e.length;r++){var i=e[r];if(i===y?i="field":i+="Field",!bt(t[i])){o=!1;break}}return o},e.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(e.transitions=!1,t=!0),this._redraw(),t&&(e.transitions=!0)},e.prototype._legendItemHover=function(t,e){var o,r=this._plotArea,i=this._highlight,n=(r.srcSeries||r.series)[t];if(o=ht(n.type,[or,"donut","funnel"])?r.findPoint((function(o){return o.series.index===t&&o.index===e})):r.pointsBySeriesIndex(t),this._hasInactiveOpacity()&&n.visible&&o){var s=r.series.length>1,a=o.length?o[0]:o;this._displayInactiveOpacity(a,s,o)}else i.show(o)},e.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},e.prototype.updateMouseMoveHandler=function(){var t,e;Rt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&xt(this.element,((e={}).mousemove=this._mousemove,e))},e.prototype.applyOptions=function(t,e){ha(this._originalOptions,t),this._originalOptions=B(this._originalOptions,t),this.options=B({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},e.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},e.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},e.prototype.setIntlService=function(t){this.chartService.intl=t},e.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},e.prototype.destroy=function(){var t,e;this._destroyed=!0,Rt(this.element,((t={}).contextmenu=this._clickHandler,t[nr]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Rt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},e.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},e.prototype._destroySelections=function(){var t=this._selections;if(t)for(;t.length>0;)t.shift().destroy()},e.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._destroySelections(),this._tooltip&&this._tooltip.destroy(),this._highlight&&this._highlight.destroy(),this._zoomSelection&&(this._zoomSelection.destroy(),delete this._zoomSelection),this._pannable&&(this._pannable.destroy(),delete this._pannable),this._mousewheelZoom&&(this._mousewheelZoom.destroy(),delete this._mousewheelZoom)},e}(k.Class);function sa(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function aa(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 pa(t){for(var e={},o=0;o<t.length;o++){var r=t[o],i=r.options.name;i&&(e[i]=r.range())}return e}var la=["data","categories"];function ha(t,e){for(var o in e)if(!ht(o,la)&&e.hasOwnProperty(o)){var r=e[o],i=t[o];if(bt(i)){var n=null===r;n||!bt(r)?(delete t[o],n&&delete e[o]):i&&I(r)&&I(i)&&ha(i,r)}}}function ca(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}jt(na,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:tr,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});var ua=na,da=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._slotAnchor=function(t,e){var o=this.plotArea.categoryAxis.options.vertical,r=o?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:o?new Qt(this.plotArea.box.x2,e.center().y):new Qt(e.center().x,-2),align:r}},e.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},e}(Wn),fa=[Jo,"bullet"];function ga(t){for(var e=[],o=0;o<t.length;o++){var r=t[o];e[o]=r.style.display,r.style.display="none"}return e}function ya(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function va(t){return P(t)?[t]:t}var ma=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._setElementClass=function(t){w(t,"k-sparkline")},e.prototype._initElement=function(e){t.prototype._initElement.call(this,e),this._initialWidth=Math.floor(Ct(e).width)},e.prototype._resize=function(){var e=this.element,o=ga(e.childNodes);this._initialWidth=Math.floor(Ct(e).width),ya(e.childNodes,o),t.prototype._resize.call(this)},e.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=ga(e.childNodes),r=document.createElement("span");r.innerHTML=" ",e.appendChild(r);var i=B({width:this._autoWidth,height:Ct(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return Ct(e,{width:i.width,height:i.height}),e.removeChild(r),ya(e.childNodes,o),this.surface&&this.surface.resize(),i},e.prototype._surfaceWrap=function(){if(!this.stage){var t=this.stage=document.createElement("span");this.element.appendChild(t)}return this.stage},e.prototype._createPlotArea=function(e){var o=t.prototype._createPlotArea.call(this,e);return this._autoWidth=this._initialWidth||this._calculateWidth(o),o},e.prototype._calculateWidth=function(t){for(var e=this.options,o=V(e.chartArea.margin),r=t.charts,i=this._surfaceWrap(),n=0,s=0;s<r.length;s++){var a=r[s],p=(a.options.series||[])[0];if(p){if(p.type===Jo)return 150;if("bullet"===p.type)return 150;if(p.type===or)return Ct(i).height;var l=a.categoryAxis;if(l){var h=l.categoriesCount()*(!a.options.isStacked&&ht(p.type,[tr,"verticalBullet"])?a.seriesOptions.length:1);n=Math.max(n,h)}}}var c=n*e.pointWidth;return c>0&&(c+=o.left+o.right),c},e.prototype._createSharedTooltip=function(t){return new da(this._plotArea,t)},e.normalizeOptions=function(t){var e=va(t);return(e=b(e)?{seriesDefaults:{data:e}}:B({},e)).series||(e.series=[{data:va(e.data)}]),B(e,{seriesDefaults:{type:e.type}}),(ht(e.series[0].type,fa)||ht(e.seriesDefaults.type,fa))&&(e=B({},{categoryAxis:{crosshair:{visible:!1}}},e)),e},e}(ua);jt(ma,{chartArea:{margin:2},axisDefaults:{visible:!1,majorGridLines:{visible:!1},valueAxis:{narrowRange:!0}},seriesDefaults:{type:"line",area:{line:{width:.5}},bar:{stack:!0},padding:2,width:.5,overlay:{gradient:null},highlight:{visible:!1},border:{width:0},markers:{size:2,visible:!1}},tooltip:{visible:!0,shared:!0},categoryAxis:{crosshair:{visible:!0,tooltip:{visible:!1}}},legend:{visible:!1},transitions:!1,pointWidth:5,panes:[{clip:!1}]});var xa=ma,ba=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this._initialOpacity=parseFloat(D(this.element,"opacity").opacity)},e.prototype.step=function(t){D(this.element,{opacity:String(ct(this._initialOpacity,0,t))})},e.prototype.abort=function(){t.prototype.abort.call(this),D(this.element,{display:"none",opacity:String(this._initialOpacity)})},e.prototype.cancel=function(){t.prototype.abort.call(this),D(this.element,{opacity:String(this._initialOpacity)})},e}(k.drawing.Animation);function wa(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}var _a=function(t){function e(e,o,r){t.call(this),this.options=B({},this.options,r),this.container=e,this.chartService=o;var i=D(e,["paddingLeft","paddingTop"]);this.chartPadding={top:i.paddingTop,left:i.paddingLeft},this.createElements(),e.appendChild(this.element)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createElements=function(){var t=this.element=wa("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=wa("k-tooltip k-chart-tooltip"),o=this.scroll=wa("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(o)},e.prototype.show=function(t,e,o){var r=this.element,i=this.options,n=this.scroll,s=this.tooltip,a=De(Ge(t)+Ge(e-t)/2),p=.4*o.width(),l=o.center().x-p,h=(o.center().x-l)/(i.max-i.min),c=a-i.min,u=this.chartService.intl.format(i.format,t,e),d=ot(i);this.clearHideTimeout(),this._visible||(D(r,{visibility:"hidden",display:"block"}),this._visible=!0),d&&(u=d({from:t,to:e})),s.innerHTML=u,D(s,{left:o.center().x-s.offsetWidth/2,top:o.y1});var f=D(s,["marginTop","borderTopWidth","height"]);D(n,{width:p,left:l+c*h,top:o.y1+f.marginTop+f.borderTopWidth+f.height/2}),D(r,{visibility:"visible"})},e.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},e.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout((function(){t._visible=!1,t._hideAnimation=new ba(t.element),t._hideAnimation.setup(),t._hideAnimation.play()}),this.options.hideDelay)},e.prototype.destroy=function(){this.clearHideTimeout(),this.container&&this.container.removeChild(this.element),delete this.container,delete this.chartService,delete this.element,delete this.tooltip,delete this.scroll},e}(k.Class);jt(_a,{format:"{0:d} - {1:d}",hideDelay:500});var Ca=_a,ka="_navigator",Sa=ka;function Aa(){}var Pa=function(t){function e(e){var o;t.call(this),this.chart=e;var r=this.options=B({},this.options,e.options.navigator),i=r.select;i&&(i.from=this.parseDate(i.from),i.to=this.parseDate(i.to)),bt(r.hint.visible)||(r.hint.visible=r.visible),this.chartObserver=new dt(this,((o={}).drag="_drag",o.dragEnd="_dragEnd",o.zoom="_zoom",o.zoomEnd="_zoomEnd",o)),e.addObserver(this.chartObserver)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parseDate=function(t){return Ke(this.chart.chartService.intl,t)},e.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},e.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},e.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},e.prototype.initSelection=function(){var t,e=this.chart,o=this.options,r=this.mainAxis(),i=r.roundedRange(),n=i.min,s=i.max,a=o.select,p=a.from,l=a.to,h=a.mousewheel,c=(t=r,Aa.prototype=t,new Aa);0!==r.categoriesCount()&&(this.clean(),c.box=r.box,this.selection=new Fn(e,c,{min:n,max:s,from:p||n,to:l||s,mousewheel:Bt(h,{zoom:"left"}),visible:o.visible},new dt(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),o.hint.visible&&(this.hint=new Ca(e.element,e.chartService,{min:n,max:s,template:ot(o.hint),format:o.hint.format})))},e.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Sa].roundedRange(),e=t.min,o=t.max,r=this.options.select||{},i=r.from||e;i<e&&(i=e);var n=r.to||o;n>o&&(n=o),this.options.select=B({},r,{from:i,to:n}),this.filterAxes()},e.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(At(e.panes),t)},e.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,o=e.panes.slice(0,-1);e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(o)},e.prototype._drag=function(t){var e,o=this.chart,r=this.selection,i=o._eventCoordinates(t.originalEvent),n=this.mainAxis(),s=n.roundedRange(),a=n.pane.box.containsPoint(i),p=o._plotArea.categoryAxis,l=t.axisRanges[p.options.name],h=this.options.select;if(l&&!a&&r){e=h.from&&h.to?Ge(h.to)-Ge(h.from):Ge(r.options.to)-Ge(r.options.from);var c=De(Pt(Ge(l.min),s.min,Ge(s.max)-e)),u=De(Pt(Ge(c)+e,Ge(s.min)+e,s.max));this.options.select={from:c,to:u},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),r.set(c,u),this.showHint(c,u)}},e.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},e.prototype.readSelection=function(){var t=this.selection.options,e=t.from,o=t.to,r=this.options.select;r.from=e,r.to=o},e.prototype.filterAxes=function(){var t=this.options.select;void 0===t&&(t={});for(var e=this.chart.options.categoryAxis,o=t.from,r=t.to,i=0;i<e.length;i++){var n=e[i];n.pane!==ka&&(n.min=o,n.max=r)}},e.prototype.filter=function(){var t=this.chart,e=this.options.select;if(t.requiresHandlers(["navigatorFilter"])){var o=this.mainAxis(),r={from:e.from,to:e.to};if("category"!==o.options.type){var i=new po(B({baseUnit:"fit"},t.options.categoryAxis[0],{categories:[e.from,e.to]}),t.chartService).options;r.from=ze(i.min,-i.baseUnitStep,i.baseUnit),r.to=ze(i.max,i.baseUnitStep,i.baseUnit)}this.chart.trigger("navigatorFilter",r)}},e.prototype._zoom=function(t){var e=this.chart._plotArea.categoryAxis,o=this.selection,r=this.options,i=r.select,n=r.liveDrag,s=this.mainAxis(),a=t.delta;if(o){var p=s.categoryIndex(o.options.from),l=s.categoryIndex(o.options.to),h=this.chart._eventCoordinates(t.originalEvent);t.originalEvent.preventDefault(),Math.abs(a)>1&&(a*=3),l-p>1?(o.zoom(a,h),this.readSelection()):(e.options.min=i.from,i.from=e.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),h).min),n&&(this.filterAxes(),this.redrawSlaves()),o.set(i.from,i.to),this.showHint(this.options.select.from,this.options.select.to)}},e.prototype._zoomEnd=function(t){this._dragEnd(t)},e.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},e.prototype._selectStart=function(t){return this.chart._selectStart(t)},e.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},e.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},e.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Sa]},e.prototype.select=function(t,e){var o=this.options.select;return t&&e&&(o.from=this.parseDate(t),o.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:o.from,to:o.to}},e.setup=function(t,o){if(void 0===t&&(t={}),void 0===o&&(o={}),!t.__navi){t.__navi=!0;var r=B({},o.navigator,t.navigator),i=t.panes=[].concat(t.panes),n=B({},r.pane,{name:ka});r.visible||(n.visible=!1,n.height=.1),i.push(n),e.attachAxes(t,r),e.attachSeries(t,r,o)}},e.attachAxes=function(t,e){var o=e.series||[],r=t.categoryAxis=[].concat(t.categoryAxis),i=t.valueAxis=[].concat(t.valueAxis),n=0===Li(o,ir).length,s=B({type:"date",pane:ka,roundToBaseUnit:!n,justified:n,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),a=e.categoryAxis;r.push(B({},s,{maxDateGroups:200},a,{name:Sa,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),B({},s,a,{name:Sa+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),B({},s,a,{name:Sa+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),i.push(B({name:Sa,pane:ka,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},e.attachSeries=function(t,e,o){for(var r=t.series=t.series||[],i=[].concat(e.series||[]),n=o.seriesColors,s=e.seriesDefaults,a=0;a<i.length;a++)r.push(B({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,i[a],{axis:Sa,categoryAxis:Sa,autoBind:e.autoBindElements}))},e}(k.Class),Oa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.applyDefaults=function(e,o){var r=Ct(this.element).width||600,i=o,n={seriesDefaults:{categoryField:e.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(r/28)}}};i&&(i=B({},i,n)),Pa.setup(e,i),t.prototype.applyDefaults.call(this,e,i)},e.prototype._setElementClass=function(t){w(t,"k-chart k-stockchart")},e.prototype.setOptions=function(e){this.destroyNavigator(),t.prototype.setOptions.call(this,e)},e.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},e.prototype._resize=function(){this.noTransitionsRedraw()},e.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},e.prototype._dirty=function(){var t=this.options,e=st([].concat(t.series,t.navigator.series),(function(t){return t&&t.visible})).length,o=this._seriesCount!==e;return this._seriesCount=e,o},e.prototype._fullRedraw=function(){var e=this.navigator;e||(e=this.navigator=new Pa(this),this.trigger("navigatorCreated",{navigator:e})),e.clean(),e.setRange(),t.prototype._redraw.call(this),e.initSelection()},e.prototype._trackSharedTooltip=function(e){var o=this._plotArea.paneByPoint(e);o&&o.options.name===ka?this._unsetActivePoint():t.prototype._trackSharedTooltip.call(this,e)},e.prototype.bindCategories=function(){t.prototype.bindCategories.call(this),this.copyNavigatorCategories()},e.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),o=0;o<e.length;o++){var r=e[o];r.name===Sa?t=r.categories:t&&r.pane===ka&&(r.categories=t)}},e.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},e.prototype.destroy=function(){this.destroyNavigator(),t.prototype.destroy.call(this)},e.prototype._stopChartHandlers=function(e){var o=this._eventCoordinates(e),r=this._plotArea.paneByPoint(o);return t.prototype._stopChartHandlers.call(this,e)||r&&r.options.name===ka},e.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e}(ua);jt(Oa,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!0},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});var Ma=Oa,Ta=Math.PI/180;function Ra(t,e){var o=t.getOrigin(),r=t.getSize(),i=V(e);return t.setOrigin([o.x-i.left,o.y-i.top]),t.setSize([r.width+(i.left+i.right),r.height+(i.top+i.bottom)]),t}var Ba=k.drawing.Group,Ia=k.drawing.Path,La=k.drawing.Text;function ja(t,e){var o=t.box,r=t.children[0].box,i=e.border||{},n=e.background||"",s=Ia.fromRect(new k.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),a=new La(t.text,new k.geometry.Point(r.x1,r.y1),{font:e.font,fill:{color:e.color}}),p=Ra(a.bbox().clone(),e.padding),l=Ia.fromRect(p,{stroke:{color:i.width?i.color:"",width:i.width,opacity:i.opacity,dashType:i.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),h=new Ba;return h.append(s),h.append(l),h.append(a),h}function Ea(t,e,o){var r=bt(t.from)?t.from:d,i=bt(t.to)?t.to:u;return t.from=Math.max(Math.min(i,r),e),t.to=Math.min(Math.max(i,r),o),t}function Da(t,e){var o=V(e);return o.left=-o.left,o.top=-o.top,o.right=-o.right,o.bottom=-o.bottom,Ra(t,o)}var Va=k.drawing.Path,za=k.drawing.Surface,Ua=function(t){function e(e,o,r,i){void 0===i&&(i={}),t.call(this),this.element=e,this.theme=r,this.contextService=new Q(this,i),this._originalOptions=B({},this.options,o),this.options=B({},this._originalOptions),this._initTheme(r),this.redraw()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},e.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},e.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},e.prototype.exportVisual=function(){return this._visuals},e.prototype.allValues=function(t){var e=this.pointers,o=[];if(0===arguments.length){for(var r=0;r<e.length;r++)o.push(e[r].value());return o}if(b(t))for(var i=0;i<t.length;i++)P(t[i])&&e[i].value(t[i]);this._setValueOptions(t)},e.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),o=[].concat(t),r=0;r<o.length;r++)e[r].value=o[r]},e.prototype.resize=function(){this.noTransitionsRedraw()},e.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},e.prototype.redraw=function(){var t=this._surfaceSize(),e=new k.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();var o=Da(e.bbox(),this._gaugeAreaMargin);this.reflow(o)},e.prototype.setOptions=function(t,e){this._originalOptions=B(this._originalOptions,t),this.options=B({},this._originalOptions),this._initTheme(e),this.redraw()},e.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},e.prototype.setIntlService=function(t){this.contextService.intl=t},e.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=B({},e,this.options);var o=this.options,r=o.pointer;if(b(r)){for(var i=[],n=0;n<r.length;n++)i.push(B({},e.pointer,r[n]));o.pointer=i}},e.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},r=new k.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,o.width>0&&(r=Da(r,o.width)),Va.fromRect(r,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},e.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),r=this._surfaceSize();Ct(o,r),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=za.create(o,{type:t.renderAs}))},e.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&B(e,t.gaugeArea),e},e.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},e.prototype.getSize=function(){return this._getSize()},e.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),o=t.offsetWidth,r=t.offsetHeight;return o||(o=e.width),r||(r=e.height),{width:o,height:r}},e.prototype._defaultSize=function(){return{width:200,height:200}},e.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},e}(k.Class);jt(Ua,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var Ha=Ua,Fa=k.drawing.Path,Na=k.drawing.Group,Ga=k.geometry.Point;function Wa(t,e){var o,r,i=t.position,n=t.tickX,s=t.tickY;return t.vertical?(o=new Ga(n,i),r=new Ga(n+e.size,i)):(o=new Ga(i,s),r=new Ga(i,s+e.size)),new Fa({stroke:{color:e.color,width:e.width}}).moveTo(o).lineTo(r)}function Xa(t,e,o,r){var i=e.length;if(r.visible)for(var n=o.mirror,s=o.lineBox,a=r.skip;a<i;a+=r.step)a%r.skipUnit!=0&&(o.tickX=n?s.x2:s.x2-r.size,o.tickY=n?s.y1-r.size:s.y1,o.position=e[a],t.append(Wa(o,r)))}var Ya=function(t){function e(e,o){var r=e||{};!bt(r.reverse)&&!1===r.vertical&&(o||{}).rtl&&(r=Object.assign({},r,{reverse:!0})),t.call(this,0,1,r,o),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=B({},this.options,t);return(e=B({},e,{labels:{mirror:e.mirror}})).majorUnit=e.majorUnit||Kt(e.min,e.max),e},e.prototype.initFields=function(){},e.prototype.render=function(){var t=this.elements=new Na,e=this.renderLabels(),o=this.renderLine(),r=this.renderTicks(),i=this.renderRanges();return t.append(o,e,r,i),t},e.prototype.renderRanges=function(){for(var t=this.options,e=t.min,o=t.max,r=t.vertical,i=t.labels.mirror,n=t.ranges||[],s=new Na,a=n.length,p=t.rangeSize||t.minorTicks.size/2,l=0;l<a;l++){var h=Ea(n[l],e,o),c=this.getSlot(h.from,h.to),u=r?this.lineBox():c,d=r?c:this.lineBox();r?u.x1-=p*(i?-1:1):d.y2+=p*(i?-1:1),s.append(Fa.fromRect(new k.geometry.Rect([u.x1,d.y1],[u.x2-u.x1,d.y2-d.y1]),{fill:{color:h.color,opacity:h.opacity},stroke:{}}))}return s},e.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new Na,r=0;r<t.length;r++)o.append(ja(t[r],e.labels));return o},e.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new Na;if(t.width>0&&t.visible){var r=new Fa({stroke:{color:t.color,dashType:t.dashType,width:t.width}});r.moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(r)}return o},e.prototype.renderTicks=function(){var t=new Na,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,r={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return Xa(t,this.getMajorTickPositions(),r,e.majorTicks),Xa(t,this.getMinorTickPositions(),r,B({},{skipUnit:o/e.minorUnit},e.minorTicks)),t},e}(yo);jt(Ya,{min:0,max:50,majorTicks:{size:15,align:"inside",color:n,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:n,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var qa=Ya,Ka=function(t){function e(e,o){t.call(this);var r=e.options,i=r.min,n=r.max,s=this.options=B({},this.options,o);s.fill=s.color,this.scale=e,bt(s.value)?s.value=Pt(s.value,i,n):s.value=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.value=function(t){var e=this.options,o=e.value;if(0===arguments.length)return o;var r=this.scale.options,i=r.min,n=r.max;e._oldValue=bt(e._oldValue)?e.value:i,e.value=Pt(t,i,n),this.elements&&this.repaint()},e}(k.Class);jt(Ka,{color:n});var Qa=Ka,Za=function(t){function e(e,o){t.call(this,e,o),this.options=B({track:{visible:bt(o.track)}},this.options)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(){var t,e,o,r=this.options,i=this.scale,n=i.options,s=n.mirror,a=n.vertical,p=i.lineBox(),l=r.track.size||r.size,h=r.size/2,c=V(r.margin),u=a?c[s?"left":"right"]:c[s?"bottom":"top"];u=s?-u:u,a?(o=new $t(p.x1+u,p.y1,p.x1+u,p.y2),s?o.x1-=l:o.x2+=l,"barPointer"!==r.shape&&(t=e=new $t(p.x2+u,p.y1-h,p.x2+u,p.y2+h))):(o=new $t(p.x1,p.y1-u,p.x2,p.y1-u),s?o.y2+=l:o.y1-=l,"barPointer"!==r.shape&&(t=e=new $t(p.x1-h,p.y1-u,p.x2+h,p.y1-u))),this.trackBox=o,this.pointerRangeBox=e,this.box=t||o.clone().pad(r.border.width)},e.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:bt(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},e.prototype._margin=function(){var t=this.scale,e=this.options,o=t.options,r=o.mirror,i=o.vertical,n=V(e.margin);return i?n[r?"left":"right"]:n[r?"bottom":"top"]},e}(Qa);jt(Za,{shape:"barPointer",track:{border:{width:1}},color:n,border:{width:1},opacity:1,margin:V(3),animation:{type:"barPointer"},visible:!0});var $a=Za,Ja=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.options,e=t.margin,o=t.from,r=t.to,i=t.vertical,n=i?"x1":"y1";t.mirror===i?(o[n]-=e,r[n]-=e):(o[n]+=e,r[n]+=e);var s=this.fromScale=new k.geometry.Point(o.x1,o.y1),a=this.toScale=new k.geometry.Point(r.x1,r.y1);0!==t.duration&&(t.duration=Math.max(s.distanceTo(a)/t.duration*1e3,1))},e.prototype.step=function(t){var e=ct(this.fromScale.x,this.toScale.x,t),o=ct(this.fromScale.y,this.toScale.y,t);this.element.transform(k.geometry.transform().translate(e,o))},e}(k.drawing.Animation);jt(Ja,{easing:"linear",duration:250}),k.drawing.AnimationFactory.current.register("arrowPointer",Ja);var tp=Ja,ep=k.geometry.Point,op=k.drawing.Path,rp=function(t){function e(e,o){t.call(this,e,o),bt(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointerShape=function(){var t=this.scale,e=this.options.size,o=e/2,r=t.options.mirror?-1:1;return t.options.vertical?[new ep(0,0-o),new ep(0-r*e,0),new ep(0,0+o)]:[new ep(0-o,0),new ep(0,0+r*e),new ep(0+o,0)]},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=new tp(this.elements,B(e.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:this._margin(e.margin),from:t.getSlot(e._oldValue),to:t.getSlot(e.value)}));!1===e.animation.transitions&&(o.options.duration=0),o.setup(),o.play()},e.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),r=this.pointerShape(e.value);e.animation.type="arrowPointer";var i=new op({stroke:o.stroke,fill:o.fill}).moveTo(r[0]).lineTo(r[1]).lineTo(r[2]).close(),n=t.getSlot(e.value);return i.transform(k.geometry.transform().translate(n.x1,n.y1)),this.elements=i,i},e}($a),ip=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?x:m,o=this.to=t.newPoints[0][e],r=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(o-r)/t.speed*1e3,1)),this._set(r)},e.prototype.step=function(t){var e=ct(this.from,this.to,t);this._set(e)},e.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)},e}(k.drawing.Animation);jt(ip,{easing:"linear",speed:250}),k.drawing.AnimationFactory.current.register("barPointer",ip);var np=ip,sp=k.drawing.Group,ap=k.drawing.Path,pp=function(t){function e(e,o){t.call(this,e,o),bt(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointerShape=function(t){var e=this.scale,o=this.options,r=e.options,i=r.mirror,n=r.vertical,s=i===n?-1:1,a=o.size*s,p=e.getSlot(e.options.min),l=e.getSlot(t),h=n?x:m,c=n?m:x,u=this._margin()*s,d=new k.geometry.Point;d[h]=p[h+"1"],d[c]=p[c+"1"];var f=new k.geometry.Point;f[h]=l[h+"1"],f[c]=l[c+"1"],n?(d.translate(u,0),f.translate(u,0)):(d.translate(0,u),f.translate(0,u));var g=f.clone(),y=d.clone();return n?(g.translate(a,0),y.translate(a,0)):(g.translate(0,a),y.translate(0,a)),[d,f,g,y]},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=this.pointerShape(e.value),r=this.pointerPath,i=this.pointerShape(e._oldValue);r.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close();var n=new np(r,B(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[i[1],i[2]],newPoints:[o[1],o[2]]}));!1===e.animation.transitions&&(n.options.duration=0),n.setup(),n.play()},e.prototype.render=function(){var t=new sp,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());var o=this.pointerPath=new ap({stroke:e.stroke,fill:e.fill});return t.append(o),this.elements=t,t},e.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},o=this.trackBox.clone().pad(e.width||0);return new ap.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},e}($a),lp=k.drawing.Group,hp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.pointers,o=t.origin.x,r=t.origin.y,i=new $t(o,r,o+t.width(),r+t.height());this.scale.reflow(i),this._shrinkScaleWidth(i);for(var n=0;n<e.length;n++)e[n].reflow();this.bbox=this._getBox(i),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},e.prototype._buildVisual=function(){var t=new lp,e=this.scale.render(),o=this.pointers;t.append(this.gaugeArea),t.append(e);for(var r=0;r<o.length;r++){var i=o[r];t.append(i.render()),i.value(i.options.value)}this._visuals=t},e.prototype._createModel=function(){var t=this.options,e=this.scale=new qa(t.scale,this.contextService);this.pointers=[];var o=t.pointer;o=b(o)?o:[o];for(var r=0;r<o.length;r++){var i=B({},o[r],{animation:{transitions:t.transitions}}),n="arrow"===i.shape?rp:pp;this.pointers.push(new n(e,i))}},e.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},e.prototype._getBox=function(t){for(var e,o=this.scale,r=this.pointers,i=t.center(),n=r[0].box.clone().wrap(o.box),s=0;s<r.length;s++)n.wrap(r[s].box.clone());return o.options.vertical?(e=n.width()/2,n=new $t(i.x-e,t.y1,i.x+e,t.y2)):(e=n.height()/2,n=new $t(t.x1,i.y-e,t.x2,i.y+e)),n},e.prototype._alignElements=function(){for(var t,e=this.scale,o=this.pointers,r=e.box,i=o[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<o.length;s++)i.wrap(o[s].box.clone());e.options.vertical?(t=n.center().x-i.center().x,e.reflow(new $t(r.x1+t,n.y1,r.x2+t,n.y2))):(t=n.center().y-i.center().y,e.reflow(new $t(r.x1,r.y1+t,r.x2,r.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},e.prototype._shrinkScaleWidth=function(t){var e=this.scale;if(!e.options.vertical){var o=e.contentBox().width()-t.width();o>0&&(e.box.shrink(o,0),e.box.alignTo(t,"center"),e.reflow(e.box))}},e.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,o=t.box.clone(),r=t.options.vertical?"y":"x",i=e[0].box,n=0;n<e.length;n++)i.wrap(e[n].box.clone());o[r+1]+=Math.max(o[r+1]-i[r+1],0),o[r+2]-=Math.max(i[r+2]-o[r+2],0),t.reflow(o);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},e}(Ha);jt(hp,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var cp=hp,up=k.drawing.Arc,dp=k.drawing.Path,fp=k.drawing.Group;function gp(t,e,o,r){var i=new fp,n=t.center,s=t.getRadiusX();if(r.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),l=new k.geometry.Point(n.x+s-r.size,n.y).rotate(e[a],n);i.append(new dp({stroke:{color:r.color,width:r.width}}).moveTo(p).lineTo(l))}return i}function yp(t,e,o,r){return{from:t,to:e,color:o,opacity:r}}var vp=function(t){function e(e,o){t.call(this,0,1,e,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=B({},this.options,t);return e.majorUnit=e.majorUnit||Kt(e.min,e.max),e.minorUnit=e.minorUnit||e.majorUnit/10,e},e.prototype.initFields=function(){},e.prototype.render=function(t,e){var o=this.renderArc(t,e);this.bbox=o.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},e.prototype.reflow=function(t){var e=t.center(),o=Math.min(t.height(),t.width())/2;if(!bt(this.bbox))return this.render(e,o);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},e.prototype.slotAngle=function(t){var e=this.options,o=e.min,r=e.max,i=e.reverse,n=e.startAngle,s=e.endAngle,a=s-n;return(i?s-(t-o)/(r-o)*a:(t-o)/(r-o)*a+n)+180},e.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},e.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,o=t.minorTicks,r=0;return e.visible&&(r=e.size),o.visible&&(r=Math.max(o.size,r)),r},e.prototype.labelsCount=function(){var e=t.prototype.labelsCount.call(this),o=this.options;return o.endAngle-o.startAngle>=360&&o.max%o.majorUnit==0&&(e-=1),e},e.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),o=e.getRadiusX(),r=this.tickAngles(e,t.majorUnit),i=t.rangeSize=t.rangeSize||.1*o,n=new fp,s=.05*o;bt(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,p="inside"===a.position,l=bt(this.labelElements);p&&(o-=this.ticksSize(),this.hasRanges()&&!l&&(o-=i+s),e.setRadiusX(o).setRadiusY(o));for(var h=this.labels,c=h.length,u=V(a.padding),d=(u.left+u.right)/2,f=(u.top+u.bottom)/2,g=0;g<c;g++){var y=h[g],v=y.box.width()/2,m=y.box.height()/2,x=r[g],b=(x-180)*Ta,w=e.pointAt(x),_=w.x+Math.cos(b)*(v+d)*(p?1:-1),C=w.y+Math.sin(b)*(m+f)*(p?1:-1);y.reflow(new $t(_-v,C-m,_+v,C+m));var S=new k.geometry.Point(y.box.x1,y.box.y1),A=void 0;if(l){var P=(A=this.labelElements.children[g]).bbox().origin,O=A.transform()||k.geometry.transform();O.translate(S.x-P.x,S.y-P.y),A.transform(O)}else A=ja(y,t.labels),n.append(A);this.bbox=k.geometry.Rect.union(this.bbox,A.bbox())}return n},e.prototype.repositionRanges=function(){var t=this.ranges.children;if(t.length>0){var e=this.options,o=e.rangeDistance,r=e.rangeSize,i=this.getRangeRadius();"inside"===this.options.labels.position&&(i+=r+o);for(var n=i+r/2,s=0;s<t.length;s++)t[s]._geometry.setRadiusX(n).setRadiusY(n);this.bbox=k.geometry.Rect.union(this.bbox,this.ranges.bbox())}},e.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new fp;if(e){var r=this.options,i=r.rangeSize,n=r.reverse,s=r.rangeDistance,a=this.getRangeRadius();this.radius(this.radius()-i-s);for(var p=0;p<e;p++){var l=t[p],h=this.slotAngle(l[n?"to":"from"]),c=this.slotAngle(l[n?"from":"to"]);c-h!=0&&o.append(this.createRange(h,c,a,l))}}return o},e.prototype.createRange=function(t,e,o,r){var i=this.options.rangeSize,n=new k.geometry.Arc(this.arc.center,{radiusX:o+i/2,radiusY:o+i/2,startAngle:t,endAngle:e});return new up(n,{stroke:{width:i,color:r.color,opacity:r.opacity,lineCap:r.lineCap}})},e.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],o=e.length,r=[];if(o){var i=t.min,n=t.max,s=t.rangePlaceholderColor;r.push(yp(i,n,s));for(var a=0;a<o;a++)for(var p=Ea(e[a],i,n),l=r.length,h=0;h<l;h++){var c=r[h];if(c.from<=p.from&&p.from<=c.to){r.push(yp(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&r.push(yp(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return r},e.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,o=e.rangeSize,r=e.rangeDistance,i=e.majorTicks.size;return"outside"===e.labels.position?t.getRadiusX()-i-r-o:t.getRadiusX()-o},e.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new k.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+180,endAngle:o.endAngle+180})},e.prototype.renderTicks=function(){var t=this.arc,e=this.options,o=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=gp(o,this.majorTickAngles,e.majorUnit,e.majorTicks);var r=new fp;r.append(this.majorTicks);var i=e.majorTicks.size,n=e.minorTicks.size;if(this._tickDifference=i-n,"outside"===e.labels.position){var s=o.getRadiusX();o.setRadiusX(s-i+n).setRadiusY(s-i+n)}return this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=gp(o,this.minorTickAngles,e.minorUnit,e.minorTicks),r.append(this.minorTicks),r},e.prototype.normalizeTickAngles=function(t){for(var e=this.options,o=e.majorUnit/e.minorUnit,r=t.length-1;r>=0;r--)r%o==0&&t.splice(r,1);return t},e.prototype.tickAngles=function(t,e){var o=this.options,r=o.reverse,i=o.max-o.min,n=t.endAngle-t.startAngle,s=i/e,a=t.startAngle,p=n/s;r&&(a+=n,p=-p),n>=360&&o.max%e==0&&(s-=1);for(var l=[],h=0;h<s;h++)l.push(Tt(a,3)),a+=p;return Tt(a)<=t.endAngle&&l.push(a),l},e.prototype.radius=function(t){if(!t)return this.arc.getRadiusX();this.arc.setRadiusX(t).setRadiusY(t),this.repositionTicks(this.majorTicks.children,this.majorTickAngles),this.repositionTicks(this.minorTicks.children,this.minorTickAngles,!0)},e.prototype.repositionTicks=function(t,e,o){var r=o&&this._tickDifference||0,i=this.arc,n=i.getRadiusX();o&&"outside"===this.options.labels.position&&0!==r&&(i=this.arc.clone()).setRadiusX(n-r).setRadiusY(n-r);for(var s=0;s<t.length;s++){var a=i.pointAt(e[s]),p=t[s].segments,l=a.x-p[0].anchor().x,h=a.y-p[0].anchor().y;t[s].transform((new k.geometry.transform).translate(l,h))}},e}(yo);jt(vp,{min:0,max:100,majorTicks:{size:15,align:"inside",color:n,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:n,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var mp=vp,xp=function(t){function e(e,o){t.call(this,e,o);var r=this.options;r.duration=Math.max(Math.abs(r.newAngle-r.oldAngle)/r.duration*1e3,1)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this.options,o=ct(e.oldAngle,e.newAngle,t);this.element.transform(k.geometry.transform().rotate(o,e.center))},e}(k.drawing.Animation);jt(xp,{easing:"linear",duration:150}),k.drawing.AnimationFactory.current.register("radialPointer",xp);var bp=xp,wp=k.drawing.Circle,_p=k.drawing.Group,Cp=k.drawing.Path,kp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setAngle=function(t){this.elements.transform(k.geometry.transform().rotate(t,this.center))},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),r=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(r):new bp(this.elements,B(e.animation,{oldAngle:o,newAngle:r})).play()},e.prototype.render=function(){var t=this.scale,e=this.options,o=new _p;return!1!==e.animation&&B(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle(Ta),o},e.prototype.reflow=function(t){var e=this.center=t.center,o=Pt(this.options.length||1,.1,1.5),r=this.radius=t.getRadiusX()*o,i=this.capSize=Math.round(r*this.options.cap.size);this.bbox=k.geometry.Rect.fromPoints(new k.geometry.Point(e.x-i,e.y-i),new k.geometry.Point(e.x+i,e.y+i))},e.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,r=new Cp({fill:{color:o},stroke:{color:o,width:.5}});return r.moveTo(e.x+this.radius-t,e.y).lineTo(e.x,e.y-this.capSize/2).lineTo(e.x,e.y+this.capSize/2).close(),r},e.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,o=new k.geometry.Circle(this.center,this.capSize);return new wp(o,{fill:{color:e},stroke:{color:e}})},e}(Qa);jt(kp,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var Sp=kp,Ap=k.drawing.Group,Pp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var o=0;o<e.length;o++)e[o].reflow(this.scale.arc),this._initialPlotArea=k.geometry.Rect.union(this._initialPlotArea,e[o].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},e.prototype._buildVisual=function(t,e,o){var r=this._visuals=new Ap;r.append(t),r.append(o.ticks),r.append(o.ranges),this._buildPointers(e),r.append(o.labelElements)},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),this._visuals.append(o.elements),o.value(o.options.value)}},e.prototype.fitScale=function(t){for(var e,o,r,i,n,s=this.scale.arc,a=this._initialPlotArea,p=Math.abs(this.getDiff(a,t)),l=Tt(p,3),h=Tt(-p,3),c=0,u=0;!(!(u++<100)||(c=n===r?c+1:0)>5||l!==i&&0<=(e=this.getPlotBox(l,t,s))&&e<=2||h!==i&&0<=(r=this.getPlotBox(h,t,s))&&r<=2||(i=e>0&&r>0?2*l:e<0&&r<0?2*h:Tt((l+h)/2||1,3),0<=(o=this.getPlotBox(i,t,s))&&o<=2));)n=r,o>0?(h=i,r=o):(l=i,e=o)},e.prototype.getPlotBox=function(t,e,o){var r=this.scale,i=this.pointers,n=o.getRadiusX(),s=o.clone();s.setRadiusX(n+t).setRadiusY(n+t),r.arc=s,r.reflow(e),this.plotBbox=r.bbox;for(var a=0;a<i.length;a++)i[a].reflow(s),this.plotBbox=k.geometry.Rect.union(this.plotBbox,i[a].bbox);return this.getDiff(this.plotBbox,e)},e.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},e.prototype.alignScale=function(t){var e=this.plotBbox.center(),o=t.center(),r=e.x-o.x,i=e.y-o.y,n=this.scale,s=this.pointers;n.arc.center.x-=r,n.arc.center.y-=i,n.reflow(t);for(var a=0;a<s.length;a++)s[a].reflow(n.arc),this.plotBbox=k.geometry.Rect.union(n.bbox,s[a].bbox)},e.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new mp(t.scale,this.contextService);this.pointers=[];for(var r=b(e)?e:[e],i=0;i<r.length;i++){var n=new Sp(o,B({},r[i],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e}(Ha);jt(Pp,{transitions:!0,gaugeArea:{background:""}});var Op=Pp,Mp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},e.prototype.hasRanges=function(){return!0},e.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},e.prototype.addRange=function(t,e,o){var r=this.options.reverse,i=this.slotAngle(r?e:t),n=this.slotAngle(r?t:e),s=this.createRange(i,n,this.getRangeRadius(),o);return this.ranges.append(s),s},e}(mp);jt(Mp,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var Tp=Mp,Rp=function(t){function e(e,o){t.call(this,e,o);var r=this.options,i=Math.abs(r.newAngle-r.oldAngle)/r.duration*1e3;r.duration=Pt(i,150,800);var n=e.elements.options.get("stroke.color"),s=e.currentColor();n!==s&&(this.startColor=new k.Color(n),this.color=new k.Color(s))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this.options,o=this.startColor,r=this.color,i=ct(e.oldAngle,e.newAngle,t);if(this.element.angle(i),r){var n=Tt(ct(o.r,r.r,t)),s=Tt(ct(o.g,r.g,t)),a=Tt(ct(o.b,r.b,t));this.element.stroke(new k.Color(n,s,a).toHex())}},e}(k.drawing.Animation);jt(Rp,{easing:"linear",duration:150}),k.drawing.AnimationFactory.current.register("radialRangePointer",Rp);var Bp=Rp,Ip=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),r=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(r),this.stroke(this.currentColor())):(this.animation=new Bp(this,B(e.animation,{oldAngle:o,newAngle:r})),this.animation.play())},e.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},e.prototype.stroke=function(t){this.elements.stroke(t)},e.prototype.render=function(){if(!this.elements){var t=this.scale,e=this.options;!1!==e.animation&&B(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),this.elements=t.addRange(t.options.min,this.options.value,{color:this.currentColor(),opacity:e.opacity,lineCap:t.options.rangeLineCap})}},e.prototype.currentColor=function(){var t=this.scale.options,e=t.min,o=t.max,r=this.options,i=r.colors,n=r.color,s=r.value,a=P(s)?s:e;if(i)for(var p=0;p<i.length;p++){var l=i[p],h=l.color,c=l.from;void 0===c&&(c=e);var u=l.to;if(void 0===u&&(u=o),c<=a&&a<=u)return h}return n},e.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e}(Qa);jt(Ip,{animation:{type:"radialRangePointer",duration:150}});var Lp=Ip,jp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initTheme=function(e){t.prototype._initTheme.call(this,e),this.options.color=this.options.color||(this.theme.pointer||{}).color},e.prototype._createModel=function(){var t=this.options,e=this.scale=new Tp(t.scale,this.contextService),o=new Lp(e,B({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[o]},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.options.value)}},e.prototype._setValueOptions=function(t){this.options.value=t},e.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},e.prototype.centerLabelPosition=function(t,e){var o=this.getSize(),r=this.scale.arc.center,i=r.x-t/2,n=r.y-e/2;if(t<o.width){var s=i+t;i=Math.max(i,0),s>o.width&&(i-=s-o.width)}if(e<o.height){var a=this.scale.bbox,p=a.bottomRight().y,l=n+e;n=Math.max(n,a.origin.y),l>p&&(n-=l-p)}return{left:i,top:n}},e}(Op),Ep=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._createModel=function(){var e=this.options.scale;"number"!=typeof e.startAngle&&(e.startAngle=90),e.endAngle=e.startAngle+360,t.prototype._createModel.call(this)},e}(jp),Dp=function(t){function e(e){t.call(this),this.setOptions(e),this.initProperties()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){},e.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},e.prototype.encode=function(t,e,o){var r=bt(t)?String(t):t;return this.initValue(r,e,o),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},e.prototype.initValue=function(){},e.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},e.prototype.addData=function(){},e.prototype.invalidCharacterError=function(t){throw new Error("Character '"+t+"' is not valid for symbology "+this.name)},e}(k.Class);jt(Dp,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Vp=Object.assign,zp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Vp(this,{name:"Code 11",characterMap:["111121","211121","121121","221111","112121","212111","122111","111221","211211","211111","112111"],cCheckSumTotal:10,kCheckSumTotal:9,kCheckSumMinLength:10,checkSumMod:11,DASH_VALUE:10,DASH:"-",START:"112211",STOP:"11221"})},e.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},e.prototype.addCheckSum=function(){var t=this.value,e=t.length,o=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;if(this.checksum=String(o),this.addPattern(this.characterMap[o]),++e>=this.kCheckSumMinLength){var r=(o+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod;this.checksum+=r,this.addPattern(this.characterMap[r])}},e.prototype.getWeightedSum=function(t,e,o){for(var r=0,i=0;i<t.length;i++)r+=this.weightedValue(this.getValue(t.charAt(i)),e,i,o);return r},e.prototype.weightedValue=function(t,e,o,r){return((e-o)%r||r)*t},e.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},e.prototype.addCharacter=function(t){var e=this.getValue(t),o=this.characterMap[e];this.addPattern(o)},e.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e),this.totalUnits+=e},e}(Dp);jt(zp,{addCheckSum:!0});var Up=Object.assign,Hp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Up(this,{minBaseUnitLength:.7})},e.prototype.addData=function(){var t=this.value;this.addStart();for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.pushCheckSum(),this.addStop(),this.prepareValues()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},e.prototype.addBase=function(){},e}(Dp),Fp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Up(this,{name:"Code 39",checkSumMod:43,minRatio:2.5,maxRatio:3,gapWidth:1,splitCharacter:"|",patternMappings:{b:"1|",w:"1|",B:"ratio|",W:"ratio|"},characterMap:{0:{pattern:"bwbWBwBwb",value:0},1:{pattern:"BwbWbwbwB",value:1},2:{pattern:"bwBWbwbwB",value:2},3:{pattern:"BwBWbwbwb",value:3},4:{pattern:"bwbWBwbwB",value:4},5:{pattern:"BwbWBwbwb",value:5},6:{pattern:"bwBWBwbwb",value:6},7:{pattern:"bwbWbwBwB",value:7},8:{pattern:"BwbWbwBwb",value:8},9:{pattern:"bwBWbwBwb",value:9},A:{pattern:"BwbwbWbwB",value:10},B:{pattern:"bwBwbWbwB",value:11},C:{pattern:"BwBwbWbwb",value:12},D:{pattern:"bwbwBWbwB",value:13},E:{pattern:"BwbwBWbwb",value:14},F:{pattern:"bwBwBWbwb",value:15},G:{pattern:"bwbwbWBwB",value:16},H:{pattern:"BwbwbWBwb",value:17},I:{pattern:"bwBwbWBwb",value:18},J:{pattern:"bwbwBWBwb",value:19},K:{pattern:"BwbwbwbWB",value:20},L:{pattern:"bwBwbwbWB",value:21},M:{pattern:"BwBwbwbWb",value:22},N:{pattern:"bwbwBwbWB",value:23},O:{pattern:"BwbwBwbWb",value:24},P:{pattern:"bwBwBwbWb",value:25},Q:{pattern:"bwbwbwBWB",value:26},R:{pattern:"BwbwbwBWb",value:27},S:{pattern:"bwBwbwBWb",value:28},T:{pattern:"bwbwBwBWb",value:29},U:{pattern:"BWbwbwbwB",value:30},V:{pattern:"bWBwbwbwB",value:31},W:{pattern:"BWBwbwbwb",value:32},X:{pattern:"bWbwBwbwB",value:33},Y:{pattern:"BWbwBwbwb",value:34},Z:{pattern:"bWBwBwbwb",value:35},"-":{pattern:"bWbwbwBwB",value:36},".":{pattern:"BWbwbwBwb",value:37}," ":{pattern:"bWBwbwBwb",value:38},$:{pattern:"bWbWbWbwb",value:39},"/":{pattern:"bWbWbwbWb",value:40},"+":{pattern:"bWbwbWbWb",value:41},"%":{pattern:"bwbWbWbWb",value:42},START:{pattern:"bWbwBwBwb"}}})},e.prototype.initValue=function(t,e,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},e.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,o=this.minRatio,r=Math.max(.15*this.width,24),i=this.maxRatio;if(this.height<r)throw new Error("Insufficient Height. The minimum height for value: "+this.value+" is: "+r);for(t=this.getBaseUnit(i);t<e&&i>o;)i=parseFloat((i-.1).toFixed(1)),t=this.getBaseUnit(i);if(t<e){var n=Math.ceil(this.getBaseWidth(o)*e);throw new Error("Insufficient width. The minimum width for value: "+this.value+" is: "+n)}this.ratio=i,this.baseUnit=t,this.patternString=this.patternString.substring(0,this.patternString.length-1),this.pattern=this.pattern.concat(this.patternString.replace(/ratio/g,i).split(this.splitCharacter))},e.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},e.prototype.getBaseWidth=function(t){var e=3*(t+2);return this.quietZoneLength+e*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},e.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},e.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},e.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},e.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},e.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},e}(Hp);jt(Fp,{addCheckSum:!1});var Np={addCharacter:function(t){this.characterMap[t]?this.addBase(this.characterMap[t]):t.charCodeAt(0)>127?this.invalidCharacterError(t):this.addExtended(t.charCodeAt(0))},addExtended:function(t){for(var e,o=0;o<this.extendedMappings.length;o++)if(e=this.extendedMappings[o].call(this,t)){for(var r=0;r<e.length;r++){var i=e[r];this.addBase(i)}return void(this.dataLength+=e.length-1)}},extendedMappings:[function(t){if(97<=t&&t<=122)return[this.characterMap[this.shiftCharacters[0]],this.characterMap[String.fromCharCode(t-32)]]},function(t){if(33<=t&&t<=58)return[this.characterMap[this.shiftCharacters[1]],this.characterMap[String.fromCharCode(t+32)]]},function(t){if(1<=t&&t<=26)return[this.characterMap[this.shiftCharacters[2]],this.characterMap[String.fromCharCode(t+64)]]},function(t){var e,o;if(this.specialAsciiCodes[t]){e=[];for(var r=0;r<this.specialAsciiCodes[t].length;r++)e.push(this.characterMap[this.shiftCharacters[3]]),e.push(this.characterMap[this.specialAsciiCodes[t][r]])}else o=6*Math.floor(t/32)+(t-27)%32+64,e=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(o)]];return e}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]},Gp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),B(this,Np,{name:"Code 39 extended",characterMap:{SHIFT0:{pattern:"bWbwbWbWb",value:41},SHIFT1:{pattern:"bWbWbwbWb",value:40},SHIFT2:{pattern:"bWbWbWbwb",value:39},SHIFT3:{pattern:"bwbWbWbWb",value:42}}})},e}(Fp),Wp=Object.assign,Xp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Wp(this,{name:"Code 93",cCheckSumTotal:20,kCheckSumTotal:15,checkSumMod:47,characterMap:{0:{pattern:"131112",value:0},1:{pattern:"111213",value:1},2:{pattern:"111312",value:2},3:{pattern:"111411",value:3},4:{pattern:"121113",value:4},5:{pattern:"121212",value:5},6:{pattern:"121311",value:6},7:{pattern:"111114",value:7},8:{pattern:"131211",value:8},9:{pattern:"141111",value:9},A:{pattern:"211113",value:10},B:{pattern:"211212",value:11},C:{pattern:"211311",value:12},D:{pattern:"221112",value:13},E:{pattern:"221211",value:14},F:{pattern:"231111",value:15},G:{pattern:"112113",value:16},H:{pattern:"112212",value:17},I:{pattern:"112311",value:18},J:{pattern:"122112",value:19},K:{pattern:"132111",value:20},L:{pattern:"111123",value:21},M:{pattern:"111222",value:22},N:{pattern:"111321",value:23},O:{pattern:"121122",value:24},P:{pattern:"131121",value:25},Q:{pattern:"212112",value:26},R:{pattern:"212211",value:27},S:{pattern:"211122",value:28},T:{pattern:"211221",value:29},U:{pattern:"221121",value:30},V:{pattern:"222111",value:31},W:{pattern:"112122",value:32},X:{pattern:"112221",value:33},Y:{pattern:"122121",value:34},Z:{pattern:"123111",value:35},"-":{pattern:"121131",value:36},".":{pattern:"311112",value:37}," ":{pattern:"311211",value:38},$:{pattern:"321111",value:39},"/":{pattern:"112131",value:40},"+":{pattern:"113121",value:41},"%":{pattern:"211131",value:42},SHIFT0:{pattern:"122211",value:46},SHIFT1:{pattern:"311121",value:45},SHIFT2:{pattern:"121221",value:43},SHIFT3:{pattern:"312111",value:44},START:{pattern:"111141"},TERMINATION_BAR:"1"}})},e.prototype.initValue=function(t,e,o){this.value=t,this.width=e,this.height=o,this.pattern=[],this.values=[],this.dataLength=t.length},e.prototype.prepareValues=function(){var t=Math.max(.15*this.width,24);if(this.height<t)throw new Error("Insufficient Height");if(this.setBaseUnit(),this.baseUnit<this.minBaseUnitLength)throw new Error("Insufficient Width")},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},e.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},e.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},e.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},e.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var o=0;o<e.length;o++)t=this.characterMap[this._findCharacterByValue(e[o])],this.addPattern(t.pattern)},e.prototype._getCheckValues=function(){var t,e,o=this.values,r=o.length,i=0;for(e=r-1;e>=0;e--)i+=this.weightedValue(o[e],r-e,this.cCheckSumTotal);for(t=i%this.checkSumMod,i=this.weightedValue(t,1,this.kCheckSumTotal),e=r-1;e>=0;e--)i+=this.weightedValue(o[e],r-e+1,this.kCheckSumTotal);return[t,i%this.checkSumMod]},e.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},e.prototype.weightedValue=function(t,e,o){return(e%o||o)*t},e.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)},e}(Hp),Yp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),B(this,Np,{name:"Code 93 extended",pushCheckSum:function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var o=0;o<e.length;o++)if(t=e[o],this.shiftValuesAsciiCodes[t])this.addExtended(this.shiftValuesAsciiCodes[t]);else{var r=this._findCharacterByValue(t);this.addPattern(this.characterMap[r].pattern)}}})},e}(Xp),qp=/^\d+$/,Kp=Object.assign,Qp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Kp(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},e.prototype.initValue=function(t,e,o){this.height=o,this.width=e,this.baseHeight=o/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.START),this.pattern.pop()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},e.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},e.prototype.validate=function(t){if(qp.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!ht(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(","))},e.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=this.height-this.baseHeight*t.charAt(o),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},e}(Dp),Zp=/^\d+$/,$p=/^[a-z0-9]+$/i,Jp=Object.assign,tl=function(t){function e(e){t.call(this),this.encoding=e,this.initProperties()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){},e.prototype.addStart=function(){},e.prototype.is=function(){},e.prototype.isCode=function(){return!1},e.prototype.move=function(){},e.prototype.pushState=function(){},e}(k.Class),el=function(t){function e(e,o){t.call(this,e),this.states=o,this._initMoves(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),B(this,{FNC4:"FNC4",SHIFT:98})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var o=t.charCodeAt(e);return this.isCode(o)},e.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},e.prototype.pushState=function(t){var e,o=this.states,r=t.value,i=r.length;if(ht("C",o)){var n=r.substr(t.index).match(/\d{4,}/g);n&&(i=r.indexOf(n[0],t.index))}for(;(e=t.value.charCodeAt(t.index))>=0&&this.isCode(e)&&t.index<i;)this.encoding.addPattern(this.getValue(e)),t.index++},e.prototype._initMoves=function(t){this._moves=[],ht(this.FNC4,t)&&this._moves.push(this._moveFNC),ht(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},e.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},e.prototype._shiftState=function(t){if(t.previousState===this.shiftKey&&(t.index+1>=t.value.length||this.encoding[this.shiftKey].is(t.value,t.index+1)))return this.encoding.addPattern(this.SHIFT),t.shifted=!0,!0},e.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},e}(tl),ol={};ol.A=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Jp(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},e.prototype.isCode=function(t){return 0<=t&&t<96},e.prototype.getValue=function(t){return t<32?t+64:t-32},e}(el),ol.B=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Jp(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},e.prototype.isCode=function(t){return 32<=t&&t<128},e.prototype.getValue=function(t){return t-32},e}(el),ol.C=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Jp(this,{key:"C",MOVE:99,START:105})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var o=ll(t,e,4);return(e+4<=t.length||2===t.length)&&Zp.test(o)},e.prototype.move=function(){this.encoding.addPattern(this.MOVE)},e.prototype.pushState=function(t){for(var e;(e=ll(t.value,t.index,2))&&Zp.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},e.prototype.getValue=function(t){return t},e}(tl),ol.FNC4=function(t){function e(e,o){t.call(this,e),this._initSubStates(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Jp(this,{key:"FNC4",dependentStates:["A","B"]})},e.prototype.addStart=function(t){var e=t.value.charCodeAt(0)-128,o=this._getSubState(e);this.encoding[o].addStart()},e.prototype.is=function(t,e){var o=t.charCodeAt(e);return this.isCode(o)},e.prototype.isCode=function(t){return 128<=t&&t<256},e.prototype.pushState=function(t){var e,o=this._initSubState(t),r=this.encoding,i=o.value.length;if(t.index+=i,i<3)for(;o.index<i;o.index++)e=o.value.charCodeAt(o.index),o.state=this._getSubState(e),o.previousState!==o.state&&(o.previousState=o.state,r[o.state].move(o)),r.addPattern(r[o.state].MOVE),r.addPattern(r[o.state].getValue(e));else o.state!==o.previousState&&r[o.state].move(o),this._pushStart(o),r.pushData(o,this.subStates),t.index<t.value.length&&this._pushStart(o);t.fnc=!0,t.state=o.state},e.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},e.prototype._initSubState=function(t){var e={value:this._getAll(t.value,t.index),index:0};return e.state=this._getSubState(e.value.charCodeAt(0)),e.previousState=t.previousState===this.key?e.state:t.previousState,e},e.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)ht(t[e],this.dependentStates)&&this.subStates.push(t[e])},e.prototype._getSubState=function(t){for(var e=0;e<this.subStates.length;e++)if(this.encoding[this.subStates[e]].isCode(t))return this.subStates[e]},e.prototype._getAll=function(t,e){for(var o,r="",i=e;(o=t.charCodeAt(i++))&&this.isCode(o);)r+=String.fromCharCode(o-128);return r},e}(tl),ol.FNC1=function(t){function e(e,o){t.call(this,e),this.states=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Jp(this,{key:"FNC1",startState:"C",startAI:"(",endAI:")",dependentStates:["C","B"],applicationIdentifiers:{22:{max:29,type:"alphanumeric"},402:{length:17},7004:{max:4,type:"alphanumeric"},242:{max:6,type:"alphanumeric"},8020:{max:25,type:"alphanumeric"},703:{min:3,max:30,type:"alphanumeric"},8008:{min:8,max:12,type:"alphanumeric"},253:{min:13,max:17,type:"alphanumeric"},8003:{min:14,max:30,type:"alphanumeric"},multiKey:[{ids:["15","17","8005","8100"],ranges:[[11,13],[310,316],[320,336],[340,369]],type:{length:6}},{ids:["240","241","250","251","400","401","403","7002","8004","8007","8110"],ranges:[[-9]],type:{max:30,type:"alphanumeric"}},{ids:["7001"],ranges:[[410,414]],type:{length:13}},{ids:["10","21","254","420","8002"],type:{max:20,type:"alphanumeric"}},{ids:["00","8006","8017","8018"],type:{length:18}},{ids:["01","02","8001"],type:{length:14}},{ids:["422"],ranges:[[424,426]],type:{length:3}},{ids:["20","8102"],type:{length:2}},{ids:["30","37"],type:{max:8,type:"alphanumeric"}},{ids:["390","392"],type:{max:15,type:"alphanumeric"}},{ids:["421","423"],type:{min:3,max:15,type:"alphanumeric"}},{ids:["391","393"],type:{min:3,max:18,type:"alphanumeric"}},{ids:["7003","8101"],type:{length:10}}]},START:102})},e.prototype.addStart=function(){this.encoding[this.startState].addStart()},e.prototype.is=function(){return ht(this.key,this.states)},e.prototype.pushState=function(t){var e,o,r,i=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,p={state:this.startState};i.addPattern(this.START);for(;;){if(p.index=0,(e=(r=n.charAt(a)===this.startAI?2:0)>0?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)o=a+r+e.id.length+e.ai.length;else if((o=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+r<n.length)throw new Error("Separators are required after variable length identifiers");o=n.length}if(p.value=n.substring(a,o).replace(s,""),this.validate(e,p.value),i.pushData(p,this.dependentStates),o>=n.length)break;a=o,p.state!==this.startState&&(i[this.startState].move(p),p.state=this.startState),e.ai.length||i.addPattern(this.START)}t.index=t.value.length},e.prototype.validate=function(t,e){var o=e.substr(t.id.length),r=t.ai;if(!r.type&&!Zp.test(o))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===r.type&&!$p.test(o))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(r.length&&r.length!==o.length)throw new Error("Application identifier "+t.id+" must be "+r.length+" characters long.");if(r.min&&r.min>o.length)throw new Error("Application identifier "+t.id+" must be at least "+r.min+" characters long.");if(r.max&&r.max<o.length)throw new Error("Application identifier "+t.id+" must be at most "+r.max+" characters long.")},e.prototype.getByLength=function(t,e){for(var o,r,i=2;i<=4;i++)if(o=ll(t,e,i),r=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:r};this.unsupportedAIError(o)},e.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},e.prototype.getBySeparator=function(t,e){var o=t.indexOf(this.startAI,e),r=t.indexOf(this.endAI,o),i=t.substring(o+1,r),n=this.getApplicationIdentifier(i)||this.getApplicationIdentifier(i.substr(i.length-1));return n||this.unsupportedAIError(i),{ai:n,id:i}},e.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,o=e.multiKey;if(e[t])return e[t];for(var r=0;r<o.length;r++){if(o[r].ids&&ht(t,o[r].ids))return o[r].type;if(o[r].ranges)for(var i=o[r].ranges,n=0;n<i.length;n++)if(i[n][0]<=t&&t<=i[n][1])return o[r].type}},e}(tl);var rl=function(t){function e(e){t.call(this,e),this._initStates()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Jp(this,{characterMap:[212222,222122,222221,121223,121322,131222,122213,122312,132212,221213,221312,231212,112232,122132,122231,113222,123122,123221,223211,221132,221231,213212,223112,312131,311222,321122,321221,312212,322112,322211,212123,212321,232121,111323,131123,131321,112313,132113,132311,211313,231113,231311,112133,112331,132131,113123,113321,133121,313121,211331,231131,213113,213311,213131,311123,311321,331121,312113,312311,332111,314111,221411,431111,111224,111422,121124,121421,141122,141221,112214,112412,122114,122411,142112,142211,241211,221114,413111,241112,134111,111242,121142,121241,114212,124112,124211,411212,421112,421211,212141,214121,412121,111143,111341,131141,114113,114311,411113,411311,113141,114131,311141,411131,211412,211214,211232,2331112],STOP:106})},e.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new ol[this.states[t]](this,this.states)},e.prototype.initValue=function(t,e,o){this.pattern=[],this.value=t,this.width=e,this.height=o,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},e.prototype.addData=function(){var t={value:this.value,index:0,state:""};0!==this.value.length&&(t.state=t.previousState=this.getNextState(t,this.states),this.addStart(t),this.pushData(t,this.states),this.addCheckSum(),this.addStop(),this.setBaseUnit())},e.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);)if(t.shifted){var o=t.state;t.state=t.previousState,t.previousState=o,t.shifted=!1}else t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t)},e.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},e.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},e.prototype.addStop=function(){this.addPattern(this.STOP)},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},e.prototype.addPattern=function(t){for(var e,o=this.characterMap[t].toString(),r=0;r<o.length;r++)e=parseInt(o.charAt(r),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},e.prototype.getNextState=function(t,e){for(var o=0;o<e.length;o++)if(this[e[o]].is(t.value,t.index))return e[o];this.invalidCharacterError(t.value.charAt(t.index))},e}(Dp),il=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Jp(this,{name:"Code 128 A",states:["A"]})},e}(rl),nl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Jp(this,{name:"Code 128 B",states:["B"]})},e}(rl),sl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Jp(this,{name:"Code 128 C",states:["C"]})},e}(rl),al=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Jp(this,{name:"Code 128",states:["C","B","A","FNC4"]})},e}(rl),pl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Jp(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},e}(rl);function ll(t,e,o){return t.substring(e,e+o)}var hl=Object.assign,cl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),hl(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:yl})},e.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},e.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},e.prototype.addCheckSum=function(){var t=this.checkSums[this.checkSumType].call(this.checkSums,this.value);this.checksum=t.join("");for(var e=0;e<t.length;e++)this.checkSumLength++,this.addPattern(this.characterMap[t[e]])},e}(Dp),ul=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),hl(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},e}(cl),dl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),hl(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},e}(cl),fl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),hl(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},e}(cl),gl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),hl(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},e}(cl),yl={Modulo10:function(t){var e,o,r,i=[0,""],n=t.length%2;for(e=0;e<t.length;e++)i[(e+n)%2]+=parseInt(t.charAt(e),10);for(r=i[0],o=(2*i[1]).toString(),e=0;e<o.length;e++)r+=parseInt(o.charAt(e),10);return[(10-r%10)%10]},Modulo11:function(t){for(var e,o=0,r=t.length,i=0;i<r;i++)o+=(((r-i)%6||6)+1)*t.charAt(i);return 10!==(e=(11-o%11)%11)?[e]:[1,0]},Modulo11Modulo10:function(t){var e,o=this.Modulo11(t);return e=t+o[0],o.concat(this.Modulo10(e))},Modulo10Modulo10:function(t){var e,o=this.Modulo10(t);return e=t+o[0],o.concat(this.Modulo10(e))}},vl=Object.assign,ml=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),vl(this,{name:"EAN 13",keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}})},e.prototype.initValue=function(t,e,o){var r=String(t);if(12!==r.length||/\D/.test(r))throw new Error('The value of the "EAN13" encoding should be 12 symbols');this.pattern=[],this.options.height=o,this.baseUnit=e/(95+this.quietZoneLength),this.value=r,this.checksum=this.calculateChecksum(),this.leftKey=r[0],this.leftPart=r.substr(1,6),this.rightPart=r.substr(7)+this.checksum},e.prototype.addData=function(){this.addPieces(this.characterMap.start),this.addSide(this.leftPart,this.leftKey),this.addPieces(this.characterMap.middle),this.addSide(this.rightPart),this.addPieces(this.characterMap.start)},e.prototype.addSide=function(t,e){for(var o=0;o<t.length;o++)e&&parseInt(this.keyTable[e].charAt(o),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(o)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(o)],!0)},e.prototype.addPieces=function(t,e){for(var o=0;o<t.length;o++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[o]}):this.pattern.push(t[o])},e.prototype.calculateChecksum=function(){for(var t=0,e=0,o=this.value.split("").reverse().join(""),r=0;r<o.length;r++)r%2?e+=parseInt(o.charAt(r),10):t+=parseInt(o.charAt(r),10);return(10-(3*t+e)%10)%10},e}(Dp),xl=Object.assign,bl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),xl(this,{name:"EAN 8"})},e.prototype.initValue=function(t,e,o){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=o,this.checksum=this.calculateChecksum(this.value),this.leftPart=this.value.substr(0,4),this.rightPart=this.value.substr(4)+this.checksum,this.pattern=[],this.baseUnit=e/(67+this.quietZoneLength)},e}(ml),wl={code11:zp,code39:Fp,code39extended:Gp,code93:Xp,code93extended:Yp,code128:al,code128a:il,code128b:nl,code128c:sl};wl["gs1-128"]=pl,wl.msimod10=ul,wl.msimod11=dl,wl.msimod1010=fl,wl.msimod1110=gl,wl.postnet=Qp,wl.ean8=bl,wl.ean13=ml;var _l=function(t){function e(e,o){t.call(this),this.options=B({},this.options,o),this.element=e,this._initElement(),this._initSurface(),this._setOptions(o),o&&bt(o.value)&&this.redraw()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._destroySurface()},e.prototype._initElement=function(){w(this.element,"k-barcode"),this.element.style.display="block"},e.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},e.prototype._createSurface=function(){return k.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},e.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},e.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},e.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},e.prototype.setOptions=function(t){this._setOptions(t),this.redraw()},e.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t.width,height:t.height}),this.createVisual(),this.surface.draw(this.visual)},e.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},e.prototype._resize=function(){this.redraw()},e.prototype.createVisual=function(){this.visual=this._render()},e.prototype._render=function(){var t,e,o=this.options,r=o.value,i=o.text,n=V(i.margin),s=this._getSize(),a=o.border||{},p=this.encoding,l=new $t(0,0,s.width,s.height).unpad(a.width).unpad(o.padding),h=l.height(),c=new k.drawing.Group;return this.contentBox=l,c.append(this._getBackground(s)),i.visible&&(h-=k.drawing.util.measureText(r,{font:i.font}).height+n.top+n.bottom),t=p.encode(r,l.width(),h),i.visible&&(e=r,o.checksum&&bt(p.checksum)&&(e+=" "+p.checksum),c.append(this._getText(e))),this.barHeight=h,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),c.append(this._bandsGroup),c},e.prototype.exportVisual=function(){return this._render()},e.prototype._getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,r=new k.geometry.Size(300,100);return e>0&&(r.width=e),o&&(r.height=o),this.options.width&&(r.width=this.options.width),this.options.height&&(r.height=this.options.height),r},e.prototype.value=function(t){if(!bt(t))return this.options.value;this.options.value=String(t),this.redraw()},e.prototype._getBands=function(t,e){for(var o,r,i=this.contentBox,n=i.x1,s=new k.drawing.Group,a=0;a<t.length;a++){if(o=(r=I(t[a])?t[a]:{width:t[a],y1:0,y2:this.barHeight}).width*e,a%2){var p=k.geometry.Rect.fromPoints(new k.geometry.Point(n,r.y1+i.y1),new k.geometry.Point(n+o,r.y2+i.y1)),l=k.drawing.Path.fromRect(p,{fill:{color:this.options.color},stroke:null});s.append(l)}n+=o}return s},e.prototype._getBackground=function(t){var e=this.options,o=e.border||{},r=new $t(0,0,t.width,t.height).unpad(o.width/2);return k.drawing.Path.fromRect(r.toRect(),{fill:{color:e.background},stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType}})},e.prototype._getText=function(t){var e=this.options.text,o=this._textbox=new we(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return o.reflow(this.contentBox),o.renderVisual(),o.visual},e.prototype._setOptions=function(t){if(this.type=(t.type||this.options.type).toLowerCase(),"upca"===this.type&&(this.type="ean13",t.value="0"+t.value),"upce"===this.type&&(this.type="ean8",t.value="0"+t.value),!wl[this.type])throw new Error("Encoding "+this.type+" is not supported.");this.encoding=new wl[this.type],this.options=B({},this.options,t)},e}(k.Class);jt(_l,{name:"Barcode",renderAs:"svg",value:"",type:"code39",checksum:!1,width:0,height:0,color:"black",background:"white",text:{visible:!0,font:"16px Consolas, Monaco, Sans Mono, monospace, sans-serif",color:"black",margin:{top:0,bottom:0,left:0,right:0}},border:{width:0,dashType:"solid",color:"black"},padding:{top:0,bottom:0,left:0,right:0}});var Cl=_l,kl=Object.assign;function Sl(t,e){for(var o=[],r=0;r<t.length;)o.push(t.substring(r,r+e)),r+=e;return o}function Al(t,e){var o=Number(t).toString(2);return o.length<e&&(o=new Array(e-o.length+1).join(0)+o),o}function Pl(t){return parseInt(t,2)}var Ol=function(t){function e(e){t.call(this),this.matrix=e,this.row=e.length-1,this.column=e.length-1,this.startColumn=this.column,this.dir=-1,this.c=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},e.prototype.getNextCell=function(){for(;void 0!==this.matrix[this.row][this.column];)this.move(),(this.row<0||this.row>=this.matrix.length)&&(this.dir=-this.dir,this.startColumn-=8!==this.startColumn?2:3,this.column=this.startColumn,this.row=this.dir<0?this.matrix.length-1:0);return{row:this.row,column:this.column}},e.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}},e}(k.Class),Ml=function(t){function e(e,o){t.call(this),this.dataString=e,this.version=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(k.Class),Tl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getEncodingResult=function(t,e){var o=function(t){var e,o=[],r=0,i=t;o.push(rh(i,8,5,8,e)),e=o[0].mode,i=i.substr(o[0].modeString.length);for(;i.length>0;){var n=rh(i,17,9,16,e);n.mode!==e?(e=n.mode,o.push(n),r++):o[r].modeString+=n.modeString,i=i.substr(n.modeString.length)}return o}(t),r=ih(function(t){for(var e,o=0,r=0;r<t.length;r++)e=jl[t[r].mode],o+=e.getStringBitsLength(t[r].modeString.length);return Math.ceil(o/8)}(o),e),i=function(t,e){for(var o,r="",i=0;i<t.length;i++)o=jl[t[i].mode],r+=o.encode(t[i].modeString,e);return r}(o,r);return new Ml(i,r)},e}(k.Class),Rl=function(t){function e(){t.call(this),this.initProperties()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){kl(this,{modeIndicator:"",bitsInCharacterCount:[]})},e.prototype.getVersionIndex=function(t){return t<10?0:t>26?2:1},e.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},e.prototype.getModeCountString=function(t,e){return this.modeIndicator+Al(t,this.getBitsCharacterCount(e))},e.prototype.encode=function(){},e.prototype.getStringBitsLength=function(){},e.prototype.getValue=function(){},e}(k.Class),Bl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),kl(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},e.prototype.getValue=function(t){return parseInt(t,10)},e.prototype.encode=function(t,e){var o,r=Sl(t,3),i=this.getModeCountString(t.length,e);for(o=0;o<r.length-1;o++)i+=Al(r[o],10);return i+Al(r[o],1+3*r[o].length)},e.prototype.getStringBitsLength=function(t,e){var o=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*o+(0===o?0:1)},e}(Rl),Il=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),kl(this,{characters:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:18,J:19,K:20,L:21,M:22,N:23,O:24,P:25,Q:26,R:27,S:28,T:29,U:30,V:31,W:32,X:33,Y:34,Z:35," ":36,$:37,"%":38,"*":39,"+":40,"-":41,".":42,"/":43,":":44},bitsInCharacterCount:[9,11,13],modeIndicator:"0010"})},e.prototype.getValue=function(t){return this.characters[t]},e.prototype.encode=function(t,e){var o,r=Sl(t,2),i=this.getModeCountString(t.length,e);for(o=0;o<r.length-1;o++)i+=Al(45*this.getValue(r[o].charAt(0))+this.getValue(r[o].charAt(1)),11);return i+Al(2===r[o].length?45*this.getValue(r[o].charAt(0))+this.getValue(r[o].charAt(1)):this.getValue(r[o].charAt(0)),1+5*r[o].length)},e.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},e}(Rl),Ll=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),kl(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},e.prototype.getValue=function(t){var e=t.charCodeAt(0);if(e<=127||160<=e&&e<=255)return e;throw new Error("Unsupported character: "+t)},e.prototype.encode=function(t,e){for(var o=this.getModeCountString(t.length,e),r=0;r<t.length;r++)o+=Al(this.getValue(t.charAt(r)),8);return o},e.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},e}(Rl),jl={};jl.numeric=new Bl,jl.alphanumeric=new Il,jl.byte=new Ll;var El=function(t){function e(){t.call(this),this.initProperties(),this.mode=jl[this.encodingMode]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){kl(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},e.prototype.getEncodingResult=function(t,e){var o=this.encode(t),r=ih(this.getDataCodewordsCount(o),e),i=this.mode.getModeCountString(o.length/8,r)+o;return new Ml(i,r)},e.prototype.getDataCodewordsCount=function(t){var e=t.length;return Math.ceil((this.initialModeCountStringLength+e)/8)},e.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},e.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,r="";if(1===e)r=Al(t,8);else{for(var i=8-e,n=0;n<o;n++)r=Al(t>>6*n&63|128,8)+r;r=(t>>6*o|255>>i<<i).toString(2)+r}return r},e.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1},e}(k.Class),Dl=[{L:{groups:[[1,19]],totalDataCodewords:19,errorCodewordsPerBlock:7},M:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:10},Q:{groups:[[1,13]],totalDataCodewords:13,errorCodewordsPerBlock:13},H:{groups:[[1,9]],totalDataCodewords:9,errorCodewordsPerBlock:17}},{L:{groups:[[1,34]],totalDataCodewords:34,errorCodewordsPerBlock:10},M:{groups:[[1,28]],totalDataCodewords:28,errorCodewordsPerBlock:16},Q:{groups:[[1,22]],totalDataCodewords:22,errorCodewordsPerBlock:22},H:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:28}},{L:{groups:[[1,55]],totalDataCodewords:55,errorCodewordsPerBlock:15},M:{groups:[[1,44]],totalDataCodewords:44,errorCodewordsPerBlock:26},Q:{groups:[[2,17]],totalDataCodewords:34,errorCodewordsPerBlock:18},H:{groups:[[2,13]],totalDataCodewords:26,errorCodewordsPerBlock:22}},{L:{groups:[[1,80]],totalDataCodewords:80,errorCodewordsPerBlock:20},M:{groups:[[2,32]],totalDataCodewords:64,errorCodewordsPerBlock:18},Q:{groups:[[2,24]],totalDataCodewords:48,errorCodewordsPerBlock:26},H:{groups:[[4,9]],totalDataCodewords:36,errorCodewordsPerBlock:16}},{L:{groups:[[1,108]],totalDataCodewords:108,errorCodewordsPerBlock:26},M:{groups:[[2,43]],totalDataCodewords:86,errorCodewordsPerBlock:24},Q:{groups:[[2,15],[2,16]],totalDataCodewords:62,errorCodewordsPerBlock:18},H:{groups:[[2,11],[2,12]],totalDataCodewords:46,errorCodewordsPerBlock:22}},{L:{groups:[[2,68]],totalDataCodewords:136,errorCodewordsPerBlock:18},M:{groups:[[4,27]],totalDataCodewords:108,errorCodewordsPerBlock:16},Q:{groups:[[4,19]],totalDataCodewords:76,errorCodewordsPerBlock:24},H:{groups:[[4,15]],totalDataCodewords:60,errorCodewordsPerBlock:28}},{L:{groups:[[2,78]],totalDataCodewords:156,errorCodewordsPerBlock:20},M:{groups:[[4,31]],totalDataCodewords:124,errorCodewordsPerBlock:18},Q:{groups:[[2,14],[4,15]],totalDataCodewords:88,errorCodewordsPerBlock:18},H:{groups:[[4,13],[1,14]],totalDataCodewords:66,errorCodewordsPerBlock:26}},{L:{groups:[[2,97]],totalDataCodewords:194,errorCodewordsPerBlock:24},M:{groups:[[2,38],[2,39]],totalDataCodewords:154,errorCodewordsPerBlock:22},Q:{groups:[[4,18],[2,19]],totalDataCodewords:110,errorCodewordsPerBlock:22},H:{groups:[[4,14],[2,15]],totalDataCodewords:86,errorCodewordsPerBlock:26}},{L:{groups:[[2,116]],totalDataCodewords:232,errorCodewordsPerBlock:30},M:{groups:[[3,36],[2,37]],totalDataCodewords:182,errorCodewordsPerBlock:22},Q:{groups:[[4,16],[4,17]],totalDataCodewords:132,errorCodewordsPerBlock:20},H:{groups:[[4,12],[4,13]],totalDataCodewords:100,errorCodewordsPerBlock:24}},{L:{groups:[[2,68],[2,69]],totalDataCodewords:274,errorCodewordsPerBlock:18},M:{groups:[[4,43],[1,44]],totalDataCodewords:216,errorCodewordsPerBlock:26},Q:{groups:[[6,19],[2,20]],totalDataCodewords:154,errorCodewordsPerBlock:24},H:{groups:[[6,15],[2,16]],totalDataCodewords:122,errorCodewordsPerBlock:28}},{L:{groups:[[4,81]],totalDataCodewords:324,errorCodewordsPerBlock:20},M:{groups:[[1,50],[4,51]],totalDataCodewords:254,errorCodewordsPerBlock:30},Q:{groups:[[4,22],[4,23]],totalDataCodewords:180,errorCodewordsPerBlock:28},H:{groups:[[3,12],[8,13]],totalDataCodewords:140,errorCodewordsPerBlock:24}},{L:{groups:[[2,92],[2,93]],totalDataCodewords:370,errorCodewordsPerBlock:24},M:{groups:[[6,36],[2,37]],totalDataCodewords:290,errorCodewordsPerBlock:22},Q:{groups:[[4,20],[6,21]],totalDataCodewords:206,errorCodewordsPerBlock:26},H:{groups:[[7,14],[4,15]],totalDataCodewords:158,errorCodewordsPerBlock:28}},{L:{groups:[[4,107]],totalDataCodewords:428,errorCodewordsPerBlock:26},M:{groups:[[8,37],[1,38]],totalDataCodewords:334,errorCodewordsPerBlock:22},Q:{groups:[[8,20],[4,21]],totalDataCodewords:244,errorCodewordsPerBlock:24},H:{groups:[[12,11],[4,12]],totalDataCodewords:180,errorCodewordsPerBlock:22}},{L:{groups:[[3,115],[1,116]],totalDataCodewords:461,errorCodewordsPerBlock:30},M:{groups:[[4,40],[5,41]],totalDataCodewords:365,errorCodewordsPerBlock:24},Q:{groups:[[11,16],[5,17]],totalDataCodewords:261,errorCodewordsPerBlock:20},H:{groups:[[11,12],[5,13]],totalDataCodewords:197,errorCodewordsPerBlock:24}},{L:{groups:[[5,87],[1,88]],totalDataCodewords:523,errorCodewordsPerBlock:22},M:{groups:[[5,41],[5,42]],totalDataCodewords:415,errorCodewordsPerBlock:24},Q:{groups:[[5,24],[7,25]],totalDataCodewords:295,errorCodewordsPerBlock:30},H:{groups:[[11,12],[7,13]],totalDataCodewords:223,errorCodewordsPerBlock:24}},{L:{groups:[[5,98],[1,99]],totalDataCodewords:589,errorCodewordsPerBlock:24},M:{groups:[[7,45],[3,46]],totalDataCodewords:453,errorCodewordsPerBlock:28},Q:{groups:[[15,19],[2,20]],totalDataCodewords:325,errorCodewordsPerBlock:24},H:{groups:[[3,15],[13,16]],totalDataCodewords:253,errorCodewordsPerBlock:30}},{L:{groups:[[1,107],[5,108]],totalDataCodewords:647,errorCodewordsPerBlock:28},M:{groups:[[10,46],[1,47]],totalDataCodewords:507,errorCodewordsPerBlock:28},Q:{groups:[[1,22],[15,23]],totalDataCodewords:367,errorCodewordsPerBlock:28},H:{groups:[[2,14],[17,15]],totalDataCodewords:283,errorCodewordsPerBlock:28}},{L:{groups:[[5,120],[1,121]],totalDataCodewords:721,errorCodewordsPerBlock:30},M:{groups:[[9,43],[4,44]],totalDataCodewords:563,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[1,23]],totalDataCodewords:397,errorCodewordsPerBlock:28},H:{groups:[[2,14],[19,15]],totalDataCodewords:313,errorCodewordsPerBlock:28}},{L:{groups:[[3,113],[4,114]],totalDataCodewords:795,errorCodewordsPerBlock:28},M:{groups:[[3,44],[11,45]],totalDataCodewords:627,errorCodewordsPerBlock:26},Q:{groups:[[17,21],[4,22]],totalDataCodewords:445,errorCodewordsPerBlock:26},H:{groups:[[9,13],[16,14]],totalDataCodewords:341,errorCodewordsPerBlock:26}},{L:{groups:[[3,107],[5,108]],totalDataCodewords:861,errorCodewordsPerBlock:28},M:{groups:[[3,41],[13,42]],totalDataCodewords:669,errorCodewordsPerBlock:26},Q:{groups:[[15,24],[5,25]],totalDataCodewords:485,errorCodewordsPerBlock:30},H:{groups:[[15,15],[10,16]],totalDataCodewords:385,errorCodewordsPerBlock:28}},{L:{groups:[[4,116],[4,117]],totalDataCodewords:932,errorCodewordsPerBlock:28},M:{groups:[[17,42]],totalDataCodewords:714,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[6,23]],totalDataCodewords:512,errorCodewordsPerBlock:28},H:{groups:[[19,16],[6,17]],totalDataCodewords:406,errorCodewordsPerBlock:30}},{L:{groups:[[2,111],[7,112]],totalDataCodewords:1006,errorCodewordsPerBlock:28},M:{groups:[[17,46]],totalDataCodewords:782,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[16,25]],totalDataCodewords:568,errorCodewordsPerBlock:30},H:{groups:[[34,13]],totalDataCodewords:442,errorCodewordsPerBlock:24}},{L:{groups:[[4,121],[5,122]],totalDataCodewords:1094,errorCodewordsPerBlock:30},M:{groups:[[4,47],[14,48]],totalDataCodewords:860,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[14,25]],totalDataCodewords:614,errorCodewordsPerBlock:30},H:{groups:[[16,15],[14,16]],totalDataCodewords:464,errorCodewordsPerBlock:30}},{L:{groups:[[6,117],[4,118]],totalDataCodewords:1174,errorCodewordsPerBlock:30},M:{groups:[[6,45],[14,46]],totalDataCodewords:914,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[16,25]],totalDataCodewords:664,errorCodewordsPerBlock:30},H:{groups:[[30,16],[2,17]],totalDataCodewords:514,errorCodewordsPerBlock:30}},{L:{groups:[[8,106],[4,107]],totalDataCodewords:1276,errorCodewordsPerBlock:26},M:{groups:[[8,47],[13,48]],totalDataCodewords:1e3,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[22,25]],totalDataCodewords:718,errorCodewordsPerBlock:30},H:{groups:[[22,15],[13,16]],totalDataCodewords:538,errorCodewordsPerBlock:30}},{L:{groups:[[10,114],[2,115]],totalDataCodewords:1370,errorCodewordsPerBlock:28},M:{groups:[[19,46],[4,47]],totalDataCodewords:1062,errorCodewordsPerBlock:28},Q:{groups:[[28,22],[6,23]],totalDataCodewords:754,errorCodewordsPerBlock:28},H:{groups:[[33,16],[4,17]],totalDataCodewords:596,errorCodewordsPerBlock:30}},{L:{groups:[[8,122],[4,123]],totalDataCodewords:1468,errorCodewordsPerBlock:30},M:{groups:[[22,45],[3,46]],totalDataCodewords:1128,errorCodewordsPerBlock:28},Q:{groups:[[8,23],[26,24]],totalDataCodewords:808,errorCodewordsPerBlock:30},H:{groups:[[12,15],[28,16]],totalDataCodewords:628,errorCodewordsPerBlock:30}},{L:{groups:[[3,117],[10,118]],totalDataCodewords:1531,errorCodewordsPerBlock:30},M:{groups:[[3,45],[23,46]],totalDataCodewords:1193,errorCodewordsPerBlock:28},Q:{groups:[[4,24],[31,25]],totalDataCodewords:871,errorCodewordsPerBlock:30},H:{groups:[[11,15],[31,16]],totalDataCodewords:661,errorCodewordsPerBlock:30}},{L:{groups:[[7,116],[7,117]],totalDataCodewords:1631,errorCodewordsPerBlock:30},M:{groups:[[21,45],[7,46]],totalDataCodewords:1267,errorCodewordsPerBlock:28},Q:{groups:[[1,23],[37,24]],totalDataCodewords:911,errorCodewordsPerBlock:30},H:{groups:[[19,15],[26,16]],totalDataCodewords:701,errorCodewordsPerBlock:30}},{L:{groups:[[5,115],[10,116]],totalDataCodewords:1735,errorCodewordsPerBlock:30},M:{groups:[[19,47],[10,48]],totalDataCodewords:1373,errorCodewordsPerBlock:28},Q:{groups:[[15,24],[25,25]],totalDataCodewords:985,errorCodewordsPerBlock:30},H:{groups:[[23,15],[25,16]],totalDataCodewords:745,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[3,116]],totalDataCodewords:1843,errorCodewordsPerBlock:30},M:{groups:[[2,46],[29,47]],totalDataCodewords:1455,errorCodewordsPerBlock:28},Q:{groups:[[42,24],[1,25]],totalDataCodewords:1033,errorCodewordsPerBlock:30},H:{groups:[[23,15],[28,16]],totalDataCodewords:793,errorCodewordsPerBlock:30}},{L:{groups:[[17,115]],totalDataCodewords:1955,errorCodewordsPerBlock:30},M:{groups:[[10,46],[23,47]],totalDataCodewords:1541,errorCodewordsPerBlock:28},Q:{groups:[[10,24],[35,25]],totalDataCodewords:1115,errorCodewordsPerBlock:30},H:{groups:[[19,15],[35,16]],totalDataCodewords:845,errorCodewordsPerBlock:30}},{L:{groups:[[17,115],[1,116]],totalDataCodewords:2071,errorCodewordsPerBlock:30},M:{groups:[[14,46],[21,47]],totalDataCodewords:1631,errorCodewordsPerBlock:28},Q:{groups:[[29,24],[19,25]],totalDataCodewords:1171,errorCodewordsPerBlock:30},H:{groups:[[11,15],[46,16]],totalDataCodewords:901,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[6,116]],totalDataCodewords:2191,errorCodewordsPerBlock:30},M:{groups:[[14,46],[23,47]],totalDataCodewords:1725,errorCodewordsPerBlock:28},Q:{groups:[[44,24],[7,25]],totalDataCodewords:1231,errorCodewordsPerBlock:30},H:{groups:[[59,16],[1,17]],totalDataCodewords:961,errorCodewordsPerBlock:30}},{L:{groups:[[12,121],[7,122]],totalDataCodewords:2306,errorCodewordsPerBlock:30},M:{groups:[[12,47],[26,48]],totalDataCodewords:1812,errorCodewordsPerBlock:28},Q:{groups:[[39,24],[14,25]],totalDataCodewords:1286,errorCodewordsPerBlock:30},H:{groups:[[22,15],[41,16]],totalDataCodewords:986,errorCodewordsPerBlock:30}},{L:{groups:[[6,121],[14,122]],totalDataCodewords:2434,errorCodewordsPerBlock:30},M:{groups:[[6,47],[34,48]],totalDataCodewords:1914,errorCodewordsPerBlock:28},Q:{groups:[[46,24],[10,25]],totalDataCodewords:1354,errorCodewordsPerBlock:30},H:{groups:[[2,15],[64,16]],totalDataCodewords:1054,errorCodewordsPerBlock:30}},{L:{groups:[[17,122],[4,123]],totalDataCodewords:2566,errorCodewordsPerBlock:30},M:{groups:[[29,46],[14,47]],totalDataCodewords:1992,errorCodewordsPerBlock:28},Q:{groups:[[49,24],[10,25]],totalDataCodewords:1426,errorCodewordsPerBlock:30},H:{groups:[[24,15],[46,16]],totalDataCodewords:1096,errorCodewordsPerBlock:30}},{L:{groups:[[4,122],[18,123]],totalDataCodewords:2702,errorCodewordsPerBlock:30},M:{groups:[[13,46],[32,47]],totalDataCodewords:2102,errorCodewordsPerBlock:28},Q:{groups:[[48,24],[14,25]],totalDataCodewords:1502,errorCodewordsPerBlock:30},H:{groups:[[42,15],[32,16]],totalDataCodewords:1142,errorCodewordsPerBlock:30}},{L:{groups:[[20,117],[4,118]],totalDataCodewords:2812,errorCodewordsPerBlock:30},M:{groups:[[40,47],[7,48]],totalDataCodewords:2216,errorCodewordsPerBlock:28},Q:{groups:[[43,24],[22,25]],totalDataCodewords:1582,errorCodewordsPerBlock:30},H:{groups:[[10,15],[67,16]],totalDataCodewords:1222,errorCodewordsPerBlock:30}},{L:{groups:[[19,118],[6,119]],totalDataCodewords:2956,errorCodewordsPerBlock:30},M:{groups:[[18,47],[31,48]],totalDataCodewords:2334,errorCodewordsPerBlock:28},Q:{groups:[[34,24],[34,25]],totalDataCodewords:1666,errorCodewordsPerBlock:30},H:{groups:[[20,15],[61,16]],totalDataCodewords:1276,errorCodewordsPerBlock:30}}],Vl={1:0},zl={0:1},Ul={15:20,16:20,18:24,19:24,22:20,24:22,26:24,28:20,30:20,31:24,32:28,33:24,36:18,37:22,39:20,40:24},Hl=[1,0,1,1,1],Fl=[1,0,1],Nl={L:"01",M:"00",Q:"11",H:"10"},Gl=["11101100","00010001"],Wl=[function(t,e){return(t+e)%2==0},function(t){return t%2==0},function(t){return t%3==0},function(t,e){return(t+e)%3==0},function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2==0},function(t,e){return t*e%2+t*e%3==0},function(t,e){return(t*e%2+t*e%3)%2==0},function(t,e){return((t+e)%2+t*e%3)%2==0}],Xl=/^\d+/,Yl=new RegExp("^[A-Z $%*+./:-]+"),ql=new RegExp("^[A-Z0-9 $%*+./:-]+"),Kl=new RegExp("^[^A-Z0-9 $%*+./:-]+"),Ql=[[1,0],[1,25,0]];function Zl(t,e,o,r){for(var i=0;i<t.length;i++)t[i][o][r]=e}function $l(t,e,o,r){for(var i=0;i<Wl.length;i++)t[i][o][r]=Wl[i](o,r)?1^e:parseInt(e,10)}function Jl(t,e){for(var o=[],r=t.length-2;r>=0;r--)o[r]=t[r]^e[r];return o}function th(t,e){for(var o=[],r=0;r<t.length;r++)for(var i=0;i<e.length;i++)void 0===o[r+i]?o[r+i]=(t[r]+(e[i]>=0?e[i]:0))%255:o[r+i]=Vl[zl[o[r+i]]^zl[(t[r]+e[i])%255]];return o}function eh(t,e){var o=[],r=t.length-1;do{o[r]=zl[(t[r]+e)%255],r--}while(void 0!==t[r]);return o}function oh(t,e){var o,r,i=Ql[e-1],n=new Array(e).concat(t),s=new Array(n.length-i.length).concat(i),a=t.length,p=[];for(r=0;r<a;r++)o=eh(s,Vl[n[n.length-1]]),s.splice(0,1),n=Jl(o,n);for(r=n.length-1;r>=0;r--)p[e-1-r]=Al(n[r],8);return p}function rh(t,e,o,r,i){var n,s,a=Xl.exec(t),p=a?a[0]:"",l=Yl.exec(t),h=l?l[0]:"",c=ql.exec(t),u=c?c[0]:"";return p&&(p.length>=e||t.length===p.length||p.length>=o&&!ql.test(t.charAt(p.length)))?(n="numeric",s=p):u&&(t.length===u.length||u.length>=r||"alphanumeric"===i)?(n="alphanumeric",s=p||h):(n="byte",s=u?u+Kl.exec(t.substring(u.length))[0]:Kl.exec(t)[0]),{mode:n,modeString:s}}function ih(t,e){var o=0,r=Dl.length-1,i=Math.floor(Dl.length/2);do{t<Dl[i][e].totalDataCodewords?r=i:o=i,i=o+Math.floor((r-o)/2)}while(r-o>1);return t<=Dl[o][e].totalDataCodewords?i+1:r+1}function nh(t,e,o){var r=Pl(e),i=e.length-1,n=t<<i,s=Al(t,o-i),a=function(t,e){var o=e.toString(2).length,r=t.toString(2).length,i=t;do{r=(i^=e<<r-o).toString(2).length}while(r>=o);return i}(n,r);return a=s+Al(a,i)}function sh(t,e){return parseInt(t.charAt(e),10)}function ah(t,e){var o,r,i=t[0],n=0,s=e.length;for(o=0,r=8;o<=8;o++)6!==o&&Zl(t,sh(e,s-1-n++),o,r);for(o=8,r=7;r>=0;r--)6!==r&&Zl(t,sh(e,s-1-n++),o,r);for(n=0,r=i.length-1,o=8;r>=i.length-8;r--)Zl(t,sh(e,s-1-n++),o,r);for(Zl(t,1,i.length-8,8),o=i.length-7,r=8;o<i.length;o++)Zl(t,sh(e,s-1-n++),o,r)}function ph(t,e){for(var o,r,i,n=t[0].length,s=n-11,a=n-11,p=0;p<e.length;p++)o=Math.floor(p/3),r=p%3,Zl(t,i=sh(e,e.length-p-1),0+o,s+r),Zl(t,i,a+r,0+o)}function lh(t,e,o,r){for(var i,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var p=a;p<n-a;p++)Zl(t,i=e[a],o+p,r+a),Zl(t,i,o+a,r+p),Zl(t,i,o+s-p,r+s-a),Zl(t,i,o+s-a,r+s-p)}function hh(t,e,o,r){var i=o,n=r,s=t[0];do{Zl(t,0,i,r),Zl(t,0,o,n),i+=e[0],n+=e[1]}while(i>=0&&i<s.length)}function ch(t,e,o,r,i){e[t][r]=(e[t][r]<<1^i)%128,93===e[t][r]&&(o[t]+=40)}function uh(t,e,o,r,i,n){o[t][n]===r?i[t][n]++:(o[t][n]=r,i[t][n]>=5&&(e[t]+=3+i[t][n]-5),i[t][n]=1)}function dh(t,e){var o=Math.floor(t/e*100),r=o%5,i=Math.abs(o-r-50),n=Math.abs(o+5-r-50);return 10*Math.min(i/5,n/5)}function fh(t,e,o){var r=function(t){return t&&t.toLowerCase().indexOf("utf_8")>=0?new El:new Tl}(o).getEncodingResult(t,e),i=r.version,n=Dl[i-1][e],s=function(t,e){for(var o,r,i,n,s,a=0,p=[],l=[],h=e.groups,c=0;c<h.length;c++){i=h[c][0];for(var u=0;u<i;u++){r=h[c][1],o=[],n=[];for(var d=1;d<=r;d++)s=t.substring(a,a+8),o.push(s),n[r-d]=Pl(s),a+=8;p.push(o),l.push(oh(n,e.errorCodewordsPerBlock))}}return[p,l]}(function(t,e){for(var o=8*e,r=0,i=0,n=t;n.length<o&&r<"0000".length;)n+="0000".charAt(r++);for(n.length%8!=0&&(n+=new Array(9-n.length%8).join("0"));n.length<o;)n+=Gl[i],i^=1;return n}(r.dataString,n.totalDataCodewords),n),a=function(t){for(var e=[],o=17+4*t,r=0;r<Wl.length;r++){e[r]=new Array(o);for(var i=0;i<o;i++)e[r][i]=new Array(o)}return e}(i);!function(t){var e=t[0].length;lh(t,Hl,0,0),hh(t,[-1,-1],7,7),lh(t,Hl,e-7,0),hh(t,[1,-1],e-8,7),lh(t,Hl,0,e-7),hh(t,[-1,1],7,e-8)}(a),function(t,e){if(!(e<2)){var o,r,i=t[0],n=i.length,s=Math.floor(e/7),a=[6],p=0;for((o=Ul[e])?r=(n-13-o)/s:o=r=(n-13)/(s+1),a.push(a[p++]+o);a[p]+r<n;)a.push(a[p++]+r);for(var l=0;l<a.length;l++)for(var h=0;h<a.length;h++)void 0===i[a[l]][a[h]]&&lh(t,Fl,a[l]-2,a[h]-2)}}(a,i),function(t){for(var e=1,o=t[0].length,r=8;r<o-8;r++)Zl(t,e,6,r),Zl(t,e,r,6),e^=1}(a),i>=7&&ph(a,Al(0,18)),ah(a,Al(0,15)),function(t,e){for(var o,r,i,n=new Ol(t[0]),s=0;s<e.length;s++)for(o=e[s],r=0;o.length>0;){for(var a=0;a<o.length;a++)for(var p=0;p<8;p++)i=n.getNextCell(),$l(t,o[a][r].charAt(p),i.row,i.column);for(r++;o[0]&&r===o[0].length;)o.splice(0,1)}for(;i=n.getNextRemainderCell();)$l(t,0,i.row,i.column)}(a,s);var p=function(t){var e,o,r=[],i=[],n=[],s=[],a=[],p=t[0].length;for(o=0;o<t.length;o++)r[o]=0,n[o]=0,a[o]=[0,0],s[o]=[0,0],i[o]=[];for(var l=0;l<p;l++)for(var h=0;h<p;h++)for(var c=0;c<t.length;c++)e=t[c],n[c]+=parseInt(e[l][h],10),i[c][0]===e[l][h]&&l+1<p&&h-1>=0&&e[l+1][h]===i[c][0]&&e[l+1][h-1]===i[c][0]&&(r[c]+=3),ch(c,s,r,0,e[l][h]),ch(c,s,r,1,e[h][l]),uh(c,r,i,e[l][h],a,0),uh(c,r,i,e[h][l],a,1);var u,d=p*p,f=Number.MAX_VALUE;for(o=0;o<r.length;o++)r[o]+=dh(n[o],d),r[o]<f&&(f=r[o],u=o);return u}(a),l=a[p];return i>=7&&ph([l],function(t){return nh(t,"1111100100101",18)}(i)),ah([l],function(t){var e,o="";if(0===Pl(t))return"101010000010010";e=nh(Pl(t),"10100110111",15);for(var r=0;r<e.length;r++)o+=e.charAt(r)^"101010000010010".charAt(r);return o}(Nl[e]+Al(p,3))),l}!function(){var t,e;for(e=1;e<255;e++)(t=2*zl[e-1])>255&&(t^=285),zl[e]=t,Vl[t]=e;t=2*zl[e-1]^285,zl[e]=t,zl[-1]=0}(),function(){for(var t=2;t<=68;t++){var e=Ql[t-1],o=[t,0];Ql[t]=th(e,o)}}();var gh=Math.round,yh=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],vh=[[0,1],[1,1],[1,0]],mh=200,xh="L",bh="#fff",wh="#000",_h=1,Ch=7,kh=function(t){function e(e,o){t.call(this),this.options=B({},this.options,o),this.element=e,this.wrapper=this.element,this._initElement(),this._initSurface(),this.setOptions(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._destroySurface()},e.prototype._initElement=function(){w(this.element,"k-qrcode"),this.element.style.display="block"},e.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},e.prototype._createSurface=function(){return k.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},e.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},e.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},e.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},e.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},e.prototype.getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,r={width:0,height:0};return e>0&&(r.width=e),o&&(r.height=o),r},e.prototype._resize=function(){this.redraw()},e.prototype.createVisual=function(){this.visual=this._render()},e.prototype.exportVisual=function(){return this._render()},e.prototype._render=function(){var t,e,o,r,i,n=this._value,s=this.options.border||{},a=this.options.padding||0,p=s.width||0;s.width=p;var l=new k.drawing.Group;return n&&(o=fh(n,this.options.errorCorrection,this.options.encoding),i=(r=this._getSize())-2*(p+a),t=this._calculateBaseUnit(i,o.length),e=p+a+(i-o.length*t)/2,l.append(this._renderBackground(r,s)),l.append(this._renderMatrix(o,t,e)),this._hasCustomLogo()?l.append(this._renderLogo(r,t)):this._isSwiss()&&l.append(this._renderSwissCode(r,t))),l},e.prototype._renderLogo=function(t,e){var o,r=gh(t/2),i=this._getLogoSize(e*Ch),n=this.options.overlay.imageUrl,s={x:r-i.width/2,y:r-i.height/2};return o=new k.geometry.Rect(new k.geometry.Point(s.x,s.y),new k.geometry.Size(i.width,i.height)),new k.drawing.Image(n,o)},e.prototype._renderSwissCode=function(t,e){var o=this._getLogoSize(e*Ch),r=(o=Math.max(o.width,o.height))/4,i=r/2,n=t/2,s={},a=new k.drawing.Group;return s.x=s.y=Math.ceil(n-e-o/2),a.append(this._renderShape(s,Math.ceil(o+2*e),vh,"#fff")),s.x=s.y=n-o/2,a.append(this._renderShape(s,o,vh,this.options.color)),s.x=n+i-o/2,s.y=n+i+r-o/2,a.append(this._renderShape(s,r,yh,"#fff")),a},e.prototype._renderShape=function(t,e,o,r){var i=new k.drawing.MultiPath({fill:{color:r},stroke:null});i.moveTo(t.x,t.y);for(var n=0;n<o.length;n++)i.lineTo(t.x+e*o[n][0],t.y+e*o[n][1]);return i.close(),i},e.prototype._getSize=function(){var t;if(this.options.size)t=parseInt(this.options.size,10);else{var e=this.element,o=Math.min(e.clientWidth,e.clientHeight);t=o>0?o:mh}return t},e.prototype._calculateBaseUnit=function(t,e){var o=Math.floor(t/e);if(o<_h)throw new Error("Insufficient size.");return o*e>=t&&o-1>=_h&&o--,o},e.prototype._renderMatrix=function(t,e,o){for(var r=new k.drawing.MultiPath({fill:{color:this.options.color},stroke:null}),i=0;i<t.length;i++)for(var n=o+i*e,s=0;s<t.length;){for(;0===t[i][s]&&s<t.length;)s++;if(s<t.length){for(var a=s;1===t[i][s];)s++;var p=gh(o+a*e),l=gh(n),h=gh(o+s*e),c=gh(n+e);r.moveTo(p,l).lineTo(p,c).lineTo(h,c).lineTo(h,l).close()}}return r},e.prototype._renderBackground=function(t,e){var o=new $t(0,0,t,t).unpad(e.width/2);return k.drawing.Path.fromRect(o.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},e.prototype.setOptions=function(t){var e=t||{};this.options=kl(this.options,e),void 0!==t.value&&(this._value=String(this.options.value)),this.redraw()},e.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},e.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},e.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},e.prototype._getLogoSize=function(t){var e=this.options.overlay.width,o=this.options.overlay.height;return e||o?e&&!o?o=e:!e&&o&&(e=o):e=o=t,{width:e,height:o}},e}(k.Class);jt(kh,{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:xh,background:bh,color:wh,size:"",padding:0,border:{color:"",width:0},overlay:{type:"image",imageUrl:"",width:0,height:0}});var Sh=kh,Ah="Arial, Helvetica, sans-serif",Ph="12px "+Ah,Oh="16px "+Ah,Mh=function(){return{icon:{border:{width:1}},label:{font:Ph,padding:3},line:{length:10,width:2},visible:!0}},Th=function(t){return{visible:!0,labels:{font:"11px Arial, Helvetica, sans-serif"},overlay:t.gradients?{}:{gradient:"none"},area:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},rangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalRangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},bar:{gap:1.5,spacing:.4},boxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},bubble:{border:{width:0},labels:{background:"transparent"},opacity:.6},bullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},candlestick:{border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:"#000",width:1},spacing:.3},column:{gap:1.5,spacing:.4},heatmap:{labels:{color:"",background:"transparent",visible:!0},highlight:{border:{width:0}}},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},donut:{margin:1},funnel:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},horizontalWaterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4},line:{width:2},notes:Mh(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},spacing:.3},radarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},radarLine:{markers:{visible:!1},width:2},polarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},polarLine:{markers:{visible:!1},width:2},rangeBar:{gap:1.5,spacing:.4},rangeColumn:{gap:1.5,spacing:.4},scatterLine:{width:1},verticalArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalBoxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},verticalBullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},verticalLine:{width:2},waterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4}}},Rh=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Ph},notes:Mh(),title:{font:Oh,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:Th(t),title:{font:Oh},legend:{labels:{font:Ph}}}}},function(t,e,o){"use strict";o.r(e),o.d(e,"BrowserSupportService",(function(){return i})),o.d(e,"canUseDOM",(function(){return n})),o.d(e,"canUseRef",(function(){return s})),o.d(e,"classNames",(function(){return a})),o.d(e,"cloneDate",(function(){return l})),o.d(e,"clone",(function(){return h})),o.d(e,"cloneObject",(function(){return c})),o.d(e,"cloneValue",(function(){return u})),o.d(e,"cloneArray",(function(){return d})),o.d(e,"focusFirstFocusableChild",(function(){return f})),o.d(e,"FormComponent",(function(){return g})),o.d(e,"getTabIndex",(function(){return y})),o.d(e,"getter",(function(){return b})),o.d(e,"guid",(function(){return w})),o.d(e,"Keys",(function(){return _})),o.d(e,"noop",(function(){return C})),o.d(e,"getScrollbarWidth",(function(){return k})),o.d(e,"setScrollbarWidth",(function(){return S})),o.d(e,"setter",(function(){return O})),o.d(e,"mapTree",(function(){return R})),o.d(e,"mapTreeItem",(function(){return B})),o.d(e,"extendDataItem",(function(){return I})),o.d(e,"getItemPath",(function(){return L})),o.d(e,"validatePackage",(function(){return E})),o.d(e,"hasRelativeStackingContext",(function(){return D})),o.d(e,"dispatchEvent",(function(){return V})),o.d(e,"AsyncFocusBlur",(function(){return H})),o.d(e,"createPropsContext",(function(){return G})),o.d(e,"withPropsContext",(function(){return W})),o.d(e,"useDir",(function(){return X})),o.d(e,"useAsyncFocusBlur",(function(){return z})),o.d(e,"useRtl",(function(){return Y})),o.d(e,"useMouse",(function(){return K})),o.d(e,"useCustomComponent",(function(){return Q})),o.d(e,"usePropsContext",(function(){return F})),o.d(e,"COLLECTION_ACTION",(function(){return q})),o.d(e,"useCollection",(function(){return Z})),o.d(e,"Icon",(function(){return ot})),o.d(e,"SvgIcon",(function(){return st})),o.d(e,"Typography",(function(){return bt})),o.d(e,"DragAndDrop",(function(){return zt})),o.d(e,"Draggable",(function(){return Ut})),o.d(e,"Droppable",(function(){return Ht})),o.d(e,"useDraggable",(function(){return jt})),o.d(e,"useDroppable",(function(){return Et}));var r=function(){return"undefined"!=typeof document?document:{}},i=function(){function t(){}return Object.defineProperty(t.prototype,"scrollbarWidth",{get:function(){var t=r();if(!this.scrollbar&&t&&t.createElement){var e=t.createElement("div");e.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",e.innerHTML=" ",t.body.appendChild(e),this.scrollbar=e.offsetWidth-e.scrollWidth,t.body.removeChild(e)}return this.scrollbar},enumerable:!0,configurable:!0}),t}(),n=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),s=function(t){return"string"!=typeof Comment&&(function(t){return Boolean("function"==typeof t&&!!t.prototype.isReactComponent)}(t)||function(t){return Boolean(t.$$typeof&&"function"==typeof t.render)}(t))},a=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.filter((function(t){return!0!==t&&!!t})).map((function(t){return Array.isArray(t)?a.apply(void 0,t):"object"==typeof t?Object.keys(t).map((function(e,o){return t[o]||t[e]&&e||null})).filter((function(t){return null!==t})).join(" "):t})).filter((function(t){return!!t})).join(" ")},p=o(1),l=function(t){return t?new Date(t.getTime()):null};function h(t){var e={};return c(t,e),e}function c(t,e){for(var o in t)if(t.hasOwnProperty(o)){var r=t[o];e[o]=u(r,e[o])}}function u(t,e){if(Array.isArray(t))return d(t);if(t instanceof Date)return l(t);if(p.isValidElement(t))return p.cloneElement(t,t.props);if(t&&"object"==typeof t){var o=e||{};return c(t,o),o}return t}function d(t){return t.map((function(t){return u(t,void 0)}))}var f=function(t){if(t){if((t instanceof HTMLInputElement||-1!==t.tabIndex)&&t.focus)return void t.focus();var e=t.querySelector('input, [tabindex]:not([tabindex="-1"])');e&&e.focus&&e.focus()}},g=function(){},y=function(t,e,o){var r="string"==typeof t?parseInt(t,void 0):t;if(NaN!==r)return void 0!==r?r:e?o?void 0:-1:0},v=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function m(t){var e=[];return t.replace(v,(function(t,o,r,i){e.push(void 0!==o?o:r||i)})),e}var x={};function b(t){if(x[t])return x[t];var e=m(t);return x[t]=function(t){for(var o=t,r=0;r<e.length&&o;r++)o=o[e[r]];return o},x[t]}x.undefined=function(){};var w=function(){var t,e,o="";for(t=0;t<32;t++)e=16*Math.random()|0,8!==t&&12!==t&&16!==t&&20!==t||(o+="-"),o+=(12===t?4:16===t?3&e|8:e).toString(16);return o},_={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46},C=function(){},k=function(){return!(!n||!document.body)&&(new i).scrollbarWidth},S=function(){if(!n||!document.body)return!1;var t=(new i).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width",t+"px")},A={undefined:function(t){return t}},P=function(t,e){return e&&e.arrays&&!isNaN(Number(t))?[]:{}};function O(t){if(A[t])return A[t];var e=m(t);return A[t]=function(t,o,r){for(var i=t,n=e.length-1,s=0;s<n&&i;s++)i=i[e[s]]=i[e[s]]||P(e[s+1],r);i[e[n]]=o},A[t]}var M=function(){return(M=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function T(t,e,o){var r;return o?M({},t,((r={})[e]=o.length?o.slice():void 0,r)):t&&t[e]?t[e].slice():[]}var R=function(t,e,o){return t.map((function(t){return function t(e,o,r){if(e[o]){var i=T(e,o).map((function(e){return t(e,o,r)}));return r(T(e,o,i))}return r(e)}(t,e,o)})).slice()},B=function(t,e,o,r){for(var i=t,n=[],s=0;s<e.length;s++)i=i[e[s]],i=Array.isArray(i)?i:i[o],n.push(i);var a=n.length>1?n[n.length-2]:t,p=e[e.length-1],l=r(a[p]);a.splice(p,1,l)},I=function(t,e,o){var r;return Object.assign({},t,t[e]?((r={})[e]=t[e].slice(),r):{},o||{})},L=function(t,e,o){var r=[],i=e.slice();if(i.length){var n=t[i.shift()||0];for(r.push(n);i.length&&o;)n=n[o][i.shift()||0],r.push(n)}return r},j=o(6);function E(t){if(void 0!==j)j.validatePackage(t);else{var e="License activation failed for "+t.name+"\n";e+="The @progress/kendo-licensing script is not loaded.\n",e+="See "+t.licensingDocsUrl+" for more information.\n",console.warn(e)}}var D=function(t){if(!n)return!1;var e=t?t.ownerDocument:document;if(!e||!e.body)return!1;var o=e.createElement("div");o.style.transform="matrix(10, 0, 0, 10, 0, 0)",o.innerHTML='<div style="position: fixed; top: 10px;">child</div>',e.body.appendChild(o);var r=10!==o.children[0].getBoundingClientRect().top;return e.body.removeChild(o),r};function V(t,e,o,r){if(t){var i={syntheticEvent:e,nativeEvent:e.nativeEvent,target:o};t.call(void 0,Object.assign(i,r))}}function z(t){var e=t.onFocus,o=t.onBlur,r=t.onSyncFocus,i=t.onSyncBlur,n=p.useRef(!1),s=p.useRef(0),a=p.useCallback((function(t){clearTimeout(s.current),s.current=window.setTimeout((function(){return t()}))}),[s]),l=p.useCallback((function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];clearTimeout(s.current),r&&r.call.apply(r,[void 0].concat(t)),n.current||(n.current=!0,e&&e.call.apply(e,[void 0].concat(t)))}),[n,e,r]),h=p.useCallback((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i&&i.call.apply(i,[void 0].concat(t)),a((function(){n.current&&o&&(n.current=!1,o.call.apply(o,[void 0].concat(t)))}))}),[n,a,o,i]);return p.useEffect((function(){return function(){clearTimeout(s.current)}}),[]),{onFocus:l,onBlur:h}}var U=function(){return(U=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},H=function(t){var e=t.children,o=z({onFocus:t.onFocus,onBlur:t.onBlur,onSyncFocus:t.onSyncFocus,onSyncBlur:t.onSyncBlur});return e.call(void 0,U({},o))},F=function(t,e){return p.useContext(t)(e)},N=function(){return(N=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},G=function(){return p.createContext((function(t){return t}))},W=function(t,e){return p.forwardRef((function(o,r){var i=F(t,o);return p.createElement(e,N({},i,{ref:r}))}))};function X(t,e,o){var r=p.useState(e),i=r[0],n=r[1];return p.useEffect((function(){if(!i&&window&&t.current){var e=window.getComputedStyle(t.current).direction;e&&n(e)}}),o),i}function Y(t,e,o){var r=p.useState(e),i=r[0],n=r[1];return p.useEffect((function(){if(!i&&window&&t.current){var e=window.getComputedStyle(t.current).direction;e&&n(e)}}),o),i}var q,K=function(t,e,o){void 0===o&&(o={});var r=p.useCallback((function(r){o.onMouseDown&&o.onMouseDown.call(void 0,r),t.onMouseDown&&t.onMouseDown.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onMouseDown,t.onMouseDown,e]),i=p.useCallback((function(r){o.onMouseUp&&o.onMouseUp.call(void 0,r),t.onMouseUp&&t.onMouseUp.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onMouseUp,t.onMouseUp,e]);return{onClick:p.useCallback((function(r){o.onClick&&o.onClick.call(void 0,r),t.onClick&&t.onClick.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onClick,t.onClick,e]),onMouseUp:i,onMouseDown:r,onDoubleClick:p.useCallback((function(r){o.onDoubleClick&&o.onDoubleClick.call(void 0,r),t.onDoubleClick&&t.onDoubleClick.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onDoubleClick,t.onDoubleClick,e]),onMouseEnter:p.useCallback((function(r){o.onMouseEnter&&o.onMouseEnter.call(void 0,r),t.onMouseEnter&&t.onMouseEnter.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onMouseEnter,t.onMouseEnter,e]),onMouseLeave:p.useCallback((function(r){o.onMouseLeave&&o.onMouseLeave.call(void 0,r),t.onMouseLeave&&t.onMouseLeave.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onMouseLeave,t.onMouseLeave,e]),onMouseMove:p.useCallback((function(r){o.onMouseMove&&o.onMouseMove.call(void 0,r),t.onMouseMove&&t.onMouseMove.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onMouseMove,t.onMouseMove,e]),onMouseOut:p.useCallback((function(r){o.onMouseOut&&o.onMouseOut.call(void 0,r),t.onMouseOut&&t.onMouseOut.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onMouseOut,t.onMouseOut,e]),onMouseOver:p.useCallback((function(r){o.onMouseOver&&o.onMouseOver.call(void 0,r),t.onMouseOver&&t.onMouseOver.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onMouseOver,t.onMouseOver,e])}},Q=function(t){return p.isValidElement(t)?[t.type,t.props]:[t,{}]};!function(t){t[t.add=0]="add",t[t.remove=1]="remove"}(q||(q={}));var Z=function(t){void 0===t&&(t=[]);var e=p.useRef(t),o=p.useCallback((function(t){switch(t.type){case q.add:e.current.push(t.item);break;case q.remove:var o=e.current.indexOf(t.item);e.current.splice(o,1)}}),[]);return[e.current,o]},$=o(2),J={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl"},tt=function(){return(tt=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},et=function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(o[r[i]]=t[r[i]])}return o},ot=p.forwardRef((function(t,e){var o=t.className,r=t.name,i=t.themeColor,n=t.size,s=t.flip,l=t.style,h=et(t,["className","name","themeColor","size","flip","style"]),c=p.useRef(null),u=p.useRef(null);p.useImperativeHandle(c,(function(){return{element:u.current}})),p.useImperativeHandle(e,(function(){return c.current}));var d=p.useMemo((function(){return i||rt.themeColor}),[i]),f=p.useMemo((function(){return n||rt.size}),[n]),g=p.useMemo((function(){return s||rt.flip}),[s]),y=p.useMemo((function(){return a("k-icon","k-i-"+r,"k-color-"+d,{"k-flip-h":"horizontal"===g||"both"===g,"k-flip-v":"vertical"===g||"both"===g},J[f],o)}),[r,d,f,g,o]),v=K(t,c);return p.createElement("span",tt({ref:u},h,v,{className:y,style:l,role:"presentation"}))}));ot.propTypes={style:$.object,classNames:$.string,name:$.string,themeColor:$.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:$.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:$.oneOf(["default","horizontal","vertical","both"])};var rt={size:"default",themeColor:"inherit",flip:"default"};ot.displayName="KendoIcon";var it=function(){return(it=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},nt=function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(o[r[i]]=t[r[i]])}return o},st=p.forwardRef((function(t,e){var o=t.children,r=t.className,i=t.svgClassName,n=t.icon,s=t.flip,l=t.size,h=t.style,c=t.svgStyle,u=t.themeColor,d=t.viewBox,f=nt(t,["children","className","svgClassName","icon","flip","size","style","svgStyle","themeColor","viewBox"]),g=p.useRef(null);p.useImperativeHandle(e,(function(){return{element:g.current}}));var y=p.useMemo((function(){return n?n.name:at.icon}),[n]),v=p.useMemo((function(){return u||at.themeColor}),[u]),m=p.useMemo((function(){return l||at.size}),[l]),x=p.useMemo((function(){return s||at.flip}),[s]),b=p.useMemo((function(){return d||at.viewBox}),[d]),w=p.useMemo((function(){return a("k-svg-icon","k-color-"+v,"k-svg-i-"+y,{"k-flip-h":"horizontal"===x||"both"===x,"k-flip-v":"vertical"===x||"both"===x},J[m],r)}),[y,v,m,x,r]),_=p.useMemo((function(){return t.width&&t.height?it({width:t.width,height:t.height},h):t.width?it({width:t.width,height:t.width},h):t.height?it({width:t.height,height:t.height},h):it({},h)}),[t.width,t.height,h]);return p.createElement("span",{className:w,style:_,ref:g},p.createElement("svg",it({className:i,style:c,"aria-hidden":!0,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:n?n.viewBox:b,dangerouslySetInnerHTML:n?{__html:n.content}:void 0},f),n?void 0:o))}));st.propTypes={style:$.object,classNames:$.string,children:$.any,icon:$.object,themeColor:$.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:$.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:$.oneOf(["default","horizontal","vertical","both"])};var at={size:"default",themeColor:"inherit",flip:"default",icon:"",viewBox:"0 0 24 24"};st.displayName="KendoSvgIcon";var pt,lt={xsmall:"k-fs-xs",small:"k-fs-sm",medium:"k-fs-md",large:"k-fs-lg",xlarge:"k-fs-xl"},ht={light:"k-font-weight-light",normal:"k-font-weight-normal",bold:"k-font-weight-bold"},ct={xsmall:"k-m-xs",small:"k-m-sm",medium:"k-m-md",large:"k-m-lg",xlarge:"k-m-xl",thin:"k-m-thin",hair:"k-m-hair"},ut={xsmall:"xs",small:"sm",medium:"md",large:"lg",xlarge:"xl",thin:"thin",hair:"hair"},dt={top:"k-mt-",right:"k-mr-",bottom:"k-mb-",left:"k-ml-"},ft={left:"k-text-left",right:"k-text-right",center:"k-text-center",justify:"k-text-justify"},gt={lowercase:"k-text-lowercase",uppercase:"k-text-uppercase",capitalize:"k-text-capitalize"},yt={inherit:"k-color-inherit",primary:"k-color-primary",secondary:"k-color-secondary",tertiary:"k-color-tertiary",info:"k-color-info",success:"k-color-success",warning:"k-color-warning",error:"k-color-error",dark:"k-color-dark",light:"k-color-light",inverse:"k-color-inverse"},vt=function(){return(vt=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},mt=function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(o[r[i]]=t[r[i]])}return o},xt=function(t){var e=p.forwardRef((function(e,o){var r=e.className,i=e.fontSize,n=e.fontWeight,s=e.textAlign,a=e.textTransform,l=e.themeColor,h=e.margin,c=mt(e,["className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),u=p.useRef(null),d=p.useRef(null);p.useImperativeHandle(u,(function(){return{element:d.current,props:e}})),p.useImperativeHandle(o,(function(){return u.current}));var f=t,g=function(){if(void 0!==h){if("string"==typeof h)return[ct[h]];if("number"==typeof h&&h>=0&&h<=24)return["k-m-"+h];if("object"==typeof h){var t=[];return Object.keys(h).forEach((function(e){var o,r;null!==h[e]&&void 0!==h[e]&&t.push((o=e,r=h[e],""+dt[o]+("string"==typeof r?ut[r]:r)))})),t.join(" ")}}};return p.createElement(f,vt({ref:d,className:["k-"+("p"===t?"paragraph":t),lt[i],ht[n],ft[s],gt[a],yt[l],g(),r].filter((function(t){return void 0!==t})).join(" ")},c),e.children)}));return e.propTypes={style:$.object,className:$.string,fontSize:$.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:$.oneOf(["light","normal","bold"]),margin:$.oneOfType([$.number,$.object,$.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:$.oneOf(["left","right","center","justify"]),textTransform:$.oneOf(["lowercase","uppercase","capitalize"]),themeColor:$.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"])},e.displayName="KendoReactTypography"+t.toUpperCase(),e},bt={h1:xt("h1"),h2:xt("h2"),h3:xt("h3"),h4:xt("h4"),h5:xt("h5"),h6:xt("h6"),p:xt("p"),code:xt("code"),pre:xt("pre")},wt=function(t,e){var o=0,r=null;return e.forEach((function(e){if(e&&t){var i=function(t,e){var o=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=Math.max(r.top,o.top),n=Math.max(r.left,o.left),s=Math.min(r.left+r.width,o.left+o.width),a=Math.min(r.top+r.height,o.top+o.height),p=s-n,l=a-i;if(n<s&&i<a){var h=r.width*r.height,c=o.width*o.height,u=p*l;return Number((u/(h+c-u)).toFixed(4))}return 0}(t,e);i>o&&(o=i,r=e)}})),r},_t=function(){var t=window&&window.navigator.userAgent;if(!t)return!1;var e=!1,o=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(var i in r)if(r.hasOwnProperty(i)&&(o=t.match(r[i]))){(e={})[i]=!0,e[o[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,e.version=parseInt(document.DOCUMENT_NODE||o[2],10);break}return e},Ct=function(t){return t&&t.ownerDocument||window.document},kt=function(t){var e=_t(),o=Ct(t);return e.edge||e.safari?o.body:o.documentElement},St=function(t){if(t&&t.className&&"string"==typeof t.className&&t.className.indexOf("k-auto-scrollable")>-1)return!0;var e=window.getComputedStyle(t,"overflow").overflow;return e.indexOf("auto")>-1||e.indexOf("scroll")>-1},At=function(t){var e=kt(t);if(!t||t===document.body||t===document.documentElement)return e;for(var o=t;o&&!St(o)&&o!==document.body;)o=o.parentNode;return o===document.body?e:o};!function(t){t.POINTER_DOWN="pointerdown",t.POINTER_MOVE="pointermove",t.POINTER_UP="pointerup",t.POINTER_CANCEL="pointercancel",t.MOUSE_DOWN="mousedown",t.MOUSE_MOVE="mousemove",t.MOUSE_UP="mouseup",t.CONTEXT_MENU="contextmenu",t.TOUCH_START="touchstart",t.TOUCH_MOVE="touchmove",t.TOUCH_END="touchend",t.TOUCH_CANCEL="touchcancel",t.SCROLL="scroll",t.START="KENDO_DRAG_AND_DROP_START",t.MOVE="KENDO_DRAG_AND_DROP_MOVE",t.END="KENDO_DRAG_AND_DROP_END",t.CANCEL="KENDO_DRAG_AND_DROP_CANCEL"}(pt||(pt={}));var Pt=function(){},Ot=function(t,e,o){void 0===o&&(o={});var r,i,n,s,a=o.onIsPressedChange,p=void 0===a?Pt:a,l=o.onIsScrollingChange,h=void 0===l?Pt:l,c=o.onVelocityChange,u=void 0===c?Pt:c,d=o.onOffsetChange,f=void 0===d?Pt:d,g=o.onPageOffsetChange,y=void 0===g?Pt:g,v=o.onClientOffsetChange,m=void 0===v?Pt:v,x=o.onScrollOffsetChange,b=void 0===x?Pt:x,w=o.onInitialScrollOffsetChange,_=void 0===w?Pt:w,C=e.payload,k=C.element,S=C.hint,A=t.autoScrollDirection,P=t.scrollableParent,O=function(t,e){return function(t){return/^touch/.test(t.type)}(t)?{pageX:t.changedTouches[0].pageX,pageY:t.changedTouches[0].pageY,clientX:t.changedTouches[0].clientX,clientY:t.changedTouches[0].clientY,scrollX:e.scrollOffset.x,scrollY:e.scrollOffset.y,offsetX:e.offset.x,offsetY:e.offset.y,type:t.type,originalEvent:t,isTouch:!0,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1}:function(t){return/^(scroll)/.test(t.type)}(t)?{pageX:e.pageOffset.x,pageY:e.pageOffset.y,clientX:e.clientOffset.x,clientY:e.clientOffset.y,scrollX:e.scrollOffset.x,scrollY:e.scrollOffset.y,offsetX:e.offset.x,offsetY:e.offset.y,type:t.type,originalEvent:t,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1}:{pageX:t.pageX,pageY:t.pageY,clientX:t.clientX,clientY:t.clientY,offsetX:t.offsetX,offsetY:t.offsetY,scrollX:e.scrollOffset.x,scrollY:e.scrollOffset.y,type:t.type,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,originalEvent:t}}(e.event,t);switch(O.type){case pt.POINTER_DOWN:if(O.type===pt.POINTER_DOWN&&(!O.originalEvent.isPrimary||0!==O.originalEvent.button))break;case pt.MOUSE_DOWN:if(O.type===pt.MOUSE_DOWN&&O.originalEvent.which&&O.originalEvent.which>1||t.ignoreMouse)break;case pt.TOUCH_START:if(O.type===pt.TOUCH_START&&1!==O.originalEvent.touches.length)break;case pt.START:var M=P||At(e.payload.element);_(M instanceof Window?{x:M.scrollX,y:M.scrollY}:{x:M.scrollLeft,y:M.scrollTop}),m({x:O.clientX,y:O.clientY}),y({x:O.pageX,y:O.pageY}),f({x:O.offsetX,y:O.offsetY}),p(!0),C.onPress&&C.onPress(O);break;case pt.SCROLL:if(O.type===pt.SCROLL&&!t.pressed)break;var T=P||At(k),R=T instanceof Window?{x:T.scrollX,y:T.scrollY}:{x:T.scrollLeft,y:T.scrollTop};O.scrollX=R.x-t.initialScrollOffset.x,O.scrollY=R.y-t.initialScrollOffset.y,b({x:O.scrollX,y:O.scrollY});case pt.POINTER_MOVE:if(O.type===pt.POINTER_MOVE&&!O.originalEvent.isPrimary)break;case pt.MOUSE_MOVE:case pt.TOUCH_MOVE:if(O.type===pt.TOUCH_MOVE&&1!==O.originalEvent.touches.length)break;case pt.MOVE:if(t.pressed){if(t.autoScroll&&"scroll"!==O.originalEvent.type&&k){var B=Ct(k),I=P||At(B.elementFromPoint(O.clientX,O.clientY)),L=function(t,e,o){var r={x:0,y:0};return t-o.left<50?r.x=-(50-(t-o.left)):o.right-t<50&&(r.x=50-(o.right-t)),e-o.top<50?r.y=-(50-(e-o.top)):o.bottom-e<50&&(r.y=50-(o.bottom-e)),r}(O.pageX,O.pageY,function(t,e){var o=kt(t);if(t===o)return{top:o.scrollTop,left:o.scrollLeft,bottom:o.scrollTop+e.innerHeight,right:o.scrollLeft+e.innerWidth};var r=t.getBoundingClientRect();return{bottom:r.top+r.height,right:r.left+r.width,left:r.left,top:r.top}}(I,function(t){var e=Ct(t);return e&&e.defaultView||window}(k)));u({x:A&&!1===A.horizontal?0:L.x,y:A&&!1===A.vertical?0:L.y}),h(0!==L.y||0!==L.x)}!t.drag&&C.onDragStart&&C.onDragStart(O),C.onDrag&&C.onDrag(O);var j=wt(S||k,t.drops.map((function(t){return t&&t.element})).filter((function(t){return t!==(S||k)}))),E=t.drops.find((function(t){return t.element===j}));E&&j&&(r=O.clientX,i=O.clientY,n=P||At(j),(s=n.getBoundingClientRect()).top<=i&&s.left<=r&&i<=s.bottom&&r<=s.right)&&j!==k?(t.drop&&t.drop.element)!==j?(t.drop&&t.drop.onDragLeave&&t.drop.onDragLeave(O),E.onDragEnter&&E.onDragEnter(O)):E.onDragOver&&E.onDragOver(O):t.drop&&t.drop.onDragLeave&&t.drop.onDragLeave(O)}m({x:O.clientX,y:O.clientY}),y({x:O.pageX,y:O.pageY});break;case pt.POINTER_UP:if(O.type===pt.POINTER_UP&&!O.originalEvent.isPrimary)break;case pt.MOUSE_UP:case pt.TOUCH_END:if(O.type===pt.TOUCH_END&&1!==O.originalEvent.touches.length)break;case pt.END:p(!1),h(!1),C.onRelease&&C.onRelease(O),t.drop&&t.drop.onDrop&&t.drop.onDrop(O),C.onDragEnd&&C.onDragEnd(O);break;case pt.POINTER_CANCEL:case pt.CONTEXT_MENU:case pt.TOUCH_CANCEL:case pt.CANCEL:p(!1),h(!1),C.onDragEnd&&C.onDragEnd(O),t.drop&&t.drop.onDragLeave&&t.drop.onDragLeave(O)}},Mt=function(t,e){if(t){var o,r;t===kt(t)?(o=document.body.scrollHeight>window.innerHeight,r=document.body.scrollWidth>window.innerWidth):(o=t.offsetHeight<=t.scrollHeight,r=t.offsetWidth<=t.scrollWidth);var i=t.scrollTop+e.y,n=o&&i>0&&i<t.scrollHeight,s=t.scrollLeft+e.x,a=r&&s>0&&s<t.scrollWidth;n?t.scrollTop+=e.y:o&&i<0&&(t.scrollTop=0),a?t.scrollLeft+=e.x:r&&s<0&&(t.scrollLeft=0)}},Tt=function(t,e){var o=p.useContext(t),r=o[0],i=o[1],n=p.useState(e),s=n[0],a=n[1];return[void 0!==r?r:s,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];void 0!==r?i.apply(void 0,t):a(t[0])}]},Rt=p.createContext([void 0,C]),Bt=p.createContext([void 0,C]),It=p.createContext([[],C,C]),Lt=p.createContext([[],C,C]);function jt(t,e,o){void 0===o&&(o={});var r=e.onPress,i=void 0===r?C:r,n=e.onRelease,s=void 0===n?C:n,a=e.onDragStart,l=void 0===a?C:a,h=e.onDrag,c=void 0===h?C:h,u=e.onDragEnd,d=void 0===u?C:u,f=o.hint,g=void 0===f?null:f,y=o.mouseOnly,v=void 0!==y&&y,m=o.autoScroll,x=void 0===m||m,b=o.scrollContainer,w=void 0===b?null:b,_=p.useState(!1),k=_[0],S=_[1],A=p.useState(!1),P=A[0],O=A[1],M=Tt(Bt)[0],T=Tt(Rt),R=T[0],B=T[1],I=p.useContext(Lt)[0],L=p.useContext(It),j=L[0],E=L[1],D=L[2],V=p.useRef({x:0,y:0}),z=p.useRef(),U=p.useRef(!1),H=p.useRef(),F=p.useRef(!1),N=p.useRef({x:0,y:0}),G=p.useRef({x:0,y:0}),W=p.useRef({x:0,y:0}),X=p.useRef({x:0,y:0}),Y=p.useRef({x:0,y:0}),q=p.useRef({x:0,y:0}),K=Boolean(window&&"undefined"!=typeof window&&window.PointerEvent),Q=!v&&K,Z=p.useCallback((function(){return t.current&&t.current.element?t.current.element:t.current}),[t]),$=p.useCallback((function(){return g&&g.current&&g.current.element?g.current.element:g?g.current:null}),[g]),J=p.useCallback((function(){return w&&w.current&&w.current.element?w.current.element:w?w.current:null}),[w]),tt=p.useCallback((function(){return"object"==typeof x&&x.boundaryElementRef&&x.boundaryElementRef.current&&x.boundaryElementRef.current.element?x.boundaryElementRef.current.element:"object"==typeof x&&x.boundaryElementRef&&x.boundaryElementRef.current?x.boundaryElementRef.current:null}),[x]),et=p.useRef(null);p.useImperativeHandle(et,(function(){return{element:Z(),hint:$(),onPress:ft,onDragStart:yt,onDrag:vt,onDragEnd:mt,onRelease:gt,data:t.current}}));var ot=p.useCallback((function(){var t=Z();return t&&t.ownerDocument||document}),[Z]),rt=p.useCallback((function(){var t=ot();return t&&t.defaultView||window}),[ot]),it=p.useCallback((function(){return{drag:R?R.current:null,drop:M?M.current:null,drags:j.map((function(t){return t.current})),drops:I.map((function(t){return t.current})),pressed:k,ignoreMouse:U.current,scrollOffset:Y.current,offset:N.current,pageOffset:G.current,initialScrollOffset:q.current,clientOffset:W.current,initialClientOffset:X.current,velocity:V.current,autoScroll:Boolean("object"==typeof x?!1!==x.enabled:x),scrollableParent:tt(),autoScrollDirection:"object"==typeof x?x.direction:{horizontal:!0,vertical:!0},isScrolling:P}}),[R,M,j,I,k,x,tt,P]),nt=p.useCallback((function(t){S(t)}),[]),st=p.useCallback((function(t){O(t)}),[]),at=p.useCallback((function(t){V.current=t}),[]),pt=p.useCallback((function(t){N.current=t}),[]),lt=p.useCallback((function(t){W.current=t}),[]),ht=p.useCallback((function(t){G.current=t}),[]),ct=p.useCallback((function(t){X.current=t}),[]),ut=p.useCallback((function(t){Y.current=t}),[]),dt=p.useCallback((function(t){q.current=t}),[]),ft=p.useCallback((function(t){i(t)}),[i]),gt=p.useCallback((function(t){s(t)}),[s]),yt=p.useCallback((function(e){B(et,{target:t.current,event:e}),l(e)}),[B,t,l]),vt=p.useCallback((function(t){c(t)}),[c]),mt=p.useCallback((function(e){F.current||(B(null,{target:t.current,event:e}),d(e))}),[d,B,t]),xt=p.useCallback((function(t){Ot(it(),{event:t,payload:et.current},{onVelocityChange:at,onOffsetChange:pt,onClientOffsetChange:lt,onPageOffsetChange:ht,onInitialClientOffsetChange:ct,onScrollOffsetChange:ut,onInitialScrollOffsetChange:dt,onIsPressedChange:nt,onIsScrollingChange:st})}),[it,at,pt,ht,lt,ct,dt,nt,ut,st]),bt=p.useCallback((function(t){xt(t)}),[xt]),wt=p.useCallback((function(t){xt(t)}),[xt]),_t=p.useCallback((function(t){xt(t)}),[xt]),Ct=p.useCallback((function(t){xt(t)}),[xt]),kt=p.useCallback((function(t){xt(t)}),[xt]),St=p.useCallback((function(t){xt(t)}),[xt]),Pt=p.useCallback((function(t){xt(t)}),[xt]),jt=p.useCallback((function(t){t.preventDefault(),xt(t)}),[xt]),Et=p.useCallback((function(t){t.preventDefault(),xt(t)}),[xt]),Dt=p.useCallback((function(t){t.preventDefault(),xt(t)}),[xt]),Vt=p.useCallback((function(t){if(0===t.touches.length&&1===t.changedTouches.length){var e=rt();U.current=!0,H.current=e.setTimeout((function(){U.current=!1}),2e3)}xt(t)}),[xt,rt]),zt=p.useCallback((function(t){xt(t)}),[xt]),Ut=p.useCallback((function(){var t=Z();if(t){var e=t.style.touchAction;return t.style.touchAction="none",function(){t.style.touchAction=e}}}),[Z]),Ht=p.useCallback((function(){return E(et),function(){D(et)}}),[D,E]);p.useEffect((function(){var t=rt();if(P){var e=J()||At(document.elementFromPoint(W.current.x,W.current.y));t.clearInterval(z.current),z.current=t.setInterval((function(){Mt(e,{x:V.current.x,y:V.current.y})}),50)}return function(){t.clearInterval(z.current)}}),[Z,J,rt,P]),p.useEffect(Ut,[Ut]),p.useEffect((function(){var t=rt(),e=Z(),o=ot();if(Q){if(e)At(e).addEventListener("scroll",zt,{passive:!0}),e.addEventListener("pointerdown",bt,{passive:!0});k&&(o.addEventListener("pointermove",wt),o.addEventListener("pointerup",Ct,!0),o.addEventListener("contextmenu",jt),o.addEventListener("pointercancel",_t,{passive:!0}))}else t.addEventListener("touchmove",C,{capture:!1,passive:!1}),e&&(e.addEventListener("mousedown",kt,{passive:!0}),v||(e.addEventListener("touchstart",Et,{passive:!0}),k&&(e.addEventListener("touchmove",Dt,{passive:!0}),e.addEventListener("touchend",Vt,{passive:!0})))),k&&(o.addEventListener("mousemove",St,{passive:!0}),o.addEventListener("mouseup",Pt,{passive:!0}));return function(){if(e){var r=At(e);r&&r.removeEventListener("scroll",zt),e.removeEventListener("pointerdown",bt),e.removeEventListener("mousedown",kt),e.removeEventListener("touchstart",Et),e.removeEventListener("touchmove",Dt),e.removeEventListener("touchend",Vt)}o.removeEventListener("pointermove",wt),o.removeEventListener("pointerup",Ct,!0),o.removeEventListener("contextmenu",jt),o.removeEventListener("pointercancel",_t),o.removeEventListener("mousemove",St),o.removeEventListener("mouseup",Pt),t.removeEventListener("touchmove",C),t.clearTimeout(H.current)}}),[k,rt,Z,ot,v,Q,jt,kt,St,Pt,_t,bt,wt,Ct,Vt,Dt,Et,zt]),p.useEffect((function(){return function(){F.current=!0}}),[]),p.useLayoutEffect(Ht,[Ht])}function Et(t,e){void 0===e&&(e={onDragEnter:C,onDragOver:C,onDragLeave:C,onDrop:C});var o=e.onDragEnter,r=void 0===o?C:o,i=e.onDragOver,n=void 0===i?C:i,s=e.onDragLeave,a=void 0===s?C:s,l=e.onDrop,h=void 0===l?C:l,c=Tt(Bt)[1],u=p.useContext(Lt),d=u[1],f=u[2],g=p.useCallback((function(){return t.current&&t.current.element?t.current.element:t.current}),[t]),y=p.useRef(null);p.useImperativeHandle(y,(function(){return{element:g(),onDragEnter:v,onDragOver:m,onDragLeave:x,onDrop:b,data:t.current}}));var v=p.useCallback((function(e){c(y,{target:t.current,event:e}),r(e)}),[c,t,r]),m=p.useCallback((function(t){n(t)}),[n]),x=p.useCallback((function(e){c(null,{target:t.current,event:e}),a(e)}),[c,t,a]),b=p.useCallback((function(e){c(null,{target:t.current,event:e}),h(e)}),[c,t,h]),w=p.useCallback((function(){return d(y),function(){f(y)}}),[f,d]);p.useLayoutEffect(w,[w])}var Dt=function(){return(Dt=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Vt=function(t,e,o){var r=p.useState(e||t),i=r[0],n=r[1];return[void 0!==e?e:i,p.useCallback((function(t,e){n(t),o&&o.call(void 0,Dt({},e,{value:t}))}),[o,n])]},zt=function(t){var e=Vt(null,void 0),o=e[0],r=e[1],i=Vt(null,void 0),n=i[0],s=i[1],a=Z([]),l=a[0],h=a[1],c=Z([]),u=c[0],d=c[1];return p.createElement(Rt.Provider,{value:[o,r]},p.createElement(Bt.Provider,{value:[n,s]},p.createElement(It.Provider,{value:[l,function(t){h({type:q.add,item:t})},function(t){h({type:q.remove,item:t})}]},p.createElement(Lt.Provider,{value:[u,function(t){d({type:q.add,item:t})},function(t){d({type:q.remove,item:t})}]},t.children))))};zt.displayName="KendoReactDragAndDrop";var Ut=p.forwardRef((function(t,e){var o=p.useRef(null),r=p.useRef(null),i=p.useCallback((function(){return o.current&&o.current.element?o.current.element:o.current}),[o]);p.useImperativeHandle(r,(function(){return{element:i()||null}})),p.useImperativeHandle(e,(function(){return r.current})),p.useImperativeHandle(t.childRef,(function(){return o.current}));var n=p.useCallback((function(e){t.onPress&&t.onPress({element:i(),target:r.current,event:e})}),[i,t.onPress]),s=p.useCallback((function(e){t.onRelease&&t.onRelease({element:i(),target:r.current,event:e})}),[i,t.onRelease]),a=p.useCallback((function(e){t.onDragStart&&t.onDragStart({element:i(),target:r.current,event:e})}),[t,i]),l=p.useCallback((function(e){t.onDrag&&t.onDrag({element:i(),target:r.current,event:e})}),[i,t.onDrag]),h=p.useCallback((function(e){t.onDragEnd&&t.onDragEnd({element:i(),target:r.current,event:e})}),[i,t.onDragEnd]);return jt(o,{onPress:n,onRelease:s,onDragStart:a,onDrag:l,onDragEnd:h},{mouseOnly:t.mouseOnly,autoScroll:t.autoScroll,hint:t.hint,scrollContainer:t.scrollContainer}),t.children?p.cloneElement(p.Children.only(t.children),{ref:o}):null}));Ut.displayName="KendoReactDraggable";var Ht=p.forwardRef((function(t,e){var o=p.useRef(null),r=p.useRef(null),i=p.useCallback((function(){return o.current&&o.current.element?o.current.element:o.current}),[o]);p.useImperativeHandle(r,(function(){return{element:i()||void 0}})),p.useImperativeHandle(e,(function(){return r.current})),p.useImperativeHandle(t.childRef,(function(){return o.current}));var n=p.useCallback((function(e){t.onDragEnter&&t.onDragEnter({element:i(),target:r.current,event:e})}),[t.onDragEnter,i]),s=p.useCallback((function(e){t.onDragOver&&t.onDragOver({element:i(),target:r.current,event:e})}),[i,t.onDragOver]),a=p.useCallback((function(e){t.onDragLeave&&t.onDragLeave({element:i(),target:r.current,event:e})}),[t.onDragLeave,i]),l=p.useCallback((function(e){t.onDrop&&t.onDrop({element:i(),target:r.current,event:e})}),[t.onDrop,i]);return Et(o,{onDragEnter:n,onDragOver:s,onDragLeave:a,onDrop:l}),t.children?p.cloneElement(p.Children.only(t.children),{ref:o}):null}));Ht.displayName="KendoReactDroppable"},function(t,e,o){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),n=this&&this.__rest||function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(o[r[i]]=t[r[i]])}return o};Object.defineProperty(e,"__esModule",{value:!0});var s=o(1),a=o(2),p=o(10),l=o(11),h=o(12),c=o(13),u=o(14),d=o(4),f=o(8),g=o(4),y=o(15),v=function(t){function e(e){var o=t.call(this,e)||this;return o.gaugeInstance=null,o._element=null,o.themeStore={},o.themeUnsubscriber=Function.prototype,o.observersStore={},o.onWindowResize=function(){null!==o.gaugeInstance&&(o.gaugeInstance.resize(),o.trigger("render",{sender:o}))},g.validatePackage(y.packageMetadata),o.themeStore=h.default(c.themeReducer),o.observersStore=h.default(c.observersReducer),o.contextValue={observersStore:o.observersStore},o}return i(e,t),Object.defineProperty(e.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),e.prototype.componentDidMount=function(){l.loadTheme(this.themeStore,this.instantiateCoreGauge.bind(this)),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize),this.trigger("render",{sender:this})},e.prototype.componentDidUpdate=function(t){var e=this.props,o=e.dir,r=(e.children,e.deriveOptionsFromParent,e.getTarget,e.gaugeConstructor,e.className,e.renderAs),i=n(e,["dir","children","deriveOptionsFromParent","getTarget","gaugeConstructor","className","renderAs"]),s=(t.dir,t.children,t.deriveOptionsFromParent,t.getTarget,t.gaugeConstructor,t.className,t.renderAs),a=n(t,["dir","children","deriveOptionsFromParent","getTarget","gaugeConstructor","className","renderAs"]);if(null!==this.gaugeInstance){var l=p.provideIntlService(this),h=this.gaugeInstance.contextService,c=l.locale!==h._intlService.locale,d=u.isOptionsChanged(a,i),f=i;if(c&&(this.gaugeInstance.contextService._intlService=l,this.gaugeInstance.contextService.format._intlService=l,d||this.gaugeInstance.noTransitionsRedraw()),d||(r||"svg")!==(s||"svg"))this.refresh();else if(Object.keys(i).indexOf("pointer")>-1)Array.isArray(f.pointer)?this.refreshAllValues(f.pointer.map((function(t){return t.value}))):this.refreshValue((f.pointer||{}).value);else this.refreshValue(f.value);t.dir!==o&&this.gaugeInstance.setDirection(this.getDirection(o)),this.trigger("render",{sender:this})}},e.prototype.componentWillUnmount=function(){this.themeUnsubscriber(),null!==this.gaugeInstance&&(this.gaugeInstance.destroy(),this.gaugeInstance=null),window.removeEventListener("resize",this.onWindowResize)},e.prototype.render=function(){var t=this,e=this.props,o=e.style,r=void 0===o?{}:o,i=e.className,n=e.children,a=Object.assign({},r,{position:"relative"});return s.createElement(f.GaugeContext.Provider,{value:this.contextValue},s.createElement("div",{style:a,ref:function(e){return t._element=e},className:i},n))},e.prototype.instantiateCoreGauge=function(){var t=this.props,e=t.dir,o=t.gaugeConstructor,r=this.getGaugeOptions();this.gaugeInstance=new o(this.element,r,this.themeStore.getState(),{rtl:this.getDirection(e),intlService:p.provideIntlService(this),sender:this})},e.prototype.refresh=function(){if(null!==this.gaugeInstance){var t=this.themeStore.getState(),e=this.getGaugeOptions();this.gaugeInstance.setOptions(e,t)}},e.prototype.refreshValue=function(t){this.gaugeInstance.value(t)},e.prototype.refreshAllValues=function(t){this.gaugeInstance.allValues(t)},e.prototype.getDirection=function(t){var e=this;return"rtl"===(void 0!==t?t:d.canUseDOM&&window.getComputedStyle(e.element).direction||"ltr")},e.prototype.getGaugeOptions=function(){var t=this.props,e=t.renderAs,o=t.transitions,r=t.deriveOptionsFromParent,i=Object.assign({renderAs:e,transitions:o});return r&&(i=r(i)),i},e.prototype.trigger=function(t,e){for(var o=this.observersStore.getState(),r=0;r<o.length;r++)o[r].trigger(t,e)},e.propTypes={dir:a.string,renderAs:a.oneOf(["svg","canvas"])},e.defaultProps={renderAs:"svg"},e}(s.Component);e.BaseGauge=v,p.registerForIntl(v)},function(t,e){t.exports=r},function(t,e,o){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},s=this&&this.__rest||function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(o[r[i]]=t[r[i]])}return o};Object.defineProperty(e,"__esModule",{value:!0});var a=o(1),p=o(5),l=o(3),h=o(16),c=o(0),u=o(4),d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.gaugeType=l.ArcGauge,e.getTarget=function(){return e},e.deriveOptionsFromParent=function(t){var o=e.props,r=o.value,i=o.color,n=o.colors,s=o.opacity,a=o.scale;return Object.assign({},t,{value:r,color:i,colors:n,opacity:s,scale:a})},e}return i(e,t),Object.defineProperty(e.prototype,"gaugeInstance",{get:function(){return this._baseGauge?this._baseGauge.gaugeInstance:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"surface",{get:function(){return this._baseGauge?this._baseGauge.surface:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this._baseGauge?this._baseGauge.element:null},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this,e=this.props,o=e.children,r=e.arcCenterRender,i=e.centerRender,l=e.className,c=s(e,["children","arcCenterRender","centerRender","className"]);return a.createElement(p.BaseGauge,n({},c,{deriveOptionsFromParent:this.deriveOptionsFromParent,ref:function(e){return t._baseGauge=e},gaugeConstructor:this.gaugeType,getTarget:this.getTarget,className:u.classNames("k-gauge k-arcgauge",l)}),o,a.createElement(h.ArcCenter,{render:i||r}))},e.prototype.exportVisual=function(t){return null!==this.gaugeInstance&&this.element?c.drawDOM(this.element,t):Promise.resolve(new c.Group)},e}(a.Component);e.ArcGauge=d},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(1);e.GaugeContext=r.createContext(null),e.GaugeContext.displayName="GaugeContext"},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(7);e.ArcGauge=r.ArcGauge;var i=o(17);e.CircularGauge=i.CircularGauge;var n=o(18);e.LinearGauge=n.LinearGauge;var s=o(19);e.RadialGauge=s.RadialGauge},function(t,e){t.exports=i},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(3),i=function(){function t(t){this.store=t}return t.prototype.setStyle=function(t,e){this.store.dispatch({type:"set",payload:{field:t,value:e}})},t.prototype.setColors=function(){this.mapColor("pointer.color","gauge-pointer"),this.mapColor("scale.rangePlaceholderColor","gauge-track"),this.mapColor("scale.labels.color","normal-text-color"),this.mapColor("scale.minorTicks.color","normal-text-color"),this.mapColor("scale.majorTicks.color","normal-text-color"),this.mapColor("scale.line.color","normal-text-color")},t.prototype.mapColor=function(t,e){this.setStyle(t,this.queryStyle(e).backgroundColor)},t.prototype.queryStyle=function(t){var e=this.element;return window.getComputedStyle(e.querySelector(".k-var--"+t))},t}();e.loadTheme=function(t,e){var o=new i(t);if("undefined"!=typeof document){var n=o.element=document.createElement("div");n.style.display="none",n.innerHTML='\n <div class="k-var--gauge-pointer"></div>\n <div class="k-var--gauge-track"></div>\n <div class="k-var--normal-text-color"></div>\n',document.body.appendChild(n);try{t.dispatch({type:"push",payload:r.chartBaseTheme()}),o.setColors()}finally{document.body.removeChild(o.element),delete o.element,e()}}else t.dispatch({type:"push",payload:r.chartBaseTheme()})}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(4);e.THROTTLE_MS=1e3/60;e.default=function(t){var o,i,n=[],s=function(s){o=t(o,s),r.canUseDOM&&(window.clearTimeout(i),i=window.setTimeout((function(){return n.forEach((function(t){return t()}))}),e.THROTTLE_MS))};return s({}),{getState:function(){return o},dispatch:s,subscribe:function(t){return n.push(t),function(){return n=n.filter((function(e){return e!==t}))}}}}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.optionsReducer=function(t,e){return e.gaugeCollectionIdxKey?r.collectionConfigurationItem(t,e):e.gaugeKey?r.configurationItem(t,e):{}};e.themeReducer=function(t,e){if(!e.type)return{};switch(e.type){case"set":return r.themeItem(t,e);case"push":return Object.assign(t,e.payload);default:return t}};e.observersReducer=function(t,e){if(!e.type)return[];switch(e.type){case"add":return t.concat([e.payload]);case"remove":return t.filter((function(t){return t!==e.payload}));default:return t}};var r={configurationItem:function(t,e){var o;return Object.assign(t,((o={})[e.gaugeKey]=e.payload,o))},collectionConfigurationItem:function(t,e){var o,r=!1,i=e.gaugeCollectionIdxKey.split("_"),n=i[0],s=i[1],a=t[n].map((function(t,o){return parseInt(s,10)===o?(r=!0,e.payload):t}));return!1===r&&a.splice(parseInt(s,10),0,e.payload),Object.assign(t,((o={})[n]=a,o))},themeItem:function(t,e){for(var o={},r=Object.assign(o,t),i=e.payload,n=i.field,s=i.value,a=n.split("."),p=a.shift();a.length>0;)o=o[p]=o[p]||{},p=a.shift();return o[p]=s,r}}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return"object"==typeof t},i=function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!0;for(var o in t)if("value"!==o&&t.hasOwnProperty(o)){var n=t[o],s=e[o];if(r(n)&&r(s)?i(n,s):n!==s)return!0}return!1};e.isOptionsChanged=function(t,e){if(!t||!e)return!0;if(t=[].concat(t),e=[].concat(e),t.length!==e.length)return!0;for(var o=0;o<t.length;o++)if(i(t[o],e[o]))return!0;return!1}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.packageMetadata={name:"@progress/kendo-react-gauges",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1638168285,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},function(t,e,o){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(e,"__esModule",{value:!0});var n=o(1),s=o(3),a=o(8),p=function(t){function e(e,o){var r=t.call(this,e,o)||this;return r.state={arcCenterStyles:null,arcCenterValue:{value:0,color:""}},r._element=null,r.gaugeObserver=new s.InstanceObserver(r,{render:"onRender"}),o.observersStore.dispatch({type:"add",payload:r.gaugeObserver}),r}return i(e,t),e.prototype.render=function(){var t=this,e=this.props.render,o=this.state,r=o.arcCenterStyles,i=o.arcCenterValue,s=r||{zIndex:-1},a=null;return e&&(a=n.createElement("div",{className:"k-arcgauge-label",ref:function(e){return t._element=e},style:s},e(i.value,i.color))),a},e.prototype.onRender=function(t){if(this._element){var e=t.sender.gaugeInstance,o=this._element.offsetWidth,r=this._element.offsetHeight,i=e.centerLabelPosition(o,r);this.setState({arcCenterStyles:{left:i.left,top:i.top},arcCenterValue:{value:e.value(),color:e.currentColor()}})}},e.contextType=a.GaugeContext,e}(n.Component);e.ArcCenter=p},function(t,e,o){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(e,"__esModule",{value:!0});var n=o(7),s=o(3),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.gaugeType=s.CircularGauge,e}return i(e,t),e}(n.ArcGauge);e.CircularGauge=a},function(t,e,o){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},s=this&&this.__rest||function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(o[r[i]]=t[r[i]])}return o};Object.defineProperty(e,"__esModule",{value:!0});var a=o(1),p=o(5),l=o(3),h=o(0),c=o(4),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.getTarget=function(){return e},e.deriveOptionsFromParent=function(t){var o=e.props,r=o.pointer,i=o.scale;return Object.assign({},t,{pointer:r,scale:i})},e}return i(e,t),Object.defineProperty(e.prototype,"gaugeInstance",{get:function(){return null!==this._baseGauge?this._baseGauge.gaugeInstance:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"surface",{get:function(){return null!==this._baseGauge?this._baseGauge.surface:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return null!==this._baseGauge?this._baseGauge.element:null},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this,e=this.props,o=e.children,r=e.className,i=s(e,["children","className"]);return a.createElement(p.BaseGauge,n({},i,{deriveOptionsFromParent:this.deriveOptionsFromParent,ref:function(e){return t._baseGauge=e},gaugeConstructor:l.LinearGauge,getTarget:this.getTarget,className:c.classNames("k-gauge",r)}),o)},e.prototype.exportVisual=function(t){return null!==this.gaugeInstance?Promise.resolve(this.gaugeInstance.exportVisual(t)):Promise.resolve(new h.Group)},e}(a.Component);e.LinearGauge=u},function(t,e,o){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},s=this&&this.__rest||function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(o[r[i]]=t[r[i]])}return o};Object.defineProperty(e,"__esModule",{value:!0});var a=o(1),p=o(5),l=o(3),h=o(0),c=o(4),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.getTarget=function(){return e},e.deriveOptionsFromParent=function(t){var o=e.props,r=o.pointer,i=o.scale;return Object.assign({},t,{pointer:r,scale:i})},e}return i(e,t),Object.defineProperty(e.prototype,"gaugeInstance",{get:function(){return null!==this._baseGauge?this._baseGauge.gaugeInstance:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"surface",{get:function(){return null!==this._baseGauge?this._baseGauge.surface:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return null!==this._baseGauge?this._baseGauge.element:null},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this,e=this.props,o=e.children,r=e.className,i=s(e,["children","className"]);return a.createElement(p.BaseGauge,n({},i,{deriveOptionsFromParent:this.deriveOptionsFromParent,ref:function(e){return t._baseGauge=e},gaugeConstructor:l.RadialGauge,getTarget:this.getTarget,className:c.classNames("k-gauge",r)}),o)},e.prototype.exportVisual=function(t){return null!==this.gaugeInstance?Promise.resolve(this.gaugeInstance.exportVisual(t)):Promise.resolve(new h.Group)},e}(a.Component);e.RadialGauge=u}])}));
|